generated-configure.sh revision 1351:df8fda9c150e
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
823BOOT_TOOLSJAR
824BOOT_RTJAR
825JAVA_CHECK
826JAVAC_CHECK
827COOKED_BUILD_NUMBER
828JDK_VERSION
829COPYRIGHT_YEAR
830MACOSX_BUNDLE_ID_BASE
831MACOSX_BUNDLE_NAME_BASE
832COMPANY_NAME
833JDK_RC_PLATFORM_NAME
834PRODUCT_SUFFIX
835PRODUCT_NAME
836LAUNCHER_NAME
837MILESTONE
838JDK_BUILD_NUMBER
839JDK_UPDATE_VERSION
840JDK_MICRO_VERSION
841JDK_MINOR_VERSION
842JDK_MAJOR_VERSION
843USER_RELEASE_SUFFIX
844COMPRESS_JARS
845RMICONNECTOR_IIOP
846UNLIMITED_CRYPTO
847CACERTS_FILE
848TEST_IN_BUILD
849BUILD_HEADLESS
850SUPPORT_HEADFUL
851SUPPORT_HEADLESS
852BDEPS_FTP
853BDEPS_UNZIP
854OS_VERSION_MICRO
855OS_VERSION_MINOR
856OS_VERSION_MAJOR
857PKG_CONFIG
858CODESIGN
859XATTR
860DSYMUTIL
861IS_GNU_TIME
862TIME
863STAT
864HG
865READELF
866OTOOL
867LDD
868ZIP
869UNZIP
870FIND_DELETE
871OUTPUT_SYNC
872OUTPUT_SYNC_SUPPORTED
873MAKE
874CHECK_TOOLSDIR_MAKE
875CHECK_TOOLSDIR_GMAKE
876CHECK_MAKE
877CHECK_GMAKE
878PKGHANDLER
879OUTPUT_ROOT
880CONF_NAME
881SPEC
882SDKROOT
883XCODEBUILD
884BUILD_VARIANT_RELEASE
885DEBUG_CLASSFILES
886FASTDEBUG
887VARIANT
888DEBUG_LEVEL
889MACOSX_UNIVERSAL
890INCLUDE_SA
891JVM_VARIANT_CORE
892JVM_VARIANT_ZEROSHARK
893JVM_VARIANT_ZERO
894JVM_VARIANT_KERNEL
895JVM_VARIANT_MINIMAL1
896JVM_VARIANT_CLIENT
897JVM_VARIANT_SERVER
898JVM_VARIANTS
899JVM_INTERPRETER
900JDK_VARIANT
901SET_OPENJDK
902BUILD_LOG_WRAPPER
903BUILD_LOG_PREVIOUS
904BUILD_LOG
905TOPDIR
906PATH_SEP
907ZERO_ARCHDEF
908DEFINE_CROSS_COMPILE_ARCH
909LP64
910OPENJDK_TARGET_OS_EXPORT_DIR
911OPENJDK_TARGET_CPU_JLI_CFLAGS
912OPENJDK_TARGET_CPU_OSARCH
913OPENJDK_TARGET_CPU_ISADIR
914OPENJDK_TARGET_CPU_LIBDIR
915OPENJDK_TARGET_CPU_LEGACY_LIB
916OPENJDK_TARGET_CPU_LEGACY
917REQUIRED_OS_VERSION
918REQUIRED_OS_NAME
919COMPILE_TYPE
920OPENJDK_TARGET_CPU_ENDIAN
921OPENJDK_TARGET_CPU_BITS
922OPENJDK_TARGET_CPU_ARCH
923OPENJDK_TARGET_CPU
924OPENJDK_TARGET_OS_ENV
925OPENJDK_TARGET_OS_TYPE
926OPENJDK_TARGET_OS
927OPENJDK_BUILD_CPU_ENDIAN
928OPENJDK_BUILD_CPU_BITS
929OPENJDK_BUILD_CPU_ARCH
930OPENJDK_BUILD_CPU
931OPENJDK_BUILD_OS_ENV
932OPENJDK_BUILD_OS_TYPE
933OPENJDK_BUILD_OS
934OPENJDK_BUILD_AUTOCONF_NAME
935OPENJDK_TARGET_AUTOCONF_NAME
936target_os
937target_vendor
938target_cpu
939target
940host_os
941host_vendor
942host_cpu
943host
944build_os
945build_vendor
946build_cpu
947build
948CPIO
949SETFILE
950DF
951READLINK
952CYGPATH
953SED
954FGREP
955EGREP
956GREP
957AWK
958XARGS
959WHICH
960WC
961UNIQ
962UNAME
963TR
964TOUCH
965TEE
966TAR
967TAIL
968SORT
969SH
970RM
971PRINTF
972NAWK
973MV
974MKTEMP
975MKDIR
976LS
977LN
978HEAD
979FIND
980FILE
981EXPR
982ECHO
983DIRNAME
984DIFF
985DATE
986CUT
987CP
988COMM
989CMP
990CHMOD
991CAT
992BASH
993BASENAME
994DATE_WHEN_CONFIGURED
995CONFIGURE_COMMAND_LINE
996target_alias
997host_alias
998build_alias
999LIBS
1000ECHO_T
1001ECHO_N
1002ECHO_C
1003DEFS
1004mandir
1005localedir
1006libdir
1007psdir
1008pdfdir
1009dvidir
1010htmldir
1011infodir
1012docdir
1013oldincludedir
1014includedir
1015localstatedir
1016sharedstatedir
1017sysconfdir
1018datadir
1019datarootdir
1020libexecdir
1021sbindir
1022bindir
1023program_transform_name
1024prefix
1025exec_prefix
1026PACKAGE_URL
1027PACKAGE_BUGREPORT
1028PACKAGE_STRING
1029PACKAGE_VERSION
1030PACKAGE_TARNAME
1031PACKAGE_NAME
1032PATH_SEPARATOR
1033SHELL'
1034ac_subst_files=''
1035ac_user_opts='
1036enable_option_checking
1037with_target_bits
1038enable_openjdk_only
1039with_custom_make_dir
1040with_jdk_variant
1041with_jvm_interpreter
1042with_jvm_variants
1043enable_debug
1044with_debug_level
1045with_devkit
1046with_sys_root
1047with_sysroot
1048with_tools_dir
1049with_toolchain_path
1050with_extra_path
1051with_sdk_name
1052with_conf_name
1053with_output_sync
1054with_builddeps_conf
1055with_builddeps_server
1056with_builddeps_dir
1057with_builddeps_group
1058enable_headful
1059enable_hotspot_test_in_build
1060with_cacerts_file
1061enable_unlimited_crypto
1062enable_rmiconnector_iiop
1063with_milestone
1064with_update_version
1065with_user_release_suffix
1066with_build_number
1067with_copyright_year
1068with_boot_jdk
1069with_add_source_root
1070with_override_source_root
1071with_adds_and_overrides
1072with_override_langtools
1073with_override_corba
1074with_override_jaxp
1075with_override_jaxws
1076with_override_hotspot
1077with_override_nashorn
1078with_override_jdk
1079with_import_hotspot
1080with_toolchain_type
1081with_jtreg
1082with_extra_cflags
1083with_extra_cxxflags
1084with_extra_ldflags
1085enable_debug_symbols
1086enable_zip_debug_info
1087with_x
1088with_cups
1089with_cups_include
1090with_freetype
1091with_freetype_include
1092with_freetype_lib
1093with_freetype_src
1094enable_freetype_bundling
1095with_alsa
1096with_alsa_include
1097with_alsa_lib
1098with_libjpeg
1099with_giflib
1100with_lcms
1101with_libpng
1102with_zlib
1103with_stdc__lib
1104with_msvcr_dll
1105with_dxsdk
1106with_dxsdk_lib
1107with_dxsdk_include
1108with_num_cores
1109with_memory_size
1110with_jobs
1111with_boot_jdk_jvmargs
1112with_sjavac_server_java
1113enable_sjavac
1114enable_precompiled_headers
1115enable_ccache
1116with_ccache_dir
1117'
1118      ac_precious_vars='build_alias
1119host_alias
1120target_alias
1121BASENAME
1122BASH
1123CAT
1124CHMOD
1125CMP
1126COMM
1127CP
1128CUT
1129DATE
1130DIFF
1131DIRNAME
1132ECHO
1133EXPR
1134FILE
1135FIND
1136HEAD
1137LN
1138LS
1139MKDIR
1140MKTEMP
1141MV
1142NAWK
1143PRINTF
1144RM
1145SH
1146SORT
1147TAIL
1148TAR
1149TEE
1150TOUCH
1151TR
1152UNAME
1153UNIQ
1154WC
1155WHICH
1156XARGS
1157AWK
1158GREP
1159EGREP
1160FGREP
1161SED
1162CYGPATH
1163READLINK
1164DF
1165SETFILE
1166CPIO
1167UNZIP
1168ZIP
1169LDD
1170OTOOL
1171READELF
1172HG
1173STAT
1174TIME
1175DSYMUTIL
1176XATTR
1177CODESIGN
1178PKG_CONFIG
1179JAVA
1180JAVAC
1181JAVAH
1182JAR
1183NATIVE2ASCII
1184JARSIGNER
1185CC
1186CFLAGS
1187LDFLAGS
1188LIBS
1189CPPFLAGS
1190CXX
1191CXXFLAGS
1192CCC
1193CPP
1194CXXCPP
1195AS
1196AR
1197OBJC
1198OBJCFLAGS
1199LIPO
1200STRIP
1201NM
1202GNM
1203MCS
1204OBJCOPY
1205OBJDUMP
1206BUILD_CC
1207BUILD_CXX
1208BUILD_LD
1209JTREGEXE
1210XMKMF
1211FREETYPE_CFLAGS
1212FREETYPE_LIBS
1213ALSA_CFLAGS
1214ALSA_LIBS
1215LCMS_CFLAGS
1216LCMS_LIBS
1217PNG_CFLAGS
1218PNG_LIBS
1219LIBFFI_CFLAGS
1220LIBFFI_LIBS
1221CCACHE'
1222
1223
1224# Initialize some variables set by options.
1225ac_init_help=
1226ac_init_version=false
1227ac_unrecognized_opts=
1228ac_unrecognized_sep=
1229# The variables have the same names as the options, with
1230# dashes changed to underlines.
1231cache_file=/dev/null
1232exec_prefix=NONE
1233no_create=
1234no_recursion=
1235prefix=NONE
1236program_prefix=NONE
1237program_suffix=NONE
1238program_transform_name=s,x,x,
1239silent=
1240site=
1241srcdir=
1242verbose=
1243x_includes=NONE
1244x_libraries=NONE
1245
1246# Installation directory options.
1247# These are left unexpanded so users can "make install exec_prefix=/foo"
1248# and all the variables that are supposed to be based on exec_prefix
1249# by default will actually change.
1250# Use braces instead of parens because sh, perl, etc. also accept them.
1251# (The list follows the same order as the GNU Coding Standards.)
1252bindir='${exec_prefix}/bin'
1253sbindir='${exec_prefix}/sbin'
1254libexecdir='${exec_prefix}/libexec'
1255datarootdir='${prefix}/share'
1256datadir='${datarootdir}'
1257sysconfdir='${prefix}/etc'
1258sharedstatedir='${prefix}/com'
1259localstatedir='${prefix}/var'
1260includedir='${prefix}/include'
1261oldincludedir='/usr/include'
1262docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1263infodir='${datarootdir}/info'
1264htmldir='${docdir}'
1265dvidir='${docdir}'
1266pdfdir='${docdir}'
1267psdir='${docdir}'
1268libdir='${exec_prefix}/lib'
1269localedir='${datarootdir}/locale'
1270mandir='${datarootdir}/man'
1271
1272ac_prev=
1273ac_dashdash=
1274for ac_option
1275do
1276  # If the previous option needs an argument, assign it.
1277  if test -n "$ac_prev"; then
1278    eval $ac_prev=\$ac_option
1279    ac_prev=
1280    continue
1281  fi
1282
1283  case $ac_option in
1284  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1285  *=)   ac_optarg= ;;
1286  *)    ac_optarg=yes ;;
1287  esac
1288
1289  # Accept the important Cygnus configure options, so we can diagnose typos.
1290
1291  case $ac_dashdash$ac_option in
1292  --)
1293    ac_dashdash=yes ;;
1294
1295  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1296    ac_prev=bindir ;;
1297  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1298    bindir=$ac_optarg ;;
1299
1300  -build | --build | --buil | --bui | --bu)
1301    ac_prev=build_alias ;;
1302  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1303    build_alias=$ac_optarg ;;
1304
1305  -cache-file | --cache-file | --cache-fil | --cache-fi \
1306  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1307    ac_prev=cache_file ;;
1308  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1309  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1310    cache_file=$ac_optarg ;;
1311
1312  --config-cache | -C)
1313    cache_file=config.cache ;;
1314
1315  -datadir | --datadir | --datadi | --datad)
1316    ac_prev=datadir ;;
1317  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1318    datadir=$ac_optarg ;;
1319
1320  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1321  | --dataroo | --dataro | --datar)
1322    ac_prev=datarootdir ;;
1323  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1324  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1325    datarootdir=$ac_optarg ;;
1326
1327  -disable-* | --disable-*)
1328    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1329    # Reject names that are not valid shell variable names.
1330    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1331      as_fn_error $? "invalid feature name: $ac_useropt"
1332    ac_useropt_orig=$ac_useropt
1333    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1334    case $ac_user_opts in
1335      *"
1336"enable_$ac_useropt"
1337"*) ;;
1338      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1339	 ac_unrecognized_sep=', ';;
1340    esac
1341    eval enable_$ac_useropt=no ;;
1342
1343  -docdir | --docdir | --docdi | --doc | --do)
1344    ac_prev=docdir ;;
1345  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1346    docdir=$ac_optarg ;;
1347
1348  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1349    ac_prev=dvidir ;;
1350  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1351    dvidir=$ac_optarg ;;
1352
1353  -enable-* | --enable-*)
1354    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1355    # Reject names that are not valid shell variable names.
1356    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1357      as_fn_error $? "invalid feature name: $ac_useropt"
1358    ac_useropt_orig=$ac_useropt
1359    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1360    case $ac_user_opts in
1361      *"
1362"enable_$ac_useropt"
1363"*) ;;
1364      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1365	 ac_unrecognized_sep=', ';;
1366    esac
1367    eval enable_$ac_useropt=\$ac_optarg ;;
1368
1369  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1370  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1371  | --exec | --exe | --ex)
1372    ac_prev=exec_prefix ;;
1373  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1374  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1375  | --exec=* | --exe=* | --ex=*)
1376    exec_prefix=$ac_optarg ;;
1377
1378  -gas | --gas | --ga | --g)
1379    # Obsolete; use --with-gas.
1380    with_gas=yes ;;
1381
1382  -help | --help | --hel | --he | -h)
1383    ac_init_help=long ;;
1384  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1385    ac_init_help=recursive ;;
1386  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1387    ac_init_help=short ;;
1388
1389  -host | --host | --hos | --ho)
1390    ac_prev=host_alias ;;
1391  -host=* | --host=* | --hos=* | --ho=*)
1392    host_alias=$ac_optarg ;;
1393
1394  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1395    ac_prev=htmldir ;;
1396  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1397  | --ht=*)
1398    htmldir=$ac_optarg ;;
1399
1400  -includedir | --includedir | --includedi | --included | --include \
1401  | --includ | --inclu | --incl | --inc)
1402    ac_prev=includedir ;;
1403  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1404  | --includ=* | --inclu=* | --incl=* | --inc=*)
1405    includedir=$ac_optarg ;;
1406
1407  -infodir | --infodir | --infodi | --infod | --info | --inf)
1408    ac_prev=infodir ;;
1409  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1410    infodir=$ac_optarg ;;
1411
1412  -libdir | --libdir | --libdi | --libd)
1413    ac_prev=libdir ;;
1414  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1415    libdir=$ac_optarg ;;
1416
1417  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1418  | --libexe | --libex | --libe)
1419    ac_prev=libexecdir ;;
1420  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1421  | --libexe=* | --libex=* | --libe=*)
1422    libexecdir=$ac_optarg ;;
1423
1424  -localedir | --localedir | --localedi | --localed | --locale)
1425    ac_prev=localedir ;;
1426  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1427    localedir=$ac_optarg ;;
1428
1429  -localstatedir | --localstatedir | --localstatedi | --localstated \
1430  | --localstate | --localstat | --localsta | --localst | --locals)
1431    ac_prev=localstatedir ;;
1432  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1433  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1434    localstatedir=$ac_optarg ;;
1435
1436  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1437    ac_prev=mandir ;;
1438  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1439    mandir=$ac_optarg ;;
1440
1441  -nfp | --nfp | --nf)
1442    # Obsolete; use --without-fp.
1443    with_fp=no ;;
1444
1445  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1446  | --no-cr | --no-c | -n)
1447    no_create=yes ;;
1448
1449  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1450  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1451    no_recursion=yes ;;
1452
1453  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1454  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1455  | --oldin | --oldi | --old | --ol | --o)
1456    ac_prev=oldincludedir ;;
1457  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1458  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1459  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1460    oldincludedir=$ac_optarg ;;
1461
1462  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1463    ac_prev=prefix ;;
1464  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1465    prefix=$ac_optarg ;;
1466
1467  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1468  | --program-pre | --program-pr | --program-p)
1469    ac_prev=program_prefix ;;
1470  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1471  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1472    program_prefix=$ac_optarg ;;
1473
1474  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1475  | --program-suf | --program-su | --program-s)
1476    ac_prev=program_suffix ;;
1477  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1478  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1479    program_suffix=$ac_optarg ;;
1480
1481  -program-transform-name | --program-transform-name \
1482  | --program-transform-nam | --program-transform-na \
1483  | --program-transform-n | --program-transform- \
1484  | --program-transform | --program-transfor \
1485  | --program-transfo | --program-transf \
1486  | --program-trans | --program-tran \
1487  | --progr-tra | --program-tr | --program-t)
1488    ac_prev=program_transform_name ;;
1489  -program-transform-name=* | --program-transform-name=* \
1490  | --program-transform-nam=* | --program-transform-na=* \
1491  | --program-transform-n=* | --program-transform-=* \
1492  | --program-transform=* | --program-transfor=* \
1493  | --program-transfo=* | --program-transf=* \
1494  | --program-trans=* | --program-tran=* \
1495  | --progr-tra=* | --program-tr=* | --program-t=*)
1496    program_transform_name=$ac_optarg ;;
1497
1498  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1499    ac_prev=pdfdir ;;
1500  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1501    pdfdir=$ac_optarg ;;
1502
1503  -psdir | --psdir | --psdi | --psd | --ps)
1504    ac_prev=psdir ;;
1505  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1506    psdir=$ac_optarg ;;
1507
1508  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1509  | -silent | --silent | --silen | --sile | --sil)
1510    silent=yes ;;
1511
1512  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1513    ac_prev=sbindir ;;
1514  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1515  | --sbi=* | --sb=*)
1516    sbindir=$ac_optarg ;;
1517
1518  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1519  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1520  | --sharedst | --shareds | --shared | --share | --shar \
1521  | --sha | --sh)
1522    ac_prev=sharedstatedir ;;
1523  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1524  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1525  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1526  | --sha=* | --sh=*)
1527    sharedstatedir=$ac_optarg ;;
1528
1529  -site | --site | --sit)
1530    ac_prev=site ;;
1531  -site=* | --site=* | --sit=*)
1532    site=$ac_optarg ;;
1533
1534  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1535    ac_prev=srcdir ;;
1536  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1537    srcdir=$ac_optarg ;;
1538
1539  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1540  | --syscon | --sysco | --sysc | --sys | --sy)
1541    ac_prev=sysconfdir ;;
1542  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1543  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1544    sysconfdir=$ac_optarg ;;
1545
1546  -target | --target | --targe | --targ | --tar | --ta | --t)
1547    ac_prev=target_alias ;;
1548  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1549    target_alias=$ac_optarg ;;
1550
1551  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1552    verbose=yes ;;
1553
1554  -version | --version | --versio | --versi | --vers | -V)
1555    ac_init_version=: ;;
1556
1557  -with-* | --with-*)
1558    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1559    # Reject names that are not valid shell variable names.
1560    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1561      as_fn_error $? "invalid package name: $ac_useropt"
1562    ac_useropt_orig=$ac_useropt
1563    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1564    case $ac_user_opts in
1565      *"
1566"with_$ac_useropt"
1567"*) ;;
1568      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1569	 ac_unrecognized_sep=', ';;
1570    esac
1571    eval with_$ac_useropt=\$ac_optarg ;;
1572
1573  -without-* | --without-*)
1574    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1575    # Reject names that are not valid shell variable names.
1576    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1577      as_fn_error $? "invalid package name: $ac_useropt"
1578    ac_useropt_orig=$ac_useropt
1579    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1580    case $ac_user_opts in
1581      *"
1582"with_$ac_useropt"
1583"*) ;;
1584      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1585	 ac_unrecognized_sep=', ';;
1586    esac
1587    eval with_$ac_useropt=no ;;
1588
1589  --x)
1590    # Obsolete; use --with-x.
1591    with_x=yes ;;
1592
1593  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1594  | --x-incl | --x-inc | --x-in | --x-i)
1595    ac_prev=x_includes ;;
1596  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1597  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1598    x_includes=$ac_optarg ;;
1599
1600  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1601  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1602    ac_prev=x_libraries ;;
1603  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1604  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1605    x_libraries=$ac_optarg ;;
1606
1607  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1608Try \`$0 --help' for more information"
1609    ;;
1610
1611  *=*)
1612    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1613    # Reject names that are not valid shell variable names.
1614    case $ac_envvar in #(
1615      '' | [0-9]* | *[!_$as_cr_alnum]* )
1616      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1617    esac
1618    eval $ac_envvar=\$ac_optarg
1619    export $ac_envvar ;;
1620
1621  *)
1622    # FIXME: should be removed in autoconf 3.0.
1623    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1624    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1625      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1626    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1627    ;;
1628
1629  esac
1630done
1631
1632if test -n "$ac_prev"; then
1633  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1634  as_fn_error $? "missing argument to $ac_option"
1635fi
1636
1637if test -n "$ac_unrecognized_opts"; then
1638  case $enable_option_checking in
1639    no) ;;
1640    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1641    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1642  esac
1643fi
1644
1645# Check all directory arguments for consistency.
1646for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1647		datadir sysconfdir sharedstatedir localstatedir includedir \
1648		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1649		libdir localedir mandir
1650do
1651  eval ac_val=\$$ac_var
1652  # Remove trailing slashes.
1653  case $ac_val in
1654    */ )
1655      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1656      eval $ac_var=\$ac_val;;
1657  esac
1658  # Be sure to have absolute directory names.
1659  case $ac_val in
1660    [\\/$]* | ?:[\\/]* )  continue;;
1661    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1662  esac
1663  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1664done
1665
1666# There might be people who depend on the old broken behavior: `$host'
1667# used to hold the argument of --host etc.
1668# FIXME: To remove some day.
1669build=$build_alias
1670host=$host_alias
1671target=$target_alias
1672
1673# FIXME: To remove some day.
1674if test "x$host_alias" != x; then
1675  if test "x$build_alias" = x; then
1676    cross_compiling=maybe
1677  elif test "x$build_alias" != "x$host_alias"; then
1678    cross_compiling=yes
1679  fi
1680fi
1681
1682ac_tool_prefix=
1683test -n "$host_alias" && ac_tool_prefix=$host_alias-
1684
1685test "$silent" = yes && exec 6>/dev/null
1686
1687
1688ac_pwd=`pwd` && test -n "$ac_pwd" &&
1689ac_ls_di=`ls -di .` &&
1690ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1691  as_fn_error $? "working directory cannot be determined"
1692test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1693  as_fn_error $? "pwd does not report name of working directory"
1694
1695
1696# Find the source files, if location was not specified.
1697if test -z "$srcdir"; then
1698  ac_srcdir_defaulted=yes
1699  # Try the directory containing this script, then the parent directory.
1700  ac_confdir=`$as_dirname -- "$as_myself" ||
1701$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1702	 X"$as_myself" : 'X\(//\)[^/]' \| \
1703	 X"$as_myself" : 'X\(//\)$' \| \
1704	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1705$as_echo X"$as_myself" |
1706    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1707	    s//\1/
1708	    q
1709	  }
1710	  /^X\(\/\/\)[^/].*/{
1711	    s//\1/
1712	    q
1713	  }
1714	  /^X\(\/\/\)$/{
1715	    s//\1/
1716	    q
1717	  }
1718	  /^X\(\/\).*/{
1719	    s//\1/
1720	    q
1721	  }
1722	  s/.*/./; q'`
1723  srcdir=$ac_confdir
1724  if test ! -r "$srcdir/$ac_unique_file"; then
1725    srcdir=..
1726  fi
1727else
1728  ac_srcdir_defaulted=no
1729fi
1730if test ! -r "$srcdir/$ac_unique_file"; then
1731  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1732  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1733fi
1734ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1735ac_abs_confdir=`(
1736	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1737	pwd)`
1738# When building in place, set srcdir=.
1739if test "$ac_abs_confdir" = "$ac_pwd"; then
1740  srcdir=.
1741fi
1742# Remove unnecessary trailing slashes from srcdir.
1743# Double slashes in file names in object file debugging info
1744# mess up M-x gdb in Emacs.
1745case $srcdir in
1746*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1747esac
1748for ac_var in $ac_precious_vars; do
1749  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1750  eval ac_env_${ac_var}_value=\$${ac_var}
1751  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1752  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1753done
1754
1755#
1756# Report the --help message.
1757#
1758if test "$ac_init_help" = "long"; then
1759  # Omit some internal or obsolete options to make the list less imposing.
1760  # This message is too long to be a string in the A/UX 3.1 sh.
1761  cat <<_ACEOF
1762\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1763
1764Usage: $0 [OPTION]... [VAR=VALUE]...
1765
1766To assign environment variables (e.g., CC, CFLAGS...), specify them as
1767VAR=VALUE.  See below for descriptions of some of the useful variables.
1768
1769Defaults for the options are specified in brackets.
1770
1771Configuration:
1772  -h, --help              display this help and exit
1773      --help=short        display options specific to this package
1774      --help=recursive    display the short help of all the included packages
1775  -V, --version           display version information and exit
1776  -q, --quiet, --silent   do not print \`checking ...' messages
1777      --cache-file=FILE   cache test results in FILE [disabled]
1778  -C, --config-cache      alias for \`--cache-file=config.cache'
1779  -n, --no-create         do not create output files
1780      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1781
1782Installation directories:
1783  --prefix=PREFIX         install architecture-independent files in PREFIX
1784                          [$ac_default_prefix]
1785  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1786                          [PREFIX]
1787
1788By default, \`make install' will install all the files in
1789\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1790an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1791for instance \`--prefix=\$HOME'.
1792
1793For better control, use the options below.
1794
1795Fine tuning of the installation directories:
1796  --bindir=DIR            user executables [EPREFIX/bin]
1797  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1798  --libexecdir=DIR        program executables [EPREFIX/libexec]
1799  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1800  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1801  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1802  --libdir=DIR            object code libraries [EPREFIX/lib]
1803  --includedir=DIR        C header files [PREFIX/include]
1804  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1805  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1806  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1807  --infodir=DIR           info documentation [DATAROOTDIR/info]
1808  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1809  --mandir=DIR            man documentation [DATAROOTDIR/man]
1810  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1811  --htmldir=DIR           html documentation [DOCDIR]
1812  --dvidir=DIR            dvi documentation [DOCDIR]
1813  --pdfdir=DIR            pdf documentation [DOCDIR]
1814  --psdir=DIR             ps documentation [DOCDIR]
1815_ACEOF
1816
1817  cat <<\_ACEOF
1818
1819X features:
1820  --x-includes=DIR    X include files are in DIR
1821  --x-libraries=DIR   X library files are in DIR
1822
1823System types:
1824  --build=BUILD     configure for building on BUILD [guessed]
1825  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1826  --target=TARGET   configure for building compilers for TARGET [HOST]
1827_ACEOF
1828fi
1829
1830if test -n "$ac_init_help"; then
1831  case $ac_init_help in
1832     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1833   esac
1834  cat <<\_ACEOF
1835
1836Optional Features:
1837  --disable-option-checking  ignore unrecognized --enable/--with options
1838  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1839  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1840  --enable-openjdk-only   suppress building custom source even if present
1841                          [disabled]
1842  --enable-debug          set the debug level to fastdebug (shorthand for
1843                          --with-debug-level=fastdebug) [disabled]
1844  --disable-headful       disable building headful support (graphical UI
1845                          support) [enabled]
1846  --enable-hotspot-test-in-build
1847                          run the Queens test after Hotspot build [disabled]
1848  --enable-unlimited-crypto
1849                          Enable unlimited crypto policy [disabled]
1850  --enable-rmiconnector-iiop
1851                          enable the JMX RMIConnector iiop transport
1852                          [disabled]
1853  --disable-debug-symbols disable generation of debug symbols [enabled]
1854  --disable-zip-debug-info
1855                          disable zipping of debug-info files [enabled]
1856  --disable-freetype-bundling
1857                          disable bundling of the freetype library with the
1858                          build result [enabled on Windows or when using
1859                          --with-freetype, disabled otherwise]
1860  --enable-sjavac         use sjavac to do fast incremental compiles
1861                          [disabled]
1862  --disable-precompiled-headers
1863                          disable using precompiled headers when compiling C++
1864                          [enabled]
1865  --enable-ccache         enable using ccache to speed up recompilations
1866                          [disabled]
1867
1868Optional Packages:
1869  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1870  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1871  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1872                          support it), e.g. --with-target-bits=32 [guessed]
1873  --with-custom-make-dir  Deprecated. Option is kept for backwards
1874                          compatibility and is ignored
1875  --with-jdk-variant      JDK variant to build (normal) [normal]
1876  --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1877  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1878                          client, minimal1, kernel, zero, zeroshark, core)
1879                          [server]
1880  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
1881                          optimized (HotSpot build only)) [release]
1882  --with-devkit           use this devkit for compilers, tools and resources
1883  --with-sys-root         alias for --with-sysroot for backwards compatability
1884  --with-sysroot          use this directory as sysroot
1885  --with-tools-dir        alias for --with-toolchain-path for backwards
1886                          compatibility
1887  --with-toolchain-path   prepend these directories when searching for
1888                          toolchain binaries (compilers etc)
1889  --with-extra-path       prepend these directories to the default path
1890  --with-sdk-name         use the platform SDK of the given name. [macosx]
1891  --with-conf-name        use this as the name of the configuration [generated
1892                          from important configuration options]
1893  --with-output-sync      set make output sync type if supported by make.
1894                          [recurse]
1895  --with-builddeps-conf   use this configuration file for the builddeps
1896  --with-builddeps-server download and use build dependencies from this server
1897                          url
1898  --with-builddeps-dir    store downloaded build dependencies here
1899                          [/localhome/builddeps]
1900  --with-builddeps-group  chgrp the downloaded build dependencies to this
1901                          group
1902  --with-cacerts-file     specify alternative cacerts file
1903  --with-milestone        Set milestone value for build [internal]
1904  --with-update-version   Set update version value for build [b00]
1905  --with-user-release-suffix
1906                          Add a custom string to the version string if build
1907                          number is not set.[username_builddateb00]
1908  --with-build-number     Set build number value for build [b00]
1909  --with-copyright-year   Set copyright year value for build [current year]
1910  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1911  --with-add-source-root  for each and every source directory, look in this
1912                          additional source root for the same directory; if it
1913                          exists and have files in it, include it in the build
1914  --with-override-source-root
1915                          for each and every source directory, look in this
1916                          override source root for the same directory; if it
1917                          exists, use that directory instead and ignore the
1918                          directory in the original source root
1919  --with-adds-and-overrides
1920                          use the subdirs 'adds' and 'overrides' in the
1921                          specified directory as add-source-root and
1922                          override-source-root
1923  --with-override-langtools
1924                          use this langtools dir for the build
1925  --with-override-corba   use this corba dir for the build
1926  --with-override-jaxp    use this jaxp dir for the build
1927  --with-override-jaxws   use this jaxws dir for the build
1928  --with-override-hotspot use this hotspot dir for the build
1929  --with-override-nashorn use this nashorn dir for the build
1930  --with-override-jdk     use this jdk dir for the build
1931  --with-import-hotspot   import hotspot binaries from this jdk image or
1932                          hotspot build dist dir instead of building from
1933                          source
1934  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
1935                          to show possible values [platform dependent]
1936  --with-jtreg            Regression Test Harness [probed]
1937  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1938  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1939  --with-extra-ldflags    extra flags to be used when linking jdk
1940  --with-x                use the X Window System
1941  --with-cups             specify prefix directory for the cups package
1942                          (expecting the headers under PATH/include)
1943  --with-cups-include     specify directory for the cups include files
1944  --with-freetype         specify prefix directory for the freetype package
1945                          (expecting the libraries under PATH/lib and the
1946                          headers under PATH/include)
1947  --with-freetype-include specify directory for the freetype include files
1948  --with-freetype-lib     specify directory for the freetype library
1949  --with-freetype-src     specify directory with freetype sources to
1950                          automatically build the library (experimental,
1951                          Windows-only)
1952  --with-alsa             specify prefix directory for the alsa package
1953                          (expecting the libraries under PATH/lib and the
1954                          headers under PATH/include)
1955  --with-alsa-include     specify directory for the alsa include files
1956  --with-alsa-lib         specify directory for the alsa library
1957  --with-libjpeg          use libjpeg from build system or OpenJDK source
1958                          (system, bundled) [bundled]
1959  --with-giflib           use giflib from build system or OpenJDK source
1960                          (system, bundled) [bundled]
1961  --with-lcms             use lcms2 from build system or OpenJDK source
1962                          (system, bundled) [bundled]
1963  --with-libpng           use libpng from build system or OpenJDK source
1964                          (system, bundled) [bundled]
1965  --with-zlib             use zlib from build system or OpenJDK source
1966                          (system, bundled) [bundled]
1967  --with-stdc++lib=<static>,<dynamic>,<default>
1968                          force linking of the C++ runtime on Linux to either
1969                          static or dynamic, default is static with dynamic as
1970                          fallback
1971  --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1972                          only) [probed]
1973  --with-dxsdk            Deprecated. Option is kept for backwards
1974                          compatibility and is ignored
1975  --with-dxsdk-lib        Deprecated. Option is kept for backwards
1976                          compatibility and is ignored
1977  --with-dxsdk-include    Deprecated. Option is kept for backwards
1978                          compatibility and is ignored
1979  --with-num-cores        number of cores in the build system, e.g.
1980                          --with-num-cores=8 [probed]
1981  --with-memory-size      memory (in MB) available in the build system, e.g.
1982                          --with-memory-size=1024 [probed]
1983  --with-jobs             number of parallel jobs to let make run [calculated
1984                          based on cores and memory]
1985  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
1986                          invocations of boot JDK, overriding the default
1987                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1988                          -enableassertions"
1989  --with-sjavac-server-java
1990                          use this java binary for running the sjavac
1991                          background server [Boot JDK java]
1992  --with-ccache-dir       where to store ccache files [~/.ccache]
1993
1994Some influential environment variables:
1995  BASENAME    Override default value for BASENAME
1996  BASH        Override default value for BASH
1997  CAT         Override default value for CAT
1998  CHMOD       Override default value for CHMOD
1999  CMP         Override default value for CMP
2000  COMM        Override default value for COMM
2001  CP          Override default value for CP
2002  CUT         Override default value for CUT
2003  DATE        Override default value for DATE
2004  DIFF        Override default value for DIFF
2005  DIRNAME     Override default value for DIRNAME
2006  ECHO        Override default value for ECHO
2007  EXPR        Override default value for EXPR
2008  FILE        Override default value for FILE
2009  FIND        Override default value for FIND
2010  HEAD        Override default value for HEAD
2011  LN          Override default value for LN
2012  LS          Override default value for LS
2013  MKDIR       Override default value for MKDIR
2014  MKTEMP      Override default value for MKTEMP
2015  MV          Override default value for MV
2016  NAWK        Override default value for NAWK
2017  PRINTF      Override default value for PRINTF
2018  RM          Override default value for RM
2019  SH          Override default value for SH
2020  SORT        Override default value for SORT
2021  TAIL        Override default value for TAIL
2022  TAR         Override default value for TAR
2023  TEE         Override default value for TEE
2024  TOUCH       Override default value for TOUCH
2025  TR          Override default value for TR
2026  UNAME       Override default value for UNAME
2027  UNIQ        Override default value for UNIQ
2028  WC          Override default value for WC
2029  WHICH       Override default value for WHICH
2030  XARGS       Override default value for XARGS
2031  AWK         Override default value for AWK
2032  GREP        Override default value for GREP
2033  EGREP       Override default value for EGREP
2034  FGREP       Override default value for FGREP
2035  SED         Override default value for SED
2036  CYGPATH     Override default value for CYGPATH
2037  READLINK    Override default value for READLINK
2038  DF          Override default value for DF
2039  SETFILE     Override default value for SETFILE
2040  CPIO        Override default value for CPIO
2041  UNZIP       Override default value for UNZIP
2042  ZIP         Override default value for ZIP
2043  LDD         Override default value for LDD
2044  OTOOL       Override default value for OTOOL
2045  READELF     Override default value for READELF
2046  HG          Override default value for HG
2047  STAT        Override default value for STAT
2048  TIME        Override default value for TIME
2049  DSYMUTIL    Override default value for DSYMUTIL
2050  XATTR       Override default value for XATTR
2051  CODESIGN    Override default value for CODESIGN
2052  PKG_CONFIG  path to pkg-config utility
2053  JAVA        Override default value for JAVA
2054  JAVAC       Override default value for JAVAC
2055  JAVAH       Override default value for JAVAH
2056  JAR         Override default value for JAR
2057  NATIVE2ASCII
2058              Override default value for NATIVE2ASCII
2059  JARSIGNER   Override default value for JARSIGNER
2060  CC          C compiler command
2061  CFLAGS      C compiler flags
2062  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2063              nonstandard directory <lib dir>
2064  LIBS        libraries to pass to the linker, e.g. -l<library>
2065  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2066              you have headers in a nonstandard directory <include dir>
2067  CXX         C++ compiler command
2068  CXXFLAGS    C++ compiler flags
2069  CPP         C preprocessor
2070  CXXCPP      C++ preprocessor
2071  AS          Override default value for AS
2072  AR          Override default value for AR
2073  OBJC        Objective C compiler command
2074  OBJCFLAGS   Objective C compiler flags
2075  LIPO        Override default value for LIPO
2076  STRIP       Override default value for STRIP
2077  NM          Override default value for NM
2078  GNM         Override default value for GNM
2079  MCS         Override default value for MCS
2080  OBJCOPY     Override default value for OBJCOPY
2081  OBJDUMP     Override default value for OBJDUMP
2082  BUILD_CC    Override default value for BUILD_CC
2083  BUILD_CXX   Override default value for BUILD_CXX
2084  BUILD_LD    Override default value for BUILD_LD
2085  JTREGEXE    Override default value for JTREGEXE
2086  XMKMF       Path to xmkmf, Makefile generator for X Window System
2087  FREETYPE_CFLAGS
2088              C compiler flags for FREETYPE, overriding pkg-config
2089  FREETYPE_LIBS
2090              linker flags for FREETYPE, overriding pkg-config
2091  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2092  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2093  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2094  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2095  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2096  PNG_LIBS    linker flags for PNG, overriding pkg-config
2097  LIBFFI_CFLAGS
2098              C compiler flags for LIBFFI, overriding pkg-config
2099  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2100  CCACHE      Override default value for CCACHE
2101
2102Use these variables to override the choices made by `configure' or to help
2103it to find libraries and programs with nonstandard names/locations.
2104
2105Report bugs to <build-dev@openjdk.java.net>.
2106OpenJDK home page: <http://openjdk.java.net>.
2107_ACEOF
2108ac_status=$?
2109fi
2110
2111if test "$ac_init_help" = "recursive"; then
2112  # If there are subdirs, report their specific --help.
2113  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2114    test -d "$ac_dir" ||
2115      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2116      continue
2117    ac_builddir=.
2118
2119case "$ac_dir" in
2120.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2121*)
2122  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2123  # A ".." for each directory in $ac_dir_suffix.
2124  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2125  case $ac_top_builddir_sub in
2126  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2127  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2128  esac ;;
2129esac
2130ac_abs_top_builddir=$ac_pwd
2131ac_abs_builddir=$ac_pwd$ac_dir_suffix
2132# for backward compatibility:
2133ac_top_builddir=$ac_top_build_prefix
2134
2135case $srcdir in
2136  .)  # We are building in place.
2137    ac_srcdir=.
2138    ac_top_srcdir=$ac_top_builddir_sub
2139    ac_abs_top_srcdir=$ac_pwd ;;
2140  [\\/]* | ?:[\\/]* )  # Absolute name.
2141    ac_srcdir=$srcdir$ac_dir_suffix;
2142    ac_top_srcdir=$srcdir
2143    ac_abs_top_srcdir=$srcdir ;;
2144  *) # Relative name.
2145    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2146    ac_top_srcdir=$ac_top_build_prefix$srcdir
2147    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2148esac
2149ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2150
2151    cd "$ac_dir" || { ac_status=$?; continue; }
2152    # Check for guested configure.
2153    if test -f "$ac_srcdir/configure.gnu"; then
2154      echo &&
2155      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2156    elif test -f "$ac_srcdir/configure"; then
2157      echo &&
2158      $SHELL "$ac_srcdir/configure" --help=recursive
2159    else
2160      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2161    fi || ac_status=$?
2162    cd "$ac_pwd" || { ac_status=$?; break; }
2163  done
2164fi
2165
2166test -n "$ac_init_help" && exit $ac_status
2167if $ac_init_version; then
2168  cat <<\_ACEOF
2169OpenJDK configure jdk9
2170generated by GNU Autoconf 2.69
2171
2172Copyright (C) 2012 Free Software Foundation, Inc.
2173This configure script is free software; the Free Software Foundation
2174gives unlimited permission to copy, distribute and modify it.
2175_ACEOF
2176  exit
2177fi
2178
2179## ------------------------ ##
2180## Autoconf initialization. ##
2181## ------------------------ ##
2182
2183# ac_fn_c_try_compile LINENO
2184# --------------------------
2185# Try to compile conftest.$ac_ext, and return whether this succeeded.
2186ac_fn_c_try_compile ()
2187{
2188  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2189  rm -f conftest.$ac_objext
2190  if { { ac_try="$ac_compile"
2191case "(($ac_try" in
2192  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2193  *) ac_try_echo=$ac_try;;
2194esac
2195eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2196$as_echo "$ac_try_echo"; } >&5
2197  (eval "$ac_compile") 2>conftest.err
2198  ac_status=$?
2199  if test -s conftest.err; then
2200    grep -v '^ *+' conftest.err >conftest.er1
2201    cat conftest.er1 >&5
2202    mv -f conftest.er1 conftest.err
2203  fi
2204  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2205  test $ac_status = 0; } && {
2206	 test -z "$ac_c_werror_flag" ||
2207	 test ! -s conftest.err
2208       } && test -s conftest.$ac_objext; then :
2209  ac_retval=0
2210else
2211  $as_echo "$as_me: failed program was:" >&5
2212sed 's/^/| /' conftest.$ac_ext >&5
2213
2214	ac_retval=1
2215fi
2216  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2217  as_fn_set_status $ac_retval
2218
2219} # ac_fn_c_try_compile
2220
2221# ac_fn_cxx_try_compile LINENO
2222# ----------------------------
2223# Try to compile conftest.$ac_ext, and return whether this succeeded.
2224ac_fn_cxx_try_compile ()
2225{
2226  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2227  rm -f conftest.$ac_objext
2228  if { { ac_try="$ac_compile"
2229case "(($ac_try" in
2230  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2231  *) ac_try_echo=$ac_try;;
2232esac
2233eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2234$as_echo "$ac_try_echo"; } >&5
2235  (eval "$ac_compile") 2>conftest.err
2236  ac_status=$?
2237  if test -s conftest.err; then
2238    grep -v '^ *+' conftest.err >conftest.er1
2239    cat conftest.er1 >&5
2240    mv -f conftest.er1 conftest.err
2241  fi
2242  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2243  test $ac_status = 0; } && {
2244	 test -z "$ac_cxx_werror_flag" ||
2245	 test ! -s conftest.err
2246       } && test -s conftest.$ac_objext; then :
2247  ac_retval=0
2248else
2249  $as_echo "$as_me: failed program was:" >&5
2250sed 's/^/| /' conftest.$ac_ext >&5
2251
2252	ac_retval=1
2253fi
2254  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2255  as_fn_set_status $ac_retval
2256
2257} # ac_fn_cxx_try_compile
2258
2259# ac_fn_c_try_cpp LINENO
2260# ----------------------
2261# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2262ac_fn_c_try_cpp ()
2263{
2264  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2265  if { { ac_try="$ac_cpp conftest.$ac_ext"
2266case "(($ac_try" in
2267  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2268  *) ac_try_echo=$ac_try;;
2269esac
2270eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2271$as_echo "$ac_try_echo"; } >&5
2272  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2273  ac_status=$?
2274  if test -s conftest.err; then
2275    grep -v '^ *+' conftest.err >conftest.er1
2276    cat conftest.er1 >&5
2277    mv -f conftest.er1 conftest.err
2278  fi
2279  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2280  test $ac_status = 0; } > conftest.i && {
2281	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2282	 test ! -s conftest.err
2283       }; then :
2284  ac_retval=0
2285else
2286  $as_echo "$as_me: failed program was:" >&5
2287sed 's/^/| /' conftest.$ac_ext >&5
2288
2289    ac_retval=1
2290fi
2291  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2292  as_fn_set_status $ac_retval
2293
2294} # ac_fn_c_try_cpp
2295
2296# ac_fn_cxx_try_cpp LINENO
2297# ------------------------
2298# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2299ac_fn_cxx_try_cpp ()
2300{
2301  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2302  if { { ac_try="$ac_cpp conftest.$ac_ext"
2303case "(($ac_try" in
2304  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2305  *) ac_try_echo=$ac_try;;
2306esac
2307eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2308$as_echo "$ac_try_echo"; } >&5
2309  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2310  ac_status=$?
2311  if test -s conftest.err; then
2312    grep -v '^ *+' conftest.err >conftest.er1
2313    cat conftest.er1 >&5
2314    mv -f conftest.er1 conftest.err
2315  fi
2316  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2317  test $ac_status = 0; } > conftest.i && {
2318	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2319	 test ! -s conftest.err
2320       }; then :
2321  ac_retval=0
2322else
2323  $as_echo "$as_me: failed program was:" >&5
2324sed 's/^/| /' conftest.$ac_ext >&5
2325
2326    ac_retval=1
2327fi
2328  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2329  as_fn_set_status $ac_retval
2330
2331} # ac_fn_cxx_try_cpp
2332
2333# ac_fn_objc_try_compile LINENO
2334# -----------------------------
2335# Try to compile conftest.$ac_ext, and return whether this succeeded.
2336ac_fn_objc_try_compile ()
2337{
2338  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2339  rm -f conftest.$ac_objext
2340  if { { ac_try="$ac_compile"
2341case "(($ac_try" in
2342  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2343  *) ac_try_echo=$ac_try;;
2344esac
2345eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2346$as_echo "$ac_try_echo"; } >&5
2347  (eval "$ac_compile") 2>conftest.err
2348  ac_status=$?
2349  if test -s conftest.err; then
2350    grep -v '^ *+' conftest.err >conftest.er1
2351    cat conftest.er1 >&5
2352    mv -f conftest.er1 conftest.err
2353  fi
2354  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2355  test $ac_status = 0; } && {
2356	 test -z "$ac_objc_werror_flag" ||
2357	 test ! -s conftest.err
2358       } && test -s conftest.$ac_objext; then :
2359  ac_retval=0
2360else
2361  $as_echo "$as_me: failed program was:" >&5
2362sed 's/^/| /' conftest.$ac_ext >&5
2363
2364	ac_retval=1
2365fi
2366  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2367  as_fn_set_status $ac_retval
2368
2369} # ac_fn_objc_try_compile
2370
2371# ac_fn_c_try_link LINENO
2372# -----------------------
2373# Try to link conftest.$ac_ext, and return whether this succeeded.
2374ac_fn_c_try_link ()
2375{
2376  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2377  rm -f conftest.$ac_objext conftest$ac_exeext
2378  if { { ac_try="$ac_link"
2379case "(($ac_try" in
2380  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2381  *) ac_try_echo=$ac_try;;
2382esac
2383eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2384$as_echo "$ac_try_echo"; } >&5
2385  (eval "$ac_link") 2>conftest.err
2386  ac_status=$?
2387  if test -s conftest.err; then
2388    grep -v '^ *+' conftest.err >conftest.er1
2389    cat conftest.er1 >&5
2390    mv -f conftest.er1 conftest.err
2391  fi
2392  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2393  test $ac_status = 0; } && {
2394	 test -z "$ac_c_werror_flag" ||
2395	 test ! -s conftest.err
2396       } && test -s conftest$ac_exeext && {
2397	 test "$cross_compiling" = yes ||
2398	 test -x conftest$ac_exeext
2399       }; then :
2400  ac_retval=0
2401else
2402  $as_echo "$as_me: failed program was:" >&5
2403sed 's/^/| /' conftest.$ac_ext >&5
2404
2405	ac_retval=1
2406fi
2407  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2408  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2409  # interfere with the next link command; also delete a directory that is
2410  # left behind by Apple's compiler.  We do this before executing the actions.
2411  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2412  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2413  as_fn_set_status $ac_retval
2414
2415} # ac_fn_c_try_link
2416
2417# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2418# ---------------------------------------------------------
2419# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2420# the include files in INCLUDES and setting the cache variable VAR
2421# accordingly.
2422ac_fn_cxx_check_header_mongrel ()
2423{
2424  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2425  if eval \${$3+:} false; then :
2426  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2427$as_echo_n "checking for $2... " >&6; }
2428if eval \${$3+:} false; then :
2429  $as_echo_n "(cached) " >&6
2430fi
2431eval ac_res=\$$3
2432	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2433$as_echo "$ac_res" >&6; }
2434else
2435  # Is the header compilable?
2436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2437$as_echo_n "checking $2 usability... " >&6; }
2438cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2439/* end confdefs.h.  */
2440$4
2441#include <$2>
2442_ACEOF
2443if ac_fn_cxx_try_compile "$LINENO"; then :
2444  ac_header_compiler=yes
2445else
2446  ac_header_compiler=no
2447fi
2448rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2450$as_echo "$ac_header_compiler" >&6; }
2451
2452# Is the header present?
2453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2454$as_echo_n "checking $2 presence... " >&6; }
2455cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2456/* end confdefs.h.  */
2457#include <$2>
2458_ACEOF
2459if ac_fn_cxx_try_cpp "$LINENO"; then :
2460  ac_header_preproc=yes
2461else
2462  ac_header_preproc=no
2463fi
2464rm -f conftest.err conftest.i conftest.$ac_ext
2465{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2466$as_echo "$ac_header_preproc" >&6; }
2467
2468# So?  What about this header?
2469case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2470  yes:no: )
2471    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2472$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2473    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2474$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2475    ;;
2476  no:yes:* )
2477    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2478$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2479    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2480$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2481    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2482$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2483    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2484$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2485    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2486$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2487( $as_echo "## ----------------------------------------- ##
2488## Report this to build-dev@openjdk.java.net ##
2489## ----------------------------------------- ##"
2490     ) | sed "s/^/$as_me: WARNING:     /" >&2
2491    ;;
2492esac
2493  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2494$as_echo_n "checking for $2... " >&6; }
2495if eval \${$3+:} false; then :
2496  $as_echo_n "(cached) " >&6
2497else
2498  eval "$3=\$ac_header_compiler"
2499fi
2500eval ac_res=\$$3
2501	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2502$as_echo "$ac_res" >&6; }
2503fi
2504  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2505
2506} # ac_fn_cxx_check_header_mongrel
2507
2508# ac_fn_cxx_try_run LINENO
2509# ------------------------
2510# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2511# that executables *can* be run.
2512ac_fn_cxx_try_run ()
2513{
2514  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2515  if { { ac_try="$ac_link"
2516case "(($ac_try" in
2517  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2518  *) ac_try_echo=$ac_try;;
2519esac
2520eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2521$as_echo "$ac_try_echo"; } >&5
2522  (eval "$ac_link") 2>&5
2523  ac_status=$?
2524  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2525  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2526  { { case "(($ac_try" in
2527  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2528  *) ac_try_echo=$ac_try;;
2529esac
2530eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2531$as_echo "$ac_try_echo"; } >&5
2532  (eval "$ac_try") 2>&5
2533  ac_status=$?
2534  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2535  test $ac_status = 0; }; }; then :
2536  ac_retval=0
2537else
2538  $as_echo "$as_me: program exited with status $ac_status" >&5
2539       $as_echo "$as_me: failed program was:" >&5
2540sed 's/^/| /' conftest.$ac_ext >&5
2541
2542       ac_retval=$ac_status
2543fi
2544  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2545  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2546  as_fn_set_status $ac_retval
2547
2548} # ac_fn_cxx_try_run
2549
2550# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2551# ---------------------------------------------------------
2552# Tests whether HEADER exists and can be compiled using the include files in
2553# INCLUDES, setting the cache variable VAR accordingly.
2554ac_fn_cxx_check_header_compile ()
2555{
2556  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2557  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2558$as_echo_n "checking for $2... " >&6; }
2559if eval \${$3+:} false; then :
2560  $as_echo_n "(cached) " >&6
2561else
2562  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2563/* end confdefs.h.  */
2564$4
2565#include <$2>
2566_ACEOF
2567if ac_fn_cxx_try_compile "$LINENO"; then :
2568  eval "$3=yes"
2569else
2570  eval "$3=no"
2571fi
2572rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2573fi
2574eval ac_res=\$$3
2575	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2576$as_echo "$ac_res" >&6; }
2577  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2578
2579} # ac_fn_cxx_check_header_compile
2580
2581# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2582# ----------------------------------------------
2583# Tries to find the compile-time value of EXPR in a program that includes
2584# INCLUDES, setting VAR accordingly. Returns whether the value could be
2585# computed
2586ac_fn_cxx_compute_int ()
2587{
2588  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2589  if test "$cross_compiling" = yes; then
2590    # Depending upon the size, compute the lo and hi bounds.
2591cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2592/* end confdefs.h.  */
2593$4
2594int
2595main ()
2596{
2597static int test_array [1 - 2 * !(($2) >= 0)];
2598test_array [0] = 0;
2599return test_array [0];
2600
2601  ;
2602  return 0;
2603}
2604_ACEOF
2605if ac_fn_cxx_try_compile "$LINENO"; then :
2606  ac_lo=0 ac_mid=0
2607  while :; do
2608    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2609/* end confdefs.h.  */
2610$4
2611int
2612main ()
2613{
2614static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2615test_array [0] = 0;
2616return test_array [0];
2617
2618  ;
2619  return 0;
2620}
2621_ACEOF
2622if ac_fn_cxx_try_compile "$LINENO"; then :
2623  ac_hi=$ac_mid; break
2624else
2625  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2626			if test $ac_lo -le $ac_mid; then
2627			  ac_lo= ac_hi=
2628			  break
2629			fi
2630			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2631fi
2632rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2633  done
2634else
2635  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2636/* end confdefs.h.  */
2637$4
2638int
2639main ()
2640{
2641static int test_array [1 - 2 * !(($2) < 0)];
2642test_array [0] = 0;
2643return test_array [0];
2644
2645  ;
2646  return 0;
2647}
2648_ACEOF
2649if ac_fn_cxx_try_compile "$LINENO"; then :
2650  ac_hi=-1 ac_mid=-1
2651  while :; do
2652    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2653/* end confdefs.h.  */
2654$4
2655int
2656main ()
2657{
2658static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2659test_array [0] = 0;
2660return test_array [0];
2661
2662  ;
2663  return 0;
2664}
2665_ACEOF
2666if ac_fn_cxx_try_compile "$LINENO"; then :
2667  ac_lo=$ac_mid; break
2668else
2669  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2670			if test $ac_mid -le $ac_hi; then
2671			  ac_lo= ac_hi=
2672			  break
2673			fi
2674			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2675fi
2676rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2677  done
2678else
2679  ac_lo= ac_hi=
2680fi
2681rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2682fi
2683rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2684# Binary search between lo and hi bounds.
2685while test "x$ac_lo" != "x$ac_hi"; do
2686  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2687  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2688/* end confdefs.h.  */
2689$4
2690int
2691main ()
2692{
2693static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2694test_array [0] = 0;
2695return test_array [0];
2696
2697  ;
2698  return 0;
2699}
2700_ACEOF
2701if ac_fn_cxx_try_compile "$LINENO"; then :
2702  ac_hi=$ac_mid
2703else
2704  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2705fi
2706rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2707done
2708case $ac_lo in #((
2709?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2710'') ac_retval=1 ;;
2711esac
2712  else
2713    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2714/* end confdefs.h.  */
2715$4
2716static long int longval () { return $2; }
2717static unsigned long int ulongval () { return $2; }
2718#include <stdio.h>
2719#include <stdlib.h>
2720int
2721main ()
2722{
2723
2724  FILE *f = fopen ("conftest.val", "w");
2725  if (! f)
2726    return 1;
2727  if (($2) < 0)
2728    {
2729      long int i = longval ();
2730      if (i != ($2))
2731	return 1;
2732      fprintf (f, "%ld", i);
2733    }
2734  else
2735    {
2736      unsigned long int i = ulongval ();
2737      if (i != ($2))
2738	return 1;
2739      fprintf (f, "%lu", i);
2740    }
2741  /* Do not output a trailing newline, as this causes \r\n confusion
2742     on some platforms.  */
2743  return ferror (f) || fclose (f) != 0;
2744
2745  ;
2746  return 0;
2747}
2748_ACEOF
2749if ac_fn_cxx_try_run "$LINENO"; then :
2750  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2751else
2752  ac_retval=1
2753fi
2754rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2755  conftest.$ac_objext conftest.beam conftest.$ac_ext
2756rm -f conftest.val
2757
2758  fi
2759  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2760  as_fn_set_status $ac_retval
2761
2762} # ac_fn_cxx_compute_int
2763
2764# ac_fn_cxx_try_link LINENO
2765# -------------------------
2766# Try to link conftest.$ac_ext, and return whether this succeeded.
2767ac_fn_cxx_try_link ()
2768{
2769  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2770  rm -f conftest.$ac_objext conftest$ac_exeext
2771  if { { ac_try="$ac_link"
2772case "(($ac_try" in
2773  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2774  *) ac_try_echo=$ac_try;;
2775esac
2776eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2777$as_echo "$ac_try_echo"; } >&5
2778  (eval "$ac_link") 2>conftest.err
2779  ac_status=$?
2780  if test -s conftest.err; then
2781    grep -v '^ *+' conftest.err >conftest.er1
2782    cat conftest.er1 >&5
2783    mv -f conftest.er1 conftest.err
2784  fi
2785  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2786  test $ac_status = 0; } && {
2787	 test -z "$ac_cxx_werror_flag" ||
2788	 test ! -s conftest.err
2789       } && test -s conftest$ac_exeext && {
2790	 test "$cross_compiling" = yes ||
2791	 test -x conftest$ac_exeext
2792       }; then :
2793  ac_retval=0
2794else
2795  $as_echo "$as_me: failed program was:" >&5
2796sed 's/^/| /' conftest.$ac_ext >&5
2797
2798	ac_retval=1
2799fi
2800  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2801  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2802  # interfere with the next link command; also delete a directory that is
2803  # left behind by Apple's compiler.  We do this before executing the actions.
2804  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2805  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2806  as_fn_set_status $ac_retval
2807
2808} # ac_fn_cxx_try_link
2809
2810# ac_fn_cxx_check_func LINENO FUNC VAR
2811# ------------------------------------
2812# Tests whether FUNC exists, setting the cache variable VAR accordingly
2813ac_fn_cxx_check_func ()
2814{
2815  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2816  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2817$as_echo_n "checking for $2... " >&6; }
2818if eval \${$3+:} false; then :
2819  $as_echo_n "(cached) " >&6
2820else
2821  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2822/* end confdefs.h.  */
2823/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2824   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2825#define $2 innocuous_$2
2826
2827/* System header to define __stub macros and hopefully few prototypes,
2828    which can conflict with char $2 (); below.
2829    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2830    <limits.h> exists even on freestanding compilers.  */
2831
2832#ifdef __STDC__
2833# include <limits.h>
2834#else
2835# include <assert.h>
2836#endif
2837
2838#undef $2
2839
2840/* Override any GCC internal prototype to avoid an error.
2841   Use char because int might match the return type of a GCC
2842   builtin and then its argument prototype would still apply.  */
2843#ifdef __cplusplus
2844extern "C"
2845#endif
2846char $2 ();
2847/* The GNU C library defines this for functions which it implements
2848    to always fail with ENOSYS.  Some functions are actually named
2849    something starting with __ and the normal name is an alias.  */
2850#if defined __stub_$2 || defined __stub___$2
2851choke me
2852#endif
2853
2854int
2855main ()
2856{
2857return $2 ();
2858  ;
2859  return 0;
2860}
2861_ACEOF
2862if ac_fn_cxx_try_link "$LINENO"; then :
2863  eval "$3=yes"
2864else
2865  eval "$3=no"
2866fi
2867rm -f core conftest.err conftest.$ac_objext \
2868    conftest$ac_exeext conftest.$ac_ext
2869fi
2870eval ac_res=\$$3
2871	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2872$as_echo "$ac_res" >&6; }
2873  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2874
2875} # ac_fn_cxx_check_func
2876
2877# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2878# -------------------------------------------------------
2879# Tests whether HEADER exists and can be compiled using the include files in
2880# INCLUDES, setting the cache variable VAR accordingly.
2881ac_fn_c_check_header_compile ()
2882{
2883  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2884  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2885$as_echo_n "checking for $2... " >&6; }
2886if eval \${$3+:} false; then :
2887  $as_echo_n "(cached) " >&6
2888else
2889  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2890/* end confdefs.h.  */
2891$4
2892#include <$2>
2893_ACEOF
2894if ac_fn_c_try_compile "$LINENO"; then :
2895  eval "$3=yes"
2896else
2897  eval "$3=no"
2898fi
2899rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2900fi
2901eval ac_res=\$$3
2902	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2903$as_echo "$ac_res" >&6; }
2904  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2905
2906} # ac_fn_c_check_header_compile
2907cat >config.log <<_ACEOF
2908This file contains any messages produced by compilers while
2909running configure, to aid debugging if configure makes a mistake.
2910
2911It was created by OpenJDK $as_me jdk9, which was
2912generated by GNU Autoconf 2.69.  Invocation command line was
2913
2914  $ $0 $@
2915
2916_ACEOF
2917exec 5>>config.log
2918{
2919cat <<_ASUNAME
2920## --------- ##
2921## Platform. ##
2922## --------- ##
2923
2924hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2925uname -m = `(uname -m) 2>/dev/null || echo unknown`
2926uname -r = `(uname -r) 2>/dev/null || echo unknown`
2927uname -s = `(uname -s) 2>/dev/null || echo unknown`
2928uname -v = `(uname -v) 2>/dev/null || echo unknown`
2929
2930/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2931/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2932
2933/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2934/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2935/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2936/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2937/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2938/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2939/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2940
2941_ASUNAME
2942
2943as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2944for as_dir in $PATH
2945do
2946  IFS=$as_save_IFS
2947  test -z "$as_dir" && as_dir=.
2948    $as_echo "PATH: $as_dir"
2949  done
2950IFS=$as_save_IFS
2951
2952} >&5
2953
2954cat >&5 <<_ACEOF
2955
2956
2957## ----------- ##
2958## Core tests. ##
2959## ----------- ##
2960
2961_ACEOF
2962
2963
2964# Keep a trace of the command line.
2965# Strip out --no-create and --no-recursion so they do not pile up.
2966# Strip out --silent because we don't want to record it for future runs.
2967# Also quote any args containing shell meta-characters.
2968# Make two passes to allow for proper duplicate-argument suppression.
2969ac_configure_args=
2970ac_configure_args0=
2971ac_configure_args1=
2972ac_must_keep_next=false
2973for ac_pass in 1 2
2974do
2975  for ac_arg
2976  do
2977    case $ac_arg in
2978    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2979    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2980    | -silent | --silent | --silen | --sile | --sil)
2981      continue ;;
2982    *\'*)
2983      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2984    esac
2985    case $ac_pass in
2986    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2987    2)
2988      as_fn_append ac_configure_args1 " '$ac_arg'"
2989      if test $ac_must_keep_next = true; then
2990	ac_must_keep_next=false # Got value, back to normal.
2991      else
2992	case $ac_arg in
2993	  *=* | --config-cache | -C | -disable-* | --disable-* \
2994	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2995	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2996	  | -with-* | --with-* | -without-* | --without-* | --x)
2997	    case "$ac_configure_args0 " in
2998	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2999	    esac
3000	    ;;
3001	  -* ) ac_must_keep_next=true ;;
3002	esac
3003      fi
3004      as_fn_append ac_configure_args " '$ac_arg'"
3005      ;;
3006    esac
3007  done
3008done
3009{ ac_configure_args0=; unset ac_configure_args0;}
3010{ ac_configure_args1=; unset ac_configure_args1;}
3011
3012# When interrupted or exit'd, cleanup temporary files, and complete
3013# config.log.  We remove comments because anyway the quotes in there
3014# would cause problems or look ugly.
3015# WARNING: Use '\'' to represent an apostrophe within the trap.
3016# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3017trap 'exit_status=$?
3018  # Save into config.log some information that might help in debugging.
3019  {
3020    echo
3021
3022    $as_echo "## ---------------- ##
3023## Cache variables. ##
3024## ---------------- ##"
3025    echo
3026    # The following way of writing the cache mishandles newlines in values,
3027(
3028  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3029    eval ac_val=\$$ac_var
3030    case $ac_val in #(
3031    *${as_nl}*)
3032      case $ac_var in #(
3033      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3034$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3035      esac
3036      case $ac_var in #(
3037      _ | IFS | as_nl) ;; #(
3038      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3039      *) { eval $ac_var=; unset $ac_var;} ;;
3040      esac ;;
3041    esac
3042  done
3043  (set) 2>&1 |
3044    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3045    *${as_nl}ac_space=\ *)
3046      sed -n \
3047	"s/'\''/'\''\\\\'\'''\''/g;
3048	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3049      ;; #(
3050    *)
3051      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3052      ;;
3053    esac |
3054    sort
3055)
3056    echo
3057
3058    $as_echo "## ----------------- ##
3059## Output variables. ##
3060## ----------------- ##"
3061    echo
3062    for ac_var in $ac_subst_vars
3063    do
3064      eval ac_val=\$$ac_var
3065      case $ac_val in
3066      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3067      esac
3068      $as_echo "$ac_var='\''$ac_val'\''"
3069    done | sort
3070    echo
3071
3072    if test -n "$ac_subst_files"; then
3073      $as_echo "## ------------------- ##
3074## File substitutions. ##
3075## ------------------- ##"
3076      echo
3077      for ac_var in $ac_subst_files
3078      do
3079	eval ac_val=\$$ac_var
3080	case $ac_val in
3081	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3082	esac
3083	$as_echo "$ac_var='\''$ac_val'\''"
3084      done | sort
3085      echo
3086    fi
3087
3088    if test -s confdefs.h; then
3089      $as_echo "## ----------- ##
3090## confdefs.h. ##
3091## ----------- ##"
3092      echo
3093      cat confdefs.h
3094      echo
3095    fi
3096    test "$ac_signal" != 0 &&
3097      $as_echo "$as_me: caught signal $ac_signal"
3098    $as_echo "$as_me: exit $exit_status"
3099  } >&5
3100  rm -f core *.core core.conftest.* &&
3101    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3102    exit $exit_status
3103' 0
3104for ac_signal in 1 2 13 15; do
3105  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3106done
3107ac_signal=0
3108
3109# confdefs.h avoids OS command line length limits that DEFS can exceed.
3110rm -f -r conftest* confdefs.h
3111
3112$as_echo "/* confdefs.h */" > confdefs.h
3113
3114# Predefined preprocessor variables.
3115
3116cat >>confdefs.h <<_ACEOF
3117#define PACKAGE_NAME "$PACKAGE_NAME"
3118_ACEOF
3119
3120cat >>confdefs.h <<_ACEOF
3121#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3122_ACEOF
3123
3124cat >>confdefs.h <<_ACEOF
3125#define PACKAGE_VERSION "$PACKAGE_VERSION"
3126_ACEOF
3127
3128cat >>confdefs.h <<_ACEOF
3129#define PACKAGE_STRING "$PACKAGE_STRING"
3130_ACEOF
3131
3132cat >>confdefs.h <<_ACEOF
3133#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3134_ACEOF
3135
3136cat >>confdefs.h <<_ACEOF
3137#define PACKAGE_URL "$PACKAGE_URL"
3138_ACEOF
3139
3140
3141# Let the site file select an alternate cache file if it wants to.
3142# Prefer an explicitly selected file to automatically selected ones.
3143ac_site_file1=NONE
3144ac_site_file2=NONE
3145if test -n "$CONFIG_SITE"; then
3146  # We do not want a PATH search for config.site.
3147  case $CONFIG_SITE in #((
3148    -*)  ac_site_file1=./$CONFIG_SITE;;
3149    */*) ac_site_file1=$CONFIG_SITE;;
3150    *)   ac_site_file1=./$CONFIG_SITE;;
3151  esac
3152elif test "x$prefix" != xNONE; then
3153  ac_site_file1=$prefix/share/config.site
3154  ac_site_file2=$prefix/etc/config.site
3155else
3156  ac_site_file1=$ac_default_prefix/share/config.site
3157  ac_site_file2=$ac_default_prefix/etc/config.site
3158fi
3159for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3160do
3161  test "x$ac_site_file" = xNONE && continue
3162  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3163    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3164$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3165    sed 's/^/| /' "$ac_site_file" >&5
3166    . "$ac_site_file" \
3167      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3168$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3169as_fn_error $? "failed to load site script $ac_site_file
3170See \`config.log' for more details" "$LINENO" 5; }
3171  fi
3172done
3173
3174if test -r "$cache_file"; then
3175  # Some versions of bash will fail to source /dev/null (special files
3176  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3177  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3178    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3179$as_echo "$as_me: loading cache $cache_file" >&6;}
3180    case $cache_file in
3181      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3182      *)                      . "./$cache_file";;
3183    esac
3184  fi
3185else
3186  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3187$as_echo "$as_me: creating cache $cache_file" >&6;}
3188  >$cache_file
3189fi
3190
3191# Check that the precious variables saved in the cache have kept the same
3192# value.
3193ac_cache_corrupted=false
3194for ac_var in $ac_precious_vars; do
3195  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3196  eval ac_new_set=\$ac_env_${ac_var}_set
3197  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3198  eval ac_new_val=\$ac_env_${ac_var}_value
3199  case $ac_old_set,$ac_new_set in
3200    set,)
3201      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3202$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3203      ac_cache_corrupted=: ;;
3204    ,set)
3205      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3206$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3207      ac_cache_corrupted=: ;;
3208    ,);;
3209    *)
3210      if test "x$ac_old_val" != "x$ac_new_val"; then
3211	# differences in whitespace do not lead to failure.
3212	ac_old_val_w=`echo x $ac_old_val`
3213	ac_new_val_w=`echo x $ac_new_val`
3214	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3215	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3216$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3217	  ac_cache_corrupted=:
3218	else
3219	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3220$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3221	  eval $ac_var=\$ac_old_val
3222	fi
3223	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3224$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3225	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3226$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3227      fi;;
3228  esac
3229  # Pass precious variables to config.status.
3230  if test "$ac_new_set" = set; then
3231    case $ac_new_val in
3232    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3233    *) ac_arg=$ac_var=$ac_new_val ;;
3234    esac
3235    case " $ac_configure_args " in
3236      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3237      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3238    esac
3239  fi
3240done
3241if $ac_cache_corrupted; then
3242  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3243$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3244  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3245$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3246  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3247fi
3248## -------------------- ##
3249## Main body of script. ##
3250## -------------------- ##
3251
3252ac_ext=c
3253ac_cpp='$CPP $CPPFLAGS'
3254ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3255ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3256ac_compiler_gnu=$ac_cv_c_compiler_gnu
3257
3258
3259
3260ac_aux_dir=
3261for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3262  if test -f "$ac_dir/install-sh"; then
3263    ac_aux_dir=$ac_dir
3264    ac_install_sh="$ac_aux_dir/install-sh -c"
3265    break
3266  elif test -f "$ac_dir/install.sh"; then
3267    ac_aux_dir=$ac_dir
3268    ac_install_sh="$ac_aux_dir/install.sh -c"
3269    break
3270  elif test -f "$ac_dir/shtool"; then
3271    ac_aux_dir=$ac_dir
3272    ac_install_sh="$ac_aux_dir/shtool install -c"
3273    break
3274  fi
3275done
3276if test -z "$ac_aux_dir"; then
3277  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
3278fi
3279
3280# These three variables are undocumented and unsupported,
3281# and are intended to be withdrawn in a future Autoconf release.
3282# They can cause serious problems if a builder's source tree is in a directory
3283# whose full name contains unusual characters.
3284ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3285ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3286ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3287
3288
3289# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3290
3291#
3292# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3293# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3294#
3295# This code is free software; you can redistribute it and/or modify it
3296# under the terms of the GNU General Public License version 2 only, as
3297# published by the Free Software Foundation.  Oracle designates this
3298# particular file as subject to the "Classpath" exception as provided
3299# by Oracle in the LICENSE file that accompanied this code.
3300#
3301# This code is distributed in the hope that it will be useful, but WITHOUT
3302# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3303# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3304# version 2 for more details (a copy is included in the LICENSE file that
3305# accompanied this code).
3306#
3307# You should have received a copy of the GNU General Public License version
3308# 2 along with this work; if not, write to the Free Software Foundation,
3309# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3310#
3311# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3312# or visit www.oracle.com if you need additional information or have any
3313# questions.
3314#
3315
3316#
3317# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3318#
3319# This program is free software; you can redistribute it and/or modify
3320# it under the terms of the GNU General Public License as published by
3321# the Free Software Foundation; either version 2 of the License, or
3322# (at your option) any later version.
3323#
3324# This program is distributed in the hope that it will be useful, but
3325# WITHOUT ANY WARRANTY; without even the implied warranty of
3326# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3327# General Public License for more details.
3328#
3329# You should have received a copy of the GNU General Public License
3330# along with this program; if not, write to the Free Software
3331# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3332#
3333# As a special exception to the GNU General Public License, if you
3334# distribute this file as part of a program that contains a
3335# configuration script generated by Autoconf, you may include it under
3336# the same distribution terms that you use for the rest of that program.
3337
3338# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3339# ----------------------------------
3340# PKG_PROG_PKG_CONFIG
3341
3342# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3343#
3344# Check to see whether a particular set of modules exists.  Similar
3345# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3346#
3347#
3348# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3349# this or PKG_CHECK_MODULES is called, or make sure to call
3350# PKG_CHECK_EXISTS manually
3351# --------------------------------------------------------------
3352
3353
3354
3355# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3356# ---------------------------------------------
3357# _PKG_CONFIG
3358
3359# _PKG_SHORT_ERRORS_SUPPORTED
3360# -----------------------------
3361# _PKG_SHORT_ERRORS_SUPPORTED
3362
3363
3364# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3365# [ACTION-IF-NOT-FOUND])
3366#
3367#
3368# Note that if there is a possibility the first call to
3369# PKG_CHECK_MODULES might not happen, you should be sure to include an
3370# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3371#
3372#
3373# --------------------------------------------------------------
3374# PKG_CHECK_MODULES
3375
3376
3377# Include these first...
3378#
3379# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3380# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3381#
3382# This code is free software; you can redistribute it and/or modify it
3383# under the terms of the GNU General Public License version 2 only, as
3384# published by the Free Software Foundation.  Oracle designates this
3385# particular file as subject to the "Classpath" exception as provided
3386# by Oracle in the LICENSE file that accompanied this code.
3387#
3388# This code is distributed in the hope that it will be useful, but WITHOUT
3389# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3390# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3391# version 2 for more details (a copy is included in the LICENSE file that
3392# accompanied this code).
3393#
3394# You should have received a copy of the GNU General Public License version
3395# 2 along with this work; if not, write to the Free Software Foundation,
3396# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3397#
3398# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3399# or visit www.oracle.com if you need additional information or have any
3400# questions.
3401#
3402
3403# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3404# If so, then append $1 to $2 \
3405# Also set JVM_ARG_OK to true/false depending on outcome.
3406
3407
3408# Appends a string to a path variable, only adding the : when needed.
3409
3410
3411# Prepends a string to a path variable, only adding the : when needed.
3412
3413
3414# This will make sure the given variable points to a full and proper
3415# path. This means:
3416# 1) There will be no spaces in the path. On unix platforms,
3417#    spaces in the path will result in an error. On Windows,
3418#    the path will be rewritten using short-style to be space-free.
3419# 2) The path will be absolute, and it will be in unix-style (on
3420#     cygwin).
3421# $1: The name of the variable to fix
3422
3423
3424# This will make sure the given variable points to a executable
3425# with a full and proper path. This means:
3426# 1) There will be no spaces in the path. On unix platforms,
3427#    spaces in the path will result in an error. On Windows,
3428#    the path will be rewritten using short-style to be space-free.
3429# 2) The path will be absolute, and it will be in unix-style (on
3430#     cygwin).
3431# Any arguments given to the executable is preserved.
3432# If the input variable does not have a directory specification, then
3433# it need to be in the PATH.
3434# $1: The name of the variable to fix
3435
3436
3437
3438
3439# Register a --with argument but mark it as deprecated
3440# $1: The name of the with argument to deprecate, not including --with-
3441
3442
3443# Register a --enable argument but mark it as deprecated
3444# $1: The name of the with argument to deprecate, not including --enable-
3445# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3446
3447
3448
3449
3450# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3451# $1: variable to check
3452
3453
3454# Check that there are no unprocessed overridden variables left.
3455# If so, they are an incorrect argument and we will exit with an error.
3456
3457
3458# Setup a tool for the given variable. If correctly specified by the user,
3459# use that value, otherwise search for the tool using the supplied code snippet.
3460# $1: variable to set
3461# $2: code snippet to call to look for the tool
3462
3463
3464# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3465# $1: variable to set
3466# $2: executable name (or list of names) to look for
3467
3468
3469# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3470# $1: variable to set
3471# $2: executable name (or list of names) to look for
3472
3473
3474# Like BASIC_PATH_PROGS but fails if no tool was found.
3475# $1: variable to set
3476# $2: executable name (or list of names) to look for
3477
3478
3479# Like BASIC_SETUP_TOOL but fails if no tool was found.
3480# $1: variable to set
3481# $2: autoconf macro to call to look for the special tool
3482
3483
3484# Setup the most fundamental tools that relies on not much else to set up,
3485# but is used by much of the early bootstrap code.
3486
3487
3488# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498#%%% Simple tools %%%
3499
3500# Check if we have found a usable version of make
3501# $1: the path to a potential make binary (or empty)
3502# $2: the description on how we found this
3503
3504
3505
3506
3507# Goes looking for a usable version of GNU make.
3508
3509
3510
3511
3512
3513
3514# Check if build directory is on local disk. If not possible to determine,
3515# we prefer to claim it's local.
3516# Argument 1: directory to test
3517# Argument 2: what to do if it is on local disk
3518# Argument 3: what to do otherwise (remote disk or failure)
3519
3520
3521# Check that source files have basic read permissions set. This might
3522# not be the case in cygwin in certain conditions.
3523
3524
3525
3526
3527#
3528# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3529# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3530#
3531# This code is free software; you can redistribute it and/or modify it
3532# under the terms of the GNU General Public License version 2 only, as
3533# published by the Free Software Foundation.  Oracle designates this
3534# particular file as subject to the "Classpath" exception as provided
3535# by Oracle in the LICENSE file that accompanied this code.
3536#
3537# This code is distributed in the hope that it will be useful, but WITHOUT
3538# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3539# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3540# version 2 for more details (a copy is included in the LICENSE file that
3541# accompanied this code).
3542#
3543# You should have received a copy of the GNU General Public License version
3544# 2 along with this work; if not, write to the Free Software Foundation,
3545# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3546#
3547# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3548# or visit www.oracle.com if you need additional information or have any
3549# questions.
3550#
3551
3552
3553
3554
3555
3556# Helper function which possibly converts a path using DOS-style short mode.
3557# If so, the updated path is stored in $new_path.
3558# $1: The path to check
3559
3560
3561# Helper function which possibly converts a path using DOS-style short mode.
3562# If so, the updated path is stored in $new_path.
3563# $1: The path to check
3564
3565
3566# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3567# and could probably be heavily simplified. However, all changes in this
3568# area tend to need lot of testing in different scenarios, and in lack of
3569# proper unit testing, cleaning this up has not been deemed worth the effort
3570# at the moment.
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3581
3582
3583
3584
3585#
3586# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3587# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3588#
3589# This code is free software; you can redistribute it and/or modify it
3590# under the terms of the GNU General Public License version 2 only, as
3591# published by the Free Software Foundation.  Oracle designates this
3592# particular file as subject to the "Classpath" exception as provided
3593# by Oracle in the LICENSE file that accompanied this code.
3594#
3595# This code is distributed in the hope that it will be useful, but WITHOUT
3596# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3597# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3598# version 2 for more details (a copy is included in the LICENSE file that
3599# accompanied this code).
3600#
3601# You should have received a copy of the GNU General Public License version
3602# 2 along with this work; if not, write to the Free Software Foundation,
3603# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3604#
3605# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3606# or visit www.oracle.com if you need additional information or have any
3607# questions.
3608#
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620# ... then the rest
3621#
3622# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3623# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3624#
3625# This code is free software; you can redistribute it and/or modify it
3626# under the terms of the GNU General Public License version 2 only, as
3627# published by the Free Software Foundation.  Oracle designates this
3628# particular file as subject to the "Classpath" exception as provided
3629# by Oracle in the LICENSE file that accompanied this code.
3630#
3631# This code is distributed in the hope that it will be useful, but WITHOUT
3632# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3633# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3634# version 2 for more details (a copy is included in the LICENSE file that
3635# accompanied this code).
3636#
3637# You should have received a copy of the GNU General Public License version
3638# 2 along with this work; if not, write to the Free Software Foundation,
3639# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3640#
3641# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3642# or visit www.oracle.com if you need additional information or have any
3643# questions.
3644#
3645
3646########################################################################
3647# This file handles detection of the Boot JDK. The Boot JDK detection
3648# process has been developed as a response to solve a complex real-world
3649# problem. Initially, it was simple, but it has grown as platform after
3650# platform, idiosyncracy after idiosyncracy has been supported.
3651#
3652# The basic idea is this:
3653# 1) You need an acceptable *) JDK to use as a Boot JDK
3654# 2) There are several ways to locate a JDK, that are mostly platform
3655#    dependent **)
3656# 3) You can have multiple JDKs installed
3657# 4) If possible, configure should try to dig out an acceptable JDK
3658#    automatically, without having to resort to command-line options
3659#
3660# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3661#     javac) and not a JRE, etc.
3662#
3663# **) On Windows we typically use a well-known path.
3664#     On MacOSX we typically use the tool java_home.
3665#     On Linux we typically find javac in the $PATH, and then follow a
3666#     chain of symlinks that often ends up in a real JDK.
3667#
3668# This leads to the code where we check in different ways to locate a
3669# JDK, and if one is found, check if it is acceptable. If not, we print
3670# our reasons for rejecting it (useful when debugging non-working
3671# configure situations) and continue checking the next one.
3672########################################################################
3673
3674# Execute the check given as argument, and verify the result
3675# If the Boot JDK was previously found, do nothing
3676# $1 A command line (typically autoconf macro) to execute
3677
3678
3679# Test: Is bootjdk explicitely set by command line arguments?
3680
3681
3682# Test: Is bootjdk available from builddeps?
3683
3684
3685# Test: Is $JAVA_HOME set?
3686
3687
3688# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3689
3690
3691# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3692# $1: Argument to the java_home binary (optional)
3693
3694
3695# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3696
3697
3698# Look for a jdk in the given path. If there are multiple, try to select the newest.
3699# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3700# $1 = Path to directory containing jdk installations.
3701# $2 = String to append to the found JDK directory to get the proper JDK home
3702
3703
3704# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3705# environmental variable as base for where to look.
3706# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3707
3708
3709# Test: Is there a JDK installed in default, well-known locations?
3710
3711
3712# Check that a command-line tool in the Boot JDK is correct
3713# $1 = name of variable to assign
3714# $2 = name of binary
3715
3716
3717###############################################################################
3718#
3719# We need a Boot JDK to bootstrap the build.
3720#
3721
3722
3723
3724
3725
3726#
3727# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3728# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3729#
3730# This code is free software; you can redistribute it and/or modify it
3731# under the terms of the GNU General Public License version 2 only, as
3732# published by the Free Software Foundation.  Oracle designates this
3733# particular file as subject to the "Classpath" exception as provided
3734# by Oracle in the LICENSE file that accompanied this code.
3735#
3736# This code is distributed in the hope that it will be useful, but WITHOUT
3737# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3738# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3739# version 2 for more details (a copy is included in the LICENSE file that
3740# accompanied this code).
3741#
3742# You should have received a copy of the GNU General Public License version
3743# 2 along with this work; if not, write to the Free Software Foundation,
3744# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3745#
3746# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3747# or visit www.oracle.com if you need additional information or have any
3748# questions.
3749#
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770#
3771# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3772# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3773#
3774# This code is free software; you can redistribute it and/or modify it
3775# under the terms of the GNU General Public License version 2 only, as
3776# published by the Free Software Foundation.  Oracle designates this
3777# particular file as subject to the "Classpath" exception as provided
3778# by Oracle in the LICENSE file that accompanied this code.
3779#
3780# This code is distributed in the hope that it will be useful, but WITHOUT
3781# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3782# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3783# version 2 for more details (a copy is included in the LICENSE file that
3784# accompanied this code).
3785#
3786# You should have received a copy of the GNU General Public License version
3787# 2 along with this work; if not, write to the Free Software Foundation,
3788# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3789#
3790# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3791# or visit www.oracle.com if you need additional information or have any
3792# questions.
3793#
3794
3795
3796
3797
3798
3799# Documentation on common flags used for solstudio in HIGHEST.
3800#
3801# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3802#          done with care, there are some assumptions below that need to
3803#          be understood about the use of pointers, and IEEE behavior.
3804#
3805# -fns: Use non-standard floating point mode (not IEEE 754)
3806# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3807# -fsingle: Use single precision floating point with 'float'
3808# -xalias_level=basic: Assume memory references via basic pointer types do not alias
3809#   (Source with excessing pointer casting and data access with mixed
3810#    pointer types are not recommended)
3811# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3812#   (If you expect perfect errno behavior, do not use this)
3813# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3814# -xrestrict: Pointer parameters to functions do not overlap
3815#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3816#    If you pass in multiple pointers to the same data, do not use this)
3817# -xlibmil: Inline some library routines
3818#   (If you expect perfect errno behavior, do not use this)
3819# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3820#   (If you expect perfect errno behavior, do not use this)
3821#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3822
3823    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3824    # Bug?
3825    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3826    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3827    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3828    #fi
3829
3830
3831
3832
3833
3834# FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3835#                                   [RUN-IF-FALSE])
3836# ------------------------------------------------------------
3837# Check that the c and c++ compilers support an argument
3838
3839
3840# FLAGS_LINKER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3841#                                    [RUN-IF-FALSE])
3842# ------------------------------------------------------------
3843# Check that the linker support an argument
3844
3845
3846
3847
3848#
3849# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3850# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3851#
3852# This code is free software; you can redistribute it and/or modify it
3853# under the terms of the GNU General Public License version 2 only, as
3854# published by the Free Software Foundation.  Oracle designates this
3855# particular file as subject to the "Classpath" exception as provided
3856# by Oracle in the LICENSE file that accompanied this code.
3857#
3858# This code is distributed in the hope that it will be useful, but WITHOUT
3859# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3860# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3861# version 2 for more details (a copy is included in the LICENSE file that
3862# accompanied this code).
3863#
3864# You should have received a copy of the GNU General Public License version
3865# 2 along with this work; if not, write to the Free Software Foundation,
3866# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3867#
3868# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3869# or visit www.oracle.com if you need additional information or have any
3870# questions.
3871#
3872
3873
3874
3875
3876
3877cygwin_help() {
3878  case $1 in
3879    unzip)
3880      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3881      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3882      ;;
3883    zip)
3884      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3885      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3886      ;;
3887    make)
3888      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3889      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3890      ;;
3891    freetype)
3892      HELP_MSG="
3893The freetype library can now be build during the configure process.
3894Download the freetype sources and unpack them into an arbitrary directory:
3895
3896wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
3897tar -xzf freetype-2.5.3.tar.gz
3898
3899Then run configure with '--with-freetype-src=<freetype_src>'. This will
3900automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
3901builds or into '<freetype_src>/lib32' for 32-bit builds.
3902Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
3903and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds."
3904      ;;
3905  esac
3906}
3907
3908msys_help() {
3909  PKGHANDLER_COMMAND=""
3910}
3911
3912apt_help() {
3913  case $1 in
3914    devkit)
3915      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3916    openjdk)
3917      PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3918    alsa)
3919      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3920    cups)
3921      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3922    freetype)
3923      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3924    pulse)
3925      PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3926    x11)
3927      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3928    ccache)
3929      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3930  esac
3931}
3932
3933yum_help() {
3934  case $1 in
3935    devkit)
3936      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3937    openjdk)
3938      PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3939    alsa)
3940      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3941    cups)
3942      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3943    freetype)
3944      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3945    pulse)
3946      PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3947    x11)
3948      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
3949    ccache)
3950      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3951  esac
3952}
3953
3954port_help() {
3955  PKGHANDLER_COMMAND=""
3956}
3957
3958pkgutil_help() {
3959  PKGHANDLER_COMMAND=""
3960}
3961
3962pkgadd_help() {
3963  PKGHANDLER_COMMAND=""
3964}
3965
3966# This function will check if we're called from the "configure" wrapper while
3967# printing --help. If so, we will print out additional information that can
3968# only be extracted within the autoconf script, and then exit. This must be
3969# called at the very beginning in configure.ac.
3970
3971
3972
3973
3974
3975
3976#
3977# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3978# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3979#
3980# This code is free software; you can redistribute it and/or modify it
3981# under the terms of the GNU General Public License version 2 only, as
3982# published by the Free Software Foundation.  Oracle designates this
3983# particular file as subject to the "Classpath" exception as provided
3984# by Oracle in the LICENSE file that accompanied this code.
3985#
3986# This code is distributed in the hope that it will be useful, but WITHOUT
3987# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3988# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3989# version 2 for more details (a copy is included in the LICENSE file that
3990# accompanied this code).
3991#
3992# You should have received a copy of the GNU General Public License version
3993# 2 along with this work; if not, write to the Free Software Foundation,
3994# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3995#
3996# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3997# or visit www.oracle.com if you need additional information or have any
3998# questions.
3999#
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010###############################################################################
4011#
4012# Should we build only OpenJDK even if closed sources are present?
4013#
4014
4015
4016
4017
4018###############################################################################
4019#
4020# Setup version numbers
4021#
4022
4023
4024
4025
4026
4027
4028#
4029# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
4030# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4031#
4032# This code is free software; you can redistribute it and/or modify it
4033# under the terms of the GNU General Public License version 2 only, as
4034# published by the Free Software Foundation.  Oracle designates this
4035# particular file as subject to the "Classpath" exception as provided
4036# by Oracle in the LICENSE file that accompanied this code.
4037#
4038# This code is distributed in the hope that it will be useful, but WITHOUT
4039# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4040# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4041# version 2 for more details (a copy is included in the LICENSE file that
4042# accompanied this code).
4043#
4044# You should have received a copy of the GNU General Public License version
4045# 2 along with this work; if not, write to the Free Software Foundation,
4046# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4047#
4048# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4049# or visit www.oracle.com if you need additional information or have any
4050# questions.
4051#
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073#
4074# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4075# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4076#
4077# This code is free software; you can redistribute it and/or modify it
4078# under the terms of the GNU General Public License version 2 only, as
4079# published by the Free Software Foundation.  Oracle designates this
4080# particular file as subject to the "Classpath" exception as provided
4081# by Oracle in the LICENSE file that accompanied this code.
4082#
4083# This code is distributed in the hope that it will be useful, but WITHOUT
4084# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4085# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4086# version 2 for more details (a copy is included in the LICENSE file that
4087# accompanied this code).
4088#
4089# You should have received a copy of the GNU General Public License version
4090# 2 along with this work; if not, write to the Free Software Foundation,
4091# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4092#
4093# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4094# or visit www.oracle.com if you need additional information or have any
4095# questions.
4096#
4097
4098# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4099# Converts autoconf style CPU name to OpenJDK style, into
4100# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4101
4102
4103# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4104# Converts autoconf style OS name to OpenJDK style, into
4105# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4106
4107
4108# Expects $host_os $host_cpu $build_os and $build_cpu
4109# and $with_target_bits to have been setup!
4110#
4111# Translate the standard triplet(quadruplet) definition
4112# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4113# OPENJDK_BUILD_OS, etc.
4114
4115
4116# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4117# accordingly. Must be done after setting up build and target system, but before
4118# doing anything else with these values.
4119
4120
4121# Setup the legacy variables, for controlling the old makefiles.
4122#
4123
4124
4125
4126
4127#%%% Build and target systems %%%
4128
4129
4130
4131
4132# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4133# Add -mX to various FLAGS variables.
4134
4135
4136
4137
4138
4139
4140#
4141# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4142# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4143#
4144# This code is free software; you can redistribute it and/or modify it
4145# under the terms of the GNU General Public License version 2 only, as
4146# published by the Free Software Foundation.  Oracle designates this
4147# particular file as subject to the "Classpath" exception as provided
4148# by Oracle in the LICENSE file that accompanied this code.
4149#
4150# This code is distributed in the hope that it will be useful, but WITHOUT
4151# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4152# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4153# version 2 for more details (a copy is included in the LICENSE file that
4154# accompanied this code).
4155#
4156# You should have received a copy of the GNU General Public License version
4157# 2 along with this work; if not, write to the Free Software Foundation,
4158# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4159#
4160# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4161# or visit www.oracle.com if you need additional information or have any
4162# questions.
4163#
4164
4165
4166
4167
4168
4169
4170
4171
4172#
4173# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
4174# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4175#
4176# This code is free software; you can redistribute it and/or modify it
4177# under the terms of the GNU General Public License version 2 only, as
4178# published by the Free Software Foundation.  Oracle designates this
4179# particular file as subject to the "Classpath" exception as provided
4180# by Oracle in the LICENSE file that accompanied this code.
4181#
4182# This code is distributed in the hope that it will be useful, but WITHOUT
4183# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4184# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4185# version 2 for more details (a copy is included in the LICENSE file that
4186# accompanied this code).
4187#
4188# You should have received a copy of the GNU General Public License version
4189# 2 along with this work; if not, write to the Free Software Foundation,
4190# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4191#
4192# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4193# or visit www.oracle.com if you need additional information or have any
4194# questions.
4195#
4196
4197########################################################################
4198# This file is responsible for detecting, verifying and setting up the
4199# toolchain, i.e. the compiler, linker and related utilities. It will setup
4200# proper paths to the binaries, but it will not setup any flags.
4201#
4202# The binaries used is determined by the toolchain type, which is the family of
4203# compilers and related tools that are used.
4204########################################################################
4205
4206
4207# All valid toolchains, regardless of platform (used by help.m4)
4208VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4209
4210# These toolchains are valid on different platforms
4211VALID_TOOLCHAINS_linux="gcc clang"
4212VALID_TOOLCHAINS_solaris="solstudio"
4213VALID_TOOLCHAINS_macosx="gcc clang"
4214VALID_TOOLCHAINS_aix="xlc"
4215VALID_TOOLCHAINS_windows="microsoft"
4216
4217# Toolchain descriptions
4218TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4219TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4220TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4221TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4222TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4223
4224# Setup a number of variables describing how native output files are
4225# named on this platform/toolchain.
4226
4227
4228# Determine which toolchain type to use, and make sure it is valid for this
4229# platform. Setup various information about the selected toolchain.
4230
4231
4232# Before we start detecting the toolchain executables, we might need some
4233# special setup, e.g. additional paths etc.
4234
4235
4236# Restore path, etc
4237
4238
4239# Check if a compiler is of the toolchain type we expect, and save the version
4240# information from it. If the compiler does not match the expected type,
4241# this function will abort using AC_MSG_ERROR. If it matches, the version will
4242# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4243# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4244#
4245# $1 = compiler to test (CC or CXX)
4246# $2 = human readable name of compiler (C or C++)
4247
4248
4249# Try to locate the given C or C++ compiler in the path, or otherwise.
4250#
4251# $1 = compiler to test (CC or CXX)
4252# $2 = human readable name of compiler (C or C++)
4253# $3 = list of compiler names to search for
4254
4255
4256# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4257# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4258# archiver (AR). Verify that the compilers are correct according to the
4259# toolchain type.
4260
4261
4262# Setup additional tools that is considered a part of the toolchain, but not the
4263# core part. Many of these are highly platform-specific and do not exist,
4264# and/or are not needed on all platforms.
4265
4266
4267# Setup the build tools (i.e, the compiler and linker used to build programs
4268# that should be run on the build platform, not the target platform, as a build
4269# helper). Since the non-cross-compile case uses the normal, target compilers
4270# for this, we can only do this after these have been setup.
4271
4272
4273# Setup legacy variables that are still needed as alternative ways to refer to
4274# parts of the toolchain.
4275
4276
4277# Do some additional checks on the detected tools.
4278
4279
4280# Setup the JTReg Regression Test Harness.
4281
4282
4283#
4284# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4285# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4286#
4287# This code is free software; you can redistribute it and/or modify it
4288# under the terms of the GNU General Public License version 2 only, as
4289# published by the Free Software Foundation.  Oracle designates this
4290# particular file as subject to the "Classpath" exception as provided
4291# by Oracle in the LICENSE file that accompanied this code.
4292#
4293# This code is distributed in the hope that it will be useful, but WITHOUT
4294# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4295# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4296# version 2 for more details (a copy is included in the LICENSE file that
4297# accompanied this code).
4298#
4299# You should have received a copy of the GNU General Public License version
4300# 2 along with this work; if not, write to the Free Software Foundation,
4301# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4302#
4303# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4304# or visit www.oracle.com if you need additional information or have any
4305# questions.
4306#
4307
4308
4309
4310
4311
4312
4313
4314# Check if the VS env variables were setup prior to running configure.
4315# If not, then find vcvarsall.bat and run it automatically, and integrate
4316# the set env variables into the spec file.
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328# This line needs to be here, verbatim, after all includes and the dummy hook
4329# definitions. It is replaced with custom functionality when building
4330# custom sources.
4331#CUSTOM_AUTOCONF_INCLUDE
4332
4333# Do not change or remove the following line, it is needed for consistency checks:
4334DATE_WHEN_GENERATED=1416610519
4335
4336###############################################################################
4337#
4338# Initialization / Boot-strapping
4339#
4340# The bootstrapping process needs to solve the "chicken or the egg" problem,
4341# thus it jumps back and forth, each time gaining something needed later on.
4342#
4343###############################################################################
4344
4345# If we are requested to print additional help, do that and then exit.
4346# This must be the very first call.
4347
4348  if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4349    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4350    $PRINTF "Which are valid to use depends on the build platform.\n"
4351    for toolchain in $VALID_TOOLCHAINS_all; do
4352      # Use indirect variable referencing
4353      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4354      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4355      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4356    done
4357
4358    # And now exit directly
4359    exit 0
4360  fi
4361
4362
4363# Basic initialization that must happen first of all in the normal process.
4364
4365  # Save the original command line. This is passed to us by the wrapper configure script.
4366
4367  DATE_WHEN_CONFIGURED=`LANG=C date`
4368
4369  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4370$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4371  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4372$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4373
4374
4375  # Start with tools that do not need have cross compilation support
4376  # and can be expected to be found in the default PATH. These tools are
4377  # used by configure. Nor are these tools expected to be found in the
4378  # devkit from the builddeps server either, since they are
4379  # needed to download the devkit.
4380
4381  # First are all the simple required tools.
4382
4383
4384
4385  # Publish this variable in the help.
4386
4387
4388  if test "x$BASENAME" = x; then
4389    # The variable is not set by user, try to locate tool using the code snippet
4390    for ac_prog in basename
4391do
4392  # Extract the first word of "$ac_prog", so it can be a program name with args.
4393set dummy $ac_prog; ac_word=$2
4394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4395$as_echo_n "checking for $ac_word... " >&6; }
4396if ${ac_cv_path_BASENAME+:} false; then :
4397  $as_echo_n "(cached) " >&6
4398else
4399  case $BASENAME in
4400  [\\/]* | ?:[\\/]*)
4401  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4402  ;;
4403  *)
4404  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4405for as_dir in $PATH
4406do
4407  IFS=$as_save_IFS
4408  test -z "$as_dir" && as_dir=.
4409    for ac_exec_ext in '' $ac_executable_extensions; do
4410  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4411    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4412    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4413    break 2
4414  fi
4415done
4416  done
4417IFS=$as_save_IFS
4418
4419  ;;
4420esac
4421fi
4422BASENAME=$ac_cv_path_BASENAME
4423if test -n "$BASENAME"; then
4424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4425$as_echo "$BASENAME" >&6; }
4426else
4427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4428$as_echo "no" >&6; }
4429fi
4430
4431
4432  test -n "$BASENAME" && break
4433done
4434
4435  else
4436    # The variable is set, but is it from the command line or the environment?
4437
4438    # Try to remove the string !BASENAME! from our list.
4439    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4440    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4441      # If it failed, the variable was not from the command line. Ignore it,
4442      # but warn the user (except for BASH, which is always set by the calling BASH).
4443      if test "xBASENAME" != xBASH; then
4444        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4445$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4446      fi
4447      # Try to locate tool using the code snippet
4448      for ac_prog in basename
4449do
4450  # Extract the first word of "$ac_prog", so it can be a program name with args.
4451set dummy $ac_prog; ac_word=$2
4452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4453$as_echo_n "checking for $ac_word... " >&6; }
4454if ${ac_cv_path_BASENAME+:} false; then :
4455  $as_echo_n "(cached) " >&6
4456else
4457  case $BASENAME in
4458  [\\/]* | ?:[\\/]*)
4459  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4460  ;;
4461  *)
4462  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4463for as_dir in $PATH
4464do
4465  IFS=$as_save_IFS
4466  test -z "$as_dir" && as_dir=.
4467    for ac_exec_ext in '' $ac_executable_extensions; do
4468  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4469    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4470    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4471    break 2
4472  fi
4473done
4474  done
4475IFS=$as_save_IFS
4476
4477  ;;
4478esac
4479fi
4480BASENAME=$ac_cv_path_BASENAME
4481if test -n "$BASENAME"; then
4482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4483$as_echo "$BASENAME" >&6; }
4484else
4485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4486$as_echo "no" >&6; }
4487fi
4488
4489
4490  test -n "$BASENAME" && break
4491done
4492
4493    else
4494      # If it succeeded, then it was overridden by the user. We will use it
4495      # for the tool.
4496
4497      # First remove it from the list of overridden variables, so we can test
4498      # for unknown variables in the end.
4499      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4500
4501      # Check if the provided tool contains a complete path.
4502      tool_specified="$BASENAME"
4503      tool_basename="${tool_specified##*/}"
4504      if test "x$tool_basename" = "x$tool_specified"; then
4505        # A command without a complete path is provided, search $PATH.
4506        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
4507$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
4508        # Extract the first word of "$tool_basename", so it can be a program name with args.
4509set dummy $tool_basename; ac_word=$2
4510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4511$as_echo_n "checking for $ac_word... " >&6; }
4512if ${ac_cv_path_BASENAME+:} false; then :
4513  $as_echo_n "(cached) " >&6
4514else
4515  case $BASENAME in
4516  [\\/]* | ?:[\\/]*)
4517  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4518  ;;
4519  *)
4520  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4521for as_dir in $PATH
4522do
4523  IFS=$as_save_IFS
4524  test -z "$as_dir" && as_dir=.
4525    for ac_exec_ext in '' $ac_executable_extensions; do
4526  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4527    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4528    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4529    break 2
4530  fi
4531done
4532  done
4533IFS=$as_save_IFS
4534
4535  ;;
4536esac
4537fi
4538BASENAME=$ac_cv_path_BASENAME
4539if test -n "$BASENAME"; then
4540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4541$as_echo "$BASENAME" >&6; }
4542else
4543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4544$as_echo "no" >&6; }
4545fi
4546
4547
4548        if test "x$BASENAME" = x; then
4549          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4550        fi
4551      else
4552        # Otherwise we believe it is a complete path. Use it as it is.
4553        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
4554$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
4555        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4556$as_echo_n "checking for BASENAME... " >&6; }
4557        if test ! -x "$tool_specified"; then
4558          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4559$as_echo "not found" >&6; }
4560          as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
4561        fi
4562        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4563$as_echo "$tool_specified" >&6; }
4564      fi
4565    fi
4566  fi
4567
4568
4569
4570  if test "x$BASENAME" = x; then
4571    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
4572  fi
4573
4574
4575
4576
4577
4578  # Publish this variable in the help.
4579
4580
4581  if test "x$BASH" = x; then
4582    # The variable is not set by user, try to locate tool using the code snippet
4583    for ac_prog in bash
4584do
4585  # Extract the first word of "$ac_prog", so it can be a program name with args.
4586set dummy $ac_prog; ac_word=$2
4587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4588$as_echo_n "checking for $ac_word... " >&6; }
4589if ${ac_cv_path_BASH+:} false; then :
4590  $as_echo_n "(cached) " >&6
4591else
4592  case $BASH in
4593  [\\/]* | ?:[\\/]*)
4594  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4595  ;;
4596  *)
4597  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4598for as_dir in $PATH
4599do
4600  IFS=$as_save_IFS
4601  test -z "$as_dir" && as_dir=.
4602    for ac_exec_ext in '' $ac_executable_extensions; do
4603  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4604    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4605    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4606    break 2
4607  fi
4608done
4609  done
4610IFS=$as_save_IFS
4611
4612  ;;
4613esac
4614fi
4615BASH=$ac_cv_path_BASH
4616if test -n "$BASH"; then
4617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4618$as_echo "$BASH" >&6; }
4619else
4620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4621$as_echo "no" >&6; }
4622fi
4623
4624
4625  test -n "$BASH" && break
4626done
4627
4628  else
4629    # The variable is set, but is it from the command line or the environment?
4630
4631    # Try to remove the string !BASH! from our list.
4632    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
4633    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4634      # If it failed, the variable was not from the command line. Ignore it,
4635      # but warn the user (except for BASH, which is always set by the calling BASH).
4636      if test "xBASH" != xBASH; then
4637        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
4638$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
4639      fi
4640      # Try to locate tool using the code snippet
4641      for ac_prog in bash
4642do
4643  # Extract the first word of "$ac_prog", so it can be a program name with args.
4644set dummy $ac_prog; ac_word=$2
4645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4646$as_echo_n "checking for $ac_word... " >&6; }
4647if ${ac_cv_path_BASH+:} false; then :
4648  $as_echo_n "(cached) " >&6
4649else
4650  case $BASH in
4651  [\\/]* | ?:[\\/]*)
4652  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4653  ;;
4654  *)
4655  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4656for as_dir in $PATH
4657do
4658  IFS=$as_save_IFS
4659  test -z "$as_dir" && as_dir=.
4660    for ac_exec_ext in '' $ac_executable_extensions; do
4661  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4662    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4663    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4664    break 2
4665  fi
4666done
4667  done
4668IFS=$as_save_IFS
4669
4670  ;;
4671esac
4672fi
4673BASH=$ac_cv_path_BASH
4674if test -n "$BASH"; then
4675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4676$as_echo "$BASH" >&6; }
4677else
4678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4679$as_echo "no" >&6; }
4680fi
4681
4682
4683  test -n "$BASH" && break
4684done
4685
4686    else
4687      # If it succeeded, then it was overridden by the user. We will use it
4688      # for the tool.
4689
4690      # First remove it from the list of overridden variables, so we can test
4691      # for unknown variables in the end.
4692      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4693
4694      # Check if the provided tool contains a complete path.
4695      tool_specified="$BASH"
4696      tool_basename="${tool_specified##*/}"
4697      if test "x$tool_basename" = "x$tool_specified"; then
4698        # A command without a complete path is provided, search $PATH.
4699        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
4700$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
4701        # Extract the first word of "$tool_basename", so it can be a program name with args.
4702set dummy $tool_basename; ac_word=$2
4703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4704$as_echo_n "checking for $ac_word... " >&6; }
4705if ${ac_cv_path_BASH+:} false; then :
4706  $as_echo_n "(cached) " >&6
4707else
4708  case $BASH in
4709  [\\/]* | ?:[\\/]*)
4710  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4711  ;;
4712  *)
4713  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4714for as_dir in $PATH
4715do
4716  IFS=$as_save_IFS
4717  test -z "$as_dir" && as_dir=.
4718    for ac_exec_ext in '' $ac_executable_extensions; do
4719  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4720    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4721    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4722    break 2
4723  fi
4724done
4725  done
4726IFS=$as_save_IFS
4727
4728  ;;
4729esac
4730fi
4731BASH=$ac_cv_path_BASH
4732if test -n "$BASH"; then
4733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4734$as_echo "$BASH" >&6; }
4735else
4736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4737$as_echo "no" >&6; }
4738fi
4739
4740
4741        if test "x$BASH" = x; then
4742          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4743        fi
4744      else
4745        # Otherwise we believe it is a complete path. Use it as it is.
4746        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
4747$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
4748        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
4749$as_echo_n "checking for BASH... " >&6; }
4750        if test ! -x "$tool_specified"; then
4751          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4752$as_echo "not found" >&6; }
4753          as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
4754        fi
4755        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4756$as_echo "$tool_specified" >&6; }
4757      fi
4758    fi
4759  fi
4760
4761
4762
4763  if test "x$BASH" = x; then
4764    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
4765  fi
4766
4767
4768
4769
4770
4771  # Publish this variable in the help.
4772
4773
4774  if test "x$CAT" = x; then
4775    # The variable is not set by user, try to locate tool using the code snippet
4776    for ac_prog in cat
4777do
4778  # Extract the first word of "$ac_prog", so it can be a program name with args.
4779set dummy $ac_prog; ac_word=$2
4780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4781$as_echo_n "checking for $ac_word... " >&6; }
4782if ${ac_cv_path_CAT+:} false; then :
4783  $as_echo_n "(cached) " >&6
4784else
4785  case $CAT in
4786  [\\/]* | ?:[\\/]*)
4787  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4788  ;;
4789  *)
4790  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4791for as_dir in $PATH
4792do
4793  IFS=$as_save_IFS
4794  test -z "$as_dir" && as_dir=.
4795    for ac_exec_ext in '' $ac_executable_extensions; do
4796  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4797    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4798    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4799    break 2
4800  fi
4801done
4802  done
4803IFS=$as_save_IFS
4804
4805  ;;
4806esac
4807fi
4808CAT=$ac_cv_path_CAT
4809if test -n "$CAT"; then
4810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4811$as_echo "$CAT" >&6; }
4812else
4813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4814$as_echo "no" >&6; }
4815fi
4816
4817
4818  test -n "$CAT" && break
4819done
4820
4821  else
4822    # The variable is set, but is it from the command line or the environment?
4823
4824    # Try to remove the string !CAT! from our list.
4825    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
4826    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4827      # If it failed, the variable was not from the command line. Ignore it,
4828      # but warn the user (except for BASH, which is always set by the calling BASH).
4829      if test "xCAT" != xBASH; then
4830        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
4831$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
4832      fi
4833      # Try to locate tool using the code snippet
4834      for ac_prog in cat
4835do
4836  # Extract the first word of "$ac_prog", so it can be a program name with args.
4837set dummy $ac_prog; ac_word=$2
4838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4839$as_echo_n "checking for $ac_word... " >&6; }
4840if ${ac_cv_path_CAT+:} false; then :
4841  $as_echo_n "(cached) " >&6
4842else
4843  case $CAT in
4844  [\\/]* | ?:[\\/]*)
4845  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4846  ;;
4847  *)
4848  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4849for as_dir in $PATH
4850do
4851  IFS=$as_save_IFS
4852  test -z "$as_dir" && as_dir=.
4853    for ac_exec_ext in '' $ac_executable_extensions; do
4854  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4855    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4856    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4857    break 2
4858  fi
4859done
4860  done
4861IFS=$as_save_IFS
4862
4863  ;;
4864esac
4865fi
4866CAT=$ac_cv_path_CAT
4867if test -n "$CAT"; then
4868  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4869$as_echo "$CAT" >&6; }
4870else
4871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4872$as_echo "no" >&6; }
4873fi
4874
4875
4876  test -n "$CAT" && break
4877done
4878
4879    else
4880      # If it succeeded, then it was overridden by the user. We will use it
4881      # for the tool.
4882
4883      # First remove it from the list of overridden variables, so we can test
4884      # for unknown variables in the end.
4885      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4886
4887      # Check if the provided tool contains a complete path.
4888      tool_specified="$CAT"
4889      tool_basename="${tool_specified##*/}"
4890      if test "x$tool_basename" = "x$tool_specified"; then
4891        # A command without a complete path is provided, search $PATH.
4892        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
4893$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
4894        # Extract the first word of "$tool_basename", so it can be a program name with args.
4895set dummy $tool_basename; ac_word=$2
4896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4897$as_echo_n "checking for $ac_word... " >&6; }
4898if ${ac_cv_path_CAT+:} false; then :
4899  $as_echo_n "(cached) " >&6
4900else
4901  case $CAT in
4902  [\\/]* | ?:[\\/]*)
4903  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4904  ;;
4905  *)
4906  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4907for as_dir in $PATH
4908do
4909  IFS=$as_save_IFS
4910  test -z "$as_dir" && as_dir=.
4911    for ac_exec_ext in '' $ac_executable_extensions; do
4912  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4913    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4914    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4915    break 2
4916  fi
4917done
4918  done
4919IFS=$as_save_IFS
4920
4921  ;;
4922esac
4923fi
4924CAT=$ac_cv_path_CAT
4925if test -n "$CAT"; then
4926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4927$as_echo "$CAT" >&6; }
4928else
4929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4930$as_echo "no" >&6; }
4931fi
4932
4933
4934        if test "x$CAT" = x; then
4935          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4936        fi
4937      else
4938        # Otherwise we believe it is a complete path. Use it as it is.
4939        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
4940$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
4941        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
4942$as_echo_n "checking for CAT... " >&6; }
4943        if test ! -x "$tool_specified"; then
4944          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4945$as_echo "not found" >&6; }
4946          as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
4947        fi
4948        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4949$as_echo "$tool_specified" >&6; }
4950      fi
4951    fi
4952  fi
4953
4954
4955
4956  if test "x$CAT" = x; then
4957    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
4958  fi
4959
4960
4961
4962
4963
4964  # Publish this variable in the help.
4965
4966
4967  if test "x$CHMOD" = x; then
4968    # The variable is not set by user, try to locate tool using the code snippet
4969    for ac_prog in chmod
4970do
4971  # Extract the first word of "$ac_prog", so it can be a program name with args.
4972set dummy $ac_prog; ac_word=$2
4973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4974$as_echo_n "checking for $ac_word... " >&6; }
4975if ${ac_cv_path_CHMOD+:} false; then :
4976  $as_echo_n "(cached) " >&6
4977else
4978  case $CHMOD in
4979  [\\/]* | ?:[\\/]*)
4980  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4981  ;;
4982  *)
4983  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4984for as_dir in $PATH
4985do
4986  IFS=$as_save_IFS
4987  test -z "$as_dir" && as_dir=.
4988    for ac_exec_ext in '' $ac_executable_extensions; do
4989  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4990    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4991    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4992    break 2
4993  fi
4994done
4995  done
4996IFS=$as_save_IFS
4997
4998  ;;
4999esac
5000fi
5001CHMOD=$ac_cv_path_CHMOD
5002if test -n "$CHMOD"; then
5003  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5004$as_echo "$CHMOD" >&6; }
5005else
5006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5007$as_echo "no" >&6; }
5008fi
5009
5010
5011  test -n "$CHMOD" && break
5012done
5013
5014  else
5015    # The variable is set, but is it from the command line or the environment?
5016
5017    # Try to remove the string !CHMOD! from our list.
5018    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5019    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5020      # If it failed, the variable was not from the command line. Ignore it,
5021      # but warn the user (except for BASH, which is always set by the calling BASH).
5022      if test "xCHMOD" != xBASH; then
5023        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5024$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5025      fi
5026      # Try to locate tool using the code snippet
5027      for ac_prog in chmod
5028do
5029  # Extract the first word of "$ac_prog", so it can be a program name with args.
5030set dummy $ac_prog; ac_word=$2
5031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5032$as_echo_n "checking for $ac_word... " >&6; }
5033if ${ac_cv_path_CHMOD+:} false; then :
5034  $as_echo_n "(cached) " >&6
5035else
5036  case $CHMOD in
5037  [\\/]* | ?:[\\/]*)
5038  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5039  ;;
5040  *)
5041  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5042for as_dir in $PATH
5043do
5044  IFS=$as_save_IFS
5045  test -z "$as_dir" && as_dir=.
5046    for ac_exec_ext in '' $ac_executable_extensions; do
5047  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5048    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5049    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5050    break 2
5051  fi
5052done
5053  done
5054IFS=$as_save_IFS
5055
5056  ;;
5057esac
5058fi
5059CHMOD=$ac_cv_path_CHMOD
5060if test -n "$CHMOD"; then
5061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5062$as_echo "$CHMOD" >&6; }
5063else
5064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5065$as_echo "no" >&6; }
5066fi
5067
5068
5069  test -n "$CHMOD" && break
5070done
5071
5072    else
5073      # If it succeeded, then it was overridden by the user. We will use it
5074      # for the tool.
5075
5076      # First remove it from the list of overridden variables, so we can test
5077      # for unknown variables in the end.
5078      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5079
5080      # Check if the provided tool contains a complete path.
5081      tool_specified="$CHMOD"
5082      tool_basename="${tool_specified##*/}"
5083      if test "x$tool_basename" = "x$tool_specified"; then
5084        # A command without a complete path is provided, search $PATH.
5085        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5086$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5087        # Extract the first word of "$tool_basename", so it can be a program name with args.
5088set dummy $tool_basename; ac_word=$2
5089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5090$as_echo_n "checking for $ac_word... " >&6; }
5091if ${ac_cv_path_CHMOD+:} false; then :
5092  $as_echo_n "(cached) " >&6
5093else
5094  case $CHMOD in
5095  [\\/]* | ?:[\\/]*)
5096  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5097  ;;
5098  *)
5099  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5100for as_dir in $PATH
5101do
5102  IFS=$as_save_IFS
5103  test -z "$as_dir" && as_dir=.
5104    for ac_exec_ext in '' $ac_executable_extensions; do
5105  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5106    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5107    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5108    break 2
5109  fi
5110done
5111  done
5112IFS=$as_save_IFS
5113
5114  ;;
5115esac
5116fi
5117CHMOD=$ac_cv_path_CHMOD
5118if test -n "$CHMOD"; then
5119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5120$as_echo "$CHMOD" >&6; }
5121else
5122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5123$as_echo "no" >&6; }
5124fi
5125
5126
5127        if test "x$CHMOD" = x; then
5128          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5129        fi
5130      else
5131        # Otherwise we believe it is a complete path. Use it as it is.
5132        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5133$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5134        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5135$as_echo_n "checking for CHMOD... " >&6; }
5136        if test ! -x "$tool_specified"; then
5137          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5138$as_echo "not found" >&6; }
5139          as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5140        fi
5141        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5142$as_echo "$tool_specified" >&6; }
5143      fi
5144    fi
5145  fi
5146
5147
5148
5149  if test "x$CHMOD" = x; then
5150    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5151  fi
5152
5153
5154
5155
5156
5157  # Publish this variable in the help.
5158
5159
5160  if test "x$CMP" = x; then
5161    # The variable is not set by user, try to locate tool using the code snippet
5162    for ac_prog in cmp
5163do
5164  # Extract the first word of "$ac_prog", so it can be a program name with args.
5165set dummy $ac_prog; ac_word=$2
5166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5167$as_echo_n "checking for $ac_word... " >&6; }
5168if ${ac_cv_path_CMP+:} false; then :
5169  $as_echo_n "(cached) " >&6
5170else
5171  case $CMP in
5172  [\\/]* | ?:[\\/]*)
5173  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5174  ;;
5175  *)
5176  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5177for as_dir in $PATH
5178do
5179  IFS=$as_save_IFS
5180  test -z "$as_dir" && as_dir=.
5181    for ac_exec_ext in '' $ac_executable_extensions; do
5182  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5183    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5184    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5185    break 2
5186  fi
5187done
5188  done
5189IFS=$as_save_IFS
5190
5191  ;;
5192esac
5193fi
5194CMP=$ac_cv_path_CMP
5195if test -n "$CMP"; then
5196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5197$as_echo "$CMP" >&6; }
5198else
5199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5200$as_echo "no" >&6; }
5201fi
5202
5203
5204  test -n "$CMP" && break
5205done
5206
5207  else
5208    # The variable is set, but is it from the command line or the environment?
5209
5210    # Try to remove the string !CMP! from our list.
5211    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5212    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5213      # If it failed, the variable was not from the command line. Ignore it,
5214      # but warn the user (except for BASH, which is always set by the calling BASH).
5215      if test "xCMP" != xBASH; then
5216        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5217$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5218      fi
5219      # Try to locate tool using the code snippet
5220      for ac_prog in cmp
5221do
5222  # Extract the first word of "$ac_prog", so it can be a program name with args.
5223set dummy $ac_prog; ac_word=$2
5224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5225$as_echo_n "checking for $ac_word... " >&6; }
5226if ${ac_cv_path_CMP+:} false; then :
5227  $as_echo_n "(cached) " >&6
5228else
5229  case $CMP in
5230  [\\/]* | ?:[\\/]*)
5231  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5232  ;;
5233  *)
5234  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5235for as_dir in $PATH
5236do
5237  IFS=$as_save_IFS
5238  test -z "$as_dir" && as_dir=.
5239    for ac_exec_ext in '' $ac_executable_extensions; do
5240  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5241    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5242    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5243    break 2
5244  fi
5245done
5246  done
5247IFS=$as_save_IFS
5248
5249  ;;
5250esac
5251fi
5252CMP=$ac_cv_path_CMP
5253if test -n "$CMP"; then
5254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5255$as_echo "$CMP" >&6; }
5256else
5257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5258$as_echo "no" >&6; }
5259fi
5260
5261
5262  test -n "$CMP" && break
5263done
5264
5265    else
5266      # If it succeeded, then it was overridden by the user. We will use it
5267      # for the tool.
5268
5269      # First remove it from the list of overridden variables, so we can test
5270      # for unknown variables in the end.
5271      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5272
5273      # Check if the provided tool contains a complete path.
5274      tool_specified="$CMP"
5275      tool_basename="${tool_specified##*/}"
5276      if test "x$tool_basename" = "x$tool_specified"; then
5277        # A command without a complete path is provided, search $PATH.
5278        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5279$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5280        # Extract the first word of "$tool_basename", so it can be a program name with args.
5281set dummy $tool_basename; ac_word=$2
5282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5283$as_echo_n "checking for $ac_word... " >&6; }
5284if ${ac_cv_path_CMP+:} false; then :
5285  $as_echo_n "(cached) " >&6
5286else
5287  case $CMP in
5288  [\\/]* | ?:[\\/]*)
5289  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5290  ;;
5291  *)
5292  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5293for as_dir in $PATH
5294do
5295  IFS=$as_save_IFS
5296  test -z "$as_dir" && as_dir=.
5297    for ac_exec_ext in '' $ac_executable_extensions; do
5298  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5299    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5300    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5301    break 2
5302  fi
5303done
5304  done
5305IFS=$as_save_IFS
5306
5307  ;;
5308esac
5309fi
5310CMP=$ac_cv_path_CMP
5311if test -n "$CMP"; then
5312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5313$as_echo "$CMP" >&6; }
5314else
5315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5316$as_echo "no" >&6; }
5317fi
5318
5319
5320        if test "x$CMP" = x; then
5321          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5322        fi
5323      else
5324        # Otherwise we believe it is a complete path. Use it as it is.
5325        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5326$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5327        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5328$as_echo_n "checking for CMP... " >&6; }
5329        if test ! -x "$tool_specified"; then
5330          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5331$as_echo "not found" >&6; }
5332          as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5333        fi
5334        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5335$as_echo "$tool_specified" >&6; }
5336      fi
5337    fi
5338  fi
5339
5340
5341
5342  if test "x$CMP" = x; then
5343    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5344  fi
5345
5346
5347
5348
5349
5350  # Publish this variable in the help.
5351
5352
5353  if test "x$COMM" = x; then
5354    # The variable is not set by user, try to locate tool using the code snippet
5355    for ac_prog in comm
5356do
5357  # Extract the first word of "$ac_prog", so it can be a program name with args.
5358set dummy $ac_prog; ac_word=$2
5359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5360$as_echo_n "checking for $ac_word... " >&6; }
5361if ${ac_cv_path_COMM+:} false; then :
5362  $as_echo_n "(cached) " >&6
5363else
5364  case $COMM in
5365  [\\/]* | ?:[\\/]*)
5366  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5367  ;;
5368  *)
5369  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5370for as_dir in $PATH
5371do
5372  IFS=$as_save_IFS
5373  test -z "$as_dir" && as_dir=.
5374    for ac_exec_ext in '' $ac_executable_extensions; do
5375  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5376    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5377    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5378    break 2
5379  fi
5380done
5381  done
5382IFS=$as_save_IFS
5383
5384  ;;
5385esac
5386fi
5387COMM=$ac_cv_path_COMM
5388if test -n "$COMM"; then
5389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5390$as_echo "$COMM" >&6; }
5391else
5392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5393$as_echo "no" >&6; }
5394fi
5395
5396
5397  test -n "$COMM" && break
5398done
5399
5400  else
5401    # The variable is set, but is it from the command line or the environment?
5402
5403    # Try to remove the string !COMM! from our list.
5404    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5405    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5406      # If it failed, the variable was not from the command line. Ignore it,
5407      # but warn the user (except for BASH, which is always set by the calling BASH).
5408      if test "xCOMM" != xBASH; then
5409        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5410$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5411      fi
5412      # Try to locate tool using the code snippet
5413      for ac_prog in comm
5414do
5415  # Extract the first word of "$ac_prog", so it can be a program name with args.
5416set dummy $ac_prog; ac_word=$2
5417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5418$as_echo_n "checking for $ac_word... " >&6; }
5419if ${ac_cv_path_COMM+:} false; then :
5420  $as_echo_n "(cached) " >&6
5421else
5422  case $COMM in
5423  [\\/]* | ?:[\\/]*)
5424  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5425  ;;
5426  *)
5427  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5428for as_dir in $PATH
5429do
5430  IFS=$as_save_IFS
5431  test -z "$as_dir" && as_dir=.
5432    for ac_exec_ext in '' $ac_executable_extensions; do
5433  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5434    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5435    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5436    break 2
5437  fi
5438done
5439  done
5440IFS=$as_save_IFS
5441
5442  ;;
5443esac
5444fi
5445COMM=$ac_cv_path_COMM
5446if test -n "$COMM"; then
5447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5448$as_echo "$COMM" >&6; }
5449else
5450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5451$as_echo "no" >&6; }
5452fi
5453
5454
5455  test -n "$COMM" && break
5456done
5457
5458    else
5459      # If it succeeded, then it was overridden by the user. We will use it
5460      # for the tool.
5461
5462      # First remove it from the list of overridden variables, so we can test
5463      # for unknown variables in the end.
5464      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5465
5466      # Check if the provided tool contains a complete path.
5467      tool_specified="$COMM"
5468      tool_basename="${tool_specified##*/}"
5469      if test "x$tool_basename" = "x$tool_specified"; then
5470        # A command without a complete path is provided, search $PATH.
5471        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
5472$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
5473        # Extract the first word of "$tool_basename", so it can be a program name with args.
5474set dummy $tool_basename; ac_word=$2
5475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5476$as_echo_n "checking for $ac_word... " >&6; }
5477if ${ac_cv_path_COMM+:} false; then :
5478  $as_echo_n "(cached) " >&6
5479else
5480  case $COMM in
5481  [\\/]* | ?:[\\/]*)
5482  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5483  ;;
5484  *)
5485  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5486for as_dir in $PATH
5487do
5488  IFS=$as_save_IFS
5489  test -z "$as_dir" && as_dir=.
5490    for ac_exec_ext in '' $ac_executable_extensions; do
5491  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5492    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5493    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5494    break 2
5495  fi
5496done
5497  done
5498IFS=$as_save_IFS
5499
5500  ;;
5501esac
5502fi
5503COMM=$ac_cv_path_COMM
5504if test -n "$COMM"; then
5505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5506$as_echo "$COMM" >&6; }
5507else
5508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5509$as_echo "no" >&6; }
5510fi
5511
5512
5513        if test "x$COMM" = x; then
5514          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5515        fi
5516      else
5517        # Otherwise we believe it is a complete path. Use it as it is.
5518        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
5519$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
5520        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5521$as_echo_n "checking for COMM... " >&6; }
5522        if test ! -x "$tool_specified"; then
5523          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5524$as_echo "not found" >&6; }
5525          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
5526        fi
5527        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5528$as_echo "$tool_specified" >&6; }
5529      fi
5530    fi
5531  fi
5532
5533
5534
5535  if test "x$COMM" = x; then
5536    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
5537  fi
5538
5539
5540
5541
5542
5543  # Publish this variable in the help.
5544
5545
5546  if test "x$CP" = x; then
5547    # The variable is not set by user, try to locate tool using the code snippet
5548    for ac_prog in cp
5549do
5550  # Extract the first word of "$ac_prog", so it can be a program name with args.
5551set dummy $ac_prog; ac_word=$2
5552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5553$as_echo_n "checking for $ac_word... " >&6; }
5554if ${ac_cv_path_CP+:} false; then :
5555  $as_echo_n "(cached) " >&6
5556else
5557  case $CP in
5558  [\\/]* | ?:[\\/]*)
5559  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5560  ;;
5561  *)
5562  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5563for as_dir in $PATH
5564do
5565  IFS=$as_save_IFS
5566  test -z "$as_dir" && as_dir=.
5567    for ac_exec_ext in '' $ac_executable_extensions; do
5568  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5569    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5570    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5571    break 2
5572  fi
5573done
5574  done
5575IFS=$as_save_IFS
5576
5577  ;;
5578esac
5579fi
5580CP=$ac_cv_path_CP
5581if test -n "$CP"; then
5582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5583$as_echo "$CP" >&6; }
5584else
5585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5586$as_echo "no" >&6; }
5587fi
5588
5589
5590  test -n "$CP" && break
5591done
5592
5593  else
5594    # The variable is set, but is it from the command line or the environment?
5595
5596    # Try to remove the string !CP! from our list.
5597    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
5598    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5599      # If it failed, the variable was not from the command line. Ignore it,
5600      # but warn the user (except for BASH, which is always set by the calling BASH).
5601      if test "xCP" != xBASH; then
5602        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
5603$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
5604      fi
5605      # Try to locate tool using the code snippet
5606      for ac_prog in cp
5607do
5608  # Extract the first word of "$ac_prog", so it can be a program name with args.
5609set dummy $ac_prog; ac_word=$2
5610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5611$as_echo_n "checking for $ac_word... " >&6; }
5612if ${ac_cv_path_CP+:} false; then :
5613  $as_echo_n "(cached) " >&6
5614else
5615  case $CP in
5616  [\\/]* | ?:[\\/]*)
5617  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5618  ;;
5619  *)
5620  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5621for as_dir in $PATH
5622do
5623  IFS=$as_save_IFS
5624  test -z "$as_dir" && as_dir=.
5625    for ac_exec_ext in '' $ac_executable_extensions; do
5626  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5627    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5628    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5629    break 2
5630  fi
5631done
5632  done
5633IFS=$as_save_IFS
5634
5635  ;;
5636esac
5637fi
5638CP=$ac_cv_path_CP
5639if test -n "$CP"; then
5640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5641$as_echo "$CP" >&6; }
5642else
5643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5644$as_echo "no" >&6; }
5645fi
5646
5647
5648  test -n "$CP" && break
5649done
5650
5651    else
5652      # If it succeeded, then it was overridden by the user. We will use it
5653      # for the tool.
5654
5655      # First remove it from the list of overridden variables, so we can test
5656      # for unknown variables in the end.
5657      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5658
5659      # Check if the provided tool contains a complete path.
5660      tool_specified="$CP"
5661      tool_basename="${tool_specified##*/}"
5662      if test "x$tool_basename" = "x$tool_specified"; then
5663        # A command without a complete path is provided, search $PATH.
5664        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
5665$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
5666        # Extract the first word of "$tool_basename", so it can be a program name with args.
5667set dummy $tool_basename; ac_word=$2
5668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5669$as_echo_n "checking for $ac_word... " >&6; }
5670if ${ac_cv_path_CP+:} false; then :
5671  $as_echo_n "(cached) " >&6
5672else
5673  case $CP in
5674  [\\/]* | ?:[\\/]*)
5675  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5676  ;;
5677  *)
5678  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5679for as_dir in $PATH
5680do
5681  IFS=$as_save_IFS
5682  test -z "$as_dir" && as_dir=.
5683    for ac_exec_ext in '' $ac_executable_extensions; do
5684  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5685    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5686    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5687    break 2
5688  fi
5689done
5690  done
5691IFS=$as_save_IFS
5692
5693  ;;
5694esac
5695fi
5696CP=$ac_cv_path_CP
5697if test -n "$CP"; then
5698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5699$as_echo "$CP" >&6; }
5700else
5701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5702$as_echo "no" >&6; }
5703fi
5704
5705
5706        if test "x$CP" = x; then
5707          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5708        fi
5709      else
5710        # Otherwise we believe it is a complete path. Use it as it is.
5711        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
5712$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
5713        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
5714$as_echo_n "checking for CP... " >&6; }
5715        if test ! -x "$tool_specified"; then
5716          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5717$as_echo "not found" >&6; }
5718          as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
5719        fi
5720        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5721$as_echo "$tool_specified" >&6; }
5722      fi
5723    fi
5724  fi
5725
5726
5727
5728  if test "x$CP" = x; then
5729    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
5730  fi
5731
5732
5733
5734
5735
5736  # Publish this variable in the help.
5737
5738
5739  if test "x$CUT" = x; then
5740    # The variable is not set by user, try to locate tool using the code snippet
5741    for ac_prog in cut
5742do
5743  # Extract the first word of "$ac_prog", so it can be a program name with args.
5744set dummy $ac_prog; ac_word=$2
5745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5746$as_echo_n "checking for $ac_word... " >&6; }
5747if ${ac_cv_path_CUT+:} false; then :
5748  $as_echo_n "(cached) " >&6
5749else
5750  case $CUT in
5751  [\\/]* | ?:[\\/]*)
5752  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5753  ;;
5754  *)
5755  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5756for as_dir in $PATH
5757do
5758  IFS=$as_save_IFS
5759  test -z "$as_dir" && as_dir=.
5760    for ac_exec_ext in '' $ac_executable_extensions; do
5761  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5762    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5763    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5764    break 2
5765  fi
5766done
5767  done
5768IFS=$as_save_IFS
5769
5770  ;;
5771esac
5772fi
5773CUT=$ac_cv_path_CUT
5774if test -n "$CUT"; then
5775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5776$as_echo "$CUT" >&6; }
5777else
5778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5779$as_echo "no" >&6; }
5780fi
5781
5782
5783  test -n "$CUT" && break
5784done
5785
5786  else
5787    # The variable is set, but is it from the command line or the environment?
5788
5789    # Try to remove the string !CUT! from our list.
5790    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
5791    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5792      # If it failed, the variable was not from the command line. Ignore it,
5793      # but warn the user (except for BASH, which is always set by the calling BASH).
5794      if test "xCUT" != xBASH; then
5795        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
5796$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
5797      fi
5798      # Try to locate tool using the code snippet
5799      for ac_prog in cut
5800do
5801  # Extract the first word of "$ac_prog", so it can be a program name with args.
5802set dummy $ac_prog; ac_word=$2
5803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5804$as_echo_n "checking for $ac_word... " >&6; }
5805if ${ac_cv_path_CUT+:} false; then :
5806  $as_echo_n "(cached) " >&6
5807else
5808  case $CUT in
5809  [\\/]* | ?:[\\/]*)
5810  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5811  ;;
5812  *)
5813  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5814for as_dir in $PATH
5815do
5816  IFS=$as_save_IFS
5817  test -z "$as_dir" && as_dir=.
5818    for ac_exec_ext in '' $ac_executable_extensions; do
5819  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5820    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5821    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5822    break 2
5823  fi
5824done
5825  done
5826IFS=$as_save_IFS
5827
5828  ;;
5829esac
5830fi
5831CUT=$ac_cv_path_CUT
5832if test -n "$CUT"; then
5833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5834$as_echo "$CUT" >&6; }
5835else
5836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5837$as_echo "no" >&6; }
5838fi
5839
5840
5841  test -n "$CUT" && break
5842done
5843
5844    else
5845      # If it succeeded, then it was overridden by the user. We will use it
5846      # for the tool.
5847
5848      # First remove it from the list of overridden variables, so we can test
5849      # for unknown variables in the end.
5850      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5851
5852      # Check if the provided tool contains a complete path.
5853      tool_specified="$CUT"
5854      tool_basename="${tool_specified##*/}"
5855      if test "x$tool_basename" = "x$tool_specified"; then
5856        # A command without a complete path is provided, search $PATH.
5857        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
5858$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
5859        # Extract the first word of "$tool_basename", so it can be a program name with args.
5860set dummy $tool_basename; ac_word=$2
5861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5862$as_echo_n "checking for $ac_word... " >&6; }
5863if ${ac_cv_path_CUT+:} false; then :
5864  $as_echo_n "(cached) " >&6
5865else
5866  case $CUT in
5867  [\\/]* | ?:[\\/]*)
5868  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5869  ;;
5870  *)
5871  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5872for as_dir in $PATH
5873do
5874  IFS=$as_save_IFS
5875  test -z "$as_dir" && as_dir=.
5876    for ac_exec_ext in '' $ac_executable_extensions; do
5877  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5878    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5879    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5880    break 2
5881  fi
5882done
5883  done
5884IFS=$as_save_IFS
5885
5886  ;;
5887esac
5888fi
5889CUT=$ac_cv_path_CUT
5890if test -n "$CUT"; then
5891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5892$as_echo "$CUT" >&6; }
5893else
5894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5895$as_echo "no" >&6; }
5896fi
5897
5898
5899        if test "x$CUT" = x; then
5900          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5901        fi
5902      else
5903        # Otherwise we believe it is a complete path. Use it as it is.
5904        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
5905$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
5906        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
5907$as_echo_n "checking for CUT... " >&6; }
5908        if test ! -x "$tool_specified"; then
5909          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5910$as_echo "not found" >&6; }
5911          as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
5912        fi
5913        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5914$as_echo "$tool_specified" >&6; }
5915      fi
5916    fi
5917  fi
5918
5919
5920
5921  if test "x$CUT" = x; then
5922    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
5923  fi
5924
5925
5926
5927
5928
5929  # Publish this variable in the help.
5930
5931
5932  if test "x$DATE" = x; then
5933    # The variable is not set by user, try to locate tool using the code snippet
5934    for ac_prog in date
5935do
5936  # Extract the first word of "$ac_prog", so it can be a program name with args.
5937set dummy $ac_prog; ac_word=$2
5938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5939$as_echo_n "checking for $ac_word... " >&6; }
5940if ${ac_cv_path_DATE+:} false; then :
5941  $as_echo_n "(cached) " >&6
5942else
5943  case $DATE in
5944  [\\/]* | ?:[\\/]*)
5945  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
5946  ;;
5947  *)
5948  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5949for as_dir in $PATH
5950do
5951  IFS=$as_save_IFS
5952  test -z "$as_dir" && as_dir=.
5953    for ac_exec_ext in '' $ac_executable_extensions; do
5954  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5955    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
5956    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5957    break 2
5958  fi
5959done
5960  done
5961IFS=$as_save_IFS
5962
5963  ;;
5964esac
5965fi
5966DATE=$ac_cv_path_DATE
5967if test -n "$DATE"; then
5968  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
5969$as_echo "$DATE" >&6; }
5970else
5971  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5972$as_echo "no" >&6; }
5973fi
5974
5975
5976  test -n "$DATE" && break
5977done
5978
5979  else
5980    # The variable is set, but is it from the command line or the environment?
5981
5982    # Try to remove the string !DATE! from our list.
5983    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
5984    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5985      # If it failed, the variable was not from the command line. Ignore it,
5986      # but warn the user (except for BASH, which is always set by the calling BASH).
5987      if test "xDATE" != xBASH; then
5988        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
5989$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
5990      fi
5991      # Try to locate tool using the code snippet
5992      for ac_prog in date
5993do
5994  # Extract the first word of "$ac_prog", so it can be a program name with args.
5995set dummy $ac_prog; ac_word=$2
5996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5997$as_echo_n "checking for $ac_word... " >&6; }
5998if ${ac_cv_path_DATE+:} false; then :
5999  $as_echo_n "(cached) " >&6
6000else
6001  case $DATE in
6002  [\\/]* | ?:[\\/]*)
6003  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6004  ;;
6005  *)
6006  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6007for as_dir in $PATH
6008do
6009  IFS=$as_save_IFS
6010  test -z "$as_dir" && as_dir=.
6011    for ac_exec_ext in '' $ac_executable_extensions; do
6012  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6013    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6014    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6015    break 2
6016  fi
6017done
6018  done
6019IFS=$as_save_IFS
6020
6021  ;;
6022esac
6023fi
6024DATE=$ac_cv_path_DATE
6025if test -n "$DATE"; then
6026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6027$as_echo "$DATE" >&6; }
6028else
6029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6030$as_echo "no" >&6; }
6031fi
6032
6033
6034  test -n "$DATE" && break
6035done
6036
6037    else
6038      # If it succeeded, then it was overridden by the user. We will use it
6039      # for the tool.
6040
6041      # First remove it from the list of overridden variables, so we can test
6042      # for unknown variables in the end.
6043      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6044
6045      # Check if the provided tool contains a complete path.
6046      tool_specified="$DATE"
6047      tool_basename="${tool_specified##*/}"
6048      if test "x$tool_basename" = "x$tool_specified"; then
6049        # A command without a complete path is provided, search $PATH.
6050        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6051$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6052        # Extract the first word of "$tool_basename", so it can be a program name with args.
6053set dummy $tool_basename; ac_word=$2
6054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6055$as_echo_n "checking for $ac_word... " >&6; }
6056if ${ac_cv_path_DATE+:} false; then :
6057  $as_echo_n "(cached) " >&6
6058else
6059  case $DATE in
6060  [\\/]* | ?:[\\/]*)
6061  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6062  ;;
6063  *)
6064  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6065for as_dir in $PATH
6066do
6067  IFS=$as_save_IFS
6068  test -z "$as_dir" && as_dir=.
6069    for ac_exec_ext in '' $ac_executable_extensions; do
6070  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6071    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6072    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6073    break 2
6074  fi
6075done
6076  done
6077IFS=$as_save_IFS
6078
6079  ;;
6080esac
6081fi
6082DATE=$ac_cv_path_DATE
6083if test -n "$DATE"; then
6084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6085$as_echo "$DATE" >&6; }
6086else
6087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6088$as_echo "no" >&6; }
6089fi
6090
6091
6092        if test "x$DATE" = x; then
6093          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6094        fi
6095      else
6096        # Otherwise we believe it is a complete path. Use it as it is.
6097        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6098$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6099        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6100$as_echo_n "checking for DATE... " >&6; }
6101        if test ! -x "$tool_specified"; then
6102          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6103$as_echo "not found" >&6; }
6104          as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6105        fi
6106        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6107$as_echo "$tool_specified" >&6; }
6108      fi
6109    fi
6110  fi
6111
6112
6113
6114  if test "x$DATE" = x; then
6115    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6116  fi
6117
6118
6119
6120
6121
6122  # Publish this variable in the help.
6123
6124
6125  if test "x$DIFF" = x; then
6126    # The variable is not set by user, try to locate tool using the code snippet
6127    for ac_prog in gdiff diff
6128do
6129  # Extract the first word of "$ac_prog", so it can be a program name with args.
6130set dummy $ac_prog; ac_word=$2
6131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6132$as_echo_n "checking for $ac_word... " >&6; }
6133if ${ac_cv_path_DIFF+:} false; then :
6134  $as_echo_n "(cached) " >&6
6135else
6136  case $DIFF in
6137  [\\/]* | ?:[\\/]*)
6138  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6139  ;;
6140  *)
6141  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6142for as_dir in $PATH
6143do
6144  IFS=$as_save_IFS
6145  test -z "$as_dir" && as_dir=.
6146    for ac_exec_ext in '' $ac_executable_extensions; do
6147  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6148    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6149    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6150    break 2
6151  fi
6152done
6153  done
6154IFS=$as_save_IFS
6155
6156  ;;
6157esac
6158fi
6159DIFF=$ac_cv_path_DIFF
6160if test -n "$DIFF"; then
6161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6162$as_echo "$DIFF" >&6; }
6163else
6164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6165$as_echo "no" >&6; }
6166fi
6167
6168
6169  test -n "$DIFF" && break
6170done
6171
6172  else
6173    # The variable is set, but is it from the command line or the environment?
6174
6175    # Try to remove the string !DIFF! from our list.
6176    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6177    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6178      # If it failed, the variable was not from the command line. Ignore it,
6179      # but warn the user (except for BASH, which is always set by the calling BASH).
6180      if test "xDIFF" != xBASH; then
6181        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6182$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6183      fi
6184      # Try to locate tool using the code snippet
6185      for ac_prog in gdiff diff
6186do
6187  # Extract the first word of "$ac_prog", so it can be a program name with args.
6188set dummy $ac_prog; ac_word=$2
6189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6190$as_echo_n "checking for $ac_word... " >&6; }
6191if ${ac_cv_path_DIFF+:} false; then :
6192  $as_echo_n "(cached) " >&6
6193else
6194  case $DIFF in
6195  [\\/]* | ?:[\\/]*)
6196  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6197  ;;
6198  *)
6199  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6200for as_dir in $PATH
6201do
6202  IFS=$as_save_IFS
6203  test -z "$as_dir" && as_dir=.
6204    for ac_exec_ext in '' $ac_executable_extensions; do
6205  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6206    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6207    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6208    break 2
6209  fi
6210done
6211  done
6212IFS=$as_save_IFS
6213
6214  ;;
6215esac
6216fi
6217DIFF=$ac_cv_path_DIFF
6218if test -n "$DIFF"; then
6219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6220$as_echo "$DIFF" >&6; }
6221else
6222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6223$as_echo "no" >&6; }
6224fi
6225
6226
6227  test -n "$DIFF" && break
6228done
6229
6230    else
6231      # If it succeeded, then it was overridden by the user. We will use it
6232      # for the tool.
6233
6234      # First remove it from the list of overridden variables, so we can test
6235      # for unknown variables in the end.
6236      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6237
6238      # Check if the provided tool contains a complete path.
6239      tool_specified="$DIFF"
6240      tool_basename="${tool_specified##*/}"
6241      if test "x$tool_basename" = "x$tool_specified"; then
6242        # A command without a complete path is provided, search $PATH.
6243        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6244$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6245        # Extract the first word of "$tool_basename", so it can be a program name with args.
6246set dummy $tool_basename; ac_word=$2
6247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6248$as_echo_n "checking for $ac_word... " >&6; }
6249if ${ac_cv_path_DIFF+:} false; then :
6250  $as_echo_n "(cached) " >&6
6251else
6252  case $DIFF in
6253  [\\/]* | ?:[\\/]*)
6254  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6255  ;;
6256  *)
6257  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6258for as_dir in $PATH
6259do
6260  IFS=$as_save_IFS
6261  test -z "$as_dir" && as_dir=.
6262    for ac_exec_ext in '' $ac_executable_extensions; do
6263  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6264    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6265    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6266    break 2
6267  fi
6268done
6269  done
6270IFS=$as_save_IFS
6271
6272  ;;
6273esac
6274fi
6275DIFF=$ac_cv_path_DIFF
6276if test -n "$DIFF"; then
6277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6278$as_echo "$DIFF" >&6; }
6279else
6280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6281$as_echo "no" >&6; }
6282fi
6283
6284
6285        if test "x$DIFF" = x; then
6286          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6287        fi
6288      else
6289        # Otherwise we believe it is a complete path. Use it as it is.
6290        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6291$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6292        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6293$as_echo_n "checking for DIFF... " >&6; }
6294        if test ! -x "$tool_specified"; then
6295          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6296$as_echo "not found" >&6; }
6297          as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6298        fi
6299        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6300$as_echo "$tool_specified" >&6; }
6301      fi
6302    fi
6303  fi
6304
6305
6306
6307  if test "x$DIFF" = x; then
6308    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6309  fi
6310
6311
6312
6313
6314
6315  # Publish this variable in the help.
6316
6317
6318  if test "x$DIRNAME" = x; then
6319    # The variable is not set by user, try to locate tool using the code snippet
6320    for ac_prog in dirname
6321do
6322  # Extract the first word of "$ac_prog", so it can be a program name with args.
6323set dummy $ac_prog; ac_word=$2
6324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6325$as_echo_n "checking for $ac_word... " >&6; }
6326if ${ac_cv_path_DIRNAME+:} false; then :
6327  $as_echo_n "(cached) " >&6
6328else
6329  case $DIRNAME in
6330  [\\/]* | ?:[\\/]*)
6331  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6332  ;;
6333  *)
6334  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6335for as_dir in $PATH
6336do
6337  IFS=$as_save_IFS
6338  test -z "$as_dir" && as_dir=.
6339    for ac_exec_ext in '' $ac_executable_extensions; do
6340  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6341    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6342    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6343    break 2
6344  fi
6345done
6346  done
6347IFS=$as_save_IFS
6348
6349  ;;
6350esac
6351fi
6352DIRNAME=$ac_cv_path_DIRNAME
6353if test -n "$DIRNAME"; then
6354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6355$as_echo "$DIRNAME" >&6; }
6356else
6357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6358$as_echo "no" >&6; }
6359fi
6360
6361
6362  test -n "$DIRNAME" && break
6363done
6364
6365  else
6366    # The variable is set, but is it from the command line or the environment?
6367
6368    # Try to remove the string !DIRNAME! from our list.
6369    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6370    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6371      # If it failed, the variable was not from the command line. Ignore it,
6372      # but warn the user (except for BASH, which is always set by the calling BASH).
6373      if test "xDIRNAME" != xBASH; then
6374        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6375$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6376      fi
6377      # Try to locate tool using the code snippet
6378      for ac_prog in dirname
6379do
6380  # Extract the first word of "$ac_prog", so it can be a program name with args.
6381set dummy $ac_prog; ac_word=$2
6382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6383$as_echo_n "checking for $ac_word... " >&6; }
6384if ${ac_cv_path_DIRNAME+:} false; then :
6385  $as_echo_n "(cached) " >&6
6386else
6387  case $DIRNAME in
6388  [\\/]* | ?:[\\/]*)
6389  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6390  ;;
6391  *)
6392  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6393for as_dir in $PATH
6394do
6395  IFS=$as_save_IFS
6396  test -z "$as_dir" && as_dir=.
6397    for ac_exec_ext in '' $ac_executable_extensions; do
6398  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6399    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6400    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6401    break 2
6402  fi
6403done
6404  done
6405IFS=$as_save_IFS
6406
6407  ;;
6408esac
6409fi
6410DIRNAME=$ac_cv_path_DIRNAME
6411if test -n "$DIRNAME"; then
6412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6413$as_echo "$DIRNAME" >&6; }
6414else
6415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6416$as_echo "no" >&6; }
6417fi
6418
6419
6420  test -n "$DIRNAME" && break
6421done
6422
6423    else
6424      # If it succeeded, then it was overridden by the user. We will use it
6425      # for the tool.
6426
6427      # First remove it from the list of overridden variables, so we can test
6428      # for unknown variables in the end.
6429      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6430
6431      # Check if the provided tool contains a complete path.
6432      tool_specified="$DIRNAME"
6433      tool_basename="${tool_specified##*/}"
6434      if test "x$tool_basename" = "x$tool_specified"; then
6435        # A command without a complete path is provided, search $PATH.
6436        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
6437$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
6438        # Extract the first word of "$tool_basename", so it can be a program name with args.
6439set dummy $tool_basename; ac_word=$2
6440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6441$as_echo_n "checking for $ac_word... " >&6; }
6442if ${ac_cv_path_DIRNAME+:} false; then :
6443  $as_echo_n "(cached) " >&6
6444else
6445  case $DIRNAME in
6446  [\\/]* | ?:[\\/]*)
6447  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6448  ;;
6449  *)
6450  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6451for as_dir in $PATH
6452do
6453  IFS=$as_save_IFS
6454  test -z "$as_dir" && as_dir=.
6455    for ac_exec_ext in '' $ac_executable_extensions; do
6456  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6457    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6458    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6459    break 2
6460  fi
6461done
6462  done
6463IFS=$as_save_IFS
6464
6465  ;;
6466esac
6467fi
6468DIRNAME=$ac_cv_path_DIRNAME
6469if test -n "$DIRNAME"; then
6470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6471$as_echo "$DIRNAME" >&6; }
6472else
6473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6474$as_echo "no" >&6; }
6475fi
6476
6477
6478        if test "x$DIRNAME" = x; then
6479          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6480        fi
6481      else
6482        # Otherwise we believe it is a complete path. Use it as it is.
6483        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
6484$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
6485        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6486$as_echo_n "checking for DIRNAME... " >&6; }
6487        if test ! -x "$tool_specified"; then
6488          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6489$as_echo "not found" >&6; }
6490          as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
6491        fi
6492        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6493$as_echo "$tool_specified" >&6; }
6494      fi
6495    fi
6496  fi
6497
6498
6499
6500  if test "x$DIRNAME" = x; then
6501    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
6502  fi
6503
6504
6505
6506
6507
6508  # Publish this variable in the help.
6509
6510
6511  if test "x$ECHO" = x; then
6512    # The variable is not set by user, try to locate tool using the code snippet
6513    for ac_prog in echo
6514do
6515  # Extract the first word of "$ac_prog", so it can be a program name with args.
6516set dummy $ac_prog; ac_word=$2
6517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6518$as_echo_n "checking for $ac_word... " >&6; }
6519if ${ac_cv_path_ECHO+:} false; then :
6520  $as_echo_n "(cached) " >&6
6521else
6522  case $ECHO in
6523  [\\/]* | ?:[\\/]*)
6524  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6525  ;;
6526  *)
6527  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6528for as_dir in $PATH
6529do
6530  IFS=$as_save_IFS
6531  test -z "$as_dir" && as_dir=.
6532    for ac_exec_ext in '' $ac_executable_extensions; do
6533  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6534    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6535    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6536    break 2
6537  fi
6538done
6539  done
6540IFS=$as_save_IFS
6541
6542  ;;
6543esac
6544fi
6545ECHO=$ac_cv_path_ECHO
6546if test -n "$ECHO"; then
6547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6548$as_echo "$ECHO" >&6; }
6549else
6550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6551$as_echo "no" >&6; }
6552fi
6553
6554
6555  test -n "$ECHO" && break
6556done
6557
6558  else
6559    # The variable is set, but is it from the command line or the environment?
6560
6561    # Try to remove the string !ECHO! from our list.
6562    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
6563    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6564      # If it failed, the variable was not from the command line. Ignore it,
6565      # but warn the user (except for BASH, which is always set by the calling BASH).
6566      if test "xECHO" != xBASH; then
6567        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
6568$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
6569      fi
6570      # Try to locate tool using the code snippet
6571      for ac_prog in echo
6572do
6573  # Extract the first word of "$ac_prog", so it can be a program name with args.
6574set dummy $ac_prog; ac_word=$2
6575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6576$as_echo_n "checking for $ac_word... " >&6; }
6577if ${ac_cv_path_ECHO+:} false; then :
6578  $as_echo_n "(cached) " >&6
6579else
6580  case $ECHO in
6581  [\\/]* | ?:[\\/]*)
6582  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6583  ;;
6584  *)
6585  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6586for as_dir in $PATH
6587do
6588  IFS=$as_save_IFS
6589  test -z "$as_dir" && as_dir=.
6590    for ac_exec_ext in '' $ac_executable_extensions; do
6591  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6592    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6593    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6594    break 2
6595  fi
6596done
6597  done
6598IFS=$as_save_IFS
6599
6600  ;;
6601esac
6602fi
6603ECHO=$ac_cv_path_ECHO
6604if test -n "$ECHO"; then
6605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6606$as_echo "$ECHO" >&6; }
6607else
6608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6609$as_echo "no" >&6; }
6610fi
6611
6612
6613  test -n "$ECHO" && break
6614done
6615
6616    else
6617      # If it succeeded, then it was overridden by the user. We will use it
6618      # for the tool.
6619
6620      # First remove it from the list of overridden variables, so we can test
6621      # for unknown variables in the end.
6622      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6623
6624      # Check if the provided tool contains a complete path.
6625      tool_specified="$ECHO"
6626      tool_basename="${tool_specified##*/}"
6627      if test "x$tool_basename" = "x$tool_specified"; then
6628        # A command without a complete path is provided, search $PATH.
6629        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
6630$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
6631        # Extract the first word of "$tool_basename", so it can be a program name with args.
6632set dummy $tool_basename; ac_word=$2
6633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6634$as_echo_n "checking for $ac_word... " >&6; }
6635if ${ac_cv_path_ECHO+:} false; then :
6636  $as_echo_n "(cached) " >&6
6637else
6638  case $ECHO in
6639  [\\/]* | ?:[\\/]*)
6640  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6641  ;;
6642  *)
6643  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6644for as_dir in $PATH
6645do
6646  IFS=$as_save_IFS
6647  test -z "$as_dir" && as_dir=.
6648    for ac_exec_ext in '' $ac_executable_extensions; do
6649  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6650    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6651    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6652    break 2
6653  fi
6654done
6655  done
6656IFS=$as_save_IFS
6657
6658  ;;
6659esac
6660fi
6661ECHO=$ac_cv_path_ECHO
6662if test -n "$ECHO"; then
6663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6664$as_echo "$ECHO" >&6; }
6665else
6666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6667$as_echo "no" >&6; }
6668fi
6669
6670
6671        if test "x$ECHO" = x; then
6672          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6673        fi
6674      else
6675        # Otherwise we believe it is a complete path. Use it as it is.
6676        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
6677$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
6678        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
6679$as_echo_n "checking for ECHO... " >&6; }
6680        if test ! -x "$tool_specified"; then
6681          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6682$as_echo "not found" >&6; }
6683          as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
6684        fi
6685        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6686$as_echo "$tool_specified" >&6; }
6687      fi
6688    fi
6689  fi
6690
6691
6692
6693  if test "x$ECHO" = x; then
6694    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
6695  fi
6696
6697
6698
6699
6700
6701  # Publish this variable in the help.
6702
6703
6704  if test "x$EXPR" = x; then
6705    # The variable is not set by user, try to locate tool using the code snippet
6706    for ac_prog in expr
6707do
6708  # Extract the first word of "$ac_prog", so it can be a program name with args.
6709set dummy $ac_prog; ac_word=$2
6710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6711$as_echo_n "checking for $ac_word... " >&6; }
6712if ${ac_cv_path_EXPR+:} false; then :
6713  $as_echo_n "(cached) " >&6
6714else
6715  case $EXPR in
6716  [\\/]* | ?:[\\/]*)
6717  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6718  ;;
6719  *)
6720  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6721for as_dir in $PATH
6722do
6723  IFS=$as_save_IFS
6724  test -z "$as_dir" && as_dir=.
6725    for ac_exec_ext in '' $ac_executable_extensions; do
6726  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6727    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6728    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6729    break 2
6730  fi
6731done
6732  done
6733IFS=$as_save_IFS
6734
6735  ;;
6736esac
6737fi
6738EXPR=$ac_cv_path_EXPR
6739if test -n "$EXPR"; then
6740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6741$as_echo "$EXPR" >&6; }
6742else
6743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6744$as_echo "no" >&6; }
6745fi
6746
6747
6748  test -n "$EXPR" && break
6749done
6750
6751  else
6752    # The variable is set, but is it from the command line or the environment?
6753
6754    # Try to remove the string !EXPR! from our list.
6755    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
6756    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6757      # If it failed, the variable was not from the command line. Ignore it,
6758      # but warn the user (except for BASH, which is always set by the calling BASH).
6759      if test "xEXPR" != xBASH; then
6760        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
6761$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
6762      fi
6763      # Try to locate tool using the code snippet
6764      for ac_prog in expr
6765do
6766  # Extract the first word of "$ac_prog", so it can be a program name with args.
6767set dummy $ac_prog; ac_word=$2
6768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6769$as_echo_n "checking for $ac_word... " >&6; }
6770if ${ac_cv_path_EXPR+:} false; then :
6771  $as_echo_n "(cached) " >&6
6772else
6773  case $EXPR in
6774  [\\/]* | ?:[\\/]*)
6775  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6776  ;;
6777  *)
6778  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6779for as_dir in $PATH
6780do
6781  IFS=$as_save_IFS
6782  test -z "$as_dir" && as_dir=.
6783    for ac_exec_ext in '' $ac_executable_extensions; do
6784  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6785    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6786    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6787    break 2
6788  fi
6789done
6790  done
6791IFS=$as_save_IFS
6792
6793  ;;
6794esac
6795fi
6796EXPR=$ac_cv_path_EXPR
6797if test -n "$EXPR"; then
6798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6799$as_echo "$EXPR" >&6; }
6800else
6801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6802$as_echo "no" >&6; }
6803fi
6804
6805
6806  test -n "$EXPR" && break
6807done
6808
6809    else
6810      # If it succeeded, then it was overridden by the user. We will use it
6811      # for the tool.
6812
6813      # First remove it from the list of overridden variables, so we can test
6814      # for unknown variables in the end.
6815      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6816
6817      # Check if the provided tool contains a complete path.
6818      tool_specified="$EXPR"
6819      tool_basename="${tool_specified##*/}"
6820      if test "x$tool_basename" = "x$tool_specified"; then
6821        # A command without a complete path is provided, search $PATH.
6822        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
6823$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
6824        # Extract the first word of "$tool_basename", so it can be a program name with args.
6825set dummy $tool_basename; ac_word=$2
6826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6827$as_echo_n "checking for $ac_word... " >&6; }
6828if ${ac_cv_path_EXPR+:} false; then :
6829  $as_echo_n "(cached) " >&6
6830else
6831  case $EXPR in
6832  [\\/]* | ?:[\\/]*)
6833  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6834  ;;
6835  *)
6836  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6837for as_dir in $PATH
6838do
6839  IFS=$as_save_IFS
6840  test -z "$as_dir" && as_dir=.
6841    for ac_exec_ext in '' $ac_executable_extensions; do
6842  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6843    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6844    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6845    break 2
6846  fi
6847done
6848  done
6849IFS=$as_save_IFS
6850
6851  ;;
6852esac
6853fi
6854EXPR=$ac_cv_path_EXPR
6855if test -n "$EXPR"; then
6856  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6857$as_echo "$EXPR" >&6; }
6858else
6859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6860$as_echo "no" >&6; }
6861fi
6862
6863
6864        if test "x$EXPR" = x; then
6865          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6866        fi
6867      else
6868        # Otherwise we believe it is a complete path. Use it as it is.
6869        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
6870$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
6871        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
6872$as_echo_n "checking for EXPR... " >&6; }
6873        if test ! -x "$tool_specified"; then
6874          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6875$as_echo "not found" >&6; }
6876          as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
6877        fi
6878        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6879$as_echo "$tool_specified" >&6; }
6880      fi
6881    fi
6882  fi
6883
6884
6885
6886  if test "x$EXPR" = x; then
6887    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
6888  fi
6889
6890
6891
6892
6893
6894  # Publish this variable in the help.
6895
6896
6897  if test "x$FILE" = x; then
6898    # The variable is not set by user, try to locate tool using the code snippet
6899    for ac_prog in file
6900do
6901  # Extract the first word of "$ac_prog", so it can be a program name with args.
6902set dummy $ac_prog; ac_word=$2
6903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6904$as_echo_n "checking for $ac_word... " >&6; }
6905if ${ac_cv_path_FILE+:} false; then :
6906  $as_echo_n "(cached) " >&6
6907else
6908  case $FILE in
6909  [\\/]* | ?:[\\/]*)
6910  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
6911  ;;
6912  *)
6913  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6914for as_dir in $PATH
6915do
6916  IFS=$as_save_IFS
6917  test -z "$as_dir" && as_dir=.
6918    for ac_exec_ext in '' $ac_executable_extensions; do
6919  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6920    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
6921    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6922    break 2
6923  fi
6924done
6925  done
6926IFS=$as_save_IFS
6927
6928  ;;
6929esac
6930fi
6931FILE=$ac_cv_path_FILE
6932if test -n "$FILE"; then
6933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
6934$as_echo "$FILE" >&6; }
6935else
6936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6937$as_echo "no" >&6; }
6938fi
6939
6940
6941  test -n "$FILE" && break
6942done
6943
6944  else
6945    # The variable is set, but is it from the command line or the environment?
6946
6947    # Try to remove the string !FILE! from our list.
6948    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
6949    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6950      # If it failed, the variable was not from the command line. Ignore it,
6951      # but warn the user (except for BASH, which is always set by the calling BASH).
6952      if test "xFILE" != xBASH; then
6953        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
6954$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
6955      fi
6956      # Try to locate tool using the code snippet
6957      for ac_prog in file
6958do
6959  # Extract the first word of "$ac_prog", so it can be a program name with args.
6960set dummy $ac_prog; ac_word=$2
6961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6962$as_echo_n "checking for $ac_word... " >&6; }
6963if ${ac_cv_path_FILE+:} false; then :
6964  $as_echo_n "(cached) " >&6
6965else
6966  case $FILE in
6967  [\\/]* | ?:[\\/]*)
6968  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
6969  ;;
6970  *)
6971  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6972for as_dir in $PATH
6973do
6974  IFS=$as_save_IFS
6975  test -z "$as_dir" && as_dir=.
6976    for ac_exec_ext in '' $ac_executable_extensions; do
6977  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6978    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
6979    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6980    break 2
6981  fi
6982done
6983  done
6984IFS=$as_save_IFS
6985
6986  ;;
6987esac
6988fi
6989FILE=$ac_cv_path_FILE
6990if test -n "$FILE"; then
6991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
6992$as_echo "$FILE" >&6; }
6993else
6994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6995$as_echo "no" >&6; }
6996fi
6997
6998
6999  test -n "$FILE" && break
7000done
7001
7002    else
7003      # If it succeeded, then it was overridden by the user. We will use it
7004      # for the tool.
7005
7006      # First remove it from the list of overridden variables, so we can test
7007      # for unknown variables in the end.
7008      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7009
7010      # Check if the provided tool contains a complete path.
7011      tool_specified="$FILE"
7012      tool_basename="${tool_specified##*/}"
7013      if test "x$tool_basename" = "x$tool_specified"; then
7014        # A command without a complete path is provided, search $PATH.
7015        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7016$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7017        # Extract the first word of "$tool_basename", so it can be a program name with args.
7018set dummy $tool_basename; ac_word=$2
7019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7020$as_echo_n "checking for $ac_word... " >&6; }
7021if ${ac_cv_path_FILE+:} false; then :
7022  $as_echo_n "(cached) " >&6
7023else
7024  case $FILE in
7025  [\\/]* | ?:[\\/]*)
7026  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7027  ;;
7028  *)
7029  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7030for as_dir in $PATH
7031do
7032  IFS=$as_save_IFS
7033  test -z "$as_dir" && as_dir=.
7034    for ac_exec_ext in '' $ac_executable_extensions; do
7035  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7036    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7037    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7038    break 2
7039  fi
7040done
7041  done
7042IFS=$as_save_IFS
7043
7044  ;;
7045esac
7046fi
7047FILE=$ac_cv_path_FILE
7048if test -n "$FILE"; then
7049  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7050$as_echo "$FILE" >&6; }
7051else
7052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7053$as_echo "no" >&6; }
7054fi
7055
7056
7057        if test "x$FILE" = x; then
7058          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7059        fi
7060      else
7061        # Otherwise we believe it is a complete path. Use it as it is.
7062        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7063$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7064        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7065$as_echo_n "checking for FILE... " >&6; }
7066        if test ! -x "$tool_specified"; then
7067          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7068$as_echo "not found" >&6; }
7069          as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7070        fi
7071        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7072$as_echo "$tool_specified" >&6; }
7073      fi
7074    fi
7075  fi
7076
7077
7078
7079  if test "x$FILE" = x; then
7080    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7081  fi
7082
7083
7084
7085
7086
7087  # Publish this variable in the help.
7088
7089
7090  if test "x$FIND" = x; then
7091    # The variable is not set by user, try to locate tool using the code snippet
7092    for ac_prog in find
7093do
7094  # Extract the first word of "$ac_prog", so it can be a program name with args.
7095set dummy $ac_prog; ac_word=$2
7096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7097$as_echo_n "checking for $ac_word... " >&6; }
7098if ${ac_cv_path_FIND+:} false; then :
7099  $as_echo_n "(cached) " >&6
7100else
7101  case $FIND in
7102  [\\/]* | ?:[\\/]*)
7103  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7104  ;;
7105  *)
7106  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7107for as_dir in $PATH
7108do
7109  IFS=$as_save_IFS
7110  test -z "$as_dir" && as_dir=.
7111    for ac_exec_ext in '' $ac_executable_extensions; do
7112  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7113    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7114    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7115    break 2
7116  fi
7117done
7118  done
7119IFS=$as_save_IFS
7120
7121  ;;
7122esac
7123fi
7124FIND=$ac_cv_path_FIND
7125if test -n "$FIND"; then
7126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7127$as_echo "$FIND" >&6; }
7128else
7129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7130$as_echo "no" >&6; }
7131fi
7132
7133
7134  test -n "$FIND" && break
7135done
7136
7137  else
7138    # The variable is set, but is it from the command line or the environment?
7139
7140    # Try to remove the string !FIND! from our list.
7141    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7142    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7143      # If it failed, the variable was not from the command line. Ignore it,
7144      # but warn the user (except for BASH, which is always set by the calling BASH).
7145      if test "xFIND" != xBASH; then
7146        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7147$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7148      fi
7149      # Try to locate tool using the code snippet
7150      for ac_prog in find
7151do
7152  # Extract the first word of "$ac_prog", so it can be a program name with args.
7153set dummy $ac_prog; ac_word=$2
7154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7155$as_echo_n "checking for $ac_word... " >&6; }
7156if ${ac_cv_path_FIND+:} false; then :
7157  $as_echo_n "(cached) " >&6
7158else
7159  case $FIND in
7160  [\\/]* | ?:[\\/]*)
7161  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7162  ;;
7163  *)
7164  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7165for as_dir in $PATH
7166do
7167  IFS=$as_save_IFS
7168  test -z "$as_dir" && as_dir=.
7169    for ac_exec_ext in '' $ac_executable_extensions; do
7170  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7171    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7172    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7173    break 2
7174  fi
7175done
7176  done
7177IFS=$as_save_IFS
7178
7179  ;;
7180esac
7181fi
7182FIND=$ac_cv_path_FIND
7183if test -n "$FIND"; then
7184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7185$as_echo "$FIND" >&6; }
7186else
7187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7188$as_echo "no" >&6; }
7189fi
7190
7191
7192  test -n "$FIND" && break
7193done
7194
7195    else
7196      # If it succeeded, then it was overridden by the user. We will use it
7197      # for the tool.
7198
7199      # First remove it from the list of overridden variables, so we can test
7200      # for unknown variables in the end.
7201      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7202
7203      # Check if the provided tool contains a complete path.
7204      tool_specified="$FIND"
7205      tool_basename="${tool_specified##*/}"
7206      if test "x$tool_basename" = "x$tool_specified"; then
7207        # A command without a complete path is provided, search $PATH.
7208        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7209$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7210        # Extract the first word of "$tool_basename", so it can be a program name with args.
7211set dummy $tool_basename; ac_word=$2
7212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7213$as_echo_n "checking for $ac_word... " >&6; }
7214if ${ac_cv_path_FIND+:} false; then :
7215  $as_echo_n "(cached) " >&6
7216else
7217  case $FIND in
7218  [\\/]* | ?:[\\/]*)
7219  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7220  ;;
7221  *)
7222  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7223for as_dir in $PATH
7224do
7225  IFS=$as_save_IFS
7226  test -z "$as_dir" && as_dir=.
7227    for ac_exec_ext in '' $ac_executable_extensions; do
7228  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7229    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7230    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7231    break 2
7232  fi
7233done
7234  done
7235IFS=$as_save_IFS
7236
7237  ;;
7238esac
7239fi
7240FIND=$ac_cv_path_FIND
7241if test -n "$FIND"; then
7242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7243$as_echo "$FIND" >&6; }
7244else
7245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7246$as_echo "no" >&6; }
7247fi
7248
7249
7250        if test "x$FIND" = x; then
7251          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7252        fi
7253      else
7254        # Otherwise we believe it is a complete path. Use it as it is.
7255        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7256$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7257        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7258$as_echo_n "checking for FIND... " >&6; }
7259        if test ! -x "$tool_specified"; then
7260          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7261$as_echo "not found" >&6; }
7262          as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7263        fi
7264        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7265$as_echo "$tool_specified" >&6; }
7266      fi
7267    fi
7268  fi
7269
7270
7271
7272  if test "x$FIND" = x; then
7273    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7274  fi
7275
7276
7277
7278
7279
7280  # Publish this variable in the help.
7281
7282
7283  if test "x$HEAD" = x; then
7284    # The variable is not set by user, try to locate tool using the code snippet
7285    for ac_prog in head
7286do
7287  # Extract the first word of "$ac_prog", so it can be a program name with args.
7288set dummy $ac_prog; ac_word=$2
7289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7290$as_echo_n "checking for $ac_word... " >&6; }
7291if ${ac_cv_path_HEAD+:} false; then :
7292  $as_echo_n "(cached) " >&6
7293else
7294  case $HEAD in
7295  [\\/]* | ?:[\\/]*)
7296  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7297  ;;
7298  *)
7299  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7300for as_dir in $PATH
7301do
7302  IFS=$as_save_IFS
7303  test -z "$as_dir" && as_dir=.
7304    for ac_exec_ext in '' $ac_executable_extensions; do
7305  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7306    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7307    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7308    break 2
7309  fi
7310done
7311  done
7312IFS=$as_save_IFS
7313
7314  ;;
7315esac
7316fi
7317HEAD=$ac_cv_path_HEAD
7318if test -n "$HEAD"; then
7319  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7320$as_echo "$HEAD" >&6; }
7321else
7322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7323$as_echo "no" >&6; }
7324fi
7325
7326
7327  test -n "$HEAD" && break
7328done
7329
7330  else
7331    # The variable is set, but is it from the command line or the environment?
7332
7333    # Try to remove the string !HEAD! from our list.
7334    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
7335    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7336      # If it failed, the variable was not from the command line. Ignore it,
7337      # but warn the user (except for BASH, which is always set by the calling BASH).
7338      if test "xHEAD" != xBASH; then
7339        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
7340$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
7341      fi
7342      # Try to locate tool using the code snippet
7343      for ac_prog in head
7344do
7345  # Extract the first word of "$ac_prog", so it can be a program name with args.
7346set dummy $ac_prog; ac_word=$2
7347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7348$as_echo_n "checking for $ac_word... " >&6; }
7349if ${ac_cv_path_HEAD+:} false; then :
7350  $as_echo_n "(cached) " >&6
7351else
7352  case $HEAD in
7353  [\\/]* | ?:[\\/]*)
7354  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7355  ;;
7356  *)
7357  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7358for as_dir in $PATH
7359do
7360  IFS=$as_save_IFS
7361  test -z "$as_dir" && as_dir=.
7362    for ac_exec_ext in '' $ac_executable_extensions; do
7363  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7364    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7365    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7366    break 2
7367  fi
7368done
7369  done
7370IFS=$as_save_IFS
7371
7372  ;;
7373esac
7374fi
7375HEAD=$ac_cv_path_HEAD
7376if test -n "$HEAD"; then
7377  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7378$as_echo "$HEAD" >&6; }
7379else
7380  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7381$as_echo "no" >&6; }
7382fi
7383
7384
7385  test -n "$HEAD" && break
7386done
7387
7388    else
7389      # If it succeeded, then it was overridden by the user. We will use it
7390      # for the tool.
7391
7392      # First remove it from the list of overridden variables, so we can test
7393      # for unknown variables in the end.
7394      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7395
7396      # Check if the provided tool contains a complete path.
7397      tool_specified="$HEAD"
7398      tool_basename="${tool_specified##*/}"
7399      if test "x$tool_basename" = "x$tool_specified"; then
7400        # A command without a complete path is provided, search $PATH.
7401        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
7402$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
7403        # Extract the first word of "$tool_basename", so it can be a program name with args.
7404set dummy $tool_basename; ac_word=$2
7405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7406$as_echo_n "checking for $ac_word... " >&6; }
7407if ${ac_cv_path_HEAD+:} false; then :
7408  $as_echo_n "(cached) " >&6
7409else
7410  case $HEAD in
7411  [\\/]* | ?:[\\/]*)
7412  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7413  ;;
7414  *)
7415  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7416for as_dir in $PATH
7417do
7418  IFS=$as_save_IFS
7419  test -z "$as_dir" && as_dir=.
7420    for ac_exec_ext in '' $ac_executable_extensions; do
7421  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7422    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7423    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7424    break 2
7425  fi
7426done
7427  done
7428IFS=$as_save_IFS
7429
7430  ;;
7431esac
7432fi
7433HEAD=$ac_cv_path_HEAD
7434if test -n "$HEAD"; then
7435  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7436$as_echo "$HEAD" >&6; }
7437else
7438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7439$as_echo "no" >&6; }
7440fi
7441
7442
7443        if test "x$HEAD" = x; then
7444          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7445        fi
7446      else
7447        # Otherwise we believe it is a complete path. Use it as it is.
7448        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
7449$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
7450        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7451$as_echo_n "checking for HEAD... " >&6; }
7452        if test ! -x "$tool_specified"; then
7453          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7454$as_echo "not found" >&6; }
7455          as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
7456        fi
7457        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7458$as_echo "$tool_specified" >&6; }
7459      fi
7460    fi
7461  fi
7462
7463
7464
7465  if test "x$HEAD" = x; then
7466    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
7467  fi
7468
7469
7470
7471
7472
7473  # Publish this variable in the help.
7474
7475
7476  if test "x$LN" = x; then
7477    # The variable is not set by user, try to locate tool using the code snippet
7478    for ac_prog in ln
7479do
7480  # Extract the first word of "$ac_prog", so it can be a program name with args.
7481set dummy $ac_prog; ac_word=$2
7482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7483$as_echo_n "checking for $ac_word... " >&6; }
7484if ${ac_cv_path_LN+:} false; then :
7485  $as_echo_n "(cached) " >&6
7486else
7487  case $LN in
7488  [\\/]* | ?:[\\/]*)
7489  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7490  ;;
7491  *)
7492  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7493for as_dir in $PATH
7494do
7495  IFS=$as_save_IFS
7496  test -z "$as_dir" && as_dir=.
7497    for ac_exec_ext in '' $ac_executable_extensions; do
7498  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7499    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7500    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7501    break 2
7502  fi
7503done
7504  done
7505IFS=$as_save_IFS
7506
7507  ;;
7508esac
7509fi
7510LN=$ac_cv_path_LN
7511if test -n "$LN"; then
7512  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7513$as_echo "$LN" >&6; }
7514else
7515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7516$as_echo "no" >&6; }
7517fi
7518
7519
7520  test -n "$LN" && break
7521done
7522
7523  else
7524    # The variable is set, but is it from the command line or the environment?
7525
7526    # Try to remove the string !LN! from our list.
7527    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
7528    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7529      # If it failed, the variable was not from the command line. Ignore it,
7530      # but warn the user (except for BASH, which is always set by the calling BASH).
7531      if test "xLN" != xBASH; then
7532        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
7533$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
7534      fi
7535      # Try to locate tool using the code snippet
7536      for ac_prog in ln
7537do
7538  # Extract the first word of "$ac_prog", so it can be a program name with args.
7539set dummy $ac_prog; ac_word=$2
7540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7541$as_echo_n "checking for $ac_word... " >&6; }
7542if ${ac_cv_path_LN+:} false; then :
7543  $as_echo_n "(cached) " >&6
7544else
7545  case $LN in
7546  [\\/]* | ?:[\\/]*)
7547  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7548  ;;
7549  *)
7550  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7551for as_dir in $PATH
7552do
7553  IFS=$as_save_IFS
7554  test -z "$as_dir" && as_dir=.
7555    for ac_exec_ext in '' $ac_executable_extensions; do
7556  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7557    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7558    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7559    break 2
7560  fi
7561done
7562  done
7563IFS=$as_save_IFS
7564
7565  ;;
7566esac
7567fi
7568LN=$ac_cv_path_LN
7569if test -n "$LN"; then
7570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7571$as_echo "$LN" >&6; }
7572else
7573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7574$as_echo "no" >&6; }
7575fi
7576
7577
7578  test -n "$LN" && break
7579done
7580
7581    else
7582      # If it succeeded, then it was overridden by the user. We will use it
7583      # for the tool.
7584
7585      # First remove it from the list of overridden variables, so we can test
7586      # for unknown variables in the end.
7587      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7588
7589      # Check if the provided tool contains a complete path.
7590      tool_specified="$LN"
7591      tool_basename="${tool_specified##*/}"
7592      if test "x$tool_basename" = "x$tool_specified"; then
7593        # A command without a complete path is provided, search $PATH.
7594        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
7595$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
7596        # Extract the first word of "$tool_basename", so it can be a program name with args.
7597set dummy $tool_basename; ac_word=$2
7598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7599$as_echo_n "checking for $ac_word... " >&6; }
7600if ${ac_cv_path_LN+:} false; then :
7601  $as_echo_n "(cached) " >&6
7602else
7603  case $LN in
7604  [\\/]* | ?:[\\/]*)
7605  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7606  ;;
7607  *)
7608  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7609for as_dir in $PATH
7610do
7611  IFS=$as_save_IFS
7612  test -z "$as_dir" && as_dir=.
7613    for ac_exec_ext in '' $ac_executable_extensions; do
7614  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7615    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7616    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7617    break 2
7618  fi
7619done
7620  done
7621IFS=$as_save_IFS
7622
7623  ;;
7624esac
7625fi
7626LN=$ac_cv_path_LN
7627if test -n "$LN"; then
7628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7629$as_echo "$LN" >&6; }
7630else
7631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7632$as_echo "no" >&6; }
7633fi
7634
7635
7636        if test "x$LN" = x; then
7637          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7638        fi
7639      else
7640        # Otherwise we believe it is a complete path. Use it as it is.
7641        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
7642$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
7643        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
7644$as_echo_n "checking for LN... " >&6; }
7645        if test ! -x "$tool_specified"; then
7646          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7647$as_echo "not found" >&6; }
7648          as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
7649        fi
7650        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7651$as_echo "$tool_specified" >&6; }
7652      fi
7653    fi
7654  fi
7655
7656
7657
7658  if test "x$LN" = x; then
7659    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
7660  fi
7661
7662
7663
7664
7665
7666  # Publish this variable in the help.
7667
7668
7669  if test "x$LS" = x; then
7670    # The variable is not set by user, try to locate tool using the code snippet
7671    for ac_prog in ls
7672do
7673  # Extract the first word of "$ac_prog", so it can be a program name with args.
7674set dummy $ac_prog; ac_word=$2
7675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7676$as_echo_n "checking for $ac_word... " >&6; }
7677if ${ac_cv_path_LS+:} false; then :
7678  $as_echo_n "(cached) " >&6
7679else
7680  case $LS in
7681  [\\/]* | ?:[\\/]*)
7682  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7683  ;;
7684  *)
7685  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7686for as_dir in $PATH
7687do
7688  IFS=$as_save_IFS
7689  test -z "$as_dir" && as_dir=.
7690    for ac_exec_ext in '' $ac_executable_extensions; do
7691  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7692    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7693    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7694    break 2
7695  fi
7696done
7697  done
7698IFS=$as_save_IFS
7699
7700  ;;
7701esac
7702fi
7703LS=$ac_cv_path_LS
7704if test -n "$LS"; then
7705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7706$as_echo "$LS" >&6; }
7707else
7708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7709$as_echo "no" >&6; }
7710fi
7711
7712
7713  test -n "$LS" && break
7714done
7715
7716  else
7717    # The variable is set, but is it from the command line or the environment?
7718
7719    # Try to remove the string !LS! from our list.
7720    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
7721    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7722      # If it failed, the variable was not from the command line. Ignore it,
7723      # but warn the user (except for BASH, which is always set by the calling BASH).
7724      if test "xLS" != xBASH; then
7725        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
7726$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
7727      fi
7728      # Try to locate tool using the code snippet
7729      for ac_prog in ls
7730do
7731  # Extract the first word of "$ac_prog", so it can be a program name with args.
7732set dummy $ac_prog; ac_word=$2
7733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7734$as_echo_n "checking for $ac_word... " >&6; }
7735if ${ac_cv_path_LS+:} false; then :
7736  $as_echo_n "(cached) " >&6
7737else
7738  case $LS in
7739  [\\/]* | ?:[\\/]*)
7740  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7741  ;;
7742  *)
7743  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7744for as_dir in $PATH
7745do
7746  IFS=$as_save_IFS
7747  test -z "$as_dir" && as_dir=.
7748    for ac_exec_ext in '' $ac_executable_extensions; do
7749  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7750    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7751    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7752    break 2
7753  fi
7754done
7755  done
7756IFS=$as_save_IFS
7757
7758  ;;
7759esac
7760fi
7761LS=$ac_cv_path_LS
7762if test -n "$LS"; then
7763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7764$as_echo "$LS" >&6; }
7765else
7766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7767$as_echo "no" >&6; }
7768fi
7769
7770
7771  test -n "$LS" && break
7772done
7773
7774    else
7775      # If it succeeded, then it was overridden by the user. We will use it
7776      # for the tool.
7777
7778      # First remove it from the list of overridden variables, so we can test
7779      # for unknown variables in the end.
7780      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7781
7782      # Check if the provided tool contains a complete path.
7783      tool_specified="$LS"
7784      tool_basename="${tool_specified##*/}"
7785      if test "x$tool_basename" = "x$tool_specified"; then
7786        # A command without a complete path is provided, search $PATH.
7787        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
7788$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
7789        # Extract the first word of "$tool_basename", so it can be a program name with args.
7790set dummy $tool_basename; ac_word=$2
7791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7792$as_echo_n "checking for $ac_word... " >&6; }
7793if ${ac_cv_path_LS+:} false; then :
7794  $as_echo_n "(cached) " >&6
7795else
7796  case $LS in
7797  [\\/]* | ?:[\\/]*)
7798  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7799  ;;
7800  *)
7801  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7802for as_dir in $PATH
7803do
7804  IFS=$as_save_IFS
7805  test -z "$as_dir" && as_dir=.
7806    for ac_exec_ext in '' $ac_executable_extensions; do
7807  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7808    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7809    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7810    break 2
7811  fi
7812done
7813  done
7814IFS=$as_save_IFS
7815
7816  ;;
7817esac
7818fi
7819LS=$ac_cv_path_LS
7820if test -n "$LS"; then
7821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7822$as_echo "$LS" >&6; }
7823else
7824  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7825$as_echo "no" >&6; }
7826fi
7827
7828
7829        if test "x$LS" = x; then
7830          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7831        fi
7832      else
7833        # Otherwise we believe it is a complete path. Use it as it is.
7834        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
7835$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
7836        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
7837$as_echo_n "checking for LS... " >&6; }
7838        if test ! -x "$tool_specified"; then
7839          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7840$as_echo "not found" >&6; }
7841          as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
7842        fi
7843        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7844$as_echo "$tool_specified" >&6; }
7845      fi
7846    fi
7847  fi
7848
7849
7850
7851  if test "x$LS" = x; then
7852    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
7853  fi
7854
7855
7856
7857
7858
7859  # Publish this variable in the help.
7860
7861
7862  if test "x$MKDIR" = x; then
7863    # The variable is not set by user, try to locate tool using the code snippet
7864    for ac_prog in mkdir
7865do
7866  # Extract the first word of "$ac_prog", so it can be a program name with args.
7867set dummy $ac_prog; ac_word=$2
7868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7869$as_echo_n "checking for $ac_word... " >&6; }
7870if ${ac_cv_path_MKDIR+:} false; then :
7871  $as_echo_n "(cached) " >&6
7872else
7873  case $MKDIR in
7874  [\\/]* | ?:[\\/]*)
7875  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7876  ;;
7877  *)
7878  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7879for as_dir in $PATH
7880do
7881  IFS=$as_save_IFS
7882  test -z "$as_dir" && as_dir=.
7883    for ac_exec_ext in '' $ac_executable_extensions; do
7884  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7885    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7886    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7887    break 2
7888  fi
7889done
7890  done
7891IFS=$as_save_IFS
7892
7893  ;;
7894esac
7895fi
7896MKDIR=$ac_cv_path_MKDIR
7897if test -n "$MKDIR"; then
7898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
7899$as_echo "$MKDIR" >&6; }
7900else
7901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7902$as_echo "no" >&6; }
7903fi
7904
7905
7906  test -n "$MKDIR" && break
7907done
7908
7909  else
7910    # The variable is set, but is it from the command line or the environment?
7911
7912    # Try to remove the string !MKDIR! from our list.
7913    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
7914    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7915      # If it failed, the variable was not from the command line. Ignore it,
7916      # but warn the user (except for BASH, which is always set by the calling BASH).
7917      if test "xMKDIR" != xBASH; then
7918        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
7919$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
7920      fi
7921      # Try to locate tool using the code snippet
7922      for ac_prog in mkdir
7923do
7924  # Extract the first word of "$ac_prog", so it can be a program name with args.
7925set dummy $ac_prog; ac_word=$2
7926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7927$as_echo_n "checking for $ac_word... " >&6; }
7928if ${ac_cv_path_MKDIR+:} false; then :
7929  $as_echo_n "(cached) " >&6
7930else
7931  case $MKDIR in
7932  [\\/]* | ?:[\\/]*)
7933  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7934  ;;
7935  *)
7936  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7937for as_dir in $PATH
7938do
7939  IFS=$as_save_IFS
7940  test -z "$as_dir" && as_dir=.
7941    for ac_exec_ext in '' $ac_executable_extensions; do
7942  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7943    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7944    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7945    break 2
7946  fi
7947done
7948  done
7949IFS=$as_save_IFS
7950
7951  ;;
7952esac
7953fi
7954MKDIR=$ac_cv_path_MKDIR
7955if test -n "$MKDIR"; then
7956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
7957$as_echo "$MKDIR" >&6; }
7958else
7959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7960$as_echo "no" >&6; }
7961fi
7962
7963
7964  test -n "$MKDIR" && break
7965done
7966
7967    else
7968      # If it succeeded, then it was overridden by the user. We will use it
7969      # for the tool.
7970
7971      # First remove it from the list of overridden variables, so we can test
7972      # for unknown variables in the end.
7973      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7974
7975      # Check if the provided tool contains a complete path.
7976      tool_specified="$MKDIR"
7977      tool_basename="${tool_specified##*/}"
7978      if test "x$tool_basename" = "x$tool_specified"; then
7979        # A command without a complete path is provided, search $PATH.
7980        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
7981$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
7982        # Extract the first word of "$tool_basename", so it can be a program name with args.
7983set dummy $tool_basename; ac_word=$2
7984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7985$as_echo_n "checking for $ac_word... " >&6; }
7986if ${ac_cv_path_MKDIR+:} false; then :
7987  $as_echo_n "(cached) " >&6
7988else
7989  case $MKDIR in
7990  [\\/]* | ?:[\\/]*)
7991  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7992  ;;
7993  *)
7994  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7995for as_dir in $PATH
7996do
7997  IFS=$as_save_IFS
7998  test -z "$as_dir" && as_dir=.
7999    for ac_exec_ext in '' $ac_executable_extensions; do
8000  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8001    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8002    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8003    break 2
8004  fi
8005done
8006  done
8007IFS=$as_save_IFS
8008
8009  ;;
8010esac
8011fi
8012MKDIR=$ac_cv_path_MKDIR
8013if test -n "$MKDIR"; then
8014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8015$as_echo "$MKDIR" >&6; }
8016else
8017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8018$as_echo "no" >&6; }
8019fi
8020
8021
8022        if test "x$MKDIR" = x; then
8023          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8024        fi
8025      else
8026        # Otherwise we believe it is a complete path. Use it as it is.
8027        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8028$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8029        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8030$as_echo_n "checking for MKDIR... " >&6; }
8031        if test ! -x "$tool_specified"; then
8032          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8033$as_echo "not found" >&6; }
8034          as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8035        fi
8036        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8037$as_echo "$tool_specified" >&6; }
8038      fi
8039    fi
8040  fi
8041
8042
8043
8044  if test "x$MKDIR" = x; then
8045    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8046  fi
8047
8048
8049
8050
8051
8052  # Publish this variable in the help.
8053
8054
8055  if test "x$MKTEMP" = x; then
8056    # The variable is not set by user, try to locate tool using the code snippet
8057    for ac_prog in mktemp
8058do
8059  # Extract the first word of "$ac_prog", so it can be a program name with args.
8060set dummy $ac_prog; ac_word=$2
8061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8062$as_echo_n "checking for $ac_word... " >&6; }
8063if ${ac_cv_path_MKTEMP+:} false; then :
8064  $as_echo_n "(cached) " >&6
8065else
8066  case $MKTEMP in
8067  [\\/]* | ?:[\\/]*)
8068  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8069  ;;
8070  *)
8071  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8072for as_dir in $PATH
8073do
8074  IFS=$as_save_IFS
8075  test -z "$as_dir" && as_dir=.
8076    for ac_exec_ext in '' $ac_executable_extensions; do
8077  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8078    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8079    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8080    break 2
8081  fi
8082done
8083  done
8084IFS=$as_save_IFS
8085
8086  ;;
8087esac
8088fi
8089MKTEMP=$ac_cv_path_MKTEMP
8090if test -n "$MKTEMP"; then
8091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8092$as_echo "$MKTEMP" >&6; }
8093else
8094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8095$as_echo "no" >&6; }
8096fi
8097
8098
8099  test -n "$MKTEMP" && break
8100done
8101
8102  else
8103    # The variable is set, but is it from the command line or the environment?
8104
8105    # Try to remove the string !MKTEMP! from our list.
8106    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8107    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8108      # If it failed, the variable was not from the command line. Ignore it,
8109      # but warn the user (except for BASH, which is always set by the calling BASH).
8110      if test "xMKTEMP" != xBASH; then
8111        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8112$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8113      fi
8114      # Try to locate tool using the code snippet
8115      for ac_prog in mktemp
8116do
8117  # Extract the first word of "$ac_prog", so it can be a program name with args.
8118set dummy $ac_prog; ac_word=$2
8119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8120$as_echo_n "checking for $ac_word... " >&6; }
8121if ${ac_cv_path_MKTEMP+:} false; then :
8122  $as_echo_n "(cached) " >&6
8123else
8124  case $MKTEMP in
8125  [\\/]* | ?:[\\/]*)
8126  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8127  ;;
8128  *)
8129  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8130for as_dir in $PATH
8131do
8132  IFS=$as_save_IFS
8133  test -z "$as_dir" && as_dir=.
8134    for ac_exec_ext in '' $ac_executable_extensions; do
8135  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8136    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8137    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8138    break 2
8139  fi
8140done
8141  done
8142IFS=$as_save_IFS
8143
8144  ;;
8145esac
8146fi
8147MKTEMP=$ac_cv_path_MKTEMP
8148if test -n "$MKTEMP"; then
8149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8150$as_echo "$MKTEMP" >&6; }
8151else
8152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8153$as_echo "no" >&6; }
8154fi
8155
8156
8157  test -n "$MKTEMP" && break
8158done
8159
8160    else
8161      # If it succeeded, then it was overridden by the user. We will use it
8162      # for the tool.
8163
8164      # First remove it from the list of overridden variables, so we can test
8165      # for unknown variables in the end.
8166      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8167
8168      # Check if the provided tool contains a complete path.
8169      tool_specified="$MKTEMP"
8170      tool_basename="${tool_specified##*/}"
8171      if test "x$tool_basename" = "x$tool_specified"; then
8172        # A command without a complete path is provided, search $PATH.
8173        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8174$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8175        # Extract the first word of "$tool_basename", so it can be a program name with args.
8176set dummy $tool_basename; ac_word=$2
8177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8178$as_echo_n "checking for $ac_word... " >&6; }
8179if ${ac_cv_path_MKTEMP+:} false; then :
8180  $as_echo_n "(cached) " >&6
8181else
8182  case $MKTEMP in
8183  [\\/]* | ?:[\\/]*)
8184  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8185  ;;
8186  *)
8187  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8188for as_dir in $PATH
8189do
8190  IFS=$as_save_IFS
8191  test -z "$as_dir" && as_dir=.
8192    for ac_exec_ext in '' $ac_executable_extensions; do
8193  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8194    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8195    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8196    break 2
8197  fi
8198done
8199  done
8200IFS=$as_save_IFS
8201
8202  ;;
8203esac
8204fi
8205MKTEMP=$ac_cv_path_MKTEMP
8206if test -n "$MKTEMP"; then
8207  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8208$as_echo "$MKTEMP" >&6; }
8209else
8210  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8211$as_echo "no" >&6; }
8212fi
8213
8214
8215        if test "x$MKTEMP" = x; then
8216          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8217        fi
8218      else
8219        # Otherwise we believe it is a complete path. Use it as it is.
8220        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8221$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8222        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8223$as_echo_n "checking for MKTEMP... " >&6; }
8224        if test ! -x "$tool_specified"; then
8225          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8226$as_echo "not found" >&6; }
8227          as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8228        fi
8229        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8230$as_echo "$tool_specified" >&6; }
8231      fi
8232    fi
8233  fi
8234
8235
8236
8237  if test "x$MKTEMP" = x; then
8238    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8239  fi
8240
8241
8242
8243
8244
8245  # Publish this variable in the help.
8246
8247
8248  if test "x$MV" = x; then
8249    # The variable is not set by user, try to locate tool using the code snippet
8250    for ac_prog in mv
8251do
8252  # Extract the first word of "$ac_prog", so it can be a program name with args.
8253set dummy $ac_prog; ac_word=$2
8254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8255$as_echo_n "checking for $ac_word... " >&6; }
8256if ${ac_cv_path_MV+:} false; then :
8257  $as_echo_n "(cached) " >&6
8258else
8259  case $MV in
8260  [\\/]* | ?:[\\/]*)
8261  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8262  ;;
8263  *)
8264  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8265for as_dir in $PATH
8266do
8267  IFS=$as_save_IFS
8268  test -z "$as_dir" && as_dir=.
8269    for ac_exec_ext in '' $ac_executable_extensions; do
8270  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8271    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8272    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8273    break 2
8274  fi
8275done
8276  done
8277IFS=$as_save_IFS
8278
8279  ;;
8280esac
8281fi
8282MV=$ac_cv_path_MV
8283if test -n "$MV"; then
8284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8285$as_echo "$MV" >&6; }
8286else
8287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8288$as_echo "no" >&6; }
8289fi
8290
8291
8292  test -n "$MV" && break
8293done
8294
8295  else
8296    # The variable is set, but is it from the command line or the environment?
8297
8298    # Try to remove the string !MV! from our list.
8299    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
8300    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8301      # If it failed, the variable was not from the command line. Ignore it,
8302      # but warn the user (except for BASH, which is always set by the calling BASH).
8303      if test "xMV" != xBASH; then
8304        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
8305$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
8306      fi
8307      # Try to locate tool using the code snippet
8308      for ac_prog in mv
8309do
8310  # Extract the first word of "$ac_prog", so it can be a program name with args.
8311set dummy $ac_prog; ac_word=$2
8312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8313$as_echo_n "checking for $ac_word... " >&6; }
8314if ${ac_cv_path_MV+:} false; then :
8315  $as_echo_n "(cached) " >&6
8316else
8317  case $MV in
8318  [\\/]* | ?:[\\/]*)
8319  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8320  ;;
8321  *)
8322  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8323for as_dir in $PATH
8324do
8325  IFS=$as_save_IFS
8326  test -z "$as_dir" && as_dir=.
8327    for ac_exec_ext in '' $ac_executable_extensions; do
8328  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8329    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8330    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8331    break 2
8332  fi
8333done
8334  done
8335IFS=$as_save_IFS
8336
8337  ;;
8338esac
8339fi
8340MV=$ac_cv_path_MV
8341if test -n "$MV"; then
8342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8343$as_echo "$MV" >&6; }
8344else
8345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8346$as_echo "no" >&6; }
8347fi
8348
8349
8350  test -n "$MV" && break
8351done
8352
8353    else
8354      # If it succeeded, then it was overridden by the user. We will use it
8355      # for the tool.
8356
8357      # First remove it from the list of overridden variables, so we can test
8358      # for unknown variables in the end.
8359      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8360
8361      # Check if the provided tool contains a complete path.
8362      tool_specified="$MV"
8363      tool_basename="${tool_specified##*/}"
8364      if test "x$tool_basename" = "x$tool_specified"; then
8365        # A command without a complete path is provided, search $PATH.
8366        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
8367$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
8368        # Extract the first word of "$tool_basename", so it can be a program name with args.
8369set dummy $tool_basename; ac_word=$2
8370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8371$as_echo_n "checking for $ac_word... " >&6; }
8372if ${ac_cv_path_MV+:} false; then :
8373  $as_echo_n "(cached) " >&6
8374else
8375  case $MV in
8376  [\\/]* | ?:[\\/]*)
8377  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8378  ;;
8379  *)
8380  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8381for as_dir in $PATH
8382do
8383  IFS=$as_save_IFS
8384  test -z "$as_dir" && as_dir=.
8385    for ac_exec_ext in '' $ac_executable_extensions; do
8386  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8387    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8388    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8389    break 2
8390  fi
8391done
8392  done
8393IFS=$as_save_IFS
8394
8395  ;;
8396esac
8397fi
8398MV=$ac_cv_path_MV
8399if test -n "$MV"; then
8400  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8401$as_echo "$MV" >&6; }
8402else
8403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8404$as_echo "no" >&6; }
8405fi
8406
8407
8408        if test "x$MV" = x; then
8409          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8410        fi
8411      else
8412        # Otherwise we believe it is a complete path. Use it as it is.
8413        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
8414$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
8415        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8416$as_echo_n "checking for MV... " >&6; }
8417        if test ! -x "$tool_specified"; then
8418          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8419$as_echo "not found" >&6; }
8420          as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
8421        fi
8422        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8423$as_echo "$tool_specified" >&6; }
8424      fi
8425    fi
8426  fi
8427
8428
8429
8430  if test "x$MV" = x; then
8431    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
8432  fi
8433
8434
8435
8436
8437
8438  # Publish this variable in the help.
8439
8440
8441  if test "x$NAWK" = x; then
8442    # The variable is not set by user, try to locate tool using the code snippet
8443    for ac_prog in nawk gawk awk
8444do
8445  # Extract the first word of "$ac_prog", so it can be a program name with args.
8446set dummy $ac_prog; ac_word=$2
8447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8448$as_echo_n "checking for $ac_word... " >&6; }
8449if ${ac_cv_path_NAWK+:} false; then :
8450  $as_echo_n "(cached) " >&6
8451else
8452  case $NAWK in
8453  [\\/]* | ?:[\\/]*)
8454  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8455  ;;
8456  *)
8457  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8458for as_dir in $PATH
8459do
8460  IFS=$as_save_IFS
8461  test -z "$as_dir" && as_dir=.
8462    for ac_exec_ext in '' $ac_executable_extensions; do
8463  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8464    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8465    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8466    break 2
8467  fi
8468done
8469  done
8470IFS=$as_save_IFS
8471
8472  ;;
8473esac
8474fi
8475NAWK=$ac_cv_path_NAWK
8476if test -n "$NAWK"; then
8477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8478$as_echo "$NAWK" >&6; }
8479else
8480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8481$as_echo "no" >&6; }
8482fi
8483
8484
8485  test -n "$NAWK" && break
8486done
8487
8488  else
8489    # The variable is set, but is it from the command line or the environment?
8490
8491    # Try to remove the string !NAWK! from our list.
8492    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
8493    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8494      # If it failed, the variable was not from the command line. Ignore it,
8495      # but warn the user (except for BASH, which is always set by the calling BASH).
8496      if test "xNAWK" != xBASH; then
8497        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
8498$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
8499      fi
8500      # Try to locate tool using the code snippet
8501      for ac_prog in nawk gawk awk
8502do
8503  # Extract the first word of "$ac_prog", so it can be a program name with args.
8504set dummy $ac_prog; ac_word=$2
8505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8506$as_echo_n "checking for $ac_word... " >&6; }
8507if ${ac_cv_path_NAWK+:} false; then :
8508  $as_echo_n "(cached) " >&6
8509else
8510  case $NAWK in
8511  [\\/]* | ?:[\\/]*)
8512  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8513  ;;
8514  *)
8515  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8516for as_dir in $PATH
8517do
8518  IFS=$as_save_IFS
8519  test -z "$as_dir" && as_dir=.
8520    for ac_exec_ext in '' $ac_executable_extensions; do
8521  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8522    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8523    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8524    break 2
8525  fi
8526done
8527  done
8528IFS=$as_save_IFS
8529
8530  ;;
8531esac
8532fi
8533NAWK=$ac_cv_path_NAWK
8534if test -n "$NAWK"; then
8535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8536$as_echo "$NAWK" >&6; }
8537else
8538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8539$as_echo "no" >&6; }
8540fi
8541
8542
8543  test -n "$NAWK" && break
8544done
8545
8546    else
8547      # If it succeeded, then it was overridden by the user. We will use it
8548      # for the tool.
8549
8550      # First remove it from the list of overridden variables, so we can test
8551      # for unknown variables in the end.
8552      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8553
8554      # Check if the provided tool contains a complete path.
8555      tool_specified="$NAWK"
8556      tool_basename="${tool_specified##*/}"
8557      if test "x$tool_basename" = "x$tool_specified"; then
8558        # A command without a complete path is provided, search $PATH.
8559        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
8560$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
8561        # Extract the first word of "$tool_basename", so it can be a program name with args.
8562set dummy $tool_basename; ac_word=$2
8563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8564$as_echo_n "checking for $ac_word... " >&6; }
8565if ${ac_cv_path_NAWK+:} false; then :
8566  $as_echo_n "(cached) " >&6
8567else
8568  case $NAWK in
8569  [\\/]* | ?:[\\/]*)
8570  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8571  ;;
8572  *)
8573  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8574for as_dir in $PATH
8575do
8576  IFS=$as_save_IFS
8577  test -z "$as_dir" && as_dir=.
8578    for ac_exec_ext in '' $ac_executable_extensions; do
8579  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8580    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8581    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8582    break 2
8583  fi
8584done
8585  done
8586IFS=$as_save_IFS
8587
8588  ;;
8589esac
8590fi
8591NAWK=$ac_cv_path_NAWK
8592if test -n "$NAWK"; then
8593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8594$as_echo "$NAWK" >&6; }
8595else
8596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8597$as_echo "no" >&6; }
8598fi
8599
8600
8601        if test "x$NAWK" = x; then
8602          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8603        fi
8604      else
8605        # Otherwise we believe it is a complete path. Use it as it is.
8606        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
8607$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
8608        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
8609$as_echo_n "checking for NAWK... " >&6; }
8610        if test ! -x "$tool_specified"; then
8611          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8612$as_echo "not found" >&6; }
8613          as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
8614        fi
8615        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8616$as_echo "$tool_specified" >&6; }
8617      fi
8618    fi
8619  fi
8620
8621
8622
8623  if test "x$NAWK" = x; then
8624    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
8625  fi
8626
8627
8628
8629
8630
8631  # Publish this variable in the help.
8632
8633
8634  if test "x$PRINTF" = x; then
8635    # The variable is not set by user, try to locate tool using the code snippet
8636    for ac_prog in printf
8637do
8638  # Extract the first word of "$ac_prog", so it can be a program name with args.
8639set dummy $ac_prog; ac_word=$2
8640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8641$as_echo_n "checking for $ac_word... " >&6; }
8642if ${ac_cv_path_PRINTF+:} false; then :
8643  $as_echo_n "(cached) " >&6
8644else
8645  case $PRINTF in
8646  [\\/]* | ?:[\\/]*)
8647  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8648  ;;
8649  *)
8650  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8651for as_dir in $PATH
8652do
8653  IFS=$as_save_IFS
8654  test -z "$as_dir" && as_dir=.
8655    for ac_exec_ext in '' $ac_executable_extensions; do
8656  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8657    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8658    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8659    break 2
8660  fi
8661done
8662  done
8663IFS=$as_save_IFS
8664
8665  ;;
8666esac
8667fi
8668PRINTF=$ac_cv_path_PRINTF
8669if test -n "$PRINTF"; then
8670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8671$as_echo "$PRINTF" >&6; }
8672else
8673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8674$as_echo "no" >&6; }
8675fi
8676
8677
8678  test -n "$PRINTF" && break
8679done
8680
8681  else
8682    # The variable is set, but is it from the command line or the environment?
8683
8684    # Try to remove the string !PRINTF! from our list.
8685    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
8686    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8687      # If it failed, the variable was not from the command line. Ignore it,
8688      # but warn the user (except for BASH, which is always set by the calling BASH).
8689      if test "xPRINTF" != xBASH; then
8690        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
8691$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
8692      fi
8693      # Try to locate tool using the code snippet
8694      for ac_prog in printf
8695do
8696  # Extract the first word of "$ac_prog", so it can be a program name with args.
8697set dummy $ac_prog; ac_word=$2
8698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8699$as_echo_n "checking for $ac_word... " >&6; }
8700if ${ac_cv_path_PRINTF+:} false; then :
8701  $as_echo_n "(cached) " >&6
8702else
8703  case $PRINTF in
8704  [\\/]* | ?:[\\/]*)
8705  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8706  ;;
8707  *)
8708  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8709for as_dir in $PATH
8710do
8711  IFS=$as_save_IFS
8712  test -z "$as_dir" && as_dir=.
8713    for ac_exec_ext in '' $ac_executable_extensions; do
8714  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8715    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8716    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8717    break 2
8718  fi
8719done
8720  done
8721IFS=$as_save_IFS
8722
8723  ;;
8724esac
8725fi
8726PRINTF=$ac_cv_path_PRINTF
8727if test -n "$PRINTF"; then
8728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8729$as_echo "$PRINTF" >&6; }
8730else
8731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8732$as_echo "no" >&6; }
8733fi
8734
8735
8736  test -n "$PRINTF" && break
8737done
8738
8739    else
8740      # If it succeeded, then it was overridden by the user. We will use it
8741      # for the tool.
8742
8743      # First remove it from the list of overridden variables, so we can test
8744      # for unknown variables in the end.
8745      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8746
8747      # Check if the provided tool contains a complete path.
8748      tool_specified="$PRINTF"
8749      tool_basename="${tool_specified##*/}"
8750      if test "x$tool_basename" = "x$tool_specified"; then
8751        # A command without a complete path is provided, search $PATH.
8752        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
8753$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
8754        # Extract the first word of "$tool_basename", so it can be a program name with args.
8755set dummy $tool_basename; ac_word=$2
8756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8757$as_echo_n "checking for $ac_word... " >&6; }
8758if ${ac_cv_path_PRINTF+:} false; then :
8759  $as_echo_n "(cached) " >&6
8760else
8761  case $PRINTF in
8762  [\\/]* | ?:[\\/]*)
8763  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8764  ;;
8765  *)
8766  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8767for as_dir in $PATH
8768do
8769  IFS=$as_save_IFS
8770  test -z "$as_dir" && as_dir=.
8771    for ac_exec_ext in '' $ac_executable_extensions; do
8772  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8773    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8774    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8775    break 2
8776  fi
8777done
8778  done
8779IFS=$as_save_IFS
8780
8781  ;;
8782esac
8783fi
8784PRINTF=$ac_cv_path_PRINTF
8785if test -n "$PRINTF"; then
8786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8787$as_echo "$PRINTF" >&6; }
8788else
8789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8790$as_echo "no" >&6; }
8791fi
8792
8793
8794        if test "x$PRINTF" = x; then
8795          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8796        fi
8797      else
8798        # Otherwise we believe it is a complete path. Use it as it is.
8799        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
8800$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
8801        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
8802$as_echo_n "checking for PRINTF... " >&6; }
8803        if test ! -x "$tool_specified"; then
8804          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8805$as_echo "not found" >&6; }
8806          as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
8807        fi
8808        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8809$as_echo "$tool_specified" >&6; }
8810      fi
8811    fi
8812  fi
8813
8814
8815
8816  if test "x$PRINTF" = x; then
8817    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
8818  fi
8819
8820
8821
8822
8823
8824  # Publish this variable in the help.
8825
8826
8827  if test "x$RM" = x; then
8828    # The variable is not set by user, try to locate tool using the code snippet
8829    for ac_prog in rm
8830do
8831  # Extract the first word of "$ac_prog", so it can be a program name with args.
8832set dummy $ac_prog; ac_word=$2
8833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8834$as_echo_n "checking for $ac_word... " >&6; }
8835if ${ac_cv_path_RM+:} false; then :
8836  $as_echo_n "(cached) " >&6
8837else
8838  case $RM in
8839  [\\/]* | ?:[\\/]*)
8840  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8841  ;;
8842  *)
8843  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8844for as_dir in $PATH
8845do
8846  IFS=$as_save_IFS
8847  test -z "$as_dir" && as_dir=.
8848    for ac_exec_ext in '' $ac_executable_extensions; do
8849  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8850    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8851    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8852    break 2
8853  fi
8854done
8855  done
8856IFS=$as_save_IFS
8857
8858  ;;
8859esac
8860fi
8861RM=$ac_cv_path_RM
8862if test -n "$RM"; then
8863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8864$as_echo "$RM" >&6; }
8865else
8866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8867$as_echo "no" >&6; }
8868fi
8869
8870
8871  test -n "$RM" && break
8872done
8873
8874  else
8875    # The variable is set, but is it from the command line or the environment?
8876
8877    # Try to remove the string !RM! from our list.
8878    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
8879    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8880      # If it failed, the variable was not from the command line. Ignore it,
8881      # but warn the user (except for BASH, which is always set by the calling BASH).
8882      if test "xRM" != xBASH; then
8883        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
8884$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
8885      fi
8886      # Try to locate tool using the code snippet
8887      for ac_prog in rm
8888do
8889  # Extract the first word of "$ac_prog", so it can be a program name with args.
8890set dummy $ac_prog; ac_word=$2
8891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8892$as_echo_n "checking for $ac_word... " >&6; }
8893if ${ac_cv_path_RM+:} false; then :
8894  $as_echo_n "(cached) " >&6
8895else
8896  case $RM in
8897  [\\/]* | ?:[\\/]*)
8898  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8899  ;;
8900  *)
8901  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8902for as_dir in $PATH
8903do
8904  IFS=$as_save_IFS
8905  test -z "$as_dir" && as_dir=.
8906    for ac_exec_ext in '' $ac_executable_extensions; do
8907  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8908    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8909    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8910    break 2
8911  fi
8912done
8913  done
8914IFS=$as_save_IFS
8915
8916  ;;
8917esac
8918fi
8919RM=$ac_cv_path_RM
8920if test -n "$RM"; then
8921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8922$as_echo "$RM" >&6; }
8923else
8924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8925$as_echo "no" >&6; }
8926fi
8927
8928
8929  test -n "$RM" && break
8930done
8931
8932    else
8933      # If it succeeded, then it was overridden by the user. We will use it
8934      # for the tool.
8935
8936      # First remove it from the list of overridden variables, so we can test
8937      # for unknown variables in the end.
8938      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8939
8940      # Check if the provided tool contains a complete path.
8941      tool_specified="$RM"
8942      tool_basename="${tool_specified##*/}"
8943      if test "x$tool_basename" = "x$tool_specified"; then
8944        # A command without a complete path is provided, search $PATH.
8945        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
8946$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
8947        # Extract the first word of "$tool_basename", so it can be a program name with args.
8948set dummy $tool_basename; ac_word=$2
8949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8950$as_echo_n "checking for $ac_word... " >&6; }
8951if ${ac_cv_path_RM+:} false; then :
8952  $as_echo_n "(cached) " >&6
8953else
8954  case $RM in
8955  [\\/]* | ?:[\\/]*)
8956  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8957  ;;
8958  *)
8959  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8960for as_dir in $PATH
8961do
8962  IFS=$as_save_IFS
8963  test -z "$as_dir" && as_dir=.
8964    for ac_exec_ext in '' $ac_executable_extensions; do
8965  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8966    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8967    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8968    break 2
8969  fi
8970done
8971  done
8972IFS=$as_save_IFS
8973
8974  ;;
8975esac
8976fi
8977RM=$ac_cv_path_RM
8978if test -n "$RM"; then
8979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8980$as_echo "$RM" >&6; }
8981else
8982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8983$as_echo "no" >&6; }
8984fi
8985
8986
8987        if test "x$RM" = x; then
8988          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8989        fi
8990      else
8991        # Otherwise we believe it is a complete path. Use it as it is.
8992        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
8993$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
8994        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
8995$as_echo_n "checking for RM... " >&6; }
8996        if test ! -x "$tool_specified"; then
8997          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8998$as_echo "not found" >&6; }
8999          as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
9000        fi
9001        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9002$as_echo "$tool_specified" >&6; }
9003      fi
9004    fi
9005  fi
9006
9007
9008
9009  if test "x$RM" = x; then
9010    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9011  fi
9012
9013
9014
9015
9016
9017  # Publish this variable in the help.
9018
9019
9020  if test "x$SH" = x; then
9021    # The variable is not set by user, try to locate tool using the code snippet
9022    for ac_prog in sh
9023do
9024  # Extract the first word of "$ac_prog", so it can be a program name with args.
9025set dummy $ac_prog; ac_word=$2
9026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9027$as_echo_n "checking for $ac_word... " >&6; }
9028if ${ac_cv_path_SH+:} false; then :
9029  $as_echo_n "(cached) " >&6
9030else
9031  case $SH in
9032  [\\/]* | ?:[\\/]*)
9033  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9034  ;;
9035  *)
9036  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9037for as_dir in $PATH
9038do
9039  IFS=$as_save_IFS
9040  test -z "$as_dir" && as_dir=.
9041    for ac_exec_ext in '' $ac_executable_extensions; do
9042  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9043    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9044    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9045    break 2
9046  fi
9047done
9048  done
9049IFS=$as_save_IFS
9050
9051  ;;
9052esac
9053fi
9054SH=$ac_cv_path_SH
9055if test -n "$SH"; then
9056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9057$as_echo "$SH" >&6; }
9058else
9059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9060$as_echo "no" >&6; }
9061fi
9062
9063
9064  test -n "$SH" && break
9065done
9066
9067  else
9068    # The variable is set, but is it from the command line or the environment?
9069
9070    # Try to remove the string !SH! from our list.
9071    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
9072    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9073      # If it failed, the variable was not from the command line. Ignore it,
9074      # but warn the user (except for BASH, which is always set by the calling BASH).
9075      if test "xSH" != xBASH; then
9076        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
9077$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
9078      fi
9079      # Try to locate tool using the code snippet
9080      for ac_prog in sh
9081do
9082  # Extract the first word of "$ac_prog", so it can be a program name with args.
9083set dummy $ac_prog; ac_word=$2
9084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9085$as_echo_n "checking for $ac_word... " >&6; }
9086if ${ac_cv_path_SH+:} false; then :
9087  $as_echo_n "(cached) " >&6
9088else
9089  case $SH in
9090  [\\/]* | ?:[\\/]*)
9091  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9092  ;;
9093  *)
9094  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9095for as_dir in $PATH
9096do
9097  IFS=$as_save_IFS
9098  test -z "$as_dir" && as_dir=.
9099    for ac_exec_ext in '' $ac_executable_extensions; do
9100  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9101    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9102    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9103    break 2
9104  fi
9105done
9106  done
9107IFS=$as_save_IFS
9108
9109  ;;
9110esac
9111fi
9112SH=$ac_cv_path_SH
9113if test -n "$SH"; then
9114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9115$as_echo "$SH" >&6; }
9116else
9117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9118$as_echo "no" >&6; }
9119fi
9120
9121
9122  test -n "$SH" && break
9123done
9124
9125    else
9126      # If it succeeded, then it was overridden by the user. We will use it
9127      # for the tool.
9128
9129      # First remove it from the list of overridden variables, so we can test
9130      # for unknown variables in the end.
9131      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9132
9133      # Check if the provided tool contains a complete path.
9134      tool_specified="$SH"
9135      tool_basename="${tool_specified##*/}"
9136      if test "x$tool_basename" = "x$tool_specified"; then
9137        # A command without a complete path is provided, search $PATH.
9138        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
9139$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
9140        # Extract the first word of "$tool_basename", so it can be a program name with args.
9141set dummy $tool_basename; ac_word=$2
9142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9143$as_echo_n "checking for $ac_word... " >&6; }
9144if ${ac_cv_path_SH+:} false; then :
9145  $as_echo_n "(cached) " >&6
9146else
9147  case $SH in
9148  [\\/]* | ?:[\\/]*)
9149  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9150  ;;
9151  *)
9152  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9153for as_dir in $PATH
9154do
9155  IFS=$as_save_IFS
9156  test -z "$as_dir" && as_dir=.
9157    for ac_exec_ext in '' $ac_executable_extensions; do
9158  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9159    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9160    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9161    break 2
9162  fi
9163done
9164  done
9165IFS=$as_save_IFS
9166
9167  ;;
9168esac
9169fi
9170SH=$ac_cv_path_SH
9171if test -n "$SH"; then
9172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9173$as_echo "$SH" >&6; }
9174else
9175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9176$as_echo "no" >&6; }
9177fi
9178
9179
9180        if test "x$SH" = x; then
9181          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9182        fi
9183      else
9184        # Otherwise we believe it is a complete path. Use it as it is.
9185        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
9186$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
9187        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9188$as_echo_n "checking for SH... " >&6; }
9189        if test ! -x "$tool_specified"; then
9190          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9191$as_echo "not found" >&6; }
9192          as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
9193        fi
9194        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9195$as_echo "$tool_specified" >&6; }
9196      fi
9197    fi
9198  fi
9199
9200
9201
9202  if test "x$SH" = x; then
9203    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
9204  fi
9205
9206
9207
9208
9209
9210  # Publish this variable in the help.
9211
9212
9213  if test "x$SORT" = x; then
9214    # The variable is not set by user, try to locate tool using the code snippet
9215    for ac_prog in sort
9216do
9217  # Extract the first word of "$ac_prog", so it can be a program name with args.
9218set dummy $ac_prog; ac_word=$2
9219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9220$as_echo_n "checking for $ac_word... " >&6; }
9221if ${ac_cv_path_SORT+:} false; then :
9222  $as_echo_n "(cached) " >&6
9223else
9224  case $SORT in
9225  [\\/]* | ?:[\\/]*)
9226  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9227  ;;
9228  *)
9229  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9230for as_dir in $PATH
9231do
9232  IFS=$as_save_IFS
9233  test -z "$as_dir" && as_dir=.
9234    for ac_exec_ext in '' $ac_executable_extensions; do
9235  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9236    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9237    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9238    break 2
9239  fi
9240done
9241  done
9242IFS=$as_save_IFS
9243
9244  ;;
9245esac
9246fi
9247SORT=$ac_cv_path_SORT
9248if test -n "$SORT"; then
9249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9250$as_echo "$SORT" >&6; }
9251else
9252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9253$as_echo "no" >&6; }
9254fi
9255
9256
9257  test -n "$SORT" && break
9258done
9259
9260  else
9261    # The variable is set, but is it from the command line or the environment?
9262
9263    # Try to remove the string !SORT! from our list.
9264    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
9265    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9266      # If it failed, the variable was not from the command line. Ignore it,
9267      # but warn the user (except for BASH, which is always set by the calling BASH).
9268      if test "xSORT" != xBASH; then
9269        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
9270$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
9271      fi
9272      # Try to locate tool using the code snippet
9273      for ac_prog in sort
9274do
9275  # Extract the first word of "$ac_prog", so it can be a program name with args.
9276set dummy $ac_prog; ac_word=$2
9277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9278$as_echo_n "checking for $ac_word... " >&6; }
9279if ${ac_cv_path_SORT+:} false; then :
9280  $as_echo_n "(cached) " >&6
9281else
9282  case $SORT in
9283  [\\/]* | ?:[\\/]*)
9284  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9285  ;;
9286  *)
9287  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9288for as_dir in $PATH
9289do
9290  IFS=$as_save_IFS
9291  test -z "$as_dir" && as_dir=.
9292    for ac_exec_ext in '' $ac_executable_extensions; do
9293  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9294    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9295    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9296    break 2
9297  fi
9298done
9299  done
9300IFS=$as_save_IFS
9301
9302  ;;
9303esac
9304fi
9305SORT=$ac_cv_path_SORT
9306if test -n "$SORT"; then
9307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9308$as_echo "$SORT" >&6; }
9309else
9310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9311$as_echo "no" >&6; }
9312fi
9313
9314
9315  test -n "$SORT" && break
9316done
9317
9318    else
9319      # If it succeeded, then it was overridden by the user. We will use it
9320      # for the tool.
9321
9322      # First remove it from the list of overridden variables, so we can test
9323      # for unknown variables in the end.
9324      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9325
9326      # Check if the provided tool contains a complete path.
9327      tool_specified="$SORT"
9328      tool_basename="${tool_specified##*/}"
9329      if test "x$tool_basename" = "x$tool_specified"; then
9330        # A command without a complete path is provided, search $PATH.
9331        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
9332$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
9333        # Extract the first word of "$tool_basename", so it can be a program name with args.
9334set dummy $tool_basename; ac_word=$2
9335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9336$as_echo_n "checking for $ac_word... " >&6; }
9337if ${ac_cv_path_SORT+:} false; then :
9338  $as_echo_n "(cached) " >&6
9339else
9340  case $SORT in
9341  [\\/]* | ?:[\\/]*)
9342  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9343  ;;
9344  *)
9345  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9346for as_dir in $PATH
9347do
9348  IFS=$as_save_IFS
9349  test -z "$as_dir" && as_dir=.
9350    for ac_exec_ext in '' $ac_executable_extensions; do
9351  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9352    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9353    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9354    break 2
9355  fi
9356done
9357  done
9358IFS=$as_save_IFS
9359
9360  ;;
9361esac
9362fi
9363SORT=$ac_cv_path_SORT
9364if test -n "$SORT"; then
9365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9366$as_echo "$SORT" >&6; }
9367else
9368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9369$as_echo "no" >&6; }
9370fi
9371
9372
9373        if test "x$SORT" = x; then
9374          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9375        fi
9376      else
9377        # Otherwise we believe it is a complete path. Use it as it is.
9378        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
9379$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
9380        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
9381$as_echo_n "checking for SORT... " >&6; }
9382        if test ! -x "$tool_specified"; then
9383          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9384$as_echo "not found" >&6; }
9385          as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
9386        fi
9387        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9388$as_echo "$tool_specified" >&6; }
9389      fi
9390    fi
9391  fi
9392
9393
9394
9395  if test "x$SORT" = x; then
9396    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
9397  fi
9398
9399
9400
9401
9402
9403  # Publish this variable in the help.
9404
9405
9406  if test "x$TAIL" = x; then
9407    # The variable is not set by user, try to locate tool using the code snippet
9408    for ac_prog in tail
9409do
9410  # Extract the first word of "$ac_prog", so it can be a program name with args.
9411set dummy $ac_prog; ac_word=$2
9412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9413$as_echo_n "checking for $ac_word... " >&6; }
9414if ${ac_cv_path_TAIL+:} false; then :
9415  $as_echo_n "(cached) " >&6
9416else
9417  case $TAIL in
9418  [\\/]* | ?:[\\/]*)
9419  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9420  ;;
9421  *)
9422  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9423for as_dir in $PATH
9424do
9425  IFS=$as_save_IFS
9426  test -z "$as_dir" && as_dir=.
9427    for ac_exec_ext in '' $ac_executable_extensions; do
9428  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9429    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9430    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9431    break 2
9432  fi
9433done
9434  done
9435IFS=$as_save_IFS
9436
9437  ;;
9438esac
9439fi
9440TAIL=$ac_cv_path_TAIL
9441if test -n "$TAIL"; then
9442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9443$as_echo "$TAIL" >&6; }
9444else
9445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9446$as_echo "no" >&6; }
9447fi
9448
9449
9450  test -n "$TAIL" && break
9451done
9452
9453  else
9454    # The variable is set, but is it from the command line or the environment?
9455
9456    # Try to remove the string !TAIL! from our list.
9457    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
9458    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9459      # If it failed, the variable was not from the command line. Ignore it,
9460      # but warn the user (except for BASH, which is always set by the calling BASH).
9461      if test "xTAIL" != xBASH; then
9462        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
9463$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
9464      fi
9465      # Try to locate tool using the code snippet
9466      for ac_prog in tail
9467do
9468  # Extract the first word of "$ac_prog", so it can be a program name with args.
9469set dummy $ac_prog; ac_word=$2
9470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9471$as_echo_n "checking for $ac_word... " >&6; }
9472if ${ac_cv_path_TAIL+:} false; then :
9473  $as_echo_n "(cached) " >&6
9474else
9475  case $TAIL in
9476  [\\/]* | ?:[\\/]*)
9477  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9478  ;;
9479  *)
9480  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9481for as_dir in $PATH
9482do
9483  IFS=$as_save_IFS
9484  test -z "$as_dir" && as_dir=.
9485    for ac_exec_ext in '' $ac_executable_extensions; do
9486  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9487    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9488    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9489    break 2
9490  fi
9491done
9492  done
9493IFS=$as_save_IFS
9494
9495  ;;
9496esac
9497fi
9498TAIL=$ac_cv_path_TAIL
9499if test -n "$TAIL"; then
9500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9501$as_echo "$TAIL" >&6; }
9502else
9503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9504$as_echo "no" >&6; }
9505fi
9506
9507
9508  test -n "$TAIL" && break
9509done
9510
9511    else
9512      # If it succeeded, then it was overridden by the user. We will use it
9513      # for the tool.
9514
9515      # First remove it from the list of overridden variables, so we can test
9516      # for unknown variables in the end.
9517      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9518
9519      # Check if the provided tool contains a complete path.
9520      tool_specified="$TAIL"
9521      tool_basename="${tool_specified##*/}"
9522      if test "x$tool_basename" = "x$tool_specified"; then
9523        # A command without a complete path is provided, search $PATH.
9524        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
9525$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
9526        # Extract the first word of "$tool_basename", so it can be a program name with args.
9527set dummy $tool_basename; ac_word=$2
9528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9529$as_echo_n "checking for $ac_word... " >&6; }
9530if ${ac_cv_path_TAIL+:} false; then :
9531  $as_echo_n "(cached) " >&6
9532else
9533  case $TAIL in
9534  [\\/]* | ?:[\\/]*)
9535  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9536  ;;
9537  *)
9538  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9539for as_dir in $PATH
9540do
9541  IFS=$as_save_IFS
9542  test -z "$as_dir" && as_dir=.
9543    for ac_exec_ext in '' $ac_executable_extensions; do
9544  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9545    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9546    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9547    break 2
9548  fi
9549done
9550  done
9551IFS=$as_save_IFS
9552
9553  ;;
9554esac
9555fi
9556TAIL=$ac_cv_path_TAIL
9557if test -n "$TAIL"; then
9558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9559$as_echo "$TAIL" >&6; }
9560else
9561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9562$as_echo "no" >&6; }
9563fi
9564
9565
9566        if test "x$TAIL" = x; then
9567          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9568        fi
9569      else
9570        # Otherwise we believe it is a complete path. Use it as it is.
9571        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
9572$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
9573        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
9574$as_echo_n "checking for TAIL... " >&6; }
9575        if test ! -x "$tool_specified"; then
9576          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9577$as_echo "not found" >&6; }
9578          as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
9579        fi
9580        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9581$as_echo "$tool_specified" >&6; }
9582      fi
9583    fi
9584  fi
9585
9586
9587
9588  if test "x$TAIL" = x; then
9589    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
9590  fi
9591
9592
9593
9594
9595
9596  # Publish this variable in the help.
9597
9598
9599  if test "x$TAR" = x; then
9600    # The variable is not set by user, try to locate tool using the code snippet
9601    for ac_prog in tar
9602do
9603  # Extract the first word of "$ac_prog", so it can be a program name with args.
9604set dummy $ac_prog; ac_word=$2
9605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9606$as_echo_n "checking for $ac_word... " >&6; }
9607if ${ac_cv_path_TAR+:} false; then :
9608  $as_echo_n "(cached) " >&6
9609else
9610  case $TAR in
9611  [\\/]* | ?:[\\/]*)
9612  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9613  ;;
9614  *)
9615  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9616for as_dir in $PATH
9617do
9618  IFS=$as_save_IFS
9619  test -z "$as_dir" && as_dir=.
9620    for ac_exec_ext in '' $ac_executable_extensions; do
9621  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9622    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9623    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9624    break 2
9625  fi
9626done
9627  done
9628IFS=$as_save_IFS
9629
9630  ;;
9631esac
9632fi
9633TAR=$ac_cv_path_TAR
9634if test -n "$TAR"; then
9635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9636$as_echo "$TAR" >&6; }
9637else
9638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9639$as_echo "no" >&6; }
9640fi
9641
9642
9643  test -n "$TAR" && break
9644done
9645
9646  else
9647    # The variable is set, but is it from the command line or the environment?
9648
9649    # Try to remove the string !TAR! from our list.
9650    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
9651    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9652      # If it failed, the variable was not from the command line. Ignore it,
9653      # but warn the user (except for BASH, which is always set by the calling BASH).
9654      if test "xTAR" != xBASH; then
9655        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
9656$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
9657      fi
9658      # Try to locate tool using the code snippet
9659      for ac_prog in tar
9660do
9661  # Extract the first word of "$ac_prog", so it can be a program name with args.
9662set dummy $ac_prog; ac_word=$2
9663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9664$as_echo_n "checking for $ac_word... " >&6; }
9665if ${ac_cv_path_TAR+:} false; then :
9666  $as_echo_n "(cached) " >&6
9667else
9668  case $TAR in
9669  [\\/]* | ?:[\\/]*)
9670  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9671  ;;
9672  *)
9673  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9674for as_dir in $PATH
9675do
9676  IFS=$as_save_IFS
9677  test -z "$as_dir" && as_dir=.
9678    for ac_exec_ext in '' $ac_executable_extensions; do
9679  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9680    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9681    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9682    break 2
9683  fi
9684done
9685  done
9686IFS=$as_save_IFS
9687
9688  ;;
9689esac
9690fi
9691TAR=$ac_cv_path_TAR
9692if test -n "$TAR"; then
9693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9694$as_echo "$TAR" >&6; }
9695else
9696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9697$as_echo "no" >&6; }
9698fi
9699
9700
9701  test -n "$TAR" && break
9702done
9703
9704    else
9705      # If it succeeded, then it was overridden by the user. We will use it
9706      # for the tool.
9707
9708      # First remove it from the list of overridden variables, so we can test
9709      # for unknown variables in the end.
9710      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9711
9712      # Check if the provided tool contains a complete path.
9713      tool_specified="$TAR"
9714      tool_basename="${tool_specified##*/}"
9715      if test "x$tool_basename" = "x$tool_specified"; then
9716        # A command without a complete path is provided, search $PATH.
9717        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
9718$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
9719        # Extract the first word of "$tool_basename", so it can be a program name with args.
9720set dummy $tool_basename; ac_word=$2
9721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9722$as_echo_n "checking for $ac_word... " >&6; }
9723if ${ac_cv_path_TAR+:} false; then :
9724  $as_echo_n "(cached) " >&6
9725else
9726  case $TAR in
9727  [\\/]* | ?:[\\/]*)
9728  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9729  ;;
9730  *)
9731  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9732for as_dir in $PATH
9733do
9734  IFS=$as_save_IFS
9735  test -z "$as_dir" && as_dir=.
9736    for ac_exec_ext in '' $ac_executable_extensions; do
9737  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9738    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9739    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9740    break 2
9741  fi
9742done
9743  done
9744IFS=$as_save_IFS
9745
9746  ;;
9747esac
9748fi
9749TAR=$ac_cv_path_TAR
9750if test -n "$TAR"; then
9751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9752$as_echo "$TAR" >&6; }
9753else
9754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9755$as_echo "no" >&6; }
9756fi
9757
9758
9759        if test "x$TAR" = x; then
9760          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9761        fi
9762      else
9763        # Otherwise we believe it is a complete path. Use it as it is.
9764        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
9765$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
9766        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9767$as_echo_n "checking for TAR... " >&6; }
9768        if test ! -x "$tool_specified"; then
9769          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9770$as_echo "not found" >&6; }
9771          as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
9772        fi
9773        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9774$as_echo "$tool_specified" >&6; }
9775      fi
9776    fi
9777  fi
9778
9779
9780
9781  if test "x$TAR" = x; then
9782    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
9783  fi
9784
9785
9786
9787
9788
9789  # Publish this variable in the help.
9790
9791
9792  if test "x$TEE" = x; then
9793    # The variable is not set by user, try to locate tool using the code snippet
9794    for ac_prog in tee
9795do
9796  # Extract the first word of "$ac_prog", so it can be a program name with args.
9797set dummy $ac_prog; ac_word=$2
9798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9799$as_echo_n "checking for $ac_word... " >&6; }
9800if ${ac_cv_path_TEE+:} false; then :
9801  $as_echo_n "(cached) " >&6
9802else
9803  case $TEE in
9804  [\\/]* | ?:[\\/]*)
9805  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9806  ;;
9807  *)
9808  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9809for as_dir in $PATH
9810do
9811  IFS=$as_save_IFS
9812  test -z "$as_dir" && as_dir=.
9813    for ac_exec_ext in '' $ac_executable_extensions; do
9814  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9815    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9816    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9817    break 2
9818  fi
9819done
9820  done
9821IFS=$as_save_IFS
9822
9823  ;;
9824esac
9825fi
9826TEE=$ac_cv_path_TEE
9827if test -n "$TEE"; then
9828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9829$as_echo "$TEE" >&6; }
9830else
9831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9832$as_echo "no" >&6; }
9833fi
9834
9835
9836  test -n "$TEE" && break
9837done
9838
9839  else
9840    # The variable is set, but is it from the command line or the environment?
9841
9842    # Try to remove the string !TEE! from our list.
9843    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
9844    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9845      # If it failed, the variable was not from the command line. Ignore it,
9846      # but warn the user (except for BASH, which is always set by the calling BASH).
9847      if test "xTEE" != xBASH; then
9848        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
9849$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
9850      fi
9851      # Try to locate tool using the code snippet
9852      for ac_prog in tee
9853do
9854  # Extract the first word of "$ac_prog", so it can be a program name with args.
9855set dummy $ac_prog; ac_word=$2
9856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9857$as_echo_n "checking for $ac_word... " >&6; }
9858if ${ac_cv_path_TEE+:} false; then :
9859  $as_echo_n "(cached) " >&6
9860else
9861  case $TEE in
9862  [\\/]* | ?:[\\/]*)
9863  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9864  ;;
9865  *)
9866  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9867for as_dir in $PATH
9868do
9869  IFS=$as_save_IFS
9870  test -z "$as_dir" && as_dir=.
9871    for ac_exec_ext in '' $ac_executable_extensions; do
9872  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9873    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9874    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9875    break 2
9876  fi
9877done
9878  done
9879IFS=$as_save_IFS
9880
9881  ;;
9882esac
9883fi
9884TEE=$ac_cv_path_TEE
9885if test -n "$TEE"; then
9886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9887$as_echo "$TEE" >&6; }
9888else
9889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9890$as_echo "no" >&6; }
9891fi
9892
9893
9894  test -n "$TEE" && break
9895done
9896
9897    else
9898      # If it succeeded, then it was overridden by the user. We will use it
9899      # for the tool.
9900
9901      # First remove it from the list of overridden variables, so we can test
9902      # for unknown variables in the end.
9903      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9904
9905      # Check if the provided tool contains a complete path.
9906      tool_specified="$TEE"
9907      tool_basename="${tool_specified##*/}"
9908      if test "x$tool_basename" = "x$tool_specified"; then
9909        # A command without a complete path is provided, search $PATH.
9910        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
9911$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
9912        # Extract the first word of "$tool_basename", so it can be a program name with args.
9913set dummy $tool_basename; ac_word=$2
9914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9915$as_echo_n "checking for $ac_word... " >&6; }
9916if ${ac_cv_path_TEE+:} false; then :
9917  $as_echo_n "(cached) " >&6
9918else
9919  case $TEE in
9920  [\\/]* | ?:[\\/]*)
9921  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9922  ;;
9923  *)
9924  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9925for as_dir in $PATH
9926do
9927  IFS=$as_save_IFS
9928  test -z "$as_dir" && as_dir=.
9929    for ac_exec_ext in '' $ac_executable_extensions; do
9930  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9931    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9932    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9933    break 2
9934  fi
9935done
9936  done
9937IFS=$as_save_IFS
9938
9939  ;;
9940esac
9941fi
9942TEE=$ac_cv_path_TEE
9943if test -n "$TEE"; then
9944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9945$as_echo "$TEE" >&6; }
9946else
9947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9948$as_echo "no" >&6; }
9949fi
9950
9951
9952        if test "x$TEE" = x; then
9953          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9954        fi
9955      else
9956        # Otherwise we believe it is a complete path. Use it as it is.
9957        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
9958$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
9959        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
9960$as_echo_n "checking for TEE... " >&6; }
9961        if test ! -x "$tool_specified"; then
9962          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9963$as_echo "not found" >&6; }
9964          as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
9965        fi
9966        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9967$as_echo "$tool_specified" >&6; }
9968      fi
9969    fi
9970  fi
9971
9972
9973
9974  if test "x$TEE" = x; then
9975    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
9976  fi
9977
9978
9979
9980
9981
9982  # Publish this variable in the help.
9983
9984
9985  if test "x$TOUCH" = x; then
9986    # The variable is not set by user, try to locate tool using the code snippet
9987    for ac_prog in touch
9988do
9989  # Extract the first word of "$ac_prog", so it can be a program name with args.
9990set dummy $ac_prog; ac_word=$2
9991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9992$as_echo_n "checking for $ac_word... " >&6; }
9993if ${ac_cv_path_TOUCH+:} false; then :
9994  $as_echo_n "(cached) " >&6
9995else
9996  case $TOUCH in
9997  [\\/]* | ?:[\\/]*)
9998  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
9999  ;;
10000  *)
10001  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10002for as_dir in $PATH
10003do
10004  IFS=$as_save_IFS
10005  test -z "$as_dir" && as_dir=.
10006    for ac_exec_ext in '' $ac_executable_extensions; do
10007  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10008    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10009    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10010    break 2
10011  fi
10012done
10013  done
10014IFS=$as_save_IFS
10015
10016  ;;
10017esac
10018fi
10019TOUCH=$ac_cv_path_TOUCH
10020if test -n "$TOUCH"; then
10021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10022$as_echo "$TOUCH" >&6; }
10023else
10024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10025$as_echo "no" >&6; }
10026fi
10027
10028
10029  test -n "$TOUCH" && break
10030done
10031
10032  else
10033    # The variable is set, but is it from the command line or the environment?
10034
10035    # Try to remove the string !TOUCH! from our list.
10036    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
10037    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10038      # If it failed, the variable was not from the command line. Ignore it,
10039      # but warn the user (except for BASH, which is always set by the calling BASH).
10040      if test "xTOUCH" != xBASH; then
10041        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
10042$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
10043      fi
10044      # Try to locate tool using the code snippet
10045      for ac_prog in touch
10046do
10047  # Extract the first word of "$ac_prog", so it can be a program name with args.
10048set dummy $ac_prog; ac_word=$2
10049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10050$as_echo_n "checking for $ac_word... " >&6; }
10051if ${ac_cv_path_TOUCH+:} false; then :
10052  $as_echo_n "(cached) " >&6
10053else
10054  case $TOUCH in
10055  [\\/]* | ?:[\\/]*)
10056  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10057  ;;
10058  *)
10059  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10060for as_dir in $PATH
10061do
10062  IFS=$as_save_IFS
10063  test -z "$as_dir" && as_dir=.
10064    for ac_exec_ext in '' $ac_executable_extensions; do
10065  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10066    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10067    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10068    break 2
10069  fi
10070done
10071  done
10072IFS=$as_save_IFS
10073
10074  ;;
10075esac
10076fi
10077TOUCH=$ac_cv_path_TOUCH
10078if test -n "$TOUCH"; then
10079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10080$as_echo "$TOUCH" >&6; }
10081else
10082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10083$as_echo "no" >&6; }
10084fi
10085
10086
10087  test -n "$TOUCH" && break
10088done
10089
10090    else
10091      # If it succeeded, then it was overridden by the user. We will use it
10092      # for the tool.
10093
10094      # First remove it from the list of overridden variables, so we can test
10095      # for unknown variables in the end.
10096      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10097
10098      # Check if the provided tool contains a complete path.
10099      tool_specified="$TOUCH"
10100      tool_basename="${tool_specified##*/}"
10101      if test "x$tool_basename" = "x$tool_specified"; then
10102        # A command without a complete path is provided, search $PATH.
10103        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
10104$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
10105        # Extract the first word of "$tool_basename", so it can be a program name with args.
10106set dummy $tool_basename; ac_word=$2
10107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10108$as_echo_n "checking for $ac_word... " >&6; }
10109if ${ac_cv_path_TOUCH+:} false; then :
10110  $as_echo_n "(cached) " >&6
10111else
10112  case $TOUCH in
10113  [\\/]* | ?:[\\/]*)
10114  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10115  ;;
10116  *)
10117  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10118for as_dir in $PATH
10119do
10120  IFS=$as_save_IFS
10121  test -z "$as_dir" && as_dir=.
10122    for ac_exec_ext in '' $ac_executable_extensions; do
10123  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10124    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10125    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10126    break 2
10127  fi
10128done
10129  done
10130IFS=$as_save_IFS
10131
10132  ;;
10133esac
10134fi
10135TOUCH=$ac_cv_path_TOUCH
10136if test -n "$TOUCH"; then
10137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10138$as_echo "$TOUCH" >&6; }
10139else
10140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10141$as_echo "no" >&6; }
10142fi
10143
10144
10145        if test "x$TOUCH" = x; then
10146          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10147        fi
10148      else
10149        # Otherwise we believe it is a complete path. Use it as it is.
10150        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
10151$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
10152        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10153$as_echo_n "checking for TOUCH... " >&6; }
10154        if test ! -x "$tool_specified"; then
10155          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10156$as_echo "not found" >&6; }
10157          as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
10158        fi
10159        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10160$as_echo "$tool_specified" >&6; }
10161      fi
10162    fi
10163  fi
10164
10165
10166
10167  if test "x$TOUCH" = x; then
10168    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
10169  fi
10170
10171
10172
10173
10174
10175  # Publish this variable in the help.
10176
10177
10178  if test "x$TR" = x; then
10179    # The variable is not set by user, try to locate tool using the code snippet
10180    for ac_prog in tr
10181do
10182  # Extract the first word of "$ac_prog", so it can be a program name with args.
10183set dummy $ac_prog; ac_word=$2
10184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10185$as_echo_n "checking for $ac_word... " >&6; }
10186if ${ac_cv_path_TR+:} false; then :
10187  $as_echo_n "(cached) " >&6
10188else
10189  case $TR in
10190  [\\/]* | ?:[\\/]*)
10191  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10192  ;;
10193  *)
10194  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10195for as_dir in $PATH
10196do
10197  IFS=$as_save_IFS
10198  test -z "$as_dir" && as_dir=.
10199    for ac_exec_ext in '' $ac_executable_extensions; do
10200  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10201    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10202    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10203    break 2
10204  fi
10205done
10206  done
10207IFS=$as_save_IFS
10208
10209  ;;
10210esac
10211fi
10212TR=$ac_cv_path_TR
10213if test -n "$TR"; then
10214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10215$as_echo "$TR" >&6; }
10216else
10217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10218$as_echo "no" >&6; }
10219fi
10220
10221
10222  test -n "$TR" && break
10223done
10224
10225  else
10226    # The variable is set, but is it from the command line or the environment?
10227
10228    # Try to remove the string !TR! from our list.
10229    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
10230    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10231      # If it failed, the variable was not from the command line. Ignore it,
10232      # but warn the user (except for BASH, which is always set by the calling BASH).
10233      if test "xTR" != xBASH; then
10234        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
10235$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
10236      fi
10237      # Try to locate tool using the code snippet
10238      for ac_prog in tr
10239do
10240  # Extract the first word of "$ac_prog", so it can be a program name with args.
10241set dummy $ac_prog; ac_word=$2
10242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10243$as_echo_n "checking for $ac_word... " >&6; }
10244if ${ac_cv_path_TR+:} false; then :
10245  $as_echo_n "(cached) " >&6
10246else
10247  case $TR in
10248  [\\/]* | ?:[\\/]*)
10249  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10250  ;;
10251  *)
10252  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10253for as_dir in $PATH
10254do
10255  IFS=$as_save_IFS
10256  test -z "$as_dir" && as_dir=.
10257    for ac_exec_ext in '' $ac_executable_extensions; do
10258  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10259    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10260    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10261    break 2
10262  fi
10263done
10264  done
10265IFS=$as_save_IFS
10266
10267  ;;
10268esac
10269fi
10270TR=$ac_cv_path_TR
10271if test -n "$TR"; then
10272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10273$as_echo "$TR" >&6; }
10274else
10275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10276$as_echo "no" >&6; }
10277fi
10278
10279
10280  test -n "$TR" && break
10281done
10282
10283    else
10284      # If it succeeded, then it was overridden by the user. We will use it
10285      # for the tool.
10286
10287      # First remove it from the list of overridden variables, so we can test
10288      # for unknown variables in the end.
10289      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10290
10291      # Check if the provided tool contains a complete path.
10292      tool_specified="$TR"
10293      tool_basename="${tool_specified##*/}"
10294      if test "x$tool_basename" = "x$tool_specified"; then
10295        # A command without a complete path is provided, search $PATH.
10296        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
10297$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
10298        # Extract the first word of "$tool_basename", so it can be a program name with args.
10299set dummy $tool_basename; ac_word=$2
10300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10301$as_echo_n "checking for $ac_word... " >&6; }
10302if ${ac_cv_path_TR+:} false; then :
10303  $as_echo_n "(cached) " >&6
10304else
10305  case $TR in
10306  [\\/]* | ?:[\\/]*)
10307  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10308  ;;
10309  *)
10310  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10311for as_dir in $PATH
10312do
10313  IFS=$as_save_IFS
10314  test -z "$as_dir" && as_dir=.
10315    for ac_exec_ext in '' $ac_executable_extensions; do
10316  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10317    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10318    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10319    break 2
10320  fi
10321done
10322  done
10323IFS=$as_save_IFS
10324
10325  ;;
10326esac
10327fi
10328TR=$ac_cv_path_TR
10329if test -n "$TR"; then
10330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10331$as_echo "$TR" >&6; }
10332else
10333  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10334$as_echo "no" >&6; }
10335fi
10336
10337
10338        if test "x$TR" = x; then
10339          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10340        fi
10341      else
10342        # Otherwise we believe it is a complete path. Use it as it is.
10343        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
10344$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
10345        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
10346$as_echo_n "checking for TR... " >&6; }
10347        if test ! -x "$tool_specified"; then
10348          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10349$as_echo "not found" >&6; }
10350          as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
10351        fi
10352        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10353$as_echo "$tool_specified" >&6; }
10354      fi
10355    fi
10356  fi
10357
10358
10359
10360  if test "x$TR" = x; then
10361    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
10362  fi
10363
10364
10365
10366
10367
10368  # Publish this variable in the help.
10369
10370
10371  if test "x$UNAME" = x; then
10372    # The variable is not set by user, try to locate tool using the code snippet
10373    for ac_prog in uname
10374do
10375  # Extract the first word of "$ac_prog", so it can be a program name with args.
10376set dummy $ac_prog; ac_word=$2
10377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10378$as_echo_n "checking for $ac_word... " >&6; }
10379if ${ac_cv_path_UNAME+:} false; then :
10380  $as_echo_n "(cached) " >&6
10381else
10382  case $UNAME in
10383  [\\/]* | ?:[\\/]*)
10384  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10385  ;;
10386  *)
10387  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10388for as_dir in $PATH
10389do
10390  IFS=$as_save_IFS
10391  test -z "$as_dir" && as_dir=.
10392    for ac_exec_ext in '' $ac_executable_extensions; do
10393  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10394    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10395    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10396    break 2
10397  fi
10398done
10399  done
10400IFS=$as_save_IFS
10401
10402  ;;
10403esac
10404fi
10405UNAME=$ac_cv_path_UNAME
10406if test -n "$UNAME"; then
10407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10408$as_echo "$UNAME" >&6; }
10409else
10410  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10411$as_echo "no" >&6; }
10412fi
10413
10414
10415  test -n "$UNAME" && break
10416done
10417
10418  else
10419    # The variable is set, but is it from the command line or the environment?
10420
10421    # Try to remove the string !UNAME! from our list.
10422    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
10423    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10424      # If it failed, the variable was not from the command line. Ignore it,
10425      # but warn the user (except for BASH, which is always set by the calling BASH).
10426      if test "xUNAME" != xBASH; then
10427        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
10428$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
10429      fi
10430      # Try to locate tool using the code snippet
10431      for ac_prog in uname
10432do
10433  # Extract the first word of "$ac_prog", so it can be a program name with args.
10434set dummy $ac_prog; ac_word=$2
10435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10436$as_echo_n "checking for $ac_word... " >&6; }
10437if ${ac_cv_path_UNAME+:} false; then :
10438  $as_echo_n "(cached) " >&6
10439else
10440  case $UNAME in
10441  [\\/]* | ?:[\\/]*)
10442  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10443  ;;
10444  *)
10445  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10446for as_dir in $PATH
10447do
10448  IFS=$as_save_IFS
10449  test -z "$as_dir" && as_dir=.
10450    for ac_exec_ext in '' $ac_executable_extensions; do
10451  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10452    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10453    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10454    break 2
10455  fi
10456done
10457  done
10458IFS=$as_save_IFS
10459
10460  ;;
10461esac
10462fi
10463UNAME=$ac_cv_path_UNAME
10464if test -n "$UNAME"; then
10465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10466$as_echo "$UNAME" >&6; }
10467else
10468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10469$as_echo "no" >&6; }
10470fi
10471
10472
10473  test -n "$UNAME" && break
10474done
10475
10476    else
10477      # If it succeeded, then it was overridden by the user. We will use it
10478      # for the tool.
10479
10480      # First remove it from the list of overridden variables, so we can test
10481      # for unknown variables in the end.
10482      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10483
10484      # Check if the provided tool contains a complete path.
10485      tool_specified="$UNAME"
10486      tool_basename="${tool_specified##*/}"
10487      if test "x$tool_basename" = "x$tool_specified"; then
10488        # A command without a complete path is provided, search $PATH.
10489        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
10490$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
10491        # Extract the first word of "$tool_basename", so it can be a program name with args.
10492set dummy $tool_basename; ac_word=$2
10493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10494$as_echo_n "checking for $ac_word... " >&6; }
10495if ${ac_cv_path_UNAME+:} false; then :
10496  $as_echo_n "(cached) " >&6
10497else
10498  case $UNAME in
10499  [\\/]* | ?:[\\/]*)
10500  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10501  ;;
10502  *)
10503  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10504for as_dir in $PATH
10505do
10506  IFS=$as_save_IFS
10507  test -z "$as_dir" && as_dir=.
10508    for ac_exec_ext in '' $ac_executable_extensions; do
10509  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10510    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10511    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10512    break 2
10513  fi
10514done
10515  done
10516IFS=$as_save_IFS
10517
10518  ;;
10519esac
10520fi
10521UNAME=$ac_cv_path_UNAME
10522if test -n "$UNAME"; then
10523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10524$as_echo "$UNAME" >&6; }
10525else
10526  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10527$as_echo "no" >&6; }
10528fi
10529
10530
10531        if test "x$UNAME" = x; then
10532          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10533        fi
10534      else
10535        # Otherwise we believe it is a complete path. Use it as it is.
10536        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
10537$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
10538        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
10539$as_echo_n "checking for UNAME... " >&6; }
10540        if test ! -x "$tool_specified"; then
10541          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10542$as_echo "not found" >&6; }
10543          as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
10544        fi
10545        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10546$as_echo "$tool_specified" >&6; }
10547      fi
10548    fi
10549  fi
10550
10551
10552
10553  if test "x$UNAME" = x; then
10554    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
10555  fi
10556
10557
10558
10559
10560
10561  # Publish this variable in the help.
10562
10563
10564  if test "x$UNIQ" = x; then
10565    # The variable is not set by user, try to locate tool using the code snippet
10566    for ac_prog in uniq
10567do
10568  # Extract the first word of "$ac_prog", so it can be a program name with args.
10569set dummy $ac_prog; ac_word=$2
10570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10571$as_echo_n "checking for $ac_word... " >&6; }
10572if ${ac_cv_path_UNIQ+:} false; then :
10573  $as_echo_n "(cached) " >&6
10574else
10575  case $UNIQ in
10576  [\\/]* | ?:[\\/]*)
10577  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10578  ;;
10579  *)
10580  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10581for as_dir in $PATH
10582do
10583  IFS=$as_save_IFS
10584  test -z "$as_dir" && as_dir=.
10585    for ac_exec_ext in '' $ac_executable_extensions; do
10586  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10587    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10588    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10589    break 2
10590  fi
10591done
10592  done
10593IFS=$as_save_IFS
10594
10595  ;;
10596esac
10597fi
10598UNIQ=$ac_cv_path_UNIQ
10599if test -n "$UNIQ"; then
10600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10601$as_echo "$UNIQ" >&6; }
10602else
10603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10604$as_echo "no" >&6; }
10605fi
10606
10607
10608  test -n "$UNIQ" && break
10609done
10610
10611  else
10612    # The variable is set, but is it from the command line or the environment?
10613
10614    # Try to remove the string !UNIQ! from our list.
10615    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
10616    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10617      # If it failed, the variable was not from the command line. Ignore it,
10618      # but warn the user (except for BASH, which is always set by the calling BASH).
10619      if test "xUNIQ" != xBASH; then
10620        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
10621$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
10622      fi
10623      # Try to locate tool using the code snippet
10624      for ac_prog in uniq
10625do
10626  # Extract the first word of "$ac_prog", so it can be a program name with args.
10627set dummy $ac_prog; ac_word=$2
10628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10629$as_echo_n "checking for $ac_word... " >&6; }
10630if ${ac_cv_path_UNIQ+:} false; then :
10631  $as_echo_n "(cached) " >&6
10632else
10633  case $UNIQ in
10634  [\\/]* | ?:[\\/]*)
10635  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10636  ;;
10637  *)
10638  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10639for as_dir in $PATH
10640do
10641  IFS=$as_save_IFS
10642  test -z "$as_dir" && as_dir=.
10643    for ac_exec_ext in '' $ac_executable_extensions; do
10644  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10645    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10646    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10647    break 2
10648  fi
10649done
10650  done
10651IFS=$as_save_IFS
10652
10653  ;;
10654esac
10655fi
10656UNIQ=$ac_cv_path_UNIQ
10657if test -n "$UNIQ"; then
10658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10659$as_echo "$UNIQ" >&6; }
10660else
10661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10662$as_echo "no" >&6; }
10663fi
10664
10665
10666  test -n "$UNIQ" && break
10667done
10668
10669    else
10670      # If it succeeded, then it was overridden by the user. We will use it
10671      # for the tool.
10672
10673      # First remove it from the list of overridden variables, so we can test
10674      # for unknown variables in the end.
10675      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10676
10677      # Check if the provided tool contains a complete path.
10678      tool_specified="$UNIQ"
10679      tool_basename="${tool_specified##*/}"
10680      if test "x$tool_basename" = "x$tool_specified"; then
10681        # A command without a complete path is provided, search $PATH.
10682        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
10683$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
10684        # Extract the first word of "$tool_basename", so it can be a program name with args.
10685set dummy $tool_basename; ac_word=$2
10686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10687$as_echo_n "checking for $ac_word... " >&6; }
10688if ${ac_cv_path_UNIQ+:} false; then :
10689  $as_echo_n "(cached) " >&6
10690else
10691  case $UNIQ in
10692  [\\/]* | ?:[\\/]*)
10693  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10694  ;;
10695  *)
10696  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10697for as_dir in $PATH
10698do
10699  IFS=$as_save_IFS
10700  test -z "$as_dir" && as_dir=.
10701    for ac_exec_ext in '' $ac_executable_extensions; do
10702  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10703    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10704    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10705    break 2
10706  fi
10707done
10708  done
10709IFS=$as_save_IFS
10710
10711  ;;
10712esac
10713fi
10714UNIQ=$ac_cv_path_UNIQ
10715if test -n "$UNIQ"; then
10716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10717$as_echo "$UNIQ" >&6; }
10718else
10719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10720$as_echo "no" >&6; }
10721fi
10722
10723
10724        if test "x$UNIQ" = x; then
10725          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10726        fi
10727      else
10728        # Otherwise we believe it is a complete path. Use it as it is.
10729        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
10730$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
10731        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
10732$as_echo_n "checking for UNIQ... " >&6; }
10733        if test ! -x "$tool_specified"; then
10734          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10735$as_echo "not found" >&6; }
10736          as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
10737        fi
10738        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10739$as_echo "$tool_specified" >&6; }
10740      fi
10741    fi
10742  fi
10743
10744
10745
10746  if test "x$UNIQ" = x; then
10747    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
10748  fi
10749
10750
10751
10752
10753
10754  # Publish this variable in the help.
10755
10756
10757  if test "x$WC" = x; then
10758    # The variable is not set by user, try to locate tool using the code snippet
10759    for ac_prog in wc
10760do
10761  # Extract the first word of "$ac_prog", so it can be a program name with args.
10762set dummy $ac_prog; ac_word=$2
10763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10764$as_echo_n "checking for $ac_word... " >&6; }
10765if ${ac_cv_path_WC+:} false; then :
10766  $as_echo_n "(cached) " >&6
10767else
10768  case $WC in
10769  [\\/]* | ?:[\\/]*)
10770  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10771  ;;
10772  *)
10773  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10774for as_dir in $PATH
10775do
10776  IFS=$as_save_IFS
10777  test -z "$as_dir" && as_dir=.
10778    for ac_exec_ext in '' $ac_executable_extensions; do
10779  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10780    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10781    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10782    break 2
10783  fi
10784done
10785  done
10786IFS=$as_save_IFS
10787
10788  ;;
10789esac
10790fi
10791WC=$ac_cv_path_WC
10792if test -n "$WC"; then
10793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10794$as_echo "$WC" >&6; }
10795else
10796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10797$as_echo "no" >&6; }
10798fi
10799
10800
10801  test -n "$WC" && break
10802done
10803
10804  else
10805    # The variable is set, but is it from the command line or the environment?
10806
10807    # Try to remove the string !WC! from our list.
10808    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
10809    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10810      # If it failed, the variable was not from the command line. Ignore it,
10811      # but warn the user (except for BASH, which is always set by the calling BASH).
10812      if test "xWC" != xBASH; then
10813        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
10814$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
10815      fi
10816      # Try to locate tool using the code snippet
10817      for ac_prog in wc
10818do
10819  # Extract the first word of "$ac_prog", so it can be a program name with args.
10820set dummy $ac_prog; ac_word=$2
10821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10822$as_echo_n "checking for $ac_word... " >&6; }
10823if ${ac_cv_path_WC+:} false; then :
10824  $as_echo_n "(cached) " >&6
10825else
10826  case $WC in
10827  [\\/]* | ?:[\\/]*)
10828  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10829  ;;
10830  *)
10831  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10832for as_dir in $PATH
10833do
10834  IFS=$as_save_IFS
10835  test -z "$as_dir" && as_dir=.
10836    for ac_exec_ext in '' $ac_executable_extensions; do
10837  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10838    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10839    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10840    break 2
10841  fi
10842done
10843  done
10844IFS=$as_save_IFS
10845
10846  ;;
10847esac
10848fi
10849WC=$ac_cv_path_WC
10850if test -n "$WC"; then
10851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10852$as_echo "$WC" >&6; }
10853else
10854  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10855$as_echo "no" >&6; }
10856fi
10857
10858
10859  test -n "$WC" && break
10860done
10861
10862    else
10863      # If it succeeded, then it was overridden by the user. We will use it
10864      # for the tool.
10865
10866      # First remove it from the list of overridden variables, so we can test
10867      # for unknown variables in the end.
10868      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10869
10870      # Check if the provided tool contains a complete path.
10871      tool_specified="$WC"
10872      tool_basename="${tool_specified##*/}"
10873      if test "x$tool_basename" = "x$tool_specified"; then
10874        # A command without a complete path is provided, search $PATH.
10875        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
10876$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
10877        # Extract the first word of "$tool_basename", so it can be a program name with args.
10878set dummy $tool_basename; ac_word=$2
10879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10880$as_echo_n "checking for $ac_word... " >&6; }
10881if ${ac_cv_path_WC+:} false; then :
10882  $as_echo_n "(cached) " >&6
10883else
10884  case $WC in
10885  [\\/]* | ?:[\\/]*)
10886  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10887  ;;
10888  *)
10889  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10890for as_dir in $PATH
10891do
10892  IFS=$as_save_IFS
10893  test -z "$as_dir" && as_dir=.
10894    for ac_exec_ext in '' $ac_executable_extensions; do
10895  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10896    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10897    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10898    break 2
10899  fi
10900done
10901  done
10902IFS=$as_save_IFS
10903
10904  ;;
10905esac
10906fi
10907WC=$ac_cv_path_WC
10908if test -n "$WC"; then
10909  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10910$as_echo "$WC" >&6; }
10911else
10912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10913$as_echo "no" >&6; }
10914fi
10915
10916
10917        if test "x$WC" = x; then
10918          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10919        fi
10920      else
10921        # Otherwise we believe it is a complete path. Use it as it is.
10922        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
10923$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
10924        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
10925$as_echo_n "checking for WC... " >&6; }
10926        if test ! -x "$tool_specified"; then
10927          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10928$as_echo "not found" >&6; }
10929          as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
10930        fi
10931        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10932$as_echo "$tool_specified" >&6; }
10933      fi
10934    fi
10935  fi
10936
10937
10938
10939  if test "x$WC" = x; then
10940    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
10941  fi
10942
10943
10944
10945
10946
10947  # Publish this variable in the help.
10948
10949
10950  if test "x$WHICH" = x; then
10951    # The variable is not set by user, try to locate tool using the code snippet
10952    for ac_prog in which
10953do
10954  # Extract the first word of "$ac_prog", so it can be a program name with args.
10955set dummy $ac_prog; ac_word=$2
10956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10957$as_echo_n "checking for $ac_word... " >&6; }
10958if ${ac_cv_path_WHICH+:} false; then :
10959  $as_echo_n "(cached) " >&6
10960else
10961  case $WHICH in
10962  [\\/]* | ?:[\\/]*)
10963  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
10964  ;;
10965  *)
10966  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10967for as_dir in $PATH
10968do
10969  IFS=$as_save_IFS
10970  test -z "$as_dir" && as_dir=.
10971    for ac_exec_ext in '' $ac_executable_extensions; do
10972  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10973    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
10974    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10975    break 2
10976  fi
10977done
10978  done
10979IFS=$as_save_IFS
10980
10981  ;;
10982esac
10983fi
10984WHICH=$ac_cv_path_WHICH
10985if test -n "$WHICH"; then
10986  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
10987$as_echo "$WHICH" >&6; }
10988else
10989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10990$as_echo "no" >&6; }
10991fi
10992
10993
10994  test -n "$WHICH" && break
10995done
10996
10997  else
10998    # The variable is set, but is it from the command line or the environment?
10999
11000    # Try to remove the string !WHICH! from our list.
11001    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
11002    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11003      # If it failed, the variable was not from the command line. Ignore it,
11004      # but warn the user (except for BASH, which is always set by the calling BASH).
11005      if test "xWHICH" != xBASH; then
11006        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
11007$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
11008      fi
11009      # Try to locate tool using the code snippet
11010      for ac_prog in which
11011do
11012  # Extract the first word of "$ac_prog", so it can be a program name with args.
11013set dummy $ac_prog; ac_word=$2
11014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11015$as_echo_n "checking for $ac_word... " >&6; }
11016if ${ac_cv_path_WHICH+:} false; then :
11017  $as_echo_n "(cached) " >&6
11018else
11019  case $WHICH in
11020  [\\/]* | ?:[\\/]*)
11021  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11022  ;;
11023  *)
11024  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11025for as_dir in $PATH
11026do
11027  IFS=$as_save_IFS
11028  test -z "$as_dir" && as_dir=.
11029    for ac_exec_ext in '' $ac_executable_extensions; do
11030  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11031    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11032    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11033    break 2
11034  fi
11035done
11036  done
11037IFS=$as_save_IFS
11038
11039  ;;
11040esac
11041fi
11042WHICH=$ac_cv_path_WHICH
11043if test -n "$WHICH"; then
11044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11045$as_echo "$WHICH" >&6; }
11046else
11047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11048$as_echo "no" >&6; }
11049fi
11050
11051
11052  test -n "$WHICH" && break
11053done
11054
11055    else
11056      # If it succeeded, then it was overridden by the user. We will use it
11057      # for the tool.
11058
11059      # First remove it from the list of overridden variables, so we can test
11060      # for unknown variables in the end.
11061      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11062
11063      # Check if the provided tool contains a complete path.
11064      tool_specified="$WHICH"
11065      tool_basename="${tool_specified##*/}"
11066      if test "x$tool_basename" = "x$tool_specified"; then
11067        # A command without a complete path is provided, search $PATH.
11068        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
11069$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
11070        # Extract the first word of "$tool_basename", so it can be a program name with args.
11071set dummy $tool_basename; ac_word=$2
11072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11073$as_echo_n "checking for $ac_word... " >&6; }
11074if ${ac_cv_path_WHICH+:} false; then :
11075  $as_echo_n "(cached) " >&6
11076else
11077  case $WHICH in
11078  [\\/]* | ?:[\\/]*)
11079  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11080  ;;
11081  *)
11082  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11083for as_dir in $PATH
11084do
11085  IFS=$as_save_IFS
11086  test -z "$as_dir" && as_dir=.
11087    for ac_exec_ext in '' $ac_executable_extensions; do
11088  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11089    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11090    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11091    break 2
11092  fi
11093done
11094  done
11095IFS=$as_save_IFS
11096
11097  ;;
11098esac
11099fi
11100WHICH=$ac_cv_path_WHICH
11101if test -n "$WHICH"; then
11102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11103$as_echo "$WHICH" >&6; }
11104else
11105  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11106$as_echo "no" >&6; }
11107fi
11108
11109
11110        if test "x$WHICH" = x; then
11111          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11112        fi
11113      else
11114        # Otherwise we believe it is a complete path. Use it as it is.
11115        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
11116$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
11117        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11118$as_echo_n "checking for WHICH... " >&6; }
11119        if test ! -x "$tool_specified"; then
11120          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11121$as_echo "not found" >&6; }
11122          as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
11123        fi
11124        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11125$as_echo "$tool_specified" >&6; }
11126      fi
11127    fi
11128  fi
11129
11130
11131
11132  if test "x$WHICH" = x; then
11133    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
11134  fi
11135
11136
11137
11138
11139
11140  # Publish this variable in the help.
11141
11142
11143  if test "x$XARGS" = x; then
11144    # The variable is not set by user, try to locate tool using the code snippet
11145    for ac_prog in xargs
11146do
11147  # Extract the first word of "$ac_prog", so it can be a program name with args.
11148set dummy $ac_prog; ac_word=$2
11149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11150$as_echo_n "checking for $ac_word... " >&6; }
11151if ${ac_cv_path_XARGS+:} false; then :
11152  $as_echo_n "(cached) " >&6
11153else
11154  case $XARGS in
11155  [\\/]* | ?:[\\/]*)
11156  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11157  ;;
11158  *)
11159  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11160for as_dir in $PATH
11161do
11162  IFS=$as_save_IFS
11163  test -z "$as_dir" && as_dir=.
11164    for ac_exec_ext in '' $ac_executable_extensions; do
11165  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11166    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11167    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11168    break 2
11169  fi
11170done
11171  done
11172IFS=$as_save_IFS
11173
11174  ;;
11175esac
11176fi
11177XARGS=$ac_cv_path_XARGS
11178if test -n "$XARGS"; then
11179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11180$as_echo "$XARGS" >&6; }
11181else
11182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11183$as_echo "no" >&6; }
11184fi
11185
11186
11187  test -n "$XARGS" && break
11188done
11189
11190  else
11191    # The variable is set, but is it from the command line or the environment?
11192
11193    # Try to remove the string !XARGS! from our list.
11194    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
11195    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11196      # If it failed, the variable was not from the command line. Ignore it,
11197      # but warn the user (except for BASH, which is always set by the calling BASH).
11198      if test "xXARGS" != xBASH; then
11199        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
11200$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
11201      fi
11202      # Try to locate tool using the code snippet
11203      for ac_prog in xargs
11204do
11205  # Extract the first word of "$ac_prog", so it can be a program name with args.
11206set dummy $ac_prog; ac_word=$2
11207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11208$as_echo_n "checking for $ac_word... " >&6; }
11209if ${ac_cv_path_XARGS+:} false; then :
11210  $as_echo_n "(cached) " >&6
11211else
11212  case $XARGS in
11213  [\\/]* | ?:[\\/]*)
11214  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11215  ;;
11216  *)
11217  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11218for as_dir in $PATH
11219do
11220  IFS=$as_save_IFS
11221  test -z "$as_dir" && as_dir=.
11222    for ac_exec_ext in '' $ac_executable_extensions; do
11223  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11224    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11225    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11226    break 2
11227  fi
11228done
11229  done
11230IFS=$as_save_IFS
11231
11232  ;;
11233esac
11234fi
11235XARGS=$ac_cv_path_XARGS
11236if test -n "$XARGS"; then
11237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11238$as_echo "$XARGS" >&6; }
11239else
11240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11241$as_echo "no" >&6; }
11242fi
11243
11244
11245  test -n "$XARGS" && break
11246done
11247
11248    else
11249      # If it succeeded, then it was overridden by the user. We will use it
11250      # for the tool.
11251
11252      # First remove it from the list of overridden variables, so we can test
11253      # for unknown variables in the end.
11254      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11255
11256      # Check if the provided tool contains a complete path.
11257      tool_specified="$XARGS"
11258      tool_basename="${tool_specified##*/}"
11259      if test "x$tool_basename" = "x$tool_specified"; then
11260        # A command without a complete path is provided, search $PATH.
11261        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
11262$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
11263        # Extract the first word of "$tool_basename", so it can be a program name with args.
11264set dummy $tool_basename; ac_word=$2
11265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11266$as_echo_n "checking for $ac_word... " >&6; }
11267if ${ac_cv_path_XARGS+:} false; then :
11268  $as_echo_n "(cached) " >&6
11269else
11270  case $XARGS in
11271  [\\/]* | ?:[\\/]*)
11272  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11273  ;;
11274  *)
11275  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11276for as_dir in $PATH
11277do
11278  IFS=$as_save_IFS
11279  test -z "$as_dir" && as_dir=.
11280    for ac_exec_ext in '' $ac_executable_extensions; do
11281  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11282    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11283    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11284    break 2
11285  fi
11286done
11287  done
11288IFS=$as_save_IFS
11289
11290  ;;
11291esac
11292fi
11293XARGS=$ac_cv_path_XARGS
11294if test -n "$XARGS"; then
11295  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11296$as_echo "$XARGS" >&6; }
11297else
11298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11299$as_echo "no" >&6; }
11300fi
11301
11302
11303        if test "x$XARGS" = x; then
11304          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11305        fi
11306      else
11307        # Otherwise we believe it is a complete path. Use it as it is.
11308        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
11309$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
11310        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
11311$as_echo_n "checking for XARGS... " >&6; }
11312        if test ! -x "$tool_specified"; then
11313          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11314$as_echo "not found" >&6; }
11315          as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
11316        fi
11317        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11318$as_echo "$tool_specified" >&6; }
11319      fi
11320    fi
11321  fi
11322
11323
11324
11325  if test "x$XARGS" = x; then
11326    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
11327  fi
11328
11329
11330
11331  # Then required tools that require some special treatment.
11332
11333
11334  # Publish this variable in the help.
11335
11336
11337  if test "x$AWK" = x; then
11338    # The variable is not set by user, try to locate tool using the code snippet
11339    for ac_prog in gawk mawk nawk awk
11340do
11341  # Extract the first word of "$ac_prog", so it can be a program name with args.
11342set dummy $ac_prog; ac_word=$2
11343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11344$as_echo_n "checking for $ac_word... " >&6; }
11345if ${ac_cv_prog_AWK+:} false; then :
11346  $as_echo_n "(cached) " >&6
11347else
11348  if test -n "$AWK"; then
11349  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11350else
11351as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11352for as_dir in $PATH
11353do
11354  IFS=$as_save_IFS
11355  test -z "$as_dir" && as_dir=.
11356    for ac_exec_ext in '' $ac_executable_extensions; do
11357  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11358    ac_cv_prog_AWK="$ac_prog"
11359    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11360    break 2
11361  fi
11362done
11363  done
11364IFS=$as_save_IFS
11365
11366fi
11367fi
11368AWK=$ac_cv_prog_AWK
11369if test -n "$AWK"; then
11370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11371$as_echo "$AWK" >&6; }
11372else
11373  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11374$as_echo "no" >&6; }
11375fi
11376
11377
11378  test -n "$AWK" && break
11379done
11380
11381  else
11382    # The variable is set, but is it from the command line or the environment?
11383
11384    # Try to remove the string !AWK! from our list.
11385    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
11386    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11387      # If it failed, the variable was not from the command line. Ignore it,
11388      # but warn the user (except for BASH, which is always set by the calling BASH).
11389      if test "xAWK" != xBASH; then
11390        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
11391$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
11392      fi
11393      # Try to locate tool using the code snippet
11394      for ac_prog in gawk mawk nawk awk
11395do
11396  # Extract the first word of "$ac_prog", so it can be a program name with args.
11397set dummy $ac_prog; ac_word=$2
11398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11399$as_echo_n "checking for $ac_word... " >&6; }
11400if ${ac_cv_prog_AWK+:} false; then :
11401  $as_echo_n "(cached) " >&6
11402else
11403  if test -n "$AWK"; then
11404  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11405else
11406as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11407for as_dir in $PATH
11408do
11409  IFS=$as_save_IFS
11410  test -z "$as_dir" && as_dir=.
11411    for ac_exec_ext in '' $ac_executable_extensions; do
11412  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11413    ac_cv_prog_AWK="$ac_prog"
11414    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11415    break 2
11416  fi
11417done
11418  done
11419IFS=$as_save_IFS
11420
11421fi
11422fi
11423AWK=$ac_cv_prog_AWK
11424if test -n "$AWK"; then
11425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11426$as_echo "$AWK" >&6; }
11427else
11428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11429$as_echo "no" >&6; }
11430fi
11431
11432
11433  test -n "$AWK" && break
11434done
11435
11436    else
11437      # If it succeeded, then it was overridden by the user. We will use it
11438      # for the tool.
11439
11440      # First remove it from the list of overridden variables, so we can test
11441      # for unknown variables in the end.
11442      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11443
11444      # Check if the provided tool contains a complete path.
11445      tool_specified="$AWK"
11446      tool_basename="${tool_specified##*/}"
11447      if test "x$tool_basename" = "x$tool_specified"; then
11448        # A command without a complete path is provided, search $PATH.
11449        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
11450$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
11451        # Extract the first word of "$tool_basename", so it can be a program name with args.
11452set dummy $tool_basename; ac_word=$2
11453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11454$as_echo_n "checking for $ac_word... " >&6; }
11455if ${ac_cv_path_AWK+:} false; then :
11456  $as_echo_n "(cached) " >&6
11457else
11458  case $AWK in
11459  [\\/]* | ?:[\\/]*)
11460  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
11461  ;;
11462  *)
11463  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11464for as_dir in $PATH
11465do
11466  IFS=$as_save_IFS
11467  test -z "$as_dir" && as_dir=.
11468    for ac_exec_ext in '' $ac_executable_extensions; do
11469  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11470    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
11471    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11472    break 2
11473  fi
11474done
11475  done
11476IFS=$as_save_IFS
11477
11478  ;;
11479esac
11480fi
11481AWK=$ac_cv_path_AWK
11482if test -n "$AWK"; then
11483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11484$as_echo "$AWK" >&6; }
11485else
11486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11487$as_echo "no" >&6; }
11488fi
11489
11490
11491        if test "x$AWK" = x; then
11492          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11493        fi
11494      else
11495        # Otherwise we believe it is a complete path. Use it as it is.
11496        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
11497$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
11498        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
11499$as_echo_n "checking for AWK... " >&6; }
11500        if test ! -x "$tool_specified"; then
11501          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11502$as_echo "not found" >&6; }
11503          as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
11504        fi
11505        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11506$as_echo "$tool_specified" >&6; }
11507      fi
11508    fi
11509  fi
11510
11511
11512  if test "x$AWK" = x; then
11513    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
11514  fi
11515
11516
11517
11518
11519  # Publish this variable in the help.
11520
11521
11522  if test "x$GREP" = x; then
11523    # The variable is not set by user, try to locate tool using the code snippet
11524    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11525$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11526if ${ac_cv_path_GREP+:} false; then :
11527  $as_echo_n "(cached) " >&6
11528else
11529  if test -z "$GREP"; then
11530  ac_path_GREP_found=false
11531  # Loop through the user's path and test for each of PROGNAME-LIST
11532  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11533for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11534do
11535  IFS=$as_save_IFS
11536  test -z "$as_dir" && as_dir=.
11537    for ac_prog in grep ggrep; do
11538    for ac_exec_ext in '' $ac_executable_extensions; do
11539      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11540      as_fn_executable_p "$ac_path_GREP" || continue
11541# Check for GNU ac_path_GREP and select it if it is found.
11542  # Check for GNU $ac_path_GREP
11543case `"$ac_path_GREP" --version 2>&1` in
11544*GNU*)
11545  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11546*)
11547  ac_count=0
11548  $as_echo_n 0123456789 >"conftest.in"
11549  while :
11550  do
11551    cat "conftest.in" "conftest.in" >"conftest.tmp"
11552    mv "conftest.tmp" "conftest.in"
11553    cp "conftest.in" "conftest.nl"
11554    $as_echo 'GREP' >> "conftest.nl"
11555    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11556    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11557    as_fn_arith $ac_count + 1 && ac_count=$as_val
11558    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11559      # Best one so far, save it but keep looking for a better one
11560      ac_cv_path_GREP="$ac_path_GREP"
11561      ac_path_GREP_max=$ac_count
11562    fi
11563    # 10*(2^10) chars as input seems more than enough
11564    test $ac_count -gt 10 && break
11565  done
11566  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11567esac
11568
11569      $ac_path_GREP_found && break 3
11570    done
11571  done
11572  done
11573IFS=$as_save_IFS
11574  if test -z "$ac_cv_path_GREP"; then
11575    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11576  fi
11577else
11578  ac_cv_path_GREP=$GREP
11579fi
11580
11581fi
11582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11583$as_echo "$ac_cv_path_GREP" >&6; }
11584 GREP="$ac_cv_path_GREP"
11585
11586
11587  else
11588    # The variable is set, but is it from the command line or the environment?
11589
11590    # Try to remove the string !GREP! from our list.
11591    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
11592    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11593      # If it failed, the variable was not from the command line. Ignore it,
11594      # but warn the user (except for BASH, which is always set by the calling BASH).
11595      if test "xGREP" != xBASH; then
11596        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
11597$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
11598      fi
11599      # Try to locate tool using the code snippet
11600      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11601$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11602if ${ac_cv_path_GREP+:} false; then :
11603  $as_echo_n "(cached) " >&6
11604else
11605  if test -z "$GREP"; then
11606  ac_path_GREP_found=false
11607  # Loop through the user's path and test for each of PROGNAME-LIST
11608  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11609for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11610do
11611  IFS=$as_save_IFS
11612  test -z "$as_dir" && as_dir=.
11613    for ac_prog in grep ggrep; do
11614    for ac_exec_ext in '' $ac_executable_extensions; do
11615      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11616      as_fn_executable_p "$ac_path_GREP" || continue
11617# Check for GNU ac_path_GREP and select it if it is found.
11618  # Check for GNU $ac_path_GREP
11619case `"$ac_path_GREP" --version 2>&1` in
11620*GNU*)
11621  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11622*)
11623  ac_count=0
11624  $as_echo_n 0123456789 >"conftest.in"
11625  while :
11626  do
11627    cat "conftest.in" "conftest.in" >"conftest.tmp"
11628    mv "conftest.tmp" "conftest.in"
11629    cp "conftest.in" "conftest.nl"
11630    $as_echo 'GREP' >> "conftest.nl"
11631    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11632    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11633    as_fn_arith $ac_count + 1 && ac_count=$as_val
11634    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11635      # Best one so far, save it but keep looking for a better one
11636      ac_cv_path_GREP="$ac_path_GREP"
11637      ac_path_GREP_max=$ac_count
11638    fi
11639    # 10*(2^10) chars as input seems more than enough
11640    test $ac_count -gt 10 && break
11641  done
11642  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11643esac
11644
11645      $ac_path_GREP_found && break 3
11646    done
11647  done
11648  done
11649IFS=$as_save_IFS
11650  if test -z "$ac_cv_path_GREP"; then
11651    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11652  fi
11653else
11654  ac_cv_path_GREP=$GREP
11655fi
11656
11657fi
11658{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11659$as_echo "$ac_cv_path_GREP" >&6; }
11660 GREP="$ac_cv_path_GREP"
11661
11662
11663    else
11664      # If it succeeded, then it was overridden by the user. We will use it
11665      # for the tool.
11666
11667      # First remove it from the list of overridden variables, so we can test
11668      # for unknown variables in the end.
11669      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11670
11671      # Check if the provided tool contains a complete path.
11672      tool_specified="$GREP"
11673      tool_basename="${tool_specified##*/}"
11674      if test "x$tool_basename" = "x$tool_specified"; then
11675        # A command without a complete path is provided, search $PATH.
11676        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
11677$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
11678        # Extract the first word of "$tool_basename", so it can be a program name with args.
11679set dummy $tool_basename; ac_word=$2
11680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11681$as_echo_n "checking for $ac_word... " >&6; }
11682if ${ac_cv_path_GREP+:} false; then :
11683  $as_echo_n "(cached) " >&6
11684else
11685  case $GREP in
11686  [\\/]* | ?:[\\/]*)
11687  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
11688  ;;
11689  *)
11690  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11691for as_dir in $PATH
11692do
11693  IFS=$as_save_IFS
11694  test -z "$as_dir" && as_dir=.
11695    for ac_exec_ext in '' $ac_executable_extensions; do
11696  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11697    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
11698    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11699    break 2
11700  fi
11701done
11702  done
11703IFS=$as_save_IFS
11704
11705  ;;
11706esac
11707fi
11708GREP=$ac_cv_path_GREP
11709if test -n "$GREP"; then
11710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
11711$as_echo "$GREP" >&6; }
11712else
11713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11714$as_echo "no" >&6; }
11715fi
11716
11717
11718        if test "x$GREP" = x; then
11719          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11720        fi
11721      else
11722        # Otherwise we believe it is a complete path. Use it as it is.
11723        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
11724$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
11725        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
11726$as_echo_n "checking for GREP... " >&6; }
11727        if test ! -x "$tool_specified"; then
11728          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11729$as_echo "not found" >&6; }
11730          as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
11731        fi
11732        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11733$as_echo "$tool_specified" >&6; }
11734      fi
11735    fi
11736  fi
11737
11738
11739  if test "x$GREP" = x; then
11740    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
11741  fi
11742
11743
11744
11745
11746  # Publish this variable in the help.
11747
11748
11749  if test "x$EGREP" = x; then
11750    # The variable is not set by user, try to locate tool using the code snippet
11751    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11752$as_echo_n "checking for egrep... " >&6; }
11753if ${ac_cv_path_EGREP+:} false; then :
11754  $as_echo_n "(cached) " >&6
11755else
11756  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11757   then ac_cv_path_EGREP="$GREP -E"
11758   else
11759     if test -z "$EGREP"; then
11760  ac_path_EGREP_found=false
11761  # Loop through the user's path and test for each of PROGNAME-LIST
11762  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11763for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11764do
11765  IFS=$as_save_IFS
11766  test -z "$as_dir" && as_dir=.
11767    for ac_prog in egrep; do
11768    for ac_exec_ext in '' $ac_executable_extensions; do
11769      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11770      as_fn_executable_p "$ac_path_EGREP" || continue
11771# Check for GNU ac_path_EGREP and select it if it is found.
11772  # Check for GNU $ac_path_EGREP
11773case `"$ac_path_EGREP" --version 2>&1` in
11774*GNU*)
11775  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11776*)
11777  ac_count=0
11778  $as_echo_n 0123456789 >"conftest.in"
11779  while :
11780  do
11781    cat "conftest.in" "conftest.in" >"conftest.tmp"
11782    mv "conftest.tmp" "conftest.in"
11783    cp "conftest.in" "conftest.nl"
11784    $as_echo 'EGREP' >> "conftest.nl"
11785    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11786    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11787    as_fn_arith $ac_count + 1 && ac_count=$as_val
11788    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11789      # Best one so far, save it but keep looking for a better one
11790      ac_cv_path_EGREP="$ac_path_EGREP"
11791      ac_path_EGREP_max=$ac_count
11792    fi
11793    # 10*(2^10) chars as input seems more than enough
11794    test $ac_count -gt 10 && break
11795  done
11796  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11797esac
11798
11799      $ac_path_EGREP_found && break 3
11800    done
11801  done
11802  done
11803IFS=$as_save_IFS
11804  if test -z "$ac_cv_path_EGREP"; then
11805    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11806  fi
11807else
11808  ac_cv_path_EGREP=$EGREP
11809fi
11810
11811   fi
11812fi
11813{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11814$as_echo "$ac_cv_path_EGREP" >&6; }
11815 EGREP="$ac_cv_path_EGREP"
11816
11817
11818  else
11819    # The variable is set, but is it from the command line or the environment?
11820
11821    # Try to remove the string !EGREP! from our list.
11822    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
11823    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11824      # If it failed, the variable was not from the command line. Ignore it,
11825      # but warn the user (except for BASH, which is always set by the calling BASH).
11826      if test "xEGREP" != xBASH; then
11827        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
11828$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
11829      fi
11830      # Try to locate tool using the code snippet
11831      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11832$as_echo_n "checking for egrep... " >&6; }
11833if ${ac_cv_path_EGREP+:} false; then :
11834  $as_echo_n "(cached) " >&6
11835else
11836  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11837   then ac_cv_path_EGREP="$GREP -E"
11838   else
11839     if test -z "$EGREP"; then
11840  ac_path_EGREP_found=false
11841  # Loop through the user's path and test for each of PROGNAME-LIST
11842  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11843for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11844do
11845  IFS=$as_save_IFS
11846  test -z "$as_dir" && as_dir=.
11847    for ac_prog in egrep; do
11848    for ac_exec_ext in '' $ac_executable_extensions; do
11849      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11850      as_fn_executable_p "$ac_path_EGREP" || continue
11851# Check for GNU ac_path_EGREP and select it if it is found.
11852  # Check for GNU $ac_path_EGREP
11853case `"$ac_path_EGREP" --version 2>&1` in
11854*GNU*)
11855  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11856*)
11857  ac_count=0
11858  $as_echo_n 0123456789 >"conftest.in"
11859  while :
11860  do
11861    cat "conftest.in" "conftest.in" >"conftest.tmp"
11862    mv "conftest.tmp" "conftest.in"
11863    cp "conftest.in" "conftest.nl"
11864    $as_echo 'EGREP' >> "conftest.nl"
11865    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11866    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11867    as_fn_arith $ac_count + 1 && ac_count=$as_val
11868    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11869      # Best one so far, save it but keep looking for a better one
11870      ac_cv_path_EGREP="$ac_path_EGREP"
11871      ac_path_EGREP_max=$ac_count
11872    fi
11873    # 10*(2^10) chars as input seems more than enough
11874    test $ac_count -gt 10 && break
11875  done
11876  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11877esac
11878
11879      $ac_path_EGREP_found && break 3
11880    done
11881  done
11882  done
11883IFS=$as_save_IFS
11884  if test -z "$ac_cv_path_EGREP"; then
11885    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11886  fi
11887else
11888  ac_cv_path_EGREP=$EGREP
11889fi
11890
11891   fi
11892fi
11893{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11894$as_echo "$ac_cv_path_EGREP" >&6; }
11895 EGREP="$ac_cv_path_EGREP"
11896
11897
11898    else
11899      # If it succeeded, then it was overridden by the user. We will use it
11900      # for the tool.
11901
11902      # First remove it from the list of overridden variables, so we can test
11903      # for unknown variables in the end.
11904      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11905
11906      # Check if the provided tool contains a complete path.
11907      tool_specified="$EGREP"
11908      tool_basename="${tool_specified##*/}"
11909      if test "x$tool_basename" = "x$tool_specified"; then
11910        # A command without a complete path is provided, search $PATH.
11911        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
11912$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
11913        # Extract the first word of "$tool_basename", so it can be a program name with args.
11914set dummy $tool_basename; ac_word=$2
11915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11916$as_echo_n "checking for $ac_word... " >&6; }
11917if ${ac_cv_path_EGREP+:} false; then :
11918  $as_echo_n "(cached) " >&6
11919else
11920  case $EGREP in
11921  [\\/]* | ?:[\\/]*)
11922  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
11923  ;;
11924  *)
11925  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11926for as_dir in $PATH
11927do
11928  IFS=$as_save_IFS
11929  test -z "$as_dir" && as_dir=.
11930    for ac_exec_ext in '' $ac_executable_extensions; do
11931  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11932    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
11933    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11934    break 2
11935  fi
11936done
11937  done
11938IFS=$as_save_IFS
11939
11940  ;;
11941esac
11942fi
11943EGREP=$ac_cv_path_EGREP
11944if test -n "$EGREP"; then
11945  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
11946$as_echo "$EGREP" >&6; }
11947else
11948  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11949$as_echo "no" >&6; }
11950fi
11951
11952
11953        if test "x$EGREP" = x; then
11954          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11955        fi
11956      else
11957        # Otherwise we believe it is a complete path. Use it as it is.
11958        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
11959$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
11960        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
11961$as_echo_n "checking for EGREP... " >&6; }
11962        if test ! -x "$tool_specified"; then
11963          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11964$as_echo "not found" >&6; }
11965          as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
11966        fi
11967        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11968$as_echo "$tool_specified" >&6; }
11969      fi
11970    fi
11971  fi
11972
11973
11974  if test "x$EGREP" = x; then
11975    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
11976  fi
11977
11978
11979
11980
11981  # Publish this variable in the help.
11982
11983
11984  if test "x$FGREP" = x; then
11985    # The variable is not set by user, try to locate tool using the code snippet
11986    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
11987$as_echo_n "checking for fgrep... " >&6; }
11988if ${ac_cv_path_FGREP+:} false; then :
11989  $as_echo_n "(cached) " >&6
11990else
11991  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
11992   then ac_cv_path_FGREP="$GREP -F"
11993   else
11994     if test -z "$FGREP"; then
11995  ac_path_FGREP_found=false
11996  # Loop through the user's path and test for each of PROGNAME-LIST
11997  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11998for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11999do
12000  IFS=$as_save_IFS
12001  test -z "$as_dir" && as_dir=.
12002    for ac_prog in fgrep; do
12003    for ac_exec_ext in '' $ac_executable_extensions; do
12004      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12005      as_fn_executable_p "$ac_path_FGREP" || continue
12006# Check for GNU ac_path_FGREP and select it if it is found.
12007  # Check for GNU $ac_path_FGREP
12008case `"$ac_path_FGREP" --version 2>&1` in
12009*GNU*)
12010  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12011*)
12012  ac_count=0
12013  $as_echo_n 0123456789 >"conftest.in"
12014  while :
12015  do
12016    cat "conftest.in" "conftest.in" >"conftest.tmp"
12017    mv "conftest.tmp" "conftest.in"
12018    cp "conftest.in" "conftest.nl"
12019    $as_echo 'FGREP' >> "conftest.nl"
12020    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12021    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12022    as_fn_arith $ac_count + 1 && ac_count=$as_val
12023    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12024      # Best one so far, save it but keep looking for a better one
12025      ac_cv_path_FGREP="$ac_path_FGREP"
12026      ac_path_FGREP_max=$ac_count
12027    fi
12028    # 10*(2^10) chars as input seems more than enough
12029    test $ac_count -gt 10 && break
12030  done
12031  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12032esac
12033
12034      $ac_path_FGREP_found && break 3
12035    done
12036  done
12037  done
12038IFS=$as_save_IFS
12039  if test -z "$ac_cv_path_FGREP"; then
12040    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12041  fi
12042else
12043  ac_cv_path_FGREP=$FGREP
12044fi
12045
12046   fi
12047fi
12048{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12049$as_echo "$ac_cv_path_FGREP" >&6; }
12050 FGREP="$ac_cv_path_FGREP"
12051
12052
12053  else
12054    # The variable is set, but is it from the command line or the environment?
12055
12056    # Try to remove the string !FGREP! from our list.
12057    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
12058    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12059      # If it failed, the variable was not from the command line. Ignore it,
12060      # but warn the user (except for BASH, which is always set by the calling BASH).
12061      if test "xFGREP" != xBASH; then
12062        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
12063$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
12064      fi
12065      # Try to locate tool using the code snippet
12066      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12067$as_echo_n "checking for fgrep... " >&6; }
12068if ${ac_cv_path_FGREP+:} false; then :
12069  $as_echo_n "(cached) " >&6
12070else
12071  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12072   then ac_cv_path_FGREP="$GREP -F"
12073   else
12074     if test -z "$FGREP"; then
12075  ac_path_FGREP_found=false
12076  # Loop through the user's path and test for each of PROGNAME-LIST
12077  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12078for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12079do
12080  IFS=$as_save_IFS
12081  test -z "$as_dir" && as_dir=.
12082    for ac_prog in fgrep; do
12083    for ac_exec_ext in '' $ac_executable_extensions; do
12084      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12085      as_fn_executable_p "$ac_path_FGREP" || continue
12086# Check for GNU ac_path_FGREP and select it if it is found.
12087  # Check for GNU $ac_path_FGREP
12088case `"$ac_path_FGREP" --version 2>&1` in
12089*GNU*)
12090  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12091*)
12092  ac_count=0
12093  $as_echo_n 0123456789 >"conftest.in"
12094  while :
12095  do
12096    cat "conftest.in" "conftest.in" >"conftest.tmp"
12097    mv "conftest.tmp" "conftest.in"
12098    cp "conftest.in" "conftest.nl"
12099    $as_echo 'FGREP' >> "conftest.nl"
12100    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12101    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12102    as_fn_arith $ac_count + 1 && ac_count=$as_val
12103    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12104      # Best one so far, save it but keep looking for a better one
12105      ac_cv_path_FGREP="$ac_path_FGREP"
12106      ac_path_FGREP_max=$ac_count
12107    fi
12108    # 10*(2^10) chars as input seems more than enough
12109    test $ac_count -gt 10 && break
12110  done
12111  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12112esac
12113
12114      $ac_path_FGREP_found && break 3
12115    done
12116  done
12117  done
12118IFS=$as_save_IFS
12119  if test -z "$ac_cv_path_FGREP"; then
12120    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12121  fi
12122else
12123  ac_cv_path_FGREP=$FGREP
12124fi
12125
12126   fi
12127fi
12128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12129$as_echo "$ac_cv_path_FGREP" >&6; }
12130 FGREP="$ac_cv_path_FGREP"
12131
12132
12133    else
12134      # If it succeeded, then it was overridden by the user. We will use it
12135      # for the tool.
12136
12137      # First remove it from the list of overridden variables, so we can test
12138      # for unknown variables in the end.
12139      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12140
12141      # Check if the provided tool contains a complete path.
12142      tool_specified="$FGREP"
12143      tool_basename="${tool_specified##*/}"
12144      if test "x$tool_basename" = "x$tool_specified"; then
12145        # A command without a complete path is provided, search $PATH.
12146        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
12147$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
12148        # Extract the first word of "$tool_basename", so it can be a program name with args.
12149set dummy $tool_basename; ac_word=$2
12150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12151$as_echo_n "checking for $ac_word... " >&6; }
12152if ${ac_cv_path_FGREP+:} false; then :
12153  $as_echo_n "(cached) " >&6
12154else
12155  case $FGREP in
12156  [\\/]* | ?:[\\/]*)
12157  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
12158  ;;
12159  *)
12160  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12161for as_dir in $PATH
12162do
12163  IFS=$as_save_IFS
12164  test -z "$as_dir" && as_dir=.
12165    for ac_exec_ext in '' $ac_executable_extensions; do
12166  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12167    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
12168    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12169    break 2
12170  fi
12171done
12172  done
12173IFS=$as_save_IFS
12174
12175  ;;
12176esac
12177fi
12178FGREP=$ac_cv_path_FGREP
12179if test -n "$FGREP"; then
12180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
12181$as_echo "$FGREP" >&6; }
12182else
12183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12184$as_echo "no" >&6; }
12185fi
12186
12187
12188        if test "x$FGREP" = x; then
12189          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12190        fi
12191      else
12192        # Otherwise we believe it is a complete path. Use it as it is.
12193        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
12194$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
12195        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
12196$as_echo_n "checking for FGREP... " >&6; }
12197        if test ! -x "$tool_specified"; then
12198          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12199$as_echo "not found" >&6; }
12200          as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12201        fi
12202        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12203$as_echo "$tool_specified" >&6; }
12204      fi
12205    fi
12206  fi
12207
12208
12209  if test "x$FGREP" = x; then
12210    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
12211  fi
12212
12213
12214
12215
12216  # Publish this variable in the help.
12217
12218
12219  if test "x$SED" = x; then
12220    # The variable is not set by user, try to locate tool using the code snippet
12221    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12222$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12223if ${ac_cv_path_SED+:} false; then :
12224  $as_echo_n "(cached) " >&6
12225else
12226            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12227     for ac_i in 1 2 3 4 5 6 7; do
12228       ac_script="$ac_script$as_nl$ac_script"
12229     done
12230     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12231     { ac_script=; unset ac_script;}
12232     if test -z "$SED"; then
12233  ac_path_SED_found=false
12234  # Loop through the user's path and test for each of PROGNAME-LIST
12235  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12236for as_dir in $PATH
12237do
12238  IFS=$as_save_IFS
12239  test -z "$as_dir" && as_dir=.
12240    for ac_prog in sed gsed; do
12241    for ac_exec_ext in '' $ac_executable_extensions; do
12242      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12243      as_fn_executable_p "$ac_path_SED" || continue
12244# Check for GNU ac_path_SED and select it if it is found.
12245  # Check for GNU $ac_path_SED
12246case `"$ac_path_SED" --version 2>&1` in
12247*GNU*)
12248  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12249*)
12250  ac_count=0
12251  $as_echo_n 0123456789 >"conftest.in"
12252  while :
12253  do
12254    cat "conftest.in" "conftest.in" >"conftest.tmp"
12255    mv "conftest.tmp" "conftest.in"
12256    cp "conftest.in" "conftest.nl"
12257    $as_echo '' >> "conftest.nl"
12258    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12259    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12260    as_fn_arith $ac_count + 1 && ac_count=$as_val
12261    if test $ac_count -gt ${ac_path_SED_max-0}; then
12262      # Best one so far, save it but keep looking for a better one
12263      ac_cv_path_SED="$ac_path_SED"
12264      ac_path_SED_max=$ac_count
12265    fi
12266    # 10*(2^10) chars as input seems more than enough
12267    test $ac_count -gt 10 && break
12268  done
12269  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12270esac
12271
12272      $ac_path_SED_found && break 3
12273    done
12274  done
12275  done
12276IFS=$as_save_IFS
12277  if test -z "$ac_cv_path_SED"; then
12278    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12279  fi
12280else
12281  ac_cv_path_SED=$SED
12282fi
12283
12284fi
12285{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12286$as_echo "$ac_cv_path_SED" >&6; }
12287 SED="$ac_cv_path_SED"
12288  rm -f conftest.sed
12289
12290  else
12291    # The variable is set, but is it from the command line or the environment?
12292
12293    # Try to remove the string !SED! from our list.
12294    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
12295    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12296      # If it failed, the variable was not from the command line. Ignore it,
12297      # but warn the user (except for BASH, which is always set by the calling BASH).
12298      if test "xSED" != xBASH; then
12299        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
12300$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
12301      fi
12302      # Try to locate tool using the code snippet
12303      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12304$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12305if ${ac_cv_path_SED+:} false; then :
12306  $as_echo_n "(cached) " >&6
12307else
12308            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12309     for ac_i in 1 2 3 4 5 6 7; do
12310       ac_script="$ac_script$as_nl$ac_script"
12311     done
12312     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12313     { ac_script=; unset ac_script;}
12314     if test -z "$SED"; then
12315  ac_path_SED_found=false
12316  # Loop through the user's path and test for each of PROGNAME-LIST
12317  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12318for as_dir in $PATH
12319do
12320  IFS=$as_save_IFS
12321  test -z "$as_dir" && as_dir=.
12322    for ac_prog in sed gsed; do
12323    for ac_exec_ext in '' $ac_executable_extensions; do
12324      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12325      as_fn_executable_p "$ac_path_SED" || continue
12326# Check for GNU ac_path_SED and select it if it is found.
12327  # Check for GNU $ac_path_SED
12328case `"$ac_path_SED" --version 2>&1` in
12329*GNU*)
12330  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12331*)
12332  ac_count=0
12333  $as_echo_n 0123456789 >"conftest.in"
12334  while :
12335  do
12336    cat "conftest.in" "conftest.in" >"conftest.tmp"
12337    mv "conftest.tmp" "conftest.in"
12338    cp "conftest.in" "conftest.nl"
12339    $as_echo '' >> "conftest.nl"
12340    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12341    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12342    as_fn_arith $ac_count + 1 && ac_count=$as_val
12343    if test $ac_count -gt ${ac_path_SED_max-0}; then
12344      # Best one so far, save it but keep looking for a better one
12345      ac_cv_path_SED="$ac_path_SED"
12346      ac_path_SED_max=$ac_count
12347    fi
12348    # 10*(2^10) chars as input seems more than enough
12349    test $ac_count -gt 10 && break
12350  done
12351  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12352esac
12353
12354      $ac_path_SED_found && break 3
12355    done
12356  done
12357  done
12358IFS=$as_save_IFS
12359  if test -z "$ac_cv_path_SED"; then
12360    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12361  fi
12362else
12363  ac_cv_path_SED=$SED
12364fi
12365
12366fi
12367{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12368$as_echo "$ac_cv_path_SED" >&6; }
12369 SED="$ac_cv_path_SED"
12370  rm -f conftest.sed
12371
12372    else
12373      # If it succeeded, then it was overridden by the user. We will use it
12374      # for the tool.
12375
12376      # First remove it from the list of overridden variables, so we can test
12377      # for unknown variables in the end.
12378      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12379
12380      # Check if the provided tool contains a complete path.
12381      tool_specified="$SED"
12382      tool_basename="${tool_specified##*/}"
12383      if test "x$tool_basename" = "x$tool_specified"; then
12384        # A command without a complete path is provided, search $PATH.
12385        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
12386$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
12387        # Extract the first word of "$tool_basename", so it can be a program name with args.
12388set dummy $tool_basename; ac_word=$2
12389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12390$as_echo_n "checking for $ac_word... " >&6; }
12391if ${ac_cv_path_SED+:} false; then :
12392  $as_echo_n "(cached) " >&6
12393else
12394  case $SED in
12395  [\\/]* | ?:[\\/]*)
12396  ac_cv_path_SED="$SED" # Let the user override the test with a path.
12397  ;;
12398  *)
12399  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12400for as_dir in $PATH
12401do
12402  IFS=$as_save_IFS
12403  test -z "$as_dir" && as_dir=.
12404    for ac_exec_ext in '' $ac_executable_extensions; do
12405  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12406    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
12407    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12408    break 2
12409  fi
12410done
12411  done
12412IFS=$as_save_IFS
12413
12414  ;;
12415esac
12416fi
12417SED=$ac_cv_path_SED
12418if test -n "$SED"; then
12419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
12420$as_echo "$SED" >&6; }
12421else
12422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12423$as_echo "no" >&6; }
12424fi
12425
12426
12427        if test "x$SED" = x; then
12428          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12429        fi
12430      else
12431        # Otherwise we believe it is a complete path. Use it as it is.
12432        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
12433$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
12434        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
12435$as_echo_n "checking for SED... " >&6; }
12436        if test ! -x "$tool_specified"; then
12437          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12438$as_echo "not found" >&6; }
12439          as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
12440        fi
12441        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12442$as_echo "$tool_specified" >&6; }
12443      fi
12444    fi
12445  fi
12446
12447
12448  if test "x$SED" = x; then
12449    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
12450  fi
12451
12452
12453
12454  # Always force rm.
12455  RM="$RM -f"
12456
12457  # pwd behaves differently on various platforms and some don't support the -L flag.
12458  # Always use the bash builtin pwd to get uniform behavior.
12459  THEPWDCMD=pwd
12460
12461  # These are not required on all platforms
12462
12463
12464  # Publish this variable in the help.
12465
12466
12467  if test "x$CYGPATH" = x; then
12468    # The variable is not set by user, try to locate tool using the code snippet
12469    for ac_prog in cygpath
12470do
12471  # Extract the first word of "$ac_prog", so it can be a program name with args.
12472set dummy $ac_prog; ac_word=$2
12473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12474$as_echo_n "checking for $ac_word... " >&6; }
12475if ${ac_cv_path_CYGPATH+:} false; then :
12476  $as_echo_n "(cached) " >&6
12477else
12478  case $CYGPATH in
12479  [\\/]* | ?:[\\/]*)
12480  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12481  ;;
12482  *)
12483  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12484for as_dir in $PATH
12485do
12486  IFS=$as_save_IFS
12487  test -z "$as_dir" && as_dir=.
12488    for ac_exec_ext in '' $ac_executable_extensions; do
12489  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12490    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12491    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12492    break 2
12493  fi
12494done
12495  done
12496IFS=$as_save_IFS
12497
12498  ;;
12499esac
12500fi
12501CYGPATH=$ac_cv_path_CYGPATH
12502if test -n "$CYGPATH"; then
12503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12504$as_echo "$CYGPATH" >&6; }
12505else
12506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12507$as_echo "no" >&6; }
12508fi
12509
12510
12511  test -n "$CYGPATH" && break
12512done
12513
12514  else
12515    # The variable is set, but is it from the command line or the environment?
12516
12517    # Try to remove the string !CYGPATH! from our list.
12518    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
12519    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12520      # If it failed, the variable was not from the command line. Ignore it,
12521      # but warn the user (except for BASH, which is always set by the calling BASH).
12522      if test "xCYGPATH" != xBASH; then
12523        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
12524$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
12525      fi
12526      # Try to locate tool using the code snippet
12527      for ac_prog in cygpath
12528do
12529  # Extract the first word of "$ac_prog", so it can be a program name with args.
12530set dummy $ac_prog; ac_word=$2
12531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12532$as_echo_n "checking for $ac_word... " >&6; }
12533if ${ac_cv_path_CYGPATH+:} false; then :
12534  $as_echo_n "(cached) " >&6
12535else
12536  case $CYGPATH in
12537  [\\/]* | ?:[\\/]*)
12538  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12539  ;;
12540  *)
12541  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12542for as_dir in $PATH
12543do
12544  IFS=$as_save_IFS
12545  test -z "$as_dir" && as_dir=.
12546    for ac_exec_ext in '' $ac_executable_extensions; do
12547  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12548    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12549    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12550    break 2
12551  fi
12552done
12553  done
12554IFS=$as_save_IFS
12555
12556  ;;
12557esac
12558fi
12559CYGPATH=$ac_cv_path_CYGPATH
12560if test -n "$CYGPATH"; then
12561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12562$as_echo "$CYGPATH" >&6; }
12563else
12564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12565$as_echo "no" >&6; }
12566fi
12567
12568
12569  test -n "$CYGPATH" && break
12570done
12571
12572    else
12573      # If it succeeded, then it was overridden by the user. We will use it
12574      # for the tool.
12575
12576      # First remove it from the list of overridden variables, so we can test
12577      # for unknown variables in the end.
12578      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12579
12580      # Check if the provided tool contains a complete path.
12581      tool_specified="$CYGPATH"
12582      tool_basename="${tool_specified##*/}"
12583      if test "x$tool_basename" = "x$tool_specified"; then
12584        # A command without a complete path is provided, search $PATH.
12585        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
12586$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
12587        # Extract the first word of "$tool_basename", so it can be a program name with args.
12588set dummy $tool_basename; ac_word=$2
12589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12590$as_echo_n "checking for $ac_word... " >&6; }
12591if ${ac_cv_path_CYGPATH+:} false; then :
12592  $as_echo_n "(cached) " >&6
12593else
12594  case $CYGPATH in
12595  [\\/]* | ?:[\\/]*)
12596  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12597  ;;
12598  *)
12599  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12600for as_dir in $PATH
12601do
12602  IFS=$as_save_IFS
12603  test -z "$as_dir" && as_dir=.
12604    for ac_exec_ext in '' $ac_executable_extensions; do
12605  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12606    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12607    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12608    break 2
12609  fi
12610done
12611  done
12612IFS=$as_save_IFS
12613
12614  ;;
12615esac
12616fi
12617CYGPATH=$ac_cv_path_CYGPATH
12618if test -n "$CYGPATH"; then
12619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12620$as_echo "$CYGPATH" >&6; }
12621else
12622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12623$as_echo "no" >&6; }
12624fi
12625
12626
12627        if test "x$CYGPATH" = x; then
12628          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12629        fi
12630      else
12631        # Otherwise we believe it is a complete path. Use it as it is.
12632        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
12633$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
12634        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
12635$as_echo_n "checking for CYGPATH... " >&6; }
12636        if test ! -x "$tool_specified"; then
12637          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12638$as_echo "not found" >&6; }
12639          as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
12640        fi
12641        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12642$as_echo "$tool_specified" >&6; }
12643      fi
12644    fi
12645  fi
12646
12647
12648
12649
12650  # Publish this variable in the help.
12651
12652
12653  if test "x$READLINK" = x; then
12654    # The variable is not set by user, try to locate tool using the code snippet
12655    for ac_prog in greadlink readlink
12656do
12657  # Extract the first word of "$ac_prog", so it can be a program name with args.
12658set dummy $ac_prog; ac_word=$2
12659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12660$as_echo_n "checking for $ac_word... " >&6; }
12661if ${ac_cv_path_READLINK+:} false; then :
12662  $as_echo_n "(cached) " >&6
12663else
12664  case $READLINK in
12665  [\\/]* | ?:[\\/]*)
12666  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12667  ;;
12668  *)
12669  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12670for as_dir in $PATH
12671do
12672  IFS=$as_save_IFS
12673  test -z "$as_dir" && as_dir=.
12674    for ac_exec_ext in '' $ac_executable_extensions; do
12675  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12676    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12677    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12678    break 2
12679  fi
12680done
12681  done
12682IFS=$as_save_IFS
12683
12684  ;;
12685esac
12686fi
12687READLINK=$ac_cv_path_READLINK
12688if test -n "$READLINK"; then
12689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12690$as_echo "$READLINK" >&6; }
12691else
12692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12693$as_echo "no" >&6; }
12694fi
12695
12696
12697  test -n "$READLINK" && break
12698done
12699
12700  else
12701    # The variable is set, but is it from the command line or the environment?
12702
12703    # Try to remove the string !READLINK! from our list.
12704    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
12705    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12706      # If it failed, the variable was not from the command line. Ignore it,
12707      # but warn the user (except for BASH, which is always set by the calling BASH).
12708      if test "xREADLINK" != xBASH; then
12709        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
12710$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
12711      fi
12712      # Try to locate tool using the code snippet
12713      for ac_prog in greadlink readlink
12714do
12715  # Extract the first word of "$ac_prog", so it can be a program name with args.
12716set dummy $ac_prog; ac_word=$2
12717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12718$as_echo_n "checking for $ac_word... " >&6; }
12719if ${ac_cv_path_READLINK+:} false; then :
12720  $as_echo_n "(cached) " >&6
12721else
12722  case $READLINK in
12723  [\\/]* | ?:[\\/]*)
12724  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12725  ;;
12726  *)
12727  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12728for as_dir in $PATH
12729do
12730  IFS=$as_save_IFS
12731  test -z "$as_dir" && as_dir=.
12732    for ac_exec_ext in '' $ac_executable_extensions; do
12733  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12734    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12735    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12736    break 2
12737  fi
12738done
12739  done
12740IFS=$as_save_IFS
12741
12742  ;;
12743esac
12744fi
12745READLINK=$ac_cv_path_READLINK
12746if test -n "$READLINK"; then
12747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12748$as_echo "$READLINK" >&6; }
12749else
12750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12751$as_echo "no" >&6; }
12752fi
12753
12754
12755  test -n "$READLINK" && break
12756done
12757
12758    else
12759      # If it succeeded, then it was overridden by the user. We will use it
12760      # for the tool.
12761
12762      # First remove it from the list of overridden variables, so we can test
12763      # for unknown variables in the end.
12764      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12765
12766      # Check if the provided tool contains a complete path.
12767      tool_specified="$READLINK"
12768      tool_basename="${tool_specified##*/}"
12769      if test "x$tool_basename" = "x$tool_specified"; then
12770        # A command without a complete path is provided, search $PATH.
12771        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
12772$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
12773        # Extract the first word of "$tool_basename", so it can be a program name with args.
12774set dummy $tool_basename; ac_word=$2
12775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12776$as_echo_n "checking for $ac_word... " >&6; }
12777if ${ac_cv_path_READLINK+:} false; then :
12778  $as_echo_n "(cached) " >&6
12779else
12780  case $READLINK in
12781  [\\/]* | ?:[\\/]*)
12782  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12783  ;;
12784  *)
12785  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12786for as_dir in $PATH
12787do
12788  IFS=$as_save_IFS
12789  test -z "$as_dir" && as_dir=.
12790    for ac_exec_ext in '' $ac_executable_extensions; do
12791  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12792    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12793    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12794    break 2
12795  fi
12796done
12797  done
12798IFS=$as_save_IFS
12799
12800  ;;
12801esac
12802fi
12803READLINK=$ac_cv_path_READLINK
12804if test -n "$READLINK"; then
12805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12806$as_echo "$READLINK" >&6; }
12807else
12808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12809$as_echo "no" >&6; }
12810fi
12811
12812
12813        if test "x$READLINK" = x; then
12814          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12815        fi
12816      else
12817        # Otherwise we believe it is a complete path. Use it as it is.
12818        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
12819$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
12820        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
12821$as_echo_n "checking for READLINK... " >&6; }
12822        if test ! -x "$tool_specified"; then
12823          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12824$as_echo "not found" >&6; }
12825          as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
12826        fi
12827        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12828$as_echo "$tool_specified" >&6; }
12829      fi
12830    fi
12831  fi
12832
12833
12834
12835
12836  # Publish this variable in the help.
12837
12838
12839  if test "x$DF" = x; then
12840    # The variable is not set by user, try to locate tool using the code snippet
12841    for ac_prog in df
12842do
12843  # Extract the first word of "$ac_prog", so it can be a program name with args.
12844set dummy $ac_prog; ac_word=$2
12845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12846$as_echo_n "checking for $ac_word... " >&6; }
12847if ${ac_cv_path_DF+:} false; then :
12848  $as_echo_n "(cached) " >&6
12849else
12850  case $DF in
12851  [\\/]* | ?:[\\/]*)
12852  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12853  ;;
12854  *)
12855  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12856for as_dir in $PATH
12857do
12858  IFS=$as_save_IFS
12859  test -z "$as_dir" && as_dir=.
12860    for ac_exec_ext in '' $ac_executable_extensions; do
12861  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12862    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12863    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12864    break 2
12865  fi
12866done
12867  done
12868IFS=$as_save_IFS
12869
12870  ;;
12871esac
12872fi
12873DF=$ac_cv_path_DF
12874if test -n "$DF"; then
12875  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12876$as_echo "$DF" >&6; }
12877else
12878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12879$as_echo "no" >&6; }
12880fi
12881
12882
12883  test -n "$DF" && break
12884done
12885
12886  else
12887    # The variable is set, but is it from the command line or the environment?
12888
12889    # Try to remove the string !DF! from our list.
12890    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
12891    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12892      # If it failed, the variable was not from the command line. Ignore it,
12893      # but warn the user (except for BASH, which is always set by the calling BASH).
12894      if test "xDF" != xBASH; then
12895        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
12896$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
12897      fi
12898      # Try to locate tool using the code snippet
12899      for ac_prog in df
12900do
12901  # Extract the first word of "$ac_prog", so it can be a program name with args.
12902set dummy $ac_prog; ac_word=$2
12903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12904$as_echo_n "checking for $ac_word... " >&6; }
12905if ${ac_cv_path_DF+:} false; then :
12906  $as_echo_n "(cached) " >&6
12907else
12908  case $DF in
12909  [\\/]* | ?:[\\/]*)
12910  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12911  ;;
12912  *)
12913  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12914for as_dir in $PATH
12915do
12916  IFS=$as_save_IFS
12917  test -z "$as_dir" && as_dir=.
12918    for ac_exec_ext in '' $ac_executable_extensions; do
12919  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12920    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12921    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12922    break 2
12923  fi
12924done
12925  done
12926IFS=$as_save_IFS
12927
12928  ;;
12929esac
12930fi
12931DF=$ac_cv_path_DF
12932if test -n "$DF"; then
12933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12934$as_echo "$DF" >&6; }
12935else
12936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12937$as_echo "no" >&6; }
12938fi
12939
12940
12941  test -n "$DF" && break
12942done
12943
12944    else
12945      # If it succeeded, then it was overridden by the user. We will use it
12946      # for the tool.
12947
12948      # First remove it from the list of overridden variables, so we can test
12949      # for unknown variables in the end.
12950      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12951
12952      # Check if the provided tool contains a complete path.
12953      tool_specified="$DF"
12954      tool_basename="${tool_specified##*/}"
12955      if test "x$tool_basename" = "x$tool_specified"; then
12956        # A command without a complete path is provided, search $PATH.
12957        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
12958$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
12959        # Extract the first word of "$tool_basename", so it can be a program name with args.
12960set dummy $tool_basename; ac_word=$2
12961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12962$as_echo_n "checking for $ac_word... " >&6; }
12963if ${ac_cv_path_DF+:} false; then :
12964  $as_echo_n "(cached) " >&6
12965else
12966  case $DF in
12967  [\\/]* | ?:[\\/]*)
12968  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12969  ;;
12970  *)
12971  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12972for as_dir in $PATH
12973do
12974  IFS=$as_save_IFS
12975  test -z "$as_dir" && as_dir=.
12976    for ac_exec_ext in '' $ac_executable_extensions; do
12977  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12978    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12979    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12980    break 2
12981  fi
12982done
12983  done
12984IFS=$as_save_IFS
12985
12986  ;;
12987esac
12988fi
12989DF=$ac_cv_path_DF
12990if test -n "$DF"; then
12991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12992$as_echo "$DF" >&6; }
12993else
12994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12995$as_echo "no" >&6; }
12996fi
12997
12998
12999        if test "x$DF" = x; then
13000          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13001        fi
13002      else
13003        # Otherwise we believe it is a complete path. Use it as it is.
13004        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
13005$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
13006        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
13007$as_echo_n "checking for DF... " >&6; }
13008        if test ! -x "$tool_specified"; then
13009          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13010$as_echo "not found" >&6; }
13011          as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
13012        fi
13013        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13014$as_echo "$tool_specified" >&6; }
13015      fi
13016    fi
13017  fi
13018
13019
13020
13021
13022  # Publish this variable in the help.
13023
13024
13025  if test "x$SETFILE" = x; then
13026    # The variable is not set by user, try to locate tool using the code snippet
13027    for ac_prog in SetFile
13028do
13029  # Extract the first word of "$ac_prog", so it can be a program name with args.
13030set dummy $ac_prog; ac_word=$2
13031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13032$as_echo_n "checking for $ac_word... " >&6; }
13033if ${ac_cv_path_SETFILE+:} false; then :
13034  $as_echo_n "(cached) " >&6
13035else
13036  case $SETFILE in
13037  [\\/]* | ?:[\\/]*)
13038  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13039  ;;
13040  *)
13041  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13042for as_dir in $PATH
13043do
13044  IFS=$as_save_IFS
13045  test -z "$as_dir" && as_dir=.
13046    for ac_exec_ext in '' $ac_executable_extensions; do
13047  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13048    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13049    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13050    break 2
13051  fi
13052done
13053  done
13054IFS=$as_save_IFS
13055
13056  ;;
13057esac
13058fi
13059SETFILE=$ac_cv_path_SETFILE
13060if test -n "$SETFILE"; then
13061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13062$as_echo "$SETFILE" >&6; }
13063else
13064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13065$as_echo "no" >&6; }
13066fi
13067
13068
13069  test -n "$SETFILE" && break
13070done
13071
13072  else
13073    # The variable is set, but is it from the command line or the environment?
13074
13075    # Try to remove the string !SETFILE! from our list.
13076    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
13077    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13078      # If it failed, the variable was not from the command line. Ignore it,
13079      # but warn the user (except for BASH, which is always set by the calling BASH).
13080      if test "xSETFILE" != xBASH; then
13081        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
13082$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
13083      fi
13084      # Try to locate tool using the code snippet
13085      for ac_prog in SetFile
13086do
13087  # Extract the first word of "$ac_prog", so it can be a program name with args.
13088set dummy $ac_prog; ac_word=$2
13089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13090$as_echo_n "checking for $ac_word... " >&6; }
13091if ${ac_cv_path_SETFILE+:} false; then :
13092  $as_echo_n "(cached) " >&6
13093else
13094  case $SETFILE in
13095  [\\/]* | ?:[\\/]*)
13096  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13097  ;;
13098  *)
13099  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13100for as_dir in $PATH
13101do
13102  IFS=$as_save_IFS
13103  test -z "$as_dir" && as_dir=.
13104    for ac_exec_ext in '' $ac_executable_extensions; do
13105  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13106    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13107    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13108    break 2
13109  fi
13110done
13111  done
13112IFS=$as_save_IFS
13113
13114  ;;
13115esac
13116fi
13117SETFILE=$ac_cv_path_SETFILE
13118if test -n "$SETFILE"; then
13119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13120$as_echo "$SETFILE" >&6; }
13121else
13122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13123$as_echo "no" >&6; }
13124fi
13125
13126
13127  test -n "$SETFILE" && break
13128done
13129
13130    else
13131      # If it succeeded, then it was overridden by the user. We will use it
13132      # for the tool.
13133
13134      # First remove it from the list of overridden variables, so we can test
13135      # for unknown variables in the end.
13136      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13137
13138      # Check if the provided tool contains a complete path.
13139      tool_specified="$SETFILE"
13140      tool_basename="${tool_specified##*/}"
13141      if test "x$tool_basename" = "x$tool_specified"; then
13142        # A command without a complete path is provided, search $PATH.
13143        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
13144$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
13145        # Extract the first word of "$tool_basename", so it can be a program name with args.
13146set dummy $tool_basename; ac_word=$2
13147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13148$as_echo_n "checking for $ac_word... " >&6; }
13149if ${ac_cv_path_SETFILE+:} false; then :
13150  $as_echo_n "(cached) " >&6
13151else
13152  case $SETFILE in
13153  [\\/]* | ?:[\\/]*)
13154  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13155  ;;
13156  *)
13157  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13158for as_dir in $PATH
13159do
13160  IFS=$as_save_IFS
13161  test -z "$as_dir" && as_dir=.
13162    for ac_exec_ext in '' $ac_executable_extensions; do
13163  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13164    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13165    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13166    break 2
13167  fi
13168done
13169  done
13170IFS=$as_save_IFS
13171
13172  ;;
13173esac
13174fi
13175SETFILE=$ac_cv_path_SETFILE
13176if test -n "$SETFILE"; then
13177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13178$as_echo "$SETFILE" >&6; }
13179else
13180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13181$as_echo "no" >&6; }
13182fi
13183
13184
13185        if test "x$SETFILE" = x; then
13186          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13187        fi
13188      else
13189        # Otherwise we believe it is a complete path. Use it as it is.
13190        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
13191$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
13192        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
13193$as_echo_n "checking for SETFILE... " >&6; }
13194        if test ! -x "$tool_specified"; then
13195          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13196$as_echo "not found" >&6; }
13197          as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
13198        fi
13199        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13200$as_echo "$tool_specified" >&6; }
13201      fi
13202    fi
13203  fi
13204
13205
13206
13207
13208  # Publish this variable in the help.
13209
13210
13211  if test "x$CPIO" = x; then
13212    # The variable is not set by user, try to locate tool using the code snippet
13213    for ac_prog in cpio bsdcpio
13214do
13215  # Extract the first word of "$ac_prog", so it can be a program name with args.
13216set dummy $ac_prog; ac_word=$2
13217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13218$as_echo_n "checking for $ac_word... " >&6; }
13219if ${ac_cv_path_CPIO+:} false; then :
13220  $as_echo_n "(cached) " >&6
13221else
13222  case $CPIO in
13223  [\\/]* | ?:[\\/]*)
13224  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13225  ;;
13226  *)
13227  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13228for as_dir in $PATH
13229do
13230  IFS=$as_save_IFS
13231  test -z "$as_dir" && as_dir=.
13232    for ac_exec_ext in '' $ac_executable_extensions; do
13233  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13234    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13235    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13236    break 2
13237  fi
13238done
13239  done
13240IFS=$as_save_IFS
13241
13242  ;;
13243esac
13244fi
13245CPIO=$ac_cv_path_CPIO
13246if test -n "$CPIO"; then
13247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13248$as_echo "$CPIO" >&6; }
13249else
13250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13251$as_echo "no" >&6; }
13252fi
13253
13254
13255  test -n "$CPIO" && break
13256done
13257
13258  else
13259    # The variable is set, but is it from the command line or the environment?
13260
13261    # Try to remove the string !CPIO! from our list.
13262    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
13263    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13264      # If it failed, the variable was not from the command line. Ignore it,
13265      # but warn the user (except for BASH, which is always set by the calling BASH).
13266      if test "xCPIO" != xBASH; then
13267        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
13268$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
13269      fi
13270      # Try to locate tool using the code snippet
13271      for ac_prog in cpio bsdcpio
13272do
13273  # Extract the first word of "$ac_prog", so it can be a program name with args.
13274set dummy $ac_prog; ac_word=$2
13275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13276$as_echo_n "checking for $ac_word... " >&6; }
13277if ${ac_cv_path_CPIO+:} false; then :
13278  $as_echo_n "(cached) " >&6
13279else
13280  case $CPIO in
13281  [\\/]* | ?:[\\/]*)
13282  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13283  ;;
13284  *)
13285  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13286for as_dir in $PATH
13287do
13288  IFS=$as_save_IFS
13289  test -z "$as_dir" && as_dir=.
13290    for ac_exec_ext in '' $ac_executable_extensions; do
13291  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13292    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13293    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13294    break 2
13295  fi
13296done
13297  done
13298IFS=$as_save_IFS
13299
13300  ;;
13301esac
13302fi
13303CPIO=$ac_cv_path_CPIO
13304if test -n "$CPIO"; then
13305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13306$as_echo "$CPIO" >&6; }
13307else
13308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13309$as_echo "no" >&6; }
13310fi
13311
13312
13313  test -n "$CPIO" && break
13314done
13315
13316    else
13317      # If it succeeded, then it was overridden by the user. We will use it
13318      # for the tool.
13319
13320      # First remove it from the list of overridden variables, so we can test
13321      # for unknown variables in the end.
13322      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13323
13324      # Check if the provided tool contains a complete path.
13325      tool_specified="$CPIO"
13326      tool_basename="${tool_specified##*/}"
13327      if test "x$tool_basename" = "x$tool_specified"; then
13328        # A command without a complete path is provided, search $PATH.
13329        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
13330$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
13331        # Extract the first word of "$tool_basename", so it can be a program name with args.
13332set dummy $tool_basename; ac_word=$2
13333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13334$as_echo_n "checking for $ac_word... " >&6; }
13335if ${ac_cv_path_CPIO+:} false; then :
13336  $as_echo_n "(cached) " >&6
13337else
13338  case $CPIO in
13339  [\\/]* | ?:[\\/]*)
13340  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13341  ;;
13342  *)
13343  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13344for as_dir in $PATH
13345do
13346  IFS=$as_save_IFS
13347  test -z "$as_dir" && as_dir=.
13348    for ac_exec_ext in '' $ac_executable_extensions; do
13349  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13350    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13351    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13352    break 2
13353  fi
13354done
13355  done
13356IFS=$as_save_IFS
13357
13358  ;;
13359esac
13360fi
13361CPIO=$ac_cv_path_CPIO
13362if test -n "$CPIO"; then
13363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13364$as_echo "$CPIO" >&6; }
13365else
13366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13367$as_echo "no" >&6; }
13368fi
13369
13370
13371        if test "x$CPIO" = x; then
13372          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13373        fi
13374      else
13375        # Otherwise we believe it is a complete path. Use it as it is.
13376        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
13377$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
13378        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
13379$as_echo_n "checking for CPIO... " >&6; }
13380        if test ! -x "$tool_specified"; then
13381          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13382$as_echo "not found" >&6; }
13383          as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
13384        fi
13385        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13386$as_echo "$tool_specified" >&6; }
13387      fi
13388    fi
13389  fi
13390
13391
13392
13393
13394# Now we can determine OpenJDK build and target platforms. This is required to
13395# have early on.
13396# Make sure we can run config.sub.
13397$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
13398  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
13399
13400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
13401$as_echo_n "checking build system type... " >&6; }
13402if ${ac_cv_build+:} false; then :
13403  $as_echo_n "(cached) " >&6
13404else
13405  ac_build_alias=$build_alias
13406test "x$ac_build_alias" = x &&
13407  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
13408test "x$ac_build_alias" = x &&
13409  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
13410ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
13411  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
13412
13413fi
13414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
13415$as_echo "$ac_cv_build" >&6; }
13416case $ac_cv_build in
13417*-*-*) ;;
13418*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
13419esac
13420build=$ac_cv_build
13421ac_save_IFS=$IFS; IFS='-'
13422set x $ac_cv_build
13423shift
13424build_cpu=$1
13425build_vendor=$2
13426shift; shift
13427# Remember, the first character of IFS is used to create $*,
13428# except with old shells:
13429build_os=$*
13430IFS=$ac_save_IFS
13431case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
13432
13433
13434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
13435$as_echo_n "checking host system type... " >&6; }
13436if ${ac_cv_host+:} false; then :
13437  $as_echo_n "(cached) " >&6
13438else
13439  if test "x$host_alias" = x; then
13440  ac_cv_host=$ac_cv_build
13441else
13442  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
13443    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
13444fi
13445
13446fi
13447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
13448$as_echo "$ac_cv_host" >&6; }
13449case $ac_cv_host in
13450*-*-*) ;;
13451*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
13452esac
13453host=$ac_cv_host
13454ac_save_IFS=$IFS; IFS='-'
13455set x $ac_cv_host
13456shift
13457host_cpu=$1
13458host_vendor=$2
13459shift; shift
13460# Remember, the first character of IFS is used to create $*,
13461# except with old shells:
13462host_os=$*
13463IFS=$ac_save_IFS
13464case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
13465
13466
13467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
13468$as_echo_n "checking target system type... " >&6; }
13469if ${ac_cv_target+:} false; then :
13470  $as_echo_n "(cached) " >&6
13471else
13472  if test "x$target_alias" = x; then
13473  ac_cv_target=$ac_cv_host
13474else
13475  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
13476    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
13477fi
13478
13479fi
13480{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
13481$as_echo "$ac_cv_target" >&6; }
13482case $ac_cv_target in
13483*-*-*) ;;
13484*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
13485esac
13486target=$ac_cv_target
13487ac_save_IFS=$IFS; IFS='-'
13488set x $ac_cv_target
13489shift
13490target_cpu=$1
13491target_vendor=$2
13492shift; shift
13493# Remember, the first character of IFS is used to create $*,
13494# except with old shells:
13495target_os=$*
13496IFS=$ac_save_IFS
13497case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
13498
13499
13500# The aliases save the names the user supplied, while $host etc.
13501# will get canonicalized.
13502test -n "$target_alias" &&
13503  test "$program_prefix$program_suffix$program_transform_name" = \
13504    NONENONEs,x,x, &&
13505  program_prefix=${target_alias}-
13506
13507  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
13508  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
13509  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
13510  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
13511  # to use the configure naming style.
13512
13513
13514
13515
13516
13517  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
13518  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
13519  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
13520  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
13521  OPENJDK_TARGET_AUTOCONF_NAME="$host"
13522  OPENJDK_BUILD_AUTOCONF_NAME="$build"
13523
13524
13525
13526  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13527
13528  case "$build_os" in
13529    *linux*)
13530      VAR_OS=linux
13531      VAR_OS_TYPE=unix
13532      ;;
13533    *solaris*)
13534      VAR_OS=solaris
13535      VAR_OS_TYPE=unix
13536      ;;
13537    *darwin*)
13538      VAR_OS=macosx
13539      VAR_OS_TYPE=unix
13540      ;;
13541    *bsd*)
13542      VAR_OS=bsd
13543      VAR_OS_TYPE=unix
13544      ;;
13545    *cygwin*)
13546      VAR_OS=windows
13547      VAR_OS_ENV=windows.cygwin
13548      ;;
13549    *mingw*)
13550      VAR_OS=windows
13551      VAR_OS_ENV=windows.msys
13552      ;;
13553    *aix*)
13554      VAR_OS=aix
13555      VAR_OS_TYPE=unix
13556      ;;
13557    *)
13558      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
13559      ;;
13560  esac
13561
13562
13563  # First argument is the cpu name from the trip/quad
13564  case "$build_cpu" in
13565    x86_64)
13566      VAR_CPU=x86_64
13567      VAR_CPU_ARCH=x86
13568      VAR_CPU_BITS=64
13569      VAR_CPU_ENDIAN=little
13570      ;;
13571    i?86)
13572      VAR_CPU=x86
13573      VAR_CPU_ARCH=x86
13574      VAR_CPU_BITS=32
13575      VAR_CPU_ENDIAN=little
13576      ;;
13577    arm*)
13578      VAR_CPU=arm
13579      VAR_CPU_ARCH=arm
13580      VAR_CPU_BITS=32
13581      VAR_CPU_ENDIAN=little
13582      ;;
13583    aarch64)
13584      VAR_CPU=aarch64
13585      VAR_CPU_ARCH=aarch64
13586      VAR_CPU_BITS=64
13587      VAR_CPU_ENDIAN=little
13588      ;;
13589    powerpc)
13590      VAR_CPU=ppc
13591      VAR_CPU_ARCH=ppc
13592      VAR_CPU_BITS=32
13593      VAR_CPU_ENDIAN=big
13594      ;;
13595    powerpc64)
13596      VAR_CPU=ppc64
13597      VAR_CPU_ARCH=ppc
13598      VAR_CPU_BITS=64
13599      VAR_CPU_ENDIAN=big
13600      ;;
13601    powerpc64le)
13602      VAR_CPU=ppc64
13603      VAR_CPU_ARCH=ppc
13604      VAR_CPU_BITS=64
13605      VAR_CPU_ENDIAN=little
13606      ;;
13607    s390)
13608      VAR_CPU=s390
13609      VAR_CPU_ARCH=s390
13610      VAR_CPU_BITS=32
13611      VAR_CPU_ENDIAN=big
13612      ;;
13613    s390x)
13614      VAR_CPU=s390x
13615      VAR_CPU_ARCH=s390
13616      VAR_CPU_BITS=64
13617      VAR_CPU_ENDIAN=big
13618      ;;
13619    sparc)
13620      VAR_CPU=sparc
13621      VAR_CPU_ARCH=sparc
13622      VAR_CPU_BITS=32
13623      VAR_CPU_ENDIAN=big
13624      ;;
13625    sparcv9|sparc64)
13626      VAR_CPU=sparcv9
13627      VAR_CPU_ARCH=sparc
13628      VAR_CPU_BITS=64
13629      VAR_CPU_ENDIAN=big
13630      ;;
13631    *)
13632      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
13633      ;;
13634  esac
13635
13636  # ..and setup our own variables. (Do this explicitely to facilitate searching)
13637  OPENJDK_BUILD_OS="$VAR_OS"
13638  if test "x$VAR_OS_TYPE" != x; then
13639    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
13640  else
13641    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
13642  fi
13643  if test "x$VAR_OS_ENV" != x; then
13644    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
13645  else
13646    OPENJDK_BUILD_OS_ENV="$VAR_OS"
13647  fi
13648  OPENJDK_BUILD_CPU="$VAR_CPU"
13649  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
13650  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
13651  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13652
13653
13654
13655
13656
13657
13658
13659
13660  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
13661$as_echo_n "checking openjdk-build os-cpu... " >&6; }
13662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
13663$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
13664
13665  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13666
13667  case "$host_os" in
13668    *linux*)
13669      VAR_OS=linux
13670      VAR_OS_TYPE=unix
13671      ;;
13672    *solaris*)
13673      VAR_OS=solaris
13674      VAR_OS_TYPE=unix
13675      ;;
13676    *darwin*)
13677      VAR_OS=macosx
13678      VAR_OS_TYPE=unix
13679      ;;
13680    *bsd*)
13681      VAR_OS=bsd
13682      VAR_OS_TYPE=unix
13683      ;;
13684    *cygwin*)
13685      VAR_OS=windows
13686      VAR_OS_ENV=windows.cygwin
13687      ;;
13688    *mingw*)
13689      VAR_OS=windows
13690      VAR_OS_ENV=windows.msys
13691      ;;
13692    *aix*)
13693      VAR_OS=aix
13694      VAR_OS_TYPE=unix
13695      ;;
13696    *)
13697      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
13698      ;;
13699  esac
13700
13701
13702  # First argument is the cpu name from the trip/quad
13703  case "$host_cpu" in
13704    x86_64)
13705      VAR_CPU=x86_64
13706      VAR_CPU_ARCH=x86
13707      VAR_CPU_BITS=64
13708      VAR_CPU_ENDIAN=little
13709      ;;
13710    i?86)
13711      VAR_CPU=x86
13712      VAR_CPU_ARCH=x86
13713      VAR_CPU_BITS=32
13714      VAR_CPU_ENDIAN=little
13715      ;;
13716    arm*)
13717      VAR_CPU=arm
13718      VAR_CPU_ARCH=arm
13719      VAR_CPU_BITS=32
13720      VAR_CPU_ENDIAN=little
13721      ;;
13722    aarch64)
13723      VAR_CPU=aarch64
13724      VAR_CPU_ARCH=aarch64
13725      VAR_CPU_BITS=64
13726      VAR_CPU_ENDIAN=little
13727      ;;
13728    powerpc)
13729      VAR_CPU=ppc
13730      VAR_CPU_ARCH=ppc
13731      VAR_CPU_BITS=32
13732      VAR_CPU_ENDIAN=big
13733      ;;
13734    powerpc64)
13735      VAR_CPU=ppc64
13736      VAR_CPU_ARCH=ppc
13737      VAR_CPU_BITS=64
13738      VAR_CPU_ENDIAN=big
13739      ;;
13740    powerpc64le)
13741      VAR_CPU=ppc64
13742      VAR_CPU_ARCH=ppc
13743      VAR_CPU_BITS=64
13744      VAR_CPU_ENDIAN=little
13745      ;;
13746    s390)
13747      VAR_CPU=s390
13748      VAR_CPU_ARCH=s390
13749      VAR_CPU_BITS=32
13750      VAR_CPU_ENDIAN=big
13751      ;;
13752    s390x)
13753      VAR_CPU=s390x
13754      VAR_CPU_ARCH=s390
13755      VAR_CPU_BITS=64
13756      VAR_CPU_ENDIAN=big
13757      ;;
13758    sparc)
13759      VAR_CPU=sparc
13760      VAR_CPU_ARCH=sparc
13761      VAR_CPU_BITS=32
13762      VAR_CPU_ENDIAN=big
13763      ;;
13764    sparcv9|sparc64)
13765      VAR_CPU=sparcv9
13766      VAR_CPU_ARCH=sparc
13767      VAR_CPU_BITS=64
13768      VAR_CPU_ENDIAN=big
13769      ;;
13770    *)
13771      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
13772      ;;
13773  esac
13774
13775  # ... and setup our own variables. (Do this explicitely to facilitate searching)
13776  OPENJDK_TARGET_OS="$VAR_OS"
13777  if test "x$VAR_OS_TYPE" != x; then
13778    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
13779  else
13780    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
13781  fi
13782  if test "x$VAR_OS_ENV" != x; then
13783    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
13784  else
13785    OPENJDK_TARGET_OS_ENV="$VAR_OS"
13786  fi
13787  OPENJDK_TARGET_CPU="$VAR_CPU"
13788  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
13789  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
13790  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13791
13792
13793
13794
13795
13796
13797
13798
13799  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
13800$as_echo_n "checking openjdk-target os-cpu... " >&6; }
13801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
13802$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
13803
13804
13805
13806# Check whether --with-target-bits was given.
13807if test "${with_target_bits+set}" = set; then :
13808  withval=$with_target_bits;
13809fi
13810
13811
13812  # We have three types of compiles:
13813  # native  == normal compilation, target system == build system
13814  # cross   == traditional cross compilation, target system != build system; special toolchain needed
13815  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
13816  #
13817  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
13818    # We're doing a proper cross-compilation
13819    COMPILE_TYPE="cross"
13820  else
13821    COMPILE_TYPE="native"
13822  fi
13823
13824  if test "x$with_target_bits" != x; then
13825    if test "x$COMPILE_TYPE" = "xcross"; then
13826      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
13827    fi
13828
13829    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13830      # A reduced build is requested
13831      COMPILE_TYPE="reduced"
13832      OPENJDK_TARGET_CPU_BITS=32
13833      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
13834        OPENJDK_TARGET_CPU=x86
13835      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
13836        OPENJDK_TARGET_CPU=sparc
13837      else
13838        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
13839      fi
13840    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
13841      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
13842    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
13843      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
13844$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
13845    else
13846      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
13847    fi
13848  fi
13849
13850
13851  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
13852$as_echo_n "checking compilation type... " >&6; }
13853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
13854$as_echo "$COMPILE_TYPE" >&6; }
13855
13856
13857  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
13858    REQUIRED_OS_NAME=SunOS
13859    REQUIRED_OS_VERSION=5.10
13860  fi
13861  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
13862    REQUIRED_OS_NAME=Linux
13863    REQUIRED_OS_VERSION=2.6
13864  fi
13865  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13866    REQUIRED_OS_NAME=Windows
13867    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
13868      REQUIRED_OS_VERSION=5.2
13869    else
13870      REQUIRED_OS_VERSION=5.1
13871    fi
13872  fi
13873  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
13874    REQUIRED_OS_NAME=Darwin
13875    REQUIRED_OS_VERSION=11.2
13876  fi
13877
13878
13879
13880
13881
13882  # Also store the legacy naming of the cpu.
13883  # Ie i586 and amd64 instead of x86 and x86_64
13884  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
13885  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13886    OPENJDK_TARGET_CPU_LEGACY="i586"
13887  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13888    # On all platforms except MacOSX replace x86_64 with amd64.
13889    OPENJDK_TARGET_CPU_LEGACY="amd64"
13890  fi
13891
13892
13893  # And the second legacy naming of the cpu.
13894  # Ie i386 and amd64 instead of x86 and x86_64.
13895  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
13896  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13897    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
13898  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13899    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
13900  fi
13901
13902
13903  # This is the name of the cpu (but using i386 and amd64 instead of
13904  # x86 and x86_64, respectively), preceeded by a /, to be used when
13905  # locating libraries. On macosx, it's empty, though.
13906  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
13907  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13908    OPENJDK_TARGET_CPU_LIBDIR=""
13909  fi
13910
13911
13912  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
13913  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
13914  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
13915  OPENJDK_TARGET_CPU_ISADIR=""
13916  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13917    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13918      OPENJDK_TARGET_CPU_ISADIR="/amd64"
13919    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
13920      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
13921    fi
13922  fi
13923
13924
13925  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
13926  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
13927  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
13928    # On linux only, we replace x86 with i386.
13929    OPENJDK_TARGET_CPU_OSARCH="i386"
13930  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13931    # On all platforms except macosx, we replace x86_64 with amd64.
13932    OPENJDK_TARGET_CPU_OSARCH="amd64"
13933  fi
13934
13935
13936  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
13937  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13938    OPENJDK_TARGET_CPU_JLI="i386"
13939  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13940    # On all platforms except macosx, we replace x86_64 with amd64.
13941    OPENJDK_TARGET_CPU_JLI="amd64"
13942  fi
13943  # Now setup the -D flags for building libjli.
13944  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
13945  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13946    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
13947      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
13948    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
13949      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
13950    fi
13951  fi
13952
13953
13954  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13955      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
13956  else
13957      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
13958  fi
13959
13960
13961  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13962    A_LP64="LP64:="
13963    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
13964    # unpack200.exe
13965    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
13966      ADD_LP64="-D_LP64=1"
13967    fi
13968  fi
13969  LP64=$A_LP64
13970
13971
13972  if test "x$COMPILE_TYPE" = "xcross"; then
13973    # FIXME: ... or should this include reduced builds..?
13974    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
13975  else
13976    DEFINE_CROSS_COMPILE_ARCH=""
13977  fi
13978
13979
13980  # ZERO_ARCHDEF is used to enable architecture-specific code
13981  case "${OPENJDK_TARGET_CPU}" in
13982    ppc*)    ZERO_ARCHDEF=PPC   ;;
13983    s390*)   ZERO_ARCHDEF=S390  ;;
13984    sparc*)  ZERO_ARCHDEF=SPARC ;;
13985    x86_64*) ZERO_ARCHDEF=AMD64 ;;
13986    x86)     ZERO_ARCHDEF=IA32  ;;
13987    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
13988  esac
13989
13990
13991
13992
13993# Continue setting up basic stuff. Most remaining code require fundamental tools.
13994
13995  # Save the current directory this script was started from
13996  CURDIR="$PWD"
13997
13998  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13999    PATH_SEP=";"
14000
14001  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
14002  if test $SRC_ROOT_LENGTH -gt 100; then
14003    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
14004  fi
14005
14006  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14007    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
14008$as_echo_n "checking cygwin release... " >&6; }
14009    CYGWIN_VERSION=`$UNAME -r`
14010    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
14011$as_echo "$CYGWIN_VERSION" >&6; }
14012    WINDOWS_ENV_VENDOR='cygwin'
14013    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
14014
14015    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
14016    if test "x$CYGWIN_VERSION_OK" = x; then
14017      { $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
14018$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;}
14019      as_fn_error $? "Cannot continue" "$LINENO" 5
14020    fi
14021    if test "x$CYGPATH" = x; then
14022      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
14023    fi
14024    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
14025$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
14026    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
14027    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
14028    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
14029    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
14030    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
14031$as_echo "$CYGWIN_ROOT_PATH" >&6; }
14032    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
14033    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
14034    if test "x$test_cygdrive_prefix" = x; then
14035      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
14036    fi
14037  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14038    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
14039$as_echo_n "checking msys release... " >&6; }
14040    MSYS_VERSION=`$UNAME -r`
14041    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
14042$as_echo "$MSYS_VERSION" >&6; }
14043
14044    WINDOWS_ENV_VENDOR='msys'
14045    WINDOWS_ENV_VERSION="$MSYS_VERSION"
14046
14047    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
14048$as_echo_n "checking msys root directory as unix-style path... " >&6; }
14049    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
14050    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
14051
14052  windows_path="$MSYS_ROOT_PATH"
14053  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14054    unix_path=`$CYGPATH -u "$windows_path"`
14055    MSYS_ROOT_PATH="$unix_path"
14056  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14057    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14058    MSYS_ROOT_PATH="$unix_path"
14059  fi
14060
14061    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
14062$as_echo "$MSYS_ROOT_PATH" >&6; }
14063    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
14064  else
14065    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
14066  fi
14067
14068  # Test if windows or unix (cygwin/msys) find is first in path.
14069  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
14070$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
14071  FIND_BINARY_OUTPUT=`find --version 2>&1`
14072  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
14073    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
14074$as_echo "unix style" >&6; }
14075  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
14076    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
14077$as_echo "Windows" >&6; }
14078    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
14079$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
14080    { $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
14081$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
14082    as_fn_error $? "Cannot continue" "$LINENO" 5
14083  else
14084    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
14085$as_echo "unknown" >&6; }
14086    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
14087$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
14088  fi
14089
14090  else
14091    PATH_SEP=":"
14092  fi
14093
14094
14095  # We get the top-level directory from the supporting wrappers.
14096  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
14097$as_echo_n "checking for top-level directory... " >&6; }
14098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
14099$as_echo "$TOPDIR" >&6; }
14100
14101
14102  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
14103
14104  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14105
14106  # Input might be given as Windows format, start by converting to
14107  # unix format.
14108  path="$CURDIR"
14109  new_path=`$CYGPATH -u "$path"`
14110
14111  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14112  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14113  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14114  # "foo.exe" is OK but "foo" is an error.
14115  #
14116  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14117  # It is also a way to make sure we got the proper file name for the real test later on.
14118  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14119  if test "x$test_shortpath" = x; then
14120    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14121$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14122    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
14123  fi
14124
14125  # Call helper function which possibly converts this using DOS-style short mode.
14126  # If so, the updated path is stored in $new_path.
14127
14128  input_path="$new_path"
14129  # Check if we need to convert this using DOS-style short mode. If the path
14130  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14131  # take no chances and rewrite it.
14132  # Note: m4 eats our [], so we need to use [ and ] instead.
14133  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14134  if test "x$has_forbidden_chars" != x; then
14135    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14136    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14137    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14138    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14139      # Going to short mode and back again did indeed matter. Since short mode is
14140      # case insensitive, let's make it lowercase to improve readability.
14141      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14142      # Now convert it back to Unix-stile (cygpath)
14143      input_path=`$CYGPATH -u "$shortmode_path"`
14144      new_path="$input_path"
14145    fi
14146  fi
14147
14148  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14149  if test "x$test_cygdrive_prefix" = x; then
14150    # As a simple fix, exclude /usr/bin since it's not a real path.
14151    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14152      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14153      # a path prefixed by /cygdrive for fixpath to work.
14154      new_path="$CYGWIN_ROOT_PATH$input_path"
14155    fi
14156  fi
14157
14158
14159  if test "x$path" != "x$new_path"; then
14160    CURDIR="$new_path"
14161    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14162$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14163  fi
14164
14165  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14166
14167  path="$CURDIR"
14168  has_colon=`$ECHO $path | $GREP ^.:`
14169  new_path="$path"
14170  if test "x$has_colon" = x; then
14171    # Not in mixed or Windows style, start by that.
14172    new_path=`cmd //c echo $path`
14173  fi
14174
14175
14176  input_path="$new_path"
14177  # Check if we need to convert this using DOS-style short mode. If the path
14178  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14179  # take no chances and rewrite it.
14180  # Note: m4 eats our [], so we need to use [ and ] instead.
14181  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14182  if test "x$has_forbidden_chars" != x; then
14183    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14184    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14185  fi
14186
14187
14188  windows_path="$new_path"
14189  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14190    unix_path=`$CYGPATH -u "$windows_path"`
14191    new_path="$unix_path"
14192  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14193    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14194    new_path="$unix_path"
14195  fi
14196
14197  if test "x$path" != "x$new_path"; then
14198    CURDIR="$new_path"
14199    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14200$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14201  fi
14202
14203  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14204  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14205
14206  else
14207    # We're on a unix platform. Hooray! :)
14208    path="$CURDIR"
14209    has_space=`$ECHO "$path" | $GREP " "`
14210    if test "x$has_space" != x; then
14211      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14212$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14213      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14214    fi
14215
14216    # Use eval to expand a potential ~
14217    eval path="$path"
14218    if test ! -f "$path" && test ! -d "$path"; then
14219      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14220    fi
14221
14222    CURDIR="`cd "$path"; $THEPWDCMD -L`"
14223  fi
14224
14225
14226  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14227
14228  # Input might be given as Windows format, start by converting to
14229  # unix format.
14230  path="$TOPDIR"
14231  new_path=`$CYGPATH -u "$path"`
14232
14233  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14234  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14235  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14236  # "foo.exe" is OK but "foo" is an error.
14237  #
14238  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14239  # It is also a way to make sure we got the proper file name for the real test later on.
14240  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14241  if test "x$test_shortpath" = x; then
14242    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14243$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14244    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
14245  fi
14246
14247  # Call helper function which possibly converts this using DOS-style short mode.
14248  # If so, the updated path is stored in $new_path.
14249
14250  input_path="$new_path"
14251  # Check if we need to convert this using DOS-style short mode. If the path
14252  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14253  # take no chances and rewrite it.
14254  # Note: m4 eats our [], so we need to use [ and ] instead.
14255  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14256  if test "x$has_forbidden_chars" != x; then
14257    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14258    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14259    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14260    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14261      # Going to short mode and back again did indeed matter. Since short mode is
14262      # case insensitive, let's make it lowercase to improve readability.
14263      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14264      # Now convert it back to Unix-stile (cygpath)
14265      input_path=`$CYGPATH -u "$shortmode_path"`
14266      new_path="$input_path"
14267    fi
14268  fi
14269
14270  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14271  if test "x$test_cygdrive_prefix" = x; then
14272    # As a simple fix, exclude /usr/bin since it's not a real path.
14273    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14274      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14275      # a path prefixed by /cygdrive for fixpath to work.
14276      new_path="$CYGWIN_ROOT_PATH$input_path"
14277    fi
14278  fi
14279
14280
14281  if test "x$path" != "x$new_path"; then
14282    TOPDIR="$new_path"
14283    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14284$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14285  fi
14286
14287  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14288
14289  path="$TOPDIR"
14290  has_colon=`$ECHO $path | $GREP ^.:`
14291  new_path="$path"
14292  if test "x$has_colon" = x; then
14293    # Not in mixed or Windows style, start by that.
14294    new_path=`cmd //c echo $path`
14295  fi
14296
14297
14298  input_path="$new_path"
14299  # Check if we need to convert this using DOS-style short mode. If the path
14300  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14301  # take no chances and rewrite it.
14302  # Note: m4 eats our [], so we need to use [ and ] instead.
14303  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14304  if test "x$has_forbidden_chars" != x; then
14305    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14306    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14307  fi
14308
14309
14310  windows_path="$new_path"
14311  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14312    unix_path=`$CYGPATH -u "$windows_path"`
14313    new_path="$unix_path"
14314  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14315    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14316    new_path="$unix_path"
14317  fi
14318
14319  if test "x$path" != "x$new_path"; then
14320    TOPDIR="$new_path"
14321    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14322$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14323  fi
14324
14325  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14326  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14327
14328  else
14329    # We're on a unix platform. Hooray! :)
14330    path="$TOPDIR"
14331    has_space=`$ECHO "$path" | $GREP " "`
14332    if test "x$has_space" != x; then
14333      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14334$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14335      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14336    fi
14337
14338    # Use eval to expand a potential ~
14339    eval path="$path"
14340    if test ! -f "$path" && test ! -d "$path"; then
14341      as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14342    fi
14343
14344    TOPDIR="`cd "$path"; $THEPWDCMD -L`"
14345  fi
14346
14347  # SRC_ROOT is a traditional alias for TOPDIR.
14348  SRC_ROOT=$TOPDIR
14349
14350  # Locate the directory of this script.
14351  AUTOCONF_DIR=$TOPDIR/common/autoconf
14352
14353
14354  # Setup default logging of stdout and stderr to build.log in the output root.
14355  BUILD_LOG='$(OUTPUT_ROOT)/build.log'
14356  BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
14357  BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
14358
14359
14360
14361
14362
14363# Check if it's a pure open build or if custom sources are to be used.
14364
14365  # Check whether --enable-openjdk-only was given.
14366if test "${enable_openjdk_only+set}" = set; then :
14367  enableval=$enable_openjdk_only;
14368else
14369  enable_openjdk_only="no"
14370fi
14371
14372
14373  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
14374$as_echo_n "checking for presence of closed sources... " >&6; }
14375  if test -d "$SRC_ROOT/jdk/src/closed"; then
14376    CLOSED_SOURCE_PRESENT=yes
14377  else
14378    CLOSED_SOURCE_PRESENT=no
14379  fi
14380  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
14381$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
14382
14383  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
14384$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
14385  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
14386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
14387$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
14388
14389  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
14390    OPENJDK=true
14391    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14392      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
14393$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
14394    fi
14395  else
14396    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14397      OPENJDK=true
14398    else
14399      OPENJDK=false
14400    fi
14401  fi
14402
14403  if test "x$OPENJDK" = "xtrue"; then
14404    SET_OPENJDK="OPENJDK=true"
14405  fi
14406
14407
14408
14409  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
14410  # the IncludeCustomExtension macro.
14411
14412
14413# Check whether --with-custom-make-dir was given.
14414if test "${with_custom_make_dir+set}" = set; then :
14415  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
14416$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
14417fi
14418
14419
14420
14421
14422# These are needed to be able to create a configuration name (and thus the output directory)
14423
14424  ###############################################################################
14425  #
14426  # Check which variant of the JDK that we want to build.
14427  # Currently we have:
14428  #    normal:   standard edition
14429  # but the custom make system may add other variants
14430  #
14431  # Effectively the JDK variant gives a name to a specific set of
14432  # modules to compile into the JDK. In the future, these modules
14433  # might even be Jigsaw modules.
14434  #
14435  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
14436$as_echo_n "checking which variant of the JDK to build... " >&6; }
14437
14438# Check whether --with-jdk-variant was given.
14439if test "${with_jdk_variant+set}" = set; then :
14440  withval=$with_jdk_variant;
14441fi
14442
14443
14444  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
14445    JDK_VARIANT="normal"
14446  else
14447    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
14448  fi
14449
14450
14451
14452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
14453$as_echo "$JDK_VARIANT" >&6; }
14454
14455
14456###############################################################################
14457#
14458# Check which interpreter of the JVM we want to build.
14459# Currently we have:
14460#    template: Template interpreter (the default)
14461#    cpp     : C++ interpreter
14462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
14463$as_echo_n "checking which interpreter of the JVM to build... " >&6; }
14464
14465# Check whether --with-jvm-interpreter was given.
14466if test "${with_jvm_interpreter+set}" = set; then :
14467  withval=$with_jvm_interpreter;
14468fi
14469
14470
14471if test "x$with_jvm_interpreter" = x; then
14472     with_jvm_interpreter="template"
14473fi
14474
14475JVM_INTERPRETER="$with_jvm_interpreter"
14476
14477if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
14478   as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
14479fi
14480
14481
14482
14483{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
14484$as_echo "$with_jvm_interpreter" >&6; }
14485
14486
14487
14488  ###############################################################################
14489  #
14490  # Check which variants of the JVM that we want to build.
14491  # Currently we have:
14492  #    server: normal interpreter and a tiered C1/C2 compiler
14493  #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
14494  #    minimal1: reduced form of client with optional VM services and features stripped out
14495  #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
14496  #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
14497  #    zero: no machine code interpreter, no compiler
14498  #    zeroshark: zero interpreter and shark/llvm compiler backend
14499#    core: interpreter only, no compiler (only works on some platforms)
14500  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
14501$as_echo_n "checking which variants of the JVM to build... " >&6; }
14502
14503# Check whether --with-jvm-variants was given.
14504if test "${with_jvm_variants+set}" = set; then :
14505  withval=$with_jvm_variants;
14506fi
14507
14508
14509  if test "x$with_jvm_variants" = x; then
14510    with_jvm_variants="server"
14511  fi
14512
14513  JVM_VARIANTS=",$with_jvm_variants,"
14514  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,//'`
14515
14516  if test "x$TEST_VARIANTS" != "x,"; then
14517     as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
14518  fi
14519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
14520$as_echo "$with_jvm_variants" >&6; }
14521
14522  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
14523  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
14524  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
14525  JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
14526  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
14527  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
14528  JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
14529
14530  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14531    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14532      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
14533    fi
14534  fi
14535  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14536    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14537      as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
14538    fi
14539  fi
14540  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14541    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14542      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
14543    fi
14544  fi
14545
14546  # Replace the commas with AND for use in the build directory name.
14547  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
14548  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/'`
14549  if test "x$COUNT_VARIANTS" != "x,1"; then
14550    BUILDING_MULTIPLE_JVM_VARIANTS=yes
14551  else
14552    BUILDING_MULTIPLE_JVM_VARIANTS=no
14553  fi
14554
14555
14556
14557
14558
14559
14560
14561
14562
14563
14564  INCLUDE_SA=true
14565  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
14566    INCLUDE_SA=false
14567  fi
14568  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
14569    INCLUDE_SA=false
14570  fi
14571  if test "x$OPENJDK_TARGET_OS" = xaix ; then
14572    INCLUDE_SA=false
14573  fi
14574  if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
14575    INCLUDE_SA=false
14576  fi
14577
14578
14579  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
14580    MACOSX_UNIVERSAL="true"
14581  fi
14582
14583
14584
14585
14586  ###############################################################################
14587  #
14588  # Set the debug level
14589  #    release: no debug information, all optimizations, no asserts.
14590  #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
14591  #    fastdebug: debug information (-g), all optimizations, all asserts
14592  #    slowdebug: debug information (-g), no optimizations, all asserts
14593  #
14594  DEBUG_LEVEL="release"
14595  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
14596$as_echo_n "checking which debug level to use... " >&6; }
14597  # Check whether --enable-debug was given.
14598if test "${enable_debug+set}" = set; then :
14599  enableval=$enable_debug;
14600        ENABLE_DEBUG="${enableval}"
14601        DEBUG_LEVEL="fastdebug"
14602
14603else
14604  ENABLE_DEBUG="no"
14605fi
14606
14607
14608
14609# Check whether --with-debug-level was given.
14610if test "${with_debug_level+set}" = set; then :
14611  withval=$with_debug_level;
14612        DEBUG_LEVEL="${withval}"
14613        if test "x$ENABLE_DEBUG" = xyes; then
14614          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
14615        fi
14616
14617fi
14618
14619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
14620$as_echo "$DEBUG_LEVEL" >&6; }
14621
14622  if test "x$DEBUG_LEVEL" != xrelease && \
14623      test "x$DEBUG_LEVEL" != xoptimized && \
14624      test "x$DEBUG_LEVEL" != xfastdebug && \
14625      test "x$DEBUG_LEVEL" != xslowdebug; then
14626    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
14627  fi
14628
14629
14630  ###############################################################################
14631  #
14632  # Setup legacy vars/targets and new vars to deal with different debug levels.
14633  #
14634
14635  case $DEBUG_LEVEL in
14636    release )
14637      VARIANT="OPT"
14638      FASTDEBUG="false"
14639      DEBUG_CLASSFILES="false"
14640      BUILD_VARIANT_RELEASE=""
14641      HOTSPOT_DEBUG_LEVEL="product"
14642      HOTSPOT_EXPORT="product"
14643      ;;
14644    fastdebug )
14645      VARIANT="DBG"
14646      FASTDEBUG="true"
14647      DEBUG_CLASSFILES="true"
14648      BUILD_VARIANT_RELEASE="-fastdebug"
14649      HOTSPOT_DEBUG_LEVEL="fastdebug"
14650      HOTSPOT_EXPORT="fastdebug"
14651      ;;
14652    slowdebug )
14653      VARIANT="DBG"
14654      FASTDEBUG="false"
14655      DEBUG_CLASSFILES="true"
14656      BUILD_VARIANT_RELEASE="-debug"
14657      HOTSPOT_DEBUG_LEVEL="debug"
14658      HOTSPOT_EXPORT="debug"
14659      ;;
14660    optimized )
14661      VARIANT="OPT"
14662      FASTDEBUG="false"
14663      DEBUG_CLASSFILES="false"
14664      BUILD_VARIANT_RELEASE="-optimized"
14665      HOTSPOT_DEBUG_LEVEL="optimized"
14666      HOTSPOT_EXPORT="optimized"
14667      ;;
14668  esac
14669
14670  # The debug level 'optimized' is a little special because it is currently only
14671  # applicable to the HotSpot build where it means to build a completely
14672  # optimized version of the VM without any debugging code (like for the
14673  # 'release' debug level which is called 'product' in the HotSpot build) but
14674  # with the exception that it can contain additional code which is otherwise
14675  # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
14676  # test new and/or experimental features which are not intended for customer
14677  # shipment. Because these new features need to be tested and benchmarked in
14678  # real world scenarios, we want to build the containing JDK at the 'release'
14679  # debug level.
14680  if test "x$DEBUG_LEVEL" = xoptimized; then
14681    DEBUG_LEVEL="release"
14682  fi
14683
14684  #####
14685  # Generate the legacy makefile targets for hotspot.
14686  # The hotspot api for selecting the build artifacts, really, needs to be improved.
14687  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
14688  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
14689  # But until then ...
14690  HOTSPOT_TARGET=""
14691
14692  if test "x$JVM_VARIANT_SERVER" = xtrue; then
14693    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
14694  fi
14695
14696  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14697    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
14698  fi
14699
14700  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14701    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
14702  fi
14703
14704  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14705    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
14706  fi
14707
14708  if test "x$JVM_VARIANT_ZERO" = xtrue; then
14709    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
14710  fi
14711
14712  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
14713    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
14714  fi
14715
14716  if test "x$JVM_VARIANT_CORE" = xtrue; then
14717    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
14718  fi
14719
14720  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
14721
14722  # On Macosx universal binaries are produced, but they only contain
14723  # 64 bit intel. This invalidates control of which jvms are built
14724  # from configure, but only server is valid anyway. Fix this
14725  # when hotspot makefiles are rewritten.
14726  if test "x$MACOSX_UNIVERSAL" = xtrue; then
14727    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
14728  fi
14729
14730  #####
14731
14732
14733
14734
14735
14736
14737
14738
14739# With basic setup done, call the custom early hook.
14740
14741
14742# Check if we have devkits, extra paths or sysroot set.
14743
14744
14745# Check whether --with-devkit was given.
14746if test "${with_devkit+set}" = set; then :
14747  withval=$with_devkit;
14748
14749  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14750
14751  # Input might be given as Windows format, start by converting to
14752  # unix format.
14753  path="$with_devkit"
14754  new_path=`$CYGPATH -u "$path"`
14755
14756  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14757  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14758  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14759  # "foo.exe" is OK but "foo" is an error.
14760  #
14761  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14762  # It is also a way to make sure we got the proper file name for the real test later on.
14763  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14764  if test "x$test_shortpath" = x; then
14765    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14766$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14767    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
14768  fi
14769
14770  # Call helper function which possibly converts this using DOS-style short mode.
14771  # If so, the updated path is stored in $new_path.
14772
14773  input_path="$new_path"
14774  # Check if we need to convert this using DOS-style short mode. If the path
14775  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14776  # take no chances and rewrite it.
14777  # Note: m4 eats our [], so we need to use [ and ] instead.
14778  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14779  if test "x$has_forbidden_chars" != x; then
14780    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14781    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14782    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14783    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14784      # Going to short mode and back again did indeed matter. Since short mode is
14785      # case insensitive, let's make it lowercase to improve readability.
14786      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14787      # Now convert it back to Unix-stile (cygpath)
14788      input_path=`$CYGPATH -u "$shortmode_path"`
14789      new_path="$input_path"
14790    fi
14791  fi
14792
14793  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14794  if test "x$test_cygdrive_prefix" = x; then
14795    # As a simple fix, exclude /usr/bin since it's not a real path.
14796    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14797      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14798      # a path prefixed by /cygdrive for fixpath to work.
14799      new_path="$CYGWIN_ROOT_PATH$input_path"
14800    fi
14801  fi
14802
14803
14804  if test "x$path" != "x$new_path"; then
14805    with_devkit="$new_path"
14806    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14807$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14808  fi
14809
14810  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14811
14812  path="$with_devkit"
14813  has_colon=`$ECHO $path | $GREP ^.:`
14814  new_path="$path"
14815  if test "x$has_colon" = x; then
14816    # Not in mixed or Windows style, start by that.
14817    new_path=`cmd //c echo $path`
14818  fi
14819
14820
14821  input_path="$new_path"
14822  # Check if we need to convert this using DOS-style short mode. If the path
14823  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14824  # take no chances and rewrite it.
14825  # Note: m4 eats our [], so we need to use [ and ] instead.
14826  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14827  if test "x$has_forbidden_chars" != x; then
14828    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14829    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14830  fi
14831
14832
14833  windows_path="$new_path"
14834  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14835    unix_path=`$CYGPATH -u "$windows_path"`
14836    new_path="$unix_path"
14837  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14838    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14839    new_path="$unix_path"
14840  fi
14841
14842  if test "x$path" != "x$new_path"; then
14843    with_devkit="$new_path"
14844    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14845$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14846  fi
14847
14848  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14849  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14850
14851  else
14852    # We're on a unix platform. Hooray! :)
14853    path="$with_devkit"
14854    has_space=`$ECHO "$path" | $GREP " "`
14855    if test "x$has_space" != x; then
14856      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14857$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14858      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14859    fi
14860
14861    # Use eval to expand a potential ~
14862    eval path="$path"
14863    if test ! -f "$path" && test ! -d "$path"; then
14864      as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
14865    fi
14866
14867    with_devkit="`cd "$path"; $THEPWDCMD -L`"
14868  fi
14869
14870        DEVKIT_ROOT="$with_devkit"
14871        # Check for a meta data info file in the root of the devkit
14872        if test -f "$DEVKIT_ROOT/devkit.info"; then
14873          # This potentially sets the following:
14874          # DEVKIT_NAME: A descriptive name of the devkit
14875          # DEVKIT_TOOLCHAIN_PATH: Corresponds to --with-toolchain-path
14876          # DEVKIT_EXTRA_PATH: Corresponds to --with-extra-path
14877          # DEVKIT_SYSROOT: Corresponds to --with-sysroot
14878          . $DEVKIT_ROOT/devkit.info
14879        fi
14880
14881        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
14882$as_echo_n "checking for devkit... " >&6; }
14883        if test "x$DEVKIT_NAME" != x; then
14884          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
14885$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
14886        else
14887          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
14888$as_echo "$DEVKIT_ROOT" >&6; }
14889        fi
14890
14891        if test "x$DEVKIT_EXTRA_PATH" != x; then
14892
14893  if test "x$DEVKIT_EXTRA_PATH" != x; then
14894    if test "x$EXTRA_PATH" = x; then
14895      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
14896    else
14897      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
14898    fi
14899  fi
14900
14901        fi
14902
14903        # Fallback default of just /bin if DEVKIT_PATH is not defined
14904        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
14905          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
14906        fi
14907
14908  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
14909    if test "x$TOOLCHAIN_PATH" = x; then
14910      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
14911    else
14912      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
14913    fi
14914  fi
14915
14916
14917        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
14918        # places for backwards compatiblity.
14919        if test "x$DEVKIT_SYSROOT" != x; then
14920          SYSROOT="$DEVKIT_SYSROOT"
14921        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
14922          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
14923        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
14924          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
14925        fi
14926
14927
14928fi
14929
14930
14931  # You can force the sysroot if the sysroot encoded into the compiler tools
14932  # is not correct.
14933
14934# Check whether --with-sys-root was given.
14935if test "${with_sys_root+set}" = set; then :
14936  withval=$with_sys_root; SYSROOT=$with_sys_root
14937
14938fi
14939
14940
14941
14942# Check whether --with-sysroot was given.
14943if test "${with_sysroot+set}" = set; then :
14944  withval=$with_sysroot; SYSROOT=$with_sysroot
14945
14946fi
14947
14948
14949
14950# Check whether --with-tools-dir was given.
14951if test "${with_tools_dir+set}" = set; then :
14952  withval=$with_tools_dir;
14953  if test "x$with_tools_dir" != x; then
14954    if test "x$TOOLCHAIN_PATH" = x; then
14955      TOOLCHAIN_PATH="$with_tools_dir"
14956    else
14957      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
14958    fi
14959  fi
14960
14961
14962fi
14963
14964
14965
14966# Check whether --with-toolchain-path was given.
14967if test "${with_toolchain_path+set}" = set; then :
14968  withval=$with_toolchain_path;
14969  if test "x$with_toolchain_path" != x; then
14970    if test "x$TOOLCHAIN_PATH" = x; then
14971      TOOLCHAIN_PATH="$with_toolchain_path"
14972    else
14973      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
14974    fi
14975  fi
14976
14977
14978fi
14979
14980
14981
14982# Check whether --with-extra-path was given.
14983if test "${with_extra_path+set}" = set; then :
14984  withval=$with_extra_path;
14985  if test "x$with_extra_path" != x; then
14986    if test "x$EXTRA_PATH" = x; then
14987      EXTRA_PATH="$with_extra_path"
14988    else
14989      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
14990    fi
14991  fi
14992
14993
14994fi
14995
14996
14997  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
14998    # detect if Xcode is installed by running xcodebuild -version
14999    # if no Xcode installed, xcodebuild exits with 1
15000    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
15001    if /usr/bin/xcodebuild -version >/dev/null 2>&1; then
15002      # We need to use xcodebuild in the toolchain dir provided by the user, this will
15003      # fall back on the stub binary in /usr/bin/xcodebuild
15004      # Extract the first word of "xcodebuild", so it can be a program name with args.
15005set dummy xcodebuild; ac_word=$2
15006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15007$as_echo_n "checking for $ac_word... " >&6; }
15008if ${ac_cv_path_XCODEBUILD+:} false; then :
15009  $as_echo_n "(cached) " >&6
15010else
15011  case $XCODEBUILD in
15012  [\\/]* | ?:[\\/]*)
15013  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
15014  ;;
15015  *)
15016  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15017for as_dir in $TOOLCHAIN_PATH
15018do
15019  IFS=$as_save_IFS
15020  test -z "$as_dir" && as_dir=.
15021    for ac_exec_ext in '' $ac_executable_extensions; do
15022  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15023    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
15024    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15025    break 2
15026  fi
15027done
15028  done
15029IFS=$as_save_IFS
15030
15031  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
15032  ;;
15033esac
15034fi
15035XCODEBUILD=$ac_cv_path_XCODEBUILD
15036if test -n "$XCODEBUILD"; then
15037  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
15038$as_echo "$XCODEBUILD" >&6; }
15039else
15040  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15041$as_echo "no" >&6; }
15042fi
15043
15044
15045    else
15046      # this should result in SYSROOT being empty, unless --with-sysroot is provided
15047      # when only the command line tools are installed there are no SDKs, so headers
15048      # are copied into the system frameworks
15049      XCODEBUILD=
15050
15051    fi
15052
15053    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
15054$as_echo_n "checking for sdk name... " >&6; }
15055
15056# Check whether --with-sdk-name was given.
15057if test "${with_sdk_name+set}" = set; then :
15058  withval=$with_sdk_name; SDKNAME=$with_sdk_name
15059
15060fi
15061
15062    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
15063$as_echo "$SDKNAME" >&6; }
15064
15065    # if toolchain path is specified then don't rely on system headers, they may not compile
15066    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
15067    test -z "$TOOLCHAIN_PATH" && \
15068      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
15069
15070    if test -z "$SYSROOT"; then
15071      if test -n "$XCODEBUILD"; then
15072        # if we don't have system headers, use default SDK name (last resort)
15073        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15074          SDKNAME=${SDKNAME:-macosx}
15075        fi
15076
15077        if test -n "$SDKNAME"; then
15078          # Call xcodebuild to determine SYSROOT
15079          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | grep '^Path: ' | sed 's/Path: //'`
15080        fi
15081      else
15082        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15083          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
15084        fi
15085      fi
15086    else
15087      # warn user if --with-sdk-name was also set
15088      if test -n "$with_sdk_name"; then
15089        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
15090$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
15091      fi
15092    fi
15093
15094    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
15095      # If no system framework headers, then SYSROOT must be set, or we won't build
15096      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
15097    fi
15098
15099    # Perform a basic sanity test
15100    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
15101      if test -z "$SYSROOT"; then
15102        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
15103      else
15104        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
15105      fi
15106    fi
15107
15108    # set SDKROOT too, Xcode tools will pick it up
15109    SDKROOT=$SYSROOT
15110
15111  fi
15112
15113  # Prepend the extra path to the global path
15114
15115  if test "x$EXTRA_PATH" != x; then
15116    if test "x$PATH" = x; then
15117      PATH="$EXTRA_PATH"
15118    else
15119      PATH="$EXTRA_PATH:$PATH"
15120    fi
15121  fi
15122
15123
15124  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
15125    # Add extra search paths on solaris for utilities like ar and as etc...
15126    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
15127  fi
15128
15129  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
15130$as_echo_n "checking for sysroot... " >&6; }
15131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
15132$as_echo "$SYSROOT" >&6; }
15133  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
15134$as_echo_n "checking for toolchain path... " >&6; }
15135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
15136$as_echo "$TOOLCHAIN_PATH" >&6; }
15137  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
15138$as_echo_n "checking for extra path... " >&6; }
15139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
15140$as_echo "$EXTRA_PATH" >&6; }
15141
15142
15143# To properly create a configuration name, we need to have the OpenJDK target
15144# and options (variants and debug level) parsed.
15145
15146
15147
15148# Check whether --with-conf-name was given.
15149if test "${with_conf_name+set}" = set; then :
15150  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
15151fi
15152
15153
15154  # Test from where we are running configure, in or outside of src root.
15155  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
15156$as_echo_n "checking where to store configuration... " >&6; }
15157  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
15158      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
15159      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
15160    # We are running configure from the src root.
15161    # Create a default ./build/target-variant-debuglevel output root.
15162    if test "x${CONF_NAME}" = x; then
15163      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
15164$as_echo "in default location" >&6; }
15165      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
15166    else
15167      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
15168$as_echo "in build directory with custom name" >&6; }
15169    fi
15170    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
15171    $MKDIR -p "$OUTPUT_ROOT"
15172    if test ! -d "$OUTPUT_ROOT"; then
15173      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
15174    fi
15175  else
15176    # We are running configure from outside of the src dir.
15177    # Then use the current directory as output dir!
15178    # If configuration is situated in normal build directory, just use the build
15179    # directory name as configuration name, otherwise use the complete path.
15180    if test "x${CONF_NAME}" = x; then
15181      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
15182    fi
15183    OUTPUT_ROOT="$CURDIR"
15184    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
15185$as_echo "in current directory" >&6; }
15186
15187    # WARNING: This might be a bad thing to do. You need to be sure you want to
15188    # have a configuration in this directory. Do some sanity checks!
15189
15190    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
15191      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
15192      # other files
15193      files_present=`$LS $OUTPUT_ROOT`
15194      # Configure has already touched config.log and confdefs.h in the current dir when this check
15195      # is performed.
15196      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
15197      | $TR -d '\n'`
15198      if test "x$filtered_files" != x; then
15199        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
15200$as_echo "$as_me: Current directory is $CURDIR." >&6;}
15201        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
15202$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
15203        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
15204$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
15205        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
15206$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
15207        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
15208$as_echo "$as_me: seriously mess up just about everything." >&6;}
15209        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
15210$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
15211        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
15212$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
15213        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
15214      fi
15215    fi
15216  fi
15217  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
15218$as_echo_n "checking what configuration name to use... " >&6; }
15219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
15220$as_echo "$CONF_NAME" >&6; }
15221
15222
15223  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15224
15225  # Input might be given as Windows format, start by converting to
15226  # unix format.
15227  path="$OUTPUT_ROOT"
15228  new_path=`$CYGPATH -u "$path"`
15229
15230  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15231  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15232  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15233  # "foo.exe" is OK but "foo" is an error.
15234  #
15235  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15236  # It is also a way to make sure we got the proper file name for the real test later on.
15237  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15238  if test "x$test_shortpath" = x; then
15239    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15240$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15241    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
15242  fi
15243
15244  # Call helper function which possibly converts this using DOS-style short mode.
15245  # If so, the updated path is stored in $new_path.
15246
15247  input_path="$new_path"
15248  # Check if we need to convert this using DOS-style short mode. If the path
15249  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15250  # take no chances and rewrite it.
15251  # Note: m4 eats our [], so we need to use [ and ] instead.
15252  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15253  if test "x$has_forbidden_chars" != x; then
15254    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15255    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15256    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15257    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15258      # Going to short mode and back again did indeed matter. Since short mode is
15259      # case insensitive, let's make it lowercase to improve readability.
15260      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15261      # Now convert it back to Unix-stile (cygpath)
15262      input_path=`$CYGPATH -u "$shortmode_path"`
15263      new_path="$input_path"
15264    fi
15265  fi
15266
15267  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15268  if test "x$test_cygdrive_prefix" = x; then
15269    # As a simple fix, exclude /usr/bin since it's not a real path.
15270    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15271      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15272      # a path prefixed by /cygdrive for fixpath to work.
15273      new_path="$CYGWIN_ROOT_PATH$input_path"
15274    fi
15275  fi
15276
15277
15278  if test "x$path" != "x$new_path"; then
15279    OUTPUT_ROOT="$new_path"
15280    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15281$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15282  fi
15283
15284  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15285
15286  path="$OUTPUT_ROOT"
15287  has_colon=`$ECHO $path | $GREP ^.:`
15288  new_path="$path"
15289  if test "x$has_colon" = x; then
15290    # Not in mixed or Windows style, start by that.
15291    new_path=`cmd //c echo $path`
15292  fi
15293
15294
15295  input_path="$new_path"
15296  # Check if we need to convert this using DOS-style short mode. If the path
15297  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15298  # take no chances and rewrite it.
15299  # Note: m4 eats our [], so we need to use [ and ] instead.
15300  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15301  if test "x$has_forbidden_chars" != x; then
15302    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15303    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15304  fi
15305
15306
15307  windows_path="$new_path"
15308  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15309    unix_path=`$CYGPATH -u "$windows_path"`
15310    new_path="$unix_path"
15311  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15312    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15313    new_path="$unix_path"
15314  fi
15315
15316  if test "x$path" != "x$new_path"; then
15317    OUTPUT_ROOT="$new_path"
15318    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15319$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15320  fi
15321
15322  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15323  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15324
15325  else
15326    # We're on a unix platform. Hooray! :)
15327    path="$OUTPUT_ROOT"
15328    has_space=`$ECHO "$path" | $GREP " "`
15329    if test "x$has_space" != x; then
15330      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15331$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15332      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15333    fi
15334
15335    # Use eval to expand a potential ~
15336    eval path="$path"
15337    if test ! -f "$path" && test ! -d "$path"; then
15338      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
15339    fi
15340
15341    OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
15342  fi
15343
15344
15345  SPEC=$OUTPUT_ROOT/spec.gmk
15346
15347  CONF_NAME=$CONF_NAME
15348
15349  OUTPUT_ROOT=$OUTPUT_ROOT
15350
15351
15352  # The spec.gmk file contains all variables for the make system.
15353  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
15354
15355  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
15356  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
15357
15358  # The bootcycle-spec.gmk file contains support for boot cycle builds.
15359  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
15360
15361  # The compare.sh is used to compare the build output to other builds.
15362  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
15363
15364  # The generated Makefile knows where the spec.gmk is and where the source is.
15365  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
15366  # which will look for generated configurations
15367  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
15368
15369
15370
15371# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
15372
15373  for ac_prog in apt-get yum port pkgutil pkgadd
15374do
15375  # Extract the first word of "$ac_prog", so it can be a program name with args.
15376set dummy $ac_prog; ac_word=$2
15377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15378$as_echo_n "checking for $ac_word... " >&6; }
15379if ${ac_cv_prog_PKGHANDLER+:} false; then :
15380  $as_echo_n "(cached) " >&6
15381else
15382  if test -n "$PKGHANDLER"; then
15383  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
15384else
15385as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15386for as_dir in $PATH
15387do
15388  IFS=$as_save_IFS
15389  test -z "$as_dir" && as_dir=.
15390    for ac_exec_ext in '' $ac_executable_extensions; do
15391  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15392    ac_cv_prog_PKGHANDLER="$ac_prog"
15393    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15394    break 2
15395  fi
15396done
15397  done
15398IFS=$as_save_IFS
15399
15400fi
15401fi
15402PKGHANDLER=$ac_cv_prog_PKGHANDLER
15403if test -n "$PKGHANDLER"; then
15404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
15405$as_echo "$PKGHANDLER" >&6; }
15406else
15407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15408$as_echo "no" >&6; }
15409fi
15410
15411
15412  test -n "$PKGHANDLER" && break
15413done
15414
15415
15416
15417# Setup tools that requires more complex handling, or that is not needed by the configure script.
15418
15419
15420  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
15421  if test "x$MAKE" != x; then
15422    # User has supplied a make, test it.
15423    if test ! -f "$MAKE"; then
15424      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
15425    fi
15426
15427  MAKE_CANDIDATE=""$MAKE""
15428  DESCRIPTION="user supplied MAKE=$MAKE"
15429  if test "x$MAKE_CANDIDATE" != x; then
15430    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15431$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15432    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15433    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15434    if test "x$IS_GNU_MAKE" = x; then
15435      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15436$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15437    else
15438      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15439      if test "x$IS_MODERN_MAKE" = x; then
15440        { $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
15441$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;}
15442      else
15443        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15444          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15445            MAKE_EXPECTED_ENV='cygwin'
15446          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15447            MAKE_EXPECTED_ENV='msys'
15448          else
15449            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15450          fi
15451          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15452          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15453        else
15454          # Not relevant for non-Windows
15455          IS_MAKE_CORRECT_ENV=true
15456        fi
15457        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15458          { $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
15459$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;}
15460        else
15461          FOUND_MAKE=$MAKE_CANDIDATE
15462
15463  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15464
15465  # First separate the path from the arguments. This will split at the first
15466  # space.
15467  complete="$FOUND_MAKE"
15468  path="${complete%% *}"
15469  tmp="$complete EOL"
15470  arguments="${tmp#* }"
15471
15472  # Input might be given as Windows format, start by converting to
15473  # unix format.
15474  new_path=`$CYGPATH -u "$path"`
15475
15476  # Now try to locate executable using which
15477  new_path=`$WHICH "$new_path" 2> /dev/null`
15478  # bat and cmd files are not always considered executable in cygwin causing which
15479  # to not find them
15480  if test "x$new_path" = x \
15481      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15482      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15483    new_path=`$CYGPATH -u "$path"`
15484  fi
15485  if test "x$new_path" = x; then
15486    # Oops. Which didn't find the executable.
15487    # The splitting of arguments from the executable at a space might have been incorrect,
15488    # since paths with space are more likely in Windows. Give it another try with the whole
15489    # argument.
15490    path="$complete"
15491    arguments="EOL"
15492    new_path=`$CYGPATH -u "$path"`
15493    new_path=`$WHICH "$new_path" 2> /dev/null`
15494    # bat and cmd files are not always considered executable in cygwin causing which
15495    # to not find them
15496    if test "x$new_path" = x \
15497        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15498        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15499      new_path=`$CYGPATH -u "$path"`
15500    fi
15501    if test "x$new_path" = x; then
15502      # It's still not found. Now this is an unrecoverable error.
15503      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15504$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15505      has_space=`$ECHO "$complete" | $GREP " "`
15506      if test "x$has_space" != x; then
15507        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15508$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15509      fi
15510      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15511    fi
15512  fi
15513
15514  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15515  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15516  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15517  # "foo.exe" is OK but "foo" is an error.
15518  #
15519  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15520  # It is also a way to make sure we got the proper file name for the real test later on.
15521  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15522  if test "x$test_shortpath" = x; then
15523    # Short path failed, file does not exist as specified.
15524    # Try adding .exe or .cmd
15525    if test -f "${new_path}.exe"; then
15526      input_to_shortpath="${new_path}.exe"
15527    elif test -f "${new_path}.cmd"; then
15528      input_to_shortpath="${new_path}.cmd"
15529    else
15530      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15531$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15532      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15533$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15534      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15535    fi
15536  else
15537    input_to_shortpath="$new_path"
15538  fi
15539
15540  # Call helper function which possibly converts this using DOS-style short mode.
15541  # If so, the updated path is stored in $new_path.
15542  new_path="$input_to_shortpath"
15543
15544  input_path="$input_to_shortpath"
15545  # Check if we need to convert this using DOS-style short mode. If the path
15546  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15547  # take no chances and rewrite it.
15548  # Note: m4 eats our [], so we need to use [ and ] instead.
15549  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15550  if test "x$has_forbidden_chars" != x; then
15551    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15552    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15553    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15554    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15555      # Going to short mode and back again did indeed matter. Since short mode is
15556      # case insensitive, let's make it lowercase to improve readability.
15557      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15558      # Now convert it back to Unix-stile (cygpath)
15559      input_path=`$CYGPATH -u "$shortmode_path"`
15560      new_path="$input_path"
15561    fi
15562  fi
15563
15564  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15565  if test "x$test_cygdrive_prefix" = x; then
15566    # As a simple fix, exclude /usr/bin since it's not a real path.
15567    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15568      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15569      # a path prefixed by /cygdrive for fixpath to work.
15570      new_path="$CYGWIN_ROOT_PATH$input_path"
15571    fi
15572  fi
15573
15574  # remove trailing .exe if any
15575  new_path="${new_path/%.exe/}"
15576
15577  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15578
15579  # First separate the path from the arguments. This will split at the first
15580  # space.
15581  complete="$FOUND_MAKE"
15582  path="${complete%% *}"
15583  tmp="$complete EOL"
15584  arguments="${tmp#* }"
15585
15586  # Input might be given as Windows format, start by converting to
15587  # unix format.
15588  new_path="$path"
15589
15590  windows_path="$new_path"
15591  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15592    unix_path=`$CYGPATH -u "$windows_path"`
15593    new_path="$unix_path"
15594  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15595    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15596    new_path="$unix_path"
15597  fi
15598
15599
15600  # Now try to locate executable using which
15601  new_path=`$WHICH "$new_path" 2> /dev/null`
15602
15603  if test "x$new_path" = x; then
15604    # Oops. Which didn't find the executable.
15605    # The splitting of arguments from the executable at a space might have been incorrect,
15606    # since paths with space are more likely in Windows. Give it another try with the whole
15607    # argument.
15608    path="$complete"
15609    arguments="EOL"
15610    new_path="$path"
15611
15612  windows_path="$new_path"
15613  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15614    unix_path=`$CYGPATH -u "$windows_path"`
15615    new_path="$unix_path"
15616  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15617    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15618    new_path="$unix_path"
15619  fi
15620
15621
15622    new_path=`$WHICH "$new_path" 2> /dev/null`
15623    # bat and cmd files are not always considered executable in MSYS causing which
15624    # to not find them
15625    if test "x$new_path" = x \
15626        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15627        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15628      new_path="$path"
15629
15630  windows_path="$new_path"
15631  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15632    unix_path=`$CYGPATH -u "$windows_path"`
15633    new_path="$unix_path"
15634  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15635    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15636    new_path="$unix_path"
15637  fi
15638
15639    fi
15640
15641    if test "x$new_path" = x; then
15642      # It's still not found. Now this is an unrecoverable error.
15643      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15644$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15645      has_space=`$ECHO "$complete" | $GREP " "`
15646      if test "x$has_space" != x; then
15647        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15648$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15649      fi
15650      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15651    fi
15652  fi
15653
15654  # Now new_path has a complete unix path to the binary
15655  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15656    # Keep paths in /bin as-is, but remove trailing .exe if any
15657    new_path="${new_path/%.exe/}"
15658    # Do not save /bin paths to all_fixpath_prefixes!
15659  else
15660    # Not in mixed or Windows style, start by that.
15661    new_path=`cmd //c echo $new_path`
15662
15663  input_path="$new_path"
15664  # Check if we need to convert this using DOS-style short mode. If the path
15665  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15666  # take no chances and rewrite it.
15667  # Note: m4 eats our [], so we need to use [ and ] instead.
15668  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15669  if test "x$has_forbidden_chars" != x; then
15670    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15671    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15672  fi
15673
15674    # Output is in $new_path
15675
15676  windows_path="$new_path"
15677  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15678    unix_path=`$CYGPATH -u "$windows_path"`
15679    new_path="$unix_path"
15680  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15681    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15682    new_path="$unix_path"
15683  fi
15684
15685    # remove trailing .exe if any
15686    new_path="${new_path/%.exe/}"
15687
15688    # Save the first 10 bytes of this path to the storage, so fixpath can work.
15689    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15690  fi
15691
15692  else
15693    # We're on a unix platform. Hooray! :)
15694    # First separate the path from the arguments. This will split at the first
15695    # space.
15696    complete="$FOUND_MAKE"
15697    path="${complete%% *}"
15698    tmp="$complete EOL"
15699    arguments="${tmp#* }"
15700
15701    # Cannot rely on the command "which" here since it doesn't always work.
15702    is_absolute_path=`$ECHO "$path" | $GREP ^/`
15703    if test -z "$is_absolute_path"; then
15704      # Path to executable is not absolute. Find it.
15705      IFS_save="$IFS"
15706      IFS=:
15707      for p in $PATH; do
15708        if test -f "$p/$path" && test -x "$p/$path"; then
15709          new_path="$p/$path"
15710          break
15711        fi
15712      done
15713      IFS="$IFS_save"
15714    else
15715      # This is an absolute path, we can use it without further modifications.
15716      new_path="$path"
15717    fi
15718
15719    if test "x$new_path" = x; then
15720      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15721$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15722      has_space=`$ECHO "$complete" | $GREP " "`
15723      if test "x$has_space" != x; then
15724        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15725$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15726      fi
15727      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15728    fi
15729  fi
15730
15731  # Now join together the path and the arguments once again
15732  if test "x$arguments" != xEOL; then
15733    new_complete="$new_path ${arguments% *}"
15734  else
15735    new_complete="$new_path"
15736  fi
15737
15738  if test "x$complete" != "x$new_complete"; then
15739    FOUND_MAKE="$new_complete"
15740    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15741$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15742  fi
15743
15744        fi
15745      fi
15746    fi
15747  fi
15748
15749    if test "x$FOUND_MAKE" = x; then
15750      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
15751    fi
15752  else
15753    # Try our hardest to locate a correct version of GNU make
15754    for ac_prog in gmake
15755do
15756  # Extract the first word of "$ac_prog", so it can be a program name with args.
15757set dummy $ac_prog; ac_word=$2
15758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15759$as_echo_n "checking for $ac_word... " >&6; }
15760if ${ac_cv_path_CHECK_GMAKE+:} false; then :
15761  $as_echo_n "(cached) " >&6
15762else
15763  case $CHECK_GMAKE in
15764  [\\/]* | ?:[\\/]*)
15765  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
15766  ;;
15767  *)
15768  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15769for as_dir in $PATH
15770do
15771  IFS=$as_save_IFS
15772  test -z "$as_dir" && as_dir=.
15773    for ac_exec_ext in '' $ac_executable_extensions; do
15774  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15775    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
15776    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15777    break 2
15778  fi
15779done
15780  done
15781IFS=$as_save_IFS
15782
15783  ;;
15784esac
15785fi
15786CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
15787if test -n "$CHECK_GMAKE"; then
15788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
15789$as_echo "$CHECK_GMAKE" >&6; }
15790else
15791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15792$as_echo "no" >&6; }
15793fi
15794
15795
15796  test -n "$CHECK_GMAKE" && break
15797done
15798
15799
15800  MAKE_CANDIDATE=""$CHECK_GMAKE""
15801  DESCRIPTION="gmake in PATH"
15802  if test "x$MAKE_CANDIDATE" != x; then
15803    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15804$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15805    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15806    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15807    if test "x$IS_GNU_MAKE" = x; then
15808      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15809$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15810    else
15811      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15812      if test "x$IS_MODERN_MAKE" = x; then
15813        { $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
15814$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;}
15815      else
15816        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15817          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15818            MAKE_EXPECTED_ENV='cygwin'
15819          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15820            MAKE_EXPECTED_ENV='msys'
15821          else
15822            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15823          fi
15824          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15825          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15826        else
15827          # Not relevant for non-Windows
15828          IS_MAKE_CORRECT_ENV=true
15829        fi
15830        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15831          { $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
15832$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;}
15833        else
15834          FOUND_MAKE=$MAKE_CANDIDATE
15835
15836  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15837
15838  # First separate the path from the arguments. This will split at the first
15839  # space.
15840  complete="$FOUND_MAKE"
15841  path="${complete%% *}"
15842  tmp="$complete EOL"
15843  arguments="${tmp#* }"
15844
15845  # Input might be given as Windows format, start by converting to
15846  # unix format.
15847  new_path=`$CYGPATH -u "$path"`
15848
15849  # Now try to locate executable using which
15850  new_path=`$WHICH "$new_path" 2> /dev/null`
15851  # bat and cmd files are not always considered executable in cygwin causing which
15852  # to not find them
15853  if test "x$new_path" = x \
15854      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15855      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15856    new_path=`$CYGPATH -u "$path"`
15857  fi
15858  if test "x$new_path" = x; then
15859    # Oops. Which didn't find the executable.
15860    # The splitting of arguments from the executable at a space might have been incorrect,
15861    # since paths with space are more likely in Windows. Give it another try with the whole
15862    # argument.
15863    path="$complete"
15864    arguments="EOL"
15865    new_path=`$CYGPATH -u "$path"`
15866    new_path=`$WHICH "$new_path" 2> /dev/null`
15867    # bat and cmd files are not always considered executable in cygwin causing which
15868    # to not find them
15869    if test "x$new_path" = x \
15870        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15871        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15872      new_path=`$CYGPATH -u "$path"`
15873    fi
15874    if test "x$new_path" = x; then
15875      # It's still not found. Now this is an unrecoverable error.
15876      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15877$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15878      has_space=`$ECHO "$complete" | $GREP " "`
15879      if test "x$has_space" != x; then
15880        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15881$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15882      fi
15883      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15884    fi
15885  fi
15886
15887  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15888  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15889  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15890  # "foo.exe" is OK but "foo" is an error.
15891  #
15892  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15893  # It is also a way to make sure we got the proper file name for the real test later on.
15894  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15895  if test "x$test_shortpath" = x; then
15896    # Short path failed, file does not exist as specified.
15897    # Try adding .exe or .cmd
15898    if test -f "${new_path}.exe"; then
15899      input_to_shortpath="${new_path}.exe"
15900    elif test -f "${new_path}.cmd"; then
15901      input_to_shortpath="${new_path}.cmd"
15902    else
15903      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15904$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15905      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15906$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15907      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15908    fi
15909  else
15910    input_to_shortpath="$new_path"
15911  fi
15912
15913  # Call helper function which possibly converts this using DOS-style short mode.
15914  # If so, the updated path is stored in $new_path.
15915  new_path="$input_to_shortpath"
15916
15917  input_path="$input_to_shortpath"
15918  # Check if we need to convert this using DOS-style short mode. If the path
15919  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15920  # take no chances and rewrite it.
15921  # Note: m4 eats our [], so we need to use [ and ] instead.
15922  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15923  if test "x$has_forbidden_chars" != x; then
15924    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15925    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15926    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15927    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15928      # Going to short mode and back again did indeed matter. Since short mode is
15929      # case insensitive, let's make it lowercase to improve readability.
15930      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15931      # Now convert it back to Unix-stile (cygpath)
15932      input_path=`$CYGPATH -u "$shortmode_path"`
15933      new_path="$input_path"
15934    fi
15935  fi
15936
15937  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15938  if test "x$test_cygdrive_prefix" = x; then
15939    # As a simple fix, exclude /usr/bin since it's not a real path.
15940    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15941      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15942      # a path prefixed by /cygdrive for fixpath to work.
15943      new_path="$CYGWIN_ROOT_PATH$input_path"
15944    fi
15945  fi
15946
15947  # remove trailing .exe if any
15948  new_path="${new_path/%.exe/}"
15949
15950  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15951
15952  # First separate the path from the arguments. This will split at the first
15953  # space.
15954  complete="$FOUND_MAKE"
15955  path="${complete%% *}"
15956  tmp="$complete EOL"
15957  arguments="${tmp#* }"
15958
15959  # Input might be given as Windows format, start by converting to
15960  # unix format.
15961  new_path="$path"
15962
15963  windows_path="$new_path"
15964  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15965    unix_path=`$CYGPATH -u "$windows_path"`
15966    new_path="$unix_path"
15967  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15968    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15969    new_path="$unix_path"
15970  fi
15971
15972
15973  # Now try to locate executable using which
15974  new_path=`$WHICH "$new_path" 2> /dev/null`
15975
15976  if test "x$new_path" = x; then
15977    # Oops. Which didn't find the executable.
15978    # The splitting of arguments from the executable at a space might have been incorrect,
15979    # since paths with space are more likely in Windows. Give it another try with the whole
15980    # argument.
15981    path="$complete"
15982    arguments="EOL"
15983    new_path="$path"
15984
15985  windows_path="$new_path"
15986  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15987    unix_path=`$CYGPATH -u "$windows_path"`
15988    new_path="$unix_path"
15989  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15990    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15991    new_path="$unix_path"
15992  fi
15993
15994
15995    new_path=`$WHICH "$new_path" 2> /dev/null`
15996    # bat and cmd files are not always considered executable in MSYS causing which
15997    # to not find them
15998    if test "x$new_path" = x \
15999        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16000        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16001      new_path="$path"
16002
16003  windows_path="$new_path"
16004  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16005    unix_path=`$CYGPATH -u "$windows_path"`
16006    new_path="$unix_path"
16007  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16008    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16009    new_path="$unix_path"
16010  fi
16011
16012    fi
16013
16014    if test "x$new_path" = x; then
16015      # It's still not found. Now this is an unrecoverable error.
16016      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16017$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16018      has_space=`$ECHO "$complete" | $GREP " "`
16019      if test "x$has_space" != x; then
16020        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16021$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16022      fi
16023      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16024    fi
16025  fi
16026
16027  # Now new_path has a complete unix path to the binary
16028  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16029    # Keep paths in /bin as-is, but remove trailing .exe if any
16030    new_path="${new_path/%.exe/}"
16031    # Do not save /bin paths to all_fixpath_prefixes!
16032  else
16033    # Not in mixed or Windows style, start by that.
16034    new_path=`cmd //c echo $new_path`
16035
16036  input_path="$new_path"
16037  # Check if we need to convert this using DOS-style short mode. If the path
16038  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16039  # take no chances and rewrite it.
16040  # Note: m4 eats our [], so we need to use [ and ] instead.
16041  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16042  if test "x$has_forbidden_chars" != x; then
16043    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16044    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16045  fi
16046
16047    # Output is in $new_path
16048
16049  windows_path="$new_path"
16050  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16051    unix_path=`$CYGPATH -u "$windows_path"`
16052    new_path="$unix_path"
16053  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16054    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16055    new_path="$unix_path"
16056  fi
16057
16058    # remove trailing .exe if any
16059    new_path="${new_path/%.exe/}"
16060
16061    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16062    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16063  fi
16064
16065  else
16066    # We're on a unix platform. Hooray! :)
16067    # First separate the path from the arguments. This will split at the first
16068    # space.
16069    complete="$FOUND_MAKE"
16070    path="${complete%% *}"
16071    tmp="$complete EOL"
16072    arguments="${tmp#* }"
16073
16074    # Cannot rely on the command "which" here since it doesn't always work.
16075    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16076    if test -z "$is_absolute_path"; then
16077      # Path to executable is not absolute. Find it.
16078      IFS_save="$IFS"
16079      IFS=:
16080      for p in $PATH; do
16081        if test -f "$p/$path" && test -x "$p/$path"; then
16082          new_path="$p/$path"
16083          break
16084        fi
16085      done
16086      IFS="$IFS_save"
16087    else
16088      # This is an absolute path, we can use it without further modifications.
16089      new_path="$path"
16090    fi
16091
16092    if test "x$new_path" = x; then
16093      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16094$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16095      has_space=`$ECHO "$complete" | $GREP " "`
16096      if test "x$has_space" != x; then
16097        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16098$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16099      fi
16100      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16101    fi
16102  fi
16103
16104  # Now join together the path and the arguments once again
16105  if test "x$arguments" != xEOL; then
16106    new_complete="$new_path ${arguments% *}"
16107  else
16108    new_complete="$new_path"
16109  fi
16110
16111  if test "x$complete" != "x$new_complete"; then
16112    FOUND_MAKE="$new_complete"
16113    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16114$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16115  fi
16116
16117        fi
16118      fi
16119    fi
16120  fi
16121
16122
16123    if test "x$FOUND_MAKE" = x; then
16124      for ac_prog in make
16125do
16126  # Extract the first word of "$ac_prog", so it can be a program name with args.
16127set dummy $ac_prog; ac_word=$2
16128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16129$as_echo_n "checking for $ac_word... " >&6; }
16130if ${ac_cv_path_CHECK_MAKE+:} false; then :
16131  $as_echo_n "(cached) " >&6
16132else
16133  case $CHECK_MAKE in
16134  [\\/]* | ?:[\\/]*)
16135  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
16136  ;;
16137  *)
16138  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16139for as_dir in $PATH
16140do
16141  IFS=$as_save_IFS
16142  test -z "$as_dir" && as_dir=.
16143    for ac_exec_ext in '' $ac_executable_extensions; do
16144  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16145    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
16146    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16147    break 2
16148  fi
16149done
16150  done
16151IFS=$as_save_IFS
16152
16153  ;;
16154esac
16155fi
16156CHECK_MAKE=$ac_cv_path_CHECK_MAKE
16157if test -n "$CHECK_MAKE"; then
16158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
16159$as_echo "$CHECK_MAKE" >&6; }
16160else
16161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16162$as_echo "no" >&6; }
16163fi
16164
16165
16166  test -n "$CHECK_MAKE" && break
16167done
16168
16169
16170  MAKE_CANDIDATE=""$CHECK_MAKE""
16171  DESCRIPTION="make in PATH"
16172  if test "x$MAKE_CANDIDATE" != x; then
16173    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16174$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16175    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16176    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16177    if test "x$IS_GNU_MAKE" = x; then
16178      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16179$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16180    else
16181      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16182      if test "x$IS_MODERN_MAKE" = x; then
16183        { $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
16184$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;}
16185      else
16186        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16187          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16188            MAKE_EXPECTED_ENV='cygwin'
16189          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16190            MAKE_EXPECTED_ENV='msys'
16191          else
16192            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16193          fi
16194          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16195          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16196        else
16197          # Not relevant for non-Windows
16198          IS_MAKE_CORRECT_ENV=true
16199        fi
16200        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16201          { $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
16202$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;}
16203        else
16204          FOUND_MAKE=$MAKE_CANDIDATE
16205
16206  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16207
16208  # First separate the path from the arguments. This will split at the first
16209  # space.
16210  complete="$FOUND_MAKE"
16211  path="${complete%% *}"
16212  tmp="$complete EOL"
16213  arguments="${tmp#* }"
16214
16215  # Input might be given as Windows format, start by converting to
16216  # unix format.
16217  new_path=`$CYGPATH -u "$path"`
16218
16219  # Now try to locate executable using which
16220  new_path=`$WHICH "$new_path" 2> /dev/null`
16221  # bat and cmd files are not always considered executable in cygwin causing which
16222  # to not find them
16223  if test "x$new_path" = x \
16224      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16225      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16226    new_path=`$CYGPATH -u "$path"`
16227  fi
16228  if test "x$new_path" = x; then
16229    # Oops. Which didn't find the executable.
16230    # The splitting of arguments from the executable at a space might have been incorrect,
16231    # since paths with space are more likely in Windows. Give it another try with the whole
16232    # argument.
16233    path="$complete"
16234    arguments="EOL"
16235    new_path=`$CYGPATH -u "$path"`
16236    new_path=`$WHICH "$new_path" 2> /dev/null`
16237    # bat and cmd files are not always considered executable in cygwin causing which
16238    # to not find them
16239    if test "x$new_path" = x \
16240        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16241        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16242      new_path=`$CYGPATH -u "$path"`
16243    fi
16244    if test "x$new_path" = x; then
16245      # It's still not found. Now this is an unrecoverable error.
16246      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16247$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16248      has_space=`$ECHO "$complete" | $GREP " "`
16249      if test "x$has_space" != x; then
16250        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16251$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16252      fi
16253      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16254    fi
16255  fi
16256
16257  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16258  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16259  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16260  # "foo.exe" is OK but "foo" is an error.
16261  #
16262  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16263  # It is also a way to make sure we got the proper file name for the real test later on.
16264  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16265  if test "x$test_shortpath" = x; then
16266    # Short path failed, file does not exist as specified.
16267    # Try adding .exe or .cmd
16268    if test -f "${new_path}.exe"; then
16269      input_to_shortpath="${new_path}.exe"
16270    elif test -f "${new_path}.cmd"; then
16271      input_to_shortpath="${new_path}.cmd"
16272    else
16273      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16274$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16275      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16276$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16277      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16278    fi
16279  else
16280    input_to_shortpath="$new_path"
16281  fi
16282
16283  # Call helper function which possibly converts this using DOS-style short mode.
16284  # If so, the updated path is stored in $new_path.
16285  new_path="$input_to_shortpath"
16286
16287  input_path="$input_to_shortpath"
16288  # Check if we need to convert this using DOS-style short mode. If the path
16289  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16290  # take no chances and rewrite it.
16291  # Note: m4 eats our [], so we need to use [ and ] instead.
16292  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16293  if test "x$has_forbidden_chars" != x; then
16294    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16295    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16296    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16297    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16298      # Going to short mode and back again did indeed matter. Since short mode is
16299      # case insensitive, let's make it lowercase to improve readability.
16300      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16301      # Now convert it back to Unix-stile (cygpath)
16302      input_path=`$CYGPATH -u "$shortmode_path"`
16303      new_path="$input_path"
16304    fi
16305  fi
16306
16307  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16308  if test "x$test_cygdrive_prefix" = x; then
16309    # As a simple fix, exclude /usr/bin since it's not a real path.
16310    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16311      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16312      # a path prefixed by /cygdrive for fixpath to work.
16313      new_path="$CYGWIN_ROOT_PATH$input_path"
16314    fi
16315  fi
16316
16317  # remove trailing .exe if any
16318  new_path="${new_path/%.exe/}"
16319
16320  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16321
16322  # First separate the path from the arguments. This will split at the first
16323  # space.
16324  complete="$FOUND_MAKE"
16325  path="${complete%% *}"
16326  tmp="$complete EOL"
16327  arguments="${tmp#* }"
16328
16329  # Input might be given as Windows format, start by converting to
16330  # unix format.
16331  new_path="$path"
16332
16333  windows_path="$new_path"
16334  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16335    unix_path=`$CYGPATH -u "$windows_path"`
16336    new_path="$unix_path"
16337  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16338    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16339    new_path="$unix_path"
16340  fi
16341
16342
16343  # Now try to locate executable using which
16344  new_path=`$WHICH "$new_path" 2> /dev/null`
16345
16346  if test "x$new_path" = x; then
16347    # Oops. Which didn't find the executable.
16348    # The splitting of arguments from the executable at a space might have been incorrect,
16349    # since paths with space are more likely in Windows. Give it another try with the whole
16350    # argument.
16351    path="$complete"
16352    arguments="EOL"
16353    new_path="$path"
16354
16355  windows_path="$new_path"
16356  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16357    unix_path=`$CYGPATH -u "$windows_path"`
16358    new_path="$unix_path"
16359  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16360    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16361    new_path="$unix_path"
16362  fi
16363
16364
16365    new_path=`$WHICH "$new_path" 2> /dev/null`
16366    # bat and cmd files are not always considered executable in MSYS causing which
16367    # to not find them
16368    if test "x$new_path" = x \
16369        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16370        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16371      new_path="$path"
16372
16373  windows_path="$new_path"
16374  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16375    unix_path=`$CYGPATH -u "$windows_path"`
16376    new_path="$unix_path"
16377  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16378    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16379    new_path="$unix_path"
16380  fi
16381
16382    fi
16383
16384    if test "x$new_path" = x; then
16385      # It's still not found. Now this is an unrecoverable error.
16386      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16387$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16388      has_space=`$ECHO "$complete" | $GREP " "`
16389      if test "x$has_space" != x; then
16390        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16391$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16392      fi
16393      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16394    fi
16395  fi
16396
16397  # Now new_path has a complete unix path to the binary
16398  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16399    # Keep paths in /bin as-is, but remove trailing .exe if any
16400    new_path="${new_path/%.exe/}"
16401    # Do not save /bin paths to all_fixpath_prefixes!
16402  else
16403    # Not in mixed or Windows style, start by that.
16404    new_path=`cmd //c echo $new_path`
16405
16406  input_path="$new_path"
16407  # Check if we need to convert this using DOS-style short mode. If the path
16408  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16409  # take no chances and rewrite it.
16410  # Note: m4 eats our [], so we need to use [ and ] instead.
16411  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16412  if test "x$has_forbidden_chars" != x; then
16413    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16414    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16415  fi
16416
16417    # Output is in $new_path
16418
16419  windows_path="$new_path"
16420  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16421    unix_path=`$CYGPATH -u "$windows_path"`
16422    new_path="$unix_path"
16423  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16424    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16425    new_path="$unix_path"
16426  fi
16427
16428    # remove trailing .exe if any
16429    new_path="${new_path/%.exe/}"
16430
16431    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16432    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16433  fi
16434
16435  else
16436    # We're on a unix platform. Hooray! :)
16437    # First separate the path from the arguments. This will split at the first
16438    # space.
16439    complete="$FOUND_MAKE"
16440    path="${complete%% *}"
16441    tmp="$complete EOL"
16442    arguments="${tmp#* }"
16443
16444    # Cannot rely on the command "which" here since it doesn't always work.
16445    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16446    if test -z "$is_absolute_path"; then
16447      # Path to executable is not absolute. Find it.
16448      IFS_save="$IFS"
16449      IFS=:
16450      for p in $PATH; do
16451        if test -f "$p/$path" && test -x "$p/$path"; then
16452          new_path="$p/$path"
16453          break
16454        fi
16455      done
16456      IFS="$IFS_save"
16457    else
16458      # This is an absolute path, we can use it without further modifications.
16459      new_path="$path"
16460    fi
16461
16462    if test "x$new_path" = x; then
16463      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16464$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16465      has_space=`$ECHO "$complete" | $GREP " "`
16466      if test "x$has_space" != x; then
16467        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16468$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16469      fi
16470      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16471    fi
16472  fi
16473
16474  # Now join together the path and the arguments once again
16475  if test "x$arguments" != xEOL; then
16476    new_complete="$new_path ${arguments% *}"
16477  else
16478    new_complete="$new_path"
16479  fi
16480
16481  if test "x$complete" != "x$new_complete"; then
16482    FOUND_MAKE="$new_complete"
16483    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16484$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16485  fi
16486
16487        fi
16488      fi
16489    fi
16490  fi
16491
16492    fi
16493
16494    if test "x$FOUND_MAKE" = x; then
16495      if test "x$TOOLCHAIN_PATH" != x; then
16496        # We have a toolchain path, check that as well before giving up.
16497        OLD_PATH=$PATH
16498        PATH=$TOOLCHAIN_PATH:$PATH
16499        for ac_prog in gmake
16500do
16501  # Extract the first word of "$ac_prog", so it can be a program name with args.
16502set dummy $ac_prog; ac_word=$2
16503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16504$as_echo_n "checking for $ac_word... " >&6; }
16505if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
16506  $as_echo_n "(cached) " >&6
16507else
16508  case $CHECK_TOOLSDIR_GMAKE in
16509  [\\/]* | ?:[\\/]*)
16510  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
16511  ;;
16512  *)
16513  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16514for as_dir in $PATH
16515do
16516  IFS=$as_save_IFS
16517  test -z "$as_dir" && as_dir=.
16518    for ac_exec_ext in '' $ac_executable_extensions; do
16519  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16520    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16521    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16522    break 2
16523  fi
16524done
16525  done
16526IFS=$as_save_IFS
16527
16528  ;;
16529esac
16530fi
16531CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
16532if test -n "$CHECK_TOOLSDIR_GMAKE"; then
16533  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
16534$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
16535else
16536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16537$as_echo "no" >&6; }
16538fi
16539
16540
16541  test -n "$CHECK_TOOLSDIR_GMAKE" && break
16542done
16543
16544
16545  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
16546  DESCRIPTION="gmake in tools-dir"
16547  if test "x$MAKE_CANDIDATE" != x; then
16548    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16549$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16550    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16551    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16552    if test "x$IS_GNU_MAKE" = x; then
16553      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16554$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16555    else
16556      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16557      if test "x$IS_MODERN_MAKE" = x; then
16558        { $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
16559$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;}
16560      else
16561        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16562          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16563            MAKE_EXPECTED_ENV='cygwin'
16564          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16565            MAKE_EXPECTED_ENV='msys'
16566          else
16567            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16568          fi
16569          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16570          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16571        else
16572          # Not relevant for non-Windows
16573          IS_MAKE_CORRECT_ENV=true
16574        fi
16575        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16576          { $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
16577$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;}
16578        else
16579          FOUND_MAKE=$MAKE_CANDIDATE
16580
16581  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16582
16583  # First separate the path from the arguments. This will split at the first
16584  # space.
16585  complete="$FOUND_MAKE"
16586  path="${complete%% *}"
16587  tmp="$complete EOL"
16588  arguments="${tmp#* }"
16589
16590  # Input might be given as Windows format, start by converting to
16591  # unix format.
16592  new_path=`$CYGPATH -u "$path"`
16593
16594  # Now try to locate executable using which
16595  new_path=`$WHICH "$new_path" 2> /dev/null`
16596  # bat and cmd files are not always considered executable in cygwin causing which
16597  # to not find them
16598  if test "x$new_path" = x \
16599      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16600      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16601    new_path=`$CYGPATH -u "$path"`
16602  fi
16603  if test "x$new_path" = x; then
16604    # Oops. Which didn't find the executable.
16605    # The splitting of arguments from the executable at a space might have been incorrect,
16606    # since paths with space are more likely in Windows. Give it another try with the whole
16607    # argument.
16608    path="$complete"
16609    arguments="EOL"
16610    new_path=`$CYGPATH -u "$path"`
16611    new_path=`$WHICH "$new_path" 2> /dev/null`
16612    # bat and cmd files are not always considered executable in cygwin causing which
16613    # to not find them
16614    if test "x$new_path" = x \
16615        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16616        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16617      new_path=`$CYGPATH -u "$path"`
16618    fi
16619    if test "x$new_path" = x; then
16620      # It's still not found. Now this is an unrecoverable error.
16621      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16622$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16623      has_space=`$ECHO "$complete" | $GREP " "`
16624      if test "x$has_space" != x; then
16625        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16626$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16627      fi
16628      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16629    fi
16630  fi
16631
16632  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16633  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16634  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16635  # "foo.exe" is OK but "foo" is an error.
16636  #
16637  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16638  # It is also a way to make sure we got the proper file name for the real test later on.
16639  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16640  if test "x$test_shortpath" = x; then
16641    # Short path failed, file does not exist as specified.
16642    # Try adding .exe or .cmd
16643    if test -f "${new_path}.exe"; then
16644      input_to_shortpath="${new_path}.exe"
16645    elif test -f "${new_path}.cmd"; then
16646      input_to_shortpath="${new_path}.cmd"
16647    else
16648      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16649$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16650      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16651$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16652      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16653    fi
16654  else
16655    input_to_shortpath="$new_path"
16656  fi
16657
16658  # Call helper function which possibly converts this using DOS-style short mode.
16659  # If so, the updated path is stored in $new_path.
16660  new_path="$input_to_shortpath"
16661
16662  input_path="$input_to_shortpath"
16663  # Check if we need to convert this using DOS-style short mode. If the path
16664  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16665  # take no chances and rewrite it.
16666  # Note: m4 eats our [], so we need to use [ and ] instead.
16667  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16668  if test "x$has_forbidden_chars" != x; then
16669    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16670    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16671    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16672    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16673      # Going to short mode and back again did indeed matter. Since short mode is
16674      # case insensitive, let's make it lowercase to improve readability.
16675      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16676      # Now convert it back to Unix-stile (cygpath)
16677      input_path=`$CYGPATH -u "$shortmode_path"`
16678      new_path="$input_path"
16679    fi
16680  fi
16681
16682  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16683  if test "x$test_cygdrive_prefix" = x; then
16684    # As a simple fix, exclude /usr/bin since it's not a real path.
16685    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16686      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16687      # a path prefixed by /cygdrive for fixpath to work.
16688      new_path="$CYGWIN_ROOT_PATH$input_path"
16689    fi
16690  fi
16691
16692  # remove trailing .exe if any
16693  new_path="${new_path/%.exe/}"
16694
16695  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16696
16697  # First separate the path from the arguments. This will split at the first
16698  # space.
16699  complete="$FOUND_MAKE"
16700  path="${complete%% *}"
16701  tmp="$complete EOL"
16702  arguments="${tmp#* }"
16703
16704  # Input might be given as Windows format, start by converting to
16705  # unix format.
16706  new_path="$path"
16707
16708  windows_path="$new_path"
16709  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16710    unix_path=`$CYGPATH -u "$windows_path"`
16711    new_path="$unix_path"
16712  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16713    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16714    new_path="$unix_path"
16715  fi
16716
16717
16718  # Now try to locate executable using which
16719  new_path=`$WHICH "$new_path" 2> /dev/null`
16720
16721  if test "x$new_path" = x; then
16722    # Oops. Which didn't find the executable.
16723    # The splitting of arguments from the executable at a space might have been incorrect,
16724    # since paths with space are more likely in Windows. Give it another try with the whole
16725    # argument.
16726    path="$complete"
16727    arguments="EOL"
16728    new_path="$path"
16729
16730  windows_path="$new_path"
16731  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16732    unix_path=`$CYGPATH -u "$windows_path"`
16733    new_path="$unix_path"
16734  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16735    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16736    new_path="$unix_path"
16737  fi
16738
16739
16740    new_path=`$WHICH "$new_path" 2> /dev/null`
16741    # bat and cmd files are not always considered executable in MSYS causing which
16742    # to not find them
16743    if test "x$new_path" = x \
16744        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16745        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16746      new_path="$path"
16747
16748  windows_path="$new_path"
16749  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16750    unix_path=`$CYGPATH -u "$windows_path"`
16751    new_path="$unix_path"
16752  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16753    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16754    new_path="$unix_path"
16755  fi
16756
16757    fi
16758
16759    if test "x$new_path" = x; then
16760      # It's still not found. Now this is an unrecoverable error.
16761      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16762$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16763      has_space=`$ECHO "$complete" | $GREP " "`
16764      if test "x$has_space" != x; then
16765        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16766$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16767      fi
16768      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16769    fi
16770  fi
16771
16772  # Now new_path has a complete unix path to the binary
16773  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16774    # Keep paths in /bin as-is, but remove trailing .exe if any
16775    new_path="${new_path/%.exe/}"
16776    # Do not save /bin paths to all_fixpath_prefixes!
16777  else
16778    # Not in mixed or Windows style, start by that.
16779    new_path=`cmd //c echo $new_path`
16780
16781  input_path="$new_path"
16782  # Check if we need to convert this using DOS-style short mode. If the path
16783  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16784  # take no chances and rewrite it.
16785  # Note: m4 eats our [], so we need to use [ and ] instead.
16786  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16787  if test "x$has_forbidden_chars" != x; then
16788    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16789    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16790  fi
16791
16792    # Output is in $new_path
16793
16794  windows_path="$new_path"
16795  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16796    unix_path=`$CYGPATH -u "$windows_path"`
16797    new_path="$unix_path"
16798  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16799    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16800    new_path="$unix_path"
16801  fi
16802
16803    # remove trailing .exe if any
16804    new_path="${new_path/%.exe/}"
16805
16806    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16807    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16808  fi
16809
16810  else
16811    # We're on a unix platform. Hooray! :)
16812    # First separate the path from the arguments. This will split at the first
16813    # space.
16814    complete="$FOUND_MAKE"
16815    path="${complete%% *}"
16816    tmp="$complete EOL"
16817    arguments="${tmp#* }"
16818
16819    # Cannot rely on the command "which" here since it doesn't always work.
16820    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16821    if test -z "$is_absolute_path"; then
16822      # Path to executable is not absolute. Find it.
16823      IFS_save="$IFS"
16824      IFS=:
16825      for p in $PATH; do
16826        if test -f "$p/$path" && test -x "$p/$path"; then
16827          new_path="$p/$path"
16828          break
16829        fi
16830      done
16831      IFS="$IFS_save"
16832    else
16833      # This is an absolute path, we can use it without further modifications.
16834      new_path="$path"
16835    fi
16836
16837    if test "x$new_path" = x; then
16838      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16839$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16840      has_space=`$ECHO "$complete" | $GREP " "`
16841      if test "x$has_space" != x; then
16842        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16843$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16844      fi
16845      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16846    fi
16847  fi
16848
16849  # Now join together the path and the arguments once again
16850  if test "x$arguments" != xEOL; then
16851    new_complete="$new_path ${arguments% *}"
16852  else
16853    new_complete="$new_path"
16854  fi
16855
16856  if test "x$complete" != "x$new_complete"; then
16857    FOUND_MAKE="$new_complete"
16858    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16859$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16860  fi
16861
16862        fi
16863      fi
16864    fi
16865  fi
16866
16867        if test "x$FOUND_MAKE" = x; then
16868          for ac_prog in make
16869do
16870  # Extract the first word of "$ac_prog", so it can be a program name with args.
16871set dummy $ac_prog; ac_word=$2
16872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16873$as_echo_n "checking for $ac_word... " >&6; }
16874if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
16875  $as_echo_n "(cached) " >&6
16876else
16877  case $CHECK_TOOLSDIR_MAKE in
16878  [\\/]* | ?:[\\/]*)
16879  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
16880  ;;
16881  *)
16882  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16883for as_dir in $PATH
16884do
16885  IFS=$as_save_IFS
16886  test -z "$as_dir" && as_dir=.
16887    for ac_exec_ext in '' $ac_executable_extensions; do
16888  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16889    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
16890    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16891    break 2
16892  fi
16893done
16894  done
16895IFS=$as_save_IFS
16896
16897  ;;
16898esac
16899fi
16900CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
16901if test -n "$CHECK_TOOLSDIR_MAKE"; then
16902  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
16903$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
16904else
16905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16906$as_echo "no" >&6; }
16907fi
16908
16909
16910  test -n "$CHECK_TOOLSDIR_MAKE" && break
16911done
16912
16913
16914  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
16915  DESCRIPTION="make in tools-dir"
16916  if test "x$MAKE_CANDIDATE" != x; then
16917    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16918$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16919    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16920    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16921    if test "x$IS_GNU_MAKE" = x; then
16922      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16923$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16924    else
16925      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16926      if test "x$IS_MODERN_MAKE" = x; then
16927        { $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
16928$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;}
16929      else
16930        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16931          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16932            MAKE_EXPECTED_ENV='cygwin'
16933          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16934            MAKE_EXPECTED_ENV='msys'
16935          else
16936            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16937          fi
16938          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16939          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16940        else
16941          # Not relevant for non-Windows
16942          IS_MAKE_CORRECT_ENV=true
16943        fi
16944        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16945          { $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
16946$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;}
16947        else
16948          FOUND_MAKE=$MAKE_CANDIDATE
16949
16950  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16951
16952  # First separate the path from the arguments. This will split at the first
16953  # space.
16954  complete="$FOUND_MAKE"
16955  path="${complete%% *}"
16956  tmp="$complete EOL"
16957  arguments="${tmp#* }"
16958
16959  # Input might be given as Windows format, start by converting to
16960  # unix format.
16961  new_path=`$CYGPATH -u "$path"`
16962
16963  # Now try to locate executable using which
16964  new_path=`$WHICH "$new_path" 2> /dev/null`
16965  # bat and cmd files are not always considered executable in cygwin causing which
16966  # to not find them
16967  if test "x$new_path" = x \
16968      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16969      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16970    new_path=`$CYGPATH -u "$path"`
16971  fi
16972  if test "x$new_path" = x; then
16973    # Oops. Which didn't find the executable.
16974    # The splitting of arguments from the executable at a space might have been incorrect,
16975    # since paths with space are more likely in Windows. Give it another try with the whole
16976    # argument.
16977    path="$complete"
16978    arguments="EOL"
16979    new_path=`$CYGPATH -u "$path"`
16980    new_path=`$WHICH "$new_path" 2> /dev/null`
16981    # bat and cmd files are not always considered executable in cygwin causing which
16982    # to not find them
16983    if test "x$new_path" = x \
16984        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16985        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16986      new_path=`$CYGPATH -u "$path"`
16987    fi
16988    if test "x$new_path" = x; then
16989      # It's still not found. Now this is an unrecoverable error.
16990      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16991$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16992      has_space=`$ECHO "$complete" | $GREP " "`
16993      if test "x$has_space" != x; then
16994        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16995$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16996      fi
16997      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16998    fi
16999  fi
17000
17001  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17002  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17003  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17004  # "foo.exe" is OK but "foo" is an error.
17005  #
17006  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17007  # It is also a way to make sure we got the proper file name for the real test later on.
17008  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17009  if test "x$test_shortpath" = x; then
17010    # Short path failed, file does not exist as specified.
17011    # Try adding .exe or .cmd
17012    if test -f "${new_path}.exe"; then
17013      input_to_shortpath="${new_path}.exe"
17014    elif test -f "${new_path}.cmd"; then
17015      input_to_shortpath="${new_path}.cmd"
17016    else
17017      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17018$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17019      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17020$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17021      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17022    fi
17023  else
17024    input_to_shortpath="$new_path"
17025  fi
17026
17027  # Call helper function which possibly converts this using DOS-style short mode.
17028  # If so, the updated path is stored in $new_path.
17029  new_path="$input_to_shortpath"
17030
17031  input_path="$input_to_shortpath"
17032  # Check if we need to convert this using DOS-style short mode. If the path
17033  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17034  # take no chances and rewrite it.
17035  # Note: m4 eats our [], so we need to use [ and ] instead.
17036  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17037  if test "x$has_forbidden_chars" != x; then
17038    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17039    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17040    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17041    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17042      # Going to short mode and back again did indeed matter. Since short mode is
17043      # case insensitive, let's make it lowercase to improve readability.
17044      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17045      # Now convert it back to Unix-stile (cygpath)
17046      input_path=`$CYGPATH -u "$shortmode_path"`
17047      new_path="$input_path"
17048    fi
17049  fi
17050
17051  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17052  if test "x$test_cygdrive_prefix" = x; then
17053    # As a simple fix, exclude /usr/bin since it's not a real path.
17054    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17055      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17056      # a path prefixed by /cygdrive for fixpath to work.
17057      new_path="$CYGWIN_ROOT_PATH$input_path"
17058    fi
17059  fi
17060
17061  # remove trailing .exe if any
17062  new_path="${new_path/%.exe/}"
17063
17064  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17065
17066  # First separate the path from the arguments. This will split at the first
17067  # space.
17068  complete="$FOUND_MAKE"
17069  path="${complete%% *}"
17070  tmp="$complete EOL"
17071  arguments="${tmp#* }"
17072
17073  # Input might be given as Windows format, start by converting to
17074  # unix format.
17075  new_path="$path"
17076
17077  windows_path="$new_path"
17078  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17079    unix_path=`$CYGPATH -u "$windows_path"`
17080    new_path="$unix_path"
17081  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17082    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17083    new_path="$unix_path"
17084  fi
17085
17086
17087  # Now try to locate executable using which
17088  new_path=`$WHICH "$new_path" 2> /dev/null`
17089
17090  if test "x$new_path" = x; then
17091    # Oops. Which didn't find the executable.
17092    # The splitting of arguments from the executable at a space might have been incorrect,
17093    # since paths with space are more likely in Windows. Give it another try with the whole
17094    # argument.
17095    path="$complete"
17096    arguments="EOL"
17097    new_path="$path"
17098
17099  windows_path="$new_path"
17100  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17101    unix_path=`$CYGPATH -u "$windows_path"`
17102    new_path="$unix_path"
17103  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17104    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17105    new_path="$unix_path"
17106  fi
17107
17108
17109    new_path=`$WHICH "$new_path" 2> /dev/null`
17110    # bat and cmd files are not always considered executable in MSYS causing which
17111    # to not find them
17112    if test "x$new_path" = x \
17113        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17114        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17115      new_path="$path"
17116
17117  windows_path="$new_path"
17118  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17119    unix_path=`$CYGPATH -u "$windows_path"`
17120    new_path="$unix_path"
17121  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17122    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17123    new_path="$unix_path"
17124  fi
17125
17126    fi
17127
17128    if test "x$new_path" = x; then
17129      # It's still not found. Now this is an unrecoverable error.
17130      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17131$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17132      has_space=`$ECHO "$complete" | $GREP " "`
17133      if test "x$has_space" != x; then
17134        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17135$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17136      fi
17137      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17138    fi
17139  fi
17140
17141  # Now new_path has a complete unix path to the binary
17142  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17143    # Keep paths in /bin as-is, but remove trailing .exe if any
17144    new_path="${new_path/%.exe/}"
17145    # Do not save /bin paths to all_fixpath_prefixes!
17146  else
17147    # Not in mixed or Windows style, start by that.
17148    new_path=`cmd //c echo $new_path`
17149
17150  input_path="$new_path"
17151  # Check if we need to convert this using DOS-style short mode. If the path
17152  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17153  # take no chances and rewrite it.
17154  # Note: m4 eats our [], so we need to use [ and ] instead.
17155  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17156  if test "x$has_forbidden_chars" != x; then
17157    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17158    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17159  fi
17160
17161    # Output is in $new_path
17162
17163  windows_path="$new_path"
17164  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17165    unix_path=`$CYGPATH -u "$windows_path"`
17166    new_path="$unix_path"
17167  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17168    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17169    new_path="$unix_path"
17170  fi
17171
17172    # remove trailing .exe if any
17173    new_path="${new_path/%.exe/}"
17174
17175    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17176    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17177  fi
17178
17179  else
17180    # We're on a unix platform. Hooray! :)
17181    # First separate the path from the arguments. This will split at the first
17182    # space.
17183    complete="$FOUND_MAKE"
17184    path="${complete%% *}"
17185    tmp="$complete EOL"
17186    arguments="${tmp#* }"
17187
17188    # Cannot rely on the command "which" here since it doesn't always work.
17189    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17190    if test -z "$is_absolute_path"; then
17191      # Path to executable is not absolute. Find it.
17192      IFS_save="$IFS"
17193      IFS=:
17194      for p in $PATH; do
17195        if test -f "$p/$path" && test -x "$p/$path"; then
17196          new_path="$p/$path"
17197          break
17198        fi
17199      done
17200      IFS="$IFS_save"
17201    else
17202      # This is an absolute path, we can use it without further modifications.
17203      new_path="$path"
17204    fi
17205
17206    if test "x$new_path" = x; then
17207      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17208$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17209      has_space=`$ECHO "$complete" | $GREP " "`
17210      if test "x$has_space" != x; then
17211        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17212$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17213      fi
17214      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17215    fi
17216  fi
17217
17218  # Now join together the path and the arguments once again
17219  if test "x$arguments" != xEOL; then
17220    new_complete="$new_path ${arguments% *}"
17221  else
17222    new_complete="$new_path"
17223  fi
17224
17225  if test "x$complete" != "x$new_complete"; then
17226    FOUND_MAKE="$new_complete"
17227    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17228$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17229  fi
17230
17231        fi
17232      fi
17233    fi
17234  fi
17235
17236        fi
17237        PATH=$OLD_PATH
17238      fi
17239    fi
17240
17241    if test "x$FOUND_MAKE" = x; then
17242      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
17243    fi
17244  fi
17245
17246  MAKE=$FOUND_MAKE
17247
17248  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
17249$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
17250
17251
17252  # Check if make supports the output sync option and if so, setup using it.
17253  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
17254$as_echo_n "checking if make --output-sync is supported... " >&6; }
17255  if $MAKE --version -O > /dev/null 2>&1; then
17256    OUTPUT_SYNC_SUPPORTED=true
17257    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17258$as_echo "yes" >&6; }
17259    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
17260$as_echo_n "checking for output-sync value... " >&6; }
17261
17262# Check whether --with-output-sync was given.
17263if test "${with_output_sync+set}" = set; then :
17264  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
17265fi
17266
17267    if test "x$OUTPUT_SYNC" = "x"; then
17268      OUTPUT_SYNC=none
17269    fi
17270    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
17271$as_echo "$OUTPUT_SYNC" >&6; }
17272    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
17273      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
17274    fi
17275  else
17276    OUTPUT_SYNC_SUPPORTED=false
17277    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17278$as_echo "no" >&6; }
17279  fi
17280
17281
17282
17283
17284
17285
17286  # Test if find supports -delete
17287  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
17288$as_echo_n "checking if find supports -delete... " >&6; }
17289  FIND_DELETE="-delete"
17290
17291  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
17292
17293  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
17294
17295  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
17296  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
17297    # No, it does not.
17298    rm $DELETEDIR/TestIfFindSupportsDelete
17299    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
17300      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
17301      FIND_DELETE="-print | xargs rm"
17302    else
17303      FIND_DELETE="-exec rm \{\} \+"
17304    fi
17305    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17306$as_echo "no" >&6; }
17307  else
17308    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17309$as_echo "yes" >&6; }
17310  fi
17311  rmdir $DELETEDIR
17312
17313
17314
17315  # These tools might not be installed by default,
17316  # need hint on how to install them.
17317
17318
17319
17320  # Publish this variable in the help.
17321
17322
17323  if test "x$UNZIP" = x; then
17324    # The variable is not set by user, try to locate tool using the code snippet
17325    for ac_prog in unzip
17326do
17327  # Extract the first word of "$ac_prog", so it can be a program name with args.
17328set dummy $ac_prog; ac_word=$2
17329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17330$as_echo_n "checking for $ac_word... " >&6; }
17331if ${ac_cv_path_UNZIP+:} false; then :
17332  $as_echo_n "(cached) " >&6
17333else
17334  case $UNZIP in
17335  [\\/]* | ?:[\\/]*)
17336  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17337  ;;
17338  *)
17339  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17340for as_dir in $PATH
17341do
17342  IFS=$as_save_IFS
17343  test -z "$as_dir" && as_dir=.
17344    for ac_exec_ext in '' $ac_executable_extensions; do
17345  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17346    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17347    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17348    break 2
17349  fi
17350done
17351  done
17352IFS=$as_save_IFS
17353
17354  ;;
17355esac
17356fi
17357UNZIP=$ac_cv_path_UNZIP
17358if test -n "$UNZIP"; then
17359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17360$as_echo "$UNZIP" >&6; }
17361else
17362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17363$as_echo "no" >&6; }
17364fi
17365
17366
17367  test -n "$UNZIP" && break
17368done
17369
17370  else
17371    # The variable is set, but is it from the command line or the environment?
17372
17373    # Try to remove the string !UNZIP! from our list.
17374    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
17375    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17376      # If it failed, the variable was not from the command line. Ignore it,
17377      # but warn the user (except for BASH, which is always set by the calling BASH).
17378      if test "xUNZIP" != xBASH; then
17379        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
17380$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
17381      fi
17382      # Try to locate tool using the code snippet
17383      for ac_prog in unzip
17384do
17385  # Extract the first word of "$ac_prog", so it can be a program name with args.
17386set dummy $ac_prog; ac_word=$2
17387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17388$as_echo_n "checking for $ac_word... " >&6; }
17389if ${ac_cv_path_UNZIP+:} false; then :
17390  $as_echo_n "(cached) " >&6
17391else
17392  case $UNZIP in
17393  [\\/]* | ?:[\\/]*)
17394  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17395  ;;
17396  *)
17397  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17398for as_dir in $PATH
17399do
17400  IFS=$as_save_IFS
17401  test -z "$as_dir" && as_dir=.
17402    for ac_exec_ext in '' $ac_executable_extensions; do
17403  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17404    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17405    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17406    break 2
17407  fi
17408done
17409  done
17410IFS=$as_save_IFS
17411
17412  ;;
17413esac
17414fi
17415UNZIP=$ac_cv_path_UNZIP
17416if test -n "$UNZIP"; then
17417  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17418$as_echo "$UNZIP" >&6; }
17419else
17420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17421$as_echo "no" >&6; }
17422fi
17423
17424
17425  test -n "$UNZIP" && break
17426done
17427
17428    else
17429      # If it succeeded, then it was overridden by the user. We will use it
17430      # for the tool.
17431
17432      # First remove it from the list of overridden variables, so we can test
17433      # for unknown variables in the end.
17434      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17435
17436      # Check if the provided tool contains a complete path.
17437      tool_specified="$UNZIP"
17438      tool_basename="${tool_specified##*/}"
17439      if test "x$tool_basename" = "x$tool_specified"; then
17440        # A command without a complete path is provided, search $PATH.
17441        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
17442$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
17443        # Extract the first word of "$tool_basename", so it can be a program name with args.
17444set dummy $tool_basename; ac_word=$2
17445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17446$as_echo_n "checking for $ac_word... " >&6; }
17447if ${ac_cv_path_UNZIP+:} false; then :
17448  $as_echo_n "(cached) " >&6
17449else
17450  case $UNZIP in
17451  [\\/]* | ?:[\\/]*)
17452  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17453  ;;
17454  *)
17455  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17456for as_dir in $PATH
17457do
17458  IFS=$as_save_IFS
17459  test -z "$as_dir" && as_dir=.
17460    for ac_exec_ext in '' $ac_executable_extensions; do
17461  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17462    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17463    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17464    break 2
17465  fi
17466done
17467  done
17468IFS=$as_save_IFS
17469
17470  ;;
17471esac
17472fi
17473UNZIP=$ac_cv_path_UNZIP
17474if test -n "$UNZIP"; then
17475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17476$as_echo "$UNZIP" >&6; }
17477else
17478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17479$as_echo "no" >&6; }
17480fi
17481
17482
17483        if test "x$UNZIP" = x; then
17484          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17485        fi
17486      else
17487        # Otherwise we believe it is a complete path. Use it as it is.
17488        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
17489$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
17490        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
17491$as_echo_n "checking for UNZIP... " >&6; }
17492        if test ! -x "$tool_specified"; then
17493          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17494$as_echo "not found" >&6; }
17495          as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17496        fi
17497        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17498$as_echo "$tool_specified" >&6; }
17499      fi
17500    fi
17501  fi
17502
17503
17504
17505  if test "x$UNZIP" = x; then
17506    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
17507  fi
17508
17509
17510
17511
17512
17513  # Publish this variable in the help.
17514
17515
17516  if test "x$ZIP" = x; then
17517    # The variable is not set by user, try to locate tool using the code snippet
17518    for ac_prog in zip
17519do
17520  # Extract the first word of "$ac_prog", so it can be a program name with args.
17521set dummy $ac_prog; ac_word=$2
17522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17523$as_echo_n "checking for $ac_word... " >&6; }
17524if ${ac_cv_path_ZIP+:} false; then :
17525  $as_echo_n "(cached) " >&6
17526else
17527  case $ZIP in
17528  [\\/]* | ?:[\\/]*)
17529  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17530  ;;
17531  *)
17532  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17533for as_dir in $PATH
17534do
17535  IFS=$as_save_IFS
17536  test -z "$as_dir" && as_dir=.
17537    for ac_exec_ext in '' $ac_executable_extensions; do
17538  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17539    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17540    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17541    break 2
17542  fi
17543done
17544  done
17545IFS=$as_save_IFS
17546
17547  ;;
17548esac
17549fi
17550ZIP=$ac_cv_path_ZIP
17551if test -n "$ZIP"; then
17552  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17553$as_echo "$ZIP" >&6; }
17554else
17555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17556$as_echo "no" >&6; }
17557fi
17558
17559
17560  test -n "$ZIP" && break
17561done
17562
17563  else
17564    # The variable is set, but is it from the command line or the environment?
17565
17566    # Try to remove the string !ZIP! from our list.
17567    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
17568    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17569      # If it failed, the variable was not from the command line. Ignore it,
17570      # but warn the user (except for BASH, which is always set by the calling BASH).
17571      if test "xZIP" != xBASH; then
17572        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
17573$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
17574      fi
17575      # Try to locate tool using the code snippet
17576      for ac_prog in zip
17577do
17578  # Extract the first word of "$ac_prog", so it can be a program name with args.
17579set dummy $ac_prog; ac_word=$2
17580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17581$as_echo_n "checking for $ac_word... " >&6; }
17582if ${ac_cv_path_ZIP+:} false; then :
17583  $as_echo_n "(cached) " >&6
17584else
17585  case $ZIP in
17586  [\\/]* | ?:[\\/]*)
17587  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17588  ;;
17589  *)
17590  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17591for as_dir in $PATH
17592do
17593  IFS=$as_save_IFS
17594  test -z "$as_dir" && as_dir=.
17595    for ac_exec_ext in '' $ac_executable_extensions; do
17596  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17597    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17598    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17599    break 2
17600  fi
17601done
17602  done
17603IFS=$as_save_IFS
17604
17605  ;;
17606esac
17607fi
17608ZIP=$ac_cv_path_ZIP
17609if test -n "$ZIP"; then
17610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17611$as_echo "$ZIP" >&6; }
17612else
17613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17614$as_echo "no" >&6; }
17615fi
17616
17617
17618  test -n "$ZIP" && break
17619done
17620
17621    else
17622      # If it succeeded, then it was overridden by the user. We will use it
17623      # for the tool.
17624
17625      # First remove it from the list of overridden variables, so we can test
17626      # for unknown variables in the end.
17627      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17628
17629      # Check if the provided tool contains a complete path.
17630      tool_specified="$ZIP"
17631      tool_basename="${tool_specified##*/}"
17632      if test "x$tool_basename" = "x$tool_specified"; then
17633        # A command without a complete path is provided, search $PATH.
17634        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
17635$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
17636        # Extract the first word of "$tool_basename", so it can be a program name with args.
17637set dummy $tool_basename; ac_word=$2
17638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17639$as_echo_n "checking for $ac_word... " >&6; }
17640if ${ac_cv_path_ZIP+:} false; then :
17641  $as_echo_n "(cached) " >&6
17642else
17643  case $ZIP in
17644  [\\/]* | ?:[\\/]*)
17645  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17646  ;;
17647  *)
17648  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17649for as_dir in $PATH
17650do
17651  IFS=$as_save_IFS
17652  test -z "$as_dir" && as_dir=.
17653    for ac_exec_ext in '' $ac_executable_extensions; do
17654  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17655    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17656    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17657    break 2
17658  fi
17659done
17660  done
17661IFS=$as_save_IFS
17662
17663  ;;
17664esac
17665fi
17666ZIP=$ac_cv_path_ZIP
17667if test -n "$ZIP"; then
17668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17669$as_echo "$ZIP" >&6; }
17670else
17671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17672$as_echo "no" >&6; }
17673fi
17674
17675
17676        if test "x$ZIP" = x; then
17677          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17678        fi
17679      else
17680        # Otherwise we believe it is a complete path. Use it as it is.
17681        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
17682$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
17683        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
17684$as_echo_n "checking for ZIP... " >&6; }
17685        if test ! -x "$tool_specified"; then
17686          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17687$as_echo "not found" >&6; }
17688          as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17689        fi
17690        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17691$as_echo "$tool_specified" >&6; }
17692      fi
17693    fi
17694  fi
17695
17696
17697
17698  if test "x$ZIP" = x; then
17699    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
17700  fi
17701
17702
17703
17704  # Non-required basic tools
17705
17706
17707
17708  # Publish this variable in the help.
17709
17710
17711  if test "x$LDD" = x; then
17712    # The variable is not set by user, try to locate tool using the code snippet
17713    for ac_prog in ldd
17714do
17715  # Extract the first word of "$ac_prog", so it can be a program name with args.
17716set dummy $ac_prog; ac_word=$2
17717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17718$as_echo_n "checking for $ac_word... " >&6; }
17719if ${ac_cv_path_LDD+:} false; then :
17720  $as_echo_n "(cached) " >&6
17721else
17722  case $LDD in
17723  [\\/]* | ?:[\\/]*)
17724  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17725  ;;
17726  *)
17727  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17728for as_dir in $PATH
17729do
17730  IFS=$as_save_IFS
17731  test -z "$as_dir" && as_dir=.
17732    for ac_exec_ext in '' $ac_executable_extensions; do
17733  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17734    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17735    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17736    break 2
17737  fi
17738done
17739  done
17740IFS=$as_save_IFS
17741
17742  ;;
17743esac
17744fi
17745LDD=$ac_cv_path_LDD
17746if test -n "$LDD"; then
17747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17748$as_echo "$LDD" >&6; }
17749else
17750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17751$as_echo "no" >&6; }
17752fi
17753
17754
17755  test -n "$LDD" && break
17756done
17757
17758  else
17759    # The variable is set, but is it from the command line or the environment?
17760
17761    # Try to remove the string !LDD! from our list.
17762    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
17763    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17764      # If it failed, the variable was not from the command line. Ignore it,
17765      # but warn the user (except for BASH, which is always set by the calling BASH).
17766      if test "xLDD" != xBASH; then
17767        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
17768$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
17769      fi
17770      # Try to locate tool using the code snippet
17771      for ac_prog in ldd
17772do
17773  # Extract the first word of "$ac_prog", so it can be a program name with args.
17774set dummy $ac_prog; ac_word=$2
17775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17776$as_echo_n "checking for $ac_word... " >&6; }
17777if ${ac_cv_path_LDD+:} false; then :
17778  $as_echo_n "(cached) " >&6
17779else
17780  case $LDD in
17781  [\\/]* | ?:[\\/]*)
17782  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17783  ;;
17784  *)
17785  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17786for as_dir in $PATH
17787do
17788  IFS=$as_save_IFS
17789  test -z "$as_dir" && as_dir=.
17790    for ac_exec_ext in '' $ac_executable_extensions; do
17791  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17792    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17793    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17794    break 2
17795  fi
17796done
17797  done
17798IFS=$as_save_IFS
17799
17800  ;;
17801esac
17802fi
17803LDD=$ac_cv_path_LDD
17804if test -n "$LDD"; then
17805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17806$as_echo "$LDD" >&6; }
17807else
17808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17809$as_echo "no" >&6; }
17810fi
17811
17812
17813  test -n "$LDD" && break
17814done
17815
17816    else
17817      # If it succeeded, then it was overridden by the user. We will use it
17818      # for the tool.
17819
17820      # First remove it from the list of overridden variables, so we can test
17821      # for unknown variables in the end.
17822      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17823
17824      # Check if the provided tool contains a complete path.
17825      tool_specified="$LDD"
17826      tool_basename="${tool_specified##*/}"
17827      if test "x$tool_basename" = "x$tool_specified"; then
17828        # A command without a complete path is provided, search $PATH.
17829        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
17830$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
17831        # Extract the first word of "$tool_basename", so it can be a program name with args.
17832set dummy $tool_basename; ac_word=$2
17833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17834$as_echo_n "checking for $ac_word... " >&6; }
17835if ${ac_cv_path_LDD+:} false; then :
17836  $as_echo_n "(cached) " >&6
17837else
17838  case $LDD in
17839  [\\/]* | ?:[\\/]*)
17840  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17841  ;;
17842  *)
17843  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17844for as_dir in $PATH
17845do
17846  IFS=$as_save_IFS
17847  test -z "$as_dir" && as_dir=.
17848    for ac_exec_ext in '' $ac_executable_extensions; do
17849  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17850    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17851    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17852    break 2
17853  fi
17854done
17855  done
17856IFS=$as_save_IFS
17857
17858  ;;
17859esac
17860fi
17861LDD=$ac_cv_path_LDD
17862if test -n "$LDD"; then
17863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17864$as_echo "$LDD" >&6; }
17865else
17866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17867$as_echo "no" >&6; }
17868fi
17869
17870
17871        if test "x$LDD" = x; then
17872          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17873        fi
17874      else
17875        # Otherwise we believe it is a complete path. Use it as it is.
17876        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
17877$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
17878        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
17879$as_echo_n "checking for LDD... " >&6; }
17880        if test ! -x "$tool_specified"; then
17881          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17882$as_echo "not found" >&6; }
17883          as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
17884        fi
17885        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17886$as_echo "$tool_specified" >&6; }
17887      fi
17888    fi
17889  fi
17890
17891
17892  if test "x$LDD" = "x"; then
17893    # List shared lib dependencies is used for
17894    # debug output and checking for forbidden dependencies.
17895    # We can build without it.
17896    LDD="true"
17897  fi
17898
17899
17900  # Publish this variable in the help.
17901
17902
17903  if test "x$OTOOL" = x; then
17904    # The variable is not set by user, try to locate tool using the code snippet
17905    for ac_prog in otool
17906do
17907  # Extract the first word of "$ac_prog", so it can be a program name with args.
17908set dummy $ac_prog; ac_word=$2
17909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17910$as_echo_n "checking for $ac_word... " >&6; }
17911if ${ac_cv_path_OTOOL+:} false; then :
17912  $as_echo_n "(cached) " >&6
17913else
17914  case $OTOOL in
17915  [\\/]* | ?:[\\/]*)
17916  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17917  ;;
17918  *)
17919  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17920for as_dir in $PATH
17921do
17922  IFS=$as_save_IFS
17923  test -z "$as_dir" && as_dir=.
17924    for ac_exec_ext in '' $ac_executable_extensions; do
17925  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17926    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17927    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17928    break 2
17929  fi
17930done
17931  done
17932IFS=$as_save_IFS
17933
17934  ;;
17935esac
17936fi
17937OTOOL=$ac_cv_path_OTOOL
17938if test -n "$OTOOL"; then
17939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17940$as_echo "$OTOOL" >&6; }
17941else
17942  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17943$as_echo "no" >&6; }
17944fi
17945
17946
17947  test -n "$OTOOL" && break
17948done
17949
17950  else
17951    # The variable is set, but is it from the command line or the environment?
17952
17953    # Try to remove the string !OTOOL! from our list.
17954    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
17955    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17956      # If it failed, the variable was not from the command line. Ignore it,
17957      # but warn the user (except for BASH, which is always set by the calling BASH).
17958      if test "xOTOOL" != xBASH; then
17959        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
17960$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
17961      fi
17962      # Try to locate tool using the code snippet
17963      for ac_prog in otool
17964do
17965  # Extract the first word of "$ac_prog", so it can be a program name with args.
17966set dummy $ac_prog; ac_word=$2
17967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17968$as_echo_n "checking for $ac_word... " >&6; }
17969if ${ac_cv_path_OTOOL+:} false; then :
17970  $as_echo_n "(cached) " >&6
17971else
17972  case $OTOOL in
17973  [\\/]* | ?:[\\/]*)
17974  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17975  ;;
17976  *)
17977  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17978for as_dir in $PATH
17979do
17980  IFS=$as_save_IFS
17981  test -z "$as_dir" && as_dir=.
17982    for ac_exec_ext in '' $ac_executable_extensions; do
17983  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17984    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17985    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17986    break 2
17987  fi
17988done
17989  done
17990IFS=$as_save_IFS
17991
17992  ;;
17993esac
17994fi
17995OTOOL=$ac_cv_path_OTOOL
17996if test -n "$OTOOL"; then
17997  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17998$as_echo "$OTOOL" >&6; }
17999else
18000  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18001$as_echo "no" >&6; }
18002fi
18003
18004
18005  test -n "$OTOOL" && break
18006done
18007
18008    else
18009      # If it succeeded, then it was overridden by the user. We will use it
18010      # for the tool.
18011
18012      # First remove it from the list of overridden variables, so we can test
18013      # for unknown variables in the end.
18014      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18015
18016      # Check if the provided tool contains a complete path.
18017      tool_specified="$OTOOL"
18018      tool_basename="${tool_specified##*/}"
18019      if test "x$tool_basename" = "x$tool_specified"; then
18020        # A command without a complete path is provided, search $PATH.
18021        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
18022$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
18023        # Extract the first word of "$tool_basename", so it can be a program name with args.
18024set dummy $tool_basename; ac_word=$2
18025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18026$as_echo_n "checking for $ac_word... " >&6; }
18027if ${ac_cv_path_OTOOL+:} false; then :
18028  $as_echo_n "(cached) " >&6
18029else
18030  case $OTOOL in
18031  [\\/]* | ?:[\\/]*)
18032  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
18033  ;;
18034  *)
18035  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18036for as_dir in $PATH
18037do
18038  IFS=$as_save_IFS
18039  test -z "$as_dir" && as_dir=.
18040    for ac_exec_ext in '' $ac_executable_extensions; do
18041  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18042    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18043    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18044    break 2
18045  fi
18046done
18047  done
18048IFS=$as_save_IFS
18049
18050  ;;
18051esac
18052fi
18053OTOOL=$ac_cv_path_OTOOL
18054if test -n "$OTOOL"; then
18055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18056$as_echo "$OTOOL" >&6; }
18057else
18058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18059$as_echo "no" >&6; }
18060fi
18061
18062
18063        if test "x$OTOOL" = x; then
18064          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18065        fi
18066      else
18067        # Otherwise we believe it is a complete path. Use it as it is.
18068        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
18069$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
18070        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
18071$as_echo_n "checking for OTOOL... " >&6; }
18072        if test ! -x "$tool_specified"; then
18073          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18074$as_echo "not found" >&6; }
18075          as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
18076        fi
18077        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18078$as_echo "$tool_specified" >&6; }
18079      fi
18080    fi
18081  fi
18082
18083
18084  if test "x$OTOOL" = "x"; then
18085    OTOOL="true"
18086  fi
18087
18088
18089  # Publish this variable in the help.
18090
18091
18092  if test "x$READELF" = x; then
18093    # The variable is not set by user, try to locate tool using the code snippet
18094    for ac_prog in greadelf readelf
18095do
18096  # Extract the first word of "$ac_prog", so it can be a program name with args.
18097set dummy $ac_prog; ac_word=$2
18098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18099$as_echo_n "checking for $ac_word... " >&6; }
18100if ${ac_cv_path_READELF+:} false; then :
18101  $as_echo_n "(cached) " >&6
18102else
18103  case $READELF in
18104  [\\/]* | ?:[\\/]*)
18105  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18106  ;;
18107  *)
18108  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18109for as_dir in $PATH
18110do
18111  IFS=$as_save_IFS
18112  test -z "$as_dir" && as_dir=.
18113    for ac_exec_ext in '' $ac_executable_extensions; do
18114  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18115    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18116    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18117    break 2
18118  fi
18119done
18120  done
18121IFS=$as_save_IFS
18122
18123  ;;
18124esac
18125fi
18126READELF=$ac_cv_path_READELF
18127if test -n "$READELF"; then
18128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18129$as_echo "$READELF" >&6; }
18130else
18131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18132$as_echo "no" >&6; }
18133fi
18134
18135
18136  test -n "$READELF" && break
18137done
18138
18139  else
18140    # The variable is set, but is it from the command line or the environment?
18141
18142    # Try to remove the string !READELF! from our list.
18143    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
18144    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18145      # If it failed, the variable was not from the command line. Ignore it,
18146      # but warn the user (except for BASH, which is always set by the calling BASH).
18147      if test "xREADELF" != xBASH; then
18148        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
18149$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
18150      fi
18151      # Try to locate tool using the code snippet
18152      for ac_prog in greadelf readelf
18153do
18154  # Extract the first word of "$ac_prog", so it can be a program name with args.
18155set dummy $ac_prog; ac_word=$2
18156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18157$as_echo_n "checking for $ac_word... " >&6; }
18158if ${ac_cv_path_READELF+:} false; then :
18159  $as_echo_n "(cached) " >&6
18160else
18161  case $READELF in
18162  [\\/]* | ?:[\\/]*)
18163  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18164  ;;
18165  *)
18166  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18167for as_dir in $PATH
18168do
18169  IFS=$as_save_IFS
18170  test -z "$as_dir" && as_dir=.
18171    for ac_exec_ext in '' $ac_executable_extensions; do
18172  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18173    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18174    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18175    break 2
18176  fi
18177done
18178  done
18179IFS=$as_save_IFS
18180
18181  ;;
18182esac
18183fi
18184READELF=$ac_cv_path_READELF
18185if test -n "$READELF"; then
18186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18187$as_echo "$READELF" >&6; }
18188else
18189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18190$as_echo "no" >&6; }
18191fi
18192
18193
18194  test -n "$READELF" && break
18195done
18196
18197    else
18198      # If it succeeded, then it was overridden by the user. We will use it
18199      # for the tool.
18200
18201      # First remove it from the list of overridden variables, so we can test
18202      # for unknown variables in the end.
18203      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18204
18205      # Check if the provided tool contains a complete path.
18206      tool_specified="$READELF"
18207      tool_basename="${tool_specified##*/}"
18208      if test "x$tool_basename" = "x$tool_specified"; then
18209        # A command without a complete path is provided, search $PATH.
18210        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
18211$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
18212        # Extract the first word of "$tool_basename", so it can be a program name with args.
18213set dummy $tool_basename; ac_word=$2
18214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18215$as_echo_n "checking for $ac_word... " >&6; }
18216if ${ac_cv_path_READELF+:} false; then :
18217  $as_echo_n "(cached) " >&6
18218else
18219  case $READELF in
18220  [\\/]* | ?:[\\/]*)
18221  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18222  ;;
18223  *)
18224  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18225for as_dir in $PATH
18226do
18227  IFS=$as_save_IFS
18228  test -z "$as_dir" && as_dir=.
18229    for ac_exec_ext in '' $ac_executable_extensions; do
18230  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18231    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18232    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18233    break 2
18234  fi
18235done
18236  done
18237IFS=$as_save_IFS
18238
18239  ;;
18240esac
18241fi
18242READELF=$ac_cv_path_READELF
18243if test -n "$READELF"; then
18244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18245$as_echo "$READELF" >&6; }
18246else
18247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18248$as_echo "no" >&6; }
18249fi
18250
18251
18252        if test "x$READELF" = x; then
18253          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18254        fi
18255      else
18256        # Otherwise we believe it is a complete path. Use it as it is.
18257        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
18258$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
18259        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
18260$as_echo_n "checking for READELF... " >&6; }
18261        if test ! -x "$tool_specified"; then
18262          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18263$as_echo "not found" >&6; }
18264          as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
18265        fi
18266        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18267$as_echo "$tool_specified" >&6; }
18268      fi
18269    fi
18270  fi
18271
18272
18273
18274
18275  # Publish this variable in the help.
18276
18277
18278  if test "x$HG" = x; then
18279    # The variable is not set by user, try to locate tool using the code snippet
18280    for ac_prog in hg
18281do
18282  # Extract the first word of "$ac_prog", so it can be a program name with args.
18283set dummy $ac_prog; ac_word=$2
18284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18285$as_echo_n "checking for $ac_word... " >&6; }
18286if ${ac_cv_path_HG+:} false; then :
18287  $as_echo_n "(cached) " >&6
18288else
18289  case $HG in
18290  [\\/]* | ?:[\\/]*)
18291  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18292  ;;
18293  *)
18294  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18295for as_dir in $PATH
18296do
18297  IFS=$as_save_IFS
18298  test -z "$as_dir" && as_dir=.
18299    for ac_exec_ext in '' $ac_executable_extensions; do
18300  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18301    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18302    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18303    break 2
18304  fi
18305done
18306  done
18307IFS=$as_save_IFS
18308
18309  ;;
18310esac
18311fi
18312HG=$ac_cv_path_HG
18313if test -n "$HG"; then
18314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18315$as_echo "$HG" >&6; }
18316else
18317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18318$as_echo "no" >&6; }
18319fi
18320
18321
18322  test -n "$HG" && break
18323done
18324
18325  else
18326    # The variable is set, but is it from the command line or the environment?
18327
18328    # Try to remove the string !HG! from our list.
18329    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
18330    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18331      # If it failed, the variable was not from the command line. Ignore it,
18332      # but warn the user (except for BASH, which is always set by the calling BASH).
18333      if test "xHG" != xBASH; then
18334        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
18335$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
18336      fi
18337      # Try to locate tool using the code snippet
18338      for ac_prog in hg
18339do
18340  # Extract the first word of "$ac_prog", so it can be a program name with args.
18341set dummy $ac_prog; ac_word=$2
18342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18343$as_echo_n "checking for $ac_word... " >&6; }
18344if ${ac_cv_path_HG+:} false; then :
18345  $as_echo_n "(cached) " >&6
18346else
18347  case $HG in
18348  [\\/]* | ?:[\\/]*)
18349  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18350  ;;
18351  *)
18352  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18353for as_dir in $PATH
18354do
18355  IFS=$as_save_IFS
18356  test -z "$as_dir" && as_dir=.
18357    for ac_exec_ext in '' $ac_executable_extensions; do
18358  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18359    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18360    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18361    break 2
18362  fi
18363done
18364  done
18365IFS=$as_save_IFS
18366
18367  ;;
18368esac
18369fi
18370HG=$ac_cv_path_HG
18371if test -n "$HG"; then
18372  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18373$as_echo "$HG" >&6; }
18374else
18375  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18376$as_echo "no" >&6; }
18377fi
18378
18379
18380  test -n "$HG" && break
18381done
18382
18383    else
18384      # If it succeeded, then it was overridden by the user. We will use it
18385      # for the tool.
18386
18387      # First remove it from the list of overridden variables, so we can test
18388      # for unknown variables in the end.
18389      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18390
18391      # Check if the provided tool contains a complete path.
18392      tool_specified="$HG"
18393      tool_basename="${tool_specified##*/}"
18394      if test "x$tool_basename" = "x$tool_specified"; then
18395        # A command without a complete path is provided, search $PATH.
18396        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
18397$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
18398        # Extract the first word of "$tool_basename", so it can be a program name with args.
18399set dummy $tool_basename; ac_word=$2
18400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18401$as_echo_n "checking for $ac_word... " >&6; }
18402if ${ac_cv_path_HG+:} false; then :
18403  $as_echo_n "(cached) " >&6
18404else
18405  case $HG in
18406  [\\/]* | ?:[\\/]*)
18407  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18408  ;;
18409  *)
18410  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18411for as_dir in $PATH
18412do
18413  IFS=$as_save_IFS
18414  test -z "$as_dir" && as_dir=.
18415    for ac_exec_ext in '' $ac_executable_extensions; do
18416  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18417    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18418    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18419    break 2
18420  fi
18421done
18422  done
18423IFS=$as_save_IFS
18424
18425  ;;
18426esac
18427fi
18428HG=$ac_cv_path_HG
18429if test -n "$HG"; then
18430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18431$as_echo "$HG" >&6; }
18432else
18433  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18434$as_echo "no" >&6; }
18435fi
18436
18437
18438        if test "x$HG" = x; then
18439          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18440        fi
18441      else
18442        # Otherwise we believe it is a complete path. Use it as it is.
18443        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
18444$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
18445        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
18446$as_echo_n "checking for HG... " >&6; }
18447        if test ! -x "$tool_specified"; then
18448          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18449$as_echo "not found" >&6; }
18450          as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
18451        fi
18452        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18453$as_echo "$tool_specified" >&6; }
18454      fi
18455    fi
18456  fi
18457
18458
18459
18460
18461  # Publish this variable in the help.
18462
18463
18464  if test "x$STAT" = x; then
18465    # The variable is not set by user, try to locate tool using the code snippet
18466    for ac_prog in stat
18467do
18468  # Extract the first word of "$ac_prog", so it can be a program name with args.
18469set dummy $ac_prog; ac_word=$2
18470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18471$as_echo_n "checking for $ac_word... " >&6; }
18472if ${ac_cv_path_STAT+:} false; then :
18473  $as_echo_n "(cached) " >&6
18474else
18475  case $STAT in
18476  [\\/]* | ?:[\\/]*)
18477  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18478  ;;
18479  *)
18480  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18481for as_dir in $PATH
18482do
18483  IFS=$as_save_IFS
18484  test -z "$as_dir" && as_dir=.
18485    for ac_exec_ext in '' $ac_executable_extensions; do
18486  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18487    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18488    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18489    break 2
18490  fi
18491done
18492  done
18493IFS=$as_save_IFS
18494
18495  ;;
18496esac
18497fi
18498STAT=$ac_cv_path_STAT
18499if test -n "$STAT"; then
18500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18501$as_echo "$STAT" >&6; }
18502else
18503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18504$as_echo "no" >&6; }
18505fi
18506
18507
18508  test -n "$STAT" && break
18509done
18510
18511  else
18512    # The variable is set, but is it from the command line or the environment?
18513
18514    # Try to remove the string !STAT! from our list.
18515    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
18516    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18517      # If it failed, the variable was not from the command line. Ignore it,
18518      # but warn the user (except for BASH, which is always set by the calling BASH).
18519      if test "xSTAT" != xBASH; then
18520        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
18521$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
18522      fi
18523      # Try to locate tool using the code snippet
18524      for ac_prog in stat
18525do
18526  # Extract the first word of "$ac_prog", so it can be a program name with args.
18527set dummy $ac_prog; ac_word=$2
18528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18529$as_echo_n "checking for $ac_word... " >&6; }
18530if ${ac_cv_path_STAT+:} false; then :
18531  $as_echo_n "(cached) " >&6
18532else
18533  case $STAT in
18534  [\\/]* | ?:[\\/]*)
18535  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18536  ;;
18537  *)
18538  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18539for as_dir in $PATH
18540do
18541  IFS=$as_save_IFS
18542  test -z "$as_dir" && as_dir=.
18543    for ac_exec_ext in '' $ac_executable_extensions; do
18544  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18545    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18546    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18547    break 2
18548  fi
18549done
18550  done
18551IFS=$as_save_IFS
18552
18553  ;;
18554esac
18555fi
18556STAT=$ac_cv_path_STAT
18557if test -n "$STAT"; then
18558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18559$as_echo "$STAT" >&6; }
18560else
18561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18562$as_echo "no" >&6; }
18563fi
18564
18565
18566  test -n "$STAT" && break
18567done
18568
18569    else
18570      # If it succeeded, then it was overridden by the user. We will use it
18571      # for the tool.
18572
18573      # First remove it from the list of overridden variables, so we can test
18574      # for unknown variables in the end.
18575      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18576
18577      # Check if the provided tool contains a complete path.
18578      tool_specified="$STAT"
18579      tool_basename="${tool_specified##*/}"
18580      if test "x$tool_basename" = "x$tool_specified"; then
18581        # A command without a complete path is provided, search $PATH.
18582        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
18583$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
18584        # Extract the first word of "$tool_basename", so it can be a program name with args.
18585set dummy $tool_basename; ac_word=$2
18586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18587$as_echo_n "checking for $ac_word... " >&6; }
18588if ${ac_cv_path_STAT+:} false; then :
18589  $as_echo_n "(cached) " >&6
18590else
18591  case $STAT in
18592  [\\/]* | ?:[\\/]*)
18593  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18594  ;;
18595  *)
18596  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18597for as_dir in $PATH
18598do
18599  IFS=$as_save_IFS
18600  test -z "$as_dir" && as_dir=.
18601    for ac_exec_ext in '' $ac_executable_extensions; do
18602  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18603    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18604    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18605    break 2
18606  fi
18607done
18608  done
18609IFS=$as_save_IFS
18610
18611  ;;
18612esac
18613fi
18614STAT=$ac_cv_path_STAT
18615if test -n "$STAT"; then
18616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18617$as_echo "$STAT" >&6; }
18618else
18619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18620$as_echo "no" >&6; }
18621fi
18622
18623
18624        if test "x$STAT" = x; then
18625          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18626        fi
18627      else
18628        # Otherwise we believe it is a complete path. Use it as it is.
18629        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
18630$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
18631        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
18632$as_echo_n "checking for STAT... " >&6; }
18633        if test ! -x "$tool_specified"; then
18634          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18635$as_echo "not found" >&6; }
18636          as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
18637        fi
18638        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18639$as_echo "$tool_specified" >&6; }
18640      fi
18641    fi
18642  fi
18643
18644
18645
18646
18647  # Publish this variable in the help.
18648
18649
18650  if test "x$TIME" = x; then
18651    # The variable is not set by user, try to locate tool using the code snippet
18652    for ac_prog in time
18653do
18654  # Extract the first word of "$ac_prog", so it can be a program name with args.
18655set dummy $ac_prog; ac_word=$2
18656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18657$as_echo_n "checking for $ac_word... " >&6; }
18658if ${ac_cv_path_TIME+:} false; then :
18659  $as_echo_n "(cached) " >&6
18660else
18661  case $TIME in
18662  [\\/]* | ?:[\\/]*)
18663  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18664  ;;
18665  *)
18666  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18667for as_dir in $PATH
18668do
18669  IFS=$as_save_IFS
18670  test -z "$as_dir" && as_dir=.
18671    for ac_exec_ext in '' $ac_executable_extensions; do
18672  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18673    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18674    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18675    break 2
18676  fi
18677done
18678  done
18679IFS=$as_save_IFS
18680
18681  ;;
18682esac
18683fi
18684TIME=$ac_cv_path_TIME
18685if test -n "$TIME"; then
18686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18687$as_echo "$TIME" >&6; }
18688else
18689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18690$as_echo "no" >&6; }
18691fi
18692
18693
18694  test -n "$TIME" && break
18695done
18696
18697  else
18698    # The variable is set, but is it from the command line or the environment?
18699
18700    # Try to remove the string !TIME! from our list.
18701    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
18702    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18703      # If it failed, the variable was not from the command line. Ignore it,
18704      # but warn the user (except for BASH, which is always set by the calling BASH).
18705      if test "xTIME" != xBASH; then
18706        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
18707$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
18708      fi
18709      # Try to locate tool using the code snippet
18710      for ac_prog in time
18711do
18712  # Extract the first word of "$ac_prog", so it can be a program name with args.
18713set dummy $ac_prog; ac_word=$2
18714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18715$as_echo_n "checking for $ac_word... " >&6; }
18716if ${ac_cv_path_TIME+:} false; then :
18717  $as_echo_n "(cached) " >&6
18718else
18719  case $TIME in
18720  [\\/]* | ?:[\\/]*)
18721  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18722  ;;
18723  *)
18724  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18725for as_dir in $PATH
18726do
18727  IFS=$as_save_IFS
18728  test -z "$as_dir" && as_dir=.
18729    for ac_exec_ext in '' $ac_executable_extensions; do
18730  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18731    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18732    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18733    break 2
18734  fi
18735done
18736  done
18737IFS=$as_save_IFS
18738
18739  ;;
18740esac
18741fi
18742TIME=$ac_cv_path_TIME
18743if test -n "$TIME"; then
18744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18745$as_echo "$TIME" >&6; }
18746else
18747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18748$as_echo "no" >&6; }
18749fi
18750
18751
18752  test -n "$TIME" && break
18753done
18754
18755    else
18756      # If it succeeded, then it was overridden by the user. We will use it
18757      # for the tool.
18758
18759      # First remove it from the list of overridden variables, so we can test
18760      # for unknown variables in the end.
18761      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18762
18763      # Check if the provided tool contains a complete path.
18764      tool_specified="$TIME"
18765      tool_basename="${tool_specified##*/}"
18766      if test "x$tool_basename" = "x$tool_specified"; then
18767        # A command without a complete path is provided, search $PATH.
18768        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
18769$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
18770        # Extract the first word of "$tool_basename", so it can be a program name with args.
18771set dummy $tool_basename; ac_word=$2
18772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18773$as_echo_n "checking for $ac_word... " >&6; }
18774if ${ac_cv_path_TIME+:} false; then :
18775  $as_echo_n "(cached) " >&6
18776else
18777  case $TIME in
18778  [\\/]* | ?:[\\/]*)
18779  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18780  ;;
18781  *)
18782  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18783for as_dir in $PATH
18784do
18785  IFS=$as_save_IFS
18786  test -z "$as_dir" && as_dir=.
18787    for ac_exec_ext in '' $ac_executable_extensions; do
18788  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18789    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18790    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18791    break 2
18792  fi
18793done
18794  done
18795IFS=$as_save_IFS
18796
18797  ;;
18798esac
18799fi
18800TIME=$ac_cv_path_TIME
18801if test -n "$TIME"; then
18802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18803$as_echo "$TIME" >&6; }
18804else
18805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18806$as_echo "no" >&6; }
18807fi
18808
18809
18810        if test "x$TIME" = x; then
18811          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18812        fi
18813      else
18814        # Otherwise we believe it is a complete path. Use it as it is.
18815        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
18816$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
18817        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
18818$as_echo_n "checking for TIME... " >&6; }
18819        if test ! -x "$tool_specified"; then
18820          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18821$as_echo "not found" >&6; }
18822          as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
18823        fi
18824        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18825$as_echo "$tool_specified" >&6; }
18826      fi
18827    fi
18828  fi
18829
18830
18831  # Check if it's GNU time
18832  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
18833  if test "x$IS_GNU_TIME" != x; then
18834    IS_GNU_TIME=yes
18835  else
18836    IS_GNU_TIME=no
18837  fi
18838
18839
18840  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
18841
18842
18843
18844  # Publish this variable in the help.
18845
18846
18847  if test "x$COMM" = x; then
18848    # The variable is not set by user, try to locate tool using the code snippet
18849    for ac_prog in comm
18850do
18851  # Extract the first word of "$ac_prog", so it can be a program name with args.
18852set dummy $ac_prog; ac_word=$2
18853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18854$as_echo_n "checking for $ac_word... " >&6; }
18855if ${ac_cv_path_COMM+:} false; then :
18856  $as_echo_n "(cached) " >&6
18857else
18858  case $COMM in
18859  [\\/]* | ?:[\\/]*)
18860  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18861  ;;
18862  *)
18863  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18864for as_dir in $PATH
18865do
18866  IFS=$as_save_IFS
18867  test -z "$as_dir" && as_dir=.
18868    for ac_exec_ext in '' $ac_executable_extensions; do
18869  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18870    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18871    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18872    break 2
18873  fi
18874done
18875  done
18876IFS=$as_save_IFS
18877
18878  ;;
18879esac
18880fi
18881COMM=$ac_cv_path_COMM
18882if test -n "$COMM"; then
18883  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18884$as_echo "$COMM" >&6; }
18885else
18886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18887$as_echo "no" >&6; }
18888fi
18889
18890
18891  test -n "$COMM" && break
18892done
18893
18894  else
18895    # The variable is set, but is it from the command line or the environment?
18896
18897    # Try to remove the string !COMM! from our list.
18898    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
18899    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18900      # If it failed, the variable was not from the command line. Ignore it,
18901      # but warn the user (except for BASH, which is always set by the calling BASH).
18902      if test "xCOMM" != xBASH; then
18903        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
18904$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
18905      fi
18906      # Try to locate tool using the code snippet
18907      for ac_prog in comm
18908do
18909  # Extract the first word of "$ac_prog", so it can be a program name with args.
18910set dummy $ac_prog; ac_word=$2
18911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18912$as_echo_n "checking for $ac_word... " >&6; }
18913if ${ac_cv_path_COMM+:} false; then :
18914  $as_echo_n "(cached) " >&6
18915else
18916  case $COMM in
18917  [\\/]* | ?:[\\/]*)
18918  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18919  ;;
18920  *)
18921  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18922for as_dir in $PATH
18923do
18924  IFS=$as_save_IFS
18925  test -z "$as_dir" && as_dir=.
18926    for ac_exec_ext in '' $ac_executable_extensions; do
18927  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18928    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18929    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18930    break 2
18931  fi
18932done
18933  done
18934IFS=$as_save_IFS
18935
18936  ;;
18937esac
18938fi
18939COMM=$ac_cv_path_COMM
18940if test -n "$COMM"; then
18941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18942$as_echo "$COMM" >&6; }
18943else
18944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18945$as_echo "no" >&6; }
18946fi
18947
18948
18949  test -n "$COMM" && break
18950done
18951
18952    else
18953      # If it succeeded, then it was overridden by the user. We will use it
18954      # for the tool.
18955
18956      # First remove it from the list of overridden variables, so we can test
18957      # for unknown variables in the end.
18958      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18959
18960      # Check if the provided tool contains a complete path.
18961      tool_specified="$COMM"
18962      tool_basename="${tool_specified##*/}"
18963      if test "x$tool_basename" = "x$tool_specified"; then
18964        # A command without a complete path is provided, search $PATH.
18965        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
18966$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
18967        # Extract the first word of "$tool_basename", so it can be a program name with args.
18968set dummy $tool_basename; ac_word=$2
18969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18970$as_echo_n "checking for $ac_word... " >&6; }
18971if ${ac_cv_path_COMM+:} false; then :
18972  $as_echo_n "(cached) " >&6
18973else
18974  case $COMM in
18975  [\\/]* | ?:[\\/]*)
18976  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18977  ;;
18978  *)
18979  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18980for as_dir in $PATH
18981do
18982  IFS=$as_save_IFS
18983  test -z "$as_dir" && as_dir=.
18984    for ac_exec_ext in '' $ac_executable_extensions; do
18985  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18986    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18987    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18988    break 2
18989  fi
18990done
18991  done
18992IFS=$as_save_IFS
18993
18994  ;;
18995esac
18996fi
18997COMM=$ac_cv_path_COMM
18998if test -n "$COMM"; then
18999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
19000$as_echo "$COMM" >&6; }
19001else
19002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19003$as_echo "no" >&6; }
19004fi
19005
19006
19007        if test "x$COMM" = x; then
19008          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19009        fi
19010      else
19011        # Otherwise we believe it is a complete path. Use it as it is.
19012        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
19013$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
19014        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
19015$as_echo_n "checking for COMM... " >&6; }
19016        if test ! -x "$tool_specified"; then
19017          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19018$as_echo "not found" >&6; }
19019          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
19020        fi
19021        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19022$as_echo "$tool_specified" >&6; }
19023      fi
19024    fi
19025  fi
19026
19027
19028
19029  if test "x$COMM" = x; then
19030    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
19031  fi
19032
19033
19034  fi
19035
19036  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
19037
19038
19039
19040  # Publish this variable in the help.
19041
19042
19043  if test "x$DSYMUTIL" = x; then
19044    # The variable is not set by user, try to locate tool using the code snippet
19045    for ac_prog in dsymutil
19046do
19047  # Extract the first word of "$ac_prog", so it can be a program name with args.
19048set dummy $ac_prog; ac_word=$2
19049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19050$as_echo_n "checking for $ac_word... " >&6; }
19051if ${ac_cv_path_DSYMUTIL+:} false; then :
19052  $as_echo_n "(cached) " >&6
19053else
19054  case $DSYMUTIL in
19055  [\\/]* | ?:[\\/]*)
19056  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19057  ;;
19058  *)
19059  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19060for as_dir in $PATH
19061do
19062  IFS=$as_save_IFS
19063  test -z "$as_dir" && as_dir=.
19064    for ac_exec_ext in '' $ac_executable_extensions; do
19065  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19066    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19067    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19068    break 2
19069  fi
19070done
19071  done
19072IFS=$as_save_IFS
19073
19074  ;;
19075esac
19076fi
19077DSYMUTIL=$ac_cv_path_DSYMUTIL
19078if test -n "$DSYMUTIL"; then
19079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19080$as_echo "$DSYMUTIL" >&6; }
19081else
19082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19083$as_echo "no" >&6; }
19084fi
19085
19086
19087  test -n "$DSYMUTIL" && break
19088done
19089
19090  else
19091    # The variable is set, but is it from the command line or the environment?
19092
19093    # Try to remove the string !DSYMUTIL! from our list.
19094    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
19095    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19096      # If it failed, the variable was not from the command line. Ignore it,
19097      # but warn the user (except for BASH, which is always set by the calling BASH).
19098      if test "xDSYMUTIL" != xBASH; then
19099        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
19100$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
19101      fi
19102      # Try to locate tool using the code snippet
19103      for ac_prog in dsymutil
19104do
19105  # Extract the first word of "$ac_prog", so it can be a program name with args.
19106set dummy $ac_prog; ac_word=$2
19107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19108$as_echo_n "checking for $ac_word... " >&6; }
19109if ${ac_cv_path_DSYMUTIL+:} false; then :
19110  $as_echo_n "(cached) " >&6
19111else
19112  case $DSYMUTIL in
19113  [\\/]* | ?:[\\/]*)
19114  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19115  ;;
19116  *)
19117  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19118for as_dir in $PATH
19119do
19120  IFS=$as_save_IFS
19121  test -z "$as_dir" && as_dir=.
19122    for ac_exec_ext in '' $ac_executable_extensions; do
19123  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19124    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19125    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19126    break 2
19127  fi
19128done
19129  done
19130IFS=$as_save_IFS
19131
19132  ;;
19133esac
19134fi
19135DSYMUTIL=$ac_cv_path_DSYMUTIL
19136if test -n "$DSYMUTIL"; then
19137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19138$as_echo "$DSYMUTIL" >&6; }
19139else
19140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19141$as_echo "no" >&6; }
19142fi
19143
19144
19145  test -n "$DSYMUTIL" && break
19146done
19147
19148    else
19149      # If it succeeded, then it was overridden by the user. We will use it
19150      # for the tool.
19151
19152      # First remove it from the list of overridden variables, so we can test
19153      # for unknown variables in the end.
19154      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19155
19156      # Check if the provided tool contains a complete path.
19157      tool_specified="$DSYMUTIL"
19158      tool_basename="${tool_specified##*/}"
19159      if test "x$tool_basename" = "x$tool_specified"; then
19160        # A command without a complete path is provided, search $PATH.
19161        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
19162$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
19163        # Extract the first word of "$tool_basename", so it can be a program name with args.
19164set dummy $tool_basename; ac_word=$2
19165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19166$as_echo_n "checking for $ac_word... " >&6; }
19167if ${ac_cv_path_DSYMUTIL+:} false; then :
19168  $as_echo_n "(cached) " >&6
19169else
19170  case $DSYMUTIL in
19171  [\\/]* | ?:[\\/]*)
19172  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19173  ;;
19174  *)
19175  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19176for as_dir in $PATH
19177do
19178  IFS=$as_save_IFS
19179  test -z "$as_dir" && as_dir=.
19180    for ac_exec_ext in '' $ac_executable_extensions; do
19181  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19182    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19183    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19184    break 2
19185  fi
19186done
19187  done
19188IFS=$as_save_IFS
19189
19190  ;;
19191esac
19192fi
19193DSYMUTIL=$ac_cv_path_DSYMUTIL
19194if test -n "$DSYMUTIL"; then
19195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19196$as_echo "$DSYMUTIL" >&6; }
19197else
19198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19199$as_echo "no" >&6; }
19200fi
19201
19202
19203        if test "x$DSYMUTIL" = x; then
19204          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19205        fi
19206      else
19207        # Otherwise we believe it is a complete path. Use it as it is.
19208        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
19209$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
19210        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
19211$as_echo_n "checking for DSYMUTIL... " >&6; }
19212        if test ! -x "$tool_specified"; then
19213          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19214$as_echo "not found" >&6; }
19215          as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
19216        fi
19217        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19218$as_echo "$tool_specified" >&6; }
19219      fi
19220    fi
19221  fi
19222
19223
19224
19225  if test "x$DSYMUTIL" = x; then
19226    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
19227  fi
19228
19229
19230
19231
19232
19233  # Publish this variable in the help.
19234
19235
19236  if test "x$XATTR" = x; then
19237    # The variable is not set by user, try to locate tool using the code snippet
19238    for ac_prog in xattr
19239do
19240  # Extract the first word of "$ac_prog", so it can be a program name with args.
19241set dummy $ac_prog; ac_word=$2
19242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19243$as_echo_n "checking for $ac_word... " >&6; }
19244if ${ac_cv_path_XATTR+:} false; then :
19245  $as_echo_n "(cached) " >&6
19246else
19247  case $XATTR in
19248  [\\/]* | ?:[\\/]*)
19249  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19250  ;;
19251  *)
19252  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19253for as_dir in $PATH
19254do
19255  IFS=$as_save_IFS
19256  test -z "$as_dir" && as_dir=.
19257    for ac_exec_ext in '' $ac_executable_extensions; do
19258  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19259    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19260    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19261    break 2
19262  fi
19263done
19264  done
19265IFS=$as_save_IFS
19266
19267  ;;
19268esac
19269fi
19270XATTR=$ac_cv_path_XATTR
19271if test -n "$XATTR"; then
19272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19273$as_echo "$XATTR" >&6; }
19274else
19275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19276$as_echo "no" >&6; }
19277fi
19278
19279
19280  test -n "$XATTR" && break
19281done
19282
19283  else
19284    # The variable is set, but is it from the command line or the environment?
19285
19286    # Try to remove the string !XATTR! from our list.
19287    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
19288    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19289      # If it failed, the variable was not from the command line. Ignore it,
19290      # but warn the user (except for BASH, which is always set by the calling BASH).
19291      if test "xXATTR" != xBASH; then
19292        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
19293$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
19294      fi
19295      # Try to locate tool using the code snippet
19296      for ac_prog in xattr
19297do
19298  # Extract the first word of "$ac_prog", so it can be a program name with args.
19299set dummy $ac_prog; ac_word=$2
19300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19301$as_echo_n "checking for $ac_word... " >&6; }
19302if ${ac_cv_path_XATTR+:} false; then :
19303  $as_echo_n "(cached) " >&6
19304else
19305  case $XATTR in
19306  [\\/]* | ?:[\\/]*)
19307  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19308  ;;
19309  *)
19310  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19311for as_dir in $PATH
19312do
19313  IFS=$as_save_IFS
19314  test -z "$as_dir" && as_dir=.
19315    for ac_exec_ext in '' $ac_executable_extensions; do
19316  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19317    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19318    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19319    break 2
19320  fi
19321done
19322  done
19323IFS=$as_save_IFS
19324
19325  ;;
19326esac
19327fi
19328XATTR=$ac_cv_path_XATTR
19329if test -n "$XATTR"; then
19330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19331$as_echo "$XATTR" >&6; }
19332else
19333  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19334$as_echo "no" >&6; }
19335fi
19336
19337
19338  test -n "$XATTR" && break
19339done
19340
19341    else
19342      # If it succeeded, then it was overridden by the user. We will use it
19343      # for the tool.
19344
19345      # First remove it from the list of overridden variables, so we can test
19346      # for unknown variables in the end.
19347      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19348
19349      # Check if the provided tool contains a complete path.
19350      tool_specified="$XATTR"
19351      tool_basename="${tool_specified##*/}"
19352      if test "x$tool_basename" = "x$tool_specified"; then
19353        # A command without a complete path is provided, search $PATH.
19354        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
19355$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
19356        # Extract the first word of "$tool_basename", so it can be a program name with args.
19357set dummy $tool_basename; ac_word=$2
19358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19359$as_echo_n "checking for $ac_word... " >&6; }
19360if ${ac_cv_path_XATTR+:} false; then :
19361  $as_echo_n "(cached) " >&6
19362else
19363  case $XATTR in
19364  [\\/]* | ?:[\\/]*)
19365  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19366  ;;
19367  *)
19368  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19369for as_dir in $PATH
19370do
19371  IFS=$as_save_IFS
19372  test -z "$as_dir" && as_dir=.
19373    for ac_exec_ext in '' $ac_executable_extensions; do
19374  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19375    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19376    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19377    break 2
19378  fi
19379done
19380  done
19381IFS=$as_save_IFS
19382
19383  ;;
19384esac
19385fi
19386XATTR=$ac_cv_path_XATTR
19387if test -n "$XATTR"; then
19388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19389$as_echo "$XATTR" >&6; }
19390else
19391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19392$as_echo "no" >&6; }
19393fi
19394
19395
19396        if test "x$XATTR" = x; then
19397          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19398        fi
19399      else
19400        # Otherwise we believe it is a complete path. Use it as it is.
19401        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
19402$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
19403        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
19404$as_echo_n "checking for XATTR... " >&6; }
19405        if test ! -x "$tool_specified"; then
19406          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19407$as_echo "not found" >&6; }
19408          as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
19409        fi
19410        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19411$as_echo "$tool_specified" >&6; }
19412      fi
19413    fi
19414  fi
19415
19416
19417
19418  if test "x$XATTR" = x; then
19419    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
19420  fi
19421
19422
19423
19424
19425  # Publish this variable in the help.
19426
19427
19428  if test "x$CODESIGN" = x; then
19429    # The variable is not set by user, try to locate tool using the code snippet
19430    for ac_prog in codesign
19431do
19432  # Extract the first word of "$ac_prog", so it can be a program name with args.
19433set dummy $ac_prog; ac_word=$2
19434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19435$as_echo_n "checking for $ac_word... " >&6; }
19436if ${ac_cv_path_CODESIGN+:} false; then :
19437  $as_echo_n "(cached) " >&6
19438else
19439  case $CODESIGN in
19440  [\\/]* | ?:[\\/]*)
19441  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19442  ;;
19443  *)
19444  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19445for as_dir in $PATH
19446do
19447  IFS=$as_save_IFS
19448  test -z "$as_dir" && as_dir=.
19449    for ac_exec_ext in '' $ac_executable_extensions; do
19450  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19451    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19452    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19453    break 2
19454  fi
19455done
19456  done
19457IFS=$as_save_IFS
19458
19459  ;;
19460esac
19461fi
19462CODESIGN=$ac_cv_path_CODESIGN
19463if test -n "$CODESIGN"; then
19464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19465$as_echo "$CODESIGN" >&6; }
19466else
19467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19468$as_echo "no" >&6; }
19469fi
19470
19471
19472  test -n "$CODESIGN" && break
19473done
19474
19475  else
19476    # The variable is set, but is it from the command line or the environment?
19477
19478    # Try to remove the string !CODESIGN! from our list.
19479    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
19480    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19481      # If it failed, the variable was not from the command line. Ignore it,
19482      # but warn the user (except for BASH, which is always set by the calling BASH).
19483      if test "xCODESIGN" != xBASH; then
19484        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
19485$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
19486      fi
19487      # Try to locate tool using the code snippet
19488      for ac_prog in codesign
19489do
19490  # Extract the first word of "$ac_prog", so it can be a program name with args.
19491set dummy $ac_prog; ac_word=$2
19492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19493$as_echo_n "checking for $ac_word... " >&6; }
19494if ${ac_cv_path_CODESIGN+:} false; then :
19495  $as_echo_n "(cached) " >&6
19496else
19497  case $CODESIGN in
19498  [\\/]* | ?:[\\/]*)
19499  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19500  ;;
19501  *)
19502  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19503for as_dir in $PATH
19504do
19505  IFS=$as_save_IFS
19506  test -z "$as_dir" && as_dir=.
19507    for ac_exec_ext in '' $ac_executable_extensions; do
19508  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19509    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19510    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19511    break 2
19512  fi
19513done
19514  done
19515IFS=$as_save_IFS
19516
19517  ;;
19518esac
19519fi
19520CODESIGN=$ac_cv_path_CODESIGN
19521if test -n "$CODESIGN"; then
19522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19523$as_echo "$CODESIGN" >&6; }
19524else
19525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19526$as_echo "no" >&6; }
19527fi
19528
19529
19530  test -n "$CODESIGN" && break
19531done
19532
19533    else
19534      # If it succeeded, then it was overridden by the user. We will use it
19535      # for the tool.
19536
19537      # First remove it from the list of overridden variables, so we can test
19538      # for unknown variables in the end.
19539      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19540
19541      # Check if the provided tool contains a complete path.
19542      tool_specified="$CODESIGN"
19543      tool_basename="${tool_specified##*/}"
19544      if test "x$tool_basename" = "x$tool_specified"; then
19545        # A command without a complete path is provided, search $PATH.
19546        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
19547$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
19548        # Extract the first word of "$tool_basename", so it can be a program name with args.
19549set dummy $tool_basename; ac_word=$2
19550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19551$as_echo_n "checking for $ac_word... " >&6; }
19552if ${ac_cv_path_CODESIGN+:} false; then :
19553  $as_echo_n "(cached) " >&6
19554else
19555  case $CODESIGN in
19556  [\\/]* | ?:[\\/]*)
19557  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19558  ;;
19559  *)
19560  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19561for as_dir in $PATH
19562do
19563  IFS=$as_save_IFS
19564  test -z "$as_dir" && as_dir=.
19565    for ac_exec_ext in '' $ac_executable_extensions; do
19566  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19567    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19568    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19569    break 2
19570  fi
19571done
19572  done
19573IFS=$as_save_IFS
19574
19575  ;;
19576esac
19577fi
19578CODESIGN=$ac_cv_path_CODESIGN
19579if test -n "$CODESIGN"; then
19580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19581$as_echo "$CODESIGN" >&6; }
19582else
19583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19584$as_echo "no" >&6; }
19585fi
19586
19587
19588        if test "x$CODESIGN" = x; then
19589          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19590        fi
19591      else
19592        # Otherwise we believe it is a complete path. Use it as it is.
19593        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
19594$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
19595        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
19596$as_echo_n "checking for CODESIGN... " >&6; }
19597        if test ! -x "$tool_specified"; then
19598          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19599$as_echo "not found" >&6; }
19600          as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
19601        fi
19602        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19603$as_echo "$tool_specified" >&6; }
19604      fi
19605    fi
19606  fi
19607
19608
19609    if test "x$CODESIGN" != "x"; then
19610      # Verify that the openjdk_codesign certificate is present
19611      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
19612$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
19613      rm -f codesign-testfile
19614      touch codesign-testfile
19615      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
19616      rm -f codesign-testfile
19617      if test "x$CODESIGN" = x; then
19618        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19619$as_echo "no" >&6; }
19620      else
19621        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19622$as_echo "yes" >&6; }
19623      fi
19624    fi
19625  fi
19626
19627
19628# Check if pkg-config is available.
19629
19630
19631if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
19632	if test -n "$ac_tool_prefix"; then
19633  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
19634set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
19635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19636$as_echo_n "checking for $ac_word... " >&6; }
19637if ${ac_cv_path_PKG_CONFIG+:} false; then :
19638  $as_echo_n "(cached) " >&6
19639else
19640  case $PKG_CONFIG in
19641  [\\/]* | ?:[\\/]*)
19642  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
19643  ;;
19644  *)
19645  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19646for as_dir in $PATH
19647do
19648  IFS=$as_save_IFS
19649  test -z "$as_dir" && as_dir=.
19650    for ac_exec_ext in '' $ac_executable_extensions; do
19651  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19652    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19653    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19654    break 2
19655  fi
19656done
19657  done
19658IFS=$as_save_IFS
19659
19660  ;;
19661esac
19662fi
19663PKG_CONFIG=$ac_cv_path_PKG_CONFIG
19664if test -n "$PKG_CONFIG"; then
19665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
19666$as_echo "$PKG_CONFIG" >&6; }
19667else
19668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19669$as_echo "no" >&6; }
19670fi
19671
19672
19673fi
19674if test -z "$ac_cv_path_PKG_CONFIG"; then
19675  ac_pt_PKG_CONFIG=$PKG_CONFIG
19676  # Extract the first word of "pkg-config", so it can be a program name with args.
19677set dummy pkg-config; ac_word=$2
19678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19679$as_echo_n "checking for $ac_word... " >&6; }
19680if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
19681  $as_echo_n "(cached) " >&6
19682else
19683  case $ac_pt_PKG_CONFIG in
19684  [\\/]* | ?:[\\/]*)
19685  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
19686  ;;
19687  *)
19688  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19689for as_dir in $PATH
19690do
19691  IFS=$as_save_IFS
19692  test -z "$as_dir" && as_dir=.
19693    for ac_exec_ext in '' $ac_executable_extensions; do
19694  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19695    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19696    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19697    break 2
19698  fi
19699done
19700  done
19701IFS=$as_save_IFS
19702
19703  ;;
19704esac
19705fi
19706ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
19707if test -n "$ac_pt_PKG_CONFIG"; then
19708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
19709$as_echo "$ac_pt_PKG_CONFIG" >&6; }
19710else
19711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19712$as_echo "no" >&6; }
19713fi
19714
19715  if test "x$ac_pt_PKG_CONFIG" = x; then
19716    PKG_CONFIG=""
19717  else
19718    case $cross_compiling:$ac_tool_warned in
19719yes:)
19720{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19721$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19722ac_tool_warned=yes ;;
19723esac
19724    PKG_CONFIG=$ac_pt_PKG_CONFIG
19725  fi
19726else
19727  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
19728fi
19729
19730fi
19731if test -n "$PKG_CONFIG"; then
19732	_pkg_min_version=0.9.0
19733	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
19734$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
19735	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
19736		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19737$as_echo "yes" >&6; }
19738	else
19739		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19740$as_echo "no" >&6; }
19741		PKG_CONFIG=""
19742	fi
19743
19744fi
19745
19746# After basic tools have been setup, we can check build os specific details.
19747
19748  ###############################################################################
19749
19750  # Note that this is the build platform OS version!
19751
19752  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
19753  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
19754  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
19755  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
19756
19757
19758
19759
19760
19761# Setup builddeps, for automatic downloading of tools we need.
19762# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
19763# boot-jdk setup, but we need to have basic tools setup first.
19764
19765
19766# Check whether --with-builddeps-conf was given.
19767if test "${with_builddeps_conf+set}" = set; then :
19768  withval=$with_builddeps_conf;
19769fi
19770
19771
19772
19773# Check whether --with-builddeps-server was given.
19774if test "${with_builddeps_server+set}" = set; then :
19775  withval=$with_builddeps_server;
19776fi
19777
19778
19779
19780# Check whether --with-builddeps-dir was given.
19781if test "${with_builddeps_dir+set}" = set; then :
19782  withval=$with_builddeps_dir;
19783else
19784  with_builddeps_dir=/localhome/builddeps
19785fi
19786
19787
19788
19789# Check whether --with-builddeps-group was given.
19790if test "${with_builddeps_group+set}" = set; then :
19791  withval=$with_builddeps_group;
19792fi
19793
19794
19795
19796
19797  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
19798    if test "x$with_builddeps_conf" != x; then
19799      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
19800$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
19801      builddepsfile=$with_builddeps_conf
19802      if test -s $builddepsfile; then
19803        . $builddepsfile
19804        { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
19805$as_echo "loaded!" >&6; }
19806      else
19807        as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
19808      fi
19809    else
19810      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
19811$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
19812      builddepsfile=`mktemp`
19813      touch $builddepsfile
19814      # Put all found confs into a single file.
19815      find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
19816      # Source the file to acquire the variables
19817      if test -s $builddepsfile; then
19818        . $builddepsfile
19819        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
19820$as_echo "found at least one!" >&6; }
19821      else
19822        as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
19823      fi
19824    fi
19825    # Create build and target names that use _ instead of "-" and ".".
19826    # This is necessary to use them in variable names.
19827    build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19828    target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19829    # Extract rewrite information for build and target
19830    eval rewritten_build=\${REWRITE_${build_var}}
19831    if test "x$rewritten_build" = x; then
19832      rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
19833      echo Build stays the same $rewritten_build
19834    else
19835      echo Rewriting build for builddeps into $rewritten_build
19836    fi
19837    eval rewritten_target=\${REWRITE_${target_var}}
19838    if test "x$rewritten_target" = x; then
19839      rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
19840      echo Target stays the same $rewritten_target
19841    else
19842      echo Rewriting target for builddeps into $rewritten_target
19843    fi
19844    rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
19845    rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
19846  fi
19847  for ac_prog in 7z unzip
19848do
19849  # Extract the first word of "$ac_prog", so it can be a program name with args.
19850set dummy $ac_prog; ac_word=$2
19851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19852$as_echo_n "checking for $ac_word... " >&6; }
19853if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
19854  $as_echo_n "(cached) " >&6
19855else
19856  if test -n "$BDEPS_UNZIP"; then
19857  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
19858else
19859as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19860for as_dir in $PATH
19861do
19862  IFS=$as_save_IFS
19863  test -z "$as_dir" && as_dir=.
19864    for ac_exec_ext in '' $ac_executable_extensions; do
19865  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19866    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
19867    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19868    break 2
19869  fi
19870done
19871  done
19872IFS=$as_save_IFS
19873
19874fi
19875fi
19876BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
19877if test -n "$BDEPS_UNZIP"; then
19878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
19879$as_echo "$BDEPS_UNZIP" >&6; }
19880else
19881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19882$as_echo "no" >&6; }
19883fi
19884
19885
19886  test -n "$BDEPS_UNZIP" && break
19887done
19888
19889  if test "x$BDEPS_UNZIP" = x7z; then
19890    BDEPS_UNZIP="7z x"
19891  fi
19892
19893  for ac_prog in wget lftp ftp
19894do
19895  # Extract the first word of "$ac_prog", so it can be a program name with args.
19896set dummy $ac_prog; ac_word=$2
19897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19898$as_echo_n "checking for $ac_word... " >&6; }
19899if ${ac_cv_prog_BDEPS_FTP+:} false; then :
19900  $as_echo_n "(cached) " >&6
19901else
19902  if test -n "$BDEPS_FTP"; then
19903  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
19904else
19905as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19906for as_dir in $PATH
19907do
19908  IFS=$as_save_IFS
19909  test -z "$as_dir" && as_dir=.
19910    for ac_exec_ext in '' $ac_executable_extensions; do
19911  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19912    ac_cv_prog_BDEPS_FTP="$ac_prog"
19913    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19914    break 2
19915  fi
19916done
19917  done
19918IFS=$as_save_IFS
19919
19920fi
19921fi
19922BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
19923if test -n "$BDEPS_FTP"; then
19924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
19925$as_echo "$BDEPS_FTP" >&6; }
19926else
19927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19928$as_echo "no" >&6; }
19929fi
19930
19931
19932  test -n "$BDEPS_FTP" && break
19933done
19934
19935
19936
19937###############################################################################
19938#
19939# Determine OpenJDK variants, options and version numbers.
19940#
19941###############################################################################
19942
19943# We need build & target for this.
19944
19945
19946  ###############################################################################
19947  #
19948  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
19949  # We always build headless support.
19950  #
19951  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
19952$as_echo_n "checking headful support... " >&6; }
19953  # Check whether --enable-headful was given.
19954if test "${enable_headful+set}" = set; then :
19955  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
19956else
19957  SUPPORT_HEADFUL=yes
19958fi
19959
19960
19961  SUPPORT_HEADLESS=yes
19962  BUILD_HEADLESS="BUILD_HEADLESS:=true"
19963
19964  if test "x$SUPPORT_HEADFUL" = xyes; then
19965    # We are building both headful and headless.
19966    headful_msg="include support for both headful and headless"
19967  fi
19968
19969  if test "x$SUPPORT_HEADFUL" = xno; then
19970    # Thus we are building headless only.
19971    BUILD_HEADLESS="BUILD_HEADLESS:=true"
19972    headful_msg="headless only"
19973  fi
19974
19975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
19976$as_echo "$headful_msg" >&6; }
19977
19978
19979
19980
19981
19982  # Control wether Hotspot runs Queens test after build.
19983  # Check whether --enable-hotspot-test-in-build was given.
19984if test "${enable_hotspot_test_in_build+set}" = set; then :
19985  enableval=$enable_hotspot_test_in_build;
19986else
19987  enable_hotspot_test_in_build=no
19988fi
19989
19990  if test "x$enable_hotspot_test_in_build" = "xyes"; then
19991    TEST_IN_BUILD=true
19992  else
19993    TEST_IN_BUILD=false
19994  fi
19995
19996
19997  ###############################################################################
19998  #
19999  # Choose cacerts source file
20000  #
20001
20002# Check whether --with-cacerts-file was given.
20003if test "${with_cacerts_file+set}" = set; then :
20004  withval=$with_cacerts_file;
20005fi
20006
20007  if test "x$with_cacerts_file" != x; then
20008    CACERTS_FILE=$with_cacerts_file
20009  fi
20010
20011
20012  ###############################################################################
20013  #
20014  # Enable or disable unlimited crypto
20015  #
20016  # Check whether --enable-unlimited-crypto was given.
20017if test "${enable_unlimited_crypto+set}" = set; then :
20018  enableval=$enable_unlimited_crypto;
20019else
20020  enable_unlimited_crypto=no
20021fi
20022
20023  if test "x$enable_unlimited_crypto" = "xyes"; then
20024    UNLIMITED_CRYPTO=true
20025  else
20026    UNLIMITED_CRYPTO=false
20027  fi
20028
20029
20030  ###############################################################################
20031  #
20032  # Enable or disable the elliptic curve crypto implementation
20033  #
20034
20035
20036  ###############################################################################
20037  #
20038  # --enable-rmiconnector-iiop
20039  #
20040  # Check whether --enable-rmiconnector-iiop was given.
20041if test "${enable_rmiconnector_iiop+set}" = set; then :
20042  enableval=$enable_rmiconnector_iiop;
20043fi
20044
20045  if test "x$enable_rmiconnector_iiop" = "xyes"; then
20046    RMICONNECTOR_IIOP=true
20047  else
20048    RMICONNECTOR_IIOP=false
20049  fi
20050
20051
20052  ###############################################################################
20053  #
20054  # Compress jars
20055  #
20056  COMPRESS_JARS=false
20057
20058
20059
20060
20061  # Source the version numbers
20062  . $AUTOCONF_DIR/version-numbers
20063
20064  # Get the settings from parameters
20065
20066# Check whether --with-milestone was given.
20067if test "${with_milestone+set}" = set; then :
20068  withval=$with_milestone;
20069fi
20070
20071  if test "x$with_milestone" = xyes; then
20072    as_fn_error $? "Milestone must have a value" "$LINENO" 5
20073  elif test "x$with_milestone" != x; then
20074    MILESTONE="$with_milestone"
20075  fi
20076  if test "x$MILESTONE" = x; then
20077    MILESTONE=internal
20078  fi
20079
20080
20081# Check whether --with-update-version was given.
20082if test "${with_update_version+set}" = set; then :
20083  withval=$with_update_version;
20084fi
20085
20086  if test "x$with_update_version" = xyes; then
20087    as_fn_error $? "Update version must have a value" "$LINENO" 5
20088  elif test "x$with_update_version" != x; then
20089    JDK_UPDATE_VERSION="$with_update_version"
20090    # On macosx 10.7, it's not possible to set --with-update-version=0X due
20091    # to a bug in expr (which reduces it to just X). To work around this, we
20092    # always add a 0 to one digit update versions.
20093    if test "${#JDK_UPDATE_VERSION}" = "1"; then
20094      JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
20095    fi
20096  fi
20097
20098
20099# Check whether --with-user-release-suffix was given.
20100if test "${with_user_release_suffix+set}" = set; then :
20101  withval=$with_user_release_suffix;
20102fi
20103
20104  if test "x$with_user_release_suffix" = xyes; then
20105    as_fn_error $? "Release suffix must have a value" "$LINENO" 5
20106  elif test "x$with_user_release_suffix" != x; then
20107    USER_RELEASE_SUFFIX="$with_user_release_suffix"
20108  fi
20109
20110
20111# Check whether --with-build-number was given.
20112if test "${with_build_number+set}" = set; then :
20113  withval=$with_build_number;
20114fi
20115
20116  if test "x$with_build_number" = xyes; then
20117    as_fn_error $? "Build number must have a value" "$LINENO" 5
20118  elif test "x$with_build_number" != x; then
20119    JDK_BUILD_NUMBER="$with_build_number"
20120  fi
20121  # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
20122  if test "x$JDK_BUILD_NUMBER" = x; then
20123    JDK_BUILD_NUMBER=b00
20124    if test "x$USER_RELEASE_SUFFIX" = x; then
20125      BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
20126      # Avoid [:alnum:] since it depends on the locale.
20127      CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
20128      USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20129    fi
20130  fi
20131
20132  # Now set the JDK version, milestone, build number etc.
20133
20134
20135
20136
20137
20138
20139
20140
20141
20142
20143
20144
20145
20146
20147
20148
20149# Check whether --with-copyright-year was given.
20150if test "${with_copyright_year+set}" = set; then :
20151  withval=$with_copyright_year;
20152fi
20153
20154  if test "x$with_copyright_year" = xyes; then
20155    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
20156  elif test "x$with_copyright_year" != x; then
20157    COPYRIGHT_YEAR="$with_copyright_year"
20158  else
20159    COPYRIGHT_YEAR=`date +'%Y'`
20160  fi
20161
20162
20163  if test "x$JDK_UPDATE_VERSION" != x; then
20164    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
20165  else
20166    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
20167  fi
20168
20169
20170  COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
20171
20172
20173
20174###############################################################################
20175#
20176# Setup BootJDK, used to bootstrap the build.
20177#
20178###############################################################################
20179
20180
20181  BOOT_JDK_FOUND=no
20182
20183# Check whether --with-boot-jdk was given.
20184if test "${with_boot_jdk+set}" = set; then :
20185  withval=$with_boot_jdk;
20186fi
20187
20188
20189  # We look for the Boot JDK through various means, going from more certain to
20190  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
20191  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
20192  # must check if this is indeed valid; otherwise we'll continue looking.
20193
20194  # Test: Is bootjdk explicitely set by command line arguments?
20195
20196  if test "x$BOOT_JDK_FOUND" = xno; then
20197    # Now execute the test
20198
20199  if test "x$with_boot_jdk" != x; then
20200    BOOT_JDK=$with_boot_jdk
20201    BOOT_JDK_FOUND=maybe
20202    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
20203$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
20204  fi
20205
20206
20207    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20208    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20209      # Do we have a bin/java?
20210      if test ! -x "$BOOT_JDK/bin/java"; then
20211        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20212$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20213        BOOT_JDK_FOUND=no
20214      else
20215        # Do we have a bin/javac?
20216        if test ! -x "$BOOT_JDK/bin/javac"; then
20217          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20218$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20219          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20220$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20221          BOOT_JDK_FOUND=no
20222        else
20223          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20224          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20225            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20226$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20227            BOOT_JDK_FOUND=no
20228          else
20229            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20230            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20231
20232            # Extra M4 quote needed to protect [] in grep expression.
20233            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20234            if test "x$FOUND_CORRECT_VERSION" = x; then
20235              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20236$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20237              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20238$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20239              BOOT_JDK_FOUND=no
20240            else
20241              # We're done! :-)
20242              BOOT_JDK_FOUND=yes
20243
20244  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20245
20246  # Input might be given as Windows format, start by converting to
20247  # unix format.
20248  path="$BOOT_JDK"
20249  new_path=`$CYGPATH -u "$path"`
20250
20251  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20252  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20253  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20254  # "foo.exe" is OK but "foo" is an error.
20255  #
20256  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20257  # It is also a way to make sure we got the proper file name for the real test later on.
20258  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20259  if test "x$test_shortpath" = x; then
20260    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20261$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20262    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20263  fi
20264
20265  # Call helper function which possibly converts this using DOS-style short mode.
20266  # If so, the updated path is stored in $new_path.
20267
20268  input_path="$new_path"
20269  # Check if we need to convert this using DOS-style short mode. If the path
20270  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20271  # take no chances and rewrite it.
20272  # Note: m4 eats our [], so we need to use [ and ] instead.
20273  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20274  if test "x$has_forbidden_chars" != x; then
20275    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20276    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20277    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20278    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20279      # Going to short mode and back again did indeed matter. Since short mode is
20280      # case insensitive, let's make it lowercase to improve readability.
20281      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20282      # Now convert it back to Unix-stile (cygpath)
20283      input_path=`$CYGPATH -u "$shortmode_path"`
20284      new_path="$input_path"
20285    fi
20286  fi
20287
20288  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20289  if test "x$test_cygdrive_prefix" = x; then
20290    # As a simple fix, exclude /usr/bin since it's not a real path.
20291    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20292      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20293      # a path prefixed by /cygdrive for fixpath to work.
20294      new_path="$CYGWIN_ROOT_PATH$input_path"
20295    fi
20296  fi
20297
20298
20299  if test "x$path" != "x$new_path"; then
20300    BOOT_JDK="$new_path"
20301    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20302$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20303  fi
20304
20305  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20306
20307  path="$BOOT_JDK"
20308  has_colon=`$ECHO $path | $GREP ^.:`
20309  new_path="$path"
20310  if test "x$has_colon" = x; then
20311    # Not in mixed or Windows style, start by that.
20312    new_path=`cmd //c echo $path`
20313  fi
20314
20315
20316  input_path="$new_path"
20317  # Check if we need to convert this using DOS-style short mode. If the path
20318  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20319  # take no chances and rewrite it.
20320  # Note: m4 eats our [], so we need to use [ and ] instead.
20321  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20322  if test "x$has_forbidden_chars" != x; then
20323    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20324    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20325  fi
20326
20327
20328  windows_path="$new_path"
20329  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20330    unix_path=`$CYGPATH -u "$windows_path"`
20331    new_path="$unix_path"
20332  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20333    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20334    new_path="$unix_path"
20335  fi
20336
20337  if test "x$path" != "x$new_path"; then
20338    BOOT_JDK="$new_path"
20339    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20340$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20341  fi
20342
20343  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20344  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20345
20346  else
20347    # We're on a unix platform. Hooray! :)
20348    path="$BOOT_JDK"
20349    has_space=`$ECHO "$path" | $GREP " "`
20350    if test "x$has_space" != x; then
20351      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20352$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20353      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20354    fi
20355
20356    # Use eval to expand a potential ~
20357    eval path="$path"
20358    if test ! -f "$path" && test ! -d "$path"; then
20359      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20360    fi
20361
20362    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20363  fi
20364
20365              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20366$as_echo_n "checking for Boot JDK... " >&6; }
20367              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20368$as_echo "$BOOT_JDK" >&6; }
20369              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20370$as_echo_n "checking Boot JDK version... " >&6; }
20371              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20372              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20373$as_echo "$BOOT_JDK_VERSION" >&6; }
20374            fi # end check jdk version
20375          fi # end check rt.jar
20376        fi # end check javac
20377      fi # end check java
20378    fi # end check boot jdk found
20379  fi
20380
20381  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
20382    # Having specified an argument which is incorrect will produce an instant failure;
20383    # we should not go on looking
20384    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
20385  fi
20386
20387  # Test: Is bootjdk available from builddeps?
20388
20389  if test "x$BOOT_JDK_FOUND" = xno; then
20390    # Now execute the test
20391
20392
20393
20394  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
20395    # Source the builddeps file again, to make sure it uses the latest variables!
20396    . $builddepsfile
20397    # Look for a target and build machine specific resource!
20398    eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
20399    if test "x$resource" = x; then
20400      # Ok, lets instead look for a target specific resource
20401      eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
20402    fi
20403    if test "x$resource" = x; then
20404      # Ok, lets instead look for a build specific resource
20405      eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
20406    fi
20407    if test "x$resource" = x; then
20408      # Ok, lets instead look for a generic resource
20409      # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
20410      resource=${builddep_bootjdk}
20411    fi
20412    if test "x$resource" != x; then
20413      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
20414$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
20415      # If the resource in the builddeps.conf file is an existing directory,
20416      # for example /java/linux/cups
20417      if test -d ${resource}; then
20418        depdir=${resource}
20419      else
20420
20421  # bootjdk is for example mymodule
20422  # $resource is for example libs/general/libmymod_1_2_3.zip
20423  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
20424  # $with_builddeps_dir is for example /localhome/builddeps
20425  # depdir is the name of the variable into which we store the depdir, eg MYMOD
20426  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
20427  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
20428  filename=`basename $resource`
20429  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
20430  filebase=${filename%%.*}
20431  extension=${filename#*.}
20432  installdir=$with_builddeps_dir/$filebase
20433  if test ! -f $installdir/$filename.unpacked; then
20434    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
20435$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
20436    if test ! -d $installdir; then
20437      mkdir -p $installdir
20438    fi
20439    if test ! -d $installdir; then
20440      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
20441    fi
20442    tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
20443    touch $tmpfile
20444    if test ! -f $tmpfile; then
20445      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
20446    fi
20447
20448  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
20449  # $tmpfile is the local file name for the downloaded file.
20450  VALID_TOOL=no
20451  if test "x$BDEPS_FTP" = xwget; then
20452    VALID_TOOL=yes
20453    wget -O $tmpfile $with_builddeps_server/$resource
20454  fi
20455  if test "x$BDEPS_FTP" = xlftp; then
20456    VALID_TOOL=yes
20457    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
20458  fi
20459  if test "x$BDEPS_FTP" = xftp; then
20460    VALID_TOOL=yes
20461    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
20462    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
20463    FTPUSERPWD=${FTPSERVER%%@*}
20464    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
20465      FTPUSER=${userpwd%%:*}
20466      FTPPWD=${userpwd#*@}
20467      FTPSERVER=${FTPSERVER#*@}
20468    else
20469      FTPUSER=ftp
20470      FTPPWD=ftp
20471    fi
20472    # the "pass" command does not work on some
20473    # ftp clients (read ftp.exe) but if it works,
20474    # passive mode is better!
20475    ( \
20476        echo "user $FTPUSER $FTPPWD"        ; \
20477        echo "pass"                         ; \
20478        echo "bin"                          ; \
20479        echo "get $FTPPATH $tmpfile"              ; \
20480    ) | ftp -in $FTPSERVER
20481  fi
20482  if test "x$VALID_TOOL" != xyes; then
20483    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
20484  fi
20485
20486    mv $tmpfile $installdir/$filename
20487    if test ! -s $installdir/$filename; then
20488      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
20489    fi
20490    case "$extension" in
20491      zip)  echo "Unzipping $installdir/$filename..."
20492        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
20493        ;;
20494      tar.gz) echo "Untaring $installdir/$filename..."
20495        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20496        ;;
20497      tgz) echo "Untaring $installdir/$filename..."
20498        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20499        ;;
20500      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
20501        ;;
20502    esac
20503  fi
20504  if test -f $installdir/$filename.unpacked; then
20505    depdir=$installdir
20506  fi
20507
20508      fi
20509      # Source the builddeps file again, because in the previous command, the depdir
20510      # was updated to point at the current build dependency install directory.
20511      . $builddepsfile
20512      # Now extract variables from the builddeps.conf files.
20513      theroot=${builddep_bootjdk_ROOT}
20514      thecflags=${builddep_bootjdk_CFLAGS}
20515      thelibs=${builddep_bootjdk_LIBS}
20516      if test "x$depdir" = x; then
20517        as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
20518      fi
20519      BOOT_JDK=$depdir
20520      if test "x$theroot" != x; then
20521        BOOT_JDK="$theroot"
20522      fi
20523      if test "x$thecflags" != x; then
20524        BOOT_JDK_CFLAGS="$thecflags"
20525      fi
20526      if test "x$thelibs" != x; then
20527        BOOT_JDK_LIBS="$thelibs"
20528      fi
20529      BOOT_JDK_FOUND=maybe
20530      else BOOT_JDK_FOUND=no
20531
20532    fi
20533    else BOOT_JDK_FOUND=no
20534
20535  fi
20536
20537
20538
20539    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20540    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20541      # Do we have a bin/java?
20542      if test ! -x "$BOOT_JDK/bin/java"; then
20543        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20544$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20545        BOOT_JDK_FOUND=no
20546      else
20547        # Do we have a bin/javac?
20548        if test ! -x "$BOOT_JDK/bin/javac"; then
20549          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20550$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20551          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20552$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20553          BOOT_JDK_FOUND=no
20554        else
20555          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20556          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20557            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20558$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20559            BOOT_JDK_FOUND=no
20560          else
20561            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20562            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20563
20564            # Extra M4 quote needed to protect [] in grep expression.
20565            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20566            if test "x$FOUND_CORRECT_VERSION" = x; then
20567              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20568$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20569              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20570$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20571              BOOT_JDK_FOUND=no
20572            else
20573              # We're done! :-)
20574              BOOT_JDK_FOUND=yes
20575
20576  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20577
20578  # Input might be given as Windows format, start by converting to
20579  # unix format.
20580  path="$BOOT_JDK"
20581  new_path=`$CYGPATH -u "$path"`
20582
20583  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20584  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20585  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20586  # "foo.exe" is OK but "foo" is an error.
20587  #
20588  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20589  # It is also a way to make sure we got the proper file name for the real test later on.
20590  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20591  if test "x$test_shortpath" = x; then
20592    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20593$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20594    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20595  fi
20596
20597  # Call helper function which possibly converts this using DOS-style short mode.
20598  # If so, the updated path is stored in $new_path.
20599
20600  input_path="$new_path"
20601  # Check if we need to convert this using DOS-style short mode. If the path
20602  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20603  # take no chances and rewrite it.
20604  # Note: m4 eats our [], so we need to use [ and ] instead.
20605  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20606  if test "x$has_forbidden_chars" != x; then
20607    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20608    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20609    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20610    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20611      # Going to short mode and back again did indeed matter. Since short mode is
20612      # case insensitive, let's make it lowercase to improve readability.
20613      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20614      # Now convert it back to Unix-stile (cygpath)
20615      input_path=`$CYGPATH -u "$shortmode_path"`
20616      new_path="$input_path"
20617    fi
20618  fi
20619
20620  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20621  if test "x$test_cygdrive_prefix" = x; then
20622    # As a simple fix, exclude /usr/bin since it's not a real path.
20623    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20624      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20625      # a path prefixed by /cygdrive for fixpath to work.
20626      new_path="$CYGWIN_ROOT_PATH$input_path"
20627    fi
20628  fi
20629
20630
20631  if test "x$path" != "x$new_path"; then
20632    BOOT_JDK="$new_path"
20633    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20634$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20635  fi
20636
20637  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20638
20639  path="$BOOT_JDK"
20640  has_colon=`$ECHO $path | $GREP ^.:`
20641  new_path="$path"
20642  if test "x$has_colon" = x; then
20643    # Not in mixed or Windows style, start by that.
20644    new_path=`cmd //c echo $path`
20645  fi
20646
20647
20648  input_path="$new_path"
20649  # Check if we need to convert this using DOS-style short mode. If the path
20650  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20651  # take no chances and rewrite it.
20652  # Note: m4 eats our [], so we need to use [ and ] instead.
20653  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20654  if test "x$has_forbidden_chars" != x; then
20655    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20656    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20657  fi
20658
20659
20660  windows_path="$new_path"
20661  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20662    unix_path=`$CYGPATH -u "$windows_path"`
20663    new_path="$unix_path"
20664  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20665    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20666    new_path="$unix_path"
20667  fi
20668
20669  if test "x$path" != "x$new_path"; then
20670    BOOT_JDK="$new_path"
20671    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20672$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20673  fi
20674
20675  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20676  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20677
20678  else
20679    # We're on a unix platform. Hooray! :)
20680    path="$BOOT_JDK"
20681    has_space=`$ECHO "$path" | $GREP " "`
20682    if test "x$has_space" != x; then
20683      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20684$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20685      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20686    fi
20687
20688    # Use eval to expand a potential ~
20689    eval path="$path"
20690    if test ! -f "$path" && test ! -d "$path"; then
20691      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20692    fi
20693
20694    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20695  fi
20696
20697              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20698$as_echo_n "checking for Boot JDK... " >&6; }
20699              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20700$as_echo "$BOOT_JDK" >&6; }
20701              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20702$as_echo_n "checking Boot JDK version... " >&6; }
20703              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20704              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20705$as_echo "$BOOT_JDK_VERSION" >&6; }
20706            fi # end check jdk version
20707          fi # end check rt.jar
20708        fi # end check javac
20709      fi # end check java
20710    fi # end check boot jdk found
20711  fi
20712
20713
20714  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
20715
20716  if test "x$BOOT_JDK_FOUND" = xno; then
20717    # Now execute the test
20718
20719  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
20720    # First check at user selected default
20721
20722  if test "x$BOOT_JDK_FOUND" = xno; then
20723    # Now execute the test
20724
20725  if test -x /usr/libexec/java_home; then
20726    BOOT_JDK=`/usr/libexec/java_home `
20727    BOOT_JDK_FOUND=maybe
20728    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
20729$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
20730  fi
20731
20732
20733    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20734    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20735      # Do we have a bin/java?
20736      if test ! -x "$BOOT_JDK/bin/java"; then
20737        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20738$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20739        BOOT_JDK_FOUND=no
20740      else
20741        # Do we have a bin/javac?
20742        if test ! -x "$BOOT_JDK/bin/javac"; then
20743          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20744$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20745          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20746$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20747          BOOT_JDK_FOUND=no
20748        else
20749          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20750          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20751            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20752$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20753            BOOT_JDK_FOUND=no
20754          else
20755            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20756            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20757
20758            # Extra M4 quote needed to protect [] in grep expression.
20759            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20760            if test "x$FOUND_CORRECT_VERSION" = x; then
20761              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20762$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20763              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20764$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20765              BOOT_JDK_FOUND=no
20766            else
20767              # We're done! :-)
20768              BOOT_JDK_FOUND=yes
20769
20770  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20771
20772  # Input might be given as Windows format, start by converting to
20773  # unix format.
20774  path="$BOOT_JDK"
20775  new_path=`$CYGPATH -u "$path"`
20776
20777  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20778  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20779  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20780  # "foo.exe" is OK but "foo" is an error.
20781  #
20782  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20783  # It is also a way to make sure we got the proper file name for the real test later on.
20784  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20785  if test "x$test_shortpath" = x; then
20786    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20787$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20788    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20789  fi
20790
20791  # Call helper function which possibly converts this using DOS-style short mode.
20792  # If so, the updated path is stored in $new_path.
20793
20794  input_path="$new_path"
20795  # Check if we need to convert this using DOS-style short mode. If the path
20796  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20797  # take no chances and rewrite it.
20798  # Note: m4 eats our [], so we need to use [ and ] instead.
20799  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20800  if test "x$has_forbidden_chars" != x; then
20801    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20802    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20803    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20804    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20805      # Going to short mode and back again did indeed matter. Since short mode is
20806      # case insensitive, let's make it lowercase to improve readability.
20807      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20808      # Now convert it back to Unix-stile (cygpath)
20809      input_path=`$CYGPATH -u "$shortmode_path"`
20810      new_path="$input_path"
20811    fi
20812  fi
20813
20814  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20815  if test "x$test_cygdrive_prefix" = x; then
20816    # As a simple fix, exclude /usr/bin since it's not a real path.
20817    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20818      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20819      # a path prefixed by /cygdrive for fixpath to work.
20820      new_path="$CYGWIN_ROOT_PATH$input_path"
20821    fi
20822  fi
20823
20824
20825  if test "x$path" != "x$new_path"; then
20826    BOOT_JDK="$new_path"
20827    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20828$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20829  fi
20830
20831  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20832
20833  path="$BOOT_JDK"
20834  has_colon=`$ECHO $path | $GREP ^.:`
20835  new_path="$path"
20836  if test "x$has_colon" = x; then
20837    # Not in mixed or Windows style, start by that.
20838    new_path=`cmd //c echo $path`
20839  fi
20840
20841
20842  input_path="$new_path"
20843  # Check if we need to convert this using DOS-style short mode. If the path
20844  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20845  # take no chances and rewrite it.
20846  # Note: m4 eats our [], so we need to use [ and ] instead.
20847  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20848  if test "x$has_forbidden_chars" != x; then
20849    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20850    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20851  fi
20852
20853
20854  windows_path="$new_path"
20855  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20856    unix_path=`$CYGPATH -u "$windows_path"`
20857    new_path="$unix_path"
20858  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20859    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20860    new_path="$unix_path"
20861  fi
20862
20863  if test "x$path" != "x$new_path"; then
20864    BOOT_JDK="$new_path"
20865    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20866$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20867  fi
20868
20869  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20870  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20871
20872  else
20873    # We're on a unix platform. Hooray! :)
20874    path="$BOOT_JDK"
20875    has_space=`$ECHO "$path" | $GREP " "`
20876    if test "x$has_space" != x; then
20877      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20878$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20879      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20880    fi
20881
20882    # Use eval to expand a potential ~
20883    eval path="$path"
20884    if test ! -f "$path" && test ! -d "$path"; then
20885      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20886    fi
20887
20888    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20889  fi
20890
20891              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20892$as_echo_n "checking for Boot JDK... " >&6; }
20893              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20894$as_echo "$BOOT_JDK" >&6; }
20895              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20896$as_echo_n "checking Boot JDK version... " >&6; }
20897              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20898              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20899$as_echo "$BOOT_JDK_VERSION" >&6; }
20900            fi # end check jdk version
20901          fi # end check rt.jar
20902        fi # end check javac
20903      fi # end check java
20904    fi # end check boot jdk found
20905  fi
20906
20907    # If that did not work out (e.g. too old), try explicit versions instead
20908
20909  if test "x$BOOT_JDK_FOUND" = xno; then
20910    # Now execute the test
20911
20912  if test -x /usr/libexec/java_home; then
20913    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
20914    BOOT_JDK_FOUND=maybe
20915    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
20916$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
20917  fi
20918
20919
20920    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20921    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20922      # Do we have a bin/java?
20923      if test ! -x "$BOOT_JDK/bin/java"; then
20924        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20925$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20926        BOOT_JDK_FOUND=no
20927      else
20928        # Do we have a bin/javac?
20929        if test ! -x "$BOOT_JDK/bin/javac"; then
20930          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20931$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20932          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20933$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20934          BOOT_JDK_FOUND=no
20935        else
20936          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20937          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20938            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20939$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20940            BOOT_JDK_FOUND=no
20941          else
20942            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20943            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20944
20945            # Extra M4 quote needed to protect [] in grep expression.
20946            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20947            if test "x$FOUND_CORRECT_VERSION" = x; then
20948              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20949$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20950              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20951$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20952              BOOT_JDK_FOUND=no
20953            else
20954              # We're done! :-)
20955              BOOT_JDK_FOUND=yes
20956
20957  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20958
20959  # Input might be given as Windows format, start by converting to
20960  # unix format.
20961  path="$BOOT_JDK"
20962  new_path=`$CYGPATH -u "$path"`
20963
20964  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20965  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20966  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20967  # "foo.exe" is OK but "foo" is an error.
20968  #
20969  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20970  # It is also a way to make sure we got the proper file name for the real test later on.
20971  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20972  if test "x$test_shortpath" = x; then
20973    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20974$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20975    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20976  fi
20977
20978  # Call helper function which possibly converts this using DOS-style short mode.
20979  # If so, the updated path is stored in $new_path.
20980
20981  input_path="$new_path"
20982  # Check if we need to convert this using DOS-style short mode. If the path
20983  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20984  # take no chances and rewrite it.
20985  # Note: m4 eats our [], so we need to use [ and ] instead.
20986  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20987  if test "x$has_forbidden_chars" != x; then
20988    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20989    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20990    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20991    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20992      # Going to short mode and back again did indeed matter. Since short mode is
20993      # case insensitive, let's make it lowercase to improve readability.
20994      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20995      # Now convert it back to Unix-stile (cygpath)
20996      input_path=`$CYGPATH -u "$shortmode_path"`
20997      new_path="$input_path"
20998    fi
20999  fi
21000
21001  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21002  if test "x$test_cygdrive_prefix" = x; then
21003    # As a simple fix, exclude /usr/bin since it's not a real path.
21004    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21005      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21006      # a path prefixed by /cygdrive for fixpath to work.
21007      new_path="$CYGWIN_ROOT_PATH$input_path"
21008    fi
21009  fi
21010
21011
21012  if test "x$path" != "x$new_path"; then
21013    BOOT_JDK="$new_path"
21014    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21015$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21016  fi
21017
21018  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21019
21020  path="$BOOT_JDK"
21021  has_colon=`$ECHO $path | $GREP ^.:`
21022  new_path="$path"
21023  if test "x$has_colon" = x; then
21024    # Not in mixed or Windows style, start by that.
21025    new_path=`cmd //c echo $path`
21026  fi
21027
21028
21029  input_path="$new_path"
21030  # Check if we need to convert this using DOS-style short mode. If the path
21031  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21032  # take no chances and rewrite it.
21033  # Note: m4 eats our [], so we need to use [ and ] instead.
21034  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21035  if test "x$has_forbidden_chars" != x; then
21036    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21037    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21038  fi
21039
21040
21041  windows_path="$new_path"
21042  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21043    unix_path=`$CYGPATH -u "$windows_path"`
21044    new_path="$unix_path"
21045  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21046    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21047    new_path="$unix_path"
21048  fi
21049
21050  if test "x$path" != "x$new_path"; then
21051    BOOT_JDK="$new_path"
21052    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21053$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21054  fi
21055
21056  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21057  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21058
21059  else
21060    # We're on a unix platform. Hooray! :)
21061    path="$BOOT_JDK"
21062    has_space=`$ECHO "$path" | $GREP " "`
21063    if test "x$has_space" != x; then
21064      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21065$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21066      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21067    fi
21068
21069    # Use eval to expand a potential ~
21070    eval path="$path"
21071    if test ! -f "$path" && test ! -d "$path"; then
21072      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21073    fi
21074
21075    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21076  fi
21077
21078              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21079$as_echo_n "checking for Boot JDK... " >&6; }
21080              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21081$as_echo "$BOOT_JDK" >&6; }
21082              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21083$as_echo_n "checking Boot JDK version... " >&6; }
21084              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21085              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21086$as_echo "$BOOT_JDK_VERSION" >&6; }
21087            fi # end check jdk version
21088          fi # end check rt.jar
21089        fi # end check javac
21090      fi # end check java
21091    fi # end check boot jdk found
21092  fi
21093
21094
21095  if test "x$BOOT_JDK_FOUND" = xno; then
21096    # Now execute the test
21097
21098  if test -x /usr/libexec/java_home; then
21099    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
21100    BOOT_JDK_FOUND=maybe
21101    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
21102$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
21103  fi
21104
21105
21106    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21107    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21108      # Do we have a bin/java?
21109      if test ! -x "$BOOT_JDK/bin/java"; then
21110        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21111$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21112        BOOT_JDK_FOUND=no
21113      else
21114        # Do we have a bin/javac?
21115        if test ! -x "$BOOT_JDK/bin/javac"; then
21116          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21117$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21118          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21119$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21120          BOOT_JDK_FOUND=no
21121        else
21122          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21123          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21124            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21125$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21126            BOOT_JDK_FOUND=no
21127          else
21128            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21129            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21130
21131            # Extra M4 quote needed to protect [] in grep expression.
21132            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21133            if test "x$FOUND_CORRECT_VERSION" = x; then
21134              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21135$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21136              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21137$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21138              BOOT_JDK_FOUND=no
21139            else
21140              # We're done! :-)
21141              BOOT_JDK_FOUND=yes
21142
21143  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21144
21145  # Input might be given as Windows format, start by converting to
21146  # unix format.
21147  path="$BOOT_JDK"
21148  new_path=`$CYGPATH -u "$path"`
21149
21150  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21151  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21152  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21153  # "foo.exe" is OK but "foo" is an error.
21154  #
21155  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21156  # It is also a way to make sure we got the proper file name for the real test later on.
21157  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21158  if test "x$test_shortpath" = x; then
21159    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21160$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21161    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21162  fi
21163
21164  # Call helper function which possibly converts this using DOS-style short mode.
21165  # If so, the updated path is stored in $new_path.
21166
21167  input_path="$new_path"
21168  # Check if we need to convert this using DOS-style short mode. If the path
21169  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21170  # take no chances and rewrite it.
21171  # Note: m4 eats our [], so we need to use [ and ] instead.
21172  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21173  if test "x$has_forbidden_chars" != x; then
21174    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21175    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21176    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21177    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21178      # Going to short mode and back again did indeed matter. Since short mode is
21179      # case insensitive, let's make it lowercase to improve readability.
21180      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21181      # Now convert it back to Unix-stile (cygpath)
21182      input_path=`$CYGPATH -u "$shortmode_path"`
21183      new_path="$input_path"
21184    fi
21185  fi
21186
21187  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21188  if test "x$test_cygdrive_prefix" = x; then
21189    # As a simple fix, exclude /usr/bin since it's not a real path.
21190    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21191      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21192      # a path prefixed by /cygdrive for fixpath to work.
21193      new_path="$CYGWIN_ROOT_PATH$input_path"
21194    fi
21195  fi
21196
21197
21198  if test "x$path" != "x$new_path"; then
21199    BOOT_JDK="$new_path"
21200    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21201$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21202  fi
21203
21204  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21205
21206  path="$BOOT_JDK"
21207  has_colon=`$ECHO $path | $GREP ^.:`
21208  new_path="$path"
21209  if test "x$has_colon" = x; then
21210    # Not in mixed or Windows style, start by that.
21211    new_path=`cmd //c echo $path`
21212  fi
21213
21214
21215  input_path="$new_path"
21216  # Check if we need to convert this using DOS-style short mode. If the path
21217  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21218  # take no chances and rewrite it.
21219  # Note: m4 eats our [], so we need to use [ and ] instead.
21220  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21221  if test "x$has_forbidden_chars" != x; then
21222    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21223    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21224  fi
21225
21226
21227  windows_path="$new_path"
21228  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21229    unix_path=`$CYGPATH -u "$windows_path"`
21230    new_path="$unix_path"
21231  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21232    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21233    new_path="$unix_path"
21234  fi
21235
21236  if test "x$path" != "x$new_path"; then
21237    BOOT_JDK="$new_path"
21238    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21239$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21240  fi
21241
21242  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21243  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21244
21245  else
21246    # We're on a unix platform. Hooray! :)
21247    path="$BOOT_JDK"
21248    has_space=`$ECHO "$path" | $GREP " "`
21249    if test "x$has_space" != x; then
21250      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21251$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21252      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21253    fi
21254
21255    # Use eval to expand a potential ~
21256    eval path="$path"
21257    if test ! -f "$path" && test ! -d "$path"; then
21258      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21259    fi
21260
21261    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21262  fi
21263
21264              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21265$as_echo_n "checking for Boot JDK... " >&6; }
21266              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21267$as_echo "$BOOT_JDK" >&6; }
21268              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21269$as_echo_n "checking Boot JDK version... " >&6; }
21270              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21271              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21272$as_echo "$BOOT_JDK_VERSION" >&6; }
21273            fi # end check jdk version
21274          fi # end check rt.jar
21275        fi # end check javac
21276      fi # end check java
21277    fi # end check boot jdk found
21278  fi
21279
21280
21281  if test "x$BOOT_JDK_FOUND" = xno; then
21282    # Now execute the test
21283
21284  if test -x /usr/libexec/java_home; then
21285    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
21286    BOOT_JDK_FOUND=maybe
21287    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
21288$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
21289  fi
21290
21291
21292    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21293    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21294      # Do we have a bin/java?
21295      if test ! -x "$BOOT_JDK/bin/java"; then
21296        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21297$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21298        BOOT_JDK_FOUND=no
21299      else
21300        # Do we have a bin/javac?
21301        if test ! -x "$BOOT_JDK/bin/javac"; then
21302          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21303$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21304          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21305$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21306          BOOT_JDK_FOUND=no
21307        else
21308          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21309          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21310            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21311$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21312            BOOT_JDK_FOUND=no
21313          else
21314            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21315            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21316
21317            # Extra M4 quote needed to protect [] in grep expression.
21318            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21319            if test "x$FOUND_CORRECT_VERSION" = x; then
21320              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21321$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21322              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21323$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21324              BOOT_JDK_FOUND=no
21325            else
21326              # We're done! :-)
21327              BOOT_JDK_FOUND=yes
21328
21329  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21330
21331  # Input might be given as Windows format, start by converting to
21332  # unix format.
21333  path="$BOOT_JDK"
21334  new_path=`$CYGPATH -u "$path"`
21335
21336  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21337  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21338  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21339  # "foo.exe" is OK but "foo" is an error.
21340  #
21341  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21342  # It is also a way to make sure we got the proper file name for the real test later on.
21343  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21344  if test "x$test_shortpath" = x; then
21345    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21346$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21347    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21348  fi
21349
21350  # Call helper function which possibly converts this using DOS-style short mode.
21351  # If so, the updated path is stored in $new_path.
21352
21353  input_path="$new_path"
21354  # Check if we need to convert this using DOS-style short mode. If the path
21355  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21356  # take no chances and rewrite it.
21357  # Note: m4 eats our [], so we need to use [ and ] instead.
21358  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21359  if test "x$has_forbidden_chars" != x; then
21360    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21361    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21362    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21363    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21364      # Going to short mode and back again did indeed matter. Since short mode is
21365      # case insensitive, let's make it lowercase to improve readability.
21366      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21367      # Now convert it back to Unix-stile (cygpath)
21368      input_path=`$CYGPATH -u "$shortmode_path"`
21369      new_path="$input_path"
21370    fi
21371  fi
21372
21373  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21374  if test "x$test_cygdrive_prefix" = x; then
21375    # As a simple fix, exclude /usr/bin since it's not a real path.
21376    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21377      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21378      # a path prefixed by /cygdrive for fixpath to work.
21379      new_path="$CYGWIN_ROOT_PATH$input_path"
21380    fi
21381  fi
21382
21383
21384  if test "x$path" != "x$new_path"; then
21385    BOOT_JDK="$new_path"
21386    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21387$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21388  fi
21389
21390  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21391
21392  path="$BOOT_JDK"
21393  has_colon=`$ECHO $path | $GREP ^.:`
21394  new_path="$path"
21395  if test "x$has_colon" = x; then
21396    # Not in mixed or Windows style, start by that.
21397    new_path=`cmd //c echo $path`
21398  fi
21399
21400
21401  input_path="$new_path"
21402  # Check if we need to convert this using DOS-style short mode. If the path
21403  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21404  # take no chances and rewrite it.
21405  # Note: m4 eats our [], so we need to use [ and ] instead.
21406  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21407  if test "x$has_forbidden_chars" != x; then
21408    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21409    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21410  fi
21411
21412
21413  windows_path="$new_path"
21414  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21415    unix_path=`$CYGPATH -u "$windows_path"`
21416    new_path="$unix_path"
21417  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21418    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21419    new_path="$unix_path"
21420  fi
21421
21422  if test "x$path" != "x$new_path"; then
21423    BOOT_JDK="$new_path"
21424    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21425$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21426  fi
21427
21428  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21429  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21430
21431  else
21432    # We're on a unix platform. Hooray! :)
21433    path="$BOOT_JDK"
21434    has_space=`$ECHO "$path" | $GREP " "`
21435    if test "x$has_space" != x; then
21436      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21437$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21438      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21439    fi
21440
21441    # Use eval to expand a potential ~
21442    eval path="$path"
21443    if test ! -f "$path" && test ! -d "$path"; then
21444      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21445    fi
21446
21447    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21448  fi
21449
21450              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21451$as_echo_n "checking for Boot JDK... " >&6; }
21452              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21453$as_echo "$BOOT_JDK" >&6; }
21454              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21455$as_echo_n "checking Boot JDK version... " >&6; }
21456              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21457              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21458$as_echo "$BOOT_JDK_VERSION" >&6; }
21459            fi # end check jdk version
21460          fi # end check rt.jar
21461        fi # end check javac
21462      fi # end check java
21463    fi # end check boot jdk found
21464  fi
21465
21466  fi
21467
21468
21469    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21470    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21471      # Do we have a bin/java?
21472      if test ! -x "$BOOT_JDK/bin/java"; then
21473        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21474$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21475        BOOT_JDK_FOUND=no
21476      else
21477        # Do we have a bin/javac?
21478        if test ! -x "$BOOT_JDK/bin/javac"; then
21479          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21480$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21481          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21482$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21483          BOOT_JDK_FOUND=no
21484        else
21485          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21486          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21487            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21488$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21489            BOOT_JDK_FOUND=no
21490          else
21491            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21492            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21493
21494            # Extra M4 quote needed to protect [] in grep expression.
21495            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21496            if test "x$FOUND_CORRECT_VERSION" = x; then
21497              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21498$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21499              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21500$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21501              BOOT_JDK_FOUND=no
21502            else
21503              # We're done! :-)
21504              BOOT_JDK_FOUND=yes
21505
21506  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21507
21508  # Input might be given as Windows format, start by converting to
21509  # unix format.
21510  path="$BOOT_JDK"
21511  new_path=`$CYGPATH -u "$path"`
21512
21513  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21514  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21515  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21516  # "foo.exe" is OK but "foo" is an error.
21517  #
21518  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21519  # It is also a way to make sure we got the proper file name for the real test later on.
21520  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21521  if test "x$test_shortpath" = x; then
21522    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21523$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21524    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21525  fi
21526
21527  # Call helper function which possibly converts this using DOS-style short mode.
21528  # If so, the updated path is stored in $new_path.
21529
21530  input_path="$new_path"
21531  # Check if we need to convert this using DOS-style short mode. If the path
21532  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21533  # take no chances and rewrite it.
21534  # Note: m4 eats our [], so we need to use [ and ] instead.
21535  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21536  if test "x$has_forbidden_chars" != x; then
21537    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21538    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21539    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21540    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21541      # Going to short mode and back again did indeed matter. Since short mode is
21542      # case insensitive, let's make it lowercase to improve readability.
21543      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21544      # Now convert it back to Unix-stile (cygpath)
21545      input_path=`$CYGPATH -u "$shortmode_path"`
21546      new_path="$input_path"
21547    fi
21548  fi
21549
21550  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21551  if test "x$test_cygdrive_prefix" = x; then
21552    # As a simple fix, exclude /usr/bin since it's not a real path.
21553    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21554      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21555      # a path prefixed by /cygdrive for fixpath to work.
21556      new_path="$CYGWIN_ROOT_PATH$input_path"
21557    fi
21558  fi
21559
21560
21561  if test "x$path" != "x$new_path"; then
21562    BOOT_JDK="$new_path"
21563    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21564$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21565  fi
21566
21567  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21568
21569  path="$BOOT_JDK"
21570  has_colon=`$ECHO $path | $GREP ^.:`
21571  new_path="$path"
21572  if test "x$has_colon" = x; then
21573    # Not in mixed or Windows style, start by that.
21574    new_path=`cmd //c echo $path`
21575  fi
21576
21577
21578  input_path="$new_path"
21579  # Check if we need to convert this using DOS-style short mode. If the path
21580  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21581  # take no chances and rewrite it.
21582  # Note: m4 eats our [], so we need to use [ and ] instead.
21583  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21584  if test "x$has_forbidden_chars" != x; then
21585    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21586    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21587  fi
21588
21589
21590  windows_path="$new_path"
21591  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21592    unix_path=`$CYGPATH -u "$windows_path"`
21593    new_path="$unix_path"
21594  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21595    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21596    new_path="$unix_path"
21597  fi
21598
21599  if test "x$path" != "x$new_path"; then
21600    BOOT_JDK="$new_path"
21601    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21602$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21603  fi
21604
21605  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21606  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21607
21608  else
21609    # We're on a unix platform. Hooray! :)
21610    path="$BOOT_JDK"
21611    has_space=`$ECHO "$path" | $GREP " "`
21612    if test "x$has_space" != x; then
21613      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21614$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21615      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21616    fi
21617
21618    # Use eval to expand a potential ~
21619    eval path="$path"
21620    if test ! -f "$path" && test ! -d "$path"; then
21621      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21622    fi
21623
21624    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21625  fi
21626
21627              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21628$as_echo_n "checking for Boot JDK... " >&6; }
21629              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21630$as_echo "$BOOT_JDK" >&6; }
21631              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21632$as_echo_n "checking Boot JDK version... " >&6; }
21633              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21634              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21635$as_echo "$BOOT_JDK_VERSION" >&6; }
21636            fi # end check jdk version
21637          fi # end check rt.jar
21638        fi # end check javac
21639      fi # end check java
21640    fi # end check boot jdk found
21641  fi
21642
21643
21644  # Test: Is $JAVA_HOME set?
21645
21646  if test "x$BOOT_JDK_FOUND" = xno; then
21647    # Now execute the test
21648
21649  if test "x$JAVA_HOME" != x; then
21650    JAVA_HOME_PROCESSED="$JAVA_HOME"
21651
21652  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21653
21654  # Input might be given as Windows format, start by converting to
21655  # unix format.
21656  path="$JAVA_HOME_PROCESSED"
21657  new_path=`$CYGPATH -u "$path"`
21658
21659  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21660  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21661  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21662  # "foo.exe" is OK but "foo" is an error.
21663  #
21664  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21665  # It is also a way to make sure we got the proper file name for the real test later on.
21666  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21667  if test "x$test_shortpath" = x; then
21668    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21669$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21670    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
21671  fi
21672
21673  # Call helper function which possibly converts this using DOS-style short mode.
21674  # If so, the updated path is stored in $new_path.
21675
21676  input_path="$new_path"
21677  # Check if we need to convert this using DOS-style short mode. If the path
21678  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21679  # take no chances and rewrite it.
21680  # Note: m4 eats our [], so we need to use [ and ] instead.
21681  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21682  if test "x$has_forbidden_chars" != x; then
21683    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21684    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21685    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21686    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21687      # Going to short mode and back again did indeed matter. Since short mode is
21688      # case insensitive, let's make it lowercase to improve readability.
21689      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21690      # Now convert it back to Unix-stile (cygpath)
21691      input_path=`$CYGPATH -u "$shortmode_path"`
21692      new_path="$input_path"
21693    fi
21694  fi
21695
21696  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21697  if test "x$test_cygdrive_prefix" = x; then
21698    # As a simple fix, exclude /usr/bin since it's not a real path.
21699    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21700      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21701      # a path prefixed by /cygdrive for fixpath to work.
21702      new_path="$CYGWIN_ROOT_PATH$input_path"
21703    fi
21704  fi
21705
21706
21707  if test "x$path" != "x$new_path"; then
21708    JAVA_HOME_PROCESSED="$new_path"
21709    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21710$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21711  fi
21712
21713  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21714
21715  path="$JAVA_HOME_PROCESSED"
21716  has_colon=`$ECHO $path | $GREP ^.:`
21717  new_path="$path"
21718  if test "x$has_colon" = x; then
21719    # Not in mixed or Windows style, start by that.
21720    new_path=`cmd //c echo $path`
21721  fi
21722
21723
21724  input_path="$new_path"
21725  # Check if we need to convert this using DOS-style short mode. If the path
21726  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21727  # take no chances and rewrite it.
21728  # Note: m4 eats our [], so we need to use [ and ] instead.
21729  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21730  if test "x$has_forbidden_chars" != x; then
21731    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21732    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21733  fi
21734
21735
21736  windows_path="$new_path"
21737  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21738    unix_path=`$CYGPATH -u "$windows_path"`
21739    new_path="$unix_path"
21740  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21741    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21742    new_path="$unix_path"
21743  fi
21744
21745  if test "x$path" != "x$new_path"; then
21746    JAVA_HOME_PROCESSED="$new_path"
21747    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21748$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21749  fi
21750
21751  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21752  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21753
21754  else
21755    # We're on a unix platform. Hooray! :)
21756    path="$JAVA_HOME_PROCESSED"
21757    has_space=`$ECHO "$path" | $GREP " "`
21758    if test "x$has_space" != x; then
21759      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21760$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21761      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21762    fi
21763
21764    # Use eval to expand a potential ~
21765    eval path="$path"
21766    if test ! -f "$path" && test ! -d "$path"; then
21767      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
21768    fi
21769
21770    JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
21771  fi
21772
21773    if test ! -d "$JAVA_HOME_PROCESSED"; then
21774      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
21775$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
21776    else
21777      # Aha, the user has set a JAVA_HOME
21778      # let us use that as the Boot JDK.
21779      BOOT_JDK="$JAVA_HOME_PROCESSED"
21780      BOOT_JDK_FOUND=maybe
21781      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
21782$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
21783    fi
21784  fi
21785
21786
21787    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21788    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21789      # Do we have a bin/java?
21790      if test ! -x "$BOOT_JDK/bin/java"; then
21791        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21792$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21793        BOOT_JDK_FOUND=no
21794      else
21795        # Do we have a bin/javac?
21796        if test ! -x "$BOOT_JDK/bin/javac"; then
21797          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21798$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21799          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21800$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21801          BOOT_JDK_FOUND=no
21802        else
21803          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21804          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21805            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21806$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21807            BOOT_JDK_FOUND=no
21808          else
21809            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21810            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21811
21812            # Extra M4 quote needed to protect [] in grep expression.
21813            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21814            if test "x$FOUND_CORRECT_VERSION" = x; then
21815              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21816$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21817              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21818$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21819              BOOT_JDK_FOUND=no
21820            else
21821              # We're done! :-)
21822              BOOT_JDK_FOUND=yes
21823
21824  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21825
21826  # Input might be given as Windows format, start by converting to
21827  # unix format.
21828  path="$BOOT_JDK"
21829  new_path=`$CYGPATH -u "$path"`
21830
21831  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21832  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21833  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21834  # "foo.exe" is OK but "foo" is an error.
21835  #
21836  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21837  # It is also a way to make sure we got the proper file name for the real test later on.
21838  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21839  if test "x$test_shortpath" = x; then
21840    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21841$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21842    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21843  fi
21844
21845  # Call helper function which possibly converts this using DOS-style short mode.
21846  # If so, the updated path is stored in $new_path.
21847
21848  input_path="$new_path"
21849  # Check if we need to convert this using DOS-style short mode. If the path
21850  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21851  # take no chances and rewrite it.
21852  # Note: m4 eats our [], so we need to use [ and ] instead.
21853  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21854  if test "x$has_forbidden_chars" != x; then
21855    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21856    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21857    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21858    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21859      # Going to short mode and back again did indeed matter. Since short mode is
21860      # case insensitive, let's make it lowercase to improve readability.
21861      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21862      # Now convert it back to Unix-stile (cygpath)
21863      input_path=`$CYGPATH -u "$shortmode_path"`
21864      new_path="$input_path"
21865    fi
21866  fi
21867
21868  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21869  if test "x$test_cygdrive_prefix" = x; then
21870    # As a simple fix, exclude /usr/bin since it's not a real path.
21871    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21872      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21873      # a path prefixed by /cygdrive for fixpath to work.
21874      new_path="$CYGWIN_ROOT_PATH$input_path"
21875    fi
21876  fi
21877
21878
21879  if test "x$path" != "x$new_path"; then
21880    BOOT_JDK="$new_path"
21881    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21882$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21883  fi
21884
21885  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21886
21887  path="$BOOT_JDK"
21888  has_colon=`$ECHO $path | $GREP ^.:`
21889  new_path="$path"
21890  if test "x$has_colon" = x; then
21891    # Not in mixed or Windows style, start by that.
21892    new_path=`cmd //c echo $path`
21893  fi
21894
21895
21896  input_path="$new_path"
21897  # Check if we need to convert this using DOS-style short mode. If the path
21898  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21899  # take no chances and rewrite it.
21900  # Note: m4 eats our [], so we need to use [ and ] instead.
21901  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21902  if test "x$has_forbidden_chars" != x; then
21903    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21904    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21905  fi
21906
21907
21908  windows_path="$new_path"
21909  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21910    unix_path=`$CYGPATH -u "$windows_path"`
21911    new_path="$unix_path"
21912  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21913    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21914    new_path="$unix_path"
21915  fi
21916
21917  if test "x$path" != "x$new_path"; then
21918    BOOT_JDK="$new_path"
21919    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21920$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21921  fi
21922
21923  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21924  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21925
21926  else
21927    # We're on a unix platform. Hooray! :)
21928    path="$BOOT_JDK"
21929    has_space=`$ECHO "$path" | $GREP " "`
21930    if test "x$has_space" != x; then
21931      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21932$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21933      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21934    fi
21935
21936    # Use eval to expand a potential ~
21937    eval path="$path"
21938    if test ! -f "$path" && test ! -d "$path"; then
21939      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21940    fi
21941
21942    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21943  fi
21944
21945              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21946$as_echo_n "checking for Boot JDK... " >&6; }
21947              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21948$as_echo "$BOOT_JDK" >&6; }
21949              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21950$as_echo_n "checking Boot JDK version... " >&6; }
21951              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21952              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21953$as_echo "$BOOT_JDK_VERSION" >&6; }
21954            fi # end check jdk version
21955          fi # end check rt.jar
21956        fi # end check javac
21957      fi # end check java
21958    fi # end check boot jdk found
21959  fi
21960
21961
21962  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
21963
21964  if test "x$BOOT_JDK_FOUND" = xno; then
21965    # Now execute the test
21966
21967  # Extract the first word of "javac", so it can be a program name with args.
21968set dummy javac; ac_word=$2
21969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21970$as_echo_n "checking for $ac_word... " >&6; }
21971if ${ac_cv_path_JAVAC_CHECK+:} false; then :
21972  $as_echo_n "(cached) " >&6
21973else
21974  case $JAVAC_CHECK in
21975  [\\/]* | ?:[\\/]*)
21976  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
21977  ;;
21978  *)
21979  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21980for as_dir in $PATH
21981do
21982  IFS=$as_save_IFS
21983  test -z "$as_dir" && as_dir=.
21984    for ac_exec_ext in '' $ac_executable_extensions; do
21985  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21986    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
21987    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21988    break 2
21989  fi
21990done
21991  done
21992IFS=$as_save_IFS
21993
21994  ;;
21995esac
21996fi
21997JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
21998if test -n "$JAVAC_CHECK"; then
21999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
22000$as_echo "$JAVAC_CHECK" >&6; }
22001else
22002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22003$as_echo "no" >&6; }
22004fi
22005
22006
22007  # Extract the first word of "java", so it can be a program name with args.
22008set dummy java; ac_word=$2
22009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22010$as_echo_n "checking for $ac_word... " >&6; }
22011if ${ac_cv_path_JAVA_CHECK+:} false; then :
22012  $as_echo_n "(cached) " >&6
22013else
22014  case $JAVA_CHECK in
22015  [\\/]* | ?:[\\/]*)
22016  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
22017  ;;
22018  *)
22019  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22020for as_dir in $PATH
22021do
22022  IFS=$as_save_IFS
22023  test -z "$as_dir" && as_dir=.
22024    for ac_exec_ext in '' $ac_executable_extensions; do
22025  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22026    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
22027    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22028    break 2
22029  fi
22030done
22031  done
22032IFS=$as_save_IFS
22033
22034  ;;
22035esac
22036fi
22037JAVA_CHECK=$ac_cv_path_JAVA_CHECK
22038if test -n "$JAVA_CHECK"; then
22039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
22040$as_echo "$JAVA_CHECK" >&6; }
22041else
22042  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22043$as_echo "no" >&6; }
22044fi
22045
22046
22047  BINARY="$JAVAC_CHECK"
22048  if test "x$JAVAC_CHECK" = x; then
22049    BINARY="$JAVA_CHECK"
22050  fi
22051  if test "x$BINARY" != x; then
22052    # So there is a java(c) binary, it might be part of a JDK.
22053    # Lets find the JDK/JRE directory by following symbolic links.
22054    # Linux/GNU systems often have links from /usr/bin/java to
22055    # /etc/alternatives/java to the real JDK binary.
22056
22057  if test "x$OPENJDK_BUILD_OS" != xwindows; then
22058    # Follow a chain of symbolic links. Use readlink
22059    # where it exists, else fall back to horribly
22060    # complicated shell code.
22061    if test "x$READLINK_TESTED" != yes; then
22062      # On MacOSX there is a readlink tool with a different
22063      # purpose than the GNU readlink tool. Check the found readlink.
22064      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
22065      if test "x$ISGNU" = x; then
22066        # A readlink that we do not know how to use.
22067        # Are there other non-GNU readlinks out there?
22068        READLINK_TESTED=yes
22069        READLINK=
22070      fi
22071    fi
22072
22073    if test "x$READLINK" != x; then
22074      BINARY=`$READLINK -f $BINARY`
22075    else
22076      # Save the current directory for restoring afterwards
22077      STARTDIR=$PWD
22078      COUNTER=0
22079      sym_link_dir=`$DIRNAME $BINARY`
22080      sym_link_file=`$BASENAME $BINARY`
22081      cd $sym_link_dir
22082      # Use -P flag to resolve symlinks in directories.
22083      cd `$THEPWDCMD -P`
22084      sym_link_dir=`$THEPWDCMD -P`
22085      # Resolve file symlinks
22086      while test $COUNTER -lt 20; do
22087        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
22088        if test "x$ISLINK" == x; then
22089          # This is not a symbolic link! We are done!
22090          break
22091        fi
22092        # Again resolve directory symlinks since the target of the just found
22093        # link could be in a different directory
22094        cd `$DIRNAME $ISLINK`
22095        sym_link_dir=`$THEPWDCMD -P`
22096        sym_link_file=`$BASENAME $ISLINK`
22097        let COUNTER=COUNTER+1
22098      done
22099      cd $STARTDIR
22100      BINARY=$sym_link_dir/$sym_link_file
22101    fi
22102  fi
22103
22104    BOOT_JDK=`dirname "$BINARY"`
22105    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
22106    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
22107      # Looks like we found ourselves an JDK
22108      BOOT_JDK_FOUND=maybe
22109      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
22110$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
22111    fi
22112  fi
22113
22114
22115    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22116    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22117      # Do we have a bin/java?
22118      if test ! -x "$BOOT_JDK/bin/java"; then
22119        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22120$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22121        BOOT_JDK_FOUND=no
22122      else
22123        # Do we have a bin/javac?
22124        if test ! -x "$BOOT_JDK/bin/javac"; then
22125          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22126$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22127          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22128$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22129          BOOT_JDK_FOUND=no
22130        else
22131          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22132          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22133            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22134$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22135            BOOT_JDK_FOUND=no
22136          else
22137            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22138            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22139
22140            # Extra M4 quote needed to protect [] in grep expression.
22141            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22142            if test "x$FOUND_CORRECT_VERSION" = x; then
22143              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22144$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22145              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22146$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22147              BOOT_JDK_FOUND=no
22148            else
22149              # We're done! :-)
22150              BOOT_JDK_FOUND=yes
22151
22152  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22153
22154  # Input might be given as Windows format, start by converting to
22155  # unix format.
22156  path="$BOOT_JDK"
22157  new_path=`$CYGPATH -u "$path"`
22158
22159  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22160  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22161  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22162  # "foo.exe" is OK but "foo" is an error.
22163  #
22164  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22165  # It is also a way to make sure we got the proper file name for the real test later on.
22166  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22167  if test "x$test_shortpath" = x; then
22168    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22169$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22170    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22171  fi
22172
22173  # Call helper function which possibly converts this using DOS-style short mode.
22174  # If so, the updated path is stored in $new_path.
22175
22176  input_path="$new_path"
22177  # Check if we need to convert this using DOS-style short mode. If the path
22178  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22179  # take no chances and rewrite it.
22180  # Note: m4 eats our [], so we need to use [ and ] instead.
22181  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22182  if test "x$has_forbidden_chars" != x; then
22183    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22184    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22185    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22186    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22187      # Going to short mode and back again did indeed matter. Since short mode is
22188      # case insensitive, let's make it lowercase to improve readability.
22189      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22190      # Now convert it back to Unix-stile (cygpath)
22191      input_path=`$CYGPATH -u "$shortmode_path"`
22192      new_path="$input_path"
22193    fi
22194  fi
22195
22196  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22197  if test "x$test_cygdrive_prefix" = x; then
22198    # As a simple fix, exclude /usr/bin since it's not a real path.
22199    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22200      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22201      # a path prefixed by /cygdrive for fixpath to work.
22202      new_path="$CYGWIN_ROOT_PATH$input_path"
22203    fi
22204  fi
22205
22206
22207  if test "x$path" != "x$new_path"; then
22208    BOOT_JDK="$new_path"
22209    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22210$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22211  fi
22212
22213  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22214
22215  path="$BOOT_JDK"
22216  has_colon=`$ECHO $path | $GREP ^.:`
22217  new_path="$path"
22218  if test "x$has_colon" = x; then
22219    # Not in mixed or Windows style, start by that.
22220    new_path=`cmd //c echo $path`
22221  fi
22222
22223
22224  input_path="$new_path"
22225  # Check if we need to convert this using DOS-style short mode. If the path
22226  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22227  # take no chances and rewrite it.
22228  # Note: m4 eats our [], so we need to use [ and ] instead.
22229  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22230  if test "x$has_forbidden_chars" != x; then
22231    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22232    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22233  fi
22234
22235
22236  windows_path="$new_path"
22237  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22238    unix_path=`$CYGPATH -u "$windows_path"`
22239    new_path="$unix_path"
22240  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22241    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22242    new_path="$unix_path"
22243  fi
22244
22245  if test "x$path" != "x$new_path"; then
22246    BOOT_JDK="$new_path"
22247    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22248$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22249  fi
22250
22251  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22252  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22253
22254  else
22255    # We're on a unix platform. Hooray! :)
22256    path="$BOOT_JDK"
22257    has_space=`$ECHO "$path" | $GREP " "`
22258    if test "x$has_space" != x; then
22259      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22260$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22261      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22262    fi
22263
22264    # Use eval to expand a potential ~
22265    eval path="$path"
22266    if test ! -f "$path" && test ! -d "$path"; then
22267      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22268    fi
22269
22270    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22271  fi
22272
22273              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22274$as_echo_n "checking for Boot JDK... " >&6; }
22275              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22276$as_echo "$BOOT_JDK" >&6; }
22277              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22278$as_echo_n "checking Boot JDK version... " >&6; }
22279              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22280              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22281$as_echo "$BOOT_JDK_VERSION" >&6; }
22282            fi # end check jdk version
22283          fi # end check rt.jar
22284        fi # end check javac
22285      fi # end check java
22286    fi # end check boot jdk found
22287  fi
22288
22289
22290  # Test: Is there a JDK installed in default, well-known locations?
22291
22292  if test "x$BOOT_JDK_FOUND" = xno; then
22293    # Now execute the test
22294
22295  if test "x$OPENJDK_TARGET_OS" = xwindows; then
22296
22297  if test "x$BOOT_JDK_FOUND" = xno; then
22298    # Now execute the test
22299
22300  if test "x$ProgramW6432" != x; then
22301    VIRTUAL_DIR="$ProgramW6432/Java"
22302
22303  windows_path="$VIRTUAL_DIR"
22304  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22305    unix_path=`$CYGPATH -u "$windows_path"`
22306    VIRTUAL_DIR="$unix_path"
22307  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22308    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22309    VIRTUAL_DIR="$unix_path"
22310  fi
22311
22312
22313  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22314  BOOT_JDK_SUFFIX=""
22315  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22316  if test "x$ALL_JDKS_FOUND" != x; then
22317    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22318
22319  if test "x$BOOT_JDK_FOUND" = xno; then
22320    # Now execute the test
22321
22322        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22323        if test -d "$BOOT_JDK"; then
22324          BOOT_JDK_FOUND=maybe
22325          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22326$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22327        fi
22328
22329
22330    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22331    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22332      # Do we have a bin/java?
22333      if test ! -x "$BOOT_JDK/bin/java"; then
22334        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22335$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22336        BOOT_JDK_FOUND=no
22337      else
22338        # Do we have a bin/javac?
22339        if test ! -x "$BOOT_JDK/bin/javac"; then
22340          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22341$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22342          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22343$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22344          BOOT_JDK_FOUND=no
22345        else
22346          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22347          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22348            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22349$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22350            BOOT_JDK_FOUND=no
22351          else
22352            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22353            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22354
22355            # Extra M4 quote needed to protect [] in grep expression.
22356            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22357            if test "x$FOUND_CORRECT_VERSION" = x; then
22358              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22359$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22360              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22361$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22362              BOOT_JDK_FOUND=no
22363            else
22364              # We're done! :-)
22365              BOOT_JDK_FOUND=yes
22366
22367  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22368
22369  # Input might be given as Windows format, start by converting to
22370  # unix format.
22371  path="$BOOT_JDK"
22372  new_path=`$CYGPATH -u "$path"`
22373
22374  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22375  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22376  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22377  # "foo.exe" is OK but "foo" is an error.
22378  #
22379  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22380  # It is also a way to make sure we got the proper file name for the real test later on.
22381  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22382  if test "x$test_shortpath" = x; then
22383    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22384$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22385    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22386  fi
22387
22388  # Call helper function which possibly converts this using DOS-style short mode.
22389  # If so, the updated path is stored in $new_path.
22390
22391  input_path="$new_path"
22392  # Check if we need to convert this using DOS-style short mode. If the path
22393  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22394  # take no chances and rewrite it.
22395  # Note: m4 eats our [], so we need to use [ and ] instead.
22396  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22397  if test "x$has_forbidden_chars" != x; then
22398    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22399    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22400    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22401    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22402      # Going to short mode and back again did indeed matter. Since short mode is
22403      # case insensitive, let's make it lowercase to improve readability.
22404      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22405      # Now convert it back to Unix-stile (cygpath)
22406      input_path=`$CYGPATH -u "$shortmode_path"`
22407      new_path="$input_path"
22408    fi
22409  fi
22410
22411  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22412  if test "x$test_cygdrive_prefix" = x; then
22413    # As a simple fix, exclude /usr/bin since it's not a real path.
22414    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22415      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22416      # a path prefixed by /cygdrive for fixpath to work.
22417      new_path="$CYGWIN_ROOT_PATH$input_path"
22418    fi
22419  fi
22420
22421
22422  if test "x$path" != "x$new_path"; then
22423    BOOT_JDK="$new_path"
22424    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22425$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22426  fi
22427
22428  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22429
22430  path="$BOOT_JDK"
22431  has_colon=`$ECHO $path | $GREP ^.:`
22432  new_path="$path"
22433  if test "x$has_colon" = x; then
22434    # Not in mixed or Windows style, start by that.
22435    new_path=`cmd //c echo $path`
22436  fi
22437
22438
22439  input_path="$new_path"
22440  # Check if we need to convert this using DOS-style short mode. If the path
22441  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22442  # take no chances and rewrite it.
22443  # Note: m4 eats our [], so we need to use [ and ] instead.
22444  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22445  if test "x$has_forbidden_chars" != x; then
22446    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22447    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22448  fi
22449
22450
22451  windows_path="$new_path"
22452  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22453    unix_path=`$CYGPATH -u "$windows_path"`
22454    new_path="$unix_path"
22455  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22456    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22457    new_path="$unix_path"
22458  fi
22459
22460  if test "x$path" != "x$new_path"; then
22461    BOOT_JDK="$new_path"
22462    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22463$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22464  fi
22465
22466  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22467  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22468
22469  else
22470    # We're on a unix platform. Hooray! :)
22471    path="$BOOT_JDK"
22472    has_space=`$ECHO "$path" | $GREP " "`
22473    if test "x$has_space" != x; then
22474      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22475$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22476      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22477    fi
22478
22479    # Use eval to expand a potential ~
22480    eval path="$path"
22481    if test ! -f "$path" && test ! -d "$path"; then
22482      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22483    fi
22484
22485    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22486  fi
22487
22488              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22489$as_echo_n "checking for Boot JDK... " >&6; }
22490              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22491$as_echo "$BOOT_JDK" >&6; }
22492              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22493$as_echo_n "checking Boot JDK version... " >&6; }
22494              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22495              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22496$as_echo "$BOOT_JDK_VERSION" >&6; }
22497            fi # end check jdk version
22498          fi # end check rt.jar
22499        fi # end check javac
22500      fi # end check java
22501    fi # end check boot jdk found
22502  fi
22503
22504    done
22505  fi
22506
22507  fi
22508
22509
22510    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22511    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22512      # Do we have a bin/java?
22513      if test ! -x "$BOOT_JDK/bin/java"; then
22514        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22515$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22516        BOOT_JDK_FOUND=no
22517      else
22518        # Do we have a bin/javac?
22519        if test ! -x "$BOOT_JDK/bin/javac"; then
22520          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22521$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22522          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22523$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22524          BOOT_JDK_FOUND=no
22525        else
22526          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22527          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22528            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22529$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22530            BOOT_JDK_FOUND=no
22531          else
22532            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22533            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22534
22535            # Extra M4 quote needed to protect [] in grep expression.
22536            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22537            if test "x$FOUND_CORRECT_VERSION" = x; then
22538              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22539$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22540              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22541$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22542              BOOT_JDK_FOUND=no
22543            else
22544              # We're done! :-)
22545              BOOT_JDK_FOUND=yes
22546
22547  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22548
22549  # Input might be given as Windows format, start by converting to
22550  # unix format.
22551  path="$BOOT_JDK"
22552  new_path=`$CYGPATH -u "$path"`
22553
22554  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22555  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22556  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22557  # "foo.exe" is OK but "foo" is an error.
22558  #
22559  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22560  # It is also a way to make sure we got the proper file name for the real test later on.
22561  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22562  if test "x$test_shortpath" = x; then
22563    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22564$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22565    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22566  fi
22567
22568  # Call helper function which possibly converts this using DOS-style short mode.
22569  # If so, the updated path is stored in $new_path.
22570
22571  input_path="$new_path"
22572  # Check if we need to convert this using DOS-style short mode. If the path
22573  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22574  # take no chances and rewrite it.
22575  # Note: m4 eats our [], so we need to use [ and ] instead.
22576  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22577  if test "x$has_forbidden_chars" != x; then
22578    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22579    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22580    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22581    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22582      # Going to short mode and back again did indeed matter. Since short mode is
22583      # case insensitive, let's make it lowercase to improve readability.
22584      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22585      # Now convert it back to Unix-stile (cygpath)
22586      input_path=`$CYGPATH -u "$shortmode_path"`
22587      new_path="$input_path"
22588    fi
22589  fi
22590
22591  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22592  if test "x$test_cygdrive_prefix" = x; then
22593    # As a simple fix, exclude /usr/bin since it's not a real path.
22594    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22595      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22596      # a path prefixed by /cygdrive for fixpath to work.
22597      new_path="$CYGWIN_ROOT_PATH$input_path"
22598    fi
22599  fi
22600
22601
22602  if test "x$path" != "x$new_path"; then
22603    BOOT_JDK="$new_path"
22604    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22605$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22606  fi
22607
22608  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22609
22610  path="$BOOT_JDK"
22611  has_colon=`$ECHO $path | $GREP ^.:`
22612  new_path="$path"
22613  if test "x$has_colon" = x; then
22614    # Not in mixed or Windows style, start by that.
22615    new_path=`cmd //c echo $path`
22616  fi
22617
22618
22619  input_path="$new_path"
22620  # Check if we need to convert this using DOS-style short mode. If the path
22621  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22622  # take no chances and rewrite it.
22623  # Note: m4 eats our [], so we need to use [ and ] instead.
22624  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22625  if test "x$has_forbidden_chars" != x; then
22626    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22627    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22628  fi
22629
22630
22631  windows_path="$new_path"
22632  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22633    unix_path=`$CYGPATH -u "$windows_path"`
22634    new_path="$unix_path"
22635  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22636    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22637    new_path="$unix_path"
22638  fi
22639
22640  if test "x$path" != "x$new_path"; then
22641    BOOT_JDK="$new_path"
22642    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22643$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22644  fi
22645
22646  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22647  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22648
22649  else
22650    # We're on a unix platform. Hooray! :)
22651    path="$BOOT_JDK"
22652    has_space=`$ECHO "$path" | $GREP " "`
22653    if test "x$has_space" != x; then
22654      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22655$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22656      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22657    fi
22658
22659    # Use eval to expand a potential ~
22660    eval path="$path"
22661    if test ! -f "$path" && test ! -d "$path"; then
22662      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22663    fi
22664
22665    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22666  fi
22667
22668              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22669$as_echo_n "checking for Boot JDK... " >&6; }
22670              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22671$as_echo "$BOOT_JDK" >&6; }
22672              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22673$as_echo_n "checking Boot JDK version... " >&6; }
22674              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22675              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22676$as_echo "$BOOT_JDK_VERSION" >&6; }
22677            fi # end check jdk version
22678          fi # end check rt.jar
22679        fi # end check javac
22680      fi # end check java
22681    fi # end check boot jdk found
22682  fi
22683
22684
22685  if test "x$BOOT_JDK_FOUND" = xno; then
22686    # Now execute the test
22687
22688  if test "x$PROGRAMW6432" != x; then
22689    VIRTUAL_DIR="$PROGRAMW6432/Java"
22690
22691  windows_path="$VIRTUAL_DIR"
22692  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22693    unix_path=`$CYGPATH -u "$windows_path"`
22694    VIRTUAL_DIR="$unix_path"
22695  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22696    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22697    VIRTUAL_DIR="$unix_path"
22698  fi
22699
22700
22701  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22702  BOOT_JDK_SUFFIX=""
22703  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22704  if test "x$ALL_JDKS_FOUND" != x; then
22705    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22706
22707  if test "x$BOOT_JDK_FOUND" = xno; then
22708    # Now execute the test
22709
22710        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22711        if test -d "$BOOT_JDK"; then
22712          BOOT_JDK_FOUND=maybe
22713          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22714$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22715        fi
22716
22717
22718    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22719    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22720      # Do we have a bin/java?
22721      if test ! -x "$BOOT_JDK/bin/java"; then
22722        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22723$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22724        BOOT_JDK_FOUND=no
22725      else
22726        # Do we have a bin/javac?
22727        if test ! -x "$BOOT_JDK/bin/javac"; then
22728          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22729$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22730          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22731$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22732          BOOT_JDK_FOUND=no
22733        else
22734          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22735          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22736            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22737$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22738            BOOT_JDK_FOUND=no
22739          else
22740            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22741            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22742
22743            # Extra M4 quote needed to protect [] in grep expression.
22744            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22745            if test "x$FOUND_CORRECT_VERSION" = x; then
22746              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22747$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22748              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22749$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22750              BOOT_JDK_FOUND=no
22751            else
22752              # We're done! :-)
22753              BOOT_JDK_FOUND=yes
22754
22755  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22756
22757  # Input might be given as Windows format, start by converting to
22758  # unix format.
22759  path="$BOOT_JDK"
22760  new_path=`$CYGPATH -u "$path"`
22761
22762  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22763  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22764  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22765  # "foo.exe" is OK but "foo" is an error.
22766  #
22767  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22768  # It is also a way to make sure we got the proper file name for the real test later on.
22769  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22770  if test "x$test_shortpath" = x; then
22771    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22772$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22773    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22774  fi
22775
22776  # Call helper function which possibly converts this using DOS-style short mode.
22777  # If so, the updated path is stored in $new_path.
22778
22779  input_path="$new_path"
22780  # Check if we need to convert this using DOS-style short mode. If the path
22781  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22782  # take no chances and rewrite it.
22783  # Note: m4 eats our [], so we need to use [ and ] instead.
22784  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22785  if test "x$has_forbidden_chars" != x; then
22786    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22787    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22788    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22789    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22790      # Going to short mode and back again did indeed matter. Since short mode is
22791      # case insensitive, let's make it lowercase to improve readability.
22792      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22793      # Now convert it back to Unix-stile (cygpath)
22794      input_path=`$CYGPATH -u "$shortmode_path"`
22795      new_path="$input_path"
22796    fi
22797  fi
22798
22799  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22800  if test "x$test_cygdrive_prefix" = x; then
22801    # As a simple fix, exclude /usr/bin since it's not a real path.
22802    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22803      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22804      # a path prefixed by /cygdrive for fixpath to work.
22805      new_path="$CYGWIN_ROOT_PATH$input_path"
22806    fi
22807  fi
22808
22809
22810  if test "x$path" != "x$new_path"; then
22811    BOOT_JDK="$new_path"
22812    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22813$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22814  fi
22815
22816  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22817
22818  path="$BOOT_JDK"
22819  has_colon=`$ECHO $path | $GREP ^.:`
22820  new_path="$path"
22821  if test "x$has_colon" = x; then
22822    # Not in mixed or Windows style, start by that.
22823    new_path=`cmd //c echo $path`
22824  fi
22825
22826
22827  input_path="$new_path"
22828  # Check if we need to convert this using DOS-style short mode. If the path
22829  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22830  # take no chances and rewrite it.
22831  # Note: m4 eats our [], so we need to use [ and ] instead.
22832  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22833  if test "x$has_forbidden_chars" != x; then
22834    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22835    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22836  fi
22837
22838
22839  windows_path="$new_path"
22840  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22841    unix_path=`$CYGPATH -u "$windows_path"`
22842    new_path="$unix_path"
22843  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22844    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22845    new_path="$unix_path"
22846  fi
22847
22848  if test "x$path" != "x$new_path"; then
22849    BOOT_JDK="$new_path"
22850    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22851$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22852  fi
22853
22854  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22855  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22856
22857  else
22858    # We're on a unix platform. Hooray! :)
22859    path="$BOOT_JDK"
22860    has_space=`$ECHO "$path" | $GREP " "`
22861    if test "x$has_space" != x; then
22862      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22863$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22864      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22865    fi
22866
22867    # Use eval to expand a potential ~
22868    eval path="$path"
22869    if test ! -f "$path" && test ! -d "$path"; then
22870      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22871    fi
22872
22873    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22874  fi
22875
22876              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22877$as_echo_n "checking for Boot JDK... " >&6; }
22878              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22879$as_echo "$BOOT_JDK" >&6; }
22880              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22881$as_echo_n "checking Boot JDK version... " >&6; }
22882              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22883              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22884$as_echo "$BOOT_JDK_VERSION" >&6; }
22885            fi # end check jdk version
22886          fi # end check rt.jar
22887        fi # end check javac
22888      fi # end check java
22889    fi # end check boot jdk found
22890  fi
22891
22892    done
22893  fi
22894
22895  fi
22896
22897
22898    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22899    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22900      # Do we have a bin/java?
22901      if test ! -x "$BOOT_JDK/bin/java"; then
22902        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22903$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22904        BOOT_JDK_FOUND=no
22905      else
22906        # Do we have a bin/javac?
22907        if test ! -x "$BOOT_JDK/bin/javac"; then
22908          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22909$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22910          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22911$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22912          BOOT_JDK_FOUND=no
22913        else
22914          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22915          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22916            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22917$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22918            BOOT_JDK_FOUND=no
22919          else
22920            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22921            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22922
22923            # Extra M4 quote needed to protect [] in grep expression.
22924            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22925            if test "x$FOUND_CORRECT_VERSION" = x; then
22926              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22927$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22928              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22929$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22930              BOOT_JDK_FOUND=no
22931            else
22932              # We're done! :-)
22933              BOOT_JDK_FOUND=yes
22934
22935  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22936
22937  # Input might be given as Windows format, start by converting to
22938  # unix format.
22939  path="$BOOT_JDK"
22940  new_path=`$CYGPATH -u "$path"`
22941
22942  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22943  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22944  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22945  # "foo.exe" is OK but "foo" is an error.
22946  #
22947  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22948  # It is also a way to make sure we got the proper file name for the real test later on.
22949  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22950  if test "x$test_shortpath" = x; then
22951    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22952$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22953    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22954  fi
22955
22956  # Call helper function which possibly converts this using DOS-style short mode.
22957  # If so, the updated path is stored in $new_path.
22958
22959  input_path="$new_path"
22960  # Check if we need to convert this using DOS-style short mode. If the path
22961  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22962  # take no chances and rewrite it.
22963  # Note: m4 eats our [], so we need to use [ and ] instead.
22964  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22965  if test "x$has_forbidden_chars" != x; then
22966    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22967    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22968    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22969    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22970      # Going to short mode and back again did indeed matter. Since short mode is
22971      # case insensitive, let's make it lowercase to improve readability.
22972      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22973      # Now convert it back to Unix-stile (cygpath)
22974      input_path=`$CYGPATH -u "$shortmode_path"`
22975      new_path="$input_path"
22976    fi
22977  fi
22978
22979  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22980  if test "x$test_cygdrive_prefix" = x; then
22981    # As a simple fix, exclude /usr/bin since it's not a real path.
22982    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22983      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22984      # a path prefixed by /cygdrive for fixpath to work.
22985      new_path="$CYGWIN_ROOT_PATH$input_path"
22986    fi
22987  fi
22988
22989
22990  if test "x$path" != "x$new_path"; then
22991    BOOT_JDK="$new_path"
22992    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22993$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22994  fi
22995
22996  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22997
22998  path="$BOOT_JDK"
22999  has_colon=`$ECHO $path | $GREP ^.:`
23000  new_path="$path"
23001  if test "x$has_colon" = x; then
23002    # Not in mixed or Windows style, start by that.
23003    new_path=`cmd //c echo $path`
23004  fi
23005
23006
23007  input_path="$new_path"
23008  # Check if we need to convert this using DOS-style short mode. If the path
23009  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23010  # take no chances and rewrite it.
23011  # Note: m4 eats our [], so we need to use [ and ] instead.
23012  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23013  if test "x$has_forbidden_chars" != x; then
23014    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23015    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23016  fi
23017
23018
23019  windows_path="$new_path"
23020  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23021    unix_path=`$CYGPATH -u "$windows_path"`
23022    new_path="$unix_path"
23023  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23024    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23025    new_path="$unix_path"
23026  fi
23027
23028  if test "x$path" != "x$new_path"; then
23029    BOOT_JDK="$new_path"
23030    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23031$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23032  fi
23033
23034  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23035  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23036
23037  else
23038    # We're on a unix platform. Hooray! :)
23039    path="$BOOT_JDK"
23040    has_space=`$ECHO "$path" | $GREP " "`
23041    if test "x$has_space" != x; then
23042      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23043$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23044      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23045    fi
23046
23047    # Use eval to expand a potential ~
23048    eval path="$path"
23049    if test ! -f "$path" && test ! -d "$path"; then
23050      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23051    fi
23052
23053    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23054  fi
23055
23056              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23057$as_echo_n "checking for Boot JDK... " >&6; }
23058              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23059$as_echo "$BOOT_JDK" >&6; }
23060              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23061$as_echo_n "checking Boot JDK version... " >&6; }
23062              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23063              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23064$as_echo "$BOOT_JDK_VERSION" >&6; }
23065            fi # end check jdk version
23066          fi # end check rt.jar
23067        fi # end check javac
23068      fi # end check java
23069    fi # end check boot jdk found
23070  fi
23071
23072
23073  if test "x$BOOT_JDK_FOUND" = xno; then
23074    # Now execute the test
23075
23076  if test "x$PROGRAMFILES" != x; then
23077    VIRTUAL_DIR="$PROGRAMFILES/Java"
23078
23079  windows_path="$VIRTUAL_DIR"
23080  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23081    unix_path=`$CYGPATH -u "$windows_path"`
23082    VIRTUAL_DIR="$unix_path"
23083  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23084    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23085    VIRTUAL_DIR="$unix_path"
23086  fi
23087
23088
23089  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23090  BOOT_JDK_SUFFIX=""
23091  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23092  if test "x$ALL_JDKS_FOUND" != x; then
23093    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23094
23095  if test "x$BOOT_JDK_FOUND" = xno; then
23096    # Now execute the test
23097
23098        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23099        if test -d "$BOOT_JDK"; then
23100          BOOT_JDK_FOUND=maybe
23101          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23102$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23103        fi
23104
23105
23106    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23107    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23108      # Do we have a bin/java?
23109      if test ! -x "$BOOT_JDK/bin/java"; then
23110        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23111$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23112        BOOT_JDK_FOUND=no
23113      else
23114        # Do we have a bin/javac?
23115        if test ! -x "$BOOT_JDK/bin/javac"; then
23116          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23117$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23118          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23119$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23120          BOOT_JDK_FOUND=no
23121        else
23122          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23123          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23124            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23125$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23126            BOOT_JDK_FOUND=no
23127          else
23128            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23129            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23130
23131            # Extra M4 quote needed to protect [] in grep expression.
23132            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23133            if test "x$FOUND_CORRECT_VERSION" = x; then
23134              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23135$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23136              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23137$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23138              BOOT_JDK_FOUND=no
23139            else
23140              # We're done! :-)
23141              BOOT_JDK_FOUND=yes
23142
23143  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23144
23145  # Input might be given as Windows format, start by converting to
23146  # unix format.
23147  path="$BOOT_JDK"
23148  new_path=`$CYGPATH -u "$path"`
23149
23150  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23151  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23152  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23153  # "foo.exe" is OK but "foo" is an error.
23154  #
23155  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23156  # It is also a way to make sure we got the proper file name for the real test later on.
23157  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23158  if test "x$test_shortpath" = x; then
23159    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23160$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23161    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23162  fi
23163
23164  # Call helper function which possibly converts this using DOS-style short mode.
23165  # If so, the updated path is stored in $new_path.
23166
23167  input_path="$new_path"
23168  # Check if we need to convert this using DOS-style short mode. If the path
23169  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23170  # take no chances and rewrite it.
23171  # Note: m4 eats our [], so we need to use [ and ] instead.
23172  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23173  if test "x$has_forbidden_chars" != x; then
23174    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23175    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23176    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23177    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23178      # Going to short mode and back again did indeed matter. Since short mode is
23179      # case insensitive, let's make it lowercase to improve readability.
23180      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23181      # Now convert it back to Unix-stile (cygpath)
23182      input_path=`$CYGPATH -u "$shortmode_path"`
23183      new_path="$input_path"
23184    fi
23185  fi
23186
23187  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23188  if test "x$test_cygdrive_prefix" = x; then
23189    # As a simple fix, exclude /usr/bin since it's not a real path.
23190    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23191      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23192      # a path prefixed by /cygdrive for fixpath to work.
23193      new_path="$CYGWIN_ROOT_PATH$input_path"
23194    fi
23195  fi
23196
23197
23198  if test "x$path" != "x$new_path"; then
23199    BOOT_JDK="$new_path"
23200    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23201$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23202  fi
23203
23204  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23205
23206  path="$BOOT_JDK"
23207  has_colon=`$ECHO $path | $GREP ^.:`
23208  new_path="$path"
23209  if test "x$has_colon" = x; then
23210    # Not in mixed or Windows style, start by that.
23211    new_path=`cmd //c echo $path`
23212  fi
23213
23214
23215  input_path="$new_path"
23216  # Check if we need to convert this using DOS-style short mode. If the path
23217  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23218  # take no chances and rewrite it.
23219  # Note: m4 eats our [], so we need to use [ and ] instead.
23220  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23221  if test "x$has_forbidden_chars" != x; then
23222    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23223    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23224  fi
23225
23226
23227  windows_path="$new_path"
23228  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23229    unix_path=`$CYGPATH -u "$windows_path"`
23230    new_path="$unix_path"
23231  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23232    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23233    new_path="$unix_path"
23234  fi
23235
23236  if test "x$path" != "x$new_path"; then
23237    BOOT_JDK="$new_path"
23238    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23239$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23240  fi
23241
23242  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23243  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23244
23245  else
23246    # We're on a unix platform. Hooray! :)
23247    path="$BOOT_JDK"
23248    has_space=`$ECHO "$path" | $GREP " "`
23249    if test "x$has_space" != x; then
23250      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23251$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23252      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23253    fi
23254
23255    # Use eval to expand a potential ~
23256    eval path="$path"
23257    if test ! -f "$path" && test ! -d "$path"; then
23258      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23259    fi
23260
23261    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23262  fi
23263
23264              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23265$as_echo_n "checking for Boot JDK... " >&6; }
23266              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23267$as_echo "$BOOT_JDK" >&6; }
23268              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23269$as_echo_n "checking Boot JDK version... " >&6; }
23270              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23271              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23272$as_echo "$BOOT_JDK_VERSION" >&6; }
23273            fi # end check jdk version
23274          fi # end check rt.jar
23275        fi # end check javac
23276      fi # end check java
23277    fi # end check boot jdk found
23278  fi
23279
23280    done
23281  fi
23282
23283  fi
23284
23285
23286    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23287    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23288      # Do we have a bin/java?
23289      if test ! -x "$BOOT_JDK/bin/java"; then
23290        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23291$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23292        BOOT_JDK_FOUND=no
23293      else
23294        # Do we have a bin/javac?
23295        if test ! -x "$BOOT_JDK/bin/javac"; then
23296          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23297$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23298          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23299$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23300          BOOT_JDK_FOUND=no
23301        else
23302          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23303          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23304            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23305$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23306            BOOT_JDK_FOUND=no
23307          else
23308            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23309            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23310
23311            # Extra M4 quote needed to protect [] in grep expression.
23312            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23313            if test "x$FOUND_CORRECT_VERSION" = x; then
23314              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23315$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23316              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23317$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23318              BOOT_JDK_FOUND=no
23319            else
23320              # We're done! :-)
23321              BOOT_JDK_FOUND=yes
23322
23323  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23324
23325  # Input might be given as Windows format, start by converting to
23326  # unix format.
23327  path="$BOOT_JDK"
23328  new_path=`$CYGPATH -u "$path"`
23329
23330  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23331  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23332  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23333  # "foo.exe" is OK but "foo" is an error.
23334  #
23335  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23336  # It is also a way to make sure we got the proper file name for the real test later on.
23337  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23338  if test "x$test_shortpath" = x; then
23339    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23340$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23341    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23342  fi
23343
23344  # Call helper function which possibly converts this using DOS-style short mode.
23345  # If so, the updated path is stored in $new_path.
23346
23347  input_path="$new_path"
23348  # Check if we need to convert this using DOS-style short mode. If the path
23349  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23350  # take no chances and rewrite it.
23351  # Note: m4 eats our [], so we need to use [ and ] instead.
23352  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23353  if test "x$has_forbidden_chars" != x; then
23354    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23355    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23356    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23357    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23358      # Going to short mode and back again did indeed matter. Since short mode is
23359      # case insensitive, let's make it lowercase to improve readability.
23360      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23361      # Now convert it back to Unix-stile (cygpath)
23362      input_path=`$CYGPATH -u "$shortmode_path"`
23363      new_path="$input_path"
23364    fi
23365  fi
23366
23367  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23368  if test "x$test_cygdrive_prefix" = x; then
23369    # As a simple fix, exclude /usr/bin since it's not a real path.
23370    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23371      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23372      # a path prefixed by /cygdrive for fixpath to work.
23373      new_path="$CYGWIN_ROOT_PATH$input_path"
23374    fi
23375  fi
23376
23377
23378  if test "x$path" != "x$new_path"; then
23379    BOOT_JDK="$new_path"
23380    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23381$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23382  fi
23383
23384  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23385
23386  path="$BOOT_JDK"
23387  has_colon=`$ECHO $path | $GREP ^.:`
23388  new_path="$path"
23389  if test "x$has_colon" = x; then
23390    # Not in mixed or Windows style, start by that.
23391    new_path=`cmd //c echo $path`
23392  fi
23393
23394
23395  input_path="$new_path"
23396  # Check if we need to convert this using DOS-style short mode. If the path
23397  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23398  # take no chances and rewrite it.
23399  # Note: m4 eats our [], so we need to use [ and ] instead.
23400  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23401  if test "x$has_forbidden_chars" != x; then
23402    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23403    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23404  fi
23405
23406
23407  windows_path="$new_path"
23408  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23409    unix_path=`$CYGPATH -u "$windows_path"`
23410    new_path="$unix_path"
23411  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23412    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23413    new_path="$unix_path"
23414  fi
23415
23416  if test "x$path" != "x$new_path"; then
23417    BOOT_JDK="$new_path"
23418    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23419$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23420  fi
23421
23422  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23423  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23424
23425  else
23426    # We're on a unix platform. Hooray! :)
23427    path="$BOOT_JDK"
23428    has_space=`$ECHO "$path" | $GREP " "`
23429    if test "x$has_space" != x; then
23430      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23431$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23432      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23433    fi
23434
23435    # Use eval to expand a potential ~
23436    eval path="$path"
23437    if test ! -f "$path" && test ! -d "$path"; then
23438      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23439    fi
23440
23441    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23442  fi
23443
23444              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23445$as_echo_n "checking for Boot JDK... " >&6; }
23446              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23447$as_echo "$BOOT_JDK" >&6; }
23448              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23449$as_echo_n "checking Boot JDK version... " >&6; }
23450              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23451              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23452$as_echo "$BOOT_JDK_VERSION" >&6; }
23453            fi # end check jdk version
23454          fi # end check rt.jar
23455        fi # end check javac
23456      fi # end check java
23457    fi # end check boot jdk found
23458  fi
23459
23460
23461  if test "x$BOOT_JDK_FOUND" = xno; then
23462    # Now execute the test
23463
23464  if test "x$ProgramFiles" != x; then
23465    VIRTUAL_DIR="$ProgramFiles/Java"
23466
23467  windows_path="$VIRTUAL_DIR"
23468  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23469    unix_path=`$CYGPATH -u "$windows_path"`
23470    VIRTUAL_DIR="$unix_path"
23471  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23472    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23473    VIRTUAL_DIR="$unix_path"
23474  fi
23475
23476
23477  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23478  BOOT_JDK_SUFFIX=""
23479  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23480  if test "x$ALL_JDKS_FOUND" != x; then
23481    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23482
23483  if test "x$BOOT_JDK_FOUND" = xno; then
23484    # Now execute the test
23485
23486        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23487        if test -d "$BOOT_JDK"; then
23488          BOOT_JDK_FOUND=maybe
23489          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23490$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23491        fi
23492
23493
23494    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23495    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23496      # Do we have a bin/java?
23497      if test ! -x "$BOOT_JDK/bin/java"; then
23498        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23499$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23500        BOOT_JDK_FOUND=no
23501      else
23502        # Do we have a bin/javac?
23503        if test ! -x "$BOOT_JDK/bin/javac"; then
23504          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23505$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23506          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23507$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23508          BOOT_JDK_FOUND=no
23509        else
23510          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23511          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23512            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23513$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23514            BOOT_JDK_FOUND=no
23515          else
23516            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23517            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23518
23519            # Extra M4 quote needed to protect [] in grep expression.
23520            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23521            if test "x$FOUND_CORRECT_VERSION" = x; then
23522              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23523$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23524              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23525$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23526              BOOT_JDK_FOUND=no
23527            else
23528              # We're done! :-)
23529              BOOT_JDK_FOUND=yes
23530
23531  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23532
23533  # Input might be given as Windows format, start by converting to
23534  # unix format.
23535  path="$BOOT_JDK"
23536  new_path=`$CYGPATH -u "$path"`
23537
23538  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23539  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23540  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23541  # "foo.exe" is OK but "foo" is an error.
23542  #
23543  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23544  # It is also a way to make sure we got the proper file name for the real test later on.
23545  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23546  if test "x$test_shortpath" = x; then
23547    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23548$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23549    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23550  fi
23551
23552  # Call helper function which possibly converts this using DOS-style short mode.
23553  # If so, the updated path is stored in $new_path.
23554
23555  input_path="$new_path"
23556  # Check if we need to convert this using DOS-style short mode. If the path
23557  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23558  # take no chances and rewrite it.
23559  # Note: m4 eats our [], so we need to use [ and ] instead.
23560  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23561  if test "x$has_forbidden_chars" != x; then
23562    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23563    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23564    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23565    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23566      # Going to short mode and back again did indeed matter. Since short mode is
23567      # case insensitive, let's make it lowercase to improve readability.
23568      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23569      # Now convert it back to Unix-stile (cygpath)
23570      input_path=`$CYGPATH -u "$shortmode_path"`
23571      new_path="$input_path"
23572    fi
23573  fi
23574
23575  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23576  if test "x$test_cygdrive_prefix" = x; then
23577    # As a simple fix, exclude /usr/bin since it's not a real path.
23578    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23579      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23580      # a path prefixed by /cygdrive for fixpath to work.
23581      new_path="$CYGWIN_ROOT_PATH$input_path"
23582    fi
23583  fi
23584
23585
23586  if test "x$path" != "x$new_path"; then
23587    BOOT_JDK="$new_path"
23588    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23589$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23590  fi
23591
23592  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23593
23594  path="$BOOT_JDK"
23595  has_colon=`$ECHO $path | $GREP ^.:`
23596  new_path="$path"
23597  if test "x$has_colon" = x; then
23598    # Not in mixed or Windows style, start by that.
23599    new_path=`cmd //c echo $path`
23600  fi
23601
23602
23603  input_path="$new_path"
23604  # Check if we need to convert this using DOS-style short mode. If the path
23605  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23606  # take no chances and rewrite it.
23607  # Note: m4 eats our [], so we need to use [ and ] instead.
23608  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23609  if test "x$has_forbidden_chars" != x; then
23610    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23611    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23612  fi
23613
23614
23615  windows_path="$new_path"
23616  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23617    unix_path=`$CYGPATH -u "$windows_path"`
23618    new_path="$unix_path"
23619  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23620    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23621    new_path="$unix_path"
23622  fi
23623
23624  if test "x$path" != "x$new_path"; then
23625    BOOT_JDK="$new_path"
23626    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23627$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23628  fi
23629
23630  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23631  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23632
23633  else
23634    # We're on a unix platform. Hooray! :)
23635    path="$BOOT_JDK"
23636    has_space=`$ECHO "$path" | $GREP " "`
23637    if test "x$has_space" != x; then
23638      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23639$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23640      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23641    fi
23642
23643    # Use eval to expand a potential ~
23644    eval path="$path"
23645    if test ! -f "$path" && test ! -d "$path"; then
23646      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23647    fi
23648
23649    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23650  fi
23651
23652              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23653$as_echo_n "checking for Boot JDK... " >&6; }
23654              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23655$as_echo "$BOOT_JDK" >&6; }
23656              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23657$as_echo_n "checking Boot JDK version... " >&6; }
23658              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23659              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23660$as_echo "$BOOT_JDK_VERSION" >&6; }
23661            fi # end check jdk version
23662          fi # end check rt.jar
23663        fi # end check javac
23664      fi # end check java
23665    fi # end check boot jdk found
23666  fi
23667
23668    done
23669  fi
23670
23671  fi
23672
23673
23674    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23675    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23676      # Do we have a bin/java?
23677      if test ! -x "$BOOT_JDK/bin/java"; then
23678        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23679$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23680        BOOT_JDK_FOUND=no
23681      else
23682        # Do we have a bin/javac?
23683        if test ! -x "$BOOT_JDK/bin/javac"; then
23684          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23685$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23686          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23687$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23688          BOOT_JDK_FOUND=no
23689        else
23690          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23691          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23692            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23693$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23694            BOOT_JDK_FOUND=no
23695          else
23696            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23697            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23698
23699            # Extra M4 quote needed to protect [] in grep expression.
23700            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23701            if test "x$FOUND_CORRECT_VERSION" = x; then
23702              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23703$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23704              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23705$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23706              BOOT_JDK_FOUND=no
23707            else
23708              # We're done! :-)
23709              BOOT_JDK_FOUND=yes
23710
23711  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23712
23713  # Input might be given as Windows format, start by converting to
23714  # unix format.
23715  path="$BOOT_JDK"
23716  new_path=`$CYGPATH -u "$path"`
23717
23718  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23719  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23720  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23721  # "foo.exe" is OK but "foo" is an error.
23722  #
23723  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23724  # It is also a way to make sure we got the proper file name for the real test later on.
23725  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23726  if test "x$test_shortpath" = x; then
23727    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23728$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23729    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23730  fi
23731
23732  # Call helper function which possibly converts this using DOS-style short mode.
23733  # If so, the updated path is stored in $new_path.
23734
23735  input_path="$new_path"
23736  # Check if we need to convert this using DOS-style short mode. If the path
23737  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23738  # take no chances and rewrite it.
23739  # Note: m4 eats our [], so we need to use [ and ] instead.
23740  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23741  if test "x$has_forbidden_chars" != x; then
23742    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23743    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23744    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23745    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23746      # Going to short mode and back again did indeed matter. Since short mode is
23747      # case insensitive, let's make it lowercase to improve readability.
23748      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23749      # Now convert it back to Unix-stile (cygpath)
23750      input_path=`$CYGPATH -u "$shortmode_path"`
23751      new_path="$input_path"
23752    fi
23753  fi
23754
23755  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23756  if test "x$test_cygdrive_prefix" = x; then
23757    # As a simple fix, exclude /usr/bin since it's not a real path.
23758    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23759      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23760      # a path prefixed by /cygdrive for fixpath to work.
23761      new_path="$CYGWIN_ROOT_PATH$input_path"
23762    fi
23763  fi
23764
23765
23766  if test "x$path" != "x$new_path"; then
23767    BOOT_JDK="$new_path"
23768    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23769$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23770  fi
23771
23772  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23773
23774  path="$BOOT_JDK"
23775  has_colon=`$ECHO $path | $GREP ^.:`
23776  new_path="$path"
23777  if test "x$has_colon" = x; then
23778    # Not in mixed or Windows style, start by that.
23779    new_path=`cmd //c echo $path`
23780  fi
23781
23782
23783  input_path="$new_path"
23784  # Check if we need to convert this using DOS-style short mode. If the path
23785  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23786  # take no chances and rewrite it.
23787  # Note: m4 eats our [], so we need to use [ and ] instead.
23788  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23789  if test "x$has_forbidden_chars" != x; then
23790    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23791    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23792  fi
23793
23794
23795  windows_path="$new_path"
23796  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23797    unix_path=`$CYGPATH -u "$windows_path"`
23798    new_path="$unix_path"
23799  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23800    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23801    new_path="$unix_path"
23802  fi
23803
23804  if test "x$path" != "x$new_path"; then
23805    BOOT_JDK="$new_path"
23806    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23807$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23808  fi
23809
23810  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23811  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23812
23813  else
23814    # We're on a unix platform. Hooray! :)
23815    path="$BOOT_JDK"
23816    has_space=`$ECHO "$path" | $GREP " "`
23817    if test "x$has_space" != x; then
23818      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23819$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23820      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23821    fi
23822
23823    # Use eval to expand a potential ~
23824    eval path="$path"
23825    if test ! -f "$path" && test ! -d "$path"; then
23826      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23827    fi
23828
23829    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23830  fi
23831
23832              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23833$as_echo_n "checking for Boot JDK... " >&6; }
23834              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23835$as_echo "$BOOT_JDK" >&6; }
23836              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23837$as_echo_n "checking Boot JDK version... " >&6; }
23838              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23839              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23840$as_echo "$BOOT_JDK_VERSION" >&6; }
23841            fi # end check jdk version
23842          fi # end check rt.jar
23843        fi # end check javac
23844      fi # end check java
23845    fi # end check boot jdk found
23846  fi
23847
23848
23849  if test "x$BOOT_JDK_FOUND" = xno; then
23850    # Now execute the test
23851
23852  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
23853  BOOT_JDK_SUFFIX=""
23854  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23855  if test "x$ALL_JDKS_FOUND" != x; then
23856    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23857
23858  if test "x$BOOT_JDK_FOUND" = xno; then
23859    # Now execute the test
23860
23861        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23862        if test -d "$BOOT_JDK"; then
23863          BOOT_JDK_FOUND=maybe
23864          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23865$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23866        fi
23867
23868
23869    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23870    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23871      # Do we have a bin/java?
23872      if test ! -x "$BOOT_JDK/bin/java"; then
23873        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23874$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23875        BOOT_JDK_FOUND=no
23876      else
23877        # Do we have a bin/javac?
23878        if test ! -x "$BOOT_JDK/bin/javac"; then
23879          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23880$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23881          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23882$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23883          BOOT_JDK_FOUND=no
23884        else
23885          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23886          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23887            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23888$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23889            BOOT_JDK_FOUND=no
23890          else
23891            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23892            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23893
23894            # Extra M4 quote needed to protect [] in grep expression.
23895            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23896            if test "x$FOUND_CORRECT_VERSION" = x; then
23897              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23898$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23899              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23900$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23901              BOOT_JDK_FOUND=no
23902            else
23903              # We're done! :-)
23904              BOOT_JDK_FOUND=yes
23905
23906  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23907
23908  # Input might be given as Windows format, start by converting to
23909  # unix format.
23910  path="$BOOT_JDK"
23911  new_path=`$CYGPATH -u "$path"`
23912
23913  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23914  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23915  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23916  # "foo.exe" is OK but "foo" is an error.
23917  #
23918  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23919  # It is also a way to make sure we got the proper file name for the real test later on.
23920  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23921  if test "x$test_shortpath" = x; then
23922    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23923$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23924    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23925  fi
23926
23927  # Call helper function which possibly converts this using DOS-style short mode.
23928  # If so, the updated path is stored in $new_path.
23929
23930  input_path="$new_path"
23931  # Check if we need to convert this using DOS-style short mode. If the path
23932  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23933  # take no chances and rewrite it.
23934  # Note: m4 eats our [], so we need to use [ and ] instead.
23935  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23936  if test "x$has_forbidden_chars" != x; then
23937    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23938    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23939    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23940    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23941      # Going to short mode and back again did indeed matter. Since short mode is
23942      # case insensitive, let's make it lowercase to improve readability.
23943      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23944      # Now convert it back to Unix-stile (cygpath)
23945      input_path=`$CYGPATH -u "$shortmode_path"`
23946      new_path="$input_path"
23947    fi
23948  fi
23949
23950  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23951  if test "x$test_cygdrive_prefix" = x; then
23952    # As a simple fix, exclude /usr/bin since it's not a real path.
23953    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23954      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23955      # a path prefixed by /cygdrive for fixpath to work.
23956      new_path="$CYGWIN_ROOT_PATH$input_path"
23957    fi
23958  fi
23959
23960
23961  if test "x$path" != "x$new_path"; then
23962    BOOT_JDK="$new_path"
23963    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23964$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23965  fi
23966
23967  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23968
23969  path="$BOOT_JDK"
23970  has_colon=`$ECHO $path | $GREP ^.:`
23971  new_path="$path"
23972  if test "x$has_colon" = x; then
23973    # Not in mixed or Windows style, start by that.
23974    new_path=`cmd //c echo $path`
23975  fi
23976
23977
23978  input_path="$new_path"
23979  # Check if we need to convert this using DOS-style short mode. If the path
23980  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23981  # take no chances and rewrite it.
23982  # Note: m4 eats our [], so we need to use [ and ] instead.
23983  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23984  if test "x$has_forbidden_chars" != x; then
23985    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23986    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23987  fi
23988
23989
23990  windows_path="$new_path"
23991  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23992    unix_path=`$CYGPATH -u "$windows_path"`
23993    new_path="$unix_path"
23994  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23995    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23996    new_path="$unix_path"
23997  fi
23998
23999  if test "x$path" != "x$new_path"; then
24000    BOOT_JDK="$new_path"
24001    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24002$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24003  fi
24004
24005  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24006  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24007
24008  else
24009    # We're on a unix platform. Hooray! :)
24010    path="$BOOT_JDK"
24011    has_space=`$ECHO "$path" | $GREP " "`
24012    if test "x$has_space" != x; then
24013      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24014$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24015      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24016    fi
24017
24018    # Use eval to expand a potential ~
24019    eval path="$path"
24020    if test ! -f "$path" && test ! -d "$path"; then
24021      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24022    fi
24023
24024    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24025  fi
24026
24027              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24028$as_echo_n "checking for Boot JDK... " >&6; }
24029              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24030$as_echo "$BOOT_JDK" >&6; }
24031              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24032$as_echo_n "checking Boot JDK version... " >&6; }
24033              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24034              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24035$as_echo "$BOOT_JDK_VERSION" >&6; }
24036            fi # end check jdk version
24037          fi # end check rt.jar
24038        fi # end check javac
24039      fi # end check java
24040    fi # end check boot jdk found
24041  fi
24042
24043    done
24044  fi
24045
24046
24047    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24048    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24049      # Do we have a bin/java?
24050      if test ! -x "$BOOT_JDK/bin/java"; then
24051        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24052$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24053        BOOT_JDK_FOUND=no
24054      else
24055        # Do we have a bin/javac?
24056        if test ! -x "$BOOT_JDK/bin/javac"; then
24057          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24058$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24059          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24060$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24061          BOOT_JDK_FOUND=no
24062        else
24063          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24064          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24065            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24066$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24067            BOOT_JDK_FOUND=no
24068          else
24069            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24070            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24071
24072            # Extra M4 quote needed to protect [] in grep expression.
24073            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24074            if test "x$FOUND_CORRECT_VERSION" = x; then
24075              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24076$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24077              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24078$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24079              BOOT_JDK_FOUND=no
24080            else
24081              # We're done! :-)
24082              BOOT_JDK_FOUND=yes
24083
24084  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24085
24086  # Input might be given as Windows format, start by converting to
24087  # unix format.
24088  path="$BOOT_JDK"
24089  new_path=`$CYGPATH -u "$path"`
24090
24091  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24092  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24093  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24094  # "foo.exe" is OK but "foo" is an error.
24095  #
24096  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24097  # It is also a way to make sure we got the proper file name for the real test later on.
24098  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24099  if test "x$test_shortpath" = x; then
24100    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24101$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24102    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24103  fi
24104
24105  # Call helper function which possibly converts this using DOS-style short mode.
24106  # If so, the updated path is stored in $new_path.
24107
24108  input_path="$new_path"
24109  # Check if we need to convert this using DOS-style short mode. If the path
24110  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24111  # take no chances and rewrite it.
24112  # Note: m4 eats our [], so we need to use [ and ] instead.
24113  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24114  if test "x$has_forbidden_chars" != x; then
24115    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24116    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24117    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24118    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24119      # Going to short mode and back again did indeed matter. Since short mode is
24120      # case insensitive, let's make it lowercase to improve readability.
24121      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24122      # Now convert it back to Unix-stile (cygpath)
24123      input_path=`$CYGPATH -u "$shortmode_path"`
24124      new_path="$input_path"
24125    fi
24126  fi
24127
24128  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24129  if test "x$test_cygdrive_prefix" = x; then
24130    # As a simple fix, exclude /usr/bin since it's not a real path.
24131    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24132      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24133      # a path prefixed by /cygdrive for fixpath to work.
24134      new_path="$CYGWIN_ROOT_PATH$input_path"
24135    fi
24136  fi
24137
24138
24139  if test "x$path" != "x$new_path"; then
24140    BOOT_JDK="$new_path"
24141    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24142$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24143  fi
24144
24145  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24146
24147  path="$BOOT_JDK"
24148  has_colon=`$ECHO $path | $GREP ^.:`
24149  new_path="$path"
24150  if test "x$has_colon" = x; then
24151    # Not in mixed or Windows style, start by that.
24152    new_path=`cmd //c echo $path`
24153  fi
24154
24155
24156  input_path="$new_path"
24157  # Check if we need to convert this using DOS-style short mode. If the path
24158  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24159  # take no chances and rewrite it.
24160  # Note: m4 eats our [], so we need to use [ and ] instead.
24161  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24162  if test "x$has_forbidden_chars" != x; then
24163    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24164    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24165  fi
24166
24167
24168  windows_path="$new_path"
24169  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24170    unix_path=`$CYGPATH -u "$windows_path"`
24171    new_path="$unix_path"
24172  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24173    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24174    new_path="$unix_path"
24175  fi
24176
24177  if test "x$path" != "x$new_path"; then
24178    BOOT_JDK="$new_path"
24179    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24180$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24181  fi
24182
24183  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24184  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24185
24186  else
24187    # We're on a unix platform. Hooray! :)
24188    path="$BOOT_JDK"
24189    has_space=`$ECHO "$path" | $GREP " "`
24190    if test "x$has_space" != x; then
24191      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24192$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24193      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24194    fi
24195
24196    # Use eval to expand a potential ~
24197    eval path="$path"
24198    if test ! -f "$path" && test ! -d "$path"; then
24199      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24200    fi
24201
24202    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24203  fi
24204
24205              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24206$as_echo_n "checking for Boot JDK... " >&6; }
24207              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24208$as_echo "$BOOT_JDK" >&6; }
24209              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24210$as_echo_n "checking Boot JDK version... " >&6; }
24211              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24212              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24213$as_echo "$BOOT_JDK_VERSION" >&6; }
24214            fi # end check jdk version
24215          fi # end check rt.jar
24216        fi # end check javac
24217      fi # end check java
24218    fi # end check boot jdk found
24219  fi
24220
24221  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
24222
24223  if test "x$BOOT_JDK_FOUND" = xno; then
24224    # Now execute the test
24225
24226  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
24227  BOOT_JDK_SUFFIX="/Contents/Home"
24228  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24229  if test "x$ALL_JDKS_FOUND" != x; then
24230    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24231
24232  if test "x$BOOT_JDK_FOUND" = xno; then
24233    # Now execute the test
24234
24235        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24236        if test -d "$BOOT_JDK"; then
24237          BOOT_JDK_FOUND=maybe
24238          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24239$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24240        fi
24241
24242
24243    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24244    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24245      # Do we have a bin/java?
24246      if test ! -x "$BOOT_JDK/bin/java"; then
24247        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24248$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24249        BOOT_JDK_FOUND=no
24250      else
24251        # Do we have a bin/javac?
24252        if test ! -x "$BOOT_JDK/bin/javac"; then
24253          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24254$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24255          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24256$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24257          BOOT_JDK_FOUND=no
24258        else
24259          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24260          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24261            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24262$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24263            BOOT_JDK_FOUND=no
24264          else
24265            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24266            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24267
24268            # Extra M4 quote needed to protect [] in grep expression.
24269            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24270            if test "x$FOUND_CORRECT_VERSION" = x; then
24271              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24272$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24273              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24274$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24275              BOOT_JDK_FOUND=no
24276            else
24277              # We're done! :-)
24278              BOOT_JDK_FOUND=yes
24279
24280  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24281
24282  # Input might be given as Windows format, start by converting to
24283  # unix format.
24284  path="$BOOT_JDK"
24285  new_path=`$CYGPATH -u "$path"`
24286
24287  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24288  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24289  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24290  # "foo.exe" is OK but "foo" is an error.
24291  #
24292  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24293  # It is also a way to make sure we got the proper file name for the real test later on.
24294  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24295  if test "x$test_shortpath" = x; then
24296    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24297$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24298    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24299  fi
24300
24301  # Call helper function which possibly converts this using DOS-style short mode.
24302  # If so, the updated path is stored in $new_path.
24303
24304  input_path="$new_path"
24305  # Check if we need to convert this using DOS-style short mode. If the path
24306  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24307  # take no chances and rewrite it.
24308  # Note: m4 eats our [], so we need to use [ and ] instead.
24309  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24310  if test "x$has_forbidden_chars" != x; then
24311    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24312    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24313    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24314    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24315      # Going to short mode and back again did indeed matter. Since short mode is
24316      # case insensitive, let's make it lowercase to improve readability.
24317      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24318      # Now convert it back to Unix-stile (cygpath)
24319      input_path=`$CYGPATH -u "$shortmode_path"`
24320      new_path="$input_path"
24321    fi
24322  fi
24323
24324  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24325  if test "x$test_cygdrive_prefix" = x; then
24326    # As a simple fix, exclude /usr/bin since it's not a real path.
24327    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24328      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24329      # a path prefixed by /cygdrive for fixpath to work.
24330      new_path="$CYGWIN_ROOT_PATH$input_path"
24331    fi
24332  fi
24333
24334
24335  if test "x$path" != "x$new_path"; then
24336    BOOT_JDK="$new_path"
24337    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24338$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24339  fi
24340
24341  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24342
24343  path="$BOOT_JDK"
24344  has_colon=`$ECHO $path | $GREP ^.:`
24345  new_path="$path"
24346  if test "x$has_colon" = x; then
24347    # Not in mixed or Windows style, start by that.
24348    new_path=`cmd //c echo $path`
24349  fi
24350
24351
24352  input_path="$new_path"
24353  # Check if we need to convert this using DOS-style short mode. If the path
24354  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24355  # take no chances and rewrite it.
24356  # Note: m4 eats our [], so we need to use [ and ] instead.
24357  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24358  if test "x$has_forbidden_chars" != x; then
24359    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24360    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24361  fi
24362
24363
24364  windows_path="$new_path"
24365  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24366    unix_path=`$CYGPATH -u "$windows_path"`
24367    new_path="$unix_path"
24368  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24369    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24370    new_path="$unix_path"
24371  fi
24372
24373  if test "x$path" != "x$new_path"; then
24374    BOOT_JDK="$new_path"
24375    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24376$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24377  fi
24378
24379  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24380  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24381
24382  else
24383    # We're on a unix platform. Hooray! :)
24384    path="$BOOT_JDK"
24385    has_space=`$ECHO "$path" | $GREP " "`
24386    if test "x$has_space" != x; then
24387      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24388$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24389      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24390    fi
24391
24392    # Use eval to expand a potential ~
24393    eval path="$path"
24394    if test ! -f "$path" && test ! -d "$path"; then
24395      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24396    fi
24397
24398    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24399  fi
24400
24401              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24402$as_echo_n "checking for Boot JDK... " >&6; }
24403              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24404$as_echo "$BOOT_JDK" >&6; }
24405              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24406$as_echo_n "checking Boot JDK version... " >&6; }
24407              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24408              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24409$as_echo "$BOOT_JDK_VERSION" >&6; }
24410            fi # end check jdk version
24411          fi # end check rt.jar
24412        fi # end check javac
24413      fi # end check java
24414    fi # end check boot jdk found
24415  fi
24416
24417    done
24418  fi
24419
24420
24421    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24422    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24423      # Do we have a bin/java?
24424      if test ! -x "$BOOT_JDK/bin/java"; then
24425        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24426$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24427        BOOT_JDK_FOUND=no
24428      else
24429        # Do we have a bin/javac?
24430        if test ! -x "$BOOT_JDK/bin/javac"; then
24431          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24432$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24433          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24434$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24435          BOOT_JDK_FOUND=no
24436        else
24437          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24438          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24439            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24440$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24441            BOOT_JDK_FOUND=no
24442          else
24443            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24444            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24445
24446            # Extra M4 quote needed to protect [] in grep expression.
24447            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24448            if test "x$FOUND_CORRECT_VERSION" = x; then
24449              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24450$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24451              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24452$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24453              BOOT_JDK_FOUND=no
24454            else
24455              # We're done! :-)
24456              BOOT_JDK_FOUND=yes
24457
24458  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24459
24460  # Input might be given as Windows format, start by converting to
24461  # unix format.
24462  path="$BOOT_JDK"
24463  new_path=`$CYGPATH -u "$path"`
24464
24465  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24466  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24467  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24468  # "foo.exe" is OK but "foo" is an error.
24469  #
24470  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24471  # It is also a way to make sure we got the proper file name for the real test later on.
24472  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24473  if test "x$test_shortpath" = x; then
24474    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24475$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24476    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24477  fi
24478
24479  # Call helper function which possibly converts this using DOS-style short mode.
24480  # If so, the updated path is stored in $new_path.
24481
24482  input_path="$new_path"
24483  # Check if we need to convert this using DOS-style short mode. If the path
24484  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24485  # take no chances and rewrite it.
24486  # Note: m4 eats our [], so we need to use [ and ] instead.
24487  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24488  if test "x$has_forbidden_chars" != x; then
24489    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24490    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24491    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24492    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24493      # Going to short mode and back again did indeed matter. Since short mode is
24494      # case insensitive, let's make it lowercase to improve readability.
24495      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24496      # Now convert it back to Unix-stile (cygpath)
24497      input_path=`$CYGPATH -u "$shortmode_path"`
24498      new_path="$input_path"
24499    fi
24500  fi
24501
24502  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24503  if test "x$test_cygdrive_prefix" = x; then
24504    # As a simple fix, exclude /usr/bin since it's not a real path.
24505    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24506      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24507      # a path prefixed by /cygdrive for fixpath to work.
24508      new_path="$CYGWIN_ROOT_PATH$input_path"
24509    fi
24510  fi
24511
24512
24513  if test "x$path" != "x$new_path"; then
24514    BOOT_JDK="$new_path"
24515    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24516$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24517  fi
24518
24519  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24520
24521  path="$BOOT_JDK"
24522  has_colon=`$ECHO $path | $GREP ^.:`
24523  new_path="$path"
24524  if test "x$has_colon" = x; then
24525    # Not in mixed or Windows style, start by that.
24526    new_path=`cmd //c echo $path`
24527  fi
24528
24529
24530  input_path="$new_path"
24531  # Check if we need to convert this using DOS-style short mode. If the path
24532  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24533  # take no chances and rewrite it.
24534  # Note: m4 eats our [], so we need to use [ and ] instead.
24535  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24536  if test "x$has_forbidden_chars" != x; then
24537    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24538    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24539  fi
24540
24541
24542  windows_path="$new_path"
24543  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24544    unix_path=`$CYGPATH -u "$windows_path"`
24545    new_path="$unix_path"
24546  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24547    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24548    new_path="$unix_path"
24549  fi
24550
24551  if test "x$path" != "x$new_path"; then
24552    BOOT_JDK="$new_path"
24553    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24554$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24555  fi
24556
24557  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24558  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24559
24560  else
24561    # We're on a unix platform. Hooray! :)
24562    path="$BOOT_JDK"
24563    has_space=`$ECHO "$path" | $GREP " "`
24564    if test "x$has_space" != x; then
24565      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24566$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24567      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24568    fi
24569
24570    # Use eval to expand a potential ~
24571    eval path="$path"
24572    if test ! -f "$path" && test ! -d "$path"; then
24573      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24574    fi
24575
24576    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24577  fi
24578
24579              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24580$as_echo_n "checking for Boot JDK... " >&6; }
24581              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24582$as_echo "$BOOT_JDK" >&6; }
24583              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24584$as_echo_n "checking Boot JDK version... " >&6; }
24585              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24586              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24587$as_echo "$BOOT_JDK_VERSION" >&6; }
24588            fi # end check jdk version
24589          fi # end check rt.jar
24590        fi # end check javac
24591      fi # end check java
24592    fi # end check boot jdk found
24593  fi
24594
24595
24596  if test "x$BOOT_JDK_FOUND" = xno; then
24597    # Now execute the test
24598
24599  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
24600  BOOT_JDK_SUFFIX="/Contents/Home"
24601  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24602  if test "x$ALL_JDKS_FOUND" != x; then
24603    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24604
24605  if test "x$BOOT_JDK_FOUND" = xno; then
24606    # Now execute the test
24607
24608        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24609        if test -d "$BOOT_JDK"; then
24610          BOOT_JDK_FOUND=maybe
24611          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24612$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24613        fi
24614
24615
24616    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24617    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24618      # Do we have a bin/java?
24619      if test ! -x "$BOOT_JDK/bin/java"; then
24620        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24621$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24622        BOOT_JDK_FOUND=no
24623      else
24624        # Do we have a bin/javac?
24625        if test ! -x "$BOOT_JDK/bin/javac"; then
24626          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24627$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24628          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24629$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24630          BOOT_JDK_FOUND=no
24631        else
24632          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24633          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24634            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24635$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24636            BOOT_JDK_FOUND=no
24637          else
24638            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24639            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24640
24641            # Extra M4 quote needed to protect [] in grep expression.
24642            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24643            if test "x$FOUND_CORRECT_VERSION" = x; then
24644              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24645$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24646              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24647$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24648              BOOT_JDK_FOUND=no
24649            else
24650              # We're done! :-)
24651              BOOT_JDK_FOUND=yes
24652
24653  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24654
24655  # Input might be given as Windows format, start by converting to
24656  # unix format.
24657  path="$BOOT_JDK"
24658  new_path=`$CYGPATH -u "$path"`
24659
24660  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24661  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24662  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24663  # "foo.exe" is OK but "foo" is an error.
24664  #
24665  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24666  # It is also a way to make sure we got the proper file name for the real test later on.
24667  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24668  if test "x$test_shortpath" = x; then
24669    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24670$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24671    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24672  fi
24673
24674  # Call helper function which possibly converts this using DOS-style short mode.
24675  # If so, the updated path is stored in $new_path.
24676
24677  input_path="$new_path"
24678  # Check if we need to convert this using DOS-style short mode. If the path
24679  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24680  # take no chances and rewrite it.
24681  # Note: m4 eats our [], so we need to use [ and ] instead.
24682  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24683  if test "x$has_forbidden_chars" != x; then
24684    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24685    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24686    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24687    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24688      # Going to short mode and back again did indeed matter. Since short mode is
24689      # case insensitive, let's make it lowercase to improve readability.
24690      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24691      # Now convert it back to Unix-stile (cygpath)
24692      input_path=`$CYGPATH -u "$shortmode_path"`
24693      new_path="$input_path"
24694    fi
24695  fi
24696
24697  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24698  if test "x$test_cygdrive_prefix" = x; then
24699    # As a simple fix, exclude /usr/bin since it's not a real path.
24700    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24701      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24702      # a path prefixed by /cygdrive for fixpath to work.
24703      new_path="$CYGWIN_ROOT_PATH$input_path"
24704    fi
24705  fi
24706
24707
24708  if test "x$path" != "x$new_path"; then
24709    BOOT_JDK="$new_path"
24710    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24711$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24712  fi
24713
24714  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24715
24716  path="$BOOT_JDK"
24717  has_colon=`$ECHO $path | $GREP ^.:`
24718  new_path="$path"
24719  if test "x$has_colon" = x; then
24720    # Not in mixed or Windows style, start by that.
24721    new_path=`cmd //c echo $path`
24722  fi
24723
24724
24725  input_path="$new_path"
24726  # Check if we need to convert this using DOS-style short mode. If the path
24727  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24728  # take no chances and rewrite it.
24729  # Note: m4 eats our [], so we need to use [ and ] instead.
24730  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24731  if test "x$has_forbidden_chars" != x; then
24732    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24733    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24734  fi
24735
24736
24737  windows_path="$new_path"
24738  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24739    unix_path=`$CYGPATH -u "$windows_path"`
24740    new_path="$unix_path"
24741  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24742    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24743    new_path="$unix_path"
24744  fi
24745
24746  if test "x$path" != "x$new_path"; then
24747    BOOT_JDK="$new_path"
24748    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24749$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24750  fi
24751
24752  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24753  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24754
24755  else
24756    # We're on a unix platform. Hooray! :)
24757    path="$BOOT_JDK"
24758    has_space=`$ECHO "$path" | $GREP " "`
24759    if test "x$has_space" != x; then
24760      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24761$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24762      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24763    fi
24764
24765    # Use eval to expand a potential ~
24766    eval path="$path"
24767    if test ! -f "$path" && test ! -d "$path"; then
24768      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24769    fi
24770
24771    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24772  fi
24773
24774              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24775$as_echo_n "checking for Boot JDK... " >&6; }
24776              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24777$as_echo "$BOOT_JDK" >&6; }
24778              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24779$as_echo_n "checking Boot JDK version... " >&6; }
24780              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24781              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24782$as_echo "$BOOT_JDK_VERSION" >&6; }
24783            fi # end check jdk version
24784          fi # end check rt.jar
24785        fi # end check javac
24786      fi # end check java
24787    fi # end check boot jdk found
24788  fi
24789
24790    done
24791  fi
24792
24793
24794    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24795    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24796      # Do we have a bin/java?
24797      if test ! -x "$BOOT_JDK/bin/java"; then
24798        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24799$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24800        BOOT_JDK_FOUND=no
24801      else
24802        # Do we have a bin/javac?
24803        if test ! -x "$BOOT_JDK/bin/javac"; then
24804          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24805$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24806          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24807$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24808          BOOT_JDK_FOUND=no
24809        else
24810          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24811          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24812            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24813$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24814            BOOT_JDK_FOUND=no
24815          else
24816            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24817            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24818
24819            # Extra M4 quote needed to protect [] in grep expression.
24820            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24821            if test "x$FOUND_CORRECT_VERSION" = x; then
24822              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24823$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24824              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24825$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24826              BOOT_JDK_FOUND=no
24827            else
24828              # We're done! :-)
24829              BOOT_JDK_FOUND=yes
24830
24831  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24832
24833  # Input might be given as Windows format, start by converting to
24834  # unix format.
24835  path="$BOOT_JDK"
24836  new_path=`$CYGPATH -u "$path"`
24837
24838  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24839  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24840  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24841  # "foo.exe" is OK but "foo" is an error.
24842  #
24843  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24844  # It is also a way to make sure we got the proper file name for the real test later on.
24845  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24846  if test "x$test_shortpath" = x; then
24847    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24848$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24849    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24850  fi
24851
24852  # Call helper function which possibly converts this using DOS-style short mode.
24853  # If so, the updated path is stored in $new_path.
24854
24855  input_path="$new_path"
24856  # Check if we need to convert this using DOS-style short mode. If the path
24857  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24858  # take no chances and rewrite it.
24859  # Note: m4 eats our [], so we need to use [ and ] instead.
24860  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24861  if test "x$has_forbidden_chars" != x; then
24862    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24863    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24864    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24865    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24866      # Going to short mode and back again did indeed matter. Since short mode is
24867      # case insensitive, let's make it lowercase to improve readability.
24868      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24869      # Now convert it back to Unix-stile (cygpath)
24870      input_path=`$CYGPATH -u "$shortmode_path"`
24871      new_path="$input_path"
24872    fi
24873  fi
24874
24875  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24876  if test "x$test_cygdrive_prefix" = x; then
24877    # As a simple fix, exclude /usr/bin since it's not a real path.
24878    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24879      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24880      # a path prefixed by /cygdrive for fixpath to work.
24881      new_path="$CYGWIN_ROOT_PATH$input_path"
24882    fi
24883  fi
24884
24885
24886  if test "x$path" != "x$new_path"; then
24887    BOOT_JDK="$new_path"
24888    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24889$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24890  fi
24891
24892  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24893
24894  path="$BOOT_JDK"
24895  has_colon=`$ECHO $path | $GREP ^.:`
24896  new_path="$path"
24897  if test "x$has_colon" = x; then
24898    # Not in mixed or Windows style, start by that.
24899    new_path=`cmd //c echo $path`
24900  fi
24901
24902
24903  input_path="$new_path"
24904  # Check if we need to convert this using DOS-style short mode. If the path
24905  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24906  # take no chances and rewrite it.
24907  # Note: m4 eats our [], so we need to use [ and ] instead.
24908  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24909  if test "x$has_forbidden_chars" != x; then
24910    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24911    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24912  fi
24913
24914
24915  windows_path="$new_path"
24916  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24917    unix_path=`$CYGPATH -u "$windows_path"`
24918    new_path="$unix_path"
24919  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24920    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24921    new_path="$unix_path"
24922  fi
24923
24924  if test "x$path" != "x$new_path"; then
24925    BOOT_JDK="$new_path"
24926    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24927$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24928  fi
24929
24930  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24931  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24932
24933  else
24934    # We're on a unix platform. Hooray! :)
24935    path="$BOOT_JDK"
24936    has_space=`$ECHO "$path" | $GREP " "`
24937    if test "x$has_space" != x; then
24938      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24939$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24940      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24941    fi
24942
24943    # Use eval to expand a potential ~
24944    eval path="$path"
24945    if test ! -f "$path" && test ! -d "$path"; then
24946      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24947    fi
24948
24949    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24950  fi
24951
24952              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24953$as_echo_n "checking for Boot JDK... " >&6; }
24954              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24955$as_echo "$BOOT_JDK" >&6; }
24956              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24957$as_echo_n "checking Boot JDK version... " >&6; }
24958              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24959              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24960$as_echo "$BOOT_JDK_VERSION" >&6; }
24961            fi # end check jdk version
24962          fi # end check rt.jar
24963        fi # end check javac
24964      fi # end check java
24965    fi # end check boot jdk found
24966  fi
24967
24968  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
24969
24970  if test "x$BOOT_JDK_FOUND" = xno; then
24971    # Now execute the test
24972
24973  BOOT_JDK_PREFIX="/usr/lib/jvm"
24974  BOOT_JDK_SUFFIX=""
24975  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24976  if test "x$ALL_JDKS_FOUND" != x; then
24977    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24978
24979  if test "x$BOOT_JDK_FOUND" = xno; then
24980    # Now execute the test
24981
24982        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24983        if test -d "$BOOT_JDK"; then
24984          BOOT_JDK_FOUND=maybe
24985          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24986$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24987        fi
24988
24989
24990    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24991    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24992      # Do we have a bin/java?
24993      if test ! -x "$BOOT_JDK/bin/java"; then
24994        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24995$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24996        BOOT_JDK_FOUND=no
24997      else
24998        # Do we have a bin/javac?
24999        if test ! -x "$BOOT_JDK/bin/javac"; then
25000          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25001$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25002          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25003$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25004          BOOT_JDK_FOUND=no
25005        else
25006          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
25007          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
25008            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
25009$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
25010            BOOT_JDK_FOUND=no
25011          else
25012            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25013            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25014
25015            # Extra M4 quote needed to protect [] in grep expression.
25016            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25017            if test "x$FOUND_CORRECT_VERSION" = x; then
25018              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25019$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25020              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25021$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25022              BOOT_JDK_FOUND=no
25023            else
25024              # We're done! :-)
25025              BOOT_JDK_FOUND=yes
25026
25027  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25028
25029  # Input might be given as Windows format, start by converting to
25030  # unix format.
25031  path="$BOOT_JDK"
25032  new_path=`$CYGPATH -u "$path"`
25033
25034  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25035  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25036  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25037  # "foo.exe" is OK but "foo" is an error.
25038  #
25039  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25040  # It is also a way to make sure we got the proper file name for the real test later on.
25041  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25042  if test "x$test_shortpath" = x; then
25043    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25044$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25045    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25046  fi
25047
25048  # Call helper function which possibly converts this using DOS-style short mode.
25049  # If so, the updated path is stored in $new_path.
25050
25051  input_path="$new_path"
25052  # Check if we need to convert this using DOS-style short mode. If the path
25053  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25054  # take no chances and rewrite it.
25055  # Note: m4 eats our [], so we need to use [ and ] instead.
25056  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25057  if test "x$has_forbidden_chars" != x; then
25058    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25059    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25060    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25061    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25062      # Going to short mode and back again did indeed matter. Since short mode is
25063      # case insensitive, let's make it lowercase to improve readability.
25064      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25065      # Now convert it back to Unix-stile (cygpath)
25066      input_path=`$CYGPATH -u "$shortmode_path"`
25067      new_path="$input_path"
25068    fi
25069  fi
25070
25071  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25072  if test "x$test_cygdrive_prefix" = x; then
25073    # As a simple fix, exclude /usr/bin since it's not a real path.
25074    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25075      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25076      # a path prefixed by /cygdrive for fixpath to work.
25077      new_path="$CYGWIN_ROOT_PATH$input_path"
25078    fi
25079  fi
25080
25081
25082  if test "x$path" != "x$new_path"; then
25083    BOOT_JDK="$new_path"
25084    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25085$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25086  fi
25087
25088  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25089
25090  path="$BOOT_JDK"
25091  has_colon=`$ECHO $path | $GREP ^.:`
25092  new_path="$path"
25093  if test "x$has_colon" = x; then
25094    # Not in mixed or Windows style, start by that.
25095    new_path=`cmd //c echo $path`
25096  fi
25097
25098
25099  input_path="$new_path"
25100  # Check if we need to convert this using DOS-style short mode. If the path
25101  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25102  # take no chances and rewrite it.
25103  # Note: m4 eats our [], so we need to use [ and ] instead.
25104  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25105  if test "x$has_forbidden_chars" != x; then
25106    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25107    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25108  fi
25109
25110
25111  windows_path="$new_path"
25112  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25113    unix_path=`$CYGPATH -u "$windows_path"`
25114    new_path="$unix_path"
25115  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25116    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25117    new_path="$unix_path"
25118  fi
25119
25120  if test "x$path" != "x$new_path"; then
25121    BOOT_JDK="$new_path"
25122    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25123$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25124  fi
25125
25126  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25127  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25128
25129  else
25130    # We're on a unix platform. Hooray! :)
25131    path="$BOOT_JDK"
25132    has_space=`$ECHO "$path" | $GREP " "`
25133    if test "x$has_space" != x; then
25134      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25135$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25136      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25137    fi
25138
25139    # Use eval to expand a potential ~
25140    eval path="$path"
25141    if test ! -f "$path" && test ! -d "$path"; then
25142      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25143    fi
25144
25145    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25146  fi
25147
25148              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25149$as_echo_n "checking for Boot JDK... " >&6; }
25150              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25151$as_echo "$BOOT_JDK" >&6; }
25152              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25153$as_echo_n "checking Boot JDK version... " >&6; }
25154              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25155              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25156$as_echo "$BOOT_JDK_VERSION" >&6; }
25157            fi # end check jdk version
25158          fi # end check rt.jar
25159        fi # end check javac
25160      fi # end check java
25161    fi # end check boot jdk found
25162  fi
25163
25164    done
25165  fi
25166
25167
25168    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25169    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25170      # Do we have a bin/java?
25171      if test ! -x "$BOOT_JDK/bin/java"; then
25172        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25173$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25174        BOOT_JDK_FOUND=no
25175      else
25176        # Do we have a bin/javac?
25177        if test ! -x "$BOOT_JDK/bin/javac"; then
25178          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25179$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25180          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25181$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25182          BOOT_JDK_FOUND=no
25183        else
25184          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
25185          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
25186            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
25187$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
25188            BOOT_JDK_FOUND=no
25189          else
25190            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25191            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25192
25193            # Extra M4 quote needed to protect [] in grep expression.
25194            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25195            if test "x$FOUND_CORRECT_VERSION" = x; then
25196              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25197$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25198              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25199$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25200              BOOT_JDK_FOUND=no
25201            else
25202              # We're done! :-)
25203              BOOT_JDK_FOUND=yes
25204
25205  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25206
25207  # Input might be given as Windows format, start by converting to
25208  # unix format.
25209  path="$BOOT_JDK"
25210  new_path=`$CYGPATH -u "$path"`
25211
25212  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25213  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25214  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25215  # "foo.exe" is OK but "foo" is an error.
25216  #
25217  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25218  # It is also a way to make sure we got the proper file name for the real test later on.
25219  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25220  if test "x$test_shortpath" = x; then
25221    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25222$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25223    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25224  fi
25225
25226  # Call helper function which possibly converts this using DOS-style short mode.
25227  # If so, the updated path is stored in $new_path.
25228
25229  input_path="$new_path"
25230  # Check if we need to convert this using DOS-style short mode. If the path
25231  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25232  # take no chances and rewrite it.
25233  # Note: m4 eats our [], so we need to use [ and ] instead.
25234  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25235  if test "x$has_forbidden_chars" != x; then
25236    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25237    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25238    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25239    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25240      # Going to short mode and back again did indeed matter. Since short mode is
25241      # case insensitive, let's make it lowercase to improve readability.
25242      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25243      # Now convert it back to Unix-stile (cygpath)
25244      input_path=`$CYGPATH -u "$shortmode_path"`
25245      new_path="$input_path"
25246    fi
25247  fi
25248
25249  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25250  if test "x$test_cygdrive_prefix" = x; then
25251    # As a simple fix, exclude /usr/bin since it's not a real path.
25252    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25253      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25254      # a path prefixed by /cygdrive for fixpath to work.
25255      new_path="$CYGWIN_ROOT_PATH$input_path"
25256    fi
25257  fi
25258
25259
25260  if test "x$path" != "x$new_path"; then
25261    BOOT_JDK="$new_path"
25262    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25263$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25264  fi
25265
25266  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25267
25268  path="$BOOT_JDK"
25269  has_colon=`$ECHO $path | $GREP ^.:`
25270  new_path="$path"
25271  if test "x$has_colon" = x; then
25272    # Not in mixed or Windows style, start by that.
25273    new_path=`cmd //c echo $path`
25274  fi
25275
25276
25277  input_path="$new_path"
25278  # Check if we need to convert this using DOS-style short mode. If the path
25279  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25280  # take no chances and rewrite it.
25281  # Note: m4 eats our [], so we need to use [ and ] instead.
25282  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25283  if test "x$has_forbidden_chars" != x; then
25284    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25285    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25286  fi
25287
25288
25289  windows_path="$new_path"
25290  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25291    unix_path=`$CYGPATH -u "$windows_path"`
25292    new_path="$unix_path"
25293  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25294    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25295    new_path="$unix_path"
25296  fi
25297
25298  if test "x$path" != "x$new_path"; then
25299    BOOT_JDK="$new_path"
25300    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25301$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25302  fi
25303
25304  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25305  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25306
25307  else
25308    # We're on a unix platform. Hooray! :)
25309    path="$BOOT_JDK"
25310    has_space=`$ECHO "$path" | $GREP " "`
25311    if test "x$has_space" != x; then
25312      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25313$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25314      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25315    fi
25316
25317    # Use eval to expand a potential ~
25318    eval path="$path"
25319    if test ! -f "$path" && test ! -d "$path"; then
25320      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25321    fi
25322
25323    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25324  fi
25325
25326              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25327$as_echo_n "checking for Boot JDK... " >&6; }
25328              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25329$as_echo "$BOOT_JDK" >&6; }
25330              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25331$as_echo_n "checking Boot JDK version... " >&6; }
25332              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25333              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25334$as_echo "$BOOT_JDK_VERSION" >&6; }
25335            fi # end check jdk version
25336          fi # end check rt.jar
25337        fi # end check javac
25338      fi # end check java
25339    fi # end check boot jdk found
25340  fi
25341
25342  fi
25343
25344
25345    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25346    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25347      # Do we have a bin/java?
25348      if test ! -x "$BOOT_JDK/bin/java"; then
25349        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25350$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25351        BOOT_JDK_FOUND=no
25352      else
25353        # Do we have a bin/javac?
25354        if test ! -x "$BOOT_JDK/bin/javac"; then
25355          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25356$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25357          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25358$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25359          BOOT_JDK_FOUND=no
25360        else
25361          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
25362          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
25363            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
25364$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
25365            BOOT_JDK_FOUND=no
25366          else
25367            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25368            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25369
25370            # Extra M4 quote needed to protect [] in grep expression.
25371            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25372            if test "x$FOUND_CORRECT_VERSION" = x; then
25373              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25374$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25375              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25376$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25377              BOOT_JDK_FOUND=no
25378            else
25379              # We're done! :-)
25380              BOOT_JDK_FOUND=yes
25381
25382  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25383
25384  # Input might be given as Windows format, start by converting to
25385  # unix format.
25386  path="$BOOT_JDK"
25387  new_path=`$CYGPATH -u "$path"`
25388
25389  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25390  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25391  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25392  # "foo.exe" is OK but "foo" is an error.
25393  #
25394  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25395  # It is also a way to make sure we got the proper file name for the real test later on.
25396  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25397  if test "x$test_shortpath" = x; then
25398    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25399$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25400    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25401  fi
25402
25403  # Call helper function which possibly converts this using DOS-style short mode.
25404  # If so, the updated path is stored in $new_path.
25405
25406  input_path="$new_path"
25407  # Check if we need to convert this using DOS-style short mode. If the path
25408  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25409  # take no chances and rewrite it.
25410  # Note: m4 eats our [], so we need to use [ and ] instead.
25411  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25412  if test "x$has_forbidden_chars" != x; then
25413    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25414    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25415    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25416    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25417      # Going to short mode and back again did indeed matter. Since short mode is
25418      # case insensitive, let's make it lowercase to improve readability.
25419      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25420      # Now convert it back to Unix-stile (cygpath)
25421      input_path=`$CYGPATH -u "$shortmode_path"`
25422      new_path="$input_path"
25423    fi
25424  fi
25425
25426  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25427  if test "x$test_cygdrive_prefix" = x; then
25428    # As a simple fix, exclude /usr/bin since it's not a real path.
25429    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25430      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25431      # a path prefixed by /cygdrive for fixpath to work.
25432      new_path="$CYGWIN_ROOT_PATH$input_path"
25433    fi
25434  fi
25435
25436
25437  if test "x$path" != "x$new_path"; then
25438    BOOT_JDK="$new_path"
25439    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25440$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25441  fi
25442
25443  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25444
25445  path="$BOOT_JDK"
25446  has_colon=`$ECHO $path | $GREP ^.:`
25447  new_path="$path"
25448  if test "x$has_colon" = x; then
25449    # Not in mixed or Windows style, start by that.
25450    new_path=`cmd //c echo $path`
25451  fi
25452
25453
25454  input_path="$new_path"
25455  # Check if we need to convert this using DOS-style short mode. If the path
25456  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25457  # take no chances and rewrite it.
25458  # Note: m4 eats our [], so we need to use [ and ] instead.
25459  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25460  if test "x$has_forbidden_chars" != x; then
25461    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25462    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25463  fi
25464
25465
25466  windows_path="$new_path"
25467  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25468    unix_path=`$CYGPATH -u "$windows_path"`
25469    new_path="$unix_path"
25470  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25471    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25472    new_path="$unix_path"
25473  fi
25474
25475  if test "x$path" != "x$new_path"; then
25476    BOOT_JDK="$new_path"
25477    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25478$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25479  fi
25480
25481  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25482  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25483
25484  else
25485    # We're on a unix platform. Hooray! :)
25486    path="$BOOT_JDK"
25487    has_space=`$ECHO "$path" | $GREP " "`
25488    if test "x$has_space" != x; then
25489      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25490$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25491      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25492    fi
25493
25494    # Use eval to expand a potential ~
25495    eval path="$path"
25496    if test ! -f "$path" && test ! -d "$path"; then
25497      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25498    fi
25499
25500    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25501  fi
25502
25503              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25504$as_echo_n "checking for Boot JDK... " >&6; }
25505              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25506$as_echo "$BOOT_JDK" >&6; }
25507              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25508$as_echo_n "checking Boot JDK version... " >&6; }
25509              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25510              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25511$as_echo "$BOOT_JDK_VERSION" >&6; }
25512            fi # end check jdk version
25513          fi # end check rt.jar
25514        fi # end check javac
25515      fi # end check java
25516    fi # end check boot jdk found
25517  fi
25518
25519
25520  # If we haven't found anything yet, we've truly lost. Give up.
25521  if test "x$BOOT_JDK_FOUND" = xno; then
25522
25523  # Print a helpful message on how to acquire the necessary build dependency.
25524  # openjdk is the help tag: freetype, cups, pulse, alsa etc
25525  MISSING_DEPENDENCY=openjdk
25526
25527  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25528    cygwin_help $MISSING_DEPENDENCY
25529  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25530    msys_help $MISSING_DEPENDENCY
25531  else
25532    PKGHANDLER_COMMAND=
25533
25534    case $PKGHANDLER in
25535      apt-get)
25536        apt_help     $MISSING_DEPENDENCY ;;
25537      yum)
25538        yum_help     $MISSING_DEPENDENCY ;;
25539      port)
25540        port_help    $MISSING_DEPENDENCY ;;
25541      pkgutil)
25542        pkgutil_help $MISSING_DEPENDENCY ;;
25543      pkgadd)
25544        pkgadd_help  $MISSING_DEPENDENCY ;;
25545    esac
25546
25547    if test "x$PKGHANDLER_COMMAND" != x; then
25548      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
25549    fi
25550  fi
25551
25552    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
25553$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
25554    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
25555$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25556    as_fn_error $? "Cannot continue" "$LINENO" 5
25557  fi
25558
25559  # Setup proper paths for what we found
25560  BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
25561  if test ! -f "$BOOT_RTJAR"; then
25562    # On MacOSX it is called classes.jar
25563    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
25564    if test -f "$BOOT_RTJAR"; then
25565      # Remove the ..
25566      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
25567    fi
25568  fi
25569  BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
25570  BOOT_JDK="$BOOT_JDK"
25571
25572
25573
25574
25575  # Setup tools from the Boot JDK.
25576
25577  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25578
25579  # Publish this variable in the help.
25580
25581
25582  if test "x$JAVA" = x; then
25583    # The variable is not set by user, try to locate tool using the code snippet
25584
25585      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25586$as_echo_n "checking for java in Boot JDK... " >&6; }
25587      JAVA=$BOOT_JDK/bin/java
25588      if test ! -x $JAVA; then
25589        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25590$as_echo "not found" >&6; }
25591        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25592$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25593        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25594      fi
25595      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25596$as_echo "ok" >&6; }
25597
25598
25599  else
25600    # The variable is set, but is it from the command line or the environment?
25601
25602    # Try to remove the string !JAVA! from our list.
25603    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
25604    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25605      # If it failed, the variable was not from the command line. Ignore it,
25606      # but warn the user (except for BASH, which is always set by the calling BASH).
25607      if test "xJAVA" != xBASH; then
25608        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
25609$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
25610      fi
25611      # Try to locate tool using the code snippet
25612
25613      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25614$as_echo_n "checking for java in Boot JDK... " >&6; }
25615      JAVA=$BOOT_JDK/bin/java
25616      if test ! -x $JAVA; then
25617        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25618$as_echo "not found" >&6; }
25619        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25620$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25621        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25622      fi
25623      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25624$as_echo "ok" >&6; }
25625
25626
25627    else
25628      # If it succeeded, then it was overridden by the user. We will use it
25629      # for the tool.
25630
25631      # First remove it from the list of overridden variables, so we can test
25632      # for unknown variables in the end.
25633      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25634
25635      # Check if the provided tool contains a complete path.
25636      tool_specified="$JAVA"
25637      tool_basename="${tool_specified##*/}"
25638      if test "x$tool_basename" = "x$tool_specified"; then
25639        # A command without a complete path is provided, search $PATH.
25640        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
25641$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
25642        # Extract the first word of "$tool_basename", so it can be a program name with args.
25643set dummy $tool_basename; ac_word=$2
25644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25645$as_echo_n "checking for $ac_word... " >&6; }
25646if ${ac_cv_path_JAVA+:} false; then :
25647  $as_echo_n "(cached) " >&6
25648else
25649  case $JAVA in
25650  [\\/]* | ?:[\\/]*)
25651  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
25652  ;;
25653  *)
25654  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25655for as_dir in $PATH
25656do
25657  IFS=$as_save_IFS
25658  test -z "$as_dir" && as_dir=.
25659    for ac_exec_ext in '' $ac_executable_extensions; do
25660  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25661    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
25662    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25663    break 2
25664  fi
25665done
25666  done
25667IFS=$as_save_IFS
25668
25669  ;;
25670esac
25671fi
25672JAVA=$ac_cv_path_JAVA
25673if test -n "$JAVA"; then
25674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
25675$as_echo "$JAVA" >&6; }
25676else
25677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25678$as_echo "no" >&6; }
25679fi
25680
25681
25682        if test "x$JAVA" = x; then
25683          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25684        fi
25685      else
25686        # Otherwise we believe it is a complete path. Use it as it is.
25687        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
25688$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
25689        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
25690$as_echo_n "checking for JAVA... " >&6; }
25691        if test ! -x "$tool_specified"; then
25692          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25693$as_echo "not found" >&6; }
25694          as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
25695        fi
25696        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25697$as_echo "$tool_specified" >&6; }
25698      fi
25699    fi
25700  fi
25701
25702
25703
25704  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25705
25706  # Publish this variable in the help.
25707
25708
25709  if test "x$JAVAC" = x; then
25710    # The variable is not set by user, try to locate tool using the code snippet
25711
25712      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25713$as_echo_n "checking for javac in Boot JDK... " >&6; }
25714      JAVAC=$BOOT_JDK/bin/javac
25715      if test ! -x $JAVAC; then
25716        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25717$as_echo "not found" >&6; }
25718        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25719$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25720        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25721      fi
25722      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25723$as_echo "ok" >&6; }
25724
25725
25726  else
25727    # The variable is set, but is it from the command line or the environment?
25728
25729    # Try to remove the string !JAVAC! from our list.
25730    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
25731    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25732      # If it failed, the variable was not from the command line. Ignore it,
25733      # but warn the user (except for BASH, which is always set by the calling BASH).
25734      if test "xJAVAC" != xBASH; then
25735        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
25736$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
25737      fi
25738      # Try to locate tool using the code snippet
25739
25740      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25741$as_echo_n "checking for javac in Boot JDK... " >&6; }
25742      JAVAC=$BOOT_JDK/bin/javac
25743      if test ! -x $JAVAC; then
25744        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25745$as_echo "not found" >&6; }
25746        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25747$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25748        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25749      fi
25750      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25751$as_echo "ok" >&6; }
25752
25753
25754    else
25755      # If it succeeded, then it was overridden by the user. We will use it
25756      # for the tool.
25757
25758      # First remove it from the list of overridden variables, so we can test
25759      # for unknown variables in the end.
25760      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25761
25762      # Check if the provided tool contains a complete path.
25763      tool_specified="$JAVAC"
25764      tool_basename="${tool_specified##*/}"
25765      if test "x$tool_basename" = "x$tool_specified"; then
25766        # A command without a complete path is provided, search $PATH.
25767        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
25768$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
25769        # Extract the first word of "$tool_basename", so it can be a program name with args.
25770set dummy $tool_basename; ac_word=$2
25771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25772$as_echo_n "checking for $ac_word... " >&6; }
25773if ${ac_cv_path_JAVAC+:} false; then :
25774  $as_echo_n "(cached) " >&6
25775else
25776  case $JAVAC in
25777  [\\/]* | ?:[\\/]*)
25778  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
25779  ;;
25780  *)
25781  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25782for as_dir in $PATH
25783do
25784  IFS=$as_save_IFS
25785  test -z "$as_dir" && as_dir=.
25786    for ac_exec_ext in '' $ac_executable_extensions; do
25787  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25788    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
25789    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25790    break 2
25791  fi
25792done
25793  done
25794IFS=$as_save_IFS
25795
25796  ;;
25797esac
25798fi
25799JAVAC=$ac_cv_path_JAVAC
25800if test -n "$JAVAC"; then
25801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
25802$as_echo "$JAVAC" >&6; }
25803else
25804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25805$as_echo "no" >&6; }
25806fi
25807
25808
25809        if test "x$JAVAC" = x; then
25810          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25811        fi
25812      else
25813        # Otherwise we believe it is a complete path. Use it as it is.
25814        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
25815$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
25816        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
25817$as_echo_n "checking for JAVAC... " >&6; }
25818        if test ! -x "$tool_specified"; then
25819          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25820$as_echo "not found" >&6; }
25821          as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
25822        fi
25823        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25824$as_echo "$tool_specified" >&6; }
25825      fi
25826    fi
25827  fi
25828
25829
25830
25831  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25832
25833  # Publish this variable in the help.
25834
25835
25836  if test "x$JAVAH" = x; then
25837    # The variable is not set by user, try to locate tool using the code snippet
25838
25839      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25840$as_echo_n "checking for javah in Boot JDK... " >&6; }
25841      JAVAH=$BOOT_JDK/bin/javah
25842      if test ! -x $JAVAH; then
25843        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25844$as_echo "not found" >&6; }
25845        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25846$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25847        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25848      fi
25849      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25850$as_echo "ok" >&6; }
25851
25852
25853  else
25854    # The variable is set, but is it from the command line or the environment?
25855
25856    # Try to remove the string !JAVAH! from our list.
25857    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
25858    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25859      # If it failed, the variable was not from the command line. Ignore it,
25860      # but warn the user (except for BASH, which is always set by the calling BASH).
25861      if test "xJAVAH" != xBASH; then
25862        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
25863$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
25864      fi
25865      # Try to locate tool using the code snippet
25866
25867      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25868$as_echo_n "checking for javah in Boot JDK... " >&6; }
25869      JAVAH=$BOOT_JDK/bin/javah
25870      if test ! -x $JAVAH; then
25871        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25872$as_echo "not found" >&6; }
25873        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25874$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25875        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25876      fi
25877      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25878$as_echo "ok" >&6; }
25879
25880
25881    else
25882      # If it succeeded, then it was overridden by the user. We will use it
25883      # for the tool.
25884
25885      # First remove it from the list of overridden variables, so we can test
25886      # for unknown variables in the end.
25887      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25888
25889      # Check if the provided tool contains a complete path.
25890      tool_specified="$JAVAH"
25891      tool_basename="${tool_specified##*/}"
25892      if test "x$tool_basename" = "x$tool_specified"; then
25893        # A command without a complete path is provided, search $PATH.
25894        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
25895$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
25896        # Extract the first word of "$tool_basename", so it can be a program name with args.
25897set dummy $tool_basename; ac_word=$2
25898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25899$as_echo_n "checking for $ac_word... " >&6; }
25900if ${ac_cv_path_JAVAH+:} false; then :
25901  $as_echo_n "(cached) " >&6
25902else
25903  case $JAVAH in
25904  [\\/]* | ?:[\\/]*)
25905  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
25906  ;;
25907  *)
25908  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25909for as_dir in $PATH
25910do
25911  IFS=$as_save_IFS
25912  test -z "$as_dir" && as_dir=.
25913    for ac_exec_ext in '' $ac_executable_extensions; do
25914  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25915    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
25916    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25917    break 2
25918  fi
25919done
25920  done
25921IFS=$as_save_IFS
25922
25923  ;;
25924esac
25925fi
25926JAVAH=$ac_cv_path_JAVAH
25927if test -n "$JAVAH"; then
25928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
25929$as_echo "$JAVAH" >&6; }
25930else
25931  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25932$as_echo "no" >&6; }
25933fi
25934
25935
25936        if test "x$JAVAH" = x; then
25937          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25938        fi
25939      else
25940        # Otherwise we believe it is a complete path. Use it as it is.
25941        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
25942$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
25943        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
25944$as_echo_n "checking for JAVAH... " >&6; }
25945        if test ! -x "$tool_specified"; then
25946          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25947$as_echo "not found" >&6; }
25948          as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
25949        fi
25950        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25951$as_echo "$tool_specified" >&6; }
25952      fi
25953    fi
25954  fi
25955
25956
25957
25958  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25959
25960  # Publish this variable in the help.
25961
25962
25963  if test "x$JAR" = x; then
25964    # The variable is not set by user, try to locate tool using the code snippet
25965
25966      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25967$as_echo_n "checking for jar in Boot JDK... " >&6; }
25968      JAR=$BOOT_JDK/bin/jar
25969      if test ! -x $JAR; then
25970        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25971$as_echo "not found" >&6; }
25972        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25973$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25974        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25975      fi
25976      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25977$as_echo "ok" >&6; }
25978
25979
25980  else
25981    # The variable is set, but is it from the command line or the environment?
25982
25983    # Try to remove the string !JAR! from our list.
25984    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
25985    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25986      # If it failed, the variable was not from the command line. Ignore it,
25987      # but warn the user (except for BASH, which is always set by the calling BASH).
25988      if test "xJAR" != xBASH; then
25989        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
25990$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
25991      fi
25992      # Try to locate tool using the code snippet
25993
25994      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25995$as_echo_n "checking for jar in Boot JDK... " >&6; }
25996      JAR=$BOOT_JDK/bin/jar
25997      if test ! -x $JAR; then
25998        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25999$as_echo "not found" >&6; }
26000        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26001$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26002        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
26003      fi
26004      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26005$as_echo "ok" >&6; }
26006
26007
26008    else
26009      # If it succeeded, then it was overridden by the user. We will use it
26010      # for the tool.
26011
26012      # First remove it from the list of overridden variables, so we can test
26013      # for unknown variables in the end.
26014      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26015
26016      # Check if the provided tool contains a complete path.
26017      tool_specified="$JAR"
26018      tool_basename="${tool_specified##*/}"
26019      if test "x$tool_basename" = "x$tool_specified"; then
26020        # A command without a complete path is provided, search $PATH.
26021        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
26022$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
26023        # Extract the first word of "$tool_basename", so it can be a program name with args.
26024set dummy $tool_basename; ac_word=$2
26025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26026$as_echo_n "checking for $ac_word... " >&6; }
26027if ${ac_cv_path_JAR+:} false; then :
26028  $as_echo_n "(cached) " >&6
26029else
26030  case $JAR in
26031  [\\/]* | ?:[\\/]*)
26032  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
26033  ;;
26034  *)
26035  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26036for as_dir in $PATH
26037do
26038  IFS=$as_save_IFS
26039  test -z "$as_dir" && as_dir=.
26040    for ac_exec_ext in '' $ac_executable_extensions; do
26041  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26042    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
26043    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26044    break 2
26045  fi
26046done
26047  done
26048IFS=$as_save_IFS
26049
26050  ;;
26051esac
26052fi
26053JAR=$ac_cv_path_JAR
26054if test -n "$JAR"; then
26055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
26056$as_echo "$JAR" >&6; }
26057else
26058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26059$as_echo "no" >&6; }
26060fi
26061
26062
26063        if test "x$JAR" = x; then
26064          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26065        fi
26066      else
26067        # Otherwise we believe it is a complete path. Use it as it is.
26068        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
26069$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
26070        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
26071$as_echo_n "checking for JAR... " >&6; }
26072        if test ! -x "$tool_specified"; then
26073          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26074$as_echo "not found" >&6; }
26075          as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
26076        fi
26077        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26078$as_echo "$tool_specified" >&6; }
26079      fi
26080    fi
26081  fi
26082
26083
26084
26085  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26086
26087  # Publish this variable in the help.
26088
26089
26090  if test "x$NATIVE2ASCII" = x; then
26091    # The variable is not set by user, try to locate tool using the code snippet
26092
26093      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
26094$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
26095      NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
26096      if test ! -x $NATIVE2ASCII; then
26097        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26098$as_echo "not found" >&6; }
26099        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26100$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26101        as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
26102      fi
26103      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26104$as_echo "ok" >&6; }
26105
26106
26107  else
26108    # The variable is set, but is it from the command line or the environment?
26109
26110    # Try to remove the string !NATIVE2ASCII! from our list.
26111    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NATIVE2ASCII!/}
26112    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26113      # If it failed, the variable was not from the command line. Ignore it,
26114      # but warn the user (except for BASH, which is always set by the calling BASH).
26115      if test "xNATIVE2ASCII" != xBASH; then
26116        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NATIVE2ASCII from the environment. Use command line variables instead." >&5
26117$as_echo "$as_me: WARNING: Ignoring value of NATIVE2ASCII from the environment. Use command line variables instead." >&2;}
26118      fi
26119      # Try to locate tool using the code snippet
26120
26121      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
26122$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
26123      NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
26124      if test ! -x $NATIVE2ASCII; then
26125        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26126$as_echo "not found" >&6; }
26127        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26128$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26129        as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
26130      fi
26131      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26132$as_echo "ok" >&6; }
26133
26134
26135    else
26136      # If it succeeded, then it was overridden by the user. We will use it
26137      # for the tool.
26138
26139      # First remove it from the list of overridden variables, so we can test
26140      # for unknown variables in the end.
26141      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26142
26143      # Check if the provided tool contains a complete path.
26144      tool_specified="$NATIVE2ASCII"
26145      tool_basename="${tool_specified##*/}"
26146      if test "x$tool_basename" = "x$tool_specified"; then
26147        # A command without a complete path is provided, search $PATH.
26148        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NATIVE2ASCII=$tool_basename" >&5
26149$as_echo "$as_me: Will search for user supplied tool NATIVE2ASCII=$tool_basename" >&6;}
26150        # Extract the first word of "$tool_basename", so it can be a program name with args.
26151set dummy $tool_basename; ac_word=$2
26152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26153$as_echo_n "checking for $ac_word... " >&6; }
26154if ${ac_cv_path_NATIVE2ASCII+:} false; then :
26155  $as_echo_n "(cached) " >&6
26156else
26157  case $NATIVE2ASCII in
26158  [\\/]* | ?:[\\/]*)
26159  ac_cv_path_NATIVE2ASCII="$NATIVE2ASCII" # Let the user override the test with a path.
26160  ;;
26161  *)
26162  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26163for as_dir in $PATH
26164do
26165  IFS=$as_save_IFS
26166  test -z "$as_dir" && as_dir=.
26167    for ac_exec_ext in '' $ac_executable_extensions; do
26168  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26169    ac_cv_path_NATIVE2ASCII="$as_dir/$ac_word$ac_exec_ext"
26170    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26171    break 2
26172  fi
26173done
26174  done
26175IFS=$as_save_IFS
26176
26177  ;;
26178esac
26179fi
26180NATIVE2ASCII=$ac_cv_path_NATIVE2ASCII
26181if test -n "$NATIVE2ASCII"; then
26182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE2ASCII" >&5
26183$as_echo "$NATIVE2ASCII" >&6; }
26184else
26185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26186$as_echo "no" >&6; }
26187fi
26188
26189
26190        if test "x$NATIVE2ASCII" = x; then
26191          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26192        fi
26193      else
26194        # Otherwise we believe it is a complete path. Use it as it is.
26195        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NATIVE2ASCII=$tool_specified" >&5
26196$as_echo "$as_me: Will use user supplied tool NATIVE2ASCII=$tool_specified" >&6;}
26197        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NATIVE2ASCII" >&5
26198$as_echo_n "checking for NATIVE2ASCII... " >&6; }
26199        if test ! -x "$tool_specified"; then
26200          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26201$as_echo "not found" >&6; }
26202          as_fn_error $? "User supplied tool NATIVE2ASCII=$tool_specified does not exist or is not executable" "$LINENO" 5
26203        fi
26204        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26205$as_echo "$tool_specified" >&6; }
26206      fi
26207    fi
26208  fi
26209
26210
26211
26212  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26213
26214  # Publish this variable in the help.
26215
26216
26217  if test "x$JARSIGNER" = x; then
26218    # The variable is not set by user, try to locate tool using the code snippet
26219
26220      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
26221$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
26222      JARSIGNER=$BOOT_JDK/bin/jarsigner
26223      if test ! -x $JARSIGNER; then
26224        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26225$as_echo "not found" >&6; }
26226        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26227$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26228        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
26229      fi
26230      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26231$as_echo "ok" >&6; }
26232
26233
26234  else
26235    # The variable is set, but is it from the command line or the environment?
26236
26237    # Try to remove the string !JARSIGNER! from our list.
26238    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
26239    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26240      # If it failed, the variable was not from the command line. Ignore it,
26241      # but warn the user (except for BASH, which is always set by the calling BASH).
26242      if test "xJARSIGNER" != xBASH; then
26243        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
26244$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
26245      fi
26246      # Try to locate tool using the code snippet
26247
26248      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
26249$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
26250      JARSIGNER=$BOOT_JDK/bin/jarsigner
26251      if test ! -x $JARSIGNER; then
26252        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26253$as_echo "not found" >&6; }
26254        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26255$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26256        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
26257      fi
26258      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26259$as_echo "ok" >&6; }
26260
26261
26262    else
26263      # If it succeeded, then it was overridden by the user. We will use it
26264      # for the tool.
26265
26266      # First remove it from the list of overridden variables, so we can test
26267      # for unknown variables in the end.
26268      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26269
26270      # Check if the provided tool contains a complete path.
26271      tool_specified="$JARSIGNER"
26272      tool_basename="${tool_specified##*/}"
26273      if test "x$tool_basename" = "x$tool_specified"; then
26274        # A command without a complete path is provided, search $PATH.
26275        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
26276$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
26277        # Extract the first word of "$tool_basename", so it can be a program name with args.
26278set dummy $tool_basename; ac_word=$2
26279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26280$as_echo_n "checking for $ac_word... " >&6; }
26281if ${ac_cv_path_JARSIGNER+:} false; then :
26282  $as_echo_n "(cached) " >&6
26283else
26284  case $JARSIGNER in
26285  [\\/]* | ?:[\\/]*)
26286  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
26287  ;;
26288  *)
26289  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26290for as_dir in $PATH
26291do
26292  IFS=$as_save_IFS
26293  test -z "$as_dir" && as_dir=.
26294    for ac_exec_ext in '' $ac_executable_extensions; do
26295  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26296    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
26297    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26298    break 2
26299  fi
26300done
26301  done
26302IFS=$as_save_IFS
26303
26304  ;;
26305esac
26306fi
26307JARSIGNER=$ac_cv_path_JARSIGNER
26308if test -n "$JARSIGNER"; then
26309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
26310$as_echo "$JARSIGNER" >&6; }
26311else
26312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26313$as_echo "no" >&6; }
26314fi
26315
26316
26317        if test "x$JARSIGNER" = x; then
26318          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26319        fi
26320      else
26321        # Otherwise we believe it is a complete path. Use it as it is.
26322        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
26323$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
26324        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
26325$as_echo_n "checking for JARSIGNER... " >&6; }
26326        if test ! -x "$tool_specified"; then
26327          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26328$as_echo "not found" >&6; }
26329          as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
26330        fi
26331        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26332$as_echo "$tool_specified" >&6; }
26333      fi
26334    fi
26335  fi
26336
26337
26338
26339  # Finally, set some other options...
26340
26341  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
26342  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
26343
26344
26345
26346
26347###############################################################################
26348#
26349# Configure the sources to use. We can add or override individual directories.
26350#
26351###############################################################################
26352
26353
26354  # Where are the sources. Any of these can be overridden
26355  # using --with-override-corba and the likes.
26356  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
26357  CORBA_TOPDIR="$SRC_ROOT/corba"
26358  JAXP_TOPDIR="$SRC_ROOT/jaxp"
26359  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
26360  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
26361  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
26362  JDK_TOPDIR="$SRC_ROOT/jdk"
26363
26364
26365
26366
26367
26368
26369
26370
26371
26372
26373  ###############################################################################
26374  #
26375  # Pickup additional source for a component from outside of the source root
26376  # or override source for a component.
26377  #
26378
26379# Check whether --with-add-source-root was given.
26380if test "${with_add_source_root+set}" = set; then :
26381  withval=$with_add_source_root;
26382fi
26383
26384
26385
26386# Check whether --with-override-source-root was given.
26387if test "${with_override_source_root+set}" = set; then :
26388  withval=$with_override_source_root;
26389fi
26390
26391
26392
26393# Check whether --with-adds-and-overrides was given.
26394if test "${with_adds_and_overrides+set}" = set; then :
26395  withval=$with_adds_and_overrides;
26396fi
26397
26398
26399  if test "x$with_adds_and_overrides" != x; then
26400    with_add_source_root="$with_adds_and_overrides/adds"
26401    with_override_source_root="$with_adds_and_overrides/overrides"
26402  fi
26403
26404  if test "x$with_add_source_root" != x; then
26405    if ! test -d $with_add_source_root; then
26406      as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
26407    fi
26408    CURDIR="$PWD"
26409    cd "$with_add_source_root"
26410    ADD_SRC_ROOT="`pwd`"
26411    cd "$CURDIR"
26412    # Verify that the addon source root does not have any root makefiles.
26413    # If it does, then it is usually an error, prevent this.
26414    if test -f $with_add_source_root/langtools/make/Makefile; then
26415      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
26416    fi
26417    if test -f $with_add_source_root/corba/make/Makefile; then
26418      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
26419    fi
26420    if test -f $with_add_source_root/jaxp/make/Makefile; then
26421      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
26422    fi
26423    if test -f $with_add_source_root/jaxws/make/Makefile; then
26424      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
26425    fi
26426    if test -f $with_add_source_root/hotspot/make/Makefile; then
26427      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
26428    fi
26429    if test -f $with_add_source_root/nashorn/make/Makefile; then
26430      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
26431    fi
26432    if test -f $with_add_source_root/jdk/make/Makefile; then
26433      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
26434    fi
26435  fi
26436
26437
26438  if test "x$with_override_source_root" != x; then
26439    if ! test -d $with_override_source_root; then
26440      as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
26441    fi
26442    CURDIR="$PWD"
26443    cd "$with_override_source_root"
26444    OVERRIDE_SRC_ROOT="`pwd`"
26445    cd "$CURDIR"
26446    if test -f $with_override_source_root/langtools/make/Makefile; then
26447      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
26448    fi
26449    if test -f $with_override_source_root/corba/make/Makefile; then
26450      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
26451    fi
26452    if test -f $with_override_source_root/jaxp/make/Makefile; then
26453      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
26454    fi
26455    if test -f $with_override_source_root/jaxws/make/Makefile; then
26456      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
26457    fi
26458    if test -f $with_override_source_root/hotspot/make/Makefile; then
26459      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
26460    fi
26461    if test -f $with_override_source_root/nashorn/make/Makefile; then
26462      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
26463    fi
26464    if test -f $with_override_source_root/jdk/make/Makefile; then
26465      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
26466    fi
26467  fi
26468
26469
26470  ###############################################################################
26471  #
26472  # Override a repo completely, this is used for example when you have 3 small
26473  # development sandboxes of the langtools sources and want to avoid having 3 full
26474  # OpenJDK sources checked out on disk.
26475  #
26476  # Assuming that the 3 langtools sandboxes are located here:
26477  # /home/fredrik/sandbox1/langtools
26478  # /home/fredrik/sandbox2/langtools
26479  # /home/fredrik/sandbox3/langtools
26480  #
26481  # From the source root you create build subdirs manually:
26482  #     mkdir -p build1 build2 build3
26483  # in each build directory run:
26484  #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
26485  #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
26486  #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
26487  #
26488
26489
26490# Check whether --with-override-langtools was given.
26491if test "${with_override_langtools+set}" = set; then :
26492  withval=$with_override_langtools;
26493fi
26494
26495
26496
26497# Check whether --with-override-corba was given.
26498if test "${with_override_corba+set}" = set; then :
26499  withval=$with_override_corba;
26500fi
26501
26502
26503
26504# Check whether --with-override-jaxp was given.
26505if test "${with_override_jaxp+set}" = set; then :
26506  withval=$with_override_jaxp;
26507fi
26508
26509
26510
26511# Check whether --with-override-jaxws was given.
26512if test "${with_override_jaxws+set}" = set; then :
26513  withval=$with_override_jaxws;
26514fi
26515
26516
26517
26518# Check whether --with-override-hotspot was given.
26519if test "${with_override_hotspot+set}" = set; then :
26520  withval=$with_override_hotspot;
26521fi
26522
26523
26524
26525# Check whether --with-override-nashorn was given.
26526if test "${with_override_nashorn+set}" = set; then :
26527  withval=$with_override_nashorn;
26528fi
26529
26530
26531
26532# Check whether --with-override-jdk was given.
26533if test "${with_override_jdk+set}" = set; then :
26534  withval=$with_override_jdk;
26535fi
26536
26537
26538  if test "x$with_override_langtools" != x; then
26539    CURDIR="$PWD"
26540    cd "$with_override_langtools"
26541    LANGTOOLS_TOPDIR="`pwd`"
26542    cd "$CURDIR"
26543    if ! test -f $LANGTOOLS_TOPDIR/make/Makefile; then
26544      as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
26545    fi
26546    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
26547$as_echo_n "checking if langtools should be overridden... " >&6; }
26548    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
26549$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
26550  fi
26551  if test "x$with_override_corba" != x; then
26552    CURDIR="$PWD"
26553    cd "$with_override_corba"
26554    CORBA_TOPDIR="`pwd`"
26555    cd "$CURDIR"
26556    if ! test -f $CORBA_TOPDIR/make/Makefile; then
26557      as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
26558    fi
26559    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
26560$as_echo_n "checking if corba should be overridden... " >&6; }
26561    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
26562$as_echo "yes with $CORBA_TOPDIR" >&6; }
26563  fi
26564  if test "x$with_override_jaxp" != x; then
26565    CURDIR="$PWD"
26566    cd "$with_override_jaxp"
26567    JAXP_TOPDIR="`pwd`"
26568    cd "$CURDIR"
26569    if ! test -f $JAXP_TOPDIR/make/Makefile; then
26570      as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
26571    fi
26572    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
26573$as_echo_n "checking if jaxp should be overridden... " >&6; }
26574    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
26575$as_echo "yes with $JAXP_TOPDIR" >&6; }
26576  fi
26577  if test "x$with_override_jaxws" != x; then
26578    CURDIR="$PWD"
26579    cd "$with_override_jaxws"
26580    JAXWS_TOPDIR="`pwd`"
26581    cd "$CURDIR"
26582    if ! test -f $JAXWS_TOPDIR/make/Makefile; then
26583      as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
26584    fi
26585    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
26586$as_echo_n "checking if jaxws should be overridden... " >&6; }
26587    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
26588$as_echo "yes with $JAXWS_TOPDIR" >&6; }
26589  fi
26590  if test "x$with_override_hotspot" != x; then
26591    CURDIR="$PWD"
26592    cd "$with_override_hotspot"
26593    HOTSPOT_TOPDIR="`pwd`"
26594    cd "$CURDIR"
26595    if ! test -f $HOTSPOT_TOPDIR/make/Makefile; then
26596      as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
26597    fi
26598    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
26599$as_echo_n "checking if hotspot should be overridden... " >&6; }
26600    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
26601$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
26602  fi
26603  if test "x$with_override_nashorn" != x; then
26604    CURDIR="$PWD"
26605    cd "$with_override_nashorn"
26606    NASHORN_TOPDIR="`pwd`"
26607    cd "$CURDIR"
26608    if ! test -f $NASHORN_TOPDIR/make/Makefile; then
26609      as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
26610    fi
26611    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
26612$as_echo_n "checking if nashorn should be overridden... " >&6; }
26613    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
26614$as_echo "yes with $NASHORN_TOPDIR" >&6; }
26615  fi
26616  if test "x$with_override_jdk" != x; then
26617    CURDIR="$PWD"
26618    cd "$with_override_jdk"
26619    JDK_TOPDIR="`pwd`"
26620    cd "$CURDIR"
26621    if ! test -f $JDK_TOPDIR/make/Makefile; then
26622      as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
26623    fi
26624    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
26625$as_echo_n "checking if JDK should be overridden... " >&6; }
26626    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
26627$as_echo "yes with $JDK_TOPDIR" >&6; }
26628  fi
26629
26630
26631  BUILD_OUTPUT="$OUTPUT_ROOT"
26632
26633
26634  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
26635  BUILD_HOTSPOT=true
26636
26637
26638
26639# Check whether --with-import-hotspot was given.
26640if test "${with_import_hotspot+set}" = set; then :
26641  withval=$with_import_hotspot;
26642fi
26643
26644  if test "x$with_import_hotspot" != x; then
26645    CURDIR="$PWD"
26646    cd "$with_import_hotspot"
26647    HOTSPOT_DIST="`pwd`"
26648    cd "$CURDIR"
26649    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
26650      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
26651    fi
26652    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
26653$as_echo_n "checking if hotspot should be imported... " >&6; }
26654    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
26655$as_echo "yes from $HOTSPOT_DIST" >&6; }
26656    BUILD_HOTSPOT=false
26657  fi
26658
26659  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
26660
26661
26662###############################################################################
26663#
26664# Setup the toolchain (compilers etc), i.e. tools used to compile and process
26665# native code.
26666#
26667###############################################################################
26668
26669# First determine the toolchain type (compiler family)
26670
26671
26672# Check whether --with-toolchain-type was given.
26673if test "${with_toolchain_type+set}" = set; then :
26674  withval=$with_toolchain_type;
26675fi
26676
26677
26678  # Use indirect variable referencing
26679  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
26680  VALID_TOOLCHAINS=${!toolchain_var_name}
26681
26682  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26683    if test -n "$XCODEBUILD"; then
26684      # On Mac OS X, default toolchain to clang after Xcode 5
26685      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
26686      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
26687      if test $? -ne 0; then
26688        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
26689      fi
26690      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
26691          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
26692          $CUT -f 1 -d .`
26693      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
26694$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
26695      if test $XCODE_MAJOR_VERSION -ge 5; then
26696          DEFAULT_TOOLCHAIN="clang"
26697      else
26698          DEFAULT_TOOLCHAIN="gcc"
26699      fi
26700    else
26701      # If Xcode is not installed, but the command line tools are
26702      # then we can't run xcodebuild. On these systems we should
26703      # default to clang
26704      DEFAULT_TOOLCHAIN="clang"
26705    fi
26706  else
26707    # First toolchain type in the list is the default
26708    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
26709  fi
26710
26711  if test "x$with_toolchain_type" = xlist; then
26712    # List all toolchains
26713    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
26714$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
26715    for toolchain in $VALID_TOOLCHAINS; do
26716      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
26717      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26718      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
26719    done
26720
26721    exit 0
26722  elif test "x$with_toolchain_type" != x; then
26723    # User override; check that it is valid
26724    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
26725      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
26726$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
26727      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
26728$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
26729      as_fn_error $? "Cannot continue." "$LINENO" 5
26730    fi
26731    TOOLCHAIN_TYPE=$with_toolchain_type
26732  else
26733    # No flag given, use default
26734    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
26735  fi
26736
26737
26738  TOOLCHAIN_CC_BINARY_clang="clang"
26739  TOOLCHAIN_CC_BINARY_gcc="gcc"
26740  TOOLCHAIN_CC_BINARY_microsoft="cl"
26741  TOOLCHAIN_CC_BINARY_solstudio="cc"
26742  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
26743
26744  TOOLCHAIN_CXX_BINARY_clang="clang++"
26745  TOOLCHAIN_CXX_BINARY_gcc="g++"
26746  TOOLCHAIN_CXX_BINARY_microsoft="cl"
26747  TOOLCHAIN_CXX_BINARY_solstudio="CC"
26748  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
26749
26750  # Use indirect variable referencing
26751  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
26752  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26753  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
26754  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
26755  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
26756  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
26757
26758
26759  # Define filename patterns
26760  if test "x$OPENJDK_TARGET_OS" = xwindows; then
26761    LIBRARY_PREFIX=
26762    SHARED_LIBRARY_SUFFIX='.dll'
26763    STATIC_LIBRARY_SUFFIX='.lib'
26764    SHARED_LIBRARY='$1.dll'
26765    STATIC_LIBRARY='$1.lib'
26766    OBJ_SUFFIX='.obj'
26767    EXE_SUFFIX='.exe'
26768  else
26769    LIBRARY_PREFIX=lib
26770    SHARED_LIBRARY_SUFFIX='.so'
26771    STATIC_LIBRARY_SUFFIX='.a'
26772    SHARED_LIBRARY='lib$1.so'
26773    STATIC_LIBRARY='lib$1.a'
26774    OBJ_SUFFIX='.o'
26775    EXE_SUFFIX=''
26776    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26777      SHARED_LIBRARY='lib$1.dylib'
26778      SHARED_LIBRARY_SUFFIX='.dylib'
26779    fi
26780  fi
26781
26782
26783
26784
26785
26786
26787
26788
26789
26790
26791  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
26792    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
26793$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
26794  else
26795    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
26796$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
26797  fi
26798
26799
26800# Then detect the actual binaries needed
26801
26802  # FIXME: Is this needed?
26803  ac_ext=cpp
26804ac_cpp='$CXXCPP $CPPFLAGS'
26805ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
26806ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
26807ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26808
26809
26810  # Store the CFLAGS etc passed to the configure script.
26811  ORG_CFLAGS="$CFLAGS"
26812  ORG_CXXFLAGS="$CXXFLAGS"
26813  ORG_OBJCFLAGS="$OBJCFLAGS"
26814
26815  # On Windows, we need to detect the visual studio installation first.
26816  # This will change the PATH, but we need to keep that new PATH even
26817  # after toolchain detection is done, since the compiler (on x86) uses
26818  # it for DLL resolution in runtime.
26819  if test "x$OPENJDK_BUILD_OS" = "xwindows" && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
26820
26821  # Store path to cygwin link.exe to help excluding it when searching for
26822  # VS linker. This must be done before changing the PATH when looking for VS.
26823  # Extract the first word of "link", so it can be a program name with args.
26824set dummy link; ac_word=$2
26825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26826$as_echo_n "checking for $ac_word... " >&6; }
26827if ${ac_cv_path_CYGWIN_LINK+:} false; then :
26828  $as_echo_n "(cached) " >&6
26829else
26830  case $CYGWIN_LINK in
26831  [\\/]* | ?:[\\/]*)
26832  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
26833  ;;
26834  *)
26835  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26836for as_dir in $PATH
26837do
26838  IFS=$as_save_IFS
26839  test -z "$as_dir" && as_dir=.
26840    for ac_exec_ext in '' $ac_executable_extensions; do
26841  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26842    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
26843    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26844    break 2
26845  fi
26846done
26847  done
26848IFS=$as_save_IFS
26849
26850  ;;
26851esac
26852fi
26853CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
26854if test -n "$CYGWIN_LINK"; then
26855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
26856$as_echo "$CYGWIN_LINK" >&6; }
26857else
26858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26859$as_echo "no" >&6; }
26860fi
26861
26862
26863  if test "x$CYGWIN_LINK" != x; then
26864    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
26865$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
26866    "$CYGWIN_LINK" --version > /dev/null
26867    if test $? -eq 0 ; then
26868      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
26869$as_echo "yes" >&6; }
26870    else
26871      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26872$as_echo "no" >&6; }
26873      # This might be the VS linker. Don't exclude it later on.
26874      CYGWIN_LINK=""
26875    fi
26876  fi
26877
26878  # First-hand choice is to locate and run the vsvars bat file.
26879
26880  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26881    VCVARSFILE="vc/bin/vcvars32.bat"
26882  else
26883    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26884  fi
26885
26886  VS_ENV_CMD=""
26887  VS_ENV_ARGS=""
26888  if test "x$with_toolsdir" != x; then
26889
26890  if test "x$VS_ENV_CMD" = x; then
26891    VS100BASE="$with_toolsdir/../.."
26892    METHOD="--with-tools-dir"
26893
26894  windows_path="$VS100BASE"
26895  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26896    unix_path=`$CYGPATH -u "$windows_path"`
26897    VS100BASE="$unix_path"
26898  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26899    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26900    VS100BASE="$unix_path"
26901  fi
26902
26903    if test -d "$VS100BASE"; then
26904      if test -f "$VS100BASE/$VCVARSFILE"; then
26905        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26906$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26907        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26908        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26909        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26910        # TODO: improve detection for other versions of VS
26911        PLATFORM_TOOLSET="v100"
26912      else
26913        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26914$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26915        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26916$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26917      fi
26918    fi
26919  fi
26920
26921  fi
26922
26923  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
26924    # Having specified an argument which is incorrect will produce an instant failure;
26925    # we should not go on looking
26926    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
26927$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
26928    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
26929$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
26930    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
26931  fi
26932
26933  if test "x$VS100COMNTOOLS" != x; then
26934
26935  if test "x$VS_ENV_CMD" = x; then
26936    VS100BASE="$VS100COMNTOOLS/../.."
26937    METHOD="VS100COMNTOOLS variable"
26938
26939  windows_path="$VS100BASE"
26940  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26941    unix_path=`$CYGPATH -u "$windows_path"`
26942    VS100BASE="$unix_path"
26943  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26944    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26945    VS100BASE="$unix_path"
26946  fi
26947
26948    if test -d "$VS100BASE"; then
26949      if test -f "$VS100BASE/$VCVARSFILE"; then
26950        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26951$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26952        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26953        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26954        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26955        # TODO: improve detection for other versions of VS
26956        PLATFORM_TOOLSET="v100"
26957      else
26958        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26959$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26960        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26961$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26962      fi
26963    fi
26964  fi
26965
26966  fi
26967  if test "x$PROGRAMFILES" != x; then
26968
26969  if test "x$VS_ENV_CMD" = x; then
26970    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
26971    METHOD="well-known name"
26972
26973  windows_path="$VS100BASE"
26974  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26975    unix_path=`$CYGPATH -u "$windows_path"`
26976    VS100BASE="$unix_path"
26977  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26978    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26979    VS100BASE="$unix_path"
26980  fi
26981
26982    if test -d "$VS100BASE"; then
26983      if test -f "$VS100BASE/$VCVARSFILE"; then
26984        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26985$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26986        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26987        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26988        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26989        # TODO: improve detection for other versions of VS
26990        PLATFORM_TOOLSET="v100"
26991      else
26992        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26993$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26994        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26995$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26996      fi
26997    fi
26998  fi
26999
27000  fi
27001
27002  if test "x$VS_ENV_CMD" = x; then
27003    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
27004    METHOD="well-known name"
27005
27006  windows_path="$VS100BASE"
27007  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27008    unix_path=`$CYGPATH -u "$windows_path"`
27009    VS100BASE="$unix_path"
27010  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27011    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27012    VS100BASE="$unix_path"
27013  fi
27014
27015    if test -d "$VS100BASE"; then
27016      if test -f "$VS100BASE/$VCVARSFILE"; then
27017        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
27018$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
27019        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
27020        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27021        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27022        # TODO: improve detection for other versions of VS
27023        PLATFORM_TOOLSET="v100"
27024      else
27025        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
27026$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
27027        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27028$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27029      fi
27030    fi
27031  fi
27032
27033
27034  if test "x$VS_ENV_CMD" = x; then
27035    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
27036    METHOD="well-known name"
27037
27038  windows_path="$VS100BASE"
27039  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27040    unix_path=`$CYGPATH -u "$windows_path"`
27041    VS100BASE="$unix_path"
27042  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27043    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27044    VS100BASE="$unix_path"
27045  fi
27046
27047    if test -d "$VS100BASE"; then
27048      if test -f "$VS100BASE/$VCVARSFILE"; then
27049        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
27050$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
27051        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
27052        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27053        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27054        # TODO: improve detection for other versions of VS
27055        PLATFORM_TOOLSET="v100"
27056      else
27057        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
27058$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
27059        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27060$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27061      fi
27062    fi
27063  fi
27064
27065
27066  if test "x$ProgramW6432" != x; then
27067
27068  if test "x$VS_ENV_CMD" = x; then
27069    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
27070    METHOD="well-known name"
27071
27072  windows_path="$WIN_SDK_BASE"
27073  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27074    unix_path=`$CYGPATH -u "$windows_path"`
27075    WIN_SDK_BASE="$unix_path"
27076  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27077    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27078    WIN_SDK_BASE="$unix_path"
27079  fi
27080
27081    if test -d "$WIN_SDK_BASE"; then
27082      # There have been cases of partial or broken SDK installations. A missing
27083      # lib dir is not going to work.
27084      if test ! -d "$WIN_SDK_BASE/../lib"; then
27085        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27086$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27087        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27088$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27089      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
27090        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27091$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27092        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
27093        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27094          VS_ENV_ARGS="/x86"
27095        else
27096          VS_ENV_ARGS="/x64"
27097        fi
27098        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27099        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27100        # TODO: improve detection for other versions of SDK
27101        PLATFORM_TOOLSET="Windows7.1SDK"
27102      else
27103        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27104$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27105        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27106$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27107      fi
27108    fi
27109  fi
27110
27111  fi
27112  if test "x$PROGRAMW6432" != x; then
27113
27114  if test "x$VS_ENV_CMD" = x; then
27115    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
27116    METHOD="well-known name"
27117
27118  windows_path="$WIN_SDK_BASE"
27119  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27120    unix_path=`$CYGPATH -u "$windows_path"`
27121    WIN_SDK_BASE="$unix_path"
27122  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27123    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27124    WIN_SDK_BASE="$unix_path"
27125  fi
27126
27127    if test -d "$WIN_SDK_BASE"; then
27128      # There have been cases of partial or broken SDK installations. A missing
27129      # lib dir is not going to work.
27130      if test ! -d "$WIN_SDK_BASE/../lib"; then
27131        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27132$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27133        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27134$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27135      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
27136        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27137$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27138        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
27139        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27140          VS_ENV_ARGS="/x86"
27141        else
27142          VS_ENV_ARGS="/x64"
27143        fi
27144        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27145        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27146        # TODO: improve detection for other versions of SDK
27147        PLATFORM_TOOLSET="Windows7.1SDK"
27148      else
27149        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27150$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27151        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27152$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27153      fi
27154    fi
27155  fi
27156
27157  fi
27158  if test "x$PROGRAMFILES" != x; then
27159
27160  if test "x$VS_ENV_CMD" = x; then
27161    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
27162    METHOD="well-known name"
27163
27164  windows_path="$WIN_SDK_BASE"
27165  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27166    unix_path=`$CYGPATH -u "$windows_path"`
27167    WIN_SDK_BASE="$unix_path"
27168  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27169    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27170    WIN_SDK_BASE="$unix_path"
27171  fi
27172
27173    if test -d "$WIN_SDK_BASE"; then
27174      # There have been cases of partial or broken SDK installations. A missing
27175      # lib dir is not going to work.
27176      if test ! -d "$WIN_SDK_BASE/../lib"; then
27177        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27178$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27179        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27180$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27181      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
27182        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27183$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27184        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
27185        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27186          VS_ENV_ARGS="/x86"
27187        else
27188          VS_ENV_ARGS="/x64"
27189        fi
27190        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27191        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27192        # TODO: improve detection for other versions of SDK
27193        PLATFORM_TOOLSET="Windows7.1SDK"
27194      else
27195        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27196$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27197        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27198$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27199      fi
27200    fi
27201  fi
27202
27203  fi
27204
27205  if test "x$VS_ENV_CMD" = x; then
27206    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
27207    METHOD="well-known name"
27208
27209  windows_path="$WIN_SDK_BASE"
27210  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27211    unix_path=`$CYGPATH -u "$windows_path"`
27212    WIN_SDK_BASE="$unix_path"
27213  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27214    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27215    WIN_SDK_BASE="$unix_path"
27216  fi
27217
27218    if test -d "$WIN_SDK_BASE"; then
27219      # There have been cases of partial or broken SDK installations. A missing
27220      # lib dir is not going to work.
27221      if test ! -d "$WIN_SDK_BASE/../lib"; then
27222        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27223$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27224        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27225$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27226      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
27227        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27228$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27229        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
27230        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27231          VS_ENV_ARGS="/x86"
27232        else
27233          VS_ENV_ARGS="/x64"
27234        fi
27235        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27236        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27237        # TODO: improve detection for other versions of SDK
27238        PLATFORM_TOOLSET="Windows7.1SDK"
27239      else
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        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27243$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27244      fi
27245    fi
27246  fi
27247
27248
27249  if test "x$VS_ENV_CMD" = x; then
27250    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
27251    METHOD="well-known name"
27252
27253  windows_path="$WIN_SDK_BASE"
27254  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27255    unix_path=`$CYGPATH -u "$windows_path"`
27256    WIN_SDK_BASE="$unix_path"
27257  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27258    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27259    WIN_SDK_BASE="$unix_path"
27260  fi
27261
27262    if test -d "$WIN_SDK_BASE"; then
27263      # There have been cases of partial or broken SDK installations. A missing
27264      # lib dir is not going to work.
27265      if test ! -d "$WIN_SDK_BASE/../lib"; then
27266        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27267$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27268        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27269$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27270      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
27271        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27272$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27273        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
27274        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27275          VS_ENV_ARGS="/x86"
27276        else
27277          VS_ENV_ARGS="/x64"
27278        fi
27279        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27280        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27281        # TODO: improve detection for other versions of SDK
27282        PLATFORM_TOOLSET="Windows7.1SDK"
27283      else
27284        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27285$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27286        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27287$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27288      fi
27289    fi
27290  fi
27291
27292
27293  if test "x$VS_ENV_CMD" != x; then
27294    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
27295
27296  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27297
27298  # First separate the path from the arguments. This will split at the first
27299  # space.
27300  complete="$VS_ENV_CMD"
27301  path="${complete%% *}"
27302  tmp="$complete EOL"
27303  arguments="${tmp#* }"
27304
27305  # Input might be given as Windows format, start by converting to
27306  # unix format.
27307  new_path=`$CYGPATH -u "$path"`
27308
27309  # Now try to locate executable using which
27310  new_path=`$WHICH "$new_path" 2> /dev/null`
27311  # bat and cmd files are not always considered executable in cygwin causing which
27312  # to not find them
27313  if test "x$new_path" = x \
27314      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27315      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27316    new_path=`$CYGPATH -u "$path"`
27317  fi
27318  if test "x$new_path" = x; then
27319    # Oops. Which didn't find the executable.
27320    # The splitting of arguments from the executable at a space might have been incorrect,
27321    # since paths with space are more likely in Windows. Give it another try with the whole
27322    # argument.
27323    path="$complete"
27324    arguments="EOL"
27325    new_path=`$CYGPATH -u "$path"`
27326    new_path=`$WHICH "$new_path" 2> /dev/null`
27327    # bat and cmd files are not always considered executable in cygwin causing which
27328    # to not find them
27329    if test "x$new_path" = x \
27330        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27331        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27332      new_path=`$CYGPATH -u "$path"`
27333    fi
27334    if test "x$new_path" = x; then
27335      # It's still not found. Now this is an unrecoverable error.
27336      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27337$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27338      has_space=`$ECHO "$complete" | $GREP " "`
27339      if test "x$has_space" != x; then
27340        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27341$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27342      fi
27343      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27344    fi
27345  fi
27346
27347  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27348  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27349  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27350  # "foo.exe" is OK but "foo" is an error.
27351  #
27352  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27353  # It is also a way to make sure we got the proper file name for the real test later on.
27354  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27355  if test "x$test_shortpath" = x; then
27356    # Short path failed, file does not exist as specified.
27357    # Try adding .exe or .cmd
27358    if test -f "${new_path}.exe"; then
27359      input_to_shortpath="${new_path}.exe"
27360    elif test -f "${new_path}.cmd"; then
27361      input_to_shortpath="${new_path}.cmd"
27362    else
27363      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
27364$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
27365      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27366$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27367      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27368    fi
27369  else
27370    input_to_shortpath="$new_path"
27371  fi
27372
27373  # Call helper function which possibly converts this using DOS-style short mode.
27374  # If so, the updated path is stored in $new_path.
27375  new_path="$input_to_shortpath"
27376
27377  input_path="$input_to_shortpath"
27378  # Check if we need to convert this using DOS-style short mode. If the path
27379  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27380  # take no chances and rewrite it.
27381  # Note: m4 eats our [], so we need to use [ and ] instead.
27382  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27383  if test "x$has_forbidden_chars" != x; then
27384    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27385    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27386    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27387    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27388      # Going to short mode and back again did indeed matter. Since short mode is
27389      # case insensitive, let's make it lowercase to improve readability.
27390      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27391      # Now convert it back to Unix-stile (cygpath)
27392      input_path=`$CYGPATH -u "$shortmode_path"`
27393      new_path="$input_path"
27394    fi
27395  fi
27396
27397  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27398  if test "x$test_cygdrive_prefix" = x; then
27399    # As a simple fix, exclude /usr/bin since it's not a real path.
27400    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27401      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27402      # a path prefixed by /cygdrive for fixpath to work.
27403      new_path="$CYGWIN_ROOT_PATH$input_path"
27404    fi
27405  fi
27406
27407  # remove trailing .exe if any
27408  new_path="${new_path/%.exe/}"
27409
27410  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27411
27412  # First separate the path from the arguments. This will split at the first
27413  # space.
27414  complete="$VS_ENV_CMD"
27415  path="${complete%% *}"
27416  tmp="$complete EOL"
27417  arguments="${tmp#* }"
27418
27419  # Input might be given as Windows format, start by converting to
27420  # unix format.
27421  new_path="$path"
27422
27423  windows_path="$new_path"
27424  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27425    unix_path=`$CYGPATH -u "$windows_path"`
27426    new_path="$unix_path"
27427  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27428    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27429    new_path="$unix_path"
27430  fi
27431
27432
27433  # Now try to locate executable using which
27434  new_path=`$WHICH "$new_path" 2> /dev/null`
27435
27436  if test "x$new_path" = x; then
27437    # Oops. Which didn't find the executable.
27438    # The splitting of arguments from the executable at a space might have been incorrect,
27439    # since paths with space are more likely in Windows. Give it another try with the whole
27440    # argument.
27441    path="$complete"
27442    arguments="EOL"
27443    new_path="$path"
27444
27445  windows_path="$new_path"
27446  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27447    unix_path=`$CYGPATH -u "$windows_path"`
27448    new_path="$unix_path"
27449  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27450    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27451    new_path="$unix_path"
27452  fi
27453
27454
27455    new_path=`$WHICH "$new_path" 2> /dev/null`
27456    # bat and cmd files are not always considered executable in MSYS causing which
27457    # to not find them
27458    if test "x$new_path" = x \
27459        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27460        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27461      new_path="$path"
27462
27463  windows_path="$new_path"
27464  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27465    unix_path=`$CYGPATH -u "$windows_path"`
27466    new_path="$unix_path"
27467  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27468    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27469    new_path="$unix_path"
27470  fi
27471
27472    fi
27473
27474    if test "x$new_path" = x; then
27475      # It's still not found. Now this is an unrecoverable error.
27476      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27477$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27478      has_space=`$ECHO "$complete" | $GREP " "`
27479      if test "x$has_space" != x; then
27480        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27481$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27482      fi
27483      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27484    fi
27485  fi
27486
27487  # Now new_path has a complete unix path to the binary
27488  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27489    # Keep paths in /bin as-is, but remove trailing .exe if any
27490    new_path="${new_path/%.exe/}"
27491    # Do not save /bin paths to all_fixpath_prefixes!
27492  else
27493    # Not in mixed or Windows style, start by that.
27494    new_path=`cmd //c echo $new_path`
27495
27496  input_path="$new_path"
27497  # Check if we need to convert this using DOS-style short mode. If the path
27498  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27499  # take no chances and rewrite it.
27500  # Note: m4 eats our [], so we need to use [ and ] instead.
27501  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27502  if test "x$has_forbidden_chars" != x; then
27503    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27504    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27505  fi
27506
27507    # Output is in $new_path
27508
27509  windows_path="$new_path"
27510  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27511    unix_path=`$CYGPATH -u "$windows_path"`
27512    new_path="$unix_path"
27513  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27514    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27515    new_path="$unix_path"
27516  fi
27517
27518    # remove trailing .exe if any
27519    new_path="${new_path/%.exe/}"
27520
27521    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27522    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27523  fi
27524
27525  else
27526    # We're on a unix platform. Hooray! :)
27527    # First separate the path from the arguments. This will split at the first
27528    # space.
27529    complete="$VS_ENV_CMD"
27530    path="${complete%% *}"
27531    tmp="$complete EOL"
27532    arguments="${tmp#* }"
27533
27534    # Cannot rely on the command "which" here since it doesn't always work.
27535    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27536    if test -z "$is_absolute_path"; then
27537      # Path to executable is not absolute. Find it.
27538      IFS_save="$IFS"
27539      IFS=:
27540      for p in $PATH; do
27541        if test -f "$p/$path" && test -x "$p/$path"; then
27542          new_path="$p/$path"
27543          break
27544        fi
27545      done
27546      IFS="$IFS_save"
27547    else
27548      # This is an absolute path, we can use it without further modifications.
27549      new_path="$path"
27550    fi
27551
27552    if test "x$new_path" = x; then
27553      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27554$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27555      has_space=`$ECHO "$complete" | $GREP " "`
27556      if test "x$has_space" != x; then
27557        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27558$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27559      fi
27560      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27561    fi
27562  fi
27563
27564  # Now join together the path and the arguments once again
27565  if test "x$arguments" != xEOL; then
27566    new_complete="$new_path ${arguments% *}"
27567  else
27568    new_complete="$new_path"
27569  fi
27570
27571  if test "x$complete" != "x$new_complete"; then
27572    VS_ENV_CMD="$new_complete"
27573    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
27574$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
27575  fi
27576
27577
27578    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
27579    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
27580$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
27581
27582    # We need to create a couple of temporary files.
27583    VS_ENV_TMP_DIR="$OUTPUT_ROOT/vs-env"
27584    $MKDIR -p $VS_ENV_TMP_DIR
27585
27586    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
27587    # Instead create a shell script which will set the relevant variables when run.
27588    WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
27589
27590  unix_path="$WINPATH_VS_ENV_CMD"
27591  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27592    windows_path=`$CYGPATH -m "$unix_path"`
27593    WINPATH_VS_ENV_CMD="$windows_path"
27594  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27595    windows_path=`cmd //c echo $unix_path`
27596    WINPATH_VS_ENV_CMD="$windows_path"
27597  fi
27598
27599    WINPATH_BASH="$BASH"
27600
27601  unix_path="$WINPATH_BASH"
27602  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27603    windows_path=`$CYGPATH -m "$unix_path"`
27604    WINPATH_BASH="$windows_path"
27605  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27606    windows_path=`cmd //c echo $unix_path`
27607    WINPATH_BASH="$windows_path"
27608  fi
27609
27610
27611    # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
27612    # script (executable by bash) that will setup the important variables.
27613    EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
27614    $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
27615    # This will end up something like:
27616    # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
27617    $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
27618    # These will end up something like:
27619    # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
27620    # The trailing space for everyone except PATH is no typo, but is needed due
27621    # to trailing \ in the Windows paths. These will be stripped later.
27622    $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27623    $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27624    $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27625    $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27626    $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27627    $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27628
27629    # Now execute the newly created bat file.
27630    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
27631    # Change directory so we don't need to mess with Windows paths in redirects.
27632    cd $VS_ENV_TMP_DIR
27633    cmd /c extract-vs-env.bat | $CAT
27634    cd $CURDIR
27635
27636    if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
27637      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
27638$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
27639      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27640$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27641      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27642$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27643      as_fn_error $? "Cannot continue" "$LINENO" 5
27644    fi
27645
27646    # Now set all paths and other env variables. This will allow the rest of
27647    # the configure script to find and run the compiler in the proper way.
27648    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
27649$as_echo "$as_me: Setting extracted environment variables" >&6;}
27650    . $VS_ENV_TMP_DIR/set-vs-env.sh
27651    # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
27652    # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
27653  else
27654    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
27655    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
27656$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
27657  fi
27658
27659  # At this point, we should have correct variables in the environment, or we can't continue.
27660  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
27661$as_echo_n "checking for Visual Studio variables... " >&6; }
27662
27663  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
27664    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
27665      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
27666$as_echo "present but broken" >&6; }
27667      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
27668    else
27669      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
27670$as_echo "ok" >&6; }
27671      # Remove any trailing "\" and " " from the variables.
27672      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED 's/\\\\* *$//'`
27673      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\* *$//'`
27674      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
27675      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
27676      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
27677      # Remove any paths containing # (typically F#) as that messes up make. This
27678      # is needed if visual studio was installed with F# support.
27679      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
27680
27681
27682
27683
27684    fi
27685  else
27686    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
27687$as_echo "not found" >&6; }
27688
27689    if test "x$VS_ENV_CMD" = x; then
27690      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
27691$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
27692      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
27693$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
27694    else
27695      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
27696$as_echo "$as_me: Running the extraction script failed." >&6;}
27697    fi
27698    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27699$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27700    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27701$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27702    as_fn_error $? "Cannot continue" "$LINENO" 5
27703  fi
27704
27705    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
27706    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
27707    PATH="$VS_PATH"
27708    # The microsoft toolchain also requires INCLUDE and LIB to be set.
27709    export INCLUDE="$VS_INCLUDE"
27710    export LIB="$VS_LIB"
27711  fi
27712
27713  # autoconf magic only relies on PATH, so update it if tools dir is specified
27714  OLD_PATH="$PATH"
27715
27716  # For solaris we really need solaris tools, and not the GNU equivalent.
27717  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
27718  # so add that to path before starting to probe.
27719  # FIXME: This was originally only done for AS,NM,GNM,STRIP,MCS,OBJCOPY,OBJDUMP.
27720  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
27721    PATH="/usr/ccs/bin:$PATH"
27722  fi
27723
27724  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
27725  # override all other locations.
27726  if test "x$TOOLCHAIN_PATH" != x; then
27727    PATH=$TOOLCHAIN_PATH:$PATH
27728  fi
27729
27730
27731  #
27732  # Setup the compilers (CC and CXX)
27733  #
27734
27735  COMPILER_NAME=C
27736  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
27737
27738  if test "x$CC" != x; then
27739    # User has supplied compiler name already, always let that override.
27740    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
27741$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
27742    if test "x`basename $CC`" = "x$CC"; then
27743      # A command without a complete path is provided, search $PATH.
27744
27745      for ac_prog in $CC
27746do
27747  # Extract the first word of "$ac_prog", so it can be a program name with args.
27748set dummy $ac_prog; ac_word=$2
27749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27750$as_echo_n "checking for $ac_word... " >&6; }
27751if ${ac_cv_path_POTENTIAL_CC+:} false; then :
27752  $as_echo_n "(cached) " >&6
27753else
27754  case $POTENTIAL_CC in
27755  [\\/]* | ?:[\\/]*)
27756  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
27757  ;;
27758  *)
27759  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27760for as_dir in $PATH
27761do
27762  IFS=$as_save_IFS
27763  test -z "$as_dir" && as_dir=.
27764    for ac_exec_ext in '' $ac_executable_extensions; do
27765  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27766    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
27767    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27768    break 2
27769  fi
27770done
27771  done
27772IFS=$as_save_IFS
27773
27774  ;;
27775esac
27776fi
27777POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
27778if test -n "$POTENTIAL_CC"; then
27779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
27780$as_echo "$POTENTIAL_CC" >&6; }
27781else
27782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27783$as_echo "no" >&6; }
27784fi
27785
27786
27787  test -n "$POTENTIAL_CC" && break
27788done
27789
27790      if test "x$POTENTIAL_CC" != x; then
27791        CC=$POTENTIAL_CC
27792      else
27793        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
27794      fi
27795    else
27796      # Otherwise it might already be a complete path
27797      if test ! -x "$CC"; then
27798        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
27799      fi
27800    fi
27801  else
27802    # No user supplied value. Locate compiler ourselves.
27803
27804    # If we are cross compiling, assume cross compilation tools follows the
27805    # cross compilation standard where they are prefixed with the autoconf
27806    # standard name for the target. For example the binary
27807    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
27808    # If we are not cross compiling, then the default compiler name will be
27809    # used.
27810
27811    CC=
27812    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
27813    # before checking the rest of the PATH.
27814    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
27815    # step, this should not be necessary.
27816    if test -n "$TOOLCHAIN_PATH"; then
27817      PATH_save="$PATH"
27818      PATH="$TOOLCHAIN_PATH"
27819      for ac_prog in $SEARCH_LIST
27820do
27821  # Extract the first word of "$ac_prog", so it can be a program name with args.
27822set dummy $ac_prog; ac_word=$2
27823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27824$as_echo_n "checking for $ac_word... " >&6; }
27825if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
27826  $as_echo_n "(cached) " >&6
27827else
27828  case $TOOLCHAIN_PATH_CC in
27829  [\\/]* | ?:[\\/]*)
27830  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
27831  ;;
27832  *)
27833  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27834for as_dir in $PATH
27835do
27836  IFS=$as_save_IFS
27837  test -z "$as_dir" && as_dir=.
27838    for ac_exec_ext in '' $ac_executable_extensions; do
27839  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27840    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
27841    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27842    break 2
27843  fi
27844done
27845  done
27846IFS=$as_save_IFS
27847
27848  ;;
27849esac
27850fi
27851TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
27852if test -n "$TOOLCHAIN_PATH_CC"; then
27853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
27854$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
27855else
27856  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27857$as_echo "no" >&6; }
27858fi
27859
27860
27861  test -n "$TOOLCHAIN_PATH_CC" && break
27862done
27863
27864      CC=$TOOLCHAIN_PATH_CC
27865      PATH="$PATH_save"
27866    fi
27867
27868    # AC_PATH_PROGS can't be run multiple times with the same variable,
27869    # so create a new name for this run.
27870    if test "x$CC" = x; then
27871      for ac_prog in $SEARCH_LIST
27872do
27873  # Extract the first word of "$ac_prog", so it can be a program name with args.
27874set dummy $ac_prog; ac_word=$2
27875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27876$as_echo_n "checking for $ac_word... " >&6; }
27877if ${ac_cv_path_POTENTIAL_CC+:} false; then :
27878  $as_echo_n "(cached) " >&6
27879else
27880  case $POTENTIAL_CC in
27881  [\\/]* | ?:[\\/]*)
27882  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
27883  ;;
27884  *)
27885  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27886for as_dir in $PATH
27887do
27888  IFS=$as_save_IFS
27889  test -z "$as_dir" && as_dir=.
27890    for ac_exec_ext in '' $ac_executable_extensions; do
27891  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27892    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
27893    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27894    break 2
27895  fi
27896done
27897  done
27898IFS=$as_save_IFS
27899
27900  ;;
27901esac
27902fi
27903POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
27904if test -n "$POTENTIAL_CC"; then
27905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
27906$as_echo "$POTENTIAL_CC" >&6; }
27907else
27908  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27909$as_echo "no" >&6; }
27910fi
27911
27912
27913  test -n "$POTENTIAL_CC" && break
27914done
27915
27916      CC=$POTENTIAL_CC
27917    fi
27918
27919    if test "x$CC" = x; then
27920
27921  # Print a helpful message on how to acquire the necessary build dependency.
27922  # devkit is the help tag: freetype, cups, pulse, alsa etc
27923  MISSING_DEPENDENCY=devkit
27924
27925  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27926    cygwin_help $MISSING_DEPENDENCY
27927  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27928    msys_help $MISSING_DEPENDENCY
27929  else
27930    PKGHANDLER_COMMAND=
27931
27932    case $PKGHANDLER in
27933      apt-get)
27934        apt_help     $MISSING_DEPENDENCY ;;
27935      yum)
27936        yum_help     $MISSING_DEPENDENCY ;;
27937      port)
27938        port_help    $MISSING_DEPENDENCY ;;
27939      pkgutil)
27940        pkgutil_help $MISSING_DEPENDENCY ;;
27941      pkgadd)
27942        pkgadd_help  $MISSING_DEPENDENCY ;;
27943    esac
27944
27945    if test "x$PKGHANDLER_COMMAND" != x; then
27946      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
27947    fi
27948  fi
27949
27950      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
27951    fi
27952  fi
27953
27954  # Now we have a compiler binary in CC. Make sure it's okay.
27955
27956  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27957
27958  # First separate the path from the arguments. This will split at the first
27959  # space.
27960  complete="$CC"
27961  path="${complete%% *}"
27962  tmp="$complete EOL"
27963  arguments="${tmp#* }"
27964
27965  # Input might be given as Windows format, start by converting to
27966  # unix format.
27967  new_path=`$CYGPATH -u "$path"`
27968
27969  # Now try to locate executable using which
27970  new_path=`$WHICH "$new_path" 2> /dev/null`
27971  # bat and cmd files are not always considered executable in cygwin causing which
27972  # to not find them
27973  if test "x$new_path" = x \
27974      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27975      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27976    new_path=`$CYGPATH -u "$path"`
27977  fi
27978  if test "x$new_path" = x; then
27979    # Oops. Which didn't find the executable.
27980    # The splitting of arguments from the executable at a space might have been incorrect,
27981    # since paths with space are more likely in Windows. Give it another try with the whole
27982    # argument.
27983    path="$complete"
27984    arguments="EOL"
27985    new_path=`$CYGPATH -u "$path"`
27986    new_path=`$WHICH "$new_path" 2> /dev/null`
27987    # bat and cmd files are not always considered executable in cygwin causing which
27988    # to not find them
27989    if test "x$new_path" = x \
27990        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27991        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27992      new_path=`$CYGPATH -u "$path"`
27993    fi
27994    if test "x$new_path" = x; then
27995      # It's still not found. Now this is an unrecoverable error.
27996      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
27997$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
27998      has_space=`$ECHO "$complete" | $GREP " "`
27999      if test "x$has_space" != x; then
28000        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28001$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28002      fi
28003      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28004    fi
28005  fi
28006
28007  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28008  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28009  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28010  # "foo.exe" is OK but "foo" is an error.
28011  #
28012  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28013  # It is also a way to make sure we got the proper file name for the real test later on.
28014  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28015  if test "x$test_shortpath" = x; then
28016    # Short path failed, file does not exist as specified.
28017    # Try adding .exe or .cmd
28018    if test -f "${new_path}.exe"; then
28019      input_to_shortpath="${new_path}.exe"
28020    elif test -f "${new_path}.cmd"; then
28021      input_to_shortpath="${new_path}.cmd"
28022    else
28023      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
28024$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
28025      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28026$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28027      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28028    fi
28029  else
28030    input_to_shortpath="$new_path"
28031  fi
28032
28033  # Call helper function which possibly converts this using DOS-style short mode.
28034  # If so, the updated path is stored in $new_path.
28035  new_path="$input_to_shortpath"
28036
28037  input_path="$input_to_shortpath"
28038  # Check if we need to convert this using DOS-style short mode. If the path
28039  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28040  # take no chances and rewrite it.
28041  # Note: m4 eats our [], so we need to use [ and ] instead.
28042  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28043  if test "x$has_forbidden_chars" != x; then
28044    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28045    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28046    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28047    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28048      # Going to short mode and back again did indeed matter. Since short mode is
28049      # case insensitive, let's make it lowercase to improve readability.
28050      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28051      # Now convert it back to Unix-stile (cygpath)
28052      input_path=`$CYGPATH -u "$shortmode_path"`
28053      new_path="$input_path"
28054    fi
28055  fi
28056
28057  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28058  if test "x$test_cygdrive_prefix" = x; then
28059    # As a simple fix, exclude /usr/bin since it's not a real path.
28060    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28061      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28062      # a path prefixed by /cygdrive for fixpath to work.
28063      new_path="$CYGWIN_ROOT_PATH$input_path"
28064    fi
28065  fi
28066
28067  # remove trailing .exe if any
28068  new_path="${new_path/%.exe/}"
28069
28070  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28071
28072  # First separate the path from the arguments. This will split at the first
28073  # space.
28074  complete="$CC"
28075  path="${complete%% *}"
28076  tmp="$complete EOL"
28077  arguments="${tmp#* }"
28078
28079  # Input might be given as Windows format, start by converting to
28080  # unix format.
28081  new_path="$path"
28082
28083  windows_path="$new_path"
28084  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28085    unix_path=`$CYGPATH -u "$windows_path"`
28086    new_path="$unix_path"
28087  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28088    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28089    new_path="$unix_path"
28090  fi
28091
28092
28093  # Now try to locate executable using which
28094  new_path=`$WHICH "$new_path" 2> /dev/null`
28095
28096  if test "x$new_path" = x; then
28097    # Oops. Which didn't find the executable.
28098    # The splitting of arguments from the executable at a space might have been incorrect,
28099    # since paths with space are more likely in Windows. Give it another try with the whole
28100    # argument.
28101    path="$complete"
28102    arguments="EOL"
28103    new_path="$path"
28104
28105  windows_path="$new_path"
28106  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28107    unix_path=`$CYGPATH -u "$windows_path"`
28108    new_path="$unix_path"
28109  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28110    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28111    new_path="$unix_path"
28112  fi
28113
28114
28115    new_path=`$WHICH "$new_path" 2> /dev/null`
28116    # bat and cmd files are not always considered executable in MSYS causing which
28117    # to not find them
28118    if test "x$new_path" = x \
28119        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28120        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28121      new_path="$path"
28122
28123  windows_path="$new_path"
28124  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28125    unix_path=`$CYGPATH -u "$windows_path"`
28126    new_path="$unix_path"
28127  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28128    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28129    new_path="$unix_path"
28130  fi
28131
28132    fi
28133
28134    if test "x$new_path" = x; then
28135      # It's still not found. Now this is an unrecoverable error.
28136      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28137$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28138      has_space=`$ECHO "$complete" | $GREP " "`
28139      if test "x$has_space" != x; then
28140        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28141$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28142      fi
28143      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28144    fi
28145  fi
28146
28147  # Now new_path has a complete unix path to the binary
28148  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28149    # Keep paths in /bin as-is, but remove trailing .exe if any
28150    new_path="${new_path/%.exe/}"
28151    # Do not save /bin paths to all_fixpath_prefixes!
28152  else
28153    # Not in mixed or Windows style, start by that.
28154    new_path=`cmd //c echo $new_path`
28155
28156  input_path="$new_path"
28157  # Check if we need to convert this using DOS-style short mode. If the path
28158  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28159  # take no chances and rewrite it.
28160  # Note: m4 eats our [], so we need to use [ and ] instead.
28161  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28162  if test "x$has_forbidden_chars" != x; then
28163    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28164    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28165  fi
28166
28167    # Output is in $new_path
28168
28169  windows_path="$new_path"
28170  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28171    unix_path=`$CYGPATH -u "$windows_path"`
28172    new_path="$unix_path"
28173  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28174    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28175    new_path="$unix_path"
28176  fi
28177
28178    # remove trailing .exe if any
28179    new_path="${new_path/%.exe/}"
28180
28181    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28182    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28183  fi
28184
28185  else
28186    # We're on a unix platform. Hooray! :)
28187    # First separate the path from the arguments. This will split at the first
28188    # space.
28189    complete="$CC"
28190    path="${complete%% *}"
28191    tmp="$complete EOL"
28192    arguments="${tmp#* }"
28193
28194    # Cannot rely on the command "which" here since it doesn't always work.
28195    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28196    if test -z "$is_absolute_path"; then
28197      # Path to executable is not absolute. Find it.
28198      IFS_save="$IFS"
28199      IFS=:
28200      for p in $PATH; do
28201        if test -f "$p/$path" && test -x "$p/$path"; then
28202          new_path="$p/$path"
28203          break
28204        fi
28205      done
28206      IFS="$IFS_save"
28207    else
28208      # This is an absolute path, we can use it without further modifications.
28209      new_path="$path"
28210    fi
28211
28212    if test "x$new_path" = x; then
28213      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28214$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28215      has_space=`$ECHO "$complete" | $GREP " "`
28216      if test "x$has_space" != x; then
28217        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28218$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28219      fi
28220      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28221    fi
28222  fi
28223
28224  # Now join together the path and the arguments once again
28225  if test "x$arguments" != xEOL; then
28226    new_complete="$new_path ${arguments% *}"
28227  else
28228    new_complete="$new_path"
28229  fi
28230
28231  if test "x$complete" != "x$new_complete"; then
28232    CC="$new_complete"
28233    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
28234$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
28235  fi
28236
28237  TEST_COMPILER="$CC"
28238  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
28239  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
28240  if test "x$OPENJDK_BUILD_OS" != xaix; then
28241    # FIXME: This test should not be needed anymore; we don't do that for any platform.
28242    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
28243$as_echo_n "checking resolved symbolic links for CC... " >&6; }
28244
28245  if test "x$OPENJDK_BUILD_OS" != xwindows; then
28246    # Follow a chain of symbolic links. Use readlink
28247    # where it exists, else fall back to horribly
28248    # complicated shell code.
28249    if test "x$READLINK_TESTED" != yes; then
28250      # On MacOSX there is a readlink tool with a different
28251      # purpose than the GNU readlink tool. Check the found readlink.
28252      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
28253      if test "x$ISGNU" = x; then
28254        # A readlink that we do not know how to use.
28255        # Are there other non-GNU readlinks out there?
28256        READLINK_TESTED=yes
28257        READLINK=
28258      fi
28259    fi
28260
28261    if test "x$READLINK" != x; then
28262      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
28263    else
28264      # Save the current directory for restoring afterwards
28265      STARTDIR=$PWD
28266      COUNTER=0
28267      sym_link_dir=`$DIRNAME $TEST_COMPILER`
28268      sym_link_file=`$BASENAME $TEST_COMPILER`
28269      cd $sym_link_dir
28270      # Use -P flag to resolve symlinks in directories.
28271      cd `$THEPWDCMD -P`
28272      sym_link_dir=`$THEPWDCMD -P`
28273      # Resolve file symlinks
28274      while test $COUNTER -lt 20; do
28275        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
28276        if test "x$ISLINK" == x; then
28277          # This is not a symbolic link! We are done!
28278          break
28279        fi
28280        # Again resolve directory symlinks since the target of the just found
28281        # link could be in a different directory
28282        cd `$DIRNAME $ISLINK`
28283        sym_link_dir=`$THEPWDCMD -P`
28284        sym_link_file=`$BASENAME $ISLINK`
28285        let COUNTER=COUNTER+1
28286      done
28287      cd $STARTDIR
28288      TEST_COMPILER=$sym_link_dir/$sym_link_file
28289    fi
28290  fi
28291
28292    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
28293$as_echo "$TEST_COMPILER" >&6; }
28294  fi
28295  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
28296$as_echo_n "checking if CC is disguised ccache... " >&6; }
28297
28298  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
28299  if test "x$COMPILER_BASENAME" = "xccache"; then
28300    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
28301$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
28302    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
28303    # We want to control ccache invocation ourselves, so ignore this cc and try
28304    # searching again.
28305
28306    # Remove the path to the fake ccache cc from the PATH
28307    RETRY_COMPILER_SAVED_PATH="$PATH"
28308    COMPILER_DIRNAME=`$DIRNAME $CC`
28309    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
28310
28311    # Try again looking for our compiler
28312    if test -n "$ac_tool_prefix"; then
28313  for ac_prog in $TOOLCHAIN_CC_BINARY
28314  do
28315    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28316set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28318$as_echo_n "checking for $ac_word... " >&6; }
28319if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
28320  $as_echo_n "(cached) " >&6
28321else
28322  if test -n "$PROPER_COMPILER_CC"; then
28323  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
28324else
28325as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28326for as_dir in $PATH
28327do
28328  IFS=$as_save_IFS
28329  test -z "$as_dir" && as_dir=.
28330    for ac_exec_ext in '' $ac_executable_extensions; do
28331  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28332    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
28333    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28334    break 2
28335  fi
28336done
28337  done
28338IFS=$as_save_IFS
28339
28340fi
28341fi
28342PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
28343if test -n "$PROPER_COMPILER_CC"; then
28344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
28345$as_echo "$PROPER_COMPILER_CC" >&6; }
28346else
28347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28348$as_echo "no" >&6; }
28349fi
28350
28351
28352    test -n "$PROPER_COMPILER_CC" && break
28353  done
28354fi
28355if test -z "$PROPER_COMPILER_CC"; then
28356  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
28357  for ac_prog in $TOOLCHAIN_CC_BINARY
28358do
28359  # Extract the first word of "$ac_prog", so it can be a program name with args.
28360set dummy $ac_prog; ac_word=$2
28361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28362$as_echo_n "checking for $ac_word... " >&6; }
28363if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
28364  $as_echo_n "(cached) " >&6
28365else
28366  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28367  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
28368else
28369as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28370for as_dir in $PATH
28371do
28372  IFS=$as_save_IFS
28373  test -z "$as_dir" && as_dir=.
28374    for ac_exec_ext in '' $ac_executable_extensions; do
28375  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28376    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
28377    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28378    break 2
28379  fi
28380done
28381  done
28382IFS=$as_save_IFS
28383
28384fi
28385fi
28386ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
28387if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
28389$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
28390else
28391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28392$as_echo "no" >&6; }
28393fi
28394
28395
28396  test -n "$ac_ct_PROPER_COMPILER_CC" && break
28397done
28398
28399  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
28400    PROPER_COMPILER_CC=""
28401  else
28402    case $cross_compiling:$ac_tool_warned in
28403yes:)
28404{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28405$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28406ac_tool_warned=yes ;;
28407esac
28408    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
28409  fi
28410fi
28411
28412
28413  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28414
28415  # First separate the path from the arguments. This will split at the first
28416  # space.
28417  complete="$PROPER_COMPILER_CC"
28418  path="${complete%% *}"
28419  tmp="$complete EOL"
28420  arguments="${tmp#* }"
28421
28422  # Input might be given as Windows format, start by converting to
28423  # unix format.
28424  new_path=`$CYGPATH -u "$path"`
28425
28426  # Now try to locate executable using which
28427  new_path=`$WHICH "$new_path" 2> /dev/null`
28428  # bat and cmd files are not always considered executable in cygwin causing which
28429  # to not find them
28430  if test "x$new_path" = x \
28431      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28432      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28433    new_path=`$CYGPATH -u "$path"`
28434  fi
28435  if test "x$new_path" = x; then
28436    # Oops. Which didn't find the executable.
28437    # The splitting of arguments from the executable at a space might have been incorrect,
28438    # since paths with space are more likely in Windows. Give it another try with the whole
28439    # argument.
28440    path="$complete"
28441    arguments="EOL"
28442    new_path=`$CYGPATH -u "$path"`
28443    new_path=`$WHICH "$new_path" 2> /dev/null`
28444    # bat and cmd files are not always considered executable in cygwin causing which
28445    # to not find them
28446    if test "x$new_path" = x \
28447        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28448        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28449      new_path=`$CYGPATH -u "$path"`
28450    fi
28451    if test "x$new_path" = x; then
28452      # It's still not found. Now this is an unrecoverable error.
28453      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28454$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28455      has_space=`$ECHO "$complete" | $GREP " "`
28456      if test "x$has_space" != x; then
28457        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28458$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28459      fi
28460      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28461    fi
28462  fi
28463
28464  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28465  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28466  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28467  # "foo.exe" is OK but "foo" is an error.
28468  #
28469  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28470  # It is also a way to make sure we got the proper file name for the real test later on.
28471  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28472  if test "x$test_shortpath" = x; then
28473    # Short path failed, file does not exist as specified.
28474    # Try adding .exe or .cmd
28475    if test -f "${new_path}.exe"; then
28476      input_to_shortpath="${new_path}.exe"
28477    elif test -f "${new_path}.cmd"; then
28478      input_to_shortpath="${new_path}.cmd"
28479    else
28480      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
28481$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
28482      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28483$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28484      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28485    fi
28486  else
28487    input_to_shortpath="$new_path"
28488  fi
28489
28490  # Call helper function which possibly converts this using DOS-style short mode.
28491  # If so, the updated path is stored in $new_path.
28492  new_path="$input_to_shortpath"
28493
28494  input_path="$input_to_shortpath"
28495  # Check if we need to convert this using DOS-style short mode. If the path
28496  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28497  # take no chances and rewrite it.
28498  # Note: m4 eats our [], so we need to use [ and ] instead.
28499  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28500  if test "x$has_forbidden_chars" != x; then
28501    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28502    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28503    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28504    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28505      # Going to short mode and back again did indeed matter. Since short mode is
28506      # case insensitive, let's make it lowercase to improve readability.
28507      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28508      # Now convert it back to Unix-stile (cygpath)
28509      input_path=`$CYGPATH -u "$shortmode_path"`
28510      new_path="$input_path"
28511    fi
28512  fi
28513
28514  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28515  if test "x$test_cygdrive_prefix" = x; then
28516    # As a simple fix, exclude /usr/bin since it's not a real path.
28517    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28518      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28519      # a path prefixed by /cygdrive for fixpath to work.
28520      new_path="$CYGWIN_ROOT_PATH$input_path"
28521    fi
28522  fi
28523
28524  # remove trailing .exe if any
28525  new_path="${new_path/%.exe/}"
28526
28527  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28528
28529  # First separate the path from the arguments. This will split at the first
28530  # space.
28531  complete="$PROPER_COMPILER_CC"
28532  path="${complete%% *}"
28533  tmp="$complete EOL"
28534  arguments="${tmp#* }"
28535
28536  # Input might be given as Windows format, start by converting to
28537  # unix format.
28538  new_path="$path"
28539
28540  windows_path="$new_path"
28541  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28542    unix_path=`$CYGPATH -u "$windows_path"`
28543    new_path="$unix_path"
28544  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28545    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28546    new_path="$unix_path"
28547  fi
28548
28549
28550  # Now try to locate executable using which
28551  new_path=`$WHICH "$new_path" 2> /dev/null`
28552
28553  if test "x$new_path" = x; then
28554    # Oops. Which didn't find the executable.
28555    # The splitting of arguments from the executable at a space might have been incorrect,
28556    # since paths with space are more likely in Windows. Give it another try with the whole
28557    # argument.
28558    path="$complete"
28559    arguments="EOL"
28560    new_path="$path"
28561
28562  windows_path="$new_path"
28563  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28564    unix_path=`$CYGPATH -u "$windows_path"`
28565    new_path="$unix_path"
28566  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28567    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28568    new_path="$unix_path"
28569  fi
28570
28571
28572    new_path=`$WHICH "$new_path" 2> /dev/null`
28573    # bat and cmd files are not always considered executable in MSYS causing which
28574    # to not find them
28575    if test "x$new_path" = x \
28576        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28577        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28578      new_path="$path"
28579
28580  windows_path="$new_path"
28581  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28582    unix_path=`$CYGPATH -u "$windows_path"`
28583    new_path="$unix_path"
28584  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28585    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28586    new_path="$unix_path"
28587  fi
28588
28589    fi
28590
28591    if test "x$new_path" = x; then
28592      # It's still not found. Now this is an unrecoverable error.
28593      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28594$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28595      has_space=`$ECHO "$complete" | $GREP " "`
28596      if test "x$has_space" != x; then
28597        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28598$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28599      fi
28600      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28601    fi
28602  fi
28603
28604  # Now new_path has a complete unix path to the binary
28605  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28606    # Keep paths in /bin as-is, but remove trailing .exe if any
28607    new_path="${new_path/%.exe/}"
28608    # Do not save /bin paths to all_fixpath_prefixes!
28609  else
28610    # Not in mixed or Windows style, start by that.
28611    new_path=`cmd //c echo $new_path`
28612
28613  input_path="$new_path"
28614  # Check if we need to convert this using DOS-style short mode. If the path
28615  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28616  # take no chances and rewrite it.
28617  # Note: m4 eats our [], so we need to use [ and ] instead.
28618  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28619  if test "x$has_forbidden_chars" != x; then
28620    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28621    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28622  fi
28623
28624    # Output is in $new_path
28625
28626  windows_path="$new_path"
28627  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28628    unix_path=`$CYGPATH -u "$windows_path"`
28629    new_path="$unix_path"
28630  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28631    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28632    new_path="$unix_path"
28633  fi
28634
28635    # remove trailing .exe if any
28636    new_path="${new_path/%.exe/}"
28637
28638    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28639    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28640  fi
28641
28642  else
28643    # We're on a unix platform. Hooray! :)
28644    # First separate the path from the arguments. This will split at the first
28645    # space.
28646    complete="$PROPER_COMPILER_CC"
28647    path="${complete%% *}"
28648    tmp="$complete EOL"
28649    arguments="${tmp#* }"
28650
28651    # Cannot rely on the command "which" here since it doesn't always work.
28652    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28653    if test -z "$is_absolute_path"; then
28654      # Path to executable is not absolute. Find it.
28655      IFS_save="$IFS"
28656      IFS=:
28657      for p in $PATH; do
28658        if test -f "$p/$path" && test -x "$p/$path"; then
28659          new_path="$p/$path"
28660          break
28661        fi
28662      done
28663      IFS="$IFS_save"
28664    else
28665      # This is an absolute path, we can use it without further modifications.
28666      new_path="$path"
28667    fi
28668
28669    if test "x$new_path" = x; then
28670      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28671$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28672      has_space=`$ECHO "$complete" | $GREP " "`
28673      if test "x$has_space" != x; then
28674        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28675$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28676      fi
28677      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28678    fi
28679  fi
28680
28681  # Now join together the path and the arguments once again
28682  if test "x$arguments" != xEOL; then
28683    new_complete="$new_path ${arguments% *}"
28684  else
28685    new_complete="$new_path"
28686  fi
28687
28688  if test "x$complete" != "x$new_complete"; then
28689    PROPER_COMPILER_CC="$new_complete"
28690    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
28691$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
28692  fi
28693
28694    PATH="$RETRY_COMPILER_SAVED_PATH"
28695
28696    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
28697$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
28698
28699  if test "x$OPENJDK_BUILD_OS" != xwindows; then
28700    # Follow a chain of symbolic links. Use readlink
28701    # where it exists, else fall back to horribly
28702    # complicated shell code.
28703    if test "x$READLINK_TESTED" != yes; then
28704      # On MacOSX there is a readlink tool with a different
28705      # purpose than the GNU readlink tool. Check the found readlink.
28706      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
28707      if test "x$ISGNU" = x; then
28708        # A readlink that we do not know how to use.
28709        # Are there other non-GNU readlinks out there?
28710        READLINK_TESTED=yes
28711        READLINK=
28712      fi
28713    fi
28714
28715    if test "x$READLINK" != x; then
28716      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
28717    else
28718      # Save the current directory for restoring afterwards
28719      STARTDIR=$PWD
28720      COUNTER=0
28721      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
28722      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
28723      cd $sym_link_dir
28724      # Use -P flag to resolve symlinks in directories.
28725      cd `$THEPWDCMD -P`
28726      sym_link_dir=`$THEPWDCMD -P`
28727      # Resolve file symlinks
28728      while test $COUNTER -lt 20; do
28729        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
28730        if test "x$ISLINK" == x; then
28731          # This is not a symbolic link! We are done!
28732          break
28733        fi
28734        # Again resolve directory symlinks since the target of the just found
28735        # link could be in a different directory
28736        cd `$DIRNAME $ISLINK`
28737        sym_link_dir=`$THEPWDCMD -P`
28738        sym_link_file=`$BASENAME $ISLINK`
28739        let COUNTER=COUNTER+1
28740      done
28741      cd $STARTDIR
28742      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
28743    fi
28744  fi
28745
28746    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
28747$as_echo "$PROPER_COMPILER_CC" >&6; }
28748    CC="$PROPER_COMPILER_CC"
28749  else
28750    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
28751$as_echo "no, keeping CC" >&6; }
28752  fi
28753
28754
28755  COMPILER=$CC
28756  COMPILER_NAME=$COMPILER_NAME
28757
28758  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
28759    # cc -V output typically looks like
28760    #     cc: Sun C 5.12 Linux_i386 2011/11/16
28761    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
28762    # Check that this is likely to be the Solaris Studio cc.
28763    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
28764    if test $? -ne 0; then
28765      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28766      { $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
28767$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28768      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28769$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28770      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
28771$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
28772      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28773    fi
28774    # Remove usage instructions (if present), and
28775    # collapse compiler output into a single line
28776    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
28777        $SED -e 's/ *[Uu]sage:.*//'`
28778    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28779        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
28780  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
28781    # xlc -qversion output typically looks like
28782    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
28783    #     Version: 11.01.0000.0015
28784    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
28785    # Check that this is likely to be the IBM XL C compiler.
28786    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
28787    if test $? -ne 0; then
28788      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28789      { $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
28790$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28791      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28792$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28793      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
28794$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
28795      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28796    fi
28797    # Collapse compiler output into a single line
28798    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28799    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28800        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
28801  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
28802    # There is no specific version flag, but all output starts with a version string.
28803    # First line typically looks something like:
28804    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
28805    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
28806    # Check that this is likely to be Microsoft CL.EXE.
28807    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
28808    if test $? -ne 0; then
28809      { $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
28810$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28811      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28812$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28813      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28814    fi
28815    # Collapse compiler output into a single line
28816    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28817    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28818        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
28819  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
28820    # gcc --version output typically looks like
28821    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
28822    #     Copyright (C) 2013 Free Software Foundation, Inc.
28823    #     This is free software; see the source for copying conditions.  There is NO
28824    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
28825    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28826    # Check that this is likely to be GCC.
28827    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
28828    if test $? -ne 0; then
28829      { $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
28830$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28831      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
28832$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
28833      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28834    fi
28835    # Remove Copyright and legalese from version string, and
28836    # collapse into a single line
28837    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
28838        $SED -e 's/ *Copyright .*//'`
28839    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28840        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
28841  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
28842    # clang --version output typically looks like
28843    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
28844    #    clang version 3.3 (tags/RELEASE_33/final)
28845    # or
28846    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
28847    #    Target: x86_64-pc-linux-gnu
28848    #    Thread model: posix
28849    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28850    # Check that this is likely to be clang
28851    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
28852    if test $? -ne 0; then
28853      { $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
28854$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28855      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28856$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28857      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28858    fi
28859    # Collapse compiler output into a single line
28860    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28861    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28862        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
28863  else
28864      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
28865  fi
28866  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
28867  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
28868  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
28869  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
28870
28871  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
28872$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
28873
28874
28875  # Now that we have resolved CC ourself, let autoconf have its go at it
28876  ac_ext=c
28877ac_cpp='$CPP $CPPFLAGS'
28878ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
28879ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
28880ac_compiler_gnu=$ac_cv_c_compiler_gnu
28881if test -n "$ac_tool_prefix"; then
28882  for ac_prog in $CC
28883  do
28884    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28885set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28887$as_echo_n "checking for $ac_word... " >&6; }
28888if ${ac_cv_prog_CC+:} false; then :
28889  $as_echo_n "(cached) " >&6
28890else
28891  if test -n "$CC"; then
28892  ac_cv_prog_CC="$CC" # Let the user override the test.
28893else
28894as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28895for as_dir in $PATH
28896do
28897  IFS=$as_save_IFS
28898  test -z "$as_dir" && as_dir=.
28899    for ac_exec_ext in '' $ac_executable_extensions; do
28900  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28901    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
28902    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28903    break 2
28904  fi
28905done
28906  done
28907IFS=$as_save_IFS
28908
28909fi
28910fi
28911CC=$ac_cv_prog_CC
28912if test -n "$CC"; then
28913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
28914$as_echo "$CC" >&6; }
28915else
28916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28917$as_echo "no" >&6; }
28918fi
28919
28920
28921    test -n "$CC" && break
28922  done
28923fi
28924if test -z "$CC"; then
28925  ac_ct_CC=$CC
28926  for ac_prog in $CC
28927do
28928  # Extract the first word of "$ac_prog", so it can be a program name with args.
28929set dummy $ac_prog; ac_word=$2
28930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28931$as_echo_n "checking for $ac_word... " >&6; }
28932if ${ac_cv_prog_ac_ct_CC+:} false; then :
28933  $as_echo_n "(cached) " >&6
28934else
28935  if test -n "$ac_ct_CC"; then
28936  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
28937else
28938as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28939for as_dir in $PATH
28940do
28941  IFS=$as_save_IFS
28942  test -z "$as_dir" && as_dir=.
28943    for ac_exec_ext in '' $ac_executable_extensions; do
28944  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28945    ac_cv_prog_ac_ct_CC="$ac_prog"
28946    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28947    break 2
28948  fi
28949done
28950  done
28951IFS=$as_save_IFS
28952
28953fi
28954fi
28955ac_ct_CC=$ac_cv_prog_ac_ct_CC
28956if test -n "$ac_ct_CC"; then
28957  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
28958$as_echo "$ac_ct_CC" >&6; }
28959else
28960  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28961$as_echo "no" >&6; }
28962fi
28963
28964
28965  test -n "$ac_ct_CC" && break
28966done
28967
28968  if test "x$ac_ct_CC" = x; then
28969    CC=""
28970  else
28971    case $cross_compiling:$ac_tool_warned in
28972yes:)
28973{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28974$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28975ac_tool_warned=yes ;;
28976esac
28977    CC=$ac_ct_CC
28978  fi
28979fi
28980
28981
28982test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28983$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28984as_fn_error $? "no acceptable C compiler found in \$PATH
28985See \`config.log' for more details" "$LINENO" 5; }
28986
28987# Provide some information about the compiler.
28988$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
28989set X $ac_compile
28990ac_compiler=$2
28991for ac_option in --version -v -V -qversion; do
28992  { { ac_try="$ac_compiler $ac_option >&5"
28993case "(($ac_try" in
28994  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28995  *) ac_try_echo=$ac_try;;
28996esac
28997eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28998$as_echo "$ac_try_echo"; } >&5
28999  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
29000  ac_status=$?
29001  if test -s conftest.err; then
29002    sed '10a\
29003... rest of stderr output deleted ...
29004         10q' conftest.err >conftest.er1
29005    cat conftest.er1 >&5
29006  fi
29007  rm -f conftest.er1 conftest.err
29008  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29009  test $ac_status = 0; }
29010done
29011
29012cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29013/* end confdefs.h.  */
29014
29015int
29016main ()
29017{
29018
29019  ;
29020  return 0;
29021}
29022_ACEOF
29023ac_clean_files_save=$ac_clean_files
29024ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
29025# Try to create an executable without -o first, disregard a.out.
29026# It will help us diagnose broken compilers, and finding out an intuition
29027# of exeext.
29028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
29029$as_echo_n "checking whether the C compiler works... " >&6; }
29030ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
29031
29032# The possible output files:
29033ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
29034
29035ac_rmfiles=
29036for ac_file in $ac_files
29037do
29038  case $ac_file in
29039    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
29040    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
29041  esac
29042done
29043rm -f $ac_rmfiles
29044
29045if { { ac_try="$ac_link_default"
29046case "(($ac_try" in
29047  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29048  *) ac_try_echo=$ac_try;;
29049esac
29050eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29051$as_echo "$ac_try_echo"; } >&5
29052  (eval "$ac_link_default") 2>&5
29053  ac_status=$?
29054  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29055  test $ac_status = 0; }; then :
29056  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
29057# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
29058# in a Makefile.  We should not override ac_cv_exeext if it was cached,
29059# so that the user can short-circuit this test for compilers unknown to
29060# Autoconf.
29061for ac_file in $ac_files ''
29062do
29063  test -f "$ac_file" || continue
29064  case $ac_file in
29065    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
29066	;;
29067    [ab].out )
29068	# We found the default executable, but exeext='' is most
29069	# certainly right.
29070	break;;
29071    *.* )
29072	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
29073	then :; else
29074	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
29075	fi
29076	# We set ac_cv_exeext here because the later test for it is not
29077	# safe: cross compilers may not add the suffix if given an `-o'
29078	# argument, so we may need to know it at that point already.
29079	# Even if this section looks crufty: it has the advantage of
29080	# actually working.
29081	break;;
29082    * )
29083	break;;
29084  esac
29085done
29086test "$ac_cv_exeext" = no && ac_cv_exeext=
29087
29088else
29089  ac_file=''
29090fi
29091if test -z "$ac_file"; then :
29092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29093$as_echo "no" >&6; }
29094$as_echo "$as_me: failed program was:" >&5
29095sed 's/^/| /' conftest.$ac_ext >&5
29096
29097{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29098$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29099as_fn_error 77 "C compiler cannot create executables
29100See \`config.log' for more details" "$LINENO" 5; }
29101else
29102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29103$as_echo "yes" >&6; }
29104fi
29105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
29106$as_echo_n "checking for C compiler default output file name... " >&6; }
29107{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
29108$as_echo "$ac_file" >&6; }
29109ac_exeext=$ac_cv_exeext
29110
29111rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
29112ac_clean_files=$ac_clean_files_save
29113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
29114$as_echo_n "checking for suffix of executables... " >&6; }
29115if { { ac_try="$ac_link"
29116case "(($ac_try" in
29117  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29118  *) ac_try_echo=$ac_try;;
29119esac
29120eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29121$as_echo "$ac_try_echo"; } >&5
29122  (eval "$ac_link") 2>&5
29123  ac_status=$?
29124  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29125  test $ac_status = 0; }; then :
29126  # If both `conftest.exe' and `conftest' are `present' (well, observable)
29127# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
29128# work properly (i.e., refer to `conftest.exe'), while it won't with
29129# `rm'.
29130for ac_file in conftest.exe conftest conftest.*; do
29131  test -f "$ac_file" || continue
29132  case $ac_file in
29133    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
29134    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
29135	  break;;
29136    * ) break;;
29137  esac
29138done
29139else
29140  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29141$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29142as_fn_error $? "cannot compute suffix of executables: cannot compile and link
29143See \`config.log' for more details" "$LINENO" 5; }
29144fi
29145rm -f conftest conftest$ac_cv_exeext
29146{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
29147$as_echo "$ac_cv_exeext" >&6; }
29148
29149rm -f conftest.$ac_ext
29150EXEEXT=$ac_cv_exeext
29151ac_exeext=$EXEEXT
29152cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29153/* end confdefs.h.  */
29154#include <stdio.h>
29155int
29156main ()
29157{
29158FILE *f = fopen ("conftest.out", "w");
29159 return ferror (f) || fclose (f) != 0;
29160
29161  ;
29162  return 0;
29163}
29164_ACEOF
29165ac_clean_files="$ac_clean_files conftest.out"
29166# Check that the compiler produces executables we can run.  If not, either
29167# the compiler is broken, or we cross compile.
29168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
29169$as_echo_n "checking whether we are cross compiling... " >&6; }
29170if test "$cross_compiling" != yes; then
29171  { { ac_try="$ac_link"
29172case "(($ac_try" in
29173  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29174  *) ac_try_echo=$ac_try;;
29175esac
29176eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29177$as_echo "$ac_try_echo"; } >&5
29178  (eval "$ac_link") 2>&5
29179  ac_status=$?
29180  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29181  test $ac_status = 0; }
29182  if { ac_try='./conftest$ac_cv_exeext'
29183  { { case "(($ac_try" in
29184  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29185  *) ac_try_echo=$ac_try;;
29186esac
29187eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29188$as_echo "$ac_try_echo"; } >&5
29189  (eval "$ac_try") 2>&5
29190  ac_status=$?
29191  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29192  test $ac_status = 0; }; }; then
29193    cross_compiling=no
29194  else
29195    if test "$cross_compiling" = maybe; then
29196	cross_compiling=yes
29197    else
29198	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29199$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29200as_fn_error $? "cannot run C compiled programs.
29201If you meant to cross compile, use \`--host'.
29202See \`config.log' for more details" "$LINENO" 5; }
29203    fi
29204  fi
29205fi
29206{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
29207$as_echo "$cross_compiling" >&6; }
29208
29209rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
29210ac_clean_files=$ac_clean_files_save
29211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
29212$as_echo_n "checking for suffix of object files... " >&6; }
29213if ${ac_cv_objext+:} false; then :
29214  $as_echo_n "(cached) " >&6
29215else
29216  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29217/* end confdefs.h.  */
29218
29219int
29220main ()
29221{
29222
29223  ;
29224  return 0;
29225}
29226_ACEOF
29227rm -f conftest.o conftest.obj
29228if { { ac_try="$ac_compile"
29229case "(($ac_try" in
29230  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29231  *) ac_try_echo=$ac_try;;
29232esac
29233eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29234$as_echo "$ac_try_echo"; } >&5
29235  (eval "$ac_compile") 2>&5
29236  ac_status=$?
29237  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29238  test $ac_status = 0; }; then :
29239  for ac_file in conftest.o conftest.obj conftest.*; do
29240  test -f "$ac_file" || continue;
29241  case $ac_file in
29242    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
29243    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
29244       break;;
29245  esac
29246done
29247else
29248  $as_echo "$as_me: failed program was:" >&5
29249sed 's/^/| /' conftest.$ac_ext >&5
29250
29251{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29252$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29253as_fn_error $? "cannot compute suffix of object files: cannot compile
29254See \`config.log' for more details" "$LINENO" 5; }
29255fi
29256rm -f conftest.$ac_cv_objext conftest.$ac_ext
29257fi
29258{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
29259$as_echo "$ac_cv_objext" >&6; }
29260OBJEXT=$ac_cv_objext
29261ac_objext=$OBJEXT
29262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
29263$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
29264if ${ac_cv_c_compiler_gnu+:} false; then :
29265  $as_echo_n "(cached) " >&6
29266else
29267  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29268/* end confdefs.h.  */
29269
29270int
29271main ()
29272{
29273#ifndef __GNUC__
29274       choke me
29275#endif
29276
29277  ;
29278  return 0;
29279}
29280_ACEOF
29281if ac_fn_c_try_compile "$LINENO"; then :
29282  ac_compiler_gnu=yes
29283else
29284  ac_compiler_gnu=no
29285fi
29286rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29287ac_cv_c_compiler_gnu=$ac_compiler_gnu
29288
29289fi
29290{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
29291$as_echo "$ac_cv_c_compiler_gnu" >&6; }
29292if test $ac_compiler_gnu = yes; then
29293  GCC=yes
29294else
29295  GCC=
29296fi
29297ac_test_CFLAGS=${CFLAGS+set}
29298ac_save_CFLAGS=$CFLAGS
29299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
29300$as_echo_n "checking whether $CC accepts -g... " >&6; }
29301if ${ac_cv_prog_cc_g+:} false; then :
29302  $as_echo_n "(cached) " >&6
29303else
29304  ac_save_c_werror_flag=$ac_c_werror_flag
29305   ac_c_werror_flag=yes
29306   ac_cv_prog_cc_g=no
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
29321else
29322  CFLAGS=""
29323      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29324/* end confdefs.h.  */
29325
29326int
29327main ()
29328{
29329
29330  ;
29331  return 0;
29332}
29333_ACEOF
29334if ac_fn_c_try_compile "$LINENO"; then :
29335
29336else
29337  ac_c_werror_flag=$ac_save_c_werror_flag
29338	 CFLAGS="-g"
29339	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29340/* end confdefs.h.  */
29341
29342int
29343main ()
29344{
29345
29346  ;
29347  return 0;
29348}
29349_ACEOF
29350if ac_fn_c_try_compile "$LINENO"; then :
29351  ac_cv_prog_cc_g=yes
29352fi
29353rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29354fi
29355rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29356fi
29357rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29358   ac_c_werror_flag=$ac_save_c_werror_flag
29359fi
29360{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
29361$as_echo "$ac_cv_prog_cc_g" >&6; }
29362if test "$ac_test_CFLAGS" = set; then
29363  CFLAGS=$ac_save_CFLAGS
29364elif test $ac_cv_prog_cc_g = yes; then
29365  if test "$GCC" = yes; then
29366    CFLAGS="-g -O2"
29367  else
29368    CFLAGS="-g"
29369  fi
29370else
29371  if test "$GCC" = yes; then
29372    CFLAGS="-O2"
29373  else
29374    CFLAGS=
29375  fi
29376fi
29377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
29378$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
29379if ${ac_cv_prog_cc_c89+:} false; then :
29380  $as_echo_n "(cached) " >&6
29381else
29382  ac_cv_prog_cc_c89=no
29383ac_save_CC=$CC
29384cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29385/* end confdefs.h.  */
29386#include <stdarg.h>
29387#include <stdio.h>
29388struct stat;
29389/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
29390struct buf { int x; };
29391FILE * (*rcsopen) (struct buf *, struct stat *, int);
29392static char *e (p, i)
29393     char **p;
29394     int i;
29395{
29396  return p[i];
29397}
29398static char *f (char * (*g) (char **, int), char **p, ...)
29399{
29400  char *s;
29401  va_list v;
29402  va_start (v,p);
29403  s = g (p, va_arg (v,int));
29404  va_end (v);
29405  return s;
29406}
29407
29408/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
29409   function prototypes and stuff, but not '\xHH' hex character constants.
29410   These don't provoke an error unfortunately, instead are silently treated
29411   as 'x'.  The following induces an error, until -std is added to get
29412   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
29413   array size at least.  It's necessary to write '\x00'==0 to get something
29414   that's true only with -std.  */
29415int osf4_cc_array ['\x00' == 0 ? 1 : -1];
29416
29417/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
29418   inside strings and character constants.  */
29419#define FOO(x) 'x'
29420int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
29421
29422int test (int i, double x);
29423struct s1 {int (*f) (int a);};
29424struct s2 {int (*f) (double a);};
29425int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
29426int argc;
29427char **argv;
29428int
29429main ()
29430{
29431return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
29432  ;
29433  return 0;
29434}
29435_ACEOF
29436for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
29437	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
29438do
29439  CC="$ac_save_CC $ac_arg"
29440  if ac_fn_c_try_compile "$LINENO"; then :
29441  ac_cv_prog_cc_c89=$ac_arg
29442fi
29443rm -f core conftest.err conftest.$ac_objext
29444  test "x$ac_cv_prog_cc_c89" != "xno" && break
29445done
29446rm -f conftest.$ac_ext
29447CC=$ac_save_CC
29448
29449fi
29450# AC_CACHE_VAL
29451case "x$ac_cv_prog_cc_c89" in
29452  x)
29453    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
29454$as_echo "none needed" >&6; } ;;
29455  xno)
29456    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
29457$as_echo "unsupported" >&6; } ;;
29458  *)
29459    CC="$CC $ac_cv_prog_cc_c89"
29460    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
29461$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
29462esac
29463if test "x$ac_cv_prog_cc_c89" != xno; then :
29464
29465fi
29466
29467ac_ext=cpp
29468ac_cpp='$CXXCPP $CPPFLAGS'
29469ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29470ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29471ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29472
29473
29474
29475  COMPILER_NAME=C++
29476  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
29477
29478  if test "x$CXX" != x; then
29479    # User has supplied compiler name already, always let that override.
29480    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
29481$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
29482    if test "x`basename $CXX`" = "x$CXX"; then
29483      # A command without a complete path is provided, search $PATH.
29484
29485      for ac_prog in $CXX
29486do
29487  # Extract the first word of "$ac_prog", so it can be a program name with args.
29488set dummy $ac_prog; ac_word=$2
29489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29490$as_echo_n "checking for $ac_word... " >&6; }
29491if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29492  $as_echo_n "(cached) " >&6
29493else
29494  case $POTENTIAL_CXX in
29495  [\\/]* | ?:[\\/]*)
29496  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29497  ;;
29498  *)
29499  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29500for as_dir in $PATH
29501do
29502  IFS=$as_save_IFS
29503  test -z "$as_dir" && as_dir=.
29504    for ac_exec_ext in '' $ac_executable_extensions; do
29505  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29506    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29507    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29508    break 2
29509  fi
29510done
29511  done
29512IFS=$as_save_IFS
29513
29514  ;;
29515esac
29516fi
29517POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29518if test -n "$POTENTIAL_CXX"; then
29519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
29520$as_echo "$POTENTIAL_CXX" >&6; }
29521else
29522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29523$as_echo "no" >&6; }
29524fi
29525
29526
29527  test -n "$POTENTIAL_CXX" && break
29528done
29529
29530      if test "x$POTENTIAL_CXX" != x; then
29531        CXX=$POTENTIAL_CXX
29532      else
29533        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
29534      fi
29535    else
29536      # Otherwise it might already be a complete path
29537      if test ! -x "$CXX"; then
29538        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
29539      fi
29540    fi
29541  else
29542    # No user supplied value. Locate compiler ourselves.
29543
29544    # If we are cross compiling, assume cross compilation tools follows the
29545    # cross compilation standard where they are prefixed with the autoconf
29546    # standard name for the target. For example the binary
29547    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
29548    # If we are not cross compiling, then the default compiler name will be
29549    # used.
29550
29551    CXX=
29552    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
29553    # before checking the rest of the PATH.
29554    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
29555    # step, this should not be necessary.
29556    if test -n "$TOOLCHAIN_PATH"; then
29557      PATH_save="$PATH"
29558      PATH="$TOOLCHAIN_PATH"
29559      for ac_prog in $SEARCH_LIST
29560do
29561  # Extract the first word of "$ac_prog", so it can be a program name with args.
29562set dummy $ac_prog; ac_word=$2
29563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29564$as_echo_n "checking for $ac_word... " >&6; }
29565if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
29566  $as_echo_n "(cached) " >&6
29567else
29568  case $TOOLCHAIN_PATH_CXX in
29569  [\\/]* | ?:[\\/]*)
29570  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
29571  ;;
29572  *)
29573  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29574for as_dir in $PATH
29575do
29576  IFS=$as_save_IFS
29577  test -z "$as_dir" && as_dir=.
29578    for ac_exec_ext in '' $ac_executable_extensions; do
29579  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29580    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
29581    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29582    break 2
29583  fi
29584done
29585  done
29586IFS=$as_save_IFS
29587
29588  ;;
29589esac
29590fi
29591TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
29592if test -n "$TOOLCHAIN_PATH_CXX"; then
29593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
29594$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
29595else
29596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29597$as_echo "no" >&6; }
29598fi
29599
29600
29601  test -n "$TOOLCHAIN_PATH_CXX" && break
29602done
29603
29604      CXX=$TOOLCHAIN_PATH_CXX
29605      PATH="$PATH_save"
29606    fi
29607
29608    # AC_PATH_PROGS can't be run multiple times with the same variable,
29609    # so create a new name for this run.
29610    if test "x$CXX" = x; then
29611      for ac_prog in $SEARCH_LIST
29612do
29613  # Extract the first word of "$ac_prog", so it can be a program name with args.
29614set dummy $ac_prog; ac_word=$2
29615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29616$as_echo_n "checking for $ac_word... " >&6; }
29617if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29618  $as_echo_n "(cached) " >&6
29619else
29620  case $POTENTIAL_CXX in
29621  [\\/]* | ?:[\\/]*)
29622  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29623  ;;
29624  *)
29625  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29626for as_dir in $PATH
29627do
29628  IFS=$as_save_IFS
29629  test -z "$as_dir" && as_dir=.
29630    for ac_exec_ext in '' $ac_executable_extensions; do
29631  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29632    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29633    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29634    break 2
29635  fi
29636done
29637  done
29638IFS=$as_save_IFS
29639
29640  ;;
29641esac
29642fi
29643POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29644if test -n "$POTENTIAL_CXX"; then
29645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
29646$as_echo "$POTENTIAL_CXX" >&6; }
29647else
29648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29649$as_echo "no" >&6; }
29650fi
29651
29652
29653  test -n "$POTENTIAL_CXX" && break
29654done
29655
29656      CXX=$POTENTIAL_CXX
29657    fi
29658
29659    if test "x$CXX" = x; then
29660
29661  # Print a helpful message on how to acquire the necessary build dependency.
29662  # devkit is the help tag: freetype, cups, pulse, alsa etc
29663  MISSING_DEPENDENCY=devkit
29664
29665  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29666    cygwin_help $MISSING_DEPENDENCY
29667  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29668    msys_help $MISSING_DEPENDENCY
29669  else
29670    PKGHANDLER_COMMAND=
29671
29672    case $PKGHANDLER in
29673      apt-get)
29674        apt_help     $MISSING_DEPENDENCY ;;
29675      yum)
29676        yum_help     $MISSING_DEPENDENCY ;;
29677      port)
29678        port_help    $MISSING_DEPENDENCY ;;
29679      pkgutil)
29680        pkgutil_help $MISSING_DEPENDENCY ;;
29681      pkgadd)
29682        pkgadd_help  $MISSING_DEPENDENCY ;;
29683    esac
29684
29685    if test "x$PKGHANDLER_COMMAND" != x; then
29686      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29687    fi
29688  fi
29689
29690      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
29691    fi
29692  fi
29693
29694  # Now we have a compiler binary in CXX. Make sure it's okay.
29695
29696  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29697
29698  # First separate the path from the arguments. This will split at the first
29699  # space.
29700  complete="$CXX"
29701  path="${complete%% *}"
29702  tmp="$complete EOL"
29703  arguments="${tmp#* }"
29704
29705  # Input might be given as Windows format, start by converting to
29706  # unix format.
29707  new_path=`$CYGPATH -u "$path"`
29708
29709  # Now try to locate executable using which
29710  new_path=`$WHICH "$new_path" 2> /dev/null`
29711  # bat and cmd files are not always considered executable in cygwin causing which
29712  # to not find them
29713  if test "x$new_path" = x \
29714      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29715      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29716    new_path=`$CYGPATH -u "$path"`
29717  fi
29718  if test "x$new_path" = x; then
29719    # Oops. Which didn't find the executable.
29720    # The splitting of arguments from the executable at a space might have been incorrect,
29721    # since paths with space are more likely in Windows. Give it another try with the whole
29722    # argument.
29723    path="$complete"
29724    arguments="EOL"
29725    new_path=`$CYGPATH -u "$path"`
29726    new_path=`$WHICH "$new_path" 2> /dev/null`
29727    # bat and cmd files are not always considered executable in cygwin causing which
29728    # to not find them
29729    if test "x$new_path" = x \
29730        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29731        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29732      new_path=`$CYGPATH -u "$path"`
29733    fi
29734    if test "x$new_path" = x; then
29735      # It's still not found. Now this is an unrecoverable error.
29736      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29737$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29738      has_space=`$ECHO "$complete" | $GREP " "`
29739      if test "x$has_space" != x; then
29740        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29741$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29742      fi
29743      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29744    fi
29745  fi
29746
29747  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29748  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29749  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29750  # "foo.exe" is OK but "foo" is an error.
29751  #
29752  # This test is therefore slightly more accurate than "test -f" to check for file presence.
29753  # It is also a way to make sure we got the proper file name for the real test later on.
29754  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29755  if test "x$test_shortpath" = x; then
29756    # Short path failed, file does not exist as specified.
29757    # Try adding .exe or .cmd
29758    if test -f "${new_path}.exe"; then
29759      input_to_shortpath="${new_path}.exe"
29760    elif test -f "${new_path}.cmd"; then
29761      input_to_shortpath="${new_path}.cmd"
29762    else
29763      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
29764$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
29765      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
29766$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
29767      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29768    fi
29769  else
29770    input_to_shortpath="$new_path"
29771  fi
29772
29773  # Call helper function which possibly converts this using DOS-style short mode.
29774  # If so, the updated path is stored in $new_path.
29775  new_path="$input_to_shortpath"
29776
29777  input_path="$input_to_shortpath"
29778  # Check if we need to convert this using DOS-style short mode. If the path
29779  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29780  # take no chances and rewrite it.
29781  # Note: m4 eats our [], so we need to use [ and ] instead.
29782  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29783  if test "x$has_forbidden_chars" != x; then
29784    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29785    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29786    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29787    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29788      # Going to short mode and back again did indeed matter. Since short mode is
29789      # case insensitive, let's make it lowercase to improve readability.
29790      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29791      # Now convert it back to Unix-stile (cygpath)
29792      input_path=`$CYGPATH -u "$shortmode_path"`
29793      new_path="$input_path"
29794    fi
29795  fi
29796
29797  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29798  if test "x$test_cygdrive_prefix" = x; then
29799    # As a simple fix, exclude /usr/bin since it's not a real path.
29800    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
29801      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29802      # a path prefixed by /cygdrive for fixpath to work.
29803      new_path="$CYGWIN_ROOT_PATH$input_path"
29804    fi
29805  fi
29806
29807  # remove trailing .exe if any
29808  new_path="${new_path/%.exe/}"
29809
29810  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29811
29812  # First separate the path from the arguments. This will split at the first
29813  # space.
29814  complete="$CXX"
29815  path="${complete%% *}"
29816  tmp="$complete EOL"
29817  arguments="${tmp#* }"
29818
29819  # Input might be given as Windows format, start by converting to
29820  # unix format.
29821  new_path="$path"
29822
29823  windows_path="$new_path"
29824  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29825    unix_path=`$CYGPATH -u "$windows_path"`
29826    new_path="$unix_path"
29827  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29828    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29829    new_path="$unix_path"
29830  fi
29831
29832
29833  # Now try to locate executable using which
29834  new_path=`$WHICH "$new_path" 2> /dev/null`
29835
29836  if test "x$new_path" = x; then
29837    # Oops. Which didn't find the executable.
29838    # The splitting of arguments from the executable at a space might have been incorrect,
29839    # since paths with space are more likely in Windows. Give it another try with the whole
29840    # argument.
29841    path="$complete"
29842    arguments="EOL"
29843    new_path="$path"
29844
29845  windows_path="$new_path"
29846  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29847    unix_path=`$CYGPATH -u "$windows_path"`
29848    new_path="$unix_path"
29849  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29850    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29851    new_path="$unix_path"
29852  fi
29853
29854
29855    new_path=`$WHICH "$new_path" 2> /dev/null`
29856    # bat and cmd files are not always considered executable in MSYS causing which
29857    # to not find them
29858    if test "x$new_path" = x \
29859        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29860        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29861      new_path="$path"
29862
29863  windows_path="$new_path"
29864  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29865    unix_path=`$CYGPATH -u "$windows_path"`
29866    new_path="$unix_path"
29867  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29868    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29869    new_path="$unix_path"
29870  fi
29871
29872    fi
29873
29874    if test "x$new_path" = x; then
29875      # It's still not found. Now this is an unrecoverable error.
29876      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29877$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29878      has_space=`$ECHO "$complete" | $GREP " "`
29879      if test "x$has_space" != x; then
29880        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29881$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29882      fi
29883      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29884    fi
29885  fi
29886
29887  # Now new_path has a complete unix path to the binary
29888  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
29889    # Keep paths in /bin as-is, but remove trailing .exe if any
29890    new_path="${new_path/%.exe/}"
29891    # Do not save /bin paths to all_fixpath_prefixes!
29892  else
29893    # Not in mixed or Windows style, start by that.
29894    new_path=`cmd //c echo $new_path`
29895
29896  input_path="$new_path"
29897  # Check if we need to convert this using DOS-style short mode. If the path
29898  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29899  # take no chances and rewrite it.
29900  # Note: m4 eats our [], so we need to use [ and ] instead.
29901  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29902  if test "x$has_forbidden_chars" != x; then
29903    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29904    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29905  fi
29906
29907    # Output is in $new_path
29908
29909  windows_path="$new_path"
29910  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29911    unix_path=`$CYGPATH -u "$windows_path"`
29912    new_path="$unix_path"
29913  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29914    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29915    new_path="$unix_path"
29916  fi
29917
29918    # remove trailing .exe if any
29919    new_path="${new_path/%.exe/}"
29920
29921    # Save the first 10 bytes of this path to the storage, so fixpath can work.
29922    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29923  fi
29924
29925  else
29926    # We're on a unix platform. Hooray! :)
29927    # First separate the path from the arguments. This will split at the first
29928    # space.
29929    complete="$CXX"
29930    path="${complete%% *}"
29931    tmp="$complete EOL"
29932    arguments="${tmp#* }"
29933
29934    # Cannot rely on the command "which" here since it doesn't always work.
29935    is_absolute_path=`$ECHO "$path" | $GREP ^/`
29936    if test -z "$is_absolute_path"; then
29937      # Path to executable is not absolute. Find it.
29938      IFS_save="$IFS"
29939      IFS=:
29940      for p in $PATH; do
29941        if test -f "$p/$path" && test -x "$p/$path"; then
29942          new_path="$p/$path"
29943          break
29944        fi
29945      done
29946      IFS="$IFS_save"
29947    else
29948      # This is an absolute path, we can use it without further modifications.
29949      new_path="$path"
29950    fi
29951
29952    if test "x$new_path" = x; then
29953      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29954$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29955      has_space=`$ECHO "$complete" | $GREP " "`
29956      if test "x$has_space" != x; then
29957        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
29958$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
29959      fi
29960      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29961    fi
29962  fi
29963
29964  # Now join together the path and the arguments once again
29965  if test "x$arguments" != xEOL; then
29966    new_complete="$new_path ${arguments% *}"
29967  else
29968    new_complete="$new_path"
29969  fi
29970
29971  if test "x$complete" != "x$new_complete"; then
29972    CXX="$new_complete"
29973    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
29974$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
29975  fi
29976
29977  TEST_COMPILER="$CXX"
29978  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
29979  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
29980  if test "x$OPENJDK_BUILD_OS" != xaix; then
29981    # FIXME: This test should not be needed anymore; we don't do that for any platform.
29982    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
29983$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
29984
29985  if test "x$OPENJDK_BUILD_OS" != xwindows; then
29986    # Follow a chain of symbolic links. Use readlink
29987    # where it exists, else fall back to horribly
29988    # complicated shell code.
29989    if test "x$READLINK_TESTED" != yes; then
29990      # On MacOSX there is a readlink tool with a different
29991      # purpose than the GNU readlink tool. Check the found readlink.
29992      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
29993      if test "x$ISGNU" = x; then
29994        # A readlink that we do not know how to use.
29995        # Are there other non-GNU readlinks out there?
29996        READLINK_TESTED=yes
29997        READLINK=
29998      fi
29999    fi
30000
30001    if test "x$READLINK" != x; then
30002      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
30003    else
30004      # Save the current directory for restoring afterwards
30005      STARTDIR=$PWD
30006      COUNTER=0
30007      sym_link_dir=`$DIRNAME $TEST_COMPILER`
30008      sym_link_file=`$BASENAME $TEST_COMPILER`
30009      cd $sym_link_dir
30010      # Use -P flag to resolve symlinks in directories.
30011      cd `$THEPWDCMD -P`
30012      sym_link_dir=`$THEPWDCMD -P`
30013      # Resolve file symlinks
30014      while test $COUNTER -lt 20; do
30015        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
30016        if test "x$ISLINK" == x; then
30017          # This is not a symbolic link! We are done!
30018          break
30019        fi
30020        # Again resolve directory symlinks since the target of the just found
30021        # link could be in a different directory
30022        cd `$DIRNAME $ISLINK`
30023        sym_link_dir=`$THEPWDCMD -P`
30024        sym_link_file=`$BASENAME $ISLINK`
30025        let COUNTER=COUNTER+1
30026      done
30027      cd $STARTDIR
30028      TEST_COMPILER=$sym_link_dir/$sym_link_file
30029    fi
30030  fi
30031
30032    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
30033$as_echo "$TEST_COMPILER" >&6; }
30034  fi
30035  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
30036$as_echo_n "checking if CXX is disguised ccache... " >&6; }
30037
30038  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
30039  if test "x$COMPILER_BASENAME" = "xccache"; then
30040    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
30041$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
30042    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
30043    # We want to control ccache invocation ourselves, so ignore this cc and try
30044    # searching again.
30045
30046    # Remove the path to the fake ccache cc from the PATH
30047    RETRY_COMPILER_SAVED_PATH="$PATH"
30048    COMPILER_DIRNAME=`$DIRNAME $CXX`
30049    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
30050
30051    # Try again looking for our compiler
30052    if test -n "$ac_tool_prefix"; then
30053  for ac_prog in $TOOLCHAIN_CXX_BINARY
30054  do
30055    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
30056set dummy $ac_tool_prefix$ac_prog; ac_word=$2
30057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30058$as_echo_n "checking for $ac_word... " >&6; }
30059if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
30060  $as_echo_n "(cached) " >&6
30061else
30062  if test -n "$PROPER_COMPILER_CXX"; then
30063  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
30064else
30065as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30066for as_dir in $PATH
30067do
30068  IFS=$as_save_IFS
30069  test -z "$as_dir" && as_dir=.
30070    for ac_exec_ext in '' $ac_executable_extensions; do
30071  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30072    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
30073    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30074    break 2
30075  fi
30076done
30077  done
30078IFS=$as_save_IFS
30079
30080fi
30081fi
30082PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
30083if test -n "$PROPER_COMPILER_CXX"; then
30084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
30085$as_echo "$PROPER_COMPILER_CXX" >&6; }
30086else
30087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30088$as_echo "no" >&6; }
30089fi
30090
30091
30092    test -n "$PROPER_COMPILER_CXX" && break
30093  done
30094fi
30095if test -z "$PROPER_COMPILER_CXX"; then
30096  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
30097  for ac_prog in $TOOLCHAIN_CXX_BINARY
30098do
30099  # Extract the first word of "$ac_prog", so it can be a program name with args.
30100set dummy $ac_prog; ac_word=$2
30101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30102$as_echo_n "checking for $ac_word... " >&6; }
30103if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
30104  $as_echo_n "(cached) " >&6
30105else
30106  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
30107  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
30108else
30109as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30110for as_dir in $PATH
30111do
30112  IFS=$as_save_IFS
30113  test -z "$as_dir" && as_dir=.
30114    for ac_exec_ext in '' $ac_executable_extensions; do
30115  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30116    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
30117    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30118    break 2
30119  fi
30120done
30121  done
30122IFS=$as_save_IFS
30123
30124fi
30125fi
30126ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
30127if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
30128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
30129$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
30130else
30131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30132$as_echo "no" >&6; }
30133fi
30134
30135
30136  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
30137done
30138
30139  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
30140    PROPER_COMPILER_CXX=""
30141  else
30142    case $cross_compiling:$ac_tool_warned in
30143yes:)
30144{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30145$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30146ac_tool_warned=yes ;;
30147esac
30148    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
30149  fi
30150fi
30151
30152
30153  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30154
30155  # First separate the path from the arguments. This will split at the first
30156  # space.
30157  complete="$PROPER_COMPILER_CXX"
30158  path="${complete%% *}"
30159  tmp="$complete EOL"
30160  arguments="${tmp#* }"
30161
30162  # Input might be given as Windows format, start by converting to
30163  # unix format.
30164  new_path=`$CYGPATH -u "$path"`
30165
30166  # Now try to locate executable using which
30167  new_path=`$WHICH "$new_path" 2> /dev/null`
30168  # bat and cmd files are not always considered executable in cygwin causing which
30169  # to not find them
30170  if test "x$new_path" = x \
30171      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30172      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30173    new_path=`$CYGPATH -u "$path"`
30174  fi
30175  if test "x$new_path" = x; then
30176    # Oops. Which didn't find the executable.
30177    # The splitting of arguments from the executable at a space might have been incorrect,
30178    # since paths with space are more likely in Windows. Give it another try with the whole
30179    # argument.
30180    path="$complete"
30181    arguments="EOL"
30182    new_path=`$CYGPATH -u "$path"`
30183    new_path=`$WHICH "$new_path" 2> /dev/null`
30184    # bat and cmd files are not always considered executable in cygwin causing which
30185    # to not find them
30186    if test "x$new_path" = x \
30187        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30188        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30189      new_path=`$CYGPATH -u "$path"`
30190    fi
30191    if test "x$new_path" = x; then
30192      # It's still not found. Now this is an unrecoverable error.
30193      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30194$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30195      has_space=`$ECHO "$complete" | $GREP " "`
30196      if test "x$has_space" != x; then
30197        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30198$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30199      fi
30200      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30201    fi
30202  fi
30203
30204  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30205  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30206  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30207  # "foo.exe" is OK but "foo" is an error.
30208  #
30209  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30210  # It is also a way to make sure we got the proper file name for the real test later on.
30211  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30212  if test "x$test_shortpath" = x; then
30213    # Short path failed, file does not exist as specified.
30214    # Try adding .exe or .cmd
30215    if test -f "${new_path}.exe"; then
30216      input_to_shortpath="${new_path}.exe"
30217    elif test -f "${new_path}.cmd"; then
30218      input_to_shortpath="${new_path}.cmd"
30219    else
30220      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
30221$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
30222      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30223$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30224      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30225    fi
30226  else
30227    input_to_shortpath="$new_path"
30228  fi
30229
30230  # Call helper function which possibly converts this using DOS-style short mode.
30231  # If so, the updated path is stored in $new_path.
30232  new_path="$input_to_shortpath"
30233
30234  input_path="$input_to_shortpath"
30235  # Check if we need to convert this using DOS-style short mode. If the path
30236  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30237  # take no chances and rewrite it.
30238  # Note: m4 eats our [], so we need to use [ and ] instead.
30239  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30240  if test "x$has_forbidden_chars" != x; then
30241    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30242    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30243    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30244    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30245      # Going to short mode and back again did indeed matter. Since short mode is
30246      # case insensitive, let's make it lowercase to improve readability.
30247      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30248      # Now convert it back to Unix-stile (cygpath)
30249      input_path=`$CYGPATH -u "$shortmode_path"`
30250      new_path="$input_path"
30251    fi
30252  fi
30253
30254  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30255  if test "x$test_cygdrive_prefix" = x; then
30256    # As a simple fix, exclude /usr/bin since it's not a real path.
30257    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30258      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30259      # a path prefixed by /cygdrive for fixpath to work.
30260      new_path="$CYGWIN_ROOT_PATH$input_path"
30261    fi
30262  fi
30263
30264  # remove trailing .exe if any
30265  new_path="${new_path/%.exe/}"
30266
30267  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30268
30269  # First separate the path from the arguments. This will split at the first
30270  # space.
30271  complete="$PROPER_COMPILER_CXX"
30272  path="${complete%% *}"
30273  tmp="$complete EOL"
30274  arguments="${tmp#* }"
30275
30276  # Input might be given as Windows format, start by converting to
30277  # unix format.
30278  new_path="$path"
30279
30280  windows_path="$new_path"
30281  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30282    unix_path=`$CYGPATH -u "$windows_path"`
30283    new_path="$unix_path"
30284  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30285    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30286    new_path="$unix_path"
30287  fi
30288
30289
30290  # Now try to locate executable using which
30291  new_path=`$WHICH "$new_path" 2> /dev/null`
30292
30293  if test "x$new_path" = x; then
30294    # Oops. Which didn't find the executable.
30295    # The splitting of arguments from the executable at a space might have been incorrect,
30296    # since paths with space are more likely in Windows. Give it another try with the whole
30297    # argument.
30298    path="$complete"
30299    arguments="EOL"
30300    new_path="$path"
30301
30302  windows_path="$new_path"
30303  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30304    unix_path=`$CYGPATH -u "$windows_path"`
30305    new_path="$unix_path"
30306  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30307    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30308    new_path="$unix_path"
30309  fi
30310
30311
30312    new_path=`$WHICH "$new_path" 2> /dev/null`
30313    # bat and cmd files are not always considered executable in MSYS causing which
30314    # to not find them
30315    if test "x$new_path" = x \
30316        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30317        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30318      new_path="$path"
30319
30320  windows_path="$new_path"
30321  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30322    unix_path=`$CYGPATH -u "$windows_path"`
30323    new_path="$unix_path"
30324  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30325    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30326    new_path="$unix_path"
30327  fi
30328
30329    fi
30330
30331    if test "x$new_path" = x; then
30332      # It's still not found. Now this is an unrecoverable error.
30333      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30334$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30335      has_space=`$ECHO "$complete" | $GREP " "`
30336      if test "x$has_space" != x; then
30337        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30338$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30339      fi
30340      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30341    fi
30342  fi
30343
30344  # Now new_path has a complete unix path to the binary
30345  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30346    # Keep paths in /bin as-is, but remove trailing .exe if any
30347    new_path="${new_path/%.exe/}"
30348    # Do not save /bin paths to all_fixpath_prefixes!
30349  else
30350    # Not in mixed or Windows style, start by that.
30351    new_path=`cmd //c echo $new_path`
30352
30353  input_path="$new_path"
30354  # Check if we need to convert this using DOS-style short mode. If the path
30355  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30356  # take no chances and rewrite it.
30357  # Note: m4 eats our [], so we need to use [ and ] instead.
30358  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30359  if test "x$has_forbidden_chars" != x; then
30360    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30361    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30362  fi
30363
30364    # Output is in $new_path
30365
30366  windows_path="$new_path"
30367  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30368    unix_path=`$CYGPATH -u "$windows_path"`
30369    new_path="$unix_path"
30370  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30371    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30372    new_path="$unix_path"
30373  fi
30374
30375    # remove trailing .exe if any
30376    new_path="${new_path/%.exe/}"
30377
30378    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30379    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30380  fi
30381
30382  else
30383    # We're on a unix platform. Hooray! :)
30384    # First separate the path from the arguments. This will split at the first
30385    # space.
30386    complete="$PROPER_COMPILER_CXX"
30387    path="${complete%% *}"
30388    tmp="$complete EOL"
30389    arguments="${tmp#* }"
30390
30391    # Cannot rely on the command "which" here since it doesn't always work.
30392    is_absolute_path=`$ECHO "$path" | $GREP ^/`
30393    if test -z "$is_absolute_path"; then
30394      # Path to executable is not absolute. Find it.
30395      IFS_save="$IFS"
30396      IFS=:
30397      for p in $PATH; do
30398        if test -f "$p/$path" && test -x "$p/$path"; then
30399          new_path="$p/$path"
30400          break
30401        fi
30402      done
30403      IFS="$IFS_save"
30404    else
30405      # This is an absolute path, we can use it without further modifications.
30406      new_path="$path"
30407    fi
30408
30409    if test "x$new_path" = x; then
30410      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30411$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30412      has_space=`$ECHO "$complete" | $GREP " "`
30413      if test "x$has_space" != x; then
30414        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30415$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30416      fi
30417      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30418    fi
30419  fi
30420
30421  # Now join together the path and the arguments once again
30422  if test "x$arguments" != xEOL; then
30423    new_complete="$new_path ${arguments% *}"
30424  else
30425    new_complete="$new_path"
30426  fi
30427
30428  if test "x$complete" != "x$new_complete"; then
30429    PROPER_COMPILER_CXX="$new_complete"
30430    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
30431$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
30432  fi
30433
30434    PATH="$RETRY_COMPILER_SAVED_PATH"
30435
30436    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
30437$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
30438
30439  if test "x$OPENJDK_BUILD_OS" != xwindows; then
30440    # Follow a chain of symbolic links. Use readlink
30441    # where it exists, else fall back to horribly
30442    # complicated shell code.
30443    if test "x$READLINK_TESTED" != yes; then
30444      # On MacOSX there is a readlink tool with a different
30445      # purpose than the GNU readlink tool. Check the found readlink.
30446      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
30447      if test "x$ISGNU" = x; then
30448        # A readlink that we do not know how to use.
30449        # Are there other non-GNU readlinks out there?
30450        READLINK_TESTED=yes
30451        READLINK=
30452      fi
30453    fi
30454
30455    if test "x$READLINK" != x; then
30456      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
30457    else
30458      # Save the current directory for restoring afterwards
30459      STARTDIR=$PWD
30460      COUNTER=0
30461      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
30462      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
30463      cd $sym_link_dir
30464      # Use -P flag to resolve symlinks in directories.
30465      cd `$THEPWDCMD -P`
30466      sym_link_dir=`$THEPWDCMD -P`
30467      # Resolve file symlinks
30468      while test $COUNTER -lt 20; do
30469        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
30470        if test "x$ISLINK" == x; then
30471          # This is not a symbolic link! We are done!
30472          break
30473        fi
30474        # Again resolve directory symlinks since the target of the just found
30475        # link could be in a different directory
30476        cd `$DIRNAME $ISLINK`
30477        sym_link_dir=`$THEPWDCMD -P`
30478        sym_link_file=`$BASENAME $ISLINK`
30479        let COUNTER=COUNTER+1
30480      done
30481      cd $STARTDIR
30482      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
30483    fi
30484  fi
30485
30486    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
30487$as_echo "$PROPER_COMPILER_CXX" >&6; }
30488    CXX="$PROPER_COMPILER_CXX"
30489  else
30490    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
30491$as_echo "no, keeping CXX" >&6; }
30492  fi
30493
30494
30495  COMPILER=$CXX
30496  COMPILER_NAME=$COMPILER_NAME
30497
30498  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
30499    # cc -V output typically looks like
30500    #     cc: Sun C 5.12 Linux_i386 2011/11/16
30501    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
30502    # Check that this is likely to be the Solaris Studio cc.
30503    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
30504    if test $? -ne 0; then
30505      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30506      { $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
30507$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30508      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30509$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30510      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30511$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30512      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30513    fi
30514    # Remove usage instructions (if present), and
30515    # collapse compiler output into a single line
30516    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30517        $SED -e 's/ *[Uu]sage:.*//'`
30518    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30519        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
30520  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
30521    # xlc -qversion output typically looks like
30522    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
30523    #     Version: 11.01.0000.0015
30524    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
30525    # Check that this is likely to be the IBM XL C compiler.
30526    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
30527    if test $? -ne 0; then
30528      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30529      { $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
30530$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30531      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30532$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30533      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30534$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30535      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30536    fi
30537    # Collapse compiler output into a single line
30538    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30539    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30540        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
30541  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
30542    # There is no specific version flag, but all output starts with a version string.
30543    # First line typically looks something like:
30544    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
30545    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
30546    # Check that this is likely to be Microsoft CL.EXE.
30547    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
30548    if test $? -ne 0; then
30549      { $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
30550$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30551      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30552$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30553      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30554    fi
30555    # Collapse compiler output into a single line
30556    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30557    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30558        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
30559  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
30560    # gcc --version output typically looks like
30561    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
30562    #     Copyright (C) 2013 Free Software Foundation, Inc.
30563    #     This is free software; see the source for copying conditions.  There is NO
30564    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
30565    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30566    # Check that this is likely to be GCC.
30567    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
30568    if test $? -ne 0; then
30569      { $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
30570$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30571      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
30572$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
30573      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30574    fi
30575    # Remove Copyright and legalese from version string, and
30576    # collapse into a single line
30577    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30578        $SED -e 's/ *Copyright .*//'`
30579    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30580        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
30581  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
30582    # clang --version output typically looks like
30583    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
30584    #    clang version 3.3 (tags/RELEASE_33/final)
30585    # or
30586    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
30587    #    Target: x86_64-pc-linux-gnu
30588    #    Thread model: posix
30589    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30590    # Check that this is likely to be clang
30591    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
30592    if test $? -ne 0; then
30593      { $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
30594$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30595      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30596$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30597      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30598    fi
30599    # Collapse compiler output into a single line
30600    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30601    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30602        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
30603  else
30604      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
30605  fi
30606  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
30607  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
30608  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
30609  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
30610
30611  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
30612$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
30613
30614
30615  # Now that we have resolved CXX ourself, let autoconf have its go at it
30616  ac_ext=cpp
30617ac_cpp='$CXXCPP $CPPFLAGS'
30618ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30619ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30620ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30621if test -z "$CXX"; then
30622  if test -n "$CCC"; then
30623    CXX=$CCC
30624  else
30625    if test -n "$ac_tool_prefix"; then
30626  for ac_prog in $CXX
30627  do
30628    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
30629set dummy $ac_tool_prefix$ac_prog; ac_word=$2
30630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30631$as_echo_n "checking for $ac_word... " >&6; }
30632if ${ac_cv_prog_CXX+:} false; then :
30633  $as_echo_n "(cached) " >&6
30634else
30635  if test -n "$CXX"; then
30636  ac_cv_prog_CXX="$CXX" # Let the user override the test.
30637else
30638as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30639for as_dir in $PATH
30640do
30641  IFS=$as_save_IFS
30642  test -z "$as_dir" && as_dir=.
30643    for ac_exec_ext in '' $ac_executable_extensions; do
30644  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30645    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
30646    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30647    break 2
30648  fi
30649done
30650  done
30651IFS=$as_save_IFS
30652
30653fi
30654fi
30655CXX=$ac_cv_prog_CXX
30656if test -n "$CXX"; then
30657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
30658$as_echo "$CXX" >&6; }
30659else
30660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30661$as_echo "no" >&6; }
30662fi
30663
30664
30665    test -n "$CXX" && break
30666  done
30667fi
30668if test -z "$CXX"; then
30669  ac_ct_CXX=$CXX
30670  for ac_prog in $CXX
30671do
30672  # Extract the first word of "$ac_prog", so it can be a program name with args.
30673set dummy $ac_prog; ac_word=$2
30674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30675$as_echo_n "checking for $ac_word... " >&6; }
30676if ${ac_cv_prog_ac_ct_CXX+:} false; then :
30677  $as_echo_n "(cached) " >&6
30678else
30679  if test -n "$ac_ct_CXX"; then
30680  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
30681else
30682as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30683for as_dir in $PATH
30684do
30685  IFS=$as_save_IFS
30686  test -z "$as_dir" && as_dir=.
30687    for ac_exec_ext in '' $ac_executable_extensions; do
30688  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30689    ac_cv_prog_ac_ct_CXX="$ac_prog"
30690    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30691    break 2
30692  fi
30693done
30694  done
30695IFS=$as_save_IFS
30696
30697fi
30698fi
30699ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
30700if test -n "$ac_ct_CXX"; then
30701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
30702$as_echo "$ac_ct_CXX" >&6; }
30703else
30704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30705$as_echo "no" >&6; }
30706fi
30707
30708
30709  test -n "$ac_ct_CXX" && break
30710done
30711
30712  if test "x$ac_ct_CXX" = x; then
30713    CXX="g++"
30714  else
30715    case $cross_compiling:$ac_tool_warned in
30716yes:)
30717{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30718$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30719ac_tool_warned=yes ;;
30720esac
30721    CXX=$ac_ct_CXX
30722  fi
30723fi
30724
30725  fi
30726fi
30727# Provide some information about the compiler.
30728$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
30729set X $ac_compile
30730ac_compiler=$2
30731for ac_option in --version -v -V -qversion; do
30732  { { ac_try="$ac_compiler $ac_option >&5"
30733case "(($ac_try" in
30734  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30735  *) ac_try_echo=$ac_try;;
30736esac
30737eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30738$as_echo "$ac_try_echo"; } >&5
30739  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
30740  ac_status=$?
30741  if test -s conftest.err; then
30742    sed '10a\
30743... rest of stderr output deleted ...
30744         10q' conftest.err >conftest.er1
30745    cat conftest.er1 >&5
30746  fi
30747  rm -f conftest.er1 conftest.err
30748  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30749  test $ac_status = 0; }
30750done
30751
30752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
30753$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
30754if ${ac_cv_cxx_compiler_gnu+:} false; then :
30755  $as_echo_n "(cached) " >&6
30756else
30757  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30758/* end confdefs.h.  */
30759
30760int
30761main ()
30762{
30763#ifndef __GNUC__
30764       choke me
30765#endif
30766
30767  ;
30768  return 0;
30769}
30770_ACEOF
30771if ac_fn_cxx_try_compile "$LINENO"; then :
30772  ac_compiler_gnu=yes
30773else
30774  ac_compiler_gnu=no
30775fi
30776rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30777ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
30778
30779fi
30780{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
30781$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
30782if test $ac_compiler_gnu = yes; then
30783  GXX=yes
30784else
30785  GXX=
30786fi
30787ac_test_CXXFLAGS=${CXXFLAGS+set}
30788ac_save_CXXFLAGS=$CXXFLAGS
30789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
30790$as_echo_n "checking whether $CXX accepts -g... " >&6; }
30791if ${ac_cv_prog_cxx_g+:} false; then :
30792  $as_echo_n "(cached) " >&6
30793else
30794  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
30795   ac_cxx_werror_flag=yes
30796   ac_cv_prog_cxx_g=no
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
30811else
30812  CXXFLAGS=""
30813      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30814/* end confdefs.h.  */
30815
30816int
30817main ()
30818{
30819
30820  ;
30821  return 0;
30822}
30823_ACEOF
30824if ac_fn_cxx_try_compile "$LINENO"; then :
30825
30826else
30827  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
30828	 CXXFLAGS="-g"
30829	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30830/* end confdefs.h.  */
30831
30832int
30833main ()
30834{
30835
30836  ;
30837  return 0;
30838}
30839_ACEOF
30840if ac_fn_cxx_try_compile "$LINENO"; then :
30841  ac_cv_prog_cxx_g=yes
30842fi
30843rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30844fi
30845rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30846fi
30847rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30848   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
30849fi
30850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
30851$as_echo "$ac_cv_prog_cxx_g" >&6; }
30852if test "$ac_test_CXXFLAGS" = set; then
30853  CXXFLAGS=$ac_save_CXXFLAGS
30854elif test $ac_cv_prog_cxx_g = yes; then
30855  if test "$GXX" = yes; then
30856    CXXFLAGS="-g -O2"
30857  else
30858    CXXFLAGS="-g"
30859  fi
30860else
30861  if test "$GXX" = yes; then
30862    CXXFLAGS="-O2"
30863  else
30864    CXXFLAGS=
30865  fi
30866fi
30867ac_ext=cpp
30868ac_cpp='$CXXCPP $CPPFLAGS'
30869ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30870ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30871ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30872
30873
30874  #
30875  # Setup the preprocessor (CPP and CXXCPP)
30876  #
30877  ac_ext=c
30878ac_cpp='$CPP $CPPFLAGS'
30879ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30880ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30881ac_compiler_gnu=$ac_cv_c_compiler_gnu
30882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
30883$as_echo_n "checking how to run the C preprocessor... " >&6; }
30884# On Suns, sometimes $CPP names a directory.
30885if test -n "$CPP" && test -d "$CPP"; then
30886  CPP=
30887fi
30888if test -z "$CPP"; then
30889  if ${ac_cv_prog_CPP+:} false; then :
30890  $as_echo_n "(cached) " >&6
30891else
30892      # Double quotes because CPP needs to be expanded
30893    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
30894    do
30895      ac_preproc_ok=false
30896for ac_c_preproc_warn_flag in '' yes
30897do
30898  # Use a header file that comes with gcc, so configuring glibc
30899  # with a fresh cross-compiler works.
30900  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30901  # <limits.h> exists even on freestanding compilers.
30902  # On the NeXT, cc -E runs the code through the compiler's parser,
30903  # not just through cpp. "Syntax error" is here to catch this case.
30904  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30905/* end confdefs.h.  */
30906#ifdef __STDC__
30907# include <limits.h>
30908#else
30909# include <assert.h>
30910#endif
30911		     Syntax error
30912_ACEOF
30913if ac_fn_c_try_cpp "$LINENO"; then :
30914
30915else
30916  # Broken: fails on valid input.
30917continue
30918fi
30919rm -f conftest.err conftest.i conftest.$ac_ext
30920
30921  # OK, works on sane cases.  Now check whether nonexistent headers
30922  # can be detected and how.
30923  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30924/* end confdefs.h.  */
30925#include <ac_nonexistent.h>
30926_ACEOF
30927if ac_fn_c_try_cpp "$LINENO"; then :
30928  # Broken: success on invalid input.
30929continue
30930else
30931  # Passes both tests.
30932ac_preproc_ok=:
30933break
30934fi
30935rm -f conftest.err conftest.i conftest.$ac_ext
30936
30937done
30938# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
30939rm -f conftest.i conftest.err conftest.$ac_ext
30940if $ac_preproc_ok; then :
30941  break
30942fi
30943
30944    done
30945    ac_cv_prog_CPP=$CPP
30946
30947fi
30948  CPP=$ac_cv_prog_CPP
30949else
30950  ac_cv_prog_CPP=$CPP
30951fi
30952{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
30953$as_echo "$CPP" >&6; }
30954ac_preproc_ok=false
30955for ac_c_preproc_warn_flag in '' yes
30956do
30957  # Use a header file that comes with gcc, so configuring glibc
30958  # with a fresh cross-compiler works.
30959  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30960  # <limits.h> exists even on freestanding compilers.
30961  # On the NeXT, cc -E runs the code through the compiler's parser,
30962  # not just through cpp. "Syntax error" is here to catch this case.
30963  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30964/* end confdefs.h.  */
30965#ifdef __STDC__
30966# include <limits.h>
30967#else
30968# include <assert.h>
30969#endif
30970		     Syntax error
30971_ACEOF
30972if ac_fn_c_try_cpp "$LINENO"; then :
30973
30974else
30975  # Broken: fails on valid input.
30976continue
30977fi
30978rm -f conftest.err conftest.i conftest.$ac_ext
30979
30980  # OK, works on sane cases.  Now check whether nonexistent headers
30981  # can be detected and how.
30982  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30983/* end confdefs.h.  */
30984#include <ac_nonexistent.h>
30985_ACEOF
30986if ac_fn_c_try_cpp "$LINENO"; then :
30987  # Broken: success on invalid input.
30988continue
30989else
30990  # Passes both tests.
30991ac_preproc_ok=:
30992break
30993fi
30994rm -f conftest.err conftest.i conftest.$ac_ext
30995
30996done
30997# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
30998rm -f conftest.i conftest.err conftest.$ac_ext
30999if $ac_preproc_ok; then :
31000
31001else
31002  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
31003$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
31004as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
31005See \`config.log' for more details" "$LINENO" 5; }
31006fi
31007
31008ac_ext=cpp
31009ac_cpp='$CXXCPP $CPPFLAGS'
31010ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31011ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31012ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31013
31014
31015  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31016
31017  # First separate the path from the arguments. This will split at the first
31018  # space.
31019  complete="$CPP"
31020  path="${complete%% *}"
31021  tmp="$complete EOL"
31022  arguments="${tmp#* }"
31023
31024  # Input might be given as Windows format, start by converting to
31025  # unix format.
31026  new_path=`$CYGPATH -u "$path"`
31027
31028  # Now try to locate executable using which
31029  new_path=`$WHICH "$new_path" 2> /dev/null`
31030  # bat and cmd files are not always considered executable in cygwin causing which
31031  # to not find them
31032  if test "x$new_path" = x \
31033      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31034      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31035    new_path=`$CYGPATH -u "$path"`
31036  fi
31037  if test "x$new_path" = x; then
31038    # Oops. Which didn't find the executable.
31039    # The splitting of arguments from the executable at a space might have been incorrect,
31040    # since paths with space are more likely in Windows. Give it another try with the whole
31041    # argument.
31042    path="$complete"
31043    arguments="EOL"
31044    new_path=`$CYGPATH -u "$path"`
31045    new_path=`$WHICH "$new_path" 2> /dev/null`
31046    # bat and cmd files are not always considered executable in cygwin causing which
31047    # to not find them
31048    if test "x$new_path" = x \
31049        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31050        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31051      new_path=`$CYGPATH -u "$path"`
31052    fi
31053    if test "x$new_path" = x; then
31054      # It's still not found. Now this is an unrecoverable error.
31055      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31056$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31057      has_space=`$ECHO "$complete" | $GREP " "`
31058      if test "x$has_space" != x; then
31059        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31060$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31061      fi
31062      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31063    fi
31064  fi
31065
31066  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31067  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31068  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31069  # "foo.exe" is OK but "foo" is an error.
31070  #
31071  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31072  # It is also a way to make sure we got the proper file name for the real test later on.
31073  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31074  if test "x$test_shortpath" = x; then
31075    # Short path failed, file does not exist as specified.
31076    # Try adding .exe or .cmd
31077    if test -f "${new_path}.exe"; then
31078      input_to_shortpath="${new_path}.exe"
31079    elif test -f "${new_path}.cmd"; then
31080      input_to_shortpath="${new_path}.cmd"
31081    else
31082      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
31083$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
31084      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31085$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31086      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31087    fi
31088  else
31089    input_to_shortpath="$new_path"
31090  fi
31091
31092  # Call helper function which possibly converts this using DOS-style short mode.
31093  # If so, the updated path is stored in $new_path.
31094  new_path="$input_to_shortpath"
31095
31096  input_path="$input_to_shortpath"
31097  # Check if we need to convert this using DOS-style short mode. If the path
31098  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31099  # take no chances and rewrite it.
31100  # Note: m4 eats our [], so we need to use [ and ] instead.
31101  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31102  if test "x$has_forbidden_chars" != x; then
31103    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31104    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31105    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31106    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31107      # Going to short mode and back again did indeed matter. Since short mode is
31108      # case insensitive, let's make it lowercase to improve readability.
31109      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31110      # Now convert it back to Unix-stile (cygpath)
31111      input_path=`$CYGPATH -u "$shortmode_path"`
31112      new_path="$input_path"
31113    fi
31114  fi
31115
31116  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31117  if test "x$test_cygdrive_prefix" = x; then
31118    # As a simple fix, exclude /usr/bin since it's not a real path.
31119    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31120      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31121      # a path prefixed by /cygdrive for fixpath to work.
31122      new_path="$CYGWIN_ROOT_PATH$input_path"
31123    fi
31124  fi
31125
31126  # remove trailing .exe if any
31127  new_path="${new_path/%.exe/}"
31128
31129  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31130
31131  # First separate the path from the arguments. This will split at the first
31132  # space.
31133  complete="$CPP"
31134  path="${complete%% *}"
31135  tmp="$complete EOL"
31136  arguments="${tmp#* }"
31137
31138  # Input might be given as Windows format, start by converting to
31139  # unix format.
31140  new_path="$path"
31141
31142  windows_path="$new_path"
31143  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31144    unix_path=`$CYGPATH -u "$windows_path"`
31145    new_path="$unix_path"
31146  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31147    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31148    new_path="$unix_path"
31149  fi
31150
31151
31152  # Now try to locate executable using which
31153  new_path=`$WHICH "$new_path" 2> /dev/null`
31154
31155  if test "x$new_path" = x; then
31156    # Oops. Which didn't find the executable.
31157    # The splitting of arguments from the executable at a space might have been incorrect,
31158    # since paths with space are more likely in Windows. Give it another try with the whole
31159    # argument.
31160    path="$complete"
31161    arguments="EOL"
31162    new_path="$path"
31163
31164  windows_path="$new_path"
31165  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31166    unix_path=`$CYGPATH -u "$windows_path"`
31167    new_path="$unix_path"
31168  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31169    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31170    new_path="$unix_path"
31171  fi
31172
31173
31174    new_path=`$WHICH "$new_path" 2> /dev/null`
31175    # bat and cmd files are not always considered executable in MSYS causing which
31176    # to not find them
31177    if test "x$new_path" = x \
31178        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31179        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31180      new_path="$path"
31181
31182  windows_path="$new_path"
31183  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31184    unix_path=`$CYGPATH -u "$windows_path"`
31185    new_path="$unix_path"
31186  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31187    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31188    new_path="$unix_path"
31189  fi
31190
31191    fi
31192
31193    if test "x$new_path" = x; then
31194      # It's still not found. Now this is an unrecoverable error.
31195      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31196$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31197      has_space=`$ECHO "$complete" | $GREP " "`
31198      if test "x$has_space" != x; then
31199        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31200$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31201      fi
31202      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31203    fi
31204  fi
31205
31206  # Now new_path has a complete unix path to the binary
31207  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31208    # Keep paths in /bin as-is, but remove trailing .exe if any
31209    new_path="${new_path/%.exe/}"
31210    # Do not save /bin paths to all_fixpath_prefixes!
31211  else
31212    # Not in mixed or Windows style, start by that.
31213    new_path=`cmd //c echo $new_path`
31214
31215  input_path="$new_path"
31216  # Check if we need to convert this using DOS-style short mode. If the path
31217  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31218  # take no chances and rewrite it.
31219  # Note: m4 eats our [], so we need to use [ and ] instead.
31220  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31221  if test "x$has_forbidden_chars" != x; then
31222    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31223    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31224  fi
31225
31226    # Output is in $new_path
31227
31228  windows_path="$new_path"
31229  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31230    unix_path=`$CYGPATH -u "$windows_path"`
31231    new_path="$unix_path"
31232  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31233    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31234    new_path="$unix_path"
31235  fi
31236
31237    # remove trailing .exe if any
31238    new_path="${new_path/%.exe/}"
31239
31240    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31241    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31242  fi
31243
31244  else
31245    # We're on a unix platform. Hooray! :)
31246    # First separate the path from the arguments. This will split at the first
31247    # space.
31248    complete="$CPP"
31249    path="${complete%% *}"
31250    tmp="$complete EOL"
31251    arguments="${tmp#* }"
31252
31253    # Cannot rely on the command "which" here since it doesn't always work.
31254    is_absolute_path=`$ECHO "$path" | $GREP ^/`
31255    if test -z "$is_absolute_path"; then
31256      # Path to executable is not absolute. Find it.
31257      IFS_save="$IFS"
31258      IFS=:
31259      for p in $PATH; do
31260        if test -f "$p/$path" && test -x "$p/$path"; then
31261          new_path="$p/$path"
31262          break
31263        fi
31264      done
31265      IFS="$IFS_save"
31266    else
31267      # This is an absolute path, we can use it without further modifications.
31268      new_path="$path"
31269    fi
31270
31271    if test "x$new_path" = x; then
31272      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31273$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31274      has_space=`$ECHO "$complete" | $GREP " "`
31275      if test "x$has_space" != x; then
31276        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31277$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31278      fi
31279      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31280    fi
31281  fi
31282
31283  # Now join together the path and the arguments once again
31284  if test "x$arguments" != xEOL; then
31285    new_complete="$new_path ${arguments% *}"
31286  else
31287    new_complete="$new_path"
31288  fi
31289
31290  if test "x$complete" != "x$new_complete"; then
31291    CPP="$new_complete"
31292    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
31293$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
31294  fi
31295
31296  ac_ext=cpp
31297ac_cpp='$CXXCPP $CPPFLAGS'
31298ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31299ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31300ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
31302$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
31303if test -z "$CXXCPP"; then
31304  if ${ac_cv_prog_CXXCPP+:} false; then :
31305  $as_echo_n "(cached) " >&6
31306else
31307      # Double quotes because CXXCPP needs to be expanded
31308    for CXXCPP in "$CXX -E" "/lib/cpp"
31309    do
31310      ac_preproc_ok=false
31311for ac_cxx_preproc_warn_flag in '' yes
31312do
31313  # Use a header file that comes with gcc, so configuring glibc
31314  # with a fresh cross-compiler works.
31315  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31316  # <limits.h> exists even on freestanding compilers.
31317  # On the NeXT, cc -E runs the code through the compiler's parser,
31318  # not just through cpp. "Syntax error" is here to catch this case.
31319  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31320/* end confdefs.h.  */
31321#ifdef __STDC__
31322# include <limits.h>
31323#else
31324# include <assert.h>
31325#endif
31326		     Syntax error
31327_ACEOF
31328if ac_fn_cxx_try_cpp "$LINENO"; then :
31329
31330else
31331  # Broken: fails on valid input.
31332continue
31333fi
31334rm -f conftest.err conftest.i conftest.$ac_ext
31335
31336  # OK, works on sane cases.  Now check whether nonexistent headers
31337  # can be detected and how.
31338  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31339/* end confdefs.h.  */
31340#include <ac_nonexistent.h>
31341_ACEOF
31342if ac_fn_cxx_try_cpp "$LINENO"; then :
31343  # Broken: success on invalid input.
31344continue
31345else
31346  # Passes both tests.
31347ac_preproc_ok=:
31348break
31349fi
31350rm -f conftest.err conftest.i conftest.$ac_ext
31351
31352done
31353# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31354rm -f conftest.i conftest.err conftest.$ac_ext
31355if $ac_preproc_ok; then :
31356  break
31357fi
31358
31359    done
31360    ac_cv_prog_CXXCPP=$CXXCPP
31361
31362fi
31363  CXXCPP=$ac_cv_prog_CXXCPP
31364else
31365  ac_cv_prog_CXXCPP=$CXXCPP
31366fi
31367{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
31368$as_echo "$CXXCPP" >&6; }
31369ac_preproc_ok=false
31370for ac_cxx_preproc_warn_flag in '' yes
31371do
31372  # Use a header file that comes with gcc, so configuring glibc
31373  # with a fresh cross-compiler works.
31374  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31375  # <limits.h> exists even on freestanding compilers.
31376  # On the NeXT, cc -E runs the code through the compiler's parser,
31377  # not just through cpp. "Syntax error" is here to catch this case.
31378  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31379/* end confdefs.h.  */
31380#ifdef __STDC__
31381# include <limits.h>
31382#else
31383# include <assert.h>
31384#endif
31385		     Syntax error
31386_ACEOF
31387if ac_fn_cxx_try_cpp "$LINENO"; then :
31388
31389else
31390  # Broken: fails on valid input.
31391continue
31392fi
31393rm -f conftest.err conftest.i conftest.$ac_ext
31394
31395  # OK, works on sane cases.  Now check whether nonexistent headers
31396  # can be detected and how.
31397  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31398/* end confdefs.h.  */
31399#include <ac_nonexistent.h>
31400_ACEOF
31401if ac_fn_cxx_try_cpp "$LINENO"; then :
31402  # Broken: success on invalid input.
31403continue
31404else
31405  # Passes both tests.
31406ac_preproc_ok=:
31407break
31408fi
31409rm -f conftest.err conftest.i conftest.$ac_ext
31410
31411done
31412# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31413rm -f conftest.i conftest.err conftest.$ac_ext
31414if $ac_preproc_ok; then :
31415
31416else
31417  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
31418$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
31419as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
31420See \`config.log' for more details" "$LINENO" 5; }
31421fi
31422
31423ac_ext=cpp
31424ac_cpp='$CXXCPP $CPPFLAGS'
31425ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31426ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31427ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31428
31429
31430  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31431
31432  # First separate the path from the arguments. This will split at the first
31433  # space.
31434  complete="$CXXCPP"
31435  path="${complete%% *}"
31436  tmp="$complete EOL"
31437  arguments="${tmp#* }"
31438
31439  # Input might be given as Windows format, start by converting to
31440  # unix format.
31441  new_path=`$CYGPATH -u "$path"`
31442
31443  # Now try to locate executable using which
31444  new_path=`$WHICH "$new_path" 2> /dev/null`
31445  # bat and cmd files are not always considered executable in cygwin causing which
31446  # to not find them
31447  if test "x$new_path" = x \
31448      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31449      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31450    new_path=`$CYGPATH -u "$path"`
31451  fi
31452  if test "x$new_path" = x; then
31453    # Oops. Which didn't find the executable.
31454    # The splitting of arguments from the executable at a space might have been incorrect,
31455    # since paths with space are more likely in Windows. Give it another try with the whole
31456    # argument.
31457    path="$complete"
31458    arguments="EOL"
31459    new_path=`$CYGPATH -u "$path"`
31460    new_path=`$WHICH "$new_path" 2> /dev/null`
31461    # bat and cmd files are not always considered executable in cygwin causing which
31462    # to not find them
31463    if test "x$new_path" = x \
31464        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31465        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31466      new_path=`$CYGPATH -u "$path"`
31467    fi
31468    if test "x$new_path" = x; then
31469      # It's still not found. Now this is an unrecoverable error.
31470      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31471$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31472      has_space=`$ECHO "$complete" | $GREP " "`
31473      if test "x$has_space" != x; then
31474        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31475$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31476      fi
31477      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31478    fi
31479  fi
31480
31481  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31482  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31483  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31484  # "foo.exe" is OK but "foo" is an error.
31485  #
31486  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31487  # It is also a way to make sure we got the proper file name for the real test later on.
31488  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31489  if test "x$test_shortpath" = x; then
31490    # Short path failed, file does not exist as specified.
31491    # Try adding .exe or .cmd
31492    if test -f "${new_path}.exe"; then
31493      input_to_shortpath="${new_path}.exe"
31494    elif test -f "${new_path}.cmd"; then
31495      input_to_shortpath="${new_path}.cmd"
31496    else
31497      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
31498$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
31499      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31500$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31501      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31502    fi
31503  else
31504    input_to_shortpath="$new_path"
31505  fi
31506
31507  # Call helper function which possibly converts this using DOS-style short mode.
31508  # If so, the updated path is stored in $new_path.
31509  new_path="$input_to_shortpath"
31510
31511  input_path="$input_to_shortpath"
31512  # Check if we need to convert this using DOS-style short mode. If the path
31513  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31514  # take no chances and rewrite it.
31515  # Note: m4 eats our [], so we need to use [ and ] instead.
31516  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31517  if test "x$has_forbidden_chars" != x; then
31518    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31519    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31520    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31521    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31522      # Going to short mode and back again did indeed matter. Since short mode is
31523      # case insensitive, let's make it lowercase to improve readability.
31524      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31525      # Now convert it back to Unix-stile (cygpath)
31526      input_path=`$CYGPATH -u "$shortmode_path"`
31527      new_path="$input_path"
31528    fi
31529  fi
31530
31531  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31532  if test "x$test_cygdrive_prefix" = x; then
31533    # As a simple fix, exclude /usr/bin since it's not a real path.
31534    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31535      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31536      # a path prefixed by /cygdrive for fixpath to work.
31537      new_path="$CYGWIN_ROOT_PATH$input_path"
31538    fi
31539  fi
31540
31541  # remove trailing .exe if any
31542  new_path="${new_path/%.exe/}"
31543
31544  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31545
31546  # First separate the path from the arguments. This will split at the first
31547  # space.
31548  complete="$CXXCPP"
31549  path="${complete%% *}"
31550  tmp="$complete EOL"
31551  arguments="${tmp#* }"
31552
31553  # Input might be given as Windows format, start by converting to
31554  # unix format.
31555  new_path="$path"
31556
31557  windows_path="$new_path"
31558  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31559    unix_path=`$CYGPATH -u "$windows_path"`
31560    new_path="$unix_path"
31561  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31562    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31563    new_path="$unix_path"
31564  fi
31565
31566
31567  # Now try to locate executable using which
31568  new_path=`$WHICH "$new_path" 2> /dev/null`
31569
31570  if test "x$new_path" = x; then
31571    # Oops. Which didn't find the executable.
31572    # The splitting of arguments from the executable at a space might have been incorrect,
31573    # since paths with space are more likely in Windows. Give it another try with the whole
31574    # argument.
31575    path="$complete"
31576    arguments="EOL"
31577    new_path="$path"
31578
31579  windows_path="$new_path"
31580  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31581    unix_path=`$CYGPATH -u "$windows_path"`
31582    new_path="$unix_path"
31583  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31584    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31585    new_path="$unix_path"
31586  fi
31587
31588
31589    new_path=`$WHICH "$new_path" 2> /dev/null`
31590    # bat and cmd files are not always considered executable in MSYS causing which
31591    # to not find them
31592    if test "x$new_path" = x \
31593        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31594        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31595      new_path="$path"
31596
31597  windows_path="$new_path"
31598  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31599    unix_path=`$CYGPATH -u "$windows_path"`
31600    new_path="$unix_path"
31601  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31602    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31603    new_path="$unix_path"
31604  fi
31605
31606    fi
31607
31608    if test "x$new_path" = x; then
31609      # It's still not found. Now this is an unrecoverable error.
31610      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31611$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31612      has_space=`$ECHO "$complete" | $GREP " "`
31613      if test "x$has_space" != x; then
31614        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31615$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31616      fi
31617      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31618    fi
31619  fi
31620
31621  # Now new_path has a complete unix path to the binary
31622  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31623    # Keep paths in /bin as-is, but remove trailing .exe if any
31624    new_path="${new_path/%.exe/}"
31625    # Do not save /bin paths to all_fixpath_prefixes!
31626  else
31627    # Not in mixed or Windows style, start by that.
31628    new_path=`cmd //c echo $new_path`
31629
31630  input_path="$new_path"
31631  # Check if we need to convert this using DOS-style short mode. If the path
31632  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31633  # take no chances and rewrite it.
31634  # Note: m4 eats our [], so we need to use [ and ] instead.
31635  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31636  if test "x$has_forbidden_chars" != x; then
31637    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31638    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31639  fi
31640
31641    # Output is in $new_path
31642
31643  windows_path="$new_path"
31644  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31645    unix_path=`$CYGPATH -u "$windows_path"`
31646    new_path="$unix_path"
31647  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31648    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31649    new_path="$unix_path"
31650  fi
31651
31652    # remove trailing .exe if any
31653    new_path="${new_path/%.exe/}"
31654
31655    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31656    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31657  fi
31658
31659  else
31660    # We're on a unix platform. Hooray! :)
31661    # First separate the path from the arguments. This will split at the first
31662    # space.
31663    complete="$CXXCPP"
31664    path="${complete%% *}"
31665    tmp="$complete EOL"
31666    arguments="${tmp#* }"
31667
31668    # Cannot rely on the command "which" here since it doesn't always work.
31669    is_absolute_path=`$ECHO "$path" | $GREP ^/`
31670    if test -z "$is_absolute_path"; then
31671      # Path to executable is not absolute. Find it.
31672      IFS_save="$IFS"
31673      IFS=:
31674      for p in $PATH; do
31675        if test -f "$p/$path" && test -x "$p/$path"; then
31676          new_path="$p/$path"
31677          break
31678        fi
31679      done
31680      IFS="$IFS_save"
31681    else
31682      # This is an absolute path, we can use it without further modifications.
31683      new_path="$path"
31684    fi
31685
31686    if test "x$new_path" = x; then
31687      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31688$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31689      has_space=`$ECHO "$complete" | $GREP " "`
31690      if test "x$has_space" != x; then
31691        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31692$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31693      fi
31694      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31695    fi
31696  fi
31697
31698  # Now join together the path and the arguments once again
31699  if test "x$arguments" != xEOL; then
31700    new_complete="$new_path ${arguments% *}"
31701  else
31702    new_complete="$new_path"
31703  fi
31704
31705  if test "x$complete" != "x$new_complete"; then
31706    CXXCPP="$new_complete"
31707    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
31708$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
31709  fi
31710
31711
31712  #
31713  # Setup the linker (LD)
31714  #
31715  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
31716    # In the Microsoft toolchain we have a separate LD command "link".
31717    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
31718    # a cygwin program for something completely different.
31719    # Extract the first word of "link", so it can be a program name with args.
31720set dummy link; ac_word=$2
31721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31722$as_echo_n "checking for $ac_word... " >&6; }
31723if ${ac_cv_prog_LD+:} false; then :
31724  $as_echo_n "(cached) " >&6
31725else
31726  if test -n "$LD"; then
31727  ac_cv_prog_LD="$LD" # Let the user override the test.
31728else
31729  ac_prog_rejected=no
31730as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31731for as_dir in $PATH
31732do
31733  IFS=$as_save_IFS
31734  test -z "$as_dir" && as_dir=.
31735    for ac_exec_ext in '' $ac_executable_extensions; do
31736  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31737    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
31738       ac_prog_rejected=yes
31739       continue
31740     fi
31741    ac_cv_prog_LD="link"
31742    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31743    break 2
31744  fi
31745done
31746  done
31747IFS=$as_save_IFS
31748
31749if test $ac_prog_rejected = yes; then
31750  # We found a bogon in the path, so make sure we never use it.
31751  set dummy $ac_cv_prog_LD
31752  shift
31753  if test $# != 0; then
31754    # We chose a different compiler from the bogus one.
31755    # However, it has the same basename, so the bogon will be chosen
31756    # first if we set LD to just the basename; use the full file name.
31757    shift
31758    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
31759  fi
31760fi
31761fi
31762fi
31763LD=$ac_cv_prog_LD
31764if test -n "$LD"; then
31765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
31766$as_echo "$LD" >&6; }
31767else
31768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31769$as_echo "no" >&6; }
31770fi
31771
31772
31773
31774  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31775
31776  # First separate the path from the arguments. This will split at the first
31777  # space.
31778  complete="$LD"
31779  path="${complete%% *}"
31780  tmp="$complete EOL"
31781  arguments="${tmp#* }"
31782
31783  # Input might be given as Windows format, start by converting to
31784  # unix format.
31785  new_path=`$CYGPATH -u "$path"`
31786
31787  # Now try to locate executable using which
31788  new_path=`$WHICH "$new_path" 2> /dev/null`
31789  # bat and cmd files are not always considered executable in cygwin causing which
31790  # to not find them
31791  if test "x$new_path" = x \
31792      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31793      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31794    new_path=`$CYGPATH -u "$path"`
31795  fi
31796  if test "x$new_path" = x; then
31797    # Oops. Which didn't find the executable.
31798    # The splitting of arguments from the executable at a space might have been incorrect,
31799    # since paths with space are more likely in Windows. Give it another try with the whole
31800    # argument.
31801    path="$complete"
31802    arguments="EOL"
31803    new_path=`$CYGPATH -u "$path"`
31804    new_path=`$WHICH "$new_path" 2> /dev/null`
31805    # bat and cmd files are not always considered executable in cygwin causing which
31806    # to not find them
31807    if test "x$new_path" = x \
31808        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31809        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31810      new_path=`$CYGPATH -u "$path"`
31811    fi
31812    if test "x$new_path" = x; then
31813      # It's still not found. Now this is an unrecoverable error.
31814      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31815$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31816      has_space=`$ECHO "$complete" | $GREP " "`
31817      if test "x$has_space" != x; then
31818        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31819$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31820      fi
31821      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31822    fi
31823  fi
31824
31825  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31826  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31827  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31828  # "foo.exe" is OK but "foo" is an error.
31829  #
31830  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31831  # It is also a way to make sure we got the proper file name for the real test later on.
31832  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31833  if test "x$test_shortpath" = x; then
31834    # Short path failed, file does not exist as specified.
31835    # Try adding .exe or .cmd
31836    if test -f "${new_path}.exe"; then
31837      input_to_shortpath="${new_path}.exe"
31838    elif test -f "${new_path}.cmd"; then
31839      input_to_shortpath="${new_path}.cmd"
31840    else
31841      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
31842$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
31843      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31844$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31845      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31846    fi
31847  else
31848    input_to_shortpath="$new_path"
31849  fi
31850
31851  # Call helper function which possibly converts this using DOS-style short mode.
31852  # If so, the updated path is stored in $new_path.
31853  new_path="$input_to_shortpath"
31854
31855  input_path="$input_to_shortpath"
31856  # Check if we need to convert this using DOS-style short mode. If the path
31857  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31858  # take no chances and rewrite it.
31859  # Note: m4 eats our [], so we need to use [ and ] instead.
31860  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31861  if test "x$has_forbidden_chars" != x; then
31862    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31863    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31864    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31865    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31866      # Going to short mode and back again did indeed matter. Since short mode is
31867      # case insensitive, let's make it lowercase to improve readability.
31868      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31869      # Now convert it back to Unix-stile (cygpath)
31870      input_path=`$CYGPATH -u "$shortmode_path"`
31871      new_path="$input_path"
31872    fi
31873  fi
31874
31875  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31876  if test "x$test_cygdrive_prefix" = x; then
31877    # As a simple fix, exclude /usr/bin since it's not a real path.
31878    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31879      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31880      # a path prefixed by /cygdrive for fixpath to work.
31881      new_path="$CYGWIN_ROOT_PATH$input_path"
31882    fi
31883  fi
31884
31885  # remove trailing .exe if any
31886  new_path="${new_path/%.exe/}"
31887
31888  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31889
31890  # First separate the path from the arguments. This will split at the first
31891  # space.
31892  complete="$LD"
31893  path="${complete%% *}"
31894  tmp="$complete EOL"
31895  arguments="${tmp#* }"
31896
31897  # Input might be given as Windows format, start by converting to
31898  # unix format.
31899  new_path="$path"
31900
31901  windows_path="$new_path"
31902  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31903    unix_path=`$CYGPATH -u "$windows_path"`
31904    new_path="$unix_path"
31905  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31906    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31907    new_path="$unix_path"
31908  fi
31909
31910
31911  # Now try to locate executable using which
31912  new_path=`$WHICH "$new_path" 2> /dev/null`
31913
31914  if test "x$new_path" = x; then
31915    # Oops. Which didn't find the executable.
31916    # The splitting of arguments from the executable at a space might have been incorrect,
31917    # since paths with space are more likely in Windows. Give it another try with the whole
31918    # argument.
31919    path="$complete"
31920    arguments="EOL"
31921    new_path="$path"
31922
31923  windows_path="$new_path"
31924  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31925    unix_path=`$CYGPATH -u "$windows_path"`
31926    new_path="$unix_path"
31927  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31928    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31929    new_path="$unix_path"
31930  fi
31931
31932
31933    new_path=`$WHICH "$new_path" 2> /dev/null`
31934    # bat and cmd files are not always considered executable in MSYS causing which
31935    # to not find them
31936    if test "x$new_path" = x \
31937        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31938        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31939      new_path="$path"
31940
31941  windows_path="$new_path"
31942  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31943    unix_path=`$CYGPATH -u "$windows_path"`
31944    new_path="$unix_path"
31945  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31946    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31947    new_path="$unix_path"
31948  fi
31949
31950    fi
31951
31952    if test "x$new_path" = x; then
31953      # It's still not found. Now this is an unrecoverable error.
31954      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31955$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31956      has_space=`$ECHO "$complete" | $GREP " "`
31957      if test "x$has_space" != x; then
31958        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31959$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31960      fi
31961      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31962    fi
31963  fi
31964
31965  # Now new_path has a complete unix path to the binary
31966  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31967    # Keep paths in /bin as-is, but remove trailing .exe if any
31968    new_path="${new_path/%.exe/}"
31969    # Do not save /bin paths to all_fixpath_prefixes!
31970  else
31971    # Not in mixed or Windows style, start by that.
31972    new_path=`cmd //c echo $new_path`
31973
31974  input_path="$new_path"
31975  # Check if we need to convert this using DOS-style short mode. If the path
31976  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31977  # take no chances and rewrite it.
31978  # Note: m4 eats our [], so we need to use [ and ] instead.
31979  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31980  if test "x$has_forbidden_chars" != x; then
31981    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31982    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31983  fi
31984
31985    # Output is in $new_path
31986
31987  windows_path="$new_path"
31988  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31989    unix_path=`$CYGPATH -u "$windows_path"`
31990    new_path="$unix_path"
31991  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31992    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31993    new_path="$unix_path"
31994  fi
31995
31996    # remove trailing .exe if any
31997    new_path="${new_path/%.exe/}"
31998
31999    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32000    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32001  fi
32002
32003  else
32004    # We're on a unix platform. Hooray! :)
32005    # First separate the path from the arguments. This will split at the first
32006    # space.
32007    complete="$LD"
32008    path="${complete%% *}"
32009    tmp="$complete EOL"
32010    arguments="${tmp#* }"
32011
32012    # Cannot rely on the command "which" here since it doesn't always work.
32013    is_absolute_path=`$ECHO "$path" | $GREP ^/`
32014    if test -z "$is_absolute_path"; then
32015      # Path to executable is not absolute. Find it.
32016      IFS_save="$IFS"
32017      IFS=:
32018      for p in $PATH; do
32019        if test -f "$p/$path" && test -x "$p/$path"; then
32020          new_path="$p/$path"
32021          break
32022        fi
32023      done
32024      IFS="$IFS_save"
32025    else
32026      # This is an absolute path, we can use it without further modifications.
32027      new_path="$path"
32028    fi
32029
32030    if test "x$new_path" = x; then
32031      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
32032$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
32033      has_space=`$ECHO "$complete" | $GREP " "`
32034      if test "x$has_space" != x; then
32035        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32036$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32037      fi
32038      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32039    fi
32040  fi
32041
32042  # Now join together the path and the arguments once again
32043  if test "x$arguments" != xEOL; then
32044    new_complete="$new_path ${arguments% *}"
32045  else
32046    new_complete="$new_path"
32047  fi
32048
32049  if test "x$complete" != "x$new_complete"; then
32050    LD="$new_complete"
32051    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
32052$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
32053  fi
32054
32055    # Verify that we indeed succeeded with this trick.
32056    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
32057$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
32058    "$LD" --version > /dev/null
32059    if test $? -eq 0 ; then
32060      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32061$as_echo "no" >&6; }
32062      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
32063    else
32064      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32065$as_echo "yes" >&6; }
32066    fi
32067    LDCXX="$LD"
32068  else
32069    # All other toolchains use the compiler to link.
32070    LD="$CC"
32071    LDCXX="$CXX"
32072  fi
32073
32074  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
32075
32076
32077  #
32078  # Setup the assembler (AS)
32079  #
32080  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
32081    # FIXME: should this really be solaris, or solstudio?
32082
32083
32084  # Publish this variable in the help.
32085
32086
32087  if test "x$AS" = x; then
32088    # The variable is not set by user, try to locate tool using the code snippet
32089    for ac_prog in as
32090do
32091  # Extract the first word of "$ac_prog", so it can be a program name with args.
32092set dummy $ac_prog; ac_word=$2
32093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32094$as_echo_n "checking for $ac_word... " >&6; }
32095if ${ac_cv_path_AS+:} false; then :
32096  $as_echo_n "(cached) " >&6
32097else
32098  case $AS in
32099  [\\/]* | ?:[\\/]*)
32100  ac_cv_path_AS="$AS" # Let the user override the test with a path.
32101  ;;
32102  *)
32103  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32104for as_dir in $PATH
32105do
32106  IFS=$as_save_IFS
32107  test -z "$as_dir" && as_dir=.
32108    for ac_exec_ext in '' $ac_executable_extensions; do
32109  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32110    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32111    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32112    break 2
32113  fi
32114done
32115  done
32116IFS=$as_save_IFS
32117
32118  ;;
32119esac
32120fi
32121AS=$ac_cv_path_AS
32122if test -n "$AS"; then
32123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32124$as_echo "$AS" >&6; }
32125else
32126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32127$as_echo "no" >&6; }
32128fi
32129
32130
32131  test -n "$AS" && break
32132done
32133
32134  else
32135    # The variable is set, but is it from the command line or the environment?
32136
32137    # Try to remove the string !AS! from our list.
32138    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
32139    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
32140      # If it failed, the variable was not from the command line. Ignore it,
32141      # but warn the user (except for BASH, which is always set by the calling BASH).
32142      if test "xAS" != xBASH; then
32143        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
32144$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
32145      fi
32146      # Try to locate tool using the code snippet
32147      for ac_prog in as
32148do
32149  # Extract the first word of "$ac_prog", so it can be a program name with args.
32150set dummy $ac_prog; ac_word=$2
32151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32152$as_echo_n "checking for $ac_word... " >&6; }
32153if ${ac_cv_path_AS+:} false; then :
32154  $as_echo_n "(cached) " >&6
32155else
32156  case $AS in
32157  [\\/]* | ?:[\\/]*)
32158  ac_cv_path_AS="$AS" # Let the user override the test with a path.
32159  ;;
32160  *)
32161  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32162for as_dir in $PATH
32163do
32164  IFS=$as_save_IFS
32165  test -z "$as_dir" && as_dir=.
32166    for ac_exec_ext in '' $ac_executable_extensions; do
32167  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32168    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32169    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32170    break 2
32171  fi
32172done
32173  done
32174IFS=$as_save_IFS
32175
32176  ;;
32177esac
32178fi
32179AS=$ac_cv_path_AS
32180if test -n "$AS"; then
32181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32182$as_echo "$AS" >&6; }
32183else
32184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32185$as_echo "no" >&6; }
32186fi
32187
32188
32189  test -n "$AS" && break
32190done
32191
32192    else
32193      # If it succeeded, then it was overridden by the user. We will use it
32194      # for the tool.
32195
32196      # First remove it from the list of overridden variables, so we can test
32197      # for unknown variables in the end.
32198      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
32199
32200      # Check if the provided tool contains a complete path.
32201      tool_specified="$AS"
32202      tool_basename="${tool_specified##*/}"
32203      if test "x$tool_basename" = "x$tool_specified"; then
32204        # A command without a complete path is provided, search $PATH.
32205        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
32206$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
32207        # Extract the first word of "$tool_basename", so it can be a program name with args.
32208set dummy $tool_basename; ac_word=$2
32209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32210$as_echo_n "checking for $ac_word... " >&6; }
32211if ${ac_cv_path_AS+:} false; then :
32212  $as_echo_n "(cached) " >&6
32213else
32214  case $AS in
32215  [\\/]* | ?:[\\/]*)
32216  ac_cv_path_AS="$AS" # Let the user override the test with a path.
32217  ;;
32218  *)
32219  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32220for as_dir in $PATH
32221do
32222  IFS=$as_save_IFS
32223  test -z "$as_dir" && as_dir=.
32224    for ac_exec_ext in '' $ac_executable_extensions; do
32225  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32226    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32227    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32228    break 2
32229  fi
32230done
32231  done
32232IFS=$as_save_IFS
32233
32234  ;;
32235esac
32236fi
32237AS=$ac_cv_path_AS
32238if test -n "$AS"; then
32239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32240$as_echo "$AS" >&6; }
32241else
32242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32243$as_echo "no" >&6; }
32244fi
32245
32246
32247        if test "x$AS" = x; then
32248          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
32249        fi
32250      else
32251        # Otherwise we believe it is a complete path. Use it as it is.
32252        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
32253$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
32254        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
32255$as_echo_n "checking for AS... " >&6; }
32256        if test ! -x "$tool_specified"; then
32257          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32258$as_echo "not found" >&6; }
32259          as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
32260        fi
32261        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
32262$as_echo "$tool_specified" >&6; }
32263      fi
32264    fi
32265  fi
32266
32267
32268
32269  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32270
32271  # First separate the path from the arguments. This will split at the first
32272  # space.
32273  complete="$AS"
32274  path="${complete%% *}"
32275  tmp="$complete EOL"
32276  arguments="${tmp#* }"
32277
32278  # Input might be given as Windows format, start by converting to
32279  # unix format.
32280  new_path=`$CYGPATH -u "$path"`
32281
32282  # Now try to locate executable using which
32283  new_path=`$WHICH "$new_path" 2> /dev/null`
32284  # bat and cmd files are not always considered executable in cygwin causing which
32285  # to not find them
32286  if test "x$new_path" = x \
32287      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32288      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32289    new_path=`$CYGPATH -u "$path"`
32290  fi
32291  if test "x$new_path" = x; then
32292    # Oops. Which didn't find the executable.
32293    # The splitting of arguments from the executable at a space might have been incorrect,
32294    # since paths with space are more likely in Windows. Give it another try with the whole
32295    # argument.
32296    path="$complete"
32297    arguments="EOL"
32298    new_path=`$CYGPATH -u "$path"`
32299    new_path=`$WHICH "$new_path" 2> /dev/null`
32300    # bat and cmd files are not always considered executable in cygwin causing which
32301    # to not find them
32302    if test "x$new_path" = x \
32303        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32304        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32305      new_path=`$CYGPATH -u "$path"`
32306    fi
32307    if test "x$new_path" = x; then
32308      # It's still not found. Now this is an unrecoverable error.
32309      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32310$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32311      has_space=`$ECHO "$complete" | $GREP " "`
32312      if test "x$has_space" != x; then
32313        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32314$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32315      fi
32316      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32317    fi
32318  fi
32319
32320  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32321  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32322  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32323  # "foo.exe" is OK but "foo" is an error.
32324  #
32325  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32326  # It is also a way to make sure we got the proper file name for the real test later on.
32327  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32328  if test "x$test_shortpath" = x; then
32329    # Short path failed, file does not exist as specified.
32330    # Try adding .exe or .cmd
32331    if test -f "${new_path}.exe"; then
32332      input_to_shortpath="${new_path}.exe"
32333    elif test -f "${new_path}.cmd"; then
32334      input_to_shortpath="${new_path}.cmd"
32335    else
32336      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
32337$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
32338      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32339$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32340      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32341    fi
32342  else
32343    input_to_shortpath="$new_path"
32344  fi
32345
32346  # Call helper function which possibly converts this using DOS-style short mode.
32347  # If so, the updated path is stored in $new_path.
32348  new_path="$input_to_shortpath"
32349
32350  input_path="$input_to_shortpath"
32351  # Check if we need to convert this using DOS-style short mode. If the path
32352  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32353  # take no chances and rewrite it.
32354  # Note: m4 eats our [], so we need to use [ and ] instead.
32355  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32356  if test "x$has_forbidden_chars" != x; then
32357    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32358    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32359    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32360    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32361      # Going to short mode and back again did indeed matter. Since short mode is
32362      # case insensitive, let's make it lowercase to improve readability.
32363      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32364      # Now convert it back to Unix-stile (cygpath)
32365      input_path=`$CYGPATH -u "$shortmode_path"`
32366      new_path="$input_path"
32367    fi
32368  fi
32369
32370  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32371  if test "x$test_cygdrive_prefix" = x; then
32372    # As a simple fix, exclude /usr/bin since it's not a real path.
32373    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32374      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32375      # a path prefixed by /cygdrive for fixpath to work.
32376      new_path="$CYGWIN_ROOT_PATH$input_path"
32377    fi
32378  fi
32379
32380  # remove trailing .exe if any
32381  new_path="${new_path/%.exe/}"
32382
32383  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32384
32385  # First separate the path from the arguments. This will split at the first
32386  # space.
32387  complete="$AS"
32388  path="${complete%% *}"
32389  tmp="$complete EOL"
32390  arguments="${tmp#* }"
32391
32392  # Input might be given as Windows format, start by converting to
32393  # unix format.
32394  new_path="$path"
32395
32396  windows_path="$new_path"
32397  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32398    unix_path=`$CYGPATH -u "$windows_path"`
32399    new_path="$unix_path"
32400  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32401    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32402    new_path="$unix_path"
32403  fi
32404
32405
32406  # Now try to locate executable using which
32407  new_path=`$WHICH "$new_path" 2> /dev/null`
32408
32409  if test "x$new_path" = x; then
32410    # Oops. Which didn't find the executable.
32411    # The splitting of arguments from the executable at a space might have been incorrect,
32412    # since paths with space are more likely in Windows. Give it another try with the whole
32413    # argument.
32414    path="$complete"
32415    arguments="EOL"
32416    new_path="$path"
32417
32418  windows_path="$new_path"
32419  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32420    unix_path=`$CYGPATH -u "$windows_path"`
32421    new_path="$unix_path"
32422  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32423    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32424    new_path="$unix_path"
32425  fi
32426
32427
32428    new_path=`$WHICH "$new_path" 2> /dev/null`
32429    # bat and cmd files are not always considered executable in MSYS causing which
32430    # to not find them
32431    if test "x$new_path" = x \
32432        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32433        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32434      new_path="$path"
32435
32436  windows_path="$new_path"
32437  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32438    unix_path=`$CYGPATH -u "$windows_path"`
32439    new_path="$unix_path"
32440  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32441    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32442    new_path="$unix_path"
32443  fi
32444
32445    fi
32446
32447    if test "x$new_path" = x; then
32448      # It's still not found. Now this is an unrecoverable error.
32449      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32450$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32451      has_space=`$ECHO "$complete" | $GREP " "`
32452      if test "x$has_space" != x; then
32453        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32454$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32455      fi
32456      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32457    fi
32458  fi
32459
32460  # Now new_path has a complete unix path to the binary
32461  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32462    # Keep paths in /bin as-is, but remove trailing .exe if any
32463    new_path="${new_path/%.exe/}"
32464    # Do not save /bin paths to all_fixpath_prefixes!
32465  else
32466    # Not in mixed or Windows style, start by that.
32467    new_path=`cmd //c echo $new_path`
32468
32469  input_path="$new_path"
32470  # Check if we need to convert this using DOS-style short mode. If the path
32471  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32472  # take no chances and rewrite it.
32473  # Note: m4 eats our [], so we need to use [ and ] instead.
32474  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32475  if test "x$has_forbidden_chars" != x; then
32476    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32477    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32478  fi
32479
32480    # Output is in $new_path
32481
32482  windows_path="$new_path"
32483  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32484    unix_path=`$CYGPATH -u "$windows_path"`
32485    new_path="$unix_path"
32486  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32487    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32488    new_path="$unix_path"
32489  fi
32490
32491    # remove trailing .exe if any
32492    new_path="${new_path/%.exe/}"
32493
32494    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32495    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32496  fi
32497
32498  else
32499    # We're on a unix platform. Hooray! :)
32500    # First separate the path from the arguments. This will split at the first
32501    # space.
32502    complete="$AS"
32503    path="${complete%% *}"
32504    tmp="$complete EOL"
32505    arguments="${tmp#* }"
32506
32507    # Cannot rely on the command "which" here since it doesn't always work.
32508    is_absolute_path=`$ECHO "$path" | $GREP ^/`
32509    if test -z "$is_absolute_path"; then
32510      # Path to executable is not absolute. Find it.
32511      IFS_save="$IFS"
32512      IFS=:
32513      for p in $PATH; do
32514        if test -f "$p/$path" && test -x "$p/$path"; then
32515          new_path="$p/$path"
32516          break
32517        fi
32518      done
32519      IFS="$IFS_save"
32520    else
32521      # This is an absolute path, we can use it without further modifications.
32522      new_path="$path"
32523    fi
32524
32525    if test "x$new_path" = x; then
32526      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32527$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32528      has_space=`$ECHO "$complete" | $GREP " "`
32529      if test "x$has_space" != x; then
32530        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32531$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32532      fi
32533      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32534    fi
32535  fi
32536
32537  # Now join together the path and the arguments once again
32538  if test "x$arguments" != xEOL; then
32539    new_complete="$new_path ${arguments% *}"
32540  else
32541    new_complete="$new_path"
32542  fi
32543
32544  if test "x$complete" != "x$new_complete"; then
32545    AS="$new_complete"
32546    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
32547$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
32548  fi
32549
32550  else
32551    # FIXME: is this correct for microsoft?
32552    AS="$CC -c"
32553  fi
32554
32555
32556  #
32557  # Setup the archiver (AR)
32558  #
32559  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32560    # The corresponding ar tool is lib.exe (used to create static libraries)
32561    # Extract the first word of "lib", so it can be a program name with args.
32562set dummy lib; ac_word=$2
32563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32564$as_echo_n "checking for $ac_word... " >&6; }
32565if ${ac_cv_prog_AR+:} false; then :
32566  $as_echo_n "(cached) " >&6
32567else
32568  if test -n "$AR"; then
32569  ac_cv_prog_AR="$AR" # Let the user override the test.
32570else
32571as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32572for as_dir in $PATH
32573do
32574  IFS=$as_save_IFS
32575  test -z "$as_dir" && as_dir=.
32576    for ac_exec_ext in '' $ac_executable_extensions; do
32577  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32578    ac_cv_prog_AR="lib"
32579    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32580    break 2
32581  fi
32582done
32583  done
32584IFS=$as_save_IFS
32585
32586fi
32587fi
32588AR=$ac_cv_prog_AR
32589if test -n "$AR"; then
32590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32591$as_echo "$AR" >&6; }
32592else
32593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32594$as_echo "no" >&6; }
32595fi
32596
32597
32598  else
32599
32600
32601  # Publish this variable in the help.
32602
32603
32604  if test "x$AR" = x; then
32605    # The variable is not set by user, try to locate tool using the code snippet
32606    if test -n "$ac_tool_prefix"; then
32607  for ac_prog in ar
32608  do
32609    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32610set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32612$as_echo_n "checking for $ac_word... " >&6; }
32613if ${ac_cv_prog_AR+:} false; then :
32614  $as_echo_n "(cached) " >&6
32615else
32616  if test -n "$AR"; then
32617  ac_cv_prog_AR="$AR" # Let the user override the test.
32618else
32619as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32620for as_dir in $PATH
32621do
32622  IFS=$as_save_IFS
32623  test -z "$as_dir" && as_dir=.
32624    for ac_exec_ext in '' $ac_executable_extensions; do
32625  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32626    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
32627    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32628    break 2
32629  fi
32630done
32631  done
32632IFS=$as_save_IFS
32633
32634fi
32635fi
32636AR=$ac_cv_prog_AR
32637if test -n "$AR"; then
32638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32639$as_echo "$AR" >&6; }
32640else
32641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32642$as_echo "no" >&6; }
32643fi
32644
32645
32646    test -n "$AR" && break
32647  done
32648fi
32649if test -z "$AR"; then
32650  ac_ct_AR=$AR
32651  for ac_prog in ar
32652do
32653  # Extract the first word of "$ac_prog", so it can be a program name with args.
32654set dummy $ac_prog; ac_word=$2
32655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32656$as_echo_n "checking for $ac_word... " >&6; }
32657if ${ac_cv_prog_ac_ct_AR+:} false; then :
32658  $as_echo_n "(cached) " >&6
32659else
32660  if test -n "$ac_ct_AR"; then
32661  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
32662else
32663as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32664for as_dir in $PATH
32665do
32666  IFS=$as_save_IFS
32667  test -z "$as_dir" && as_dir=.
32668    for ac_exec_ext in '' $ac_executable_extensions; do
32669  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32670    ac_cv_prog_ac_ct_AR="$ac_prog"
32671    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32672    break 2
32673  fi
32674done
32675  done
32676IFS=$as_save_IFS
32677
32678fi
32679fi
32680ac_ct_AR=$ac_cv_prog_ac_ct_AR
32681if test -n "$ac_ct_AR"; then
32682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
32683$as_echo "$ac_ct_AR" >&6; }
32684else
32685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32686$as_echo "no" >&6; }
32687fi
32688
32689
32690  test -n "$ac_ct_AR" && break
32691done
32692
32693  if test "x$ac_ct_AR" = x; then
32694    AR=""
32695  else
32696    case $cross_compiling:$ac_tool_warned in
32697yes:)
32698{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32699$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32700ac_tool_warned=yes ;;
32701esac
32702    AR=$ac_ct_AR
32703  fi
32704fi
32705
32706  else
32707    # The variable is set, but is it from the command line or the environment?
32708
32709    # Try to remove the string !AR! from our list.
32710    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
32711    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
32712      # If it failed, the variable was not from the command line. Ignore it,
32713      # but warn the user (except for BASH, which is always set by the calling BASH).
32714      if test "xAR" != xBASH; then
32715        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
32716$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
32717      fi
32718      # Try to locate tool using the code snippet
32719      if test -n "$ac_tool_prefix"; then
32720  for ac_prog in ar
32721  do
32722    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32723set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32725$as_echo_n "checking for $ac_word... " >&6; }
32726if ${ac_cv_prog_AR+:} false; then :
32727  $as_echo_n "(cached) " >&6
32728else
32729  if test -n "$AR"; then
32730  ac_cv_prog_AR="$AR" # Let the user override the test.
32731else
32732as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32733for as_dir in $PATH
32734do
32735  IFS=$as_save_IFS
32736  test -z "$as_dir" && as_dir=.
32737    for ac_exec_ext in '' $ac_executable_extensions; do
32738  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32739    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
32740    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32741    break 2
32742  fi
32743done
32744  done
32745IFS=$as_save_IFS
32746
32747fi
32748fi
32749AR=$ac_cv_prog_AR
32750if test -n "$AR"; then
32751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32752$as_echo "$AR" >&6; }
32753else
32754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32755$as_echo "no" >&6; }
32756fi
32757
32758
32759    test -n "$AR" && break
32760  done
32761fi
32762if test -z "$AR"; then
32763  ac_ct_AR=$AR
32764  for ac_prog in ar
32765do
32766  # Extract the first word of "$ac_prog", so it can be a program name with args.
32767set dummy $ac_prog; ac_word=$2
32768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32769$as_echo_n "checking for $ac_word... " >&6; }
32770if ${ac_cv_prog_ac_ct_AR+:} false; then :
32771  $as_echo_n "(cached) " >&6
32772else
32773  if test -n "$ac_ct_AR"; then
32774  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
32775else
32776as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32777for as_dir in $PATH
32778do
32779  IFS=$as_save_IFS
32780  test -z "$as_dir" && as_dir=.
32781    for ac_exec_ext in '' $ac_executable_extensions; do
32782  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32783    ac_cv_prog_ac_ct_AR="$ac_prog"
32784    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32785    break 2
32786  fi
32787done
32788  done
32789IFS=$as_save_IFS
32790
32791fi
32792fi
32793ac_ct_AR=$ac_cv_prog_ac_ct_AR
32794if test -n "$ac_ct_AR"; then
32795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
32796$as_echo "$ac_ct_AR" >&6; }
32797else
32798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32799$as_echo "no" >&6; }
32800fi
32801
32802
32803  test -n "$ac_ct_AR" && break
32804done
32805
32806  if test "x$ac_ct_AR" = x; then
32807    AR=""
32808  else
32809    case $cross_compiling:$ac_tool_warned in
32810yes:)
32811{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32812$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32813ac_tool_warned=yes ;;
32814esac
32815    AR=$ac_ct_AR
32816  fi
32817fi
32818
32819    else
32820      # If it succeeded, then it was overridden by the user. We will use it
32821      # for the tool.
32822
32823      # First remove it from the list of overridden variables, so we can test
32824      # for unknown variables in the end.
32825      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
32826
32827      # Check if the provided tool contains a complete path.
32828      tool_specified="$AR"
32829      tool_basename="${tool_specified##*/}"
32830      if test "x$tool_basename" = "x$tool_specified"; then
32831        # A command without a complete path is provided, search $PATH.
32832        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
32833$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
32834        # Extract the first word of "$tool_basename", so it can be a program name with args.
32835set dummy $tool_basename; ac_word=$2
32836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32837$as_echo_n "checking for $ac_word... " >&6; }
32838if ${ac_cv_path_AR+:} false; then :
32839  $as_echo_n "(cached) " >&6
32840else
32841  case $AR in
32842  [\\/]* | ?:[\\/]*)
32843  ac_cv_path_AR="$AR" # Let the user override the test with a path.
32844  ;;
32845  *)
32846  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32847for as_dir in $PATH
32848do
32849  IFS=$as_save_IFS
32850  test -z "$as_dir" && as_dir=.
32851    for ac_exec_ext in '' $ac_executable_extensions; do
32852  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32853    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
32854    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32855    break 2
32856  fi
32857done
32858  done
32859IFS=$as_save_IFS
32860
32861  ;;
32862esac
32863fi
32864AR=$ac_cv_path_AR
32865if test -n "$AR"; then
32866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32867$as_echo "$AR" >&6; }
32868else
32869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32870$as_echo "no" >&6; }
32871fi
32872
32873
32874        if test "x$AR" = x; then
32875          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
32876        fi
32877      else
32878        # Otherwise we believe it is a complete path. Use it as it is.
32879        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
32880$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
32881        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
32882$as_echo_n "checking for AR... " >&6; }
32883        if test ! -x "$tool_specified"; then
32884          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32885$as_echo "not found" >&6; }
32886          as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
32887        fi
32888        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
32889$as_echo "$tool_specified" >&6; }
32890      fi
32891    fi
32892  fi
32893
32894
32895  fi
32896
32897  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32898
32899  # First separate the path from the arguments. This will split at the first
32900  # space.
32901  complete="$AR"
32902  path="${complete%% *}"
32903  tmp="$complete EOL"
32904  arguments="${tmp#* }"
32905
32906  # Input might be given as Windows format, start by converting to
32907  # unix format.
32908  new_path=`$CYGPATH -u "$path"`
32909
32910  # Now try to locate executable using which
32911  new_path=`$WHICH "$new_path" 2> /dev/null`
32912  # bat and cmd files are not always considered executable in cygwin causing which
32913  # to not find them
32914  if test "x$new_path" = x \
32915      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32916      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32917    new_path=`$CYGPATH -u "$path"`
32918  fi
32919  if test "x$new_path" = x; then
32920    # Oops. Which didn't find the executable.
32921    # The splitting of arguments from the executable at a space might have been incorrect,
32922    # since paths with space are more likely in Windows. Give it another try with the whole
32923    # argument.
32924    path="$complete"
32925    arguments="EOL"
32926    new_path=`$CYGPATH -u "$path"`
32927    new_path=`$WHICH "$new_path" 2> /dev/null`
32928    # bat and cmd files are not always considered executable in cygwin causing which
32929    # to not find them
32930    if test "x$new_path" = x \
32931        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32932        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32933      new_path=`$CYGPATH -u "$path"`
32934    fi
32935    if test "x$new_path" = x; then
32936      # It's still not found. Now this is an unrecoverable error.
32937      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
32938$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
32939      has_space=`$ECHO "$complete" | $GREP " "`
32940      if test "x$has_space" != x; then
32941        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32942$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32943      fi
32944      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32945    fi
32946  fi
32947
32948  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32949  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32950  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32951  # "foo.exe" is OK but "foo" is an error.
32952  #
32953  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32954  # It is also a way to make sure we got the proper file name for the real test later on.
32955  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32956  if test "x$test_shortpath" = x; then
32957    # Short path failed, file does not exist as specified.
32958    # Try adding .exe or .cmd
32959    if test -f "${new_path}.exe"; then
32960      input_to_shortpath="${new_path}.exe"
32961    elif test -f "${new_path}.cmd"; then
32962      input_to_shortpath="${new_path}.cmd"
32963    else
32964      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
32965$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
32966      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32967$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32968      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32969    fi
32970  else
32971    input_to_shortpath="$new_path"
32972  fi
32973
32974  # Call helper function which possibly converts this using DOS-style short mode.
32975  # If so, the updated path is stored in $new_path.
32976  new_path="$input_to_shortpath"
32977
32978  input_path="$input_to_shortpath"
32979  # Check if we need to convert this using DOS-style short mode. If the path
32980  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32981  # take no chances and rewrite it.
32982  # Note: m4 eats our [], so we need to use [ and ] instead.
32983  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32984  if test "x$has_forbidden_chars" != x; then
32985    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32986    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32987    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32988    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32989      # Going to short mode and back again did indeed matter. Since short mode is
32990      # case insensitive, let's make it lowercase to improve readability.
32991      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32992      # Now convert it back to Unix-stile (cygpath)
32993      input_path=`$CYGPATH -u "$shortmode_path"`
32994      new_path="$input_path"
32995    fi
32996  fi
32997
32998  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32999  if test "x$test_cygdrive_prefix" = x; then
33000    # As a simple fix, exclude /usr/bin since it's not a real path.
33001    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33002      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33003      # a path prefixed by /cygdrive for fixpath to work.
33004      new_path="$CYGWIN_ROOT_PATH$input_path"
33005    fi
33006  fi
33007
33008  # remove trailing .exe if any
33009  new_path="${new_path/%.exe/}"
33010
33011  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33012
33013  # First separate the path from the arguments. This will split at the first
33014  # space.
33015  complete="$AR"
33016  path="${complete%% *}"
33017  tmp="$complete EOL"
33018  arguments="${tmp#* }"
33019
33020  # Input might be given as Windows format, start by converting to
33021  # unix format.
33022  new_path="$path"
33023
33024  windows_path="$new_path"
33025  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33026    unix_path=`$CYGPATH -u "$windows_path"`
33027    new_path="$unix_path"
33028  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33029    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33030    new_path="$unix_path"
33031  fi
33032
33033
33034  # Now try to locate executable using which
33035  new_path=`$WHICH "$new_path" 2> /dev/null`
33036
33037  if test "x$new_path" = x; then
33038    # Oops. Which didn't find the executable.
33039    # The splitting of arguments from the executable at a space might have been incorrect,
33040    # since paths with space are more likely in Windows. Give it another try with the whole
33041    # argument.
33042    path="$complete"
33043    arguments="EOL"
33044    new_path="$path"
33045
33046  windows_path="$new_path"
33047  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33048    unix_path=`$CYGPATH -u "$windows_path"`
33049    new_path="$unix_path"
33050  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33051    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33052    new_path="$unix_path"
33053  fi
33054
33055
33056    new_path=`$WHICH "$new_path" 2> /dev/null`
33057    # bat and cmd files are not always considered executable in MSYS causing which
33058    # to not find them
33059    if test "x$new_path" = x \
33060        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33061        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33062      new_path="$path"
33063
33064  windows_path="$new_path"
33065  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33066    unix_path=`$CYGPATH -u "$windows_path"`
33067    new_path="$unix_path"
33068  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33069    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33070    new_path="$unix_path"
33071  fi
33072
33073    fi
33074
33075    if test "x$new_path" = x; then
33076      # It's still not found. Now this is an unrecoverable error.
33077      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33078$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33079      has_space=`$ECHO "$complete" | $GREP " "`
33080      if test "x$has_space" != x; then
33081        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33082$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33083      fi
33084      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33085    fi
33086  fi
33087
33088  # Now new_path has a complete unix path to the binary
33089  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33090    # Keep paths in /bin as-is, but remove trailing .exe if any
33091    new_path="${new_path/%.exe/}"
33092    # Do not save /bin paths to all_fixpath_prefixes!
33093  else
33094    # Not in mixed or Windows style, start by that.
33095    new_path=`cmd //c echo $new_path`
33096
33097  input_path="$new_path"
33098  # Check if we need to convert this using DOS-style short mode. If the path
33099  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33100  # take no chances and rewrite it.
33101  # Note: m4 eats our [], so we need to use [ and ] instead.
33102  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33103  if test "x$has_forbidden_chars" != x; then
33104    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33105    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33106  fi
33107
33108    # Output is in $new_path
33109
33110  windows_path="$new_path"
33111  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33112    unix_path=`$CYGPATH -u "$windows_path"`
33113    new_path="$unix_path"
33114  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33115    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33116    new_path="$unix_path"
33117  fi
33118
33119    # remove trailing .exe if any
33120    new_path="${new_path/%.exe/}"
33121
33122    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33123    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33124  fi
33125
33126  else
33127    # We're on a unix platform. Hooray! :)
33128    # First separate the path from the arguments. This will split at the first
33129    # space.
33130    complete="$AR"
33131    path="${complete%% *}"
33132    tmp="$complete EOL"
33133    arguments="${tmp#* }"
33134
33135    # Cannot rely on the command "which" here since it doesn't always work.
33136    is_absolute_path=`$ECHO "$path" | $GREP ^/`
33137    if test -z "$is_absolute_path"; then
33138      # Path to executable is not absolute. Find it.
33139      IFS_save="$IFS"
33140      IFS=:
33141      for p in $PATH; do
33142        if test -f "$p/$path" && test -x "$p/$path"; then
33143          new_path="$p/$path"
33144          break
33145        fi
33146      done
33147      IFS="$IFS_save"
33148    else
33149      # This is an absolute path, we can use it without further modifications.
33150      new_path="$path"
33151    fi
33152
33153    if test "x$new_path" = x; then
33154      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33155$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33156      has_space=`$ECHO "$complete" | $GREP " "`
33157      if test "x$has_space" != x; then
33158        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33159$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33160      fi
33161      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33162    fi
33163  fi
33164
33165  # Now join together the path and the arguments once again
33166  if test "x$arguments" != xEOL; then
33167    new_complete="$new_path ${arguments% *}"
33168  else
33169    new_complete="$new_path"
33170  fi
33171
33172  if test "x$complete" != "x$new_complete"; then
33173    AR="$new_complete"
33174    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
33175$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
33176  fi
33177
33178
33179
33180  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
33181    ac_ext=m
33182ac_cpp='$OBJCPP $CPPFLAGS'
33183ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33184ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33185ac_compiler_gnu=$ac_cv_objc_compiler_gnu
33186if test -n "$ac_tool_prefix"; then
33187  for ac_prog in gcc objcc objc cc CC
33188  do
33189    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33190set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33192$as_echo_n "checking for $ac_word... " >&6; }
33193if ${ac_cv_prog_OBJC+:} false; then :
33194  $as_echo_n "(cached) " >&6
33195else
33196  if test -n "$OBJC"; then
33197  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
33198else
33199as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33200for as_dir in $PATH
33201do
33202  IFS=$as_save_IFS
33203  test -z "$as_dir" && as_dir=.
33204    for ac_exec_ext in '' $ac_executable_extensions; do
33205  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33206    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
33207    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33208    break 2
33209  fi
33210done
33211  done
33212IFS=$as_save_IFS
33213
33214fi
33215fi
33216OBJC=$ac_cv_prog_OBJC
33217if test -n "$OBJC"; then
33218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
33219$as_echo "$OBJC" >&6; }
33220else
33221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33222$as_echo "no" >&6; }
33223fi
33224
33225
33226    test -n "$OBJC" && break
33227  done
33228fi
33229if test -z "$OBJC"; then
33230  ac_ct_OBJC=$OBJC
33231  for ac_prog in gcc objcc objc cc CC
33232do
33233  # Extract the first word of "$ac_prog", so it can be a program name with args.
33234set dummy $ac_prog; ac_word=$2
33235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33236$as_echo_n "checking for $ac_word... " >&6; }
33237if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
33238  $as_echo_n "(cached) " >&6
33239else
33240  if test -n "$ac_ct_OBJC"; then
33241  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
33242else
33243as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33244for as_dir in $PATH
33245do
33246  IFS=$as_save_IFS
33247  test -z "$as_dir" && as_dir=.
33248    for ac_exec_ext in '' $ac_executable_extensions; do
33249  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33250    ac_cv_prog_ac_ct_OBJC="$ac_prog"
33251    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33252    break 2
33253  fi
33254done
33255  done
33256IFS=$as_save_IFS
33257
33258fi
33259fi
33260ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
33261if test -n "$ac_ct_OBJC"; then
33262  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
33263$as_echo "$ac_ct_OBJC" >&6; }
33264else
33265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33266$as_echo "no" >&6; }
33267fi
33268
33269
33270  test -n "$ac_ct_OBJC" && break
33271done
33272
33273  if test "x$ac_ct_OBJC" = x; then
33274    OBJC="gcc"
33275  else
33276    case $cross_compiling:$ac_tool_warned in
33277yes:)
33278{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33279$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33280ac_tool_warned=yes ;;
33281esac
33282    OBJC=$ac_ct_OBJC
33283  fi
33284fi
33285
33286# Provide some information about the compiler.
33287$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
33288set X $ac_compile
33289ac_compiler=$2
33290for ac_option in --version -v -V -qversion; do
33291  { { ac_try="$ac_compiler $ac_option >&5"
33292case "(($ac_try" in
33293  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33294  *) ac_try_echo=$ac_try;;
33295esac
33296eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33297$as_echo "$ac_try_echo"; } >&5
33298  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
33299  ac_status=$?
33300  if test -s conftest.err; then
33301    sed '10a\
33302... rest of stderr output deleted ...
33303         10q' conftest.err >conftest.er1
33304    cat conftest.er1 >&5
33305  fi
33306  rm -f conftest.er1 conftest.err
33307  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33308  test $ac_status = 0; }
33309done
33310
33311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
33312$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
33313if ${ac_cv_objc_compiler_gnu+:} false; then :
33314  $as_echo_n "(cached) " >&6
33315else
33316  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33317/* end confdefs.h.  */
33318
33319int
33320main ()
33321{
33322#ifndef __GNUC__
33323       choke me
33324#endif
33325
33326  ;
33327  return 0;
33328}
33329_ACEOF
33330if ac_fn_objc_try_compile "$LINENO"; then :
33331  ac_compiler_gnu=yes
33332else
33333  ac_compiler_gnu=no
33334fi
33335rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33336ac_cv_objc_compiler_gnu=$ac_compiler_gnu
33337
33338fi
33339{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
33340$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
33341if test $ac_compiler_gnu = yes; then
33342  GOBJC=yes
33343else
33344  GOBJC=
33345fi
33346ac_test_OBJCFLAGS=${OBJCFLAGS+set}
33347ac_save_OBJCFLAGS=$OBJCFLAGS
33348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
33349$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
33350if ${ac_cv_prog_objc_g+:} false; then :
33351  $as_echo_n "(cached) " >&6
33352else
33353  ac_save_objc_werror_flag=$ac_objc_werror_flag
33354   ac_objc_werror_flag=yes
33355   ac_cv_prog_objc_g=no
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
33370else
33371  OBJCFLAGS=""
33372      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33373/* end confdefs.h.  */
33374
33375int
33376main ()
33377{
33378
33379  ;
33380  return 0;
33381}
33382_ACEOF
33383if ac_fn_objc_try_compile "$LINENO"; then :
33384
33385else
33386  ac_objc_werror_flag=$ac_save_objc_werror_flag
33387	 OBJCFLAGS="-g"
33388	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33389/* end confdefs.h.  */
33390
33391int
33392main ()
33393{
33394
33395  ;
33396  return 0;
33397}
33398_ACEOF
33399if ac_fn_objc_try_compile "$LINENO"; then :
33400  ac_cv_prog_objc_g=yes
33401fi
33402rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33403fi
33404rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33405fi
33406rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33407   ac_objc_werror_flag=$ac_save_objc_werror_flag
33408fi
33409{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
33410$as_echo "$ac_cv_prog_objc_g" >&6; }
33411if test "$ac_test_OBJCFLAGS" = set; then
33412  OBJCFLAGS=$ac_save_OBJCFLAGS
33413elif test $ac_cv_prog_objc_g = yes; then
33414  if test "$GOBJC" = yes; then
33415    OBJCFLAGS="-g -O2"
33416  else
33417    OBJCFLAGS="-g"
33418  fi
33419else
33420  if test "$GOBJC" = yes; then
33421    OBJCFLAGS="-O2"
33422  else
33423    OBJCFLAGS=
33424  fi
33425fi
33426ac_ext=cpp
33427ac_cpp='$CXXCPP $CPPFLAGS'
33428ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33429ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33430ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33431
33432
33433  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33434
33435  # First separate the path from the arguments. This will split at the first
33436  # space.
33437  complete="$OBJC"
33438  path="${complete%% *}"
33439  tmp="$complete EOL"
33440  arguments="${tmp#* }"
33441
33442  # Input might be given as Windows format, start by converting to
33443  # unix format.
33444  new_path=`$CYGPATH -u "$path"`
33445
33446  # Now try to locate executable using which
33447  new_path=`$WHICH "$new_path" 2> /dev/null`
33448  # bat and cmd files are not always considered executable in cygwin causing which
33449  # to not find them
33450  if test "x$new_path" = x \
33451      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33452      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33453    new_path=`$CYGPATH -u "$path"`
33454  fi
33455  if test "x$new_path" = x; then
33456    # Oops. Which didn't find the executable.
33457    # The splitting of arguments from the executable at a space might have been incorrect,
33458    # since paths with space are more likely in Windows. Give it another try with the whole
33459    # argument.
33460    path="$complete"
33461    arguments="EOL"
33462    new_path=`$CYGPATH -u "$path"`
33463    new_path=`$WHICH "$new_path" 2> /dev/null`
33464    # bat and cmd files are not always considered executable in cygwin causing which
33465    # to not find them
33466    if test "x$new_path" = x \
33467        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33468        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33469      new_path=`$CYGPATH -u "$path"`
33470    fi
33471    if test "x$new_path" = x; then
33472      # It's still not found. Now this is an unrecoverable error.
33473      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33474$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33475      has_space=`$ECHO "$complete" | $GREP " "`
33476      if test "x$has_space" != x; then
33477        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33478$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33479      fi
33480      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33481    fi
33482  fi
33483
33484  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33485  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33486  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33487  # "foo.exe" is OK but "foo" is an error.
33488  #
33489  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33490  # It is also a way to make sure we got the proper file name for the real test later on.
33491  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33492  if test "x$test_shortpath" = x; then
33493    # Short path failed, file does not exist as specified.
33494    # Try adding .exe or .cmd
33495    if test -f "${new_path}.exe"; then
33496      input_to_shortpath="${new_path}.exe"
33497    elif test -f "${new_path}.cmd"; then
33498      input_to_shortpath="${new_path}.cmd"
33499    else
33500      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
33501$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
33502      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33503$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33504      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33505    fi
33506  else
33507    input_to_shortpath="$new_path"
33508  fi
33509
33510  # Call helper function which possibly converts this using DOS-style short mode.
33511  # If so, the updated path is stored in $new_path.
33512  new_path="$input_to_shortpath"
33513
33514  input_path="$input_to_shortpath"
33515  # Check if we need to convert this using DOS-style short mode. If the path
33516  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33517  # take no chances and rewrite it.
33518  # Note: m4 eats our [], so we need to use [ and ] instead.
33519  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33520  if test "x$has_forbidden_chars" != x; then
33521    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33522    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33523    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33524    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33525      # Going to short mode and back again did indeed matter. Since short mode is
33526      # case insensitive, let's make it lowercase to improve readability.
33527      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33528      # Now convert it back to Unix-stile (cygpath)
33529      input_path=`$CYGPATH -u "$shortmode_path"`
33530      new_path="$input_path"
33531    fi
33532  fi
33533
33534  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33535  if test "x$test_cygdrive_prefix" = x; then
33536    # As a simple fix, exclude /usr/bin since it's not a real path.
33537    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33538      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33539      # a path prefixed by /cygdrive for fixpath to work.
33540      new_path="$CYGWIN_ROOT_PATH$input_path"
33541    fi
33542  fi
33543
33544  # remove trailing .exe if any
33545  new_path="${new_path/%.exe/}"
33546
33547  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33548
33549  # First separate the path from the arguments. This will split at the first
33550  # space.
33551  complete="$OBJC"
33552  path="${complete%% *}"
33553  tmp="$complete EOL"
33554  arguments="${tmp#* }"
33555
33556  # Input might be given as Windows format, start by converting to
33557  # unix format.
33558  new_path="$path"
33559
33560  windows_path="$new_path"
33561  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33562    unix_path=`$CYGPATH -u "$windows_path"`
33563    new_path="$unix_path"
33564  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33565    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33566    new_path="$unix_path"
33567  fi
33568
33569
33570  # Now try to locate executable using which
33571  new_path=`$WHICH "$new_path" 2> /dev/null`
33572
33573  if test "x$new_path" = x; then
33574    # Oops. Which didn't find the executable.
33575    # The splitting of arguments from the executable at a space might have been incorrect,
33576    # since paths with space are more likely in Windows. Give it another try with the whole
33577    # argument.
33578    path="$complete"
33579    arguments="EOL"
33580    new_path="$path"
33581
33582  windows_path="$new_path"
33583  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33584    unix_path=`$CYGPATH -u "$windows_path"`
33585    new_path="$unix_path"
33586  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33587    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33588    new_path="$unix_path"
33589  fi
33590
33591
33592    new_path=`$WHICH "$new_path" 2> /dev/null`
33593    # bat and cmd files are not always considered executable in MSYS causing which
33594    # to not find them
33595    if test "x$new_path" = x \
33596        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33597        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33598      new_path="$path"
33599
33600  windows_path="$new_path"
33601  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33602    unix_path=`$CYGPATH -u "$windows_path"`
33603    new_path="$unix_path"
33604  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33605    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33606    new_path="$unix_path"
33607  fi
33608
33609    fi
33610
33611    if test "x$new_path" = x; then
33612      # It's still not found. Now this is an unrecoverable error.
33613      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33614$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33615      has_space=`$ECHO "$complete" | $GREP " "`
33616      if test "x$has_space" != x; then
33617        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33618$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33619      fi
33620      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33621    fi
33622  fi
33623
33624  # Now new_path has a complete unix path to the binary
33625  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33626    # Keep paths in /bin as-is, but remove trailing .exe if any
33627    new_path="${new_path/%.exe/}"
33628    # Do not save /bin paths to all_fixpath_prefixes!
33629  else
33630    # Not in mixed or Windows style, start by that.
33631    new_path=`cmd //c echo $new_path`
33632
33633  input_path="$new_path"
33634  # Check if we need to convert this using DOS-style short mode. If the path
33635  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33636  # take no chances and rewrite it.
33637  # Note: m4 eats our [], so we need to use [ and ] instead.
33638  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33639  if test "x$has_forbidden_chars" != x; then
33640    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33641    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33642  fi
33643
33644    # Output is in $new_path
33645
33646  windows_path="$new_path"
33647  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33648    unix_path=`$CYGPATH -u "$windows_path"`
33649    new_path="$unix_path"
33650  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33651    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33652    new_path="$unix_path"
33653  fi
33654
33655    # remove trailing .exe if any
33656    new_path="${new_path/%.exe/}"
33657
33658    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33659    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33660  fi
33661
33662  else
33663    # We're on a unix platform. Hooray! :)
33664    # First separate the path from the arguments. This will split at the first
33665    # space.
33666    complete="$OBJC"
33667    path="${complete%% *}"
33668    tmp="$complete EOL"
33669    arguments="${tmp#* }"
33670
33671    # Cannot rely on the command "which" here since it doesn't always work.
33672    is_absolute_path=`$ECHO "$path" | $GREP ^/`
33673    if test -z "$is_absolute_path"; then
33674      # Path to executable is not absolute. Find it.
33675      IFS_save="$IFS"
33676      IFS=:
33677      for p in $PATH; do
33678        if test -f "$p/$path" && test -x "$p/$path"; then
33679          new_path="$p/$path"
33680          break
33681        fi
33682      done
33683      IFS="$IFS_save"
33684    else
33685      # This is an absolute path, we can use it without further modifications.
33686      new_path="$path"
33687    fi
33688
33689    if test "x$new_path" = x; then
33690      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33691$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33692      has_space=`$ECHO "$complete" | $GREP " "`
33693      if test "x$has_space" != x; then
33694        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33695$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33696      fi
33697      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33698    fi
33699  fi
33700
33701  # Now join together the path and the arguments once again
33702  if test "x$arguments" != xEOL; then
33703    new_complete="$new_path ${arguments% *}"
33704  else
33705    new_complete="$new_path"
33706  fi
33707
33708  if test "x$complete" != "x$new_complete"; then
33709    OBJC="$new_complete"
33710    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
33711$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
33712  fi
33713
33714
33715
33716  # Publish this variable in the help.
33717
33718
33719  if test "x$LIPO" = x; then
33720    # The variable is not set by user, try to locate tool using the code snippet
33721    for ac_prog in lipo
33722do
33723  # Extract the first word of "$ac_prog", so it can be a program name with args.
33724set dummy $ac_prog; ac_word=$2
33725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33726$as_echo_n "checking for $ac_word... " >&6; }
33727if ${ac_cv_path_LIPO+:} false; then :
33728  $as_echo_n "(cached) " >&6
33729else
33730  case $LIPO in
33731  [\\/]* | ?:[\\/]*)
33732  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33733  ;;
33734  *)
33735  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33736for as_dir in $PATH
33737do
33738  IFS=$as_save_IFS
33739  test -z "$as_dir" && as_dir=.
33740    for ac_exec_ext in '' $ac_executable_extensions; do
33741  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33742    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33743    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33744    break 2
33745  fi
33746done
33747  done
33748IFS=$as_save_IFS
33749
33750  ;;
33751esac
33752fi
33753LIPO=$ac_cv_path_LIPO
33754if test -n "$LIPO"; then
33755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33756$as_echo "$LIPO" >&6; }
33757else
33758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33759$as_echo "no" >&6; }
33760fi
33761
33762
33763  test -n "$LIPO" && break
33764done
33765
33766  else
33767    # The variable is set, but is it from the command line or the environment?
33768
33769    # Try to remove the string !LIPO! from our list.
33770    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
33771    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
33772      # If it failed, the variable was not from the command line. Ignore it,
33773      # but warn the user (except for BASH, which is always set by the calling BASH).
33774      if test "xLIPO" != xBASH; then
33775        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
33776$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
33777      fi
33778      # Try to locate tool using the code snippet
33779      for ac_prog in lipo
33780do
33781  # Extract the first word of "$ac_prog", so it can be a program name with args.
33782set dummy $ac_prog; ac_word=$2
33783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33784$as_echo_n "checking for $ac_word... " >&6; }
33785if ${ac_cv_path_LIPO+:} false; then :
33786  $as_echo_n "(cached) " >&6
33787else
33788  case $LIPO in
33789  [\\/]* | ?:[\\/]*)
33790  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33791  ;;
33792  *)
33793  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33794for as_dir in $PATH
33795do
33796  IFS=$as_save_IFS
33797  test -z "$as_dir" && as_dir=.
33798    for ac_exec_ext in '' $ac_executable_extensions; do
33799  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33800    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33801    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33802    break 2
33803  fi
33804done
33805  done
33806IFS=$as_save_IFS
33807
33808  ;;
33809esac
33810fi
33811LIPO=$ac_cv_path_LIPO
33812if test -n "$LIPO"; then
33813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33814$as_echo "$LIPO" >&6; }
33815else
33816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33817$as_echo "no" >&6; }
33818fi
33819
33820
33821  test -n "$LIPO" && break
33822done
33823
33824    else
33825      # If it succeeded, then it was overridden by the user. We will use it
33826      # for the tool.
33827
33828      # First remove it from the list of overridden variables, so we can test
33829      # for unknown variables in the end.
33830      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33831
33832      # Check if the provided tool contains a complete path.
33833      tool_specified="$LIPO"
33834      tool_basename="${tool_specified##*/}"
33835      if test "x$tool_basename" = "x$tool_specified"; then
33836        # A command without a complete path is provided, search $PATH.
33837        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
33838$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
33839        # Extract the first word of "$tool_basename", so it can be a program name with args.
33840set dummy $tool_basename; ac_word=$2
33841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33842$as_echo_n "checking for $ac_word... " >&6; }
33843if ${ac_cv_path_LIPO+:} false; then :
33844  $as_echo_n "(cached) " >&6
33845else
33846  case $LIPO in
33847  [\\/]* | ?:[\\/]*)
33848  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33849  ;;
33850  *)
33851  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33852for as_dir in $PATH
33853do
33854  IFS=$as_save_IFS
33855  test -z "$as_dir" && as_dir=.
33856    for ac_exec_ext in '' $ac_executable_extensions; do
33857  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33858    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33859    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33860    break 2
33861  fi
33862done
33863  done
33864IFS=$as_save_IFS
33865
33866  ;;
33867esac
33868fi
33869LIPO=$ac_cv_path_LIPO
33870if test -n "$LIPO"; then
33871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33872$as_echo "$LIPO" >&6; }
33873else
33874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33875$as_echo "no" >&6; }
33876fi
33877
33878
33879        if test "x$LIPO" = x; then
33880          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
33881        fi
33882      else
33883        # Otherwise we believe it is a complete path. Use it as it is.
33884        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
33885$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
33886        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
33887$as_echo_n "checking for LIPO... " >&6; }
33888        if test ! -x "$tool_specified"; then
33889          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33890$as_echo "not found" >&6; }
33891          as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
33892        fi
33893        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33894$as_echo "$tool_specified" >&6; }
33895      fi
33896    fi
33897  fi
33898
33899
33900
33901  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33902
33903  # First separate the path from the arguments. This will split at the first
33904  # space.
33905  complete="$LIPO"
33906  path="${complete%% *}"
33907  tmp="$complete EOL"
33908  arguments="${tmp#* }"
33909
33910  # Input might be given as Windows format, start by converting to
33911  # unix format.
33912  new_path=`$CYGPATH -u "$path"`
33913
33914  # Now try to locate executable using which
33915  new_path=`$WHICH "$new_path" 2> /dev/null`
33916  # bat and cmd files are not always considered executable in cygwin causing which
33917  # to not find them
33918  if test "x$new_path" = x \
33919      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33920      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33921    new_path=`$CYGPATH -u "$path"`
33922  fi
33923  if test "x$new_path" = x; then
33924    # Oops. Which didn't find the executable.
33925    # The splitting of arguments from the executable at a space might have been incorrect,
33926    # since paths with space are more likely in Windows. Give it another try with the whole
33927    # argument.
33928    path="$complete"
33929    arguments="EOL"
33930    new_path=`$CYGPATH -u "$path"`
33931    new_path=`$WHICH "$new_path" 2> /dev/null`
33932    # bat and cmd files are not always considered executable in cygwin causing which
33933    # to not find them
33934    if test "x$new_path" = x \
33935        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33936        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33937      new_path=`$CYGPATH -u "$path"`
33938    fi
33939    if test "x$new_path" = x; then
33940      # It's still not found. Now this is an unrecoverable error.
33941      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33942$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33943      has_space=`$ECHO "$complete" | $GREP " "`
33944      if test "x$has_space" != x; then
33945        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33946$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33947      fi
33948      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33949    fi
33950  fi
33951
33952  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33953  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33954  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33955  # "foo.exe" is OK but "foo" is an error.
33956  #
33957  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33958  # It is also a way to make sure we got the proper file name for the real test later on.
33959  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33960  if test "x$test_shortpath" = x; then
33961    # Short path failed, file does not exist as specified.
33962    # Try adding .exe or .cmd
33963    if test -f "${new_path}.exe"; then
33964      input_to_shortpath="${new_path}.exe"
33965    elif test -f "${new_path}.cmd"; then
33966      input_to_shortpath="${new_path}.cmd"
33967    else
33968      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
33969$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
33970      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33971$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33972      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33973    fi
33974  else
33975    input_to_shortpath="$new_path"
33976  fi
33977
33978  # Call helper function which possibly converts this using DOS-style short mode.
33979  # If so, the updated path is stored in $new_path.
33980  new_path="$input_to_shortpath"
33981
33982  input_path="$input_to_shortpath"
33983  # Check if we need to convert this using DOS-style short mode. If the path
33984  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33985  # take no chances and rewrite it.
33986  # Note: m4 eats our [], so we need to use [ and ] instead.
33987  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33988  if test "x$has_forbidden_chars" != x; then
33989    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33990    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33991    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33992    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33993      # Going to short mode and back again did indeed matter. Since short mode is
33994      # case insensitive, let's make it lowercase to improve readability.
33995      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33996      # Now convert it back to Unix-stile (cygpath)
33997      input_path=`$CYGPATH -u "$shortmode_path"`
33998      new_path="$input_path"
33999    fi
34000  fi
34001
34002  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34003  if test "x$test_cygdrive_prefix" = x; then
34004    # As a simple fix, exclude /usr/bin since it's not a real path.
34005    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34006      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34007      # a path prefixed by /cygdrive for fixpath to work.
34008      new_path="$CYGWIN_ROOT_PATH$input_path"
34009    fi
34010  fi
34011
34012  # remove trailing .exe if any
34013  new_path="${new_path/%.exe/}"
34014
34015  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34016
34017  # First separate the path from the arguments. This will split at the first
34018  # space.
34019  complete="$LIPO"
34020  path="${complete%% *}"
34021  tmp="$complete EOL"
34022  arguments="${tmp#* }"
34023
34024  # Input might be given as Windows format, start by converting to
34025  # unix format.
34026  new_path="$path"
34027
34028  windows_path="$new_path"
34029  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34030    unix_path=`$CYGPATH -u "$windows_path"`
34031    new_path="$unix_path"
34032  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34033    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34034    new_path="$unix_path"
34035  fi
34036
34037
34038  # Now try to locate executable using which
34039  new_path=`$WHICH "$new_path" 2> /dev/null`
34040
34041  if test "x$new_path" = x; then
34042    # Oops. Which didn't find the executable.
34043    # The splitting of arguments from the executable at a space might have been incorrect,
34044    # since paths with space are more likely in Windows. Give it another try with the whole
34045    # argument.
34046    path="$complete"
34047    arguments="EOL"
34048    new_path="$path"
34049
34050  windows_path="$new_path"
34051  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34052    unix_path=`$CYGPATH -u "$windows_path"`
34053    new_path="$unix_path"
34054  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34055    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34056    new_path="$unix_path"
34057  fi
34058
34059
34060    new_path=`$WHICH "$new_path" 2> /dev/null`
34061    # bat and cmd files are not always considered executable in MSYS causing which
34062    # to not find them
34063    if test "x$new_path" = x \
34064        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34065        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34066      new_path="$path"
34067
34068  windows_path="$new_path"
34069  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34070    unix_path=`$CYGPATH -u "$windows_path"`
34071    new_path="$unix_path"
34072  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34073    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34074    new_path="$unix_path"
34075  fi
34076
34077    fi
34078
34079    if test "x$new_path" = x; then
34080      # It's still not found. Now this is an unrecoverable error.
34081      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
34082$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
34083      has_space=`$ECHO "$complete" | $GREP " "`
34084      if test "x$has_space" != x; then
34085        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34086$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34087      fi
34088      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34089    fi
34090  fi
34091
34092  # Now new_path has a complete unix path to the binary
34093  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34094    # Keep paths in /bin as-is, but remove trailing .exe if any
34095    new_path="${new_path/%.exe/}"
34096    # Do not save /bin paths to all_fixpath_prefixes!
34097  else
34098    # Not in mixed or Windows style, start by that.
34099    new_path=`cmd //c echo $new_path`
34100
34101  input_path="$new_path"
34102  # Check if we need to convert this using DOS-style short mode. If the path
34103  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34104  # take no chances and rewrite it.
34105  # Note: m4 eats our [], so we need to use [ and ] instead.
34106  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34107  if test "x$has_forbidden_chars" != x; then
34108    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34109    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34110  fi
34111
34112    # Output is in $new_path
34113
34114  windows_path="$new_path"
34115  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34116    unix_path=`$CYGPATH -u "$windows_path"`
34117    new_path="$unix_path"
34118  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34119    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34120    new_path="$unix_path"
34121  fi
34122
34123    # remove trailing .exe if any
34124    new_path="${new_path/%.exe/}"
34125
34126    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34127    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34128  fi
34129
34130  else
34131    # We're on a unix platform. Hooray! :)
34132    # First separate the path from the arguments. This will split at the first
34133    # space.
34134    complete="$LIPO"
34135    path="${complete%% *}"
34136    tmp="$complete EOL"
34137    arguments="${tmp#* }"
34138
34139    # Cannot rely on the command "which" here since it doesn't always work.
34140    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34141    if test -z "$is_absolute_path"; then
34142      # Path to executable is not absolute. Find it.
34143      IFS_save="$IFS"
34144      IFS=:
34145      for p in $PATH; do
34146        if test -f "$p/$path" && test -x "$p/$path"; then
34147          new_path="$p/$path"
34148          break
34149        fi
34150      done
34151      IFS="$IFS_save"
34152    else
34153      # This is an absolute path, we can use it without further modifications.
34154      new_path="$path"
34155    fi
34156
34157    if test "x$new_path" = x; then
34158      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
34159$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
34160      has_space=`$ECHO "$complete" | $GREP " "`
34161      if test "x$has_space" != x; then
34162        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34163$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34164      fi
34165      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34166    fi
34167  fi
34168
34169  # Now join together the path and the arguments once again
34170  if test "x$arguments" != xEOL; then
34171    new_complete="$new_path ${arguments% *}"
34172  else
34173    new_complete="$new_path"
34174  fi
34175
34176  if test "x$complete" != "x$new_complete"; then
34177    LIPO="$new_complete"
34178    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
34179$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
34180  fi
34181
34182  else
34183    OBJC=
34184  fi
34185
34186  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34187    # Extract the first word of "mt", so it can be a program name with args.
34188set dummy mt; ac_word=$2
34189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34190$as_echo_n "checking for $ac_word... " >&6; }
34191if ${ac_cv_prog_MT+:} false; then :
34192  $as_echo_n "(cached) " >&6
34193else
34194  if test -n "$MT"; then
34195  ac_cv_prog_MT="$MT" # Let the user override the test.
34196else
34197  ac_prog_rejected=no
34198as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34199for as_dir in $PATH
34200do
34201  IFS=$as_save_IFS
34202  test -z "$as_dir" && as_dir=.
34203    for ac_exec_ext in '' $ac_executable_extensions; do
34204  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34205    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
34206       ac_prog_rejected=yes
34207       continue
34208     fi
34209    ac_cv_prog_MT="mt"
34210    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34211    break 2
34212  fi
34213done
34214  done
34215IFS=$as_save_IFS
34216
34217if test $ac_prog_rejected = yes; then
34218  # We found a bogon in the path, so make sure we never use it.
34219  set dummy $ac_cv_prog_MT
34220  shift
34221  if test $# != 0; then
34222    # We chose a different compiler from the bogus one.
34223    # However, it has the same basename, so the bogon will be chosen
34224    # first if we set MT to just the basename; use the full file name.
34225    shift
34226    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
34227  fi
34228fi
34229fi
34230fi
34231MT=$ac_cv_prog_MT
34232if test -n "$MT"; then
34233  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
34234$as_echo "$MT" >&6; }
34235else
34236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34237$as_echo "no" >&6; }
34238fi
34239
34240
34241
34242  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34243
34244  # First separate the path from the arguments. This will split at the first
34245  # space.
34246  complete="$MT"
34247  path="${complete%% *}"
34248  tmp="$complete EOL"
34249  arguments="${tmp#* }"
34250
34251  # Input might be given as Windows format, start by converting to
34252  # unix format.
34253  new_path=`$CYGPATH -u "$path"`
34254
34255  # Now try to locate executable using which
34256  new_path=`$WHICH "$new_path" 2> /dev/null`
34257  # bat and cmd files are not always considered executable in cygwin causing which
34258  # to not find them
34259  if test "x$new_path" = x \
34260      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34261      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34262    new_path=`$CYGPATH -u "$path"`
34263  fi
34264  if test "x$new_path" = x; then
34265    # Oops. Which didn't find the executable.
34266    # The splitting of arguments from the executable at a space might have been incorrect,
34267    # since paths with space are more likely in Windows. Give it another try with the whole
34268    # argument.
34269    path="$complete"
34270    arguments="EOL"
34271    new_path=`$CYGPATH -u "$path"`
34272    new_path=`$WHICH "$new_path" 2> /dev/null`
34273    # bat and cmd files are not always considered executable in cygwin causing which
34274    # to not find them
34275    if test "x$new_path" = x \
34276        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34277        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34278      new_path=`$CYGPATH -u "$path"`
34279    fi
34280    if test "x$new_path" = x; then
34281      # It's still not found. Now this is an unrecoverable error.
34282      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34283$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34284      has_space=`$ECHO "$complete" | $GREP " "`
34285      if test "x$has_space" != x; then
34286        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34287$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34288      fi
34289      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34290    fi
34291  fi
34292
34293  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34294  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34295  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34296  # "foo.exe" is OK but "foo" is an error.
34297  #
34298  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34299  # It is also a way to make sure we got the proper file name for the real test later on.
34300  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34301  if test "x$test_shortpath" = x; then
34302    # Short path failed, file does not exist as specified.
34303    # Try adding .exe or .cmd
34304    if test -f "${new_path}.exe"; then
34305      input_to_shortpath="${new_path}.exe"
34306    elif test -f "${new_path}.cmd"; then
34307      input_to_shortpath="${new_path}.cmd"
34308    else
34309      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
34310$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
34311      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34312$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34313      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34314    fi
34315  else
34316    input_to_shortpath="$new_path"
34317  fi
34318
34319  # Call helper function which possibly converts this using DOS-style short mode.
34320  # If so, the updated path is stored in $new_path.
34321  new_path="$input_to_shortpath"
34322
34323  input_path="$input_to_shortpath"
34324  # Check if we need to convert this using DOS-style short mode. If the path
34325  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34326  # take no chances and rewrite it.
34327  # Note: m4 eats our [], so we need to use [ and ] instead.
34328  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34329  if test "x$has_forbidden_chars" != x; then
34330    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34331    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34332    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34333    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34334      # Going to short mode and back again did indeed matter. Since short mode is
34335      # case insensitive, let's make it lowercase to improve readability.
34336      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34337      # Now convert it back to Unix-stile (cygpath)
34338      input_path=`$CYGPATH -u "$shortmode_path"`
34339      new_path="$input_path"
34340    fi
34341  fi
34342
34343  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34344  if test "x$test_cygdrive_prefix" = x; then
34345    # As a simple fix, exclude /usr/bin since it's not a real path.
34346    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34347      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34348      # a path prefixed by /cygdrive for fixpath to work.
34349      new_path="$CYGWIN_ROOT_PATH$input_path"
34350    fi
34351  fi
34352
34353  # remove trailing .exe if any
34354  new_path="${new_path/%.exe/}"
34355
34356  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34357
34358  # First separate the path from the arguments. This will split at the first
34359  # space.
34360  complete="$MT"
34361  path="${complete%% *}"
34362  tmp="$complete EOL"
34363  arguments="${tmp#* }"
34364
34365  # Input might be given as Windows format, start by converting to
34366  # unix format.
34367  new_path="$path"
34368
34369  windows_path="$new_path"
34370  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34371    unix_path=`$CYGPATH -u "$windows_path"`
34372    new_path="$unix_path"
34373  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34374    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34375    new_path="$unix_path"
34376  fi
34377
34378
34379  # Now try to locate executable using which
34380  new_path=`$WHICH "$new_path" 2> /dev/null`
34381
34382  if test "x$new_path" = x; then
34383    # Oops. Which didn't find the executable.
34384    # The splitting of arguments from the executable at a space might have been incorrect,
34385    # since paths with space are more likely in Windows. Give it another try with the whole
34386    # argument.
34387    path="$complete"
34388    arguments="EOL"
34389    new_path="$path"
34390
34391  windows_path="$new_path"
34392  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34393    unix_path=`$CYGPATH -u "$windows_path"`
34394    new_path="$unix_path"
34395  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34396    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34397    new_path="$unix_path"
34398  fi
34399
34400
34401    new_path=`$WHICH "$new_path" 2> /dev/null`
34402    # bat and cmd files are not always considered executable in MSYS causing which
34403    # to not find them
34404    if test "x$new_path" = x \
34405        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34406        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34407      new_path="$path"
34408
34409  windows_path="$new_path"
34410  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34411    unix_path=`$CYGPATH -u "$windows_path"`
34412    new_path="$unix_path"
34413  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34414    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34415    new_path="$unix_path"
34416  fi
34417
34418    fi
34419
34420    if test "x$new_path" = x; then
34421      # It's still not found. Now this is an unrecoverable error.
34422      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34423$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34424      has_space=`$ECHO "$complete" | $GREP " "`
34425      if test "x$has_space" != x; then
34426        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34427$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34428      fi
34429      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34430    fi
34431  fi
34432
34433  # Now new_path has a complete unix path to the binary
34434  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34435    # Keep paths in /bin as-is, but remove trailing .exe if any
34436    new_path="${new_path/%.exe/}"
34437    # Do not save /bin paths to all_fixpath_prefixes!
34438  else
34439    # Not in mixed or Windows style, start by that.
34440    new_path=`cmd //c echo $new_path`
34441
34442  input_path="$new_path"
34443  # Check if we need to convert this using DOS-style short mode. If the path
34444  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34445  # take no chances and rewrite it.
34446  # Note: m4 eats our [], so we need to use [ and ] instead.
34447  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34448  if test "x$has_forbidden_chars" != x; then
34449    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34450    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34451  fi
34452
34453    # Output is in $new_path
34454
34455  windows_path="$new_path"
34456  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34457    unix_path=`$CYGPATH -u "$windows_path"`
34458    new_path="$unix_path"
34459  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34460    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34461    new_path="$unix_path"
34462  fi
34463
34464    # remove trailing .exe if any
34465    new_path="${new_path/%.exe/}"
34466
34467    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34468    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34469  fi
34470
34471  else
34472    # We're on a unix platform. Hooray! :)
34473    # First separate the path from the arguments. This will split at the first
34474    # space.
34475    complete="$MT"
34476    path="${complete%% *}"
34477    tmp="$complete EOL"
34478    arguments="${tmp#* }"
34479
34480    # Cannot rely on the command "which" here since it doesn't always work.
34481    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34482    if test -z "$is_absolute_path"; then
34483      # Path to executable is not absolute. Find it.
34484      IFS_save="$IFS"
34485      IFS=:
34486      for p in $PATH; do
34487        if test -f "$p/$path" && test -x "$p/$path"; then
34488          new_path="$p/$path"
34489          break
34490        fi
34491      done
34492      IFS="$IFS_save"
34493    else
34494      # This is an absolute path, we can use it without further modifications.
34495      new_path="$path"
34496    fi
34497
34498    if test "x$new_path" = x; then
34499      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34500$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34501      has_space=`$ECHO "$complete" | $GREP " "`
34502      if test "x$has_space" != x; then
34503        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34504$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34505      fi
34506      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34507    fi
34508  fi
34509
34510  # Now join together the path and the arguments once again
34511  if test "x$arguments" != xEOL; then
34512    new_complete="$new_path ${arguments% *}"
34513  else
34514    new_complete="$new_path"
34515  fi
34516
34517  if test "x$complete" != "x$new_complete"; then
34518    MT="$new_complete"
34519    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
34520$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
34521  fi
34522
34523    # Setup the resource compiler (RC)
34524    # Extract the first word of "rc", so it can be a program name with args.
34525set dummy rc; ac_word=$2
34526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34527$as_echo_n "checking for $ac_word... " >&6; }
34528if ${ac_cv_prog_RC+:} false; then :
34529  $as_echo_n "(cached) " >&6
34530else
34531  if test -n "$RC"; then
34532  ac_cv_prog_RC="$RC" # Let the user override the test.
34533else
34534  ac_prog_rejected=no
34535as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34536for as_dir in $PATH
34537do
34538  IFS=$as_save_IFS
34539  test -z "$as_dir" && as_dir=.
34540    for ac_exec_ext in '' $ac_executable_extensions; do
34541  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34542    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
34543       ac_prog_rejected=yes
34544       continue
34545     fi
34546    ac_cv_prog_RC="rc"
34547    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34548    break 2
34549  fi
34550done
34551  done
34552IFS=$as_save_IFS
34553
34554if test $ac_prog_rejected = yes; then
34555  # We found a bogon in the path, so make sure we never use it.
34556  set dummy $ac_cv_prog_RC
34557  shift
34558  if test $# != 0; then
34559    # We chose a different compiler from the bogus one.
34560    # However, it has the same basename, so the bogon will be chosen
34561    # first if we set RC to just the basename; use the full file name.
34562    shift
34563    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
34564  fi
34565fi
34566fi
34567fi
34568RC=$ac_cv_prog_RC
34569if test -n "$RC"; then
34570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
34571$as_echo "$RC" >&6; }
34572else
34573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34574$as_echo "no" >&6; }
34575fi
34576
34577
34578
34579  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34580
34581  # First separate the path from the arguments. This will split at the first
34582  # space.
34583  complete="$RC"
34584  path="${complete%% *}"
34585  tmp="$complete EOL"
34586  arguments="${tmp#* }"
34587
34588  # Input might be given as Windows format, start by converting to
34589  # unix format.
34590  new_path=`$CYGPATH -u "$path"`
34591
34592  # Now try to locate executable using which
34593  new_path=`$WHICH "$new_path" 2> /dev/null`
34594  # bat and cmd files are not always considered executable in cygwin causing which
34595  # to not find them
34596  if test "x$new_path" = x \
34597      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34598      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34599    new_path=`$CYGPATH -u "$path"`
34600  fi
34601  if test "x$new_path" = x; then
34602    # Oops. Which didn't find the executable.
34603    # The splitting of arguments from the executable at a space might have been incorrect,
34604    # since paths with space are more likely in Windows. Give it another try with the whole
34605    # argument.
34606    path="$complete"
34607    arguments="EOL"
34608    new_path=`$CYGPATH -u "$path"`
34609    new_path=`$WHICH "$new_path" 2> /dev/null`
34610    # bat and cmd files are not always considered executable in cygwin causing which
34611    # to not find them
34612    if test "x$new_path" = x \
34613        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34614        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34615      new_path=`$CYGPATH -u "$path"`
34616    fi
34617    if test "x$new_path" = x; then
34618      # It's still not found. Now this is an unrecoverable error.
34619      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34620$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34621      has_space=`$ECHO "$complete" | $GREP " "`
34622      if test "x$has_space" != x; then
34623        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34624$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34625      fi
34626      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34627    fi
34628  fi
34629
34630  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34631  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34632  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34633  # "foo.exe" is OK but "foo" is an error.
34634  #
34635  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34636  # It is also a way to make sure we got the proper file name for the real test later on.
34637  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34638  if test "x$test_shortpath" = x; then
34639    # Short path failed, file does not exist as specified.
34640    # Try adding .exe or .cmd
34641    if test -f "${new_path}.exe"; then
34642      input_to_shortpath="${new_path}.exe"
34643    elif test -f "${new_path}.cmd"; then
34644      input_to_shortpath="${new_path}.cmd"
34645    else
34646      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
34647$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
34648      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34649$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34650      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34651    fi
34652  else
34653    input_to_shortpath="$new_path"
34654  fi
34655
34656  # Call helper function which possibly converts this using DOS-style short mode.
34657  # If so, the updated path is stored in $new_path.
34658  new_path="$input_to_shortpath"
34659
34660  input_path="$input_to_shortpath"
34661  # Check if we need to convert this using DOS-style short mode. If the path
34662  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34663  # take no chances and rewrite it.
34664  # Note: m4 eats our [], so we need to use [ and ] instead.
34665  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34666  if test "x$has_forbidden_chars" != x; then
34667    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34668    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34669    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34670    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34671      # Going to short mode and back again did indeed matter. Since short mode is
34672      # case insensitive, let's make it lowercase to improve readability.
34673      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34674      # Now convert it back to Unix-stile (cygpath)
34675      input_path=`$CYGPATH -u "$shortmode_path"`
34676      new_path="$input_path"
34677    fi
34678  fi
34679
34680  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34681  if test "x$test_cygdrive_prefix" = x; then
34682    # As a simple fix, exclude /usr/bin since it's not a real path.
34683    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34684      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34685      # a path prefixed by /cygdrive for fixpath to work.
34686      new_path="$CYGWIN_ROOT_PATH$input_path"
34687    fi
34688  fi
34689
34690  # remove trailing .exe if any
34691  new_path="${new_path/%.exe/}"
34692
34693  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34694
34695  # First separate the path from the arguments. This will split at the first
34696  # space.
34697  complete="$RC"
34698  path="${complete%% *}"
34699  tmp="$complete EOL"
34700  arguments="${tmp#* }"
34701
34702  # Input might be given as Windows format, start by converting to
34703  # unix format.
34704  new_path="$path"
34705
34706  windows_path="$new_path"
34707  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34708    unix_path=`$CYGPATH -u "$windows_path"`
34709    new_path="$unix_path"
34710  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34711    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34712    new_path="$unix_path"
34713  fi
34714
34715
34716  # Now try to locate executable using which
34717  new_path=`$WHICH "$new_path" 2> /dev/null`
34718
34719  if test "x$new_path" = x; then
34720    # Oops. Which didn't find the executable.
34721    # The splitting of arguments from the executable at a space might have been incorrect,
34722    # since paths with space are more likely in Windows. Give it another try with the whole
34723    # argument.
34724    path="$complete"
34725    arguments="EOL"
34726    new_path="$path"
34727
34728  windows_path="$new_path"
34729  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34730    unix_path=`$CYGPATH -u "$windows_path"`
34731    new_path="$unix_path"
34732  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34733    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34734    new_path="$unix_path"
34735  fi
34736
34737
34738    new_path=`$WHICH "$new_path" 2> /dev/null`
34739    # bat and cmd files are not always considered executable in MSYS causing which
34740    # to not find them
34741    if test "x$new_path" = x \
34742        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34743        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34744      new_path="$path"
34745
34746  windows_path="$new_path"
34747  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34748    unix_path=`$CYGPATH -u "$windows_path"`
34749    new_path="$unix_path"
34750  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34751    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34752    new_path="$unix_path"
34753  fi
34754
34755    fi
34756
34757    if test "x$new_path" = x; then
34758      # It's still not found. Now this is an unrecoverable error.
34759      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34760$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34761      has_space=`$ECHO "$complete" | $GREP " "`
34762      if test "x$has_space" != x; then
34763        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34764$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34765      fi
34766      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34767    fi
34768  fi
34769
34770  # Now new_path has a complete unix path to the binary
34771  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34772    # Keep paths in /bin as-is, but remove trailing .exe if any
34773    new_path="${new_path/%.exe/}"
34774    # Do not save /bin paths to all_fixpath_prefixes!
34775  else
34776    # Not in mixed or Windows style, start by that.
34777    new_path=`cmd //c echo $new_path`
34778
34779  input_path="$new_path"
34780  # Check if we need to convert this using DOS-style short mode. If the path
34781  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34782  # take no chances and rewrite it.
34783  # Note: m4 eats our [], so we need to use [ and ] instead.
34784  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34785  if test "x$has_forbidden_chars" != x; then
34786    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34787    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34788  fi
34789
34790    # Output is in $new_path
34791
34792  windows_path="$new_path"
34793  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34794    unix_path=`$CYGPATH -u "$windows_path"`
34795    new_path="$unix_path"
34796  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34797    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34798    new_path="$unix_path"
34799  fi
34800
34801    # remove trailing .exe if any
34802    new_path="${new_path/%.exe/}"
34803
34804    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34805    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34806  fi
34807
34808  else
34809    # We're on a unix platform. Hooray! :)
34810    # First separate the path from the arguments. This will split at the first
34811    # space.
34812    complete="$RC"
34813    path="${complete%% *}"
34814    tmp="$complete EOL"
34815    arguments="${tmp#* }"
34816
34817    # Cannot rely on the command "which" here since it doesn't always work.
34818    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34819    if test -z "$is_absolute_path"; then
34820      # Path to executable is not absolute. Find it.
34821      IFS_save="$IFS"
34822      IFS=:
34823      for p in $PATH; do
34824        if test -f "$p/$path" && test -x "$p/$path"; then
34825          new_path="$p/$path"
34826          break
34827        fi
34828      done
34829      IFS="$IFS_save"
34830    else
34831      # This is an absolute path, we can use it without further modifications.
34832      new_path="$path"
34833    fi
34834
34835    if test "x$new_path" = x; then
34836      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34837$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34838      has_space=`$ECHO "$complete" | $GREP " "`
34839      if test "x$has_space" != x; then
34840        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34841$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34842      fi
34843      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34844    fi
34845  fi
34846
34847  # Now join together the path and the arguments once again
34848  if test "x$arguments" != xEOL; then
34849    new_complete="$new_path ${arguments% *}"
34850  else
34851    new_complete="$new_path"
34852  fi
34853
34854  if test "x$complete" != "x$new_complete"; then
34855    RC="$new_complete"
34856    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
34857$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
34858  fi
34859
34860    # Extract the first word of "dumpbin", so it can be a program name with args.
34861set dummy dumpbin; ac_word=$2
34862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34863$as_echo_n "checking for $ac_word... " >&6; }
34864if ${ac_cv_prog_DUMPBIN+:} false; then :
34865  $as_echo_n "(cached) " >&6
34866else
34867  if test -n "$DUMPBIN"; then
34868  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
34869else
34870as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34871for as_dir in $PATH
34872do
34873  IFS=$as_save_IFS
34874  test -z "$as_dir" && as_dir=.
34875    for ac_exec_ext in '' $ac_executable_extensions; do
34876  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34877    ac_cv_prog_DUMPBIN="dumpbin"
34878    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34879    break 2
34880  fi
34881done
34882  done
34883IFS=$as_save_IFS
34884
34885fi
34886fi
34887DUMPBIN=$ac_cv_prog_DUMPBIN
34888if test -n "$DUMPBIN"; then
34889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
34890$as_echo "$DUMPBIN" >&6; }
34891else
34892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34893$as_echo "no" >&6; }
34894fi
34895
34896
34897
34898  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34899
34900  # First separate the path from the arguments. This will split at the first
34901  # space.
34902  complete="$DUMPBIN"
34903  path="${complete%% *}"
34904  tmp="$complete EOL"
34905  arguments="${tmp#* }"
34906
34907  # Input might be given as Windows format, start by converting to
34908  # unix format.
34909  new_path=`$CYGPATH -u "$path"`
34910
34911  # Now try to locate executable using which
34912  new_path=`$WHICH "$new_path" 2> /dev/null`
34913  # bat and cmd files are not always considered executable in cygwin causing which
34914  # to not find them
34915  if test "x$new_path" = x \
34916      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34917      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34918    new_path=`$CYGPATH -u "$path"`
34919  fi
34920  if test "x$new_path" = x; then
34921    # Oops. Which didn't find the executable.
34922    # The splitting of arguments from the executable at a space might have been incorrect,
34923    # since paths with space are more likely in Windows. Give it another try with the whole
34924    # argument.
34925    path="$complete"
34926    arguments="EOL"
34927    new_path=`$CYGPATH -u "$path"`
34928    new_path=`$WHICH "$new_path" 2> /dev/null`
34929    # bat and cmd files are not always considered executable in cygwin causing which
34930    # to not find them
34931    if test "x$new_path" = x \
34932        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34933        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34934      new_path=`$CYGPATH -u "$path"`
34935    fi
34936    if test "x$new_path" = x; then
34937      # It's still not found. Now this is an unrecoverable error.
34938      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34939$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34940      has_space=`$ECHO "$complete" | $GREP " "`
34941      if test "x$has_space" != x; then
34942        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34943$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34944      fi
34945      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34946    fi
34947  fi
34948
34949  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34950  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34951  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34952  # "foo.exe" is OK but "foo" is an error.
34953  #
34954  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34955  # It is also a way to make sure we got the proper file name for the real test later on.
34956  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34957  if test "x$test_shortpath" = x; then
34958    # Short path failed, file does not exist as specified.
34959    # Try adding .exe or .cmd
34960    if test -f "${new_path}.exe"; then
34961      input_to_shortpath="${new_path}.exe"
34962    elif test -f "${new_path}.cmd"; then
34963      input_to_shortpath="${new_path}.cmd"
34964    else
34965      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
34966$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
34967      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34968$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34969      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34970    fi
34971  else
34972    input_to_shortpath="$new_path"
34973  fi
34974
34975  # Call helper function which possibly converts this using DOS-style short mode.
34976  # If so, the updated path is stored in $new_path.
34977  new_path="$input_to_shortpath"
34978
34979  input_path="$input_to_shortpath"
34980  # Check if we need to convert this using DOS-style short mode. If the path
34981  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34982  # take no chances and rewrite it.
34983  # Note: m4 eats our [], so we need to use [ and ] instead.
34984  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34985  if test "x$has_forbidden_chars" != x; then
34986    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34987    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34988    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34989    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34990      # Going to short mode and back again did indeed matter. Since short mode is
34991      # case insensitive, let's make it lowercase to improve readability.
34992      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34993      # Now convert it back to Unix-stile (cygpath)
34994      input_path=`$CYGPATH -u "$shortmode_path"`
34995      new_path="$input_path"
34996    fi
34997  fi
34998
34999  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35000  if test "x$test_cygdrive_prefix" = x; then
35001    # As a simple fix, exclude /usr/bin since it's not a real path.
35002    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35003      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35004      # a path prefixed by /cygdrive for fixpath to work.
35005      new_path="$CYGWIN_ROOT_PATH$input_path"
35006    fi
35007  fi
35008
35009  # remove trailing .exe if any
35010  new_path="${new_path/%.exe/}"
35011
35012  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35013
35014  # First separate the path from the arguments. This will split at the first
35015  # space.
35016  complete="$DUMPBIN"
35017  path="${complete%% *}"
35018  tmp="$complete EOL"
35019  arguments="${tmp#* }"
35020
35021  # Input might be given as Windows format, start by converting to
35022  # unix format.
35023  new_path="$path"
35024
35025  windows_path="$new_path"
35026  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35027    unix_path=`$CYGPATH -u "$windows_path"`
35028    new_path="$unix_path"
35029  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35030    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35031    new_path="$unix_path"
35032  fi
35033
35034
35035  # Now try to locate executable using which
35036  new_path=`$WHICH "$new_path" 2> /dev/null`
35037
35038  if test "x$new_path" = x; then
35039    # Oops. Which didn't find the executable.
35040    # The splitting of arguments from the executable at a space might have been incorrect,
35041    # since paths with space are more likely in Windows. Give it another try with the whole
35042    # argument.
35043    path="$complete"
35044    arguments="EOL"
35045    new_path="$path"
35046
35047  windows_path="$new_path"
35048  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35049    unix_path=`$CYGPATH -u "$windows_path"`
35050    new_path="$unix_path"
35051  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35052    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35053    new_path="$unix_path"
35054  fi
35055
35056
35057    new_path=`$WHICH "$new_path" 2> /dev/null`
35058    # bat and cmd files are not always considered executable in MSYS causing which
35059    # to not find them
35060    if test "x$new_path" = x \
35061        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35062        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35063      new_path="$path"
35064
35065  windows_path="$new_path"
35066  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35067    unix_path=`$CYGPATH -u "$windows_path"`
35068    new_path="$unix_path"
35069  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35070    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35071    new_path="$unix_path"
35072  fi
35073
35074    fi
35075
35076    if test "x$new_path" = x; then
35077      # It's still not found. Now this is an unrecoverable error.
35078      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35079$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35080      has_space=`$ECHO "$complete" | $GREP " "`
35081      if test "x$has_space" != x; then
35082        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35083$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35084      fi
35085      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35086    fi
35087  fi
35088
35089  # Now new_path has a complete unix path to the binary
35090  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35091    # Keep paths in /bin as-is, but remove trailing .exe if any
35092    new_path="${new_path/%.exe/}"
35093    # Do not save /bin paths to all_fixpath_prefixes!
35094  else
35095    # Not in mixed or Windows style, start by that.
35096    new_path=`cmd //c echo $new_path`
35097
35098  input_path="$new_path"
35099  # Check if we need to convert this using DOS-style short mode. If the path
35100  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35101  # take no chances and rewrite it.
35102  # Note: m4 eats our [], so we need to use [ and ] instead.
35103  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35104  if test "x$has_forbidden_chars" != x; then
35105    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35106    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35107  fi
35108
35109    # Output is in $new_path
35110
35111  windows_path="$new_path"
35112  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35113    unix_path=`$CYGPATH -u "$windows_path"`
35114    new_path="$unix_path"
35115  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35116    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35117    new_path="$unix_path"
35118  fi
35119
35120    # remove trailing .exe if any
35121    new_path="${new_path/%.exe/}"
35122
35123    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35124    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35125  fi
35126
35127  else
35128    # We're on a unix platform. Hooray! :)
35129    # First separate the path from the arguments. This will split at the first
35130    # space.
35131    complete="$DUMPBIN"
35132    path="${complete%% *}"
35133    tmp="$complete EOL"
35134    arguments="${tmp#* }"
35135
35136    # Cannot rely on the command "which" here since it doesn't always work.
35137    is_absolute_path=`$ECHO "$path" | $GREP ^/`
35138    if test -z "$is_absolute_path"; then
35139      # Path to executable is not absolute. Find it.
35140      IFS_save="$IFS"
35141      IFS=:
35142      for p in $PATH; do
35143        if test -f "$p/$path" && test -x "$p/$path"; then
35144          new_path="$p/$path"
35145          break
35146        fi
35147      done
35148      IFS="$IFS_save"
35149    else
35150      # This is an absolute path, we can use it without further modifications.
35151      new_path="$path"
35152    fi
35153
35154    if test "x$new_path" = x; then
35155      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35156$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35157      has_space=`$ECHO "$complete" | $GREP " "`
35158      if test "x$has_space" != x; then
35159        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35160$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35161      fi
35162      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35163    fi
35164  fi
35165
35166  # Now join together the path and the arguments once again
35167  if test "x$arguments" != xEOL; then
35168    new_complete="$new_path ${arguments% *}"
35169  else
35170    new_complete="$new_path"
35171  fi
35172
35173  if test "x$complete" != "x$new_complete"; then
35174    DUMPBIN="$new_complete"
35175    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
35176$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
35177  fi
35178
35179    # We need to check for 'msbuild.exe' because at the place where we expect to
35180    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
35181    # won't find the 'msbuild.exe' executable in that case (and the
35182    # 'ac_executable_extensions' is unusable due to performance reasons).
35183    # Notice that we intentionally don't fix up the path to MSBUILD because we
35184    # will call it in a DOS shell during freetype detection on Windows (see
35185    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
35186    # Extract the first word of "msbuild.exe", so it can be a program name with args.
35187set dummy msbuild.exe; ac_word=$2
35188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35189$as_echo_n "checking for $ac_word... " >&6; }
35190if ${ac_cv_prog_MSBUILD+:} false; then :
35191  $as_echo_n "(cached) " >&6
35192else
35193  if test -n "$MSBUILD"; then
35194  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
35195else
35196as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35197for as_dir in $PATH
35198do
35199  IFS=$as_save_IFS
35200  test -z "$as_dir" && as_dir=.
35201    for ac_exec_ext in '' $ac_executable_extensions; do
35202  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35203    ac_cv_prog_MSBUILD="msbuild.exe"
35204    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35205    break 2
35206  fi
35207done
35208  done
35209IFS=$as_save_IFS
35210
35211fi
35212fi
35213MSBUILD=$ac_cv_prog_MSBUILD
35214if test -n "$MSBUILD"; then
35215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
35216$as_echo "$MSBUILD" >&6; }
35217else
35218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35219$as_echo "no" >&6; }
35220fi
35221
35222
35223  fi
35224
35225  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
35226
35227
35228  # Publish this variable in the help.
35229
35230
35231  if test "x$STRIP" = x; then
35232    # The variable is not set by user, try to locate tool using the code snippet
35233    for ac_prog in strip
35234do
35235  # Extract the first word of "$ac_prog", so it can be a program name with args.
35236set dummy $ac_prog; ac_word=$2
35237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35238$as_echo_n "checking for $ac_word... " >&6; }
35239if ${ac_cv_path_STRIP+:} false; then :
35240  $as_echo_n "(cached) " >&6
35241else
35242  case $STRIP in
35243  [\\/]* | ?:[\\/]*)
35244  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35245  ;;
35246  *)
35247  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35248for as_dir in $PATH
35249do
35250  IFS=$as_save_IFS
35251  test -z "$as_dir" && as_dir=.
35252    for ac_exec_ext in '' $ac_executable_extensions; do
35253  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35254    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35255    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35256    break 2
35257  fi
35258done
35259  done
35260IFS=$as_save_IFS
35261
35262  ;;
35263esac
35264fi
35265STRIP=$ac_cv_path_STRIP
35266if test -n "$STRIP"; then
35267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35268$as_echo "$STRIP" >&6; }
35269else
35270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35271$as_echo "no" >&6; }
35272fi
35273
35274
35275  test -n "$STRIP" && break
35276done
35277
35278  else
35279    # The variable is set, but is it from the command line or the environment?
35280
35281    # Try to remove the string !STRIP! from our list.
35282    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
35283    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35284      # If it failed, the variable was not from the command line. Ignore it,
35285      # but warn the user (except for BASH, which is always set by the calling BASH).
35286      if test "xSTRIP" != xBASH; then
35287        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
35288$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
35289      fi
35290      # Try to locate tool using the code snippet
35291      for ac_prog in strip
35292do
35293  # Extract the first word of "$ac_prog", so it can be a program name with args.
35294set dummy $ac_prog; ac_word=$2
35295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35296$as_echo_n "checking for $ac_word... " >&6; }
35297if ${ac_cv_path_STRIP+:} false; then :
35298  $as_echo_n "(cached) " >&6
35299else
35300  case $STRIP in
35301  [\\/]* | ?:[\\/]*)
35302  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35303  ;;
35304  *)
35305  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35306for as_dir in $PATH
35307do
35308  IFS=$as_save_IFS
35309  test -z "$as_dir" && as_dir=.
35310    for ac_exec_ext in '' $ac_executable_extensions; do
35311  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35312    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35313    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35314    break 2
35315  fi
35316done
35317  done
35318IFS=$as_save_IFS
35319
35320  ;;
35321esac
35322fi
35323STRIP=$ac_cv_path_STRIP
35324if test -n "$STRIP"; then
35325  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35326$as_echo "$STRIP" >&6; }
35327else
35328  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35329$as_echo "no" >&6; }
35330fi
35331
35332
35333  test -n "$STRIP" && break
35334done
35335
35336    else
35337      # If it succeeded, then it was overridden by the user. We will use it
35338      # for the tool.
35339
35340      # First remove it from the list of overridden variables, so we can test
35341      # for unknown variables in the end.
35342      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35343
35344      # Check if the provided tool contains a complete path.
35345      tool_specified="$STRIP"
35346      tool_basename="${tool_specified##*/}"
35347      if test "x$tool_basename" = "x$tool_specified"; then
35348        # A command without a complete path is provided, search $PATH.
35349        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
35350$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
35351        # Extract the first word of "$tool_basename", so it can be a program name with args.
35352set dummy $tool_basename; ac_word=$2
35353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35354$as_echo_n "checking for $ac_word... " >&6; }
35355if ${ac_cv_path_STRIP+:} false; then :
35356  $as_echo_n "(cached) " >&6
35357else
35358  case $STRIP in
35359  [\\/]* | ?:[\\/]*)
35360  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35361  ;;
35362  *)
35363  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35364for as_dir in $PATH
35365do
35366  IFS=$as_save_IFS
35367  test -z "$as_dir" && as_dir=.
35368    for ac_exec_ext in '' $ac_executable_extensions; do
35369  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35370    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35371    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35372    break 2
35373  fi
35374done
35375  done
35376IFS=$as_save_IFS
35377
35378  ;;
35379esac
35380fi
35381STRIP=$ac_cv_path_STRIP
35382if test -n "$STRIP"; then
35383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35384$as_echo "$STRIP" >&6; }
35385else
35386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35387$as_echo "no" >&6; }
35388fi
35389
35390
35391        if test "x$STRIP" = x; then
35392          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35393        fi
35394      else
35395        # Otherwise we believe it is a complete path. Use it as it is.
35396        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
35397$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
35398        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
35399$as_echo_n "checking for STRIP... " >&6; }
35400        if test ! -x "$tool_specified"; then
35401          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35402$as_echo "not found" >&6; }
35403          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
35404        fi
35405        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35406$as_echo "$tool_specified" >&6; }
35407      fi
35408    fi
35409  fi
35410
35411
35412
35413  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35414
35415  # First separate the path from the arguments. This will split at the first
35416  # space.
35417  complete="$STRIP"
35418  path="${complete%% *}"
35419  tmp="$complete EOL"
35420  arguments="${tmp#* }"
35421
35422  # Input might be given as Windows format, start by converting to
35423  # unix format.
35424  new_path=`$CYGPATH -u "$path"`
35425
35426  # Now try to locate executable using which
35427  new_path=`$WHICH "$new_path" 2> /dev/null`
35428  # bat and cmd files are not always considered executable in cygwin causing which
35429  # to not find them
35430  if test "x$new_path" = x \
35431      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35432      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35433    new_path=`$CYGPATH -u "$path"`
35434  fi
35435  if test "x$new_path" = x; then
35436    # Oops. Which didn't find the executable.
35437    # The splitting of arguments from the executable at a space might have been incorrect,
35438    # since paths with space are more likely in Windows. Give it another try with the whole
35439    # argument.
35440    path="$complete"
35441    arguments="EOL"
35442    new_path=`$CYGPATH -u "$path"`
35443    new_path=`$WHICH "$new_path" 2> /dev/null`
35444    # bat and cmd files are not always considered executable in cygwin causing which
35445    # to not find them
35446    if test "x$new_path" = x \
35447        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35448        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35449      new_path=`$CYGPATH -u "$path"`
35450    fi
35451    if test "x$new_path" = x; then
35452      # It's still not found. Now this is an unrecoverable error.
35453      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35454$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35455      has_space=`$ECHO "$complete" | $GREP " "`
35456      if test "x$has_space" != x; then
35457        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35458$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35459      fi
35460      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35461    fi
35462  fi
35463
35464  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35465  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35466  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35467  # "foo.exe" is OK but "foo" is an error.
35468  #
35469  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35470  # It is also a way to make sure we got the proper file name for the real test later on.
35471  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35472  if test "x$test_shortpath" = x; then
35473    # Short path failed, file does not exist as specified.
35474    # Try adding .exe or .cmd
35475    if test -f "${new_path}.exe"; then
35476      input_to_shortpath="${new_path}.exe"
35477    elif test -f "${new_path}.cmd"; then
35478      input_to_shortpath="${new_path}.cmd"
35479    else
35480      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
35481$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
35482      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35483$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35484      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35485    fi
35486  else
35487    input_to_shortpath="$new_path"
35488  fi
35489
35490  # Call helper function which possibly converts this using DOS-style short mode.
35491  # If so, the updated path is stored in $new_path.
35492  new_path="$input_to_shortpath"
35493
35494  input_path="$input_to_shortpath"
35495  # Check if we need to convert this using DOS-style short mode. If the path
35496  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35497  # take no chances and rewrite it.
35498  # Note: m4 eats our [], so we need to use [ and ] instead.
35499  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35500  if test "x$has_forbidden_chars" != x; then
35501    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35502    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35503    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35504    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35505      # Going to short mode and back again did indeed matter. Since short mode is
35506      # case insensitive, let's make it lowercase to improve readability.
35507      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35508      # Now convert it back to Unix-stile (cygpath)
35509      input_path=`$CYGPATH -u "$shortmode_path"`
35510      new_path="$input_path"
35511    fi
35512  fi
35513
35514  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35515  if test "x$test_cygdrive_prefix" = x; then
35516    # As a simple fix, exclude /usr/bin since it's not a real path.
35517    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35518      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35519      # a path prefixed by /cygdrive for fixpath to work.
35520      new_path="$CYGWIN_ROOT_PATH$input_path"
35521    fi
35522  fi
35523
35524  # remove trailing .exe if any
35525  new_path="${new_path/%.exe/}"
35526
35527  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35528
35529  # First separate the path from the arguments. This will split at the first
35530  # space.
35531  complete="$STRIP"
35532  path="${complete%% *}"
35533  tmp="$complete EOL"
35534  arguments="${tmp#* }"
35535
35536  # Input might be given as Windows format, start by converting to
35537  # unix format.
35538  new_path="$path"
35539
35540  windows_path="$new_path"
35541  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35542    unix_path=`$CYGPATH -u "$windows_path"`
35543    new_path="$unix_path"
35544  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35545    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35546    new_path="$unix_path"
35547  fi
35548
35549
35550  # Now try to locate executable using which
35551  new_path=`$WHICH "$new_path" 2> /dev/null`
35552
35553  if test "x$new_path" = x; then
35554    # Oops. Which didn't find the executable.
35555    # The splitting of arguments from the executable at a space might have been incorrect,
35556    # since paths with space are more likely in Windows. Give it another try with the whole
35557    # argument.
35558    path="$complete"
35559    arguments="EOL"
35560    new_path="$path"
35561
35562  windows_path="$new_path"
35563  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35564    unix_path=`$CYGPATH -u "$windows_path"`
35565    new_path="$unix_path"
35566  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35567    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35568    new_path="$unix_path"
35569  fi
35570
35571
35572    new_path=`$WHICH "$new_path" 2> /dev/null`
35573    # bat and cmd files are not always considered executable in MSYS causing which
35574    # to not find them
35575    if test "x$new_path" = x \
35576        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35577        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35578      new_path="$path"
35579
35580  windows_path="$new_path"
35581  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35582    unix_path=`$CYGPATH -u "$windows_path"`
35583    new_path="$unix_path"
35584  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35585    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35586    new_path="$unix_path"
35587  fi
35588
35589    fi
35590
35591    if test "x$new_path" = x; then
35592      # It's still not found. Now this is an unrecoverable error.
35593      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35594$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35595      has_space=`$ECHO "$complete" | $GREP " "`
35596      if test "x$has_space" != x; then
35597        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35598$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35599      fi
35600      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35601    fi
35602  fi
35603
35604  # Now new_path has a complete unix path to the binary
35605  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35606    # Keep paths in /bin as-is, but remove trailing .exe if any
35607    new_path="${new_path/%.exe/}"
35608    # Do not save /bin paths to all_fixpath_prefixes!
35609  else
35610    # Not in mixed or Windows style, start by that.
35611    new_path=`cmd //c echo $new_path`
35612
35613  input_path="$new_path"
35614  # Check if we need to convert this using DOS-style short mode. If the path
35615  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35616  # take no chances and rewrite it.
35617  # Note: m4 eats our [], so we need to use [ and ] instead.
35618  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35619  if test "x$has_forbidden_chars" != x; then
35620    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35621    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35622  fi
35623
35624    # Output is in $new_path
35625
35626  windows_path="$new_path"
35627  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35628    unix_path=`$CYGPATH -u "$windows_path"`
35629    new_path="$unix_path"
35630  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35631    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35632    new_path="$unix_path"
35633  fi
35634
35635    # remove trailing .exe if any
35636    new_path="${new_path/%.exe/}"
35637
35638    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35639    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35640  fi
35641
35642  else
35643    # We're on a unix platform. Hooray! :)
35644    # First separate the path from the arguments. This will split at the first
35645    # space.
35646    complete="$STRIP"
35647    path="${complete%% *}"
35648    tmp="$complete EOL"
35649    arguments="${tmp#* }"
35650
35651    # Cannot rely on the command "which" here since it doesn't always work.
35652    is_absolute_path=`$ECHO "$path" | $GREP ^/`
35653    if test -z "$is_absolute_path"; then
35654      # Path to executable is not absolute. Find it.
35655      IFS_save="$IFS"
35656      IFS=:
35657      for p in $PATH; do
35658        if test -f "$p/$path" && test -x "$p/$path"; then
35659          new_path="$p/$path"
35660          break
35661        fi
35662      done
35663      IFS="$IFS_save"
35664    else
35665      # This is an absolute path, we can use it without further modifications.
35666      new_path="$path"
35667    fi
35668
35669    if test "x$new_path" = x; then
35670      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35671$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35672      has_space=`$ECHO "$complete" | $GREP " "`
35673      if test "x$has_space" != x; then
35674        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35675$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35676      fi
35677      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35678    fi
35679  fi
35680
35681  # Now join together the path and the arguments once again
35682  if test "x$arguments" != xEOL; then
35683    new_complete="$new_path ${arguments% *}"
35684  else
35685    new_complete="$new_path"
35686  fi
35687
35688  if test "x$complete" != "x$new_complete"; then
35689    STRIP="$new_complete"
35690    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
35691$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
35692  fi
35693
35694
35695
35696  # Publish this variable in the help.
35697
35698
35699  if test "x$NM" = x; then
35700    # The variable is not set by user, try to locate tool using the code snippet
35701    for ac_prog in nm
35702do
35703  # Extract the first word of "$ac_prog", so it can be a program name with args.
35704set dummy $ac_prog; ac_word=$2
35705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35706$as_echo_n "checking for $ac_word... " >&6; }
35707if ${ac_cv_path_NM+:} false; then :
35708  $as_echo_n "(cached) " >&6
35709else
35710  case $NM in
35711  [\\/]* | ?:[\\/]*)
35712  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35713  ;;
35714  *)
35715  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35716for as_dir in $PATH
35717do
35718  IFS=$as_save_IFS
35719  test -z "$as_dir" && as_dir=.
35720    for ac_exec_ext in '' $ac_executable_extensions; do
35721  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35722    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35723    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35724    break 2
35725  fi
35726done
35727  done
35728IFS=$as_save_IFS
35729
35730  ;;
35731esac
35732fi
35733NM=$ac_cv_path_NM
35734if test -n "$NM"; then
35735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35736$as_echo "$NM" >&6; }
35737else
35738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35739$as_echo "no" >&6; }
35740fi
35741
35742
35743  test -n "$NM" && break
35744done
35745
35746  else
35747    # The variable is set, but is it from the command line or the environment?
35748
35749    # Try to remove the string !NM! from our list.
35750    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
35751    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35752      # If it failed, the variable was not from the command line. Ignore it,
35753      # but warn the user (except for BASH, which is always set by the calling BASH).
35754      if test "xNM" != xBASH; then
35755        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
35756$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
35757      fi
35758      # Try to locate tool using the code snippet
35759      for ac_prog in nm
35760do
35761  # Extract the first word of "$ac_prog", so it can be a program name with args.
35762set dummy $ac_prog; ac_word=$2
35763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35764$as_echo_n "checking for $ac_word... " >&6; }
35765if ${ac_cv_path_NM+:} false; then :
35766  $as_echo_n "(cached) " >&6
35767else
35768  case $NM in
35769  [\\/]* | ?:[\\/]*)
35770  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35771  ;;
35772  *)
35773  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35774for as_dir in $PATH
35775do
35776  IFS=$as_save_IFS
35777  test -z "$as_dir" && as_dir=.
35778    for ac_exec_ext in '' $ac_executable_extensions; do
35779  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35780    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35781    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35782    break 2
35783  fi
35784done
35785  done
35786IFS=$as_save_IFS
35787
35788  ;;
35789esac
35790fi
35791NM=$ac_cv_path_NM
35792if test -n "$NM"; then
35793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35794$as_echo "$NM" >&6; }
35795else
35796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35797$as_echo "no" >&6; }
35798fi
35799
35800
35801  test -n "$NM" && break
35802done
35803
35804    else
35805      # If it succeeded, then it was overridden by the user. We will use it
35806      # for the tool.
35807
35808      # First remove it from the list of overridden variables, so we can test
35809      # for unknown variables in the end.
35810      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35811
35812      # Check if the provided tool contains a complete path.
35813      tool_specified="$NM"
35814      tool_basename="${tool_specified##*/}"
35815      if test "x$tool_basename" = "x$tool_specified"; then
35816        # A command without a complete path is provided, search $PATH.
35817        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
35818$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
35819        # Extract the first word of "$tool_basename", so it can be a program name with args.
35820set dummy $tool_basename; ac_word=$2
35821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35822$as_echo_n "checking for $ac_word... " >&6; }
35823if ${ac_cv_path_NM+:} false; then :
35824  $as_echo_n "(cached) " >&6
35825else
35826  case $NM in
35827  [\\/]* | ?:[\\/]*)
35828  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35829  ;;
35830  *)
35831  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35832for as_dir in $PATH
35833do
35834  IFS=$as_save_IFS
35835  test -z "$as_dir" && as_dir=.
35836    for ac_exec_ext in '' $ac_executable_extensions; do
35837  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35838    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35839    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35840    break 2
35841  fi
35842done
35843  done
35844IFS=$as_save_IFS
35845
35846  ;;
35847esac
35848fi
35849NM=$ac_cv_path_NM
35850if test -n "$NM"; then
35851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35852$as_echo "$NM" >&6; }
35853else
35854  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35855$as_echo "no" >&6; }
35856fi
35857
35858
35859        if test "x$NM" = x; then
35860          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35861        fi
35862      else
35863        # Otherwise we believe it is a complete path. Use it as it is.
35864        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
35865$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
35866        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
35867$as_echo_n "checking for NM... " >&6; }
35868        if test ! -x "$tool_specified"; then
35869          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35870$as_echo "not found" >&6; }
35871          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
35872        fi
35873        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35874$as_echo "$tool_specified" >&6; }
35875      fi
35876    fi
35877  fi
35878
35879
35880
35881  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35882
35883  # First separate the path from the arguments. This will split at the first
35884  # space.
35885  complete="$NM"
35886  path="${complete%% *}"
35887  tmp="$complete EOL"
35888  arguments="${tmp#* }"
35889
35890  # Input might be given as Windows format, start by converting to
35891  # unix format.
35892  new_path=`$CYGPATH -u "$path"`
35893
35894  # Now try to locate executable using which
35895  new_path=`$WHICH "$new_path" 2> /dev/null`
35896  # bat and cmd files are not always considered executable in cygwin causing which
35897  # to not find them
35898  if test "x$new_path" = x \
35899      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35900      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35901    new_path=`$CYGPATH -u "$path"`
35902  fi
35903  if test "x$new_path" = x; then
35904    # Oops. Which didn't find the executable.
35905    # The splitting of arguments from the executable at a space might have been incorrect,
35906    # since paths with space are more likely in Windows. Give it another try with the whole
35907    # argument.
35908    path="$complete"
35909    arguments="EOL"
35910    new_path=`$CYGPATH -u "$path"`
35911    new_path=`$WHICH "$new_path" 2> /dev/null`
35912    # bat and cmd files are not always considered executable in cygwin causing which
35913    # to not find them
35914    if test "x$new_path" = x \
35915        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35916        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35917      new_path=`$CYGPATH -u "$path"`
35918    fi
35919    if test "x$new_path" = x; then
35920      # It's still not found. Now this is an unrecoverable error.
35921      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35922$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35923      has_space=`$ECHO "$complete" | $GREP " "`
35924      if test "x$has_space" != x; then
35925        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35926$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35927      fi
35928      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35929    fi
35930  fi
35931
35932  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35933  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35934  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35935  # "foo.exe" is OK but "foo" is an error.
35936  #
35937  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35938  # It is also a way to make sure we got the proper file name for the real test later on.
35939  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35940  if test "x$test_shortpath" = x; then
35941    # Short path failed, file does not exist as specified.
35942    # Try adding .exe or .cmd
35943    if test -f "${new_path}.exe"; then
35944      input_to_shortpath="${new_path}.exe"
35945    elif test -f "${new_path}.cmd"; then
35946      input_to_shortpath="${new_path}.cmd"
35947    else
35948      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
35949$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
35950      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35951$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35952      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35953    fi
35954  else
35955    input_to_shortpath="$new_path"
35956  fi
35957
35958  # Call helper function which possibly converts this using DOS-style short mode.
35959  # If so, the updated path is stored in $new_path.
35960  new_path="$input_to_shortpath"
35961
35962  input_path="$input_to_shortpath"
35963  # Check if we need to convert this using DOS-style short mode. If the path
35964  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35965  # take no chances and rewrite it.
35966  # Note: m4 eats our [], so we need to use [ and ] instead.
35967  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35968  if test "x$has_forbidden_chars" != x; then
35969    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35970    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35971    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35972    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35973      # Going to short mode and back again did indeed matter. Since short mode is
35974      # case insensitive, let's make it lowercase to improve readability.
35975      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35976      # Now convert it back to Unix-stile (cygpath)
35977      input_path=`$CYGPATH -u "$shortmode_path"`
35978      new_path="$input_path"
35979    fi
35980  fi
35981
35982  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35983  if test "x$test_cygdrive_prefix" = x; then
35984    # As a simple fix, exclude /usr/bin since it's not a real path.
35985    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35986      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35987      # a path prefixed by /cygdrive for fixpath to work.
35988      new_path="$CYGWIN_ROOT_PATH$input_path"
35989    fi
35990  fi
35991
35992  # remove trailing .exe if any
35993  new_path="${new_path/%.exe/}"
35994
35995  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35996
35997  # First separate the path from the arguments. This will split at the first
35998  # space.
35999  complete="$NM"
36000  path="${complete%% *}"
36001  tmp="$complete EOL"
36002  arguments="${tmp#* }"
36003
36004  # Input might be given as Windows format, start by converting to
36005  # unix format.
36006  new_path="$path"
36007
36008  windows_path="$new_path"
36009  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36010    unix_path=`$CYGPATH -u "$windows_path"`
36011    new_path="$unix_path"
36012  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36013    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36014    new_path="$unix_path"
36015  fi
36016
36017
36018  # Now try to locate executable using which
36019  new_path=`$WHICH "$new_path" 2> /dev/null`
36020
36021  if test "x$new_path" = x; then
36022    # Oops. Which didn't find the executable.
36023    # The splitting of arguments from the executable at a space might have been incorrect,
36024    # since paths with space are more likely in Windows. Give it another try with the whole
36025    # argument.
36026    path="$complete"
36027    arguments="EOL"
36028    new_path="$path"
36029
36030  windows_path="$new_path"
36031  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36032    unix_path=`$CYGPATH -u "$windows_path"`
36033    new_path="$unix_path"
36034  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36035    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36036    new_path="$unix_path"
36037  fi
36038
36039
36040    new_path=`$WHICH "$new_path" 2> /dev/null`
36041    # bat and cmd files are not always considered executable in MSYS causing which
36042    # to not find them
36043    if test "x$new_path" = x \
36044        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36045        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36046      new_path="$path"
36047
36048  windows_path="$new_path"
36049  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36050    unix_path=`$CYGPATH -u "$windows_path"`
36051    new_path="$unix_path"
36052  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36053    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36054    new_path="$unix_path"
36055  fi
36056
36057    fi
36058
36059    if test "x$new_path" = x; then
36060      # It's still not found. Now this is an unrecoverable error.
36061      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36062$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36063      has_space=`$ECHO "$complete" | $GREP " "`
36064      if test "x$has_space" != x; then
36065        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36066$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36067      fi
36068      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36069    fi
36070  fi
36071
36072  # Now new_path has a complete unix path to the binary
36073  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36074    # Keep paths in /bin as-is, but remove trailing .exe if any
36075    new_path="${new_path/%.exe/}"
36076    # Do not save /bin paths to all_fixpath_prefixes!
36077  else
36078    # Not in mixed or Windows style, start by that.
36079    new_path=`cmd //c echo $new_path`
36080
36081  input_path="$new_path"
36082  # Check if we need to convert this using DOS-style short mode. If the path
36083  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36084  # take no chances and rewrite it.
36085  # Note: m4 eats our [], so we need to use [ and ] instead.
36086  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36087  if test "x$has_forbidden_chars" != x; then
36088    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36089    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36090  fi
36091
36092    # Output is in $new_path
36093
36094  windows_path="$new_path"
36095  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36096    unix_path=`$CYGPATH -u "$windows_path"`
36097    new_path="$unix_path"
36098  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36099    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36100    new_path="$unix_path"
36101  fi
36102
36103    # remove trailing .exe if any
36104    new_path="${new_path/%.exe/}"
36105
36106    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36107    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36108  fi
36109
36110  else
36111    # We're on a unix platform. Hooray! :)
36112    # First separate the path from the arguments. This will split at the first
36113    # space.
36114    complete="$NM"
36115    path="${complete%% *}"
36116    tmp="$complete EOL"
36117    arguments="${tmp#* }"
36118
36119    # Cannot rely on the command "which" here since it doesn't always work.
36120    is_absolute_path=`$ECHO "$path" | $GREP ^/`
36121    if test -z "$is_absolute_path"; then
36122      # Path to executable is not absolute. Find it.
36123      IFS_save="$IFS"
36124      IFS=:
36125      for p in $PATH; do
36126        if test -f "$p/$path" && test -x "$p/$path"; then
36127          new_path="$p/$path"
36128          break
36129        fi
36130      done
36131      IFS="$IFS_save"
36132    else
36133      # This is an absolute path, we can use it without further modifications.
36134      new_path="$path"
36135    fi
36136
36137    if test "x$new_path" = x; then
36138      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36139$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36140      has_space=`$ECHO "$complete" | $GREP " "`
36141      if test "x$has_space" != x; then
36142        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36143$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36144      fi
36145      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36146    fi
36147  fi
36148
36149  # Now join together the path and the arguments once again
36150  if test "x$arguments" != xEOL; then
36151    new_complete="$new_path ${arguments% *}"
36152  else
36153    new_complete="$new_path"
36154  fi
36155
36156  if test "x$complete" != "x$new_complete"; then
36157    NM="$new_complete"
36158    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
36159$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
36160  fi
36161
36162
36163
36164  # Publish this variable in the help.
36165
36166
36167  if test "x$GNM" = x; then
36168    # The variable is not set by user, try to locate tool using the code snippet
36169    for ac_prog in gnm
36170do
36171  # Extract the first word of "$ac_prog", so it can be a program name with args.
36172set dummy $ac_prog; ac_word=$2
36173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36174$as_echo_n "checking for $ac_word... " >&6; }
36175if ${ac_cv_path_GNM+:} false; then :
36176  $as_echo_n "(cached) " >&6
36177else
36178  case $GNM in
36179  [\\/]* | ?:[\\/]*)
36180  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36181  ;;
36182  *)
36183  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36184for as_dir in $PATH
36185do
36186  IFS=$as_save_IFS
36187  test -z "$as_dir" && as_dir=.
36188    for ac_exec_ext in '' $ac_executable_extensions; do
36189  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36190    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36191    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36192    break 2
36193  fi
36194done
36195  done
36196IFS=$as_save_IFS
36197
36198  ;;
36199esac
36200fi
36201GNM=$ac_cv_path_GNM
36202if test -n "$GNM"; then
36203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36204$as_echo "$GNM" >&6; }
36205else
36206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36207$as_echo "no" >&6; }
36208fi
36209
36210
36211  test -n "$GNM" && break
36212done
36213
36214  else
36215    # The variable is set, but is it from the command line or the environment?
36216
36217    # Try to remove the string !GNM! from our list.
36218    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
36219    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36220      # If it failed, the variable was not from the command line. Ignore it,
36221      # but warn the user (except for BASH, which is always set by the calling BASH).
36222      if test "xGNM" != xBASH; then
36223        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
36224$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
36225      fi
36226      # Try to locate tool using the code snippet
36227      for ac_prog in gnm
36228do
36229  # Extract the first word of "$ac_prog", so it can be a program name with args.
36230set dummy $ac_prog; ac_word=$2
36231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36232$as_echo_n "checking for $ac_word... " >&6; }
36233if ${ac_cv_path_GNM+:} false; then :
36234  $as_echo_n "(cached) " >&6
36235else
36236  case $GNM in
36237  [\\/]* | ?:[\\/]*)
36238  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36239  ;;
36240  *)
36241  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36242for as_dir in $PATH
36243do
36244  IFS=$as_save_IFS
36245  test -z "$as_dir" && as_dir=.
36246    for ac_exec_ext in '' $ac_executable_extensions; do
36247  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36248    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36249    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36250    break 2
36251  fi
36252done
36253  done
36254IFS=$as_save_IFS
36255
36256  ;;
36257esac
36258fi
36259GNM=$ac_cv_path_GNM
36260if test -n "$GNM"; then
36261  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36262$as_echo "$GNM" >&6; }
36263else
36264  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36265$as_echo "no" >&6; }
36266fi
36267
36268
36269  test -n "$GNM" && break
36270done
36271
36272    else
36273      # If it succeeded, then it was overridden by the user. We will use it
36274      # for the tool.
36275
36276      # First remove it from the list of overridden variables, so we can test
36277      # for unknown variables in the end.
36278      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36279
36280      # Check if the provided tool contains a complete path.
36281      tool_specified="$GNM"
36282      tool_basename="${tool_specified##*/}"
36283      if test "x$tool_basename" = "x$tool_specified"; then
36284        # A command without a complete path is provided, search $PATH.
36285        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
36286$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
36287        # Extract the first word of "$tool_basename", so it can be a program name with args.
36288set dummy $tool_basename; ac_word=$2
36289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36290$as_echo_n "checking for $ac_word... " >&6; }
36291if ${ac_cv_path_GNM+:} false; then :
36292  $as_echo_n "(cached) " >&6
36293else
36294  case $GNM in
36295  [\\/]* | ?:[\\/]*)
36296  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36297  ;;
36298  *)
36299  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36300for as_dir in $PATH
36301do
36302  IFS=$as_save_IFS
36303  test -z "$as_dir" && as_dir=.
36304    for ac_exec_ext in '' $ac_executable_extensions; do
36305  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36306    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36307    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36308    break 2
36309  fi
36310done
36311  done
36312IFS=$as_save_IFS
36313
36314  ;;
36315esac
36316fi
36317GNM=$ac_cv_path_GNM
36318if test -n "$GNM"; then
36319  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36320$as_echo "$GNM" >&6; }
36321else
36322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36323$as_echo "no" >&6; }
36324fi
36325
36326
36327        if test "x$GNM" = x; then
36328          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36329        fi
36330      else
36331        # Otherwise we believe it is a complete path. Use it as it is.
36332        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
36333$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
36334        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
36335$as_echo_n "checking for GNM... " >&6; }
36336        if test ! -x "$tool_specified"; then
36337          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36338$as_echo "not found" >&6; }
36339          as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
36340        fi
36341        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36342$as_echo "$tool_specified" >&6; }
36343      fi
36344    fi
36345  fi
36346
36347
36348
36349  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36350
36351  # First separate the path from the arguments. This will split at the first
36352  # space.
36353  complete="$GNM"
36354  path="${complete%% *}"
36355  tmp="$complete EOL"
36356  arguments="${tmp#* }"
36357
36358  # Input might be given as Windows format, start by converting to
36359  # unix format.
36360  new_path=`$CYGPATH -u "$path"`
36361
36362  # Now try to locate executable using which
36363  new_path=`$WHICH "$new_path" 2> /dev/null`
36364  # bat and cmd files are not always considered executable in cygwin causing which
36365  # to not find them
36366  if test "x$new_path" = x \
36367      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36368      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36369    new_path=`$CYGPATH -u "$path"`
36370  fi
36371  if test "x$new_path" = x; then
36372    # Oops. Which didn't find the executable.
36373    # The splitting of arguments from the executable at a space might have been incorrect,
36374    # since paths with space are more likely in Windows. Give it another try with the whole
36375    # argument.
36376    path="$complete"
36377    arguments="EOL"
36378    new_path=`$CYGPATH -u "$path"`
36379    new_path=`$WHICH "$new_path" 2> /dev/null`
36380    # bat and cmd files are not always considered executable in cygwin causing which
36381    # to not find them
36382    if test "x$new_path" = x \
36383        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36384        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36385      new_path=`$CYGPATH -u "$path"`
36386    fi
36387    if test "x$new_path" = x; then
36388      # It's still not found. Now this is an unrecoverable error.
36389      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36390$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36391      has_space=`$ECHO "$complete" | $GREP " "`
36392      if test "x$has_space" != x; then
36393        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36394$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36395      fi
36396      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36397    fi
36398  fi
36399
36400  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36401  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36402  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36403  # "foo.exe" is OK but "foo" is an error.
36404  #
36405  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36406  # It is also a way to make sure we got the proper file name for the real test later on.
36407  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36408  if test "x$test_shortpath" = x; then
36409    # Short path failed, file does not exist as specified.
36410    # Try adding .exe or .cmd
36411    if test -f "${new_path}.exe"; then
36412      input_to_shortpath="${new_path}.exe"
36413    elif test -f "${new_path}.cmd"; then
36414      input_to_shortpath="${new_path}.cmd"
36415    else
36416      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
36417$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
36418      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36419$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36420      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36421    fi
36422  else
36423    input_to_shortpath="$new_path"
36424  fi
36425
36426  # Call helper function which possibly converts this using DOS-style short mode.
36427  # If so, the updated path is stored in $new_path.
36428  new_path="$input_to_shortpath"
36429
36430  input_path="$input_to_shortpath"
36431  # Check if we need to convert this using DOS-style short mode. If the path
36432  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36433  # take no chances and rewrite it.
36434  # Note: m4 eats our [], so we need to use [ and ] instead.
36435  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36436  if test "x$has_forbidden_chars" != x; then
36437    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36438    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36439    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36440    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36441      # Going to short mode and back again did indeed matter. Since short mode is
36442      # case insensitive, let's make it lowercase to improve readability.
36443      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36444      # Now convert it back to Unix-stile (cygpath)
36445      input_path=`$CYGPATH -u "$shortmode_path"`
36446      new_path="$input_path"
36447    fi
36448  fi
36449
36450  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36451  if test "x$test_cygdrive_prefix" = x; then
36452    # As a simple fix, exclude /usr/bin since it's not a real path.
36453    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36454      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36455      # a path prefixed by /cygdrive for fixpath to work.
36456      new_path="$CYGWIN_ROOT_PATH$input_path"
36457    fi
36458  fi
36459
36460  # remove trailing .exe if any
36461  new_path="${new_path/%.exe/}"
36462
36463  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36464
36465  # First separate the path from the arguments. This will split at the first
36466  # space.
36467  complete="$GNM"
36468  path="${complete%% *}"
36469  tmp="$complete EOL"
36470  arguments="${tmp#* }"
36471
36472  # Input might be given as Windows format, start by converting to
36473  # unix format.
36474  new_path="$path"
36475
36476  windows_path="$new_path"
36477  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36478    unix_path=`$CYGPATH -u "$windows_path"`
36479    new_path="$unix_path"
36480  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36481    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36482    new_path="$unix_path"
36483  fi
36484
36485
36486  # Now try to locate executable using which
36487  new_path=`$WHICH "$new_path" 2> /dev/null`
36488
36489  if test "x$new_path" = x; then
36490    # Oops. Which didn't find the executable.
36491    # The splitting of arguments from the executable at a space might have been incorrect,
36492    # since paths with space are more likely in Windows. Give it another try with the whole
36493    # argument.
36494    path="$complete"
36495    arguments="EOL"
36496    new_path="$path"
36497
36498  windows_path="$new_path"
36499  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36500    unix_path=`$CYGPATH -u "$windows_path"`
36501    new_path="$unix_path"
36502  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36503    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36504    new_path="$unix_path"
36505  fi
36506
36507
36508    new_path=`$WHICH "$new_path" 2> /dev/null`
36509    # bat and cmd files are not always considered executable in MSYS causing which
36510    # to not find them
36511    if test "x$new_path" = x \
36512        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36513        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36514      new_path="$path"
36515
36516  windows_path="$new_path"
36517  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36518    unix_path=`$CYGPATH -u "$windows_path"`
36519    new_path="$unix_path"
36520  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36521    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36522    new_path="$unix_path"
36523  fi
36524
36525    fi
36526
36527    if test "x$new_path" = x; then
36528      # It's still not found. Now this is an unrecoverable error.
36529      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36530$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36531      has_space=`$ECHO "$complete" | $GREP " "`
36532      if test "x$has_space" != x; then
36533        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36534$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36535      fi
36536      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36537    fi
36538  fi
36539
36540  # Now new_path has a complete unix path to the binary
36541  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36542    # Keep paths in /bin as-is, but remove trailing .exe if any
36543    new_path="${new_path/%.exe/}"
36544    # Do not save /bin paths to all_fixpath_prefixes!
36545  else
36546    # Not in mixed or Windows style, start by that.
36547    new_path=`cmd //c echo $new_path`
36548
36549  input_path="$new_path"
36550  # Check if we need to convert this using DOS-style short mode. If the path
36551  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36552  # take no chances and rewrite it.
36553  # Note: m4 eats our [], so we need to use [ and ] instead.
36554  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36555  if test "x$has_forbidden_chars" != x; then
36556    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36557    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36558  fi
36559
36560    # Output is in $new_path
36561
36562  windows_path="$new_path"
36563  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36564    unix_path=`$CYGPATH -u "$windows_path"`
36565    new_path="$unix_path"
36566  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36567    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36568    new_path="$unix_path"
36569  fi
36570
36571    # remove trailing .exe if any
36572    new_path="${new_path/%.exe/}"
36573
36574    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36575    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36576  fi
36577
36578  else
36579    # We're on a unix platform. Hooray! :)
36580    # First separate the path from the arguments. This will split at the first
36581    # space.
36582    complete="$GNM"
36583    path="${complete%% *}"
36584    tmp="$complete EOL"
36585    arguments="${tmp#* }"
36586
36587    # Cannot rely on the command "which" here since it doesn't always work.
36588    is_absolute_path=`$ECHO "$path" | $GREP ^/`
36589    if test -z "$is_absolute_path"; then
36590      # Path to executable is not absolute. Find it.
36591      IFS_save="$IFS"
36592      IFS=:
36593      for p in $PATH; do
36594        if test -f "$p/$path" && test -x "$p/$path"; then
36595          new_path="$p/$path"
36596          break
36597        fi
36598      done
36599      IFS="$IFS_save"
36600    else
36601      # This is an absolute path, we can use it without further modifications.
36602      new_path="$path"
36603    fi
36604
36605    if test "x$new_path" = x; then
36606      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36607$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36608      has_space=`$ECHO "$complete" | $GREP " "`
36609      if test "x$has_space" != x; then
36610        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36611$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36612      fi
36613      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36614    fi
36615  fi
36616
36617  # Now join together the path and the arguments once again
36618  if test "x$arguments" != xEOL; then
36619    new_complete="$new_path ${arguments% *}"
36620  else
36621    new_complete="$new_path"
36622  fi
36623
36624  if test "x$complete" != "x$new_complete"; then
36625    GNM="$new_complete"
36626    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
36627$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
36628  fi
36629
36630
36631
36632
36633  # Publish this variable in the help.
36634
36635
36636  if test "x$MCS" = x; then
36637    # The variable is not set by user, try to locate tool using the code snippet
36638    for ac_prog in mcs
36639do
36640  # Extract the first word of "$ac_prog", so it can be a program name with args.
36641set dummy $ac_prog; ac_word=$2
36642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36643$as_echo_n "checking for $ac_word... " >&6; }
36644if ${ac_cv_path_MCS+:} false; then :
36645  $as_echo_n "(cached) " >&6
36646else
36647  case $MCS in
36648  [\\/]* | ?:[\\/]*)
36649  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36650  ;;
36651  *)
36652  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36653for as_dir in $PATH
36654do
36655  IFS=$as_save_IFS
36656  test -z "$as_dir" && as_dir=.
36657    for ac_exec_ext in '' $ac_executable_extensions; do
36658  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36659    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36660    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36661    break 2
36662  fi
36663done
36664  done
36665IFS=$as_save_IFS
36666
36667  ;;
36668esac
36669fi
36670MCS=$ac_cv_path_MCS
36671if test -n "$MCS"; then
36672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36673$as_echo "$MCS" >&6; }
36674else
36675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36676$as_echo "no" >&6; }
36677fi
36678
36679
36680  test -n "$MCS" && break
36681done
36682
36683  else
36684    # The variable is set, but is it from the command line or the environment?
36685
36686    # Try to remove the string !MCS! from our list.
36687    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MCS!/}
36688    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36689      # If it failed, the variable was not from the command line. Ignore it,
36690      # but warn the user (except for BASH, which is always set by the calling BASH).
36691      if test "xMCS" != xBASH; then
36692        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&5
36693$as_echo "$as_me: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&2;}
36694      fi
36695      # Try to locate tool using the code snippet
36696      for ac_prog in mcs
36697do
36698  # Extract the first word of "$ac_prog", so it can be a program name with args.
36699set dummy $ac_prog; ac_word=$2
36700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36701$as_echo_n "checking for $ac_word... " >&6; }
36702if ${ac_cv_path_MCS+:} false; then :
36703  $as_echo_n "(cached) " >&6
36704else
36705  case $MCS in
36706  [\\/]* | ?:[\\/]*)
36707  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36708  ;;
36709  *)
36710  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36711for as_dir in $PATH
36712do
36713  IFS=$as_save_IFS
36714  test -z "$as_dir" && as_dir=.
36715    for ac_exec_ext in '' $ac_executable_extensions; do
36716  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36717    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36718    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36719    break 2
36720  fi
36721done
36722  done
36723IFS=$as_save_IFS
36724
36725  ;;
36726esac
36727fi
36728MCS=$ac_cv_path_MCS
36729if test -n "$MCS"; then
36730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36731$as_echo "$MCS" >&6; }
36732else
36733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36734$as_echo "no" >&6; }
36735fi
36736
36737
36738  test -n "$MCS" && break
36739done
36740
36741    else
36742      # If it succeeded, then it was overridden by the user. We will use it
36743      # for the tool.
36744
36745      # First remove it from the list of overridden variables, so we can test
36746      # for unknown variables in the end.
36747      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36748
36749      # Check if the provided tool contains a complete path.
36750      tool_specified="$MCS"
36751      tool_basename="${tool_specified##*/}"
36752      if test "x$tool_basename" = "x$tool_specified"; then
36753        # A command without a complete path is provided, search $PATH.
36754        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MCS=$tool_basename" >&5
36755$as_echo "$as_me: Will search for user supplied tool MCS=$tool_basename" >&6;}
36756        # Extract the first word of "$tool_basename", so it can be a program name with args.
36757set dummy $tool_basename; ac_word=$2
36758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36759$as_echo_n "checking for $ac_word... " >&6; }
36760if ${ac_cv_path_MCS+:} false; then :
36761  $as_echo_n "(cached) " >&6
36762else
36763  case $MCS in
36764  [\\/]* | ?:[\\/]*)
36765  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36766  ;;
36767  *)
36768  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36769for as_dir in $PATH
36770do
36771  IFS=$as_save_IFS
36772  test -z "$as_dir" && as_dir=.
36773    for ac_exec_ext in '' $ac_executable_extensions; do
36774  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36775    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36776    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36777    break 2
36778  fi
36779done
36780  done
36781IFS=$as_save_IFS
36782
36783  ;;
36784esac
36785fi
36786MCS=$ac_cv_path_MCS
36787if test -n "$MCS"; then
36788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36789$as_echo "$MCS" >&6; }
36790else
36791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36792$as_echo "no" >&6; }
36793fi
36794
36795
36796        if test "x$MCS" = x; then
36797          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36798        fi
36799      else
36800        # Otherwise we believe it is a complete path. Use it as it is.
36801        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MCS=$tool_specified" >&5
36802$as_echo "$as_me: Will use user supplied tool MCS=$tool_specified" >&6;}
36803        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MCS" >&5
36804$as_echo_n "checking for MCS... " >&6; }
36805        if test ! -x "$tool_specified"; then
36806          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36807$as_echo "not found" >&6; }
36808          as_fn_error $? "User supplied tool MCS=$tool_specified does not exist or is not executable" "$LINENO" 5
36809        fi
36810        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36811$as_echo "$tool_specified" >&6; }
36812      fi
36813    fi
36814  fi
36815
36816
36817
36818  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36819
36820  # First separate the path from the arguments. This will split at the first
36821  # space.
36822  complete="$MCS"
36823  path="${complete%% *}"
36824  tmp="$complete EOL"
36825  arguments="${tmp#* }"
36826
36827  # Input might be given as Windows format, start by converting to
36828  # unix format.
36829  new_path=`$CYGPATH -u "$path"`
36830
36831  # Now try to locate executable using which
36832  new_path=`$WHICH "$new_path" 2> /dev/null`
36833  # bat and cmd files are not always considered executable in cygwin causing which
36834  # to not find them
36835  if test "x$new_path" = x \
36836      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36837      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36838    new_path=`$CYGPATH -u "$path"`
36839  fi
36840  if test "x$new_path" = x; then
36841    # Oops. Which didn't find the executable.
36842    # The splitting of arguments from the executable at a space might have been incorrect,
36843    # since paths with space are more likely in Windows. Give it another try with the whole
36844    # argument.
36845    path="$complete"
36846    arguments="EOL"
36847    new_path=`$CYGPATH -u "$path"`
36848    new_path=`$WHICH "$new_path" 2> /dev/null`
36849    # bat and cmd files are not always considered executable in cygwin causing which
36850    # to not find them
36851    if test "x$new_path" = x \
36852        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36853        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36854      new_path=`$CYGPATH -u "$path"`
36855    fi
36856    if test "x$new_path" = x; then
36857      # It's still not found. Now this is an unrecoverable error.
36858      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36859$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36860      has_space=`$ECHO "$complete" | $GREP " "`
36861      if test "x$has_space" != x; then
36862        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36863$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36864      fi
36865      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36866    fi
36867  fi
36868
36869  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36870  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36871  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36872  # "foo.exe" is OK but "foo" is an error.
36873  #
36874  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36875  # It is also a way to make sure we got the proper file name for the real test later on.
36876  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36877  if test "x$test_shortpath" = x; then
36878    # Short path failed, file does not exist as specified.
36879    # Try adding .exe or .cmd
36880    if test -f "${new_path}.exe"; then
36881      input_to_shortpath="${new_path}.exe"
36882    elif test -f "${new_path}.cmd"; then
36883      input_to_shortpath="${new_path}.cmd"
36884    else
36885      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
36886$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
36887      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36888$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36889      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36890    fi
36891  else
36892    input_to_shortpath="$new_path"
36893  fi
36894
36895  # Call helper function which possibly converts this using DOS-style short mode.
36896  # If so, the updated path is stored in $new_path.
36897  new_path="$input_to_shortpath"
36898
36899  input_path="$input_to_shortpath"
36900  # Check if we need to convert this using DOS-style short mode. If the path
36901  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36902  # take no chances and rewrite it.
36903  # Note: m4 eats our [], so we need to use [ and ] instead.
36904  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36905  if test "x$has_forbidden_chars" != x; then
36906    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36907    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36908    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36909    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36910      # Going to short mode and back again did indeed matter. Since short mode is
36911      # case insensitive, let's make it lowercase to improve readability.
36912      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36913      # Now convert it back to Unix-stile (cygpath)
36914      input_path=`$CYGPATH -u "$shortmode_path"`
36915      new_path="$input_path"
36916    fi
36917  fi
36918
36919  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36920  if test "x$test_cygdrive_prefix" = x; then
36921    # As a simple fix, exclude /usr/bin since it's not a real path.
36922    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36923      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36924      # a path prefixed by /cygdrive for fixpath to work.
36925      new_path="$CYGWIN_ROOT_PATH$input_path"
36926    fi
36927  fi
36928
36929  # remove trailing .exe if any
36930  new_path="${new_path/%.exe/}"
36931
36932  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36933
36934  # First separate the path from the arguments. This will split at the first
36935  # space.
36936  complete="$MCS"
36937  path="${complete%% *}"
36938  tmp="$complete EOL"
36939  arguments="${tmp#* }"
36940
36941  # Input might be given as Windows format, start by converting to
36942  # unix format.
36943  new_path="$path"
36944
36945  windows_path="$new_path"
36946  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36947    unix_path=`$CYGPATH -u "$windows_path"`
36948    new_path="$unix_path"
36949  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36950    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36951    new_path="$unix_path"
36952  fi
36953
36954
36955  # Now try to locate executable using which
36956  new_path=`$WHICH "$new_path" 2> /dev/null`
36957
36958  if test "x$new_path" = x; then
36959    # Oops. Which didn't find the executable.
36960    # The splitting of arguments from the executable at a space might have been incorrect,
36961    # since paths with space are more likely in Windows. Give it another try with the whole
36962    # argument.
36963    path="$complete"
36964    arguments="EOL"
36965    new_path="$path"
36966
36967  windows_path="$new_path"
36968  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36969    unix_path=`$CYGPATH -u "$windows_path"`
36970    new_path="$unix_path"
36971  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36972    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36973    new_path="$unix_path"
36974  fi
36975
36976
36977    new_path=`$WHICH "$new_path" 2> /dev/null`
36978    # bat and cmd files are not always considered executable in MSYS causing which
36979    # to not find them
36980    if test "x$new_path" = x \
36981        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36982        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36983      new_path="$path"
36984
36985  windows_path="$new_path"
36986  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36987    unix_path=`$CYGPATH -u "$windows_path"`
36988    new_path="$unix_path"
36989  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36990    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36991    new_path="$unix_path"
36992  fi
36993
36994    fi
36995
36996    if test "x$new_path" = x; then
36997      # It's still not found. Now this is an unrecoverable error.
36998      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36999$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
37000      has_space=`$ECHO "$complete" | $GREP " "`
37001      if test "x$has_space" != x; then
37002        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37003$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37004      fi
37005      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
37006    fi
37007  fi
37008
37009  # Now new_path has a complete unix path to the binary
37010  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37011    # Keep paths in /bin as-is, but remove trailing .exe if any
37012    new_path="${new_path/%.exe/}"
37013    # Do not save /bin paths to all_fixpath_prefixes!
37014  else
37015    # Not in mixed or Windows style, start by that.
37016    new_path=`cmd //c echo $new_path`
37017
37018  input_path="$new_path"
37019  # Check if we need to convert this using DOS-style short mode. If the path
37020  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37021  # take no chances and rewrite it.
37022  # Note: m4 eats our [], so we need to use [ and ] instead.
37023  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37024  if test "x$has_forbidden_chars" != x; then
37025    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37026    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37027  fi
37028
37029    # Output is in $new_path
37030
37031  windows_path="$new_path"
37032  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37033    unix_path=`$CYGPATH -u "$windows_path"`
37034    new_path="$unix_path"
37035  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37036    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37037    new_path="$unix_path"
37038  fi
37039
37040    # remove trailing .exe if any
37041    new_path="${new_path/%.exe/}"
37042
37043    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37044    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37045  fi
37046
37047  else
37048    # We're on a unix platform. Hooray! :)
37049    # First separate the path from the arguments. This will split at the first
37050    # space.
37051    complete="$MCS"
37052    path="${complete%% *}"
37053    tmp="$complete EOL"
37054    arguments="${tmp#* }"
37055
37056    # Cannot rely on the command "which" here since it doesn't always work.
37057    is_absolute_path=`$ECHO "$path" | $GREP ^/`
37058    if test -z "$is_absolute_path"; then
37059      # Path to executable is not absolute. Find it.
37060      IFS_save="$IFS"
37061      IFS=:
37062      for p in $PATH; do
37063        if test -f "$p/$path" && test -x "$p/$path"; then
37064          new_path="$p/$path"
37065          break
37066        fi
37067      done
37068      IFS="$IFS_save"
37069    else
37070      # This is an absolute path, we can use it without further modifications.
37071      new_path="$path"
37072    fi
37073
37074    if test "x$new_path" = x; then
37075      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
37076$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
37077      has_space=`$ECHO "$complete" | $GREP " "`
37078      if test "x$has_space" != x; then
37079        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37080$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37081      fi
37082      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
37083    fi
37084  fi
37085
37086  # Now join together the path and the arguments once again
37087  if test "x$arguments" != xEOL; then
37088    new_complete="$new_path ${arguments% *}"
37089  else
37090    new_complete="$new_path"
37091  fi
37092
37093  if test "x$complete" != "x$new_complete"; then
37094    MCS="$new_complete"
37095    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
37096$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
37097  fi
37098
37099  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
37100    # FIXME: we should unify this with the solaris case above.
37101
37102
37103  # Publish this variable in the help.
37104
37105
37106  if test "x$STRIP" = x; then
37107    # The variable is not set by user, try to locate tool using the code snippet
37108    if test -n "$ac_tool_prefix"; then
37109  for ac_prog in strip
37110  do
37111    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37112set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37114$as_echo_n "checking for $ac_word... " >&6; }
37115if ${ac_cv_prog_STRIP+:} false; then :
37116  $as_echo_n "(cached) " >&6
37117else
37118  if test -n "$STRIP"; then
37119  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
37120else
37121as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37122for as_dir in $PATH
37123do
37124  IFS=$as_save_IFS
37125  test -z "$as_dir" && as_dir=.
37126    for ac_exec_ext in '' $ac_executable_extensions; do
37127  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37128    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
37129    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37130    break 2
37131  fi
37132done
37133  done
37134IFS=$as_save_IFS
37135
37136fi
37137fi
37138STRIP=$ac_cv_prog_STRIP
37139if test -n "$STRIP"; then
37140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37141$as_echo "$STRIP" >&6; }
37142else
37143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37144$as_echo "no" >&6; }
37145fi
37146
37147
37148    test -n "$STRIP" && break
37149  done
37150fi
37151if test -z "$STRIP"; then
37152  ac_ct_STRIP=$STRIP
37153  for ac_prog in strip
37154do
37155  # Extract the first word of "$ac_prog", so it can be a program name with args.
37156set dummy $ac_prog; ac_word=$2
37157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37158$as_echo_n "checking for $ac_word... " >&6; }
37159if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
37160  $as_echo_n "(cached) " >&6
37161else
37162  if test -n "$ac_ct_STRIP"; then
37163  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
37164else
37165as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37166for as_dir in $PATH
37167do
37168  IFS=$as_save_IFS
37169  test -z "$as_dir" && as_dir=.
37170    for ac_exec_ext in '' $ac_executable_extensions; do
37171  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37172    ac_cv_prog_ac_ct_STRIP="$ac_prog"
37173    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37174    break 2
37175  fi
37176done
37177  done
37178IFS=$as_save_IFS
37179
37180fi
37181fi
37182ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
37183if test -n "$ac_ct_STRIP"; then
37184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
37185$as_echo "$ac_ct_STRIP" >&6; }
37186else
37187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37188$as_echo "no" >&6; }
37189fi
37190
37191
37192  test -n "$ac_ct_STRIP" && break
37193done
37194
37195  if test "x$ac_ct_STRIP" = x; then
37196    STRIP=""
37197  else
37198    case $cross_compiling:$ac_tool_warned in
37199yes:)
37200{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37201$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37202ac_tool_warned=yes ;;
37203esac
37204    STRIP=$ac_ct_STRIP
37205  fi
37206fi
37207
37208  else
37209    # The variable is set, but is it from the command line or the environment?
37210
37211    # Try to remove the string !STRIP! from our list.
37212    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
37213    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37214      # If it failed, the variable was not from the command line. Ignore it,
37215      # but warn the user (except for BASH, which is always set by the calling BASH).
37216      if test "xSTRIP" != xBASH; then
37217        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
37218$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
37219      fi
37220      # Try to locate tool using the code snippet
37221      if test -n "$ac_tool_prefix"; then
37222  for ac_prog in strip
37223  do
37224    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37225set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37227$as_echo_n "checking for $ac_word... " >&6; }
37228if ${ac_cv_prog_STRIP+:} false; then :
37229  $as_echo_n "(cached) " >&6
37230else
37231  if test -n "$STRIP"; then
37232  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
37233else
37234as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37235for as_dir in $PATH
37236do
37237  IFS=$as_save_IFS
37238  test -z "$as_dir" && as_dir=.
37239    for ac_exec_ext in '' $ac_executable_extensions; do
37240  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37241    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
37242    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37243    break 2
37244  fi
37245done
37246  done
37247IFS=$as_save_IFS
37248
37249fi
37250fi
37251STRIP=$ac_cv_prog_STRIP
37252if test -n "$STRIP"; then
37253  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37254$as_echo "$STRIP" >&6; }
37255else
37256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37257$as_echo "no" >&6; }
37258fi
37259
37260
37261    test -n "$STRIP" && break
37262  done
37263fi
37264if test -z "$STRIP"; then
37265  ac_ct_STRIP=$STRIP
37266  for ac_prog in strip
37267do
37268  # Extract the first word of "$ac_prog", so it can be a program name with args.
37269set dummy $ac_prog; ac_word=$2
37270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37271$as_echo_n "checking for $ac_word... " >&6; }
37272if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
37273  $as_echo_n "(cached) " >&6
37274else
37275  if test -n "$ac_ct_STRIP"; then
37276  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
37277else
37278as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37279for as_dir in $PATH
37280do
37281  IFS=$as_save_IFS
37282  test -z "$as_dir" && as_dir=.
37283    for ac_exec_ext in '' $ac_executable_extensions; do
37284  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37285    ac_cv_prog_ac_ct_STRIP="$ac_prog"
37286    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37287    break 2
37288  fi
37289done
37290  done
37291IFS=$as_save_IFS
37292
37293fi
37294fi
37295ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
37296if test -n "$ac_ct_STRIP"; then
37297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
37298$as_echo "$ac_ct_STRIP" >&6; }
37299else
37300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37301$as_echo "no" >&6; }
37302fi
37303
37304
37305  test -n "$ac_ct_STRIP" && break
37306done
37307
37308  if test "x$ac_ct_STRIP" = x; then
37309    STRIP=""
37310  else
37311    case $cross_compiling:$ac_tool_warned in
37312yes:)
37313{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37314$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37315ac_tool_warned=yes ;;
37316esac
37317    STRIP=$ac_ct_STRIP
37318  fi
37319fi
37320
37321    else
37322      # If it succeeded, then it was overridden by the user. We will use it
37323      # for the tool.
37324
37325      # First remove it from the list of overridden variables, so we can test
37326      # for unknown variables in the end.
37327      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37328
37329      # Check if the provided tool contains a complete path.
37330      tool_specified="$STRIP"
37331      tool_basename="${tool_specified##*/}"
37332      if test "x$tool_basename" = "x$tool_specified"; then
37333        # A command without a complete path is provided, search $PATH.
37334        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
37335$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
37336        # Extract the first word of "$tool_basename", so it can be a program name with args.
37337set dummy $tool_basename; ac_word=$2
37338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37339$as_echo_n "checking for $ac_word... " >&6; }
37340if ${ac_cv_path_STRIP+:} false; then :
37341  $as_echo_n "(cached) " >&6
37342else
37343  case $STRIP in
37344  [\\/]* | ?:[\\/]*)
37345  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
37346  ;;
37347  *)
37348  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37349for as_dir in $PATH
37350do
37351  IFS=$as_save_IFS
37352  test -z "$as_dir" && as_dir=.
37353    for ac_exec_ext in '' $ac_executable_extensions; do
37354  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37355    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
37356    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37357    break 2
37358  fi
37359done
37360  done
37361IFS=$as_save_IFS
37362
37363  ;;
37364esac
37365fi
37366STRIP=$ac_cv_path_STRIP
37367if test -n "$STRIP"; then
37368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37369$as_echo "$STRIP" >&6; }
37370else
37371  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37372$as_echo "no" >&6; }
37373fi
37374
37375
37376        if test "x$STRIP" = x; then
37377          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37378        fi
37379      else
37380        # Otherwise we believe it is a complete path. Use it as it is.
37381        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
37382$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
37383        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
37384$as_echo_n "checking for STRIP... " >&6; }
37385        if test ! -x "$tool_specified"; then
37386          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37387$as_echo "not found" >&6; }
37388          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
37389        fi
37390        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37391$as_echo "$tool_specified" >&6; }
37392      fi
37393    fi
37394  fi
37395
37396
37397
37398  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37399
37400  # First separate the path from the arguments. This will split at the first
37401  # space.
37402  complete="$STRIP"
37403  path="${complete%% *}"
37404  tmp="$complete EOL"
37405  arguments="${tmp#* }"
37406
37407  # Input might be given as Windows format, start by converting to
37408  # unix format.
37409  new_path=`$CYGPATH -u "$path"`
37410
37411  # Now try to locate executable using which
37412  new_path=`$WHICH "$new_path" 2> /dev/null`
37413  # bat and cmd files are not always considered executable in cygwin causing which
37414  # to not find them
37415  if test "x$new_path" = x \
37416      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37417      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37418    new_path=`$CYGPATH -u "$path"`
37419  fi
37420  if test "x$new_path" = x; then
37421    # Oops. Which didn't find the executable.
37422    # The splitting of arguments from the executable at a space might have been incorrect,
37423    # since paths with space are more likely in Windows. Give it another try with the whole
37424    # argument.
37425    path="$complete"
37426    arguments="EOL"
37427    new_path=`$CYGPATH -u "$path"`
37428    new_path=`$WHICH "$new_path" 2> /dev/null`
37429    # bat and cmd files are not always considered executable in cygwin causing which
37430    # to not find them
37431    if test "x$new_path" = x \
37432        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37433        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37434      new_path=`$CYGPATH -u "$path"`
37435    fi
37436    if test "x$new_path" = x; then
37437      # It's still not found. Now this is an unrecoverable error.
37438      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37439$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37440      has_space=`$ECHO "$complete" | $GREP " "`
37441      if test "x$has_space" != x; then
37442        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37443$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37444      fi
37445      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37446    fi
37447  fi
37448
37449  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37450  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37451  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37452  # "foo.exe" is OK but "foo" is an error.
37453  #
37454  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37455  # It is also a way to make sure we got the proper file name for the real test later on.
37456  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37457  if test "x$test_shortpath" = x; then
37458    # Short path failed, file does not exist as specified.
37459    # Try adding .exe or .cmd
37460    if test -f "${new_path}.exe"; then
37461      input_to_shortpath="${new_path}.exe"
37462    elif test -f "${new_path}.cmd"; then
37463      input_to_shortpath="${new_path}.cmd"
37464    else
37465      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
37466$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
37467      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37468$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37469      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37470    fi
37471  else
37472    input_to_shortpath="$new_path"
37473  fi
37474
37475  # Call helper function which possibly converts this using DOS-style short mode.
37476  # If so, the updated path is stored in $new_path.
37477  new_path="$input_to_shortpath"
37478
37479  input_path="$input_to_shortpath"
37480  # Check if we need to convert this using DOS-style short mode. If the path
37481  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37482  # take no chances and rewrite it.
37483  # Note: m4 eats our [], so we need to use [ and ] instead.
37484  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37485  if test "x$has_forbidden_chars" != x; then
37486    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37487    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37488    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37489    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37490      # Going to short mode and back again did indeed matter. Since short mode is
37491      # case insensitive, let's make it lowercase to improve readability.
37492      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37493      # Now convert it back to Unix-stile (cygpath)
37494      input_path=`$CYGPATH -u "$shortmode_path"`
37495      new_path="$input_path"
37496    fi
37497  fi
37498
37499  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37500  if test "x$test_cygdrive_prefix" = x; then
37501    # As a simple fix, exclude /usr/bin since it's not a real path.
37502    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37503      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37504      # a path prefixed by /cygdrive for fixpath to work.
37505      new_path="$CYGWIN_ROOT_PATH$input_path"
37506    fi
37507  fi
37508
37509  # remove trailing .exe if any
37510  new_path="${new_path/%.exe/}"
37511
37512  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37513
37514  # First separate the path from the arguments. This will split at the first
37515  # space.
37516  complete="$STRIP"
37517  path="${complete%% *}"
37518  tmp="$complete EOL"
37519  arguments="${tmp#* }"
37520
37521  # Input might be given as Windows format, start by converting to
37522  # unix format.
37523  new_path="$path"
37524
37525  windows_path="$new_path"
37526  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37527    unix_path=`$CYGPATH -u "$windows_path"`
37528    new_path="$unix_path"
37529  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37530    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37531    new_path="$unix_path"
37532  fi
37533
37534
37535  # Now try to locate executable using which
37536  new_path=`$WHICH "$new_path" 2> /dev/null`
37537
37538  if test "x$new_path" = x; then
37539    # Oops. Which didn't find the executable.
37540    # The splitting of arguments from the executable at a space might have been incorrect,
37541    # since paths with space are more likely in Windows. Give it another try with the whole
37542    # argument.
37543    path="$complete"
37544    arguments="EOL"
37545    new_path="$path"
37546
37547  windows_path="$new_path"
37548  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37549    unix_path=`$CYGPATH -u "$windows_path"`
37550    new_path="$unix_path"
37551  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37552    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37553    new_path="$unix_path"
37554  fi
37555
37556
37557    new_path=`$WHICH "$new_path" 2> /dev/null`
37558    # bat and cmd files are not always considered executable in MSYS causing which
37559    # to not find them
37560    if test "x$new_path" = x \
37561        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37562        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37563      new_path="$path"
37564
37565  windows_path="$new_path"
37566  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37567    unix_path=`$CYGPATH -u "$windows_path"`
37568    new_path="$unix_path"
37569  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37570    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37571    new_path="$unix_path"
37572  fi
37573
37574    fi
37575
37576    if test "x$new_path" = x; then
37577      # It's still not found. Now this is an unrecoverable error.
37578      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37579$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37580      has_space=`$ECHO "$complete" | $GREP " "`
37581      if test "x$has_space" != x; then
37582        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37583$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37584      fi
37585      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37586    fi
37587  fi
37588
37589  # Now new_path has a complete unix path to the binary
37590  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37591    # Keep paths in /bin as-is, but remove trailing .exe if any
37592    new_path="${new_path/%.exe/}"
37593    # Do not save /bin paths to all_fixpath_prefixes!
37594  else
37595    # Not in mixed or Windows style, start by that.
37596    new_path=`cmd //c echo $new_path`
37597
37598  input_path="$new_path"
37599  # Check if we need to convert this using DOS-style short mode. If the path
37600  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37601  # take no chances and rewrite it.
37602  # Note: m4 eats our [], so we need to use [ and ] instead.
37603  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37604  if test "x$has_forbidden_chars" != x; then
37605    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37606    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37607  fi
37608
37609    # Output is in $new_path
37610
37611  windows_path="$new_path"
37612  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37613    unix_path=`$CYGPATH -u "$windows_path"`
37614    new_path="$unix_path"
37615  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37616    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37617    new_path="$unix_path"
37618  fi
37619
37620    # remove trailing .exe if any
37621    new_path="${new_path/%.exe/}"
37622
37623    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37624    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37625  fi
37626
37627  else
37628    # We're on a unix platform. Hooray! :)
37629    # First separate the path from the arguments. This will split at the first
37630    # space.
37631    complete="$STRIP"
37632    path="${complete%% *}"
37633    tmp="$complete EOL"
37634    arguments="${tmp#* }"
37635
37636    # Cannot rely on the command "which" here since it doesn't always work.
37637    is_absolute_path=`$ECHO "$path" | $GREP ^/`
37638    if test -z "$is_absolute_path"; then
37639      # Path to executable is not absolute. Find it.
37640      IFS_save="$IFS"
37641      IFS=:
37642      for p in $PATH; do
37643        if test -f "$p/$path" && test -x "$p/$path"; then
37644          new_path="$p/$path"
37645          break
37646        fi
37647      done
37648      IFS="$IFS_save"
37649    else
37650      # This is an absolute path, we can use it without further modifications.
37651      new_path="$path"
37652    fi
37653
37654    if test "x$new_path" = x; then
37655      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37656$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37657      has_space=`$ECHO "$complete" | $GREP " "`
37658      if test "x$has_space" != x; then
37659        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37660$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37661      fi
37662      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37663    fi
37664  fi
37665
37666  # Now join together the path and the arguments once again
37667  if test "x$arguments" != xEOL; then
37668    new_complete="$new_path ${arguments% *}"
37669  else
37670    new_complete="$new_path"
37671  fi
37672
37673  if test "x$complete" != "x$new_complete"; then
37674    STRIP="$new_complete"
37675    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
37676$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
37677  fi
37678
37679
37680
37681  # Publish this variable in the help.
37682
37683
37684  if test "x$NM" = x; then
37685    # The variable is not set by user, try to locate tool using the code snippet
37686    if test -n "$ac_tool_prefix"; then
37687  for ac_prog in nm
37688  do
37689    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37690set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37692$as_echo_n "checking for $ac_word... " >&6; }
37693if ${ac_cv_prog_NM+:} false; then :
37694  $as_echo_n "(cached) " >&6
37695else
37696  if test -n "$NM"; then
37697  ac_cv_prog_NM="$NM" # Let the user override the test.
37698else
37699as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37700for as_dir in $PATH
37701do
37702  IFS=$as_save_IFS
37703  test -z "$as_dir" && as_dir=.
37704    for ac_exec_ext in '' $ac_executable_extensions; do
37705  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37706    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37707    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37708    break 2
37709  fi
37710done
37711  done
37712IFS=$as_save_IFS
37713
37714fi
37715fi
37716NM=$ac_cv_prog_NM
37717if test -n "$NM"; then
37718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37719$as_echo "$NM" >&6; }
37720else
37721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37722$as_echo "no" >&6; }
37723fi
37724
37725
37726    test -n "$NM" && break
37727  done
37728fi
37729if test -z "$NM"; then
37730  ac_ct_NM=$NM
37731  for ac_prog in nm
37732do
37733  # Extract the first word of "$ac_prog", so it can be a program name with args.
37734set dummy $ac_prog; ac_word=$2
37735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37736$as_echo_n "checking for $ac_word... " >&6; }
37737if ${ac_cv_prog_ac_ct_NM+:} false; then :
37738  $as_echo_n "(cached) " >&6
37739else
37740  if test -n "$ac_ct_NM"; then
37741  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37742else
37743as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37744for as_dir in $PATH
37745do
37746  IFS=$as_save_IFS
37747  test -z "$as_dir" && as_dir=.
37748    for ac_exec_ext in '' $ac_executable_extensions; do
37749  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37750    ac_cv_prog_ac_ct_NM="$ac_prog"
37751    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37752    break 2
37753  fi
37754done
37755  done
37756IFS=$as_save_IFS
37757
37758fi
37759fi
37760ac_ct_NM=$ac_cv_prog_ac_ct_NM
37761if test -n "$ac_ct_NM"; then
37762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37763$as_echo "$ac_ct_NM" >&6; }
37764else
37765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37766$as_echo "no" >&6; }
37767fi
37768
37769
37770  test -n "$ac_ct_NM" && break
37771done
37772
37773  if test "x$ac_ct_NM" = x; then
37774    NM=""
37775  else
37776    case $cross_compiling:$ac_tool_warned in
37777yes:)
37778{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37779$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37780ac_tool_warned=yes ;;
37781esac
37782    NM=$ac_ct_NM
37783  fi
37784fi
37785
37786  else
37787    # The variable is set, but is it from the command line or the environment?
37788
37789    # Try to remove the string !NM! from our list.
37790    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
37791    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37792      # If it failed, the variable was not from the command line. Ignore it,
37793      # but warn the user (except for BASH, which is always set by the calling BASH).
37794      if test "xNM" != xBASH; then
37795        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
37796$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
37797      fi
37798      # Try to locate tool using the code snippet
37799      if test -n "$ac_tool_prefix"; then
37800  for ac_prog in nm
37801  do
37802    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37803set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37805$as_echo_n "checking for $ac_word... " >&6; }
37806if ${ac_cv_prog_NM+:} false; then :
37807  $as_echo_n "(cached) " >&6
37808else
37809  if test -n "$NM"; then
37810  ac_cv_prog_NM="$NM" # Let the user override the test.
37811else
37812as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37813for as_dir in $PATH
37814do
37815  IFS=$as_save_IFS
37816  test -z "$as_dir" && as_dir=.
37817    for ac_exec_ext in '' $ac_executable_extensions; do
37818  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37819    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37820    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37821    break 2
37822  fi
37823done
37824  done
37825IFS=$as_save_IFS
37826
37827fi
37828fi
37829NM=$ac_cv_prog_NM
37830if test -n "$NM"; then
37831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37832$as_echo "$NM" >&6; }
37833else
37834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37835$as_echo "no" >&6; }
37836fi
37837
37838
37839    test -n "$NM" && break
37840  done
37841fi
37842if test -z "$NM"; then
37843  ac_ct_NM=$NM
37844  for ac_prog in nm
37845do
37846  # Extract the first word of "$ac_prog", so it can be a program name with args.
37847set dummy $ac_prog; ac_word=$2
37848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37849$as_echo_n "checking for $ac_word... " >&6; }
37850if ${ac_cv_prog_ac_ct_NM+:} false; then :
37851  $as_echo_n "(cached) " >&6
37852else
37853  if test -n "$ac_ct_NM"; then
37854  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37855else
37856as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37857for as_dir in $PATH
37858do
37859  IFS=$as_save_IFS
37860  test -z "$as_dir" && as_dir=.
37861    for ac_exec_ext in '' $ac_executable_extensions; do
37862  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37863    ac_cv_prog_ac_ct_NM="$ac_prog"
37864    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37865    break 2
37866  fi
37867done
37868  done
37869IFS=$as_save_IFS
37870
37871fi
37872fi
37873ac_ct_NM=$ac_cv_prog_ac_ct_NM
37874if test -n "$ac_ct_NM"; then
37875  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37876$as_echo "$ac_ct_NM" >&6; }
37877else
37878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37879$as_echo "no" >&6; }
37880fi
37881
37882
37883  test -n "$ac_ct_NM" && break
37884done
37885
37886  if test "x$ac_ct_NM" = x; then
37887    NM=""
37888  else
37889    case $cross_compiling:$ac_tool_warned in
37890yes:)
37891{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37892$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37893ac_tool_warned=yes ;;
37894esac
37895    NM=$ac_ct_NM
37896  fi
37897fi
37898
37899    else
37900      # If it succeeded, then it was overridden by the user. We will use it
37901      # for the tool.
37902
37903      # First remove it from the list of overridden variables, so we can test
37904      # for unknown variables in the end.
37905      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37906
37907      # Check if the provided tool contains a complete path.
37908      tool_specified="$NM"
37909      tool_basename="${tool_specified##*/}"
37910      if test "x$tool_basename" = "x$tool_specified"; then
37911        # A command without a complete path is provided, search $PATH.
37912        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
37913$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
37914        # Extract the first word of "$tool_basename", so it can be a program name with args.
37915set dummy $tool_basename; ac_word=$2
37916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37917$as_echo_n "checking for $ac_word... " >&6; }
37918if ${ac_cv_path_NM+:} false; then :
37919  $as_echo_n "(cached) " >&6
37920else
37921  case $NM in
37922  [\\/]* | ?:[\\/]*)
37923  ac_cv_path_NM="$NM" # Let the user override the test with a path.
37924  ;;
37925  *)
37926  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37927for as_dir in $PATH
37928do
37929  IFS=$as_save_IFS
37930  test -z "$as_dir" && as_dir=.
37931    for ac_exec_ext in '' $ac_executable_extensions; do
37932  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37933    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
37934    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37935    break 2
37936  fi
37937done
37938  done
37939IFS=$as_save_IFS
37940
37941  ;;
37942esac
37943fi
37944NM=$ac_cv_path_NM
37945if test -n "$NM"; then
37946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37947$as_echo "$NM" >&6; }
37948else
37949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37950$as_echo "no" >&6; }
37951fi
37952
37953
37954        if test "x$NM" = x; then
37955          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37956        fi
37957      else
37958        # Otherwise we believe it is a complete path. Use it as it is.
37959        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
37960$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
37961        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
37962$as_echo_n "checking for NM... " >&6; }
37963        if test ! -x "$tool_specified"; then
37964          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37965$as_echo "not found" >&6; }
37966          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
37967        fi
37968        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37969$as_echo "$tool_specified" >&6; }
37970      fi
37971    fi
37972  fi
37973
37974
37975
37976  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37977
37978  # First separate the path from the arguments. This will split at the first
37979  # space.
37980  complete="$NM"
37981  path="${complete%% *}"
37982  tmp="$complete EOL"
37983  arguments="${tmp#* }"
37984
37985  # Input might be given as Windows format, start by converting to
37986  # unix format.
37987  new_path=`$CYGPATH -u "$path"`
37988
37989  # Now try to locate executable using which
37990  new_path=`$WHICH "$new_path" 2> /dev/null`
37991  # bat and cmd files are not always considered executable in cygwin causing which
37992  # to not find them
37993  if test "x$new_path" = x \
37994      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37995      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37996    new_path=`$CYGPATH -u "$path"`
37997  fi
37998  if test "x$new_path" = x; then
37999    # Oops. Which didn't find the executable.
38000    # The splitting of arguments from the executable at a space might have been incorrect,
38001    # since paths with space are more likely in Windows. Give it another try with the whole
38002    # argument.
38003    path="$complete"
38004    arguments="EOL"
38005    new_path=`$CYGPATH -u "$path"`
38006    new_path=`$WHICH "$new_path" 2> /dev/null`
38007    # bat and cmd files are not always considered executable in cygwin causing which
38008    # to not find them
38009    if test "x$new_path" = x \
38010        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38011        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38012      new_path=`$CYGPATH -u "$path"`
38013    fi
38014    if test "x$new_path" = x; then
38015      # It's still not found. Now this is an unrecoverable error.
38016      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38017$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38018      has_space=`$ECHO "$complete" | $GREP " "`
38019      if test "x$has_space" != x; then
38020        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38021$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38022      fi
38023      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38024    fi
38025  fi
38026
38027  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38028  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38029  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38030  # "foo.exe" is OK but "foo" is an error.
38031  #
38032  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38033  # It is also a way to make sure we got the proper file name for the real test later on.
38034  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38035  if test "x$test_shortpath" = x; then
38036    # Short path failed, file does not exist as specified.
38037    # Try adding .exe or .cmd
38038    if test -f "${new_path}.exe"; then
38039      input_to_shortpath="${new_path}.exe"
38040    elif test -f "${new_path}.cmd"; then
38041      input_to_shortpath="${new_path}.cmd"
38042    else
38043      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
38044$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
38045      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38046$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38047      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38048    fi
38049  else
38050    input_to_shortpath="$new_path"
38051  fi
38052
38053  # Call helper function which possibly converts this using DOS-style short mode.
38054  # If so, the updated path is stored in $new_path.
38055  new_path="$input_to_shortpath"
38056
38057  input_path="$input_to_shortpath"
38058  # Check if we need to convert this using DOS-style short mode. If the path
38059  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38060  # take no chances and rewrite it.
38061  # Note: m4 eats our [], so we need to use [ and ] instead.
38062  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38063  if test "x$has_forbidden_chars" != x; then
38064    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38065    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38066    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38067    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38068      # Going to short mode and back again did indeed matter. Since short mode is
38069      # case insensitive, let's make it lowercase to improve readability.
38070      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38071      # Now convert it back to Unix-stile (cygpath)
38072      input_path=`$CYGPATH -u "$shortmode_path"`
38073      new_path="$input_path"
38074    fi
38075  fi
38076
38077  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38078  if test "x$test_cygdrive_prefix" = x; then
38079    # As a simple fix, exclude /usr/bin since it's not a real path.
38080    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38081      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38082      # a path prefixed by /cygdrive for fixpath to work.
38083      new_path="$CYGWIN_ROOT_PATH$input_path"
38084    fi
38085  fi
38086
38087  # remove trailing .exe if any
38088  new_path="${new_path/%.exe/}"
38089
38090  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38091
38092  # First separate the path from the arguments. This will split at the first
38093  # space.
38094  complete="$NM"
38095  path="${complete%% *}"
38096  tmp="$complete EOL"
38097  arguments="${tmp#* }"
38098
38099  # Input might be given as Windows format, start by converting to
38100  # unix format.
38101  new_path="$path"
38102
38103  windows_path="$new_path"
38104  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38105    unix_path=`$CYGPATH -u "$windows_path"`
38106    new_path="$unix_path"
38107  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38108    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38109    new_path="$unix_path"
38110  fi
38111
38112
38113  # Now try to locate executable using which
38114  new_path=`$WHICH "$new_path" 2> /dev/null`
38115
38116  if test "x$new_path" = x; then
38117    # Oops. Which didn't find the executable.
38118    # The splitting of arguments from the executable at a space might have been incorrect,
38119    # since paths with space are more likely in Windows. Give it another try with the whole
38120    # argument.
38121    path="$complete"
38122    arguments="EOL"
38123    new_path="$path"
38124
38125  windows_path="$new_path"
38126  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38127    unix_path=`$CYGPATH -u "$windows_path"`
38128    new_path="$unix_path"
38129  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38130    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38131    new_path="$unix_path"
38132  fi
38133
38134
38135    new_path=`$WHICH "$new_path" 2> /dev/null`
38136    # bat and cmd files are not always considered executable in MSYS causing which
38137    # to not find them
38138    if test "x$new_path" = x \
38139        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38140        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38141      new_path="$path"
38142
38143  windows_path="$new_path"
38144  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38145    unix_path=`$CYGPATH -u "$windows_path"`
38146    new_path="$unix_path"
38147  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38148    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38149    new_path="$unix_path"
38150  fi
38151
38152    fi
38153
38154    if test "x$new_path" = x; then
38155      # It's still not found. Now this is an unrecoverable error.
38156      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38157$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38158      has_space=`$ECHO "$complete" | $GREP " "`
38159      if test "x$has_space" != x; then
38160        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38161$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38162      fi
38163      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38164    fi
38165  fi
38166
38167  # Now new_path has a complete unix path to the binary
38168  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38169    # Keep paths in /bin as-is, but remove trailing .exe if any
38170    new_path="${new_path/%.exe/}"
38171    # Do not save /bin paths to all_fixpath_prefixes!
38172  else
38173    # Not in mixed or Windows style, start by that.
38174    new_path=`cmd //c echo $new_path`
38175
38176  input_path="$new_path"
38177  # Check if we need to convert this using DOS-style short mode. If the path
38178  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38179  # take no chances and rewrite it.
38180  # Note: m4 eats our [], so we need to use [ and ] instead.
38181  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38182  if test "x$has_forbidden_chars" != x; then
38183    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38184    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38185  fi
38186
38187    # Output is in $new_path
38188
38189  windows_path="$new_path"
38190  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38191    unix_path=`$CYGPATH -u "$windows_path"`
38192    new_path="$unix_path"
38193  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38194    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38195    new_path="$unix_path"
38196  fi
38197
38198    # remove trailing .exe if any
38199    new_path="${new_path/%.exe/}"
38200
38201    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38202    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38203  fi
38204
38205  else
38206    # We're on a unix platform. Hooray! :)
38207    # First separate the path from the arguments. This will split at the first
38208    # space.
38209    complete="$NM"
38210    path="${complete%% *}"
38211    tmp="$complete EOL"
38212    arguments="${tmp#* }"
38213
38214    # Cannot rely on the command "which" here since it doesn't always work.
38215    is_absolute_path=`$ECHO "$path" | $GREP ^/`
38216    if test -z "$is_absolute_path"; then
38217      # Path to executable is not absolute. Find it.
38218      IFS_save="$IFS"
38219      IFS=:
38220      for p in $PATH; do
38221        if test -f "$p/$path" && test -x "$p/$path"; then
38222          new_path="$p/$path"
38223          break
38224        fi
38225      done
38226      IFS="$IFS_save"
38227    else
38228      # This is an absolute path, we can use it without further modifications.
38229      new_path="$path"
38230    fi
38231
38232    if test "x$new_path" = x; then
38233      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38234$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38235      has_space=`$ECHO "$complete" | $GREP " "`
38236      if test "x$has_space" != x; then
38237        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38238$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38239      fi
38240      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38241    fi
38242  fi
38243
38244  # Now join together the path and the arguments once again
38245  if test "x$arguments" != xEOL; then
38246    new_complete="$new_path ${arguments% *}"
38247  else
38248    new_complete="$new_path"
38249  fi
38250
38251  if test "x$complete" != "x$new_complete"; then
38252    NM="$new_complete"
38253    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
38254$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
38255  fi
38256
38257    GNM="$NM"
38258
38259  fi
38260
38261  # objcopy is used for moving debug symbols to separate files when
38262  # full debug symbols are enabled.
38263  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
38264
38265
38266  # Publish this variable in the help.
38267
38268
38269  if test "x$OBJCOPY" = x; then
38270    # The variable is not set by user, try to locate tool using the code snippet
38271    if test -n "$ac_tool_prefix"; then
38272  for ac_prog in gobjcopy objcopy
38273  do
38274    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38275set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38277$as_echo_n "checking for $ac_word... " >&6; }
38278if ${ac_cv_prog_OBJCOPY+:} false; then :
38279  $as_echo_n "(cached) " >&6
38280else
38281  if test -n "$OBJCOPY"; then
38282  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
38283else
38284as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38285for as_dir in $PATH
38286do
38287  IFS=$as_save_IFS
38288  test -z "$as_dir" && as_dir=.
38289    for ac_exec_ext in '' $ac_executable_extensions; do
38290  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38291    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
38292    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38293    break 2
38294  fi
38295done
38296  done
38297IFS=$as_save_IFS
38298
38299fi
38300fi
38301OBJCOPY=$ac_cv_prog_OBJCOPY
38302if test -n "$OBJCOPY"; then
38303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38304$as_echo "$OBJCOPY" >&6; }
38305else
38306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38307$as_echo "no" >&6; }
38308fi
38309
38310
38311    test -n "$OBJCOPY" && break
38312  done
38313fi
38314if test -z "$OBJCOPY"; then
38315  ac_ct_OBJCOPY=$OBJCOPY
38316  for ac_prog in gobjcopy objcopy
38317do
38318  # Extract the first word of "$ac_prog", so it can be a program name with args.
38319set dummy $ac_prog; ac_word=$2
38320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38321$as_echo_n "checking for $ac_word... " >&6; }
38322if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
38323  $as_echo_n "(cached) " >&6
38324else
38325  if test -n "$ac_ct_OBJCOPY"; then
38326  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
38327else
38328as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38329for as_dir in $PATH
38330do
38331  IFS=$as_save_IFS
38332  test -z "$as_dir" && as_dir=.
38333    for ac_exec_ext in '' $ac_executable_extensions; do
38334  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38335    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
38336    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38337    break 2
38338  fi
38339done
38340  done
38341IFS=$as_save_IFS
38342
38343fi
38344fi
38345ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
38346if test -n "$ac_ct_OBJCOPY"; then
38347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
38348$as_echo "$ac_ct_OBJCOPY" >&6; }
38349else
38350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38351$as_echo "no" >&6; }
38352fi
38353
38354
38355  test -n "$ac_ct_OBJCOPY" && break
38356done
38357
38358  if test "x$ac_ct_OBJCOPY" = x; then
38359    OBJCOPY=""
38360  else
38361    case $cross_compiling:$ac_tool_warned in
38362yes:)
38363{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38364$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38365ac_tool_warned=yes ;;
38366esac
38367    OBJCOPY=$ac_ct_OBJCOPY
38368  fi
38369fi
38370
38371  else
38372    # The variable is set, but is it from the command line or the environment?
38373
38374    # Try to remove the string !OBJCOPY! from our list.
38375    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
38376    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38377      # If it failed, the variable was not from the command line. Ignore it,
38378      # but warn the user (except for BASH, which is always set by the calling BASH).
38379      if test "xOBJCOPY" != xBASH; then
38380        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
38381$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
38382      fi
38383      # Try to locate tool using the code snippet
38384      if test -n "$ac_tool_prefix"; then
38385  for ac_prog in gobjcopy objcopy
38386  do
38387    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38388set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38390$as_echo_n "checking for $ac_word... " >&6; }
38391if ${ac_cv_prog_OBJCOPY+:} false; then :
38392  $as_echo_n "(cached) " >&6
38393else
38394  if test -n "$OBJCOPY"; then
38395  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
38396else
38397as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38398for as_dir in $PATH
38399do
38400  IFS=$as_save_IFS
38401  test -z "$as_dir" && as_dir=.
38402    for ac_exec_ext in '' $ac_executable_extensions; do
38403  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38404    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
38405    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38406    break 2
38407  fi
38408done
38409  done
38410IFS=$as_save_IFS
38411
38412fi
38413fi
38414OBJCOPY=$ac_cv_prog_OBJCOPY
38415if test -n "$OBJCOPY"; then
38416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38417$as_echo "$OBJCOPY" >&6; }
38418else
38419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38420$as_echo "no" >&6; }
38421fi
38422
38423
38424    test -n "$OBJCOPY" && break
38425  done
38426fi
38427if test -z "$OBJCOPY"; then
38428  ac_ct_OBJCOPY=$OBJCOPY
38429  for ac_prog in gobjcopy objcopy
38430do
38431  # Extract the first word of "$ac_prog", so it can be a program name with args.
38432set dummy $ac_prog; ac_word=$2
38433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38434$as_echo_n "checking for $ac_word... " >&6; }
38435if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
38436  $as_echo_n "(cached) " >&6
38437else
38438  if test -n "$ac_ct_OBJCOPY"; then
38439  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
38440else
38441as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38442for as_dir in $PATH
38443do
38444  IFS=$as_save_IFS
38445  test -z "$as_dir" && as_dir=.
38446    for ac_exec_ext in '' $ac_executable_extensions; do
38447  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38448    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
38449    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38450    break 2
38451  fi
38452done
38453  done
38454IFS=$as_save_IFS
38455
38456fi
38457fi
38458ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
38459if test -n "$ac_ct_OBJCOPY"; then
38460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
38461$as_echo "$ac_ct_OBJCOPY" >&6; }
38462else
38463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38464$as_echo "no" >&6; }
38465fi
38466
38467
38468  test -n "$ac_ct_OBJCOPY" && break
38469done
38470
38471  if test "x$ac_ct_OBJCOPY" = x; then
38472    OBJCOPY=""
38473  else
38474    case $cross_compiling:$ac_tool_warned in
38475yes:)
38476{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38477$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38478ac_tool_warned=yes ;;
38479esac
38480    OBJCOPY=$ac_ct_OBJCOPY
38481  fi
38482fi
38483
38484    else
38485      # If it succeeded, then it was overridden by the user. We will use it
38486      # for the tool.
38487
38488      # First remove it from the list of overridden variables, so we can test
38489      # for unknown variables in the end.
38490      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38491
38492      # Check if the provided tool contains a complete path.
38493      tool_specified="$OBJCOPY"
38494      tool_basename="${tool_specified##*/}"
38495      if test "x$tool_basename" = "x$tool_specified"; then
38496        # A command without a complete path is provided, search $PATH.
38497        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
38498$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
38499        # Extract the first word of "$tool_basename", so it can be a program name with args.
38500set dummy $tool_basename; ac_word=$2
38501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38502$as_echo_n "checking for $ac_word... " >&6; }
38503if ${ac_cv_path_OBJCOPY+:} false; then :
38504  $as_echo_n "(cached) " >&6
38505else
38506  case $OBJCOPY in
38507  [\\/]* | ?:[\\/]*)
38508  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
38509  ;;
38510  *)
38511  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38512for as_dir in $PATH
38513do
38514  IFS=$as_save_IFS
38515  test -z "$as_dir" && as_dir=.
38516    for ac_exec_ext in '' $ac_executable_extensions; do
38517  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38518    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
38519    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38520    break 2
38521  fi
38522done
38523  done
38524IFS=$as_save_IFS
38525
38526  ;;
38527esac
38528fi
38529OBJCOPY=$ac_cv_path_OBJCOPY
38530if test -n "$OBJCOPY"; then
38531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38532$as_echo "$OBJCOPY" >&6; }
38533else
38534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38535$as_echo "no" >&6; }
38536fi
38537
38538
38539        if test "x$OBJCOPY" = x; then
38540          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38541        fi
38542      else
38543        # Otherwise we believe it is a complete path. Use it as it is.
38544        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
38545$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
38546        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
38547$as_echo_n "checking for OBJCOPY... " >&6; }
38548        if test ! -x "$tool_specified"; then
38549          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38550$as_echo "not found" >&6; }
38551          as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
38552        fi
38553        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38554$as_echo "$tool_specified" >&6; }
38555      fi
38556    fi
38557  fi
38558
38559
38560    # Only call fixup if objcopy was found.
38561    if test -n "$OBJCOPY"; then
38562
38563  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38564
38565  # First separate the path from the arguments. This will split at the first
38566  # space.
38567  complete="$OBJCOPY"
38568  path="${complete%% *}"
38569  tmp="$complete EOL"
38570  arguments="${tmp#* }"
38571
38572  # Input might be given as Windows format, start by converting to
38573  # unix format.
38574  new_path=`$CYGPATH -u "$path"`
38575
38576  # Now try to locate executable using which
38577  new_path=`$WHICH "$new_path" 2> /dev/null`
38578  # bat and cmd files are not always considered executable in cygwin causing which
38579  # to not find them
38580  if test "x$new_path" = x \
38581      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38582      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38583    new_path=`$CYGPATH -u "$path"`
38584  fi
38585  if test "x$new_path" = x; then
38586    # Oops. Which didn't find the executable.
38587    # The splitting of arguments from the executable at a space might have been incorrect,
38588    # since paths with space are more likely in Windows. Give it another try with the whole
38589    # argument.
38590    path="$complete"
38591    arguments="EOL"
38592    new_path=`$CYGPATH -u "$path"`
38593    new_path=`$WHICH "$new_path" 2> /dev/null`
38594    # bat and cmd files are not always considered executable in cygwin causing which
38595    # to not find them
38596    if test "x$new_path" = x \
38597        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38598        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38599      new_path=`$CYGPATH -u "$path"`
38600    fi
38601    if test "x$new_path" = x; then
38602      # It's still not found. Now this is an unrecoverable error.
38603      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38604$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38605      has_space=`$ECHO "$complete" | $GREP " "`
38606      if test "x$has_space" != x; then
38607        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38608$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38609      fi
38610      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38611    fi
38612  fi
38613
38614  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38615  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38616  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38617  # "foo.exe" is OK but "foo" is an error.
38618  #
38619  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38620  # It is also a way to make sure we got the proper file name for the real test later on.
38621  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38622  if test "x$test_shortpath" = x; then
38623    # Short path failed, file does not exist as specified.
38624    # Try adding .exe or .cmd
38625    if test -f "${new_path}.exe"; then
38626      input_to_shortpath="${new_path}.exe"
38627    elif test -f "${new_path}.cmd"; then
38628      input_to_shortpath="${new_path}.cmd"
38629    else
38630      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
38631$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
38632      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38633$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38634      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38635    fi
38636  else
38637    input_to_shortpath="$new_path"
38638  fi
38639
38640  # Call helper function which possibly converts this using DOS-style short mode.
38641  # If so, the updated path is stored in $new_path.
38642  new_path="$input_to_shortpath"
38643
38644  input_path="$input_to_shortpath"
38645  # Check if we need to convert this using DOS-style short mode. If the path
38646  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38647  # take no chances and rewrite it.
38648  # Note: m4 eats our [], so we need to use [ and ] instead.
38649  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38650  if test "x$has_forbidden_chars" != x; then
38651    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38652    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38653    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38654    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38655      # Going to short mode and back again did indeed matter. Since short mode is
38656      # case insensitive, let's make it lowercase to improve readability.
38657      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38658      # Now convert it back to Unix-stile (cygpath)
38659      input_path=`$CYGPATH -u "$shortmode_path"`
38660      new_path="$input_path"
38661    fi
38662  fi
38663
38664  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38665  if test "x$test_cygdrive_prefix" = x; then
38666    # As a simple fix, exclude /usr/bin since it's not a real path.
38667    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38668      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38669      # a path prefixed by /cygdrive for fixpath to work.
38670      new_path="$CYGWIN_ROOT_PATH$input_path"
38671    fi
38672  fi
38673
38674  # remove trailing .exe if any
38675  new_path="${new_path/%.exe/}"
38676
38677  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38678
38679  # First separate the path from the arguments. This will split at the first
38680  # space.
38681  complete="$OBJCOPY"
38682  path="${complete%% *}"
38683  tmp="$complete EOL"
38684  arguments="${tmp#* }"
38685
38686  # Input might be given as Windows format, start by converting to
38687  # unix format.
38688  new_path="$path"
38689
38690  windows_path="$new_path"
38691  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38692    unix_path=`$CYGPATH -u "$windows_path"`
38693    new_path="$unix_path"
38694  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38695    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38696    new_path="$unix_path"
38697  fi
38698
38699
38700  # Now try to locate executable using which
38701  new_path=`$WHICH "$new_path" 2> /dev/null`
38702
38703  if test "x$new_path" = x; then
38704    # Oops. Which didn't find the executable.
38705    # The splitting of arguments from the executable at a space might have been incorrect,
38706    # since paths with space are more likely in Windows. Give it another try with the whole
38707    # argument.
38708    path="$complete"
38709    arguments="EOL"
38710    new_path="$path"
38711
38712  windows_path="$new_path"
38713  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38714    unix_path=`$CYGPATH -u "$windows_path"`
38715    new_path="$unix_path"
38716  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38717    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38718    new_path="$unix_path"
38719  fi
38720
38721
38722    new_path=`$WHICH "$new_path" 2> /dev/null`
38723    # bat and cmd files are not always considered executable in MSYS causing which
38724    # to not find them
38725    if test "x$new_path" = x \
38726        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38727        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38728      new_path="$path"
38729
38730  windows_path="$new_path"
38731  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38732    unix_path=`$CYGPATH -u "$windows_path"`
38733    new_path="$unix_path"
38734  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38735    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38736    new_path="$unix_path"
38737  fi
38738
38739    fi
38740
38741    if test "x$new_path" = x; then
38742      # It's still not found. Now this is an unrecoverable error.
38743      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38744$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38745      has_space=`$ECHO "$complete" | $GREP " "`
38746      if test "x$has_space" != x; then
38747        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38748$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38749      fi
38750      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38751    fi
38752  fi
38753
38754  # Now new_path has a complete unix path to the binary
38755  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38756    # Keep paths in /bin as-is, but remove trailing .exe if any
38757    new_path="${new_path/%.exe/}"
38758    # Do not save /bin paths to all_fixpath_prefixes!
38759  else
38760    # Not in mixed or Windows style, start by that.
38761    new_path=`cmd //c echo $new_path`
38762
38763  input_path="$new_path"
38764  # Check if we need to convert this using DOS-style short mode. If the path
38765  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38766  # take no chances and rewrite it.
38767  # Note: m4 eats our [], so we need to use [ and ] instead.
38768  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38769  if test "x$has_forbidden_chars" != x; then
38770    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38771    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38772  fi
38773
38774    # Output is in $new_path
38775
38776  windows_path="$new_path"
38777  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38778    unix_path=`$CYGPATH -u "$windows_path"`
38779    new_path="$unix_path"
38780  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38781    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38782    new_path="$unix_path"
38783  fi
38784
38785    # remove trailing .exe if any
38786    new_path="${new_path/%.exe/}"
38787
38788    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38789    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38790  fi
38791
38792  else
38793    # We're on a unix platform. Hooray! :)
38794    # First separate the path from the arguments. This will split at the first
38795    # space.
38796    complete="$OBJCOPY"
38797    path="${complete%% *}"
38798    tmp="$complete EOL"
38799    arguments="${tmp#* }"
38800
38801    # Cannot rely on the command "which" here since it doesn't always work.
38802    is_absolute_path=`$ECHO "$path" | $GREP ^/`
38803    if test -z "$is_absolute_path"; then
38804      # Path to executable is not absolute. Find it.
38805      IFS_save="$IFS"
38806      IFS=:
38807      for p in $PATH; do
38808        if test -f "$p/$path" && test -x "$p/$path"; then
38809          new_path="$p/$path"
38810          break
38811        fi
38812      done
38813      IFS="$IFS_save"
38814    else
38815      # This is an absolute path, we can use it without further modifications.
38816      new_path="$path"
38817    fi
38818
38819    if test "x$new_path" = x; then
38820      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38821$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38822      has_space=`$ECHO "$complete" | $GREP " "`
38823      if test "x$has_space" != x; then
38824        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38825$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38826      fi
38827      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38828    fi
38829  fi
38830
38831  # Now join together the path and the arguments once again
38832  if test "x$arguments" != xEOL; then
38833    new_complete="$new_path ${arguments% *}"
38834  else
38835    new_complete="$new_path"
38836  fi
38837
38838  if test "x$complete" != "x$new_complete"; then
38839    OBJCOPY="$new_complete"
38840    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
38841$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
38842  fi
38843
38844    fi
38845  fi
38846
38847
38848
38849  # Publish this variable in the help.
38850
38851
38852  if test "x$OBJDUMP" = x; then
38853    # The variable is not set by user, try to locate tool using the code snippet
38854    if test -n "$ac_tool_prefix"; then
38855  for ac_prog in gobjdump objdump
38856  do
38857    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38858set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38860$as_echo_n "checking for $ac_word... " >&6; }
38861if ${ac_cv_prog_OBJDUMP+:} false; then :
38862  $as_echo_n "(cached) " >&6
38863else
38864  if test -n "$OBJDUMP"; then
38865  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38866else
38867as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38868for as_dir in $PATH
38869do
38870  IFS=$as_save_IFS
38871  test -z "$as_dir" && as_dir=.
38872    for ac_exec_ext in '' $ac_executable_extensions; do
38873  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38874    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38875    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38876    break 2
38877  fi
38878done
38879  done
38880IFS=$as_save_IFS
38881
38882fi
38883fi
38884OBJDUMP=$ac_cv_prog_OBJDUMP
38885if test -n "$OBJDUMP"; then
38886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38887$as_echo "$OBJDUMP" >&6; }
38888else
38889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38890$as_echo "no" >&6; }
38891fi
38892
38893
38894    test -n "$OBJDUMP" && break
38895  done
38896fi
38897if test -z "$OBJDUMP"; then
38898  ac_ct_OBJDUMP=$OBJDUMP
38899  for ac_prog in gobjdump objdump
38900do
38901  # Extract the first word of "$ac_prog", so it can be a program name with args.
38902set dummy $ac_prog; ac_word=$2
38903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38904$as_echo_n "checking for $ac_word... " >&6; }
38905if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38906  $as_echo_n "(cached) " >&6
38907else
38908  if test -n "$ac_ct_OBJDUMP"; then
38909  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38910else
38911as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38912for as_dir in $PATH
38913do
38914  IFS=$as_save_IFS
38915  test -z "$as_dir" && as_dir=.
38916    for ac_exec_ext in '' $ac_executable_extensions; do
38917  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38918    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38919    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38920    break 2
38921  fi
38922done
38923  done
38924IFS=$as_save_IFS
38925
38926fi
38927fi
38928ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38929if test -n "$ac_ct_OBJDUMP"; then
38930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38931$as_echo "$ac_ct_OBJDUMP" >&6; }
38932else
38933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38934$as_echo "no" >&6; }
38935fi
38936
38937
38938  test -n "$ac_ct_OBJDUMP" && break
38939done
38940
38941  if test "x$ac_ct_OBJDUMP" = x; then
38942    OBJDUMP=""
38943  else
38944    case $cross_compiling:$ac_tool_warned in
38945yes:)
38946{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38947$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38948ac_tool_warned=yes ;;
38949esac
38950    OBJDUMP=$ac_ct_OBJDUMP
38951  fi
38952fi
38953
38954  else
38955    # The variable is set, but is it from the command line or the environment?
38956
38957    # Try to remove the string !OBJDUMP! from our list.
38958    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
38959    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38960      # If it failed, the variable was not from the command line. Ignore it,
38961      # but warn the user (except for BASH, which is always set by the calling BASH).
38962      if test "xOBJDUMP" != xBASH; then
38963        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
38964$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
38965      fi
38966      # Try to locate tool using the code snippet
38967      if test -n "$ac_tool_prefix"; then
38968  for ac_prog in gobjdump objdump
38969  do
38970    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38971set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38973$as_echo_n "checking for $ac_word... " >&6; }
38974if ${ac_cv_prog_OBJDUMP+:} false; then :
38975  $as_echo_n "(cached) " >&6
38976else
38977  if test -n "$OBJDUMP"; then
38978  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38979else
38980as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38981for as_dir in $PATH
38982do
38983  IFS=$as_save_IFS
38984  test -z "$as_dir" && as_dir=.
38985    for ac_exec_ext in '' $ac_executable_extensions; do
38986  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38987    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38988    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38989    break 2
38990  fi
38991done
38992  done
38993IFS=$as_save_IFS
38994
38995fi
38996fi
38997OBJDUMP=$ac_cv_prog_OBJDUMP
38998if test -n "$OBJDUMP"; then
38999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
39000$as_echo "$OBJDUMP" >&6; }
39001else
39002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39003$as_echo "no" >&6; }
39004fi
39005
39006
39007    test -n "$OBJDUMP" && break
39008  done
39009fi
39010if test -z "$OBJDUMP"; then
39011  ac_ct_OBJDUMP=$OBJDUMP
39012  for ac_prog in gobjdump objdump
39013do
39014  # Extract the first word of "$ac_prog", so it can be a program name with args.
39015set dummy $ac_prog; ac_word=$2
39016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39017$as_echo_n "checking for $ac_word... " >&6; }
39018if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
39019  $as_echo_n "(cached) " >&6
39020else
39021  if test -n "$ac_ct_OBJDUMP"; then
39022  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
39023else
39024as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39025for as_dir in $PATH
39026do
39027  IFS=$as_save_IFS
39028  test -z "$as_dir" && as_dir=.
39029    for ac_exec_ext in '' $ac_executable_extensions; do
39030  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39031    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
39032    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39033    break 2
39034  fi
39035done
39036  done
39037IFS=$as_save_IFS
39038
39039fi
39040fi
39041ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
39042if test -n "$ac_ct_OBJDUMP"; then
39043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
39044$as_echo "$ac_ct_OBJDUMP" >&6; }
39045else
39046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39047$as_echo "no" >&6; }
39048fi
39049
39050
39051  test -n "$ac_ct_OBJDUMP" && break
39052done
39053
39054  if test "x$ac_ct_OBJDUMP" = x; then
39055    OBJDUMP=""
39056  else
39057    case $cross_compiling:$ac_tool_warned in
39058yes:)
39059{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
39060$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
39061ac_tool_warned=yes ;;
39062esac
39063    OBJDUMP=$ac_ct_OBJDUMP
39064  fi
39065fi
39066
39067    else
39068      # If it succeeded, then it was overridden by the user. We will use it
39069      # for the tool.
39070
39071      # First remove it from the list of overridden variables, so we can test
39072      # for unknown variables in the end.
39073      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39074
39075      # Check if the provided tool contains a complete path.
39076      tool_specified="$OBJDUMP"
39077      tool_basename="${tool_specified##*/}"
39078      if test "x$tool_basename" = "x$tool_specified"; then
39079        # A command without a complete path is provided, search $PATH.
39080        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
39081$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
39082        # Extract the first word of "$tool_basename", so it can be a program name with args.
39083set dummy $tool_basename; ac_word=$2
39084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39085$as_echo_n "checking for $ac_word... " >&6; }
39086if ${ac_cv_path_OBJDUMP+:} false; then :
39087  $as_echo_n "(cached) " >&6
39088else
39089  case $OBJDUMP in
39090  [\\/]* | ?:[\\/]*)
39091  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
39092  ;;
39093  *)
39094  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39095for as_dir in $PATH
39096do
39097  IFS=$as_save_IFS
39098  test -z "$as_dir" && as_dir=.
39099    for ac_exec_ext in '' $ac_executable_extensions; do
39100  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39101    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
39102    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39103    break 2
39104  fi
39105done
39106  done
39107IFS=$as_save_IFS
39108
39109  ;;
39110esac
39111fi
39112OBJDUMP=$ac_cv_path_OBJDUMP
39113if test -n "$OBJDUMP"; then
39114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
39115$as_echo "$OBJDUMP" >&6; }
39116else
39117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39118$as_echo "no" >&6; }
39119fi
39120
39121
39122        if test "x$OBJDUMP" = x; then
39123          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39124        fi
39125      else
39126        # Otherwise we believe it is a complete path. Use it as it is.
39127        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
39128$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
39129        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
39130$as_echo_n "checking for OBJDUMP... " >&6; }
39131        if test ! -x "$tool_specified"; then
39132          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39133$as_echo "not found" >&6; }
39134          as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
39135        fi
39136        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39137$as_echo "$tool_specified" >&6; }
39138      fi
39139    fi
39140  fi
39141
39142
39143  if test "x$OBJDUMP" != x; then
39144    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
39145    # bails if argument is missing.
39146
39147  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39148
39149  # First separate the path from the arguments. This will split at the first
39150  # space.
39151  complete="$OBJDUMP"
39152  path="${complete%% *}"
39153  tmp="$complete EOL"
39154  arguments="${tmp#* }"
39155
39156  # Input might be given as Windows format, start by converting to
39157  # unix format.
39158  new_path=`$CYGPATH -u "$path"`
39159
39160  # Now try to locate executable using which
39161  new_path=`$WHICH "$new_path" 2> /dev/null`
39162  # bat and cmd files are not always considered executable in cygwin causing which
39163  # to not find them
39164  if test "x$new_path" = x \
39165      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39166      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39167    new_path=`$CYGPATH -u "$path"`
39168  fi
39169  if test "x$new_path" = x; then
39170    # Oops. Which didn't find the executable.
39171    # The splitting of arguments from the executable at a space might have been incorrect,
39172    # since paths with space are more likely in Windows. Give it another try with the whole
39173    # argument.
39174    path="$complete"
39175    arguments="EOL"
39176    new_path=`$CYGPATH -u "$path"`
39177    new_path=`$WHICH "$new_path" 2> /dev/null`
39178    # bat and cmd files are not always considered executable in cygwin causing which
39179    # to not find them
39180    if test "x$new_path" = x \
39181        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39182        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39183      new_path=`$CYGPATH -u "$path"`
39184    fi
39185    if test "x$new_path" = x; then
39186      # It's still not found. Now this is an unrecoverable error.
39187      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39188$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39189      has_space=`$ECHO "$complete" | $GREP " "`
39190      if test "x$has_space" != x; then
39191        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39192$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39193      fi
39194      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39195    fi
39196  fi
39197
39198  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39199  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39200  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39201  # "foo.exe" is OK but "foo" is an error.
39202  #
39203  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39204  # It is also a way to make sure we got the proper file name for the real test later on.
39205  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39206  if test "x$test_shortpath" = x; then
39207    # Short path failed, file does not exist as specified.
39208    # Try adding .exe or .cmd
39209    if test -f "${new_path}.exe"; then
39210      input_to_shortpath="${new_path}.exe"
39211    elif test -f "${new_path}.cmd"; then
39212      input_to_shortpath="${new_path}.cmd"
39213    else
39214      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
39215$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
39216      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39217$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39218      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39219    fi
39220  else
39221    input_to_shortpath="$new_path"
39222  fi
39223
39224  # Call helper function which possibly converts this using DOS-style short mode.
39225  # If so, the updated path is stored in $new_path.
39226  new_path="$input_to_shortpath"
39227
39228  input_path="$input_to_shortpath"
39229  # Check if we need to convert this using DOS-style short mode. If the path
39230  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39231  # take no chances and rewrite it.
39232  # Note: m4 eats our [], so we need to use [ and ] instead.
39233  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39234  if test "x$has_forbidden_chars" != x; then
39235    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39236    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39237    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39238    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39239      # Going to short mode and back again did indeed matter. Since short mode is
39240      # case insensitive, let's make it lowercase to improve readability.
39241      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39242      # Now convert it back to Unix-stile (cygpath)
39243      input_path=`$CYGPATH -u "$shortmode_path"`
39244      new_path="$input_path"
39245    fi
39246  fi
39247
39248  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39249  if test "x$test_cygdrive_prefix" = x; then
39250    # As a simple fix, exclude /usr/bin since it's not a real path.
39251    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39252      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39253      # a path prefixed by /cygdrive for fixpath to work.
39254      new_path="$CYGWIN_ROOT_PATH$input_path"
39255    fi
39256  fi
39257
39258  # remove trailing .exe if any
39259  new_path="${new_path/%.exe/}"
39260
39261  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39262
39263  # First separate the path from the arguments. This will split at the first
39264  # space.
39265  complete="$OBJDUMP"
39266  path="${complete%% *}"
39267  tmp="$complete EOL"
39268  arguments="${tmp#* }"
39269
39270  # Input might be given as Windows format, start by converting to
39271  # unix format.
39272  new_path="$path"
39273
39274  windows_path="$new_path"
39275  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39276    unix_path=`$CYGPATH -u "$windows_path"`
39277    new_path="$unix_path"
39278  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39279    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39280    new_path="$unix_path"
39281  fi
39282
39283
39284  # Now try to locate executable using which
39285  new_path=`$WHICH "$new_path" 2> /dev/null`
39286
39287  if test "x$new_path" = x; then
39288    # Oops. Which didn't find the executable.
39289    # The splitting of arguments from the executable at a space might have been incorrect,
39290    # since paths with space are more likely in Windows. Give it another try with the whole
39291    # argument.
39292    path="$complete"
39293    arguments="EOL"
39294    new_path="$path"
39295
39296  windows_path="$new_path"
39297  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39298    unix_path=`$CYGPATH -u "$windows_path"`
39299    new_path="$unix_path"
39300  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39301    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39302    new_path="$unix_path"
39303  fi
39304
39305
39306    new_path=`$WHICH "$new_path" 2> /dev/null`
39307    # bat and cmd files are not always considered executable in MSYS causing which
39308    # to not find them
39309    if test "x$new_path" = x \
39310        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39311        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39312      new_path="$path"
39313
39314  windows_path="$new_path"
39315  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39316    unix_path=`$CYGPATH -u "$windows_path"`
39317    new_path="$unix_path"
39318  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39319    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39320    new_path="$unix_path"
39321  fi
39322
39323    fi
39324
39325    if test "x$new_path" = x; then
39326      # It's still not found. Now this is an unrecoverable error.
39327      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39328$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39329      has_space=`$ECHO "$complete" | $GREP " "`
39330      if test "x$has_space" != x; then
39331        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39332$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39333      fi
39334      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39335    fi
39336  fi
39337
39338  # Now new_path has a complete unix path to the binary
39339  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39340    # Keep paths in /bin as-is, but remove trailing .exe if any
39341    new_path="${new_path/%.exe/}"
39342    # Do not save /bin paths to all_fixpath_prefixes!
39343  else
39344    # Not in mixed or Windows style, start by that.
39345    new_path=`cmd //c echo $new_path`
39346
39347  input_path="$new_path"
39348  # Check if we need to convert this using DOS-style short mode. If the path
39349  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39350  # take no chances and rewrite it.
39351  # Note: m4 eats our [], so we need to use [ and ] instead.
39352  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39353  if test "x$has_forbidden_chars" != x; then
39354    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39355    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39356  fi
39357
39358    # Output is in $new_path
39359
39360  windows_path="$new_path"
39361  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39362    unix_path=`$CYGPATH -u "$windows_path"`
39363    new_path="$unix_path"
39364  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39365    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39366    new_path="$unix_path"
39367  fi
39368
39369    # remove trailing .exe if any
39370    new_path="${new_path/%.exe/}"
39371
39372    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39373    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39374  fi
39375
39376  else
39377    # We're on a unix platform. Hooray! :)
39378    # First separate the path from the arguments. This will split at the first
39379    # space.
39380    complete="$OBJDUMP"
39381    path="${complete%% *}"
39382    tmp="$complete EOL"
39383    arguments="${tmp#* }"
39384
39385    # Cannot rely on the command "which" here since it doesn't always work.
39386    is_absolute_path=`$ECHO "$path" | $GREP ^/`
39387    if test -z "$is_absolute_path"; then
39388      # Path to executable is not absolute. Find it.
39389      IFS_save="$IFS"
39390      IFS=:
39391      for p in $PATH; do
39392        if test -f "$p/$path" && test -x "$p/$path"; then
39393          new_path="$p/$path"
39394          break
39395        fi
39396      done
39397      IFS="$IFS_save"
39398    else
39399      # This is an absolute path, we can use it without further modifications.
39400      new_path="$path"
39401    fi
39402
39403    if test "x$new_path" = x; then
39404      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39405$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39406      has_space=`$ECHO "$complete" | $GREP " "`
39407      if test "x$has_space" != x; then
39408        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39409$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39410      fi
39411      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39412    fi
39413  fi
39414
39415  # Now join together the path and the arguments once again
39416  if test "x$arguments" != xEOL; then
39417    new_complete="$new_path ${arguments% *}"
39418  else
39419    new_complete="$new_path"
39420  fi
39421
39422  if test "x$complete" != "x$new_complete"; then
39423    OBJDUMP="$new_complete"
39424    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
39425$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
39426  fi
39427
39428  fi
39429
39430
39431  # Restore old path.
39432  PATH="$OLD_PATH"
39433
39434  # Restore the flags to the user specified values.
39435  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
39436  CFLAGS="$ORG_CFLAGS"
39437  CXXFLAGS="$ORG_CXXFLAGS"
39438  OBJCFLAGS="$ORG_OBJCFLAGS"
39439
39440
39441# Finally do some processing after the detection phase
39442
39443  if test "x$COMPILE_TYPE" = "xcross"; then
39444    # Now we need to find a C/C++ compiler that can build executables for the
39445    # build platform. We can't use the AC_PROG_CC macro, since it can only be
39446    # used once. Also, we need to do this without adding a tools dir to the
39447    # path, otherwise we might pick up cross-compilers which don't use standard
39448    # naming.
39449
39450    # FIXME: we should list the discovered compilers as an exclude pattern!
39451    # If we do that, we can do this detection before POST_DETECTION, and still
39452    # find the build compilers in the tools dir, if needed.
39453
39454
39455  # Publish this variable in the help.
39456
39457
39458  if test "x$BUILD_CC" = x; then
39459    # The variable is not set by user, try to locate tool using the code snippet
39460    for ac_prog in cl cc gcc
39461do
39462  # Extract the first word of "$ac_prog", so it can be a program name with args.
39463set dummy $ac_prog; ac_word=$2
39464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39465$as_echo_n "checking for $ac_word... " >&6; }
39466if ${ac_cv_path_BUILD_CC+:} false; then :
39467  $as_echo_n "(cached) " >&6
39468else
39469  case $BUILD_CC in
39470  [\\/]* | ?:[\\/]*)
39471  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39472  ;;
39473  *)
39474  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39475for as_dir in $PATH
39476do
39477  IFS=$as_save_IFS
39478  test -z "$as_dir" && as_dir=.
39479    for ac_exec_ext in '' $ac_executable_extensions; do
39480  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39481    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39482    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39483    break 2
39484  fi
39485done
39486  done
39487IFS=$as_save_IFS
39488
39489  ;;
39490esac
39491fi
39492BUILD_CC=$ac_cv_path_BUILD_CC
39493if test -n "$BUILD_CC"; then
39494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39495$as_echo "$BUILD_CC" >&6; }
39496else
39497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39498$as_echo "no" >&6; }
39499fi
39500
39501
39502  test -n "$BUILD_CC" && break
39503done
39504
39505  else
39506    # The variable is set, but is it from the command line or the environment?
39507
39508    # Try to remove the string !BUILD_CC! from our list.
39509    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
39510    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39511      # If it failed, the variable was not from the command line. Ignore it,
39512      # but warn the user (except for BASH, which is always set by the calling BASH).
39513      if test "xBUILD_CC" != xBASH; then
39514        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
39515$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
39516      fi
39517      # Try to locate tool using the code snippet
39518      for ac_prog in cl cc gcc
39519do
39520  # Extract the first word of "$ac_prog", so it can be a program name with args.
39521set dummy $ac_prog; ac_word=$2
39522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39523$as_echo_n "checking for $ac_word... " >&6; }
39524if ${ac_cv_path_BUILD_CC+:} false; then :
39525  $as_echo_n "(cached) " >&6
39526else
39527  case $BUILD_CC in
39528  [\\/]* | ?:[\\/]*)
39529  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39530  ;;
39531  *)
39532  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39533for as_dir in $PATH
39534do
39535  IFS=$as_save_IFS
39536  test -z "$as_dir" && as_dir=.
39537    for ac_exec_ext in '' $ac_executable_extensions; do
39538  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39539    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39540    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39541    break 2
39542  fi
39543done
39544  done
39545IFS=$as_save_IFS
39546
39547  ;;
39548esac
39549fi
39550BUILD_CC=$ac_cv_path_BUILD_CC
39551if test -n "$BUILD_CC"; then
39552  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39553$as_echo "$BUILD_CC" >&6; }
39554else
39555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39556$as_echo "no" >&6; }
39557fi
39558
39559
39560  test -n "$BUILD_CC" && break
39561done
39562
39563    else
39564      # If it succeeded, then it was overridden by the user. We will use it
39565      # for the tool.
39566
39567      # First remove it from the list of overridden variables, so we can test
39568      # for unknown variables in the end.
39569      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39570
39571      # Check if the provided tool contains a complete path.
39572      tool_specified="$BUILD_CC"
39573      tool_basename="${tool_specified##*/}"
39574      if test "x$tool_basename" = "x$tool_specified"; then
39575        # A command without a complete path is provided, search $PATH.
39576        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
39577$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
39578        # Extract the first word of "$tool_basename", so it can be a program name with args.
39579set dummy $tool_basename; ac_word=$2
39580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39581$as_echo_n "checking for $ac_word... " >&6; }
39582if ${ac_cv_path_BUILD_CC+:} false; then :
39583  $as_echo_n "(cached) " >&6
39584else
39585  case $BUILD_CC in
39586  [\\/]* | ?:[\\/]*)
39587  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39588  ;;
39589  *)
39590  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39591for as_dir in $PATH
39592do
39593  IFS=$as_save_IFS
39594  test -z "$as_dir" && as_dir=.
39595    for ac_exec_ext in '' $ac_executable_extensions; do
39596  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39597    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39598    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39599    break 2
39600  fi
39601done
39602  done
39603IFS=$as_save_IFS
39604
39605  ;;
39606esac
39607fi
39608BUILD_CC=$ac_cv_path_BUILD_CC
39609if test -n "$BUILD_CC"; then
39610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39611$as_echo "$BUILD_CC" >&6; }
39612else
39613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39614$as_echo "no" >&6; }
39615fi
39616
39617
39618        if test "x$BUILD_CC" = x; then
39619          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39620        fi
39621      else
39622        # Otherwise we believe it is a complete path. Use it as it is.
39623        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
39624$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
39625        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
39626$as_echo_n "checking for BUILD_CC... " >&6; }
39627        if test ! -x "$tool_specified"; then
39628          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39629$as_echo "not found" >&6; }
39630          as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
39631        fi
39632        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39633$as_echo "$tool_specified" >&6; }
39634      fi
39635    fi
39636  fi
39637
39638
39639
39640  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39641
39642  # First separate the path from the arguments. This will split at the first
39643  # space.
39644  complete="$BUILD_CC"
39645  path="${complete%% *}"
39646  tmp="$complete EOL"
39647  arguments="${tmp#* }"
39648
39649  # Input might be given as Windows format, start by converting to
39650  # unix format.
39651  new_path=`$CYGPATH -u "$path"`
39652
39653  # Now try to locate executable using which
39654  new_path=`$WHICH "$new_path" 2> /dev/null`
39655  # bat and cmd files are not always considered executable in cygwin causing which
39656  # to not find them
39657  if test "x$new_path" = x \
39658      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39659      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39660    new_path=`$CYGPATH -u "$path"`
39661  fi
39662  if test "x$new_path" = x; then
39663    # Oops. Which didn't find the executable.
39664    # The splitting of arguments from the executable at a space might have been incorrect,
39665    # since paths with space are more likely in Windows. Give it another try with the whole
39666    # argument.
39667    path="$complete"
39668    arguments="EOL"
39669    new_path=`$CYGPATH -u "$path"`
39670    new_path=`$WHICH "$new_path" 2> /dev/null`
39671    # bat and cmd files are not always considered executable in cygwin causing which
39672    # to not find them
39673    if test "x$new_path" = x \
39674        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39675        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39676      new_path=`$CYGPATH -u "$path"`
39677    fi
39678    if test "x$new_path" = x; then
39679      # It's still not found. Now this is an unrecoverable error.
39680      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39681$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39682      has_space=`$ECHO "$complete" | $GREP " "`
39683      if test "x$has_space" != x; then
39684        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39685$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39686      fi
39687      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39688    fi
39689  fi
39690
39691  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39692  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39693  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39694  # "foo.exe" is OK but "foo" is an error.
39695  #
39696  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39697  # It is also a way to make sure we got the proper file name for the real test later on.
39698  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39699  if test "x$test_shortpath" = x; then
39700    # Short path failed, file does not exist as specified.
39701    # Try adding .exe or .cmd
39702    if test -f "${new_path}.exe"; then
39703      input_to_shortpath="${new_path}.exe"
39704    elif test -f "${new_path}.cmd"; then
39705      input_to_shortpath="${new_path}.cmd"
39706    else
39707      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
39708$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
39709      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39710$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39711      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39712    fi
39713  else
39714    input_to_shortpath="$new_path"
39715  fi
39716
39717  # Call helper function which possibly converts this using DOS-style short mode.
39718  # If so, the updated path is stored in $new_path.
39719  new_path="$input_to_shortpath"
39720
39721  input_path="$input_to_shortpath"
39722  # Check if we need to convert this using DOS-style short mode. If the path
39723  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39724  # take no chances and rewrite it.
39725  # Note: m4 eats our [], so we need to use [ and ] instead.
39726  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39727  if test "x$has_forbidden_chars" != x; then
39728    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39729    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39730    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39731    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39732      # Going to short mode and back again did indeed matter. Since short mode is
39733      # case insensitive, let's make it lowercase to improve readability.
39734      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39735      # Now convert it back to Unix-stile (cygpath)
39736      input_path=`$CYGPATH -u "$shortmode_path"`
39737      new_path="$input_path"
39738    fi
39739  fi
39740
39741  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39742  if test "x$test_cygdrive_prefix" = x; then
39743    # As a simple fix, exclude /usr/bin since it's not a real path.
39744    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39745      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39746      # a path prefixed by /cygdrive for fixpath to work.
39747      new_path="$CYGWIN_ROOT_PATH$input_path"
39748    fi
39749  fi
39750
39751  # remove trailing .exe if any
39752  new_path="${new_path/%.exe/}"
39753
39754  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39755
39756  # First separate the path from the arguments. This will split at the first
39757  # space.
39758  complete="$BUILD_CC"
39759  path="${complete%% *}"
39760  tmp="$complete EOL"
39761  arguments="${tmp#* }"
39762
39763  # Input might be given as Windows format, start by converting to
39764  # unix format.
39765  new_path="$path"
39766
39767  windows_path="$new_path"
39768  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39769    unix_path=`$CYGPATH -u "$windows_path"`
39770    new_path="$unix_path"
39771  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39772    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39773    new_path="$unix_path"
39774  fi
39775
39776
39777  # Now try to locate executable using which
39778  new_path=`$WHICH "$new_path" 2> /dev/null`
39779
39780  if test "x$new_path" = x; then
39781    # Oops. Which didn't find the executable.
39782    # The splitting of arguments from the executable at a space might have been incorrect,
39783    # since paths with space are more likely in Windows. Give it another try with the whole
39784    # argument.
39785    path="$complete"
39786    arguments="EOL"
39787    new_path="$path"
39788
39789  windows_path="$new_path"
39790  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39791    unix_path=`$CYGPATH -u "$windows_path"`
39792    new_path="$unix_path"
39793  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39794    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39795    new_path="$unix_path"
39796  fi
39797
39798
39799    new_path=`$WHICH "$new_path" 2> /dev/null`
39800    # bat and cmd files are not always considered executable in MSYS causing which
39801    # to not find them
39802    if test "x$new_path" = x \
39803        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39804        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39805      new_path="$path"
39806
39807  windows_path="$new_path"
39808  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39809    unix_path=`$CYGPATH -u "$windows_path"`
39810    new_path="$unix_path"
39811  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39812    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39813    new_path="$unix_path"
39814  fi
39815
39816    fi
39817
39818    if test "x$new_path" = x; then
39819      # It's still not found. Now this is an unrecoverable error.
39820      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39821$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39822      has_space=`$ECHO "$complete" | $GREP " "`
39823      if test "x$has_space" != x; then
39824        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39825$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39826      fi
39827      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39828    fi
39829  fi
39830
39831  # Now new_path has a complete unix path to the binary
39832  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39833    # Keep paths in /bin as-is, but remove trailing .exe if any
39834    new_path="${new_path/%.exe/}"
39835    # Do not save /bin paths to all_fixpath_prefixes!
39836  else
39837    # Not in mixed or Windows style, start by that.
39838    new_path=`cmd //c echo $new_path`
39839
39840  input_path="$new_path"
39841  # Check if we need to convert this using DOS-style short mode. If the path
39842  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39843  # take no chances and rewrite it.
39844  # Note: m4 eats our [], so we need to use [ and ] instead.
39845  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39846  if test "x$has_forbidden_chars" != x; then
39847    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39848    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39849  fi
39850
39851    # Output is in $new_path
39852
39853  windows_path="$new_path"
39854  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39855    unix_path=`$CYGPATH -u "$windows_path"`
39856    new_path="$unix_path"
39857  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39858    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39859    new_path="$unix_path"
39860  fi
39861
39862    # remove trailing .exe if any
39863    new_path="${new_path/%.exe/}"
39864
39865    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39866    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39867  fi
39868
39869  else
39870    # We're on a unix platform. Hooray! :)
39871    # First separate the path from the arguments. This will split at the first
39872    # space.
39873    complete="$BUILD_CC"
39874    path="${complete%% *}"
39875    tmp="$complete EOL"
39876    arguments="${tmp#* }"
39877
39878    # Cannot rely on the command "which" here since it doesn't always work.
39879    is_absolute_path=`$ECHO "$path" | $GREP ^/`
39880    if test -z "$is_absolute_path"; then
39881      # Path to executable is not absolute. Find it.
39882      IFS_save="$IFS"
39883      IFS=:
39884      for p in $PATH; do
39885        if test -f "$p/$path" && test -x "$p/$path"; then
39886          new_path="$p/$path"
39887          break
39888        fi
39889      done
39890      IFS="$IFS_save"
39891    else
39892      # This is an absolute path, we can use it without further modifications.
39893      new_path="$path"
39894    fi
39895
39896    if test "x$new_path" = x; then
39897      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39898$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39899      has_space=`$ECHO "$complete" | $GREP " "`
39900      if test "x$has_space" != x; then
39901        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39902$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39903      fi
39904      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39905    fi
39906  fi
39907
39908  # Now join together the path and the arguments once again
39909  if test "x$arguments" != xEOL; then
39910    new_complete="$new_path ${arguments% *}"
39911  else
39912    new_complete="$new_path"
39913  fi
39914
39915  if test "x$complete" != "x$new_complete"; then
39916    BUILD_CC="$new_complete"
39917    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
39918$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
39919  fi
39920
39921
39922
39923  # Publish this variable in the help.
39924
39925
39926  if test "x$BUILD_CXX" = x; then
39927    # The variable is not set by user, try to locate tool using the code snippet
39928    for ac_prog in cl CC g++
39929do
39930  # Extract the first word of "$ac_prog", so it can be a program name with args.
39931set dummy $ac_prog; ac_word=$2
39932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39933$as_echo_n "checking for $ac_word... " >&6; }
39934if ${ac_cv_path_BUILD_CXX+:} false; then :
39935  $as_echo_n "(cached) " >&6
39936else
39937  case $BUILD_CXX in
39938  [\\/]* | ?:[\\/]*)
39939  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39940  ;;
39941  *)
39942  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39943for as_dir in $PATH
39944do
39945  IFS=$as_save_IFS
39946  test -z "$as_dir" && as_dir=.
39947    for ac_exec_ext in '' $ac_executable_extensions; do
39948  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39949    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39950    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39951    break 2
39952  fi
39953done
39954  done
39955IFS=$as_save_IFS
39956
39957  ;;
39958esac
39959fi
39960BUILD_CXX=$ac_cv_path_BUILD_CXX
39961if test -n "$BUILD_CXX"; then
39962  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39963$as_echo "$BUILD_CXX" >&6; }
39964else
39965  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39966$as_echo "no" >&6; }
39967fi
39968
39969
39970  test -n "$BUILD_CXX" && break
39971done
39972
39973  else
39974    # The variable is set, but is it from the command line or the environment?
39975
39976    # Try to remove the string !BUILD_CXX! from our list.
39977    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
39978    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39979      # If it failed, the variable was not from the command line. Ignore it,
39980      # but warn the user (except for BASH, which is always set by the calling BASH).
39981      if test "xBUILD_CXX" != xBASH; then
39982        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
39983$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
39984      fi
39985      # Try to locate tool using the code snippet
39986      for ac_prog in cl CC g++
39987do
39988  # Extract the first word of "$ac_prog", so it can be a program name with args.
39989set dummy $ac_prog; ac_word=$2
39990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39991$as_echo_n "checking for $ac_word... " >&6; }
39992if ${ac_cv_path_BUILD_CXX+:} false; then :
39993  $as_echo_n "(cached) " >&6
39994else
39995  case $BUILD_CXX in
39996  [\\/]* | ?:[\\/]*)
39997  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39998  ;;
39999  *)
40000  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40001for as_dir in $PATH
40002do
40003  IFS=$as_save_IFS
40004  test -z "$as_dir" && as_dir=.
40005    for ac_exec_ext in '' $ac_executable_extensions; do
40006  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40007    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
40008    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40009    break 2
40010  fi
40011done
40012  done
40013IFS=$as_save_IFS
40014
40015  ;;
40016esac
40017fi
40018BUILD_CXX=$ac_cv_path_BUILD_CXX
40019if test -n "$BUILD_CXX"; then
40020  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
40021$as_echo "$BUILD_CXX" >&6; }
40022else
40023  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40024$as_echo "no" >&6; }
40025fi
40026
40027
40028  test -n "$BUILD_CXX" && break
40029done
40030
40031    else
40032      # If it succeeded, then it was overridden by the user. We will use it
40033      # for the tool.
40034
40035      # First remove it from the list of overridden variables, so we can test
40036      # for unknown variables in the end.
40037      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40038
40039      # Check if the provided tool contains a complete path.
40040      tool_specified="$BUILD_CXX"
40041      tool_basename="${tool_specified##*/}"
40042      if test "x$tool_basename" = "x$tool_specified"; then
40043        # A command without a complete path is provided, search $PATH.
40044        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
40045$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
40046        # Extract the first word of "$tool_basename", so it can be a program name with args.
40047set dummy $tool_basename; ac_word=$2
40048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40049$as_echo_n "checking for $ac_word... " >&6; }
40050if ${ac_cv_path_BUILD_CXX+:} false; then :
40051  $as_echo_n "(cached) " >&6
40052else
40053  case $BUILD_CXX in
40054  [\\/]* | ?:[\\/]*)
40055  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
40056  ;;
40057  *)
40058  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40059for as_dir in $PATH
40060do
40061  IFS=$as_save_IFS
40062  test -z "$as_dir" && as_dir=.
40063    for ac_exec_ext in '' $ac_executable_extensions; do
40064  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40065    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
40066    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40067    break 2
40068  fi
40069done
40070  done
40071IFS=$as_save_IFS
40072
40073  ;;
40074esac
40075fi
40076BUILD_CXX=$ac_cv_path_BUILD_CXX
40077if test -n "$BUILD_CXX"; then
40078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
40079$as_echo "$BUILD_CXX" >&6; }
40080else
40081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40082$as_echo "no" >&6; }
40083fi
40084
40085
40086        if test "x$BUILD_CXX" = x; then
40087          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40088        fi
40089      else
40090        # Otherwise we believe it is a complete path. Use it as it is.
40091        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
40092$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
40093        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
40094$as_echo_n "checking for BUILD_CXX... " >&6; }
40095        if test ! -x "$tool_specified"; then
40096          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40097$as_echo "not found" >&6; }
40098          as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
40099        fi
40100        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40101$as_echo "$tool_specified" >&6; }
40102      fi
40103    fi
40104  fi
40105
40106
40107
40108  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40109
40110  # First separate the path from the arguments. This will split at the first
40111  # space.
40112  complete="$BUILD_CXX"
40113  path="${complete%% *}"
40114  tmp="$complete EOL"
40115  arguments="${tmp#* }"
40116
40117  # Input might be given as Windows format, start by converting to
40118  # unix format.
40119  new_path=`$CYGPATH -u "$path"`
40120
40121  # Now try to locate executable using which
40122  new_path=`$WHICH "$new_path" 2> /dev/null`
40123  # bat and cmd files are not always considered executable in cygwin causing which
40124  # to not find them
40125  if test "x$new_path" = x \
40126      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40127      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40128    new_path=`$CYGPATH -u "$path"`
40129  fi
40130  if test "x$new_path" = x; then
40131    # Oops. Which didn't find the executable.
40132    # The splitting of arguments from the executable at a space might have been incorrect,
40133    # since paths with space are more likely in Windows. Give it another try with the whole
40134    # argument.
40135    path="$complete"
40136    arguments="EOL"
40137    new_path=`$CYGPATH -u "$path"`
40138    new_path=`$WHICH "$new_path" 2> /dev/null`
40139    # bat and cmd files are not always considered executable in cygwin causing which
40140    # to not find them
40141    if test "x$new_path" = x \
40142        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40143        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40144      new_path=`$CYGPATH -u "$path"`
40145    fi
40146    if test "x$new_path" = x; then
40147      # It's still not found. Now this is an unrecoverable error.
40148      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40149$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40150      has_space=`$ECHO "$complete" | $GREP " "`
40151      if test "x$has_space" != x; then
40152        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40153$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40154      fi
40155      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40156    fi
40157  fi
40158
40159  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40160  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40161  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40162  # "foo.exe" is OK but "foo" is an error.
40163  #
40164  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40165  # It is also a way to make sure we got the proper file name for the real test later on.
40166  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40167  if test "x$test_shortpath" = x; then
40168    # Short path failed, file does not exist as specified.
40169    # Try adding .exe or .cmd
40170    if test -f "${new_path}.exe"; then
40171      input_to_shortpath="${new_path}.exe"
40172    elif test -f "${new_path}.cmd"; then
40173      input_to_shortpath="${new_path}.cmd"
40174    else
40175      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
40176$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
40177      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40178$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40179      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40180    fi
40181  else
40182    input_to_shortpath="$new_path"
40183  fi
40184
40185  # Call helper function which possibly converts this using DOS-style short mode.
40186  # If so, the updated path is stored in $new_path.
40187  new_path="$input_to_shortpath"
40188
40189  input_path="$input_to_shortpath"
40190  # Check if we need to convert this using DOS-style short mode. If the path
40191  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40192  # take no chances and rewrite it.
40193  # Note: m4 eats our [], so we need to use [ and ] instead.
40194  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40195  if test "x$has_forbidden_chars" != x; then
40196    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40197    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40198    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40199    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40200      # Going to short mode and back again did indeed matter. Since short mode is
40201      # case insensitive, let's make it lowercase to improve readability.
40202      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40203      # Now convert it back to Unix-stile (cygpath)
40204      input_path=`$CYGPATH -u "$shortmode_path"`
40205      new_path="$input_path"
40206    fi
40207  fi
40208
40209  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40210  if test "x$test_cygdrive_prefix" = x; then
40211    # As a simple fix, exclude /usr/bin since it's not a real path.
40212    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40213      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40214      # a path prefixed by /cygdrive for fixpath to work.
40215      new_path="$CYGWIN_ROOT_PATH$input_path"
40216    fi
40217  fi
40218
40219  # remove trailing .exe if any
40220  new_path="${new_path/%.exe/}"
40221
40222  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40223
40224  # First separate the path from the arguments. This will split at the first
40225  # space.
40226  complete="$BUILD_CXX"
40227  path="${complete%% *}"
40228  tmp="$complete EOL"
40229  arguments="${tmp#* }"
40230
40231  # Input might be given as Windows format, start by converting to
40232  # unix format.
40233  new_path="$path"
40234
40235  windows_path="$new_path"
40236  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40237    unix_path=`$CYGPATH -u "$windows_path"`
40238    new_path="$unix_path"
40239  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40240    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40241    new_path="$unix_path"
40242  fi
40243
40244
40245  # Now try to locate executable using which
40246  new_path=`$WHICH "$new_path" 2> /dev/null`
40247
40248  if test "x$new_path" = x; then
40249    # Oops. Which didn't find the executable.
40250    # The splitting of arguments from the executable at a space might have been incorrect,
40251    # since paths with space are more likely in Windows. Give it another try with the whole
40252    # argument.
40253    path="$complete"
40254    arguments="EOL"
40255    new_path="$path"
40256
40257  windows_path="$new_path"
40258  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40259    unix_path=`$CYGPATH -u "$windows_path"`
40260    new_path="$unix_path"
40261  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40262    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40263    new_path="$unix_path"
40264  fi
40265
40266
40267    new_path=`$WHICH "$new_path" 2> /dev/null`
40268    # bat and cmd files are not always considered executable in MSYS causing which
40269    # to not find them
40270    if test "x$new_path" = x \
40271        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40272        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40273      new_path="$path"
40274
40275  windows_path="$new_path"
40276  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40277    unix_path=`$CYGPATH -u "$windows_path"`
40278    new_path="$unix_path"
40279  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40280    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40281    new_path="$unix_path"
40282  fi
40283
40284    fi
40285
40286    if test "x$new_path" = x; then
40287      # It's still not found. Now this is an unrecoverable error.
40288      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40289$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40290      has_space=`$ECHO "$complete" | $GREP " "`
40291      if test "x$has_space" != x; then
40292        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40293$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40294      fi
40295      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40296    fi
40297  fi
40298
40299  # Now new_path has a complete unix path to the binary
40300  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40301    # Keep paths in /bin as-is, but remove trailing .exe if any
40302    new_path="${new_path/%.exe/}"
40303    # Do not save /bin paths to all_fixpath_prefixes!
40304  else
40305    # Not in mixed or Windows style, start by that.
40306    new_path=`cmd //c echo $new_path`
40307
40308  input_path="$new_path"
40309  # Check if we need to convert this using DOS-style short mode. If the path
40310  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40311  # take no chances and rewrite it.
40312  # Note: m4 eats our [], so we need to use [ and ] instead.
40313  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40314  if test "x$has_forbidden_chars" != x; then
40315    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40316    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40317  fi
40318
40319    # Output is in $new_path
40320
40321  windows_path="$new_path"
40322  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40323    unix_path=`$CYGPATH -u "$windows_path"`
40324    new_path="$unix_path"
40325  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40326    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40327    new_path="$unix_path"
40328  fi
40329
40330    # remove trailing .exe if any
40331    new_path="${new_path/%.exe/}"
40332
40333    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40334    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40335  fi
40336
40337  else
40338    # We're on a unix platform. Hooray! :)
40339    # First separate the path from the arguments. This will split at the first
40340    # space.
40341    complete="$BUILD_CXX"
40342    path="${complete%% *}"
40343    tmp="$complete EOL"
40344    arguments="${tmp#* }"
40345
40346    # Cannot rely on the command "which" here since it doesn't always work.
40347    is_absolute_path=`$ECHO "$path" | $GREP ^/`
40348    if test -z "$is_absolute_path"; then
40349      # Path to executable is not absolute. Find it.
40350      IFS_save="$IFS"
40351      IFS=:
40352      for p in $PATH; do
40353        if test -f "$p/$path" && test -x "$p/$path"; then
40354          new_path="$p/$path"
40355          break
40356        fi
40357      done
40358      IFS="$IFS_save"
40359    else
40360      # This is an absolute path, we can use it without further modifications.
40361      new_path="$path"
40362    fi
40363
40364    if test "x$new_path" = x; then
40365      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40366$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40367      has_space=`$ECHO "$complete" | $GREP " "`
40368      if test "x$has_space" != x; then
40369        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40370$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40371      fi
40372      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40373    fi
40374  fi
40375
40376  # Now join together the path and the arguments once again
40377  if test "x$arguments" != xEOL; then
40378    new_complete="$new_path ${arguments% *}"
40379  else
40380    new_complete="$new_path"
40381  fi
40382
40383  if test "x$complete" != "x$new_complete"; then
40384    BUILD_CXX="$new_complete"
40385    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
40386$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
40387  fi
40388
40389
40390
40391  # Publish this variable in the help.
40392
40393
40394  if test "x$BUILD_LD" = x; then
40395    # The variable is not set by user, try to locate tool using the code snippet
40396    for ac_prog in ld
40397do
40398  # Extract the first word of "$ac_prog", so it can be a program name with args.
40399set dummy $ac_prog; ac_word=$2
40400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40401$as_echo_n "checking for $ac_word... " >&6; }
40402if ${ac_cv_path_BUILD_LD+:} false; then :
40403  $as_echo_n "(cached) " >&6
40404else
40405  case $BUILD_LD in
40406  [\\/]* | ?:[\\/]*)
40407  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40408  ;;
40409  *)
40410  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40411for as_dir in $PATH
40412do
40413  IFS=$as_save_IFS
40414  test -z "$as_dir" && as_dir=.
40415    for ac_exec_ext in '' $ac_executable_extensions; do
40416  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40417    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40418    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40419    break 2
40420  fi
40421done
40422  done
40423IFS=$as_save_IFS
40424
40425  ;;
40426esac
40427fi
40428BUILD_LD=$ac_cv_path_BUILD_LD
40429if test -n "$BUILD_LD"; then
40430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40431$as_echo "$BUILD_LD" >&6; }
40432else
40433  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40434$as_echo "no" >&6; }
40435fi
40436
40437
40438  test -n "$BUILD_LD" && break
40439done
40440
40441  else
40442    # The variable is set, but is it from the command line or the environment?
40443
40444    # Try to remove the string !BUILD_LD! from our list.
40445    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_LD!/}
40446    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40447      # If it failed, the variable was not from the command line. Ignore it,
40448      # but warn the user (except for BASH, which is always set by the calling BASH).
40449      if test "xBUILD_LD" != xBASH; then
40450        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&5
40451$as_echo "$as_me: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&2;}
40452      fi
40453      # Try to locate tool using the code snippet
40454      for ac_prog in ld
40455do
40456  # Extract the first word of "$ac_prog", so it can be a program name with args.
40457set dummy $ac_prog; ac_word=$2
40458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40459$as_echo_n "checking for $ac_word... " >&6; }
40460if ${ac_cv_path_BUILD_LD+:} false; then :
40461  $as_echo_n "(cached) " >&6
40462else
40463  case $BUILD_LD in
40464  [\\/]* | ?:[\\/]*)
40465  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40466  ;;
40467  *)
40468  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40469for as_dir in $PATH
40470do
40471  IFS=$as_save_IFS
40472  test -z "$as_dir" && as_dir=.
40473    for ac_exec_ext in '' $ac_executable_extensions; do
40474  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40475    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40476    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40477    break 2
40478  fi
40479done
40480  done
40481IFS=$as_save_IFS
40482
40483  ;;
40484esac
40485fi
40486BUILD_LD=$ac_cv_path_BUILD_LD
40487if test -n "$BUILD_LD"; then
40488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40489$as_echo "$BUILD_LD" >&6; }
40490else
40491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40492$as_echo "no" >&6; }
40493fi
40494
40495
40496  test -n "$BUILD_LD" && break
40497done
40498
40499    else
40500      # If it succeeded, then it was overridden by the user. We will use it
40501      # for the tool.
40502
40503      # First remove it from the list of overridden variables, so we can test
40504      # for unknown variables in the end.
40505      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40506
40507      # Check if the provided tool contains a complete path.
40508      tool_specified="$BUILD_LD"
40509      tool_basename="${tool_specified##*/}"
40510      if test "x$tool_basename" = "x$tool_specified"; then
40511        # A command without a complete path is provided, search $PATH.
40512        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_LD=$tool_basename" >&5
40513$as_echo "$as_me: Will search for user supplied tool BUILD_LD=$tool_basename" >&6;}
40514        # Extract the first word of "$tool_basename", so it can be a program name with args.
40515set dummy $tool_basename; ac_word=$2
40516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40517$as_echo_n "checking for $ac_word... " >&6; }
40518if ${ac_cv_path_BUILD_LD+:} false; then :
40519  $as_echo_n "(cached) " >&6
40520else
40521  case $BUILD_LD in
40522  [\\/]* | ?:[\\/]*)
40523  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40524  ;;
40525  *)
40526  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40527for as_dir in $PATH
40528do
40529  IFS=$as_save_IFS
40530  test -z "$as_dir" && as_dir=.
40531    for ac_exec_ext in '' $ac_executable_extensions; do
40532  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40533    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40534    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40535    break 2
40536  fi
40537done
40538  done
40539IFS=$as_save_IFS
40540
40541  ;;
40542esac
40543fi
40544BUILD_LD=$ac_cv_path_BUILD_LD
40545if test -n "$BUILD_LD"; then
40546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40547$as_echo "$BUILD_LD" >&6; }
40548else
40549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40550$as_echo "no" >&6; }
40551fi
40552
40553
40554        if test "x$BUILD_LD" = x; then
40555          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40556        fi
40557      else
40558        # Otherwise we believe it is a complete path. Use it as it is.
40559        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_LD=$tool_specified" >&5
40560$as_echo "$as_me: Will use user supplied tool BUILD_LD=$tool_specified" >&6;}
40561        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_LD" >&5
40562$as_echo_n "checking for BUILD_LD... " >&6; }
40563        if test ! -x "$tool_specified"; then
40564          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40565$as_echo "not found" >&6; }
40566          as_fn_error $? "User supplied tool BUILD_LD=$tool_specified does not exist or is not executable" "$LINENO" 5
40567        fi
40568        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40569$as_echo "$tool_specified" >&6; }
40570      fi
40571    fi
40572  fi
40573
40574
40575
40576  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40577
40578  # First separate the path from the arguments. This will split at the first
40579  # space.
40580  complete="$BUILD_LD"
40581  path="${complete%% *}"
40582  tmp="$complete EOL"
40583  arguments="${tmp#* }"
40584
40585  # Input might be given as Windows format, start by converting to
40586  # unix format.
40587  new_path=`$CYGPATH -u "$path"`
40588
40589  # Now try to locate executable using which
40590  new_path=`$WHICH "$new_path" 2> /dev/null`
40591  # bat and cmd files are not always considered executable in cygwin causing which
40592  # to not find them
40593  if test "x$new_path" = x \
40594      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40595      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40596    new_path=`$CYGPATH -u "$path"`
40597  fi
40598  if test "x$new_path" = x; then
40599    # Oops. Which didn't find the executable.
40600    # The splitting of arguments from the executable at a space might have been incorrect,
40601    # since paths with space are more likely in Windows. Give it another try with the whole
40602    # argument.
40603    path="$complete"
40604    arguments="EOL"
40605    new_path=`$CYGPATH -u "$path"`
40606    new_path=`$WHICH "$new_path" 2> /dev/null`
40607    # bat and cmd files are not always considered executable in cygwin causing which
40608    # to not find them
40609    if test "x$new_path" = x \
40610        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40611        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40612      new_path=`$CYGPATH -u "$path"`
40613    fi
40614    if test "x$new_path" = x; then
40615      # It's still not found. Now this is an unrecoverable error.
40616      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40617$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40618      has_space=`$ECHO "$complete" | $GREP " "`
40619      if test "x$has_space" != x; then
40620        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40621$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40622      fi
40623      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40624    fi
40625  fi
40626
40627  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40628  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40629  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40630  # "foo.exe" is OK but "foo" is an error.
40631  #
40632  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40633  # It is also a way to make sure we got the proper file name for the real test later on.
40634  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40635  if test "x$test_shortpath" = x; then
40636    # Short path failed, file does not exist as specified.
40637    # Try adding .exe or .cmd
40638    if test -f "${new_path}.exe"; then
40639      input_to_shortpath="${new_path}.exe"
40640    elif test -f "${new_path}.cmd"; then
40641      input_to_shortpath="${new_path}.cmd"
40642    else
40643      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
40644$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
40645      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40646$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40647      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40648    fi
40649  else
40650    input_to_shortpath="$new_path"
40651  fi
40652
40653  # Call helper function which possibly converts this using DOS-style short mode.
40654  # If so, the updated path is stored in $new_path.
40655  new_path="$input_to_shortpath"
40656
40657  input_path="$input_to_shortpath"
40658  # Check if we need to convert this using DOS-style short mode. If the path
40659  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40660  # take no chances and rewrite it.
40661  # Note: m4 eats our [], so we need to use [ and ] instead.
40662  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40663  if test "x$has_forbidden_chars" != x; then
40664    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40665    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40666    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40667    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40668      # Going to short mode and back again did indeed matter. Since short mode is
40669      # case insensitive, let's make it lowercase to improve readability.
40670      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40671      # Now convert it back to Unix-stile (cygpath)
40672      input_path=`$CYGPATH -u "$shortmode_path"`
40673      new_path="$input_path"
40674    fi
40675  fi
40676
40677  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40678  if test "x$test_cygdrive_prefix" = x; then
40679    # As a simple fix, exclude /usr/bin since it's not a real path.
40680    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40681      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40682      # a path prefixed by /cygdrive for fixpath to work.
40683      new_path="$CYGWIN_ROOT_PATH$input_path"
40684    fi
40685  fi
40686
40687  # remove trailing .exe if any
40688  new_path="${new_path/%.exe/}"
40689
40690  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40691
40692  # First separate the path from the arguments. This will split at the first
40693  # space.
40694  complete="$BUILD_LD"
40695  path="${complete%% *}"
40696  tmp="$complete EOL"
40697  arguments="${tmp#* }"
40698
40699  # Input might be given as Windows format, start by converting to
40700  # unix format.
40701  new_path="$path"
40702
40703  windows_path="$new_path"
40704  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40705    unix_path=`$CYGPATH -u "$windows_path"`
40706    new_path="$unix_path"
40707  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40708    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40709    new_path="$unix_path"
40710  fi
40711
40712
40713  # Now try to locate executable using which
40714  new_path=`$WHICH "$new_path" 2> /dev/null`
40715
40716  if test "x$new_path" = x; then
40717    # Oops. Which didn't find the executable.
40718    # The splitting of arguments from the executable at a space might have been incorrect,
40719    # since paths with space are more likely in Windows. Give it another try with the whole
40720    # argument.
40721    path="$complete"
40722    arguments="EOL"
40723    new_path="$path"
40724
40725  windows_path="$new_path"
40726  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40727    unix_path=`$CYGPATH -u "$windows_path"`
40728    new_path="$unix_path"
40729  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40730    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40731    new_path="$unix_path"
40732  fi
40733
40734
40735    new_path=`$WHICH "$new_path" 2> /dev/null`
40736    # bat and cmd files are not always considered executable in MSYS causing which
40737    # to not find them
40738    if test "x$new_path" = x \
40739        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40740        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40741      new_path="$path"
40742
40743  windows_path="$new_path"
40744  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40745    unix_path=`$CYGPATH -u "$windows_path"`
40746    new_path="$unix_path"
40747  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40748    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40749    new_path="$unix_path"
40750  fi
40751
40752    fi
40753
40754    if test "x$new_path" = x; then
40755      # It's still not found. Now this is an unrecoverable error.
40756      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40757$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40758      has_space=`$ECHO "$complete" | $GREP " "`
40759      if test "x$has_space" != x; then
40760        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40761$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40762      fi
40763      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40764    fi
40765  fi
40766
40767  # Now new_path has a complete unix path to the binary
40768  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40769    # Keep paths in /bin as-is, but remove trailing .exe if any
40770    new_path="${new_path/%.exe/}"
40771    # Do not save /bin paths to all_fixpath_prefixes!
40772  else
40773    # Not in mixed or Windows style, start by that.
40774    new_path=`cmd //c echo $new_path`
40775
40776  input_path="$new_path"
40777  # Check if we need to convert this using DOS-style short mode. If the path
40778  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40779  # take no chances and rewrite it.
40780  # Note: m4 eats our [], so we need to use [ and ] instead.
40781  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40782  if test "x$has_forbidden_chars" != x; then
40783    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40784    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40785  fi
40786
40787    # Output is in $new_path
40788
40789  windows_path="$new_path"
40790  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40791    unix_path=`$CYGPATH -u "$windows_path"`
40792    new_path="$unix_path"
40793  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40794    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40795    new_path="$unix_path"
40796  fi
40797
40798    # remove trailing .exe if any
40799    new_path="${new_path/%.exe/}"
40800
40801    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40802    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40803  fi
40804
40805  else
40806    # We're on a unix platform. Hooray! :)
40807    # First separate the path from the arguments. This will split at the first
40808    # space.
40809    complete="$BUILD_LD"
40810    path="${complete%% *}"
40811    tmp="$complete EOL"
40812    arguments="${tmp#* }"
40813
40814    # Cannot rely on the command "which" here since it doesn't always work.
40815    is_absolute_path=`$ECHO "$path" | $GREP ^/`
40816    if test -z "$is_absolute_path"; then
40817      # Path to executable is not absolute. Find it.
40818      IFS_save="$IFS"
40819      IFS=:
40820      for p in $PATH; do
40821        if test -f "$p/$path" && test -x "$p/$path"; then
40822          new_path="$p/$path"
40823          break
40824        fi
40825      done
40826      IFS="$IFS_save"
40827    else
40828      # This is an absolute path, we can use it without further modifications.
40829      new_path="$path"
40830    fi
40831
40832    if test "x$new_path" = x; then
40833      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40834$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40835      has_space=`$ECHO "$complete" | $GREP " "`
40836      if test "x$has_space" != x; then
40837        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40838$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40839      fi
40840      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40841    fi
40842  fi
40843
40844  # Now join together the path and the arguments once again
40845  if test "x$arguments" != xEOL; then
40846    new_complete="$new_path ${arguments% *}"
40847  else
40848    new_complete="$new_path"
40849  fi
40850
40851  if test "x$complete" != "x$new_complete"; then
40852    BUILD_LD="$new_complete"
40853    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
40854$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
40855  fi
40856
40857  else
40858    # If we are not cross compiling, use the normal target compilers for
40859    # building the build platform executables.
40860    BUILD_CC="$CC"
40861    BUILD_CXX="$CXX"
40862    BUILD_LD="$LD"
40863  fi
40864
40865
40866
40867
40868
40869
40870  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40871    # For hotspot, we need these in Windows mixed path,
40872    # so rewrite them all. Need added .exe suffix.
40873    HOTSPOT_CXX="$CXX.exe"
40874    HOTSPOT_LD="$LD.exe"
40875    HOTSPOT_MT="$MT.exe"
40876    HOTSPOT_RC="$RC.exe"
40877
40878  unix_path="$HOTSPOT_CXX"
40879  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40880    windows_path=`$CYGPATH -m "$unix_path"`
40881    HOTSPOT_CXX="$windows_path"
40882  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40883    windows_path=`cmd //c echo $unix_path`
40884    HOTSPOT_CXX="$windows_path"
40885  fi
40886
40887
40888  unix_path="$HOTSPOT_LD"
40889  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40890    windows_path=`$CYGPATH -m "$unix_path"`
40891    HOTSPOT_LD="$windows_path"
40892  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40893    windows_path=`cmd //c echo $unix_path`
40894    HOTSPOT_LD="$windows_path"
40895  fi
40896
40897
40898  unix_path="$HOTSPOT_MT"
40899  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40900    windows_path=`$CYGPATH -m "$unix_path"`
40901    HOTSPOT_MT="$windows_path"
40902  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40903    windows_path=`cmd //c echo $unix_path`
40904    HOTSPOT_MT="$windows_path"
40905  fi
40906
40907
40908  unix_path="$HOTSPOT_RC"
40909  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40910    windows_path=`$CYGPATH -m "$unix_path"`
40911    HOTSPOT_RC="$windows_path"
40912  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40913    windows_path=`cmd //c echo $unix_path`
40914    HOTSPOT_RC="$windows_path"
40915  fi
40916
40917
40918
40919  else
40920    HOTSPOT_CXX="$CXX"
40921    HOTSPOT_LD="$LD"
40922  fi
40923
40924
40925
40926  if test  "x$TOOLCHAIN_TYPE" = xclang; then
40927    USE_CLANG=true
40928  fi
40929
40930
40931  # LDEXE is the linker to use, when creating executables. Not really used.
40932  # FIXME: These should just be removed!
40933  LDEXE="$LD"
40934  LDEXECXX="$LDCXX"
40935
40936
40937
40938
40939
40940
40941  # The package path is used only on macosx?
40942  # FIXME: clean this up, and/or move it elsewhere.
40943  PACKAGE_PATH=/opt/local
40944
40945
40946  # Check for extra potential brokenness.
40947  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40948    # On Windows, double-check that we got the right compiler.
40949    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
40950    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
40951    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
40952      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
40953        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
40954      fi
40955    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
40956      if test "x$COMPILER_CPU_TEST" != "xx64"; then
40957        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
40958      fi
40959    fi
40960  fi
40961
40962  if test "x$TOOLCHAIN_TYPE" = xgcc; then
40963    # If this is a --hash-style=gnu system, use --hash-style=both, why?
40964    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
40965    # This is later checked when setting flags.
40966
40967    # "-Og" suppported for GCC 4.8 and later
40968    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
40969
40970  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
40971$as_echo_n "checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
40972  supports=yes
40973
40974  saved_cflags="$CFLAGS"
40975  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
40976  ac_ext=c
40977ac_cpp='$CPP $CPPFLAGS'
40978ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40979ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40980ac_compiler_gnu=$ac_cv_c_compiler_gnu
40981
40982  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40983/* end confdefs.h.  */
40984int i;
40985_ACEOF
40986if ac_fn_c_try_compile "$LINENO"; then :
40987
40988else
40989  supports=no
40990fi
40991rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40992  ac_ext=cpp
40993ac_cpp='$CXXCPP $CPPFLAGS'
40994ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40995ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40996ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40997
40998  CFLAGS="$saved_cflags"
40999
41000  saved_cxxflags="$CXXFLAGS"
41001  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
41002  ac_ext=cpp
41003ac_cpp='$CXXCPP $CPPFLAGS'
41004ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41005ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41006ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41007
41008  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41009/* end confdefs.h.  */
41010int i;
41011_ACEOF
41012if ac_fn_cxx_try_compile "$LINENO"; then :
41013
41014else
41015  supports=no
41016fi
41017rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41018  ac_ext=cpp
41019ac_cpp='$CXXCPP $CPPFLAGS'
41020ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41021ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41022ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41023
41024  CXXFLAGS="$saved_cxxflags"
41025
41026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41027$as_echo "$supports" >&6; }
41028  if test "x$supports" = "xyes" ; then
41029    HAS_CFLAG_OPTIMIZE_DEBUG=true
41030  else
41031    HAS_CFLAG_OPTIMIZE_DEBUG=false
41032  fi
41033
41034
41035    # "-fsanitize=undefined" supported for GCC 4.9 and later
41036    CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG="-fsanitize=undefined -fsanitize-recover"
41037
41038  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG\"" >&5
41039$as_echo_n "checking if compiler supports \"$CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG\"... " >&6; }
41040  supports=yes
41041
41042  saved_cflags="$CFLAGS"
41043  CFLAGS="$CFLAGS $CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG"
41044  ac_ext=c
41045ac_cpp='$CPP $CPPFLAGS'
41046ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41047ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41048ac_compiler_gnu=$ac_cv_c_compiler_gnu
41049
41050  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41051/* end confdefs.h.  */
41052int i;
41053_ACEOF
41054if ac_fn_c_try_compile "$LINENO"; then :
41055
41056else
41057  supports=no
41058fi
41059rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41060  ac_ext=cpp
41061ac_cpp='$CXXCPP $CPPFLAGS'
41062ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41063ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41064ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41065
41066  CFLAGS="$saved_cflags"
41067
41068  saved_cxxflags="$CXXFLAGS"
41069  CXXFLAGS="$CXXFLAG $CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG"
41070  ac_ext=cpp
41071ac_cpp='$CXXCPP $CPPFLAGS'
41072ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41073ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41074ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41075
41076  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41077/* end confdefs.h.  */
41078int i;
41079_ACEOF
41080if ac_fn_cxx_try_compile "$LINENO"; then :
41081
41082else
41083  supports=no
41084fi
41085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41086  ac_ext=cpp
41087ac_cpp='$CXXCPP $CPPFLAGS'
41088ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41089ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41090ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41091
41092  CXXFLAGS="$saved_cxxflags"
41093
41094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41095$as_echo "$supports" >&6; }
41096  if test "x$supports" = "xyes" ; then
41097    HAS_CFLAG_DETECT_UNDEFINED_BEHAVIOR=true
41098  else
41099    HAS_CFLAG_DETECT_UNDEFINED_BEHAVIOR=false
41100  fi
41101
41102
41103    # "-z relro" supported in GNU binutils 2.17 and later
41104    LINKER_RELRO_FLAG="-Xlinker -z -Xlinker relro"
41105
41106  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
41107$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
41108  supports=yes
41109
41110  saved_ldflags="$LDFLAGS"
41111  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
41112  ac_ext=c
41113ac_cpp='$CPP $CPPFLAGS'
41114ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41115ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41116ac_compiler_gnu=$ac_cv_c_compiler_gnu
41117
41118  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41119/* end confdefs.h.  */
41120
41121int
41122main ()
41123{
41124
41125  ;
41126  return 0;
41127}
41128_ACEOF
41129if ac_fn_c_try_link "$LINENO"; then :
41130
41131else
41132  supports=no
41133fi
41134rm -f core conftest.err conftest.$ac_objext \
41135    conftest$ac_exeext conftest.$ac_ext
41136  ac_ext=cpp
41137ac_cpp='$CXXCPP $CPPFLAGS'
41138ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41139ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41140ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41141
41142  LDFLAGS="$saved_ldflags"
41143
41144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41145$as_echo "$supports" >&6; }
41146  if test "x$supports" = "xyes" ; then
41147    HAS_LINKER_RELRO=true
41148  else
41149    HAS_LINKER_RELRO=false
41150  fi
41151
41152
41153    # "-z now" supported in GNU binutils 2.11 and later
41154    LINKER_NOW_FLAG="-Xlinker -z -Xlinker now"
41155
41156  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
41157$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
41158  supports=yes
41159
41160  saved_ldflags="$LDFLAGS"
41161  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
41162  ac_ext=c
41163ac_cpp='$CPP $CPPFLAGS'
41164ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41165ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41166ac_compiler_gnu=$ac_cv_c_compiler_gnu
41167
41168  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41169/* end confdefs.h.  */
41170
41171int
41172main ()
41173{
41174
41175  ;
41176  return 0;
41177}
41178_ACEOF
41179if ac_fn_c_try_link "$LINENO"; then :
41180
41181else
41182  supports=no
41183fi
41184rm -f core conftest.err conftest.$ac_objext \
41185    conftest$ac_exeext conftest.$ac_ext
41186  ac_ext=cpp
41187ac_cpp='$CXXCPP $CPPFLAGS'
41188ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41189ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41190ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41191
41192  LDFLAGS="$saved_ldflags"
41193
41194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41195$as_echo "$supports" >&6; }
41196  if test "x$supports" = "xyes" ; then
41197    HAS_LINKER_NOW=true
41198  else
41199    HAS_LINKER_NOW=false
41200  fi
41201
41202  fi
41203
41204  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
41205  # in executable.'
41206  USING_BROKEN_SUSE_LD=no
41207  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
41208    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
41209$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
41210    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
41211    $ECHO "int main() { }" > main.c
41212    if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
41213      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41214$as_echo "no" >&6; }
41215      USING_BROKEN_SUSE_LD=no
41216    else
41217      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41218$as_echo "yes" >&6; }
41219      USING_BROKEN_SUSE_LD=yes
41220    fi
41221    rm -rf version-script.map main.c a.out
41222  fi
41223
41224
41225
41226# Setup the JTReg Regression Test Harness.
41227
41228
41229# Check whether --with-jtreg was given.
41230if test "${with_jtreg+set}" = set; then :
41231  withval=$with_jtreg;
41232else
41233  with_jtreg=no
41234fi
41235
41236
41237  if test "x$with_jtreg" = xno; then
41238    # jtreg disabled
41239    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
41240$as_echo_n "checking for jtreg... " >&6; }
41241    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41242$as_echo "no" >&6; }
41243  else
41244    if test "x$with_jtreg" != xyes; then
41245      # with path specified.
41246      JT_HOME="$with_jtreg"
41247    fi
41248
41249    if test "x$JT_HOME" != x; then
41250      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
41251$as_echo_n "checking for jtreg... " >&6; }
41252
41253      # use JT_HOME enviroment var.
41254
41255  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41256
41257  # Input might be given as Windows format, start by converting to
41258  # unix format.
41259  path="$JT_HOME"
41260  new_path=`$CYGPATH -u "$path"`
41261
41262  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41263  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41264  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41265  # "foo.exe" is OK but "foo" is an error.
41266  #
41267  # This test is therefore slightly more accurate than "test -f" to check for file precense.
41268  # It is also a way to make sure we got the proper file name for the real test later on.
41269  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41270  if test "x$test_shortpath" = x; then
41271    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
41272$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
41273    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
41274  fi
41275
41276  # Call helper function which possibly converts this using DOS-style short mode.
41277  # If so, the updated path is stored in $new_path.
41278
41279  input_path="$new_path"
41280  # Check if we need to convert this using DOS-style short mode. If the path
41281  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41282  # take no chances and rewrite it.
41283  # Note: m4 eats our [], so we need to use [ and ] instead.
41284  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41285  if test "x$has_forbidden_chars" != x; then
41286    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41287    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41288    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41289    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41290      # Going to short mode and back again did indeed matter. Since short mode is
41291      # case insensitive, let's make it lowercase to improve readability.
41292      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41293      # Now convert it back to Unix-stile (cygpath)
41294      input_path=`$CYGPATH -u "$shortmode_path"`
41295      new_path="$input_path"
41296    fi
41297  fi
41298
41299  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41300  if test "x$test_cygdrive_prefix" = x; then
41301    # As a simple fix, exclude /usr/bin since it's not a real path.
41302    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
41303      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41304      # a path prefixed by /cygdrive for fixpath to work.
41305      new_path="$CYGWIN_ROOT_PATH$input_path"
41306    fi
41307  fi
41308
41309
41310  if test "x$path" != "x$new_path"; then
41311    JT_HOME="$new_path"
41312    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
41313$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
41314  fi
41315
41316  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41317
41318  path="$JT_HOME"
41319  has_colon=`$ECHO $path | $GREP ^.:`
41320  new_path="$path"
41321  if test "x$has_colon" = x; then
41322    # Not in mixed or Windows style, start by that.
41323    new_path=`cmd //c echo $path`
41324  fi
41325
41326
41327  input_path="$new_path"
41328  # Check if we need to convert this using DOS-style short mode. If the path
41329  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41330  # take no chances and rewrite it.
41331  # Note: m4 eats our [], so we need to use [ and ] instead.
41332  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41333  if test "x$has_forbidden_chars" != x; then
41334    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41335    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41336  fi
41337
41338
41339  windows_path="$new_path"
41340  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41341    unix_path=`$CYGPATH -u "$windows_path"`
41342    new_path="$unix_path"
41343  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41344    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41345    new_path="$unix_path"
41346  fi
41347
41348  if test "x$path" != "x$new_path"; then
41349    JT_HOME="$new_path"
41350    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
41351$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
41352  fi
41353
41354  # Save the first 10 bytes of this path to the storage, so fixpath can work.
41355  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41356
41357  else
41358    # We're on a unix platform. Hooray! :)
41359    path="$JT_HOME"
41360    has_space=`$ECHO "$path" | $GREP " "`
41361    if test "x$has_space" != x; then
41362      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
41363$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
41364      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
41365    fi
41366
41367    # Use eval to expand a potential ~
41368    eval path="$path"
41369    if test ! -f "$path" && test ! -d "$path"; then
41370      as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
41371    fi
41372
41373    JT_HOME="`cd "$path"; $THEPWDCMD -L`"
41374  fi
41375
41376
41377      # jtreg win32 script works for everybody
41378      JTREGEXE="$JT_HOME/win32/bin/jtreg"
41379
41380      if test ! -f "$JTREGEXE"; then
41381        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
41382      fi
41383
41384      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41385$as_echo "$JTREGEXE" >&6; }
41386    else
41387      # try to find jtreg on path
41388
41389
41390
41391  # Publish this variable in the help.
41392
41393
41394  if test "x$JTREGEXE" = x; then
41395    # The variable is not set by user, try to locate tool using the code snippet
41396    for ac_prog in jtreg
41397do
41398  # Extract the first word of "$ac_prog", so it can be a program name with args.
41399set dummy $ac_prog; ac_word=$2
41400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41401$as_echo_n "checking for $ac_word... " >&6; }
41402if ${ac_cv_path_JTREGEXE+:} false; then :
41403  $as_echo_n "(cached) " >&6
41404else
41405  case $JTREGEXE in
41406  [\\/]* | ?:[\\/]*)
41407  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41408  ;;
41409  *)
41410  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41411for as_dir in $PATH
41412do
41413  IFS=$as_save_IFS
41414  test -z "$as_dir" && as_dir=.
41415    for ac_exec_ext in '' $ac_executable_extensions; do
41416  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41417    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41418    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41419    break 2
41420  fi
41421done
41422  done
41423IFS=$as_save_IFS
41424
41425  ;;
41426esac
41427fi
41428JTREGEXE=$ac_cv_path_JTREGEXE
41429if test -n "$JTREGEXE"; then
41430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41431$as_echo "$JTREGEXE" >&6; }
41432else
41433  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41434$as_echo "no" >&6; }
41435fi
41436
41437
41438  test -n "$JTREGEXE" && break
41439done
41440
41441  else
41442    # The variable is set, but is it from the command line or the environment?
41443
41444    # Try to remove the string !JTREGEXE! from our list.
41445    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
41446    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41447      # If it failed, the variable was not from the command line. Ignore it,
41448      # but warn the user (except for BASH, which is always set by the calling BASH).
41449      if test "xJTREGEXE" != xBASH; then
41450        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
41451$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
41452      fi
41453      # Try to locate tool using the code snippet
41454      for ac_prog in jtreg
41455do
41456  # Extract the first word of "$ac_prog", so it can be a program name with args.
41457set dummy $ac_prog; ac_word=$2
41458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41459$as_echo_n "checking for $ac_word... " >&6; }
41460if ${ac_cv_path_JTREGEXE+:} false; then :
41461  $as_echo_n "(cached) " >&6
41462else
41463  case $JTREGEXE in
41464  [\\/]* | ?:[\\/]*)
41465  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41466  ;;
41467  *)
41468  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41469for as_dir in $PATH
41470do
41471  IFS=$as_save_IFS
41472  test -z "$as_dir" && as_dir=.
41473    for ac_exec_ext in '' $ac_executable_extensions; do
41474  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41475    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41476    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41477    break 2
41478  fi
41479done
41480  done
41481IFS=$as_save_IFS
41482
41483  ;;
41484esac
41485fi
41486JTREGEXE=$ac_cv_path_JTREGEXE
41487if test -n "$JTREGEXE"; then
41488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41489$as_echo "$JTREGEXE" >&6; }
41490else
41491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41492$as_echo "no" >&6; }
41493fi
41494
41495
41496  test -n "$JTREGEXE" && break
41497done
41498
41499    else
41500      # If it succeeded, then it was overridden by the user. We will use it
41501      # for the tool.
41502
41503      # First remove it from the list of overridden variables, so we can test
41504      # for unknown variables in the end.
41505      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41506
41507      # Check if the provided tool contains a complete path.
41508      tool_specified="$JTREGEXE"
41509      tool_basename="${tool_specified##*/}"
41510      if test "x$tool_basename" = "x$tool_specified"; then
41511        # A command without a complete path is provided, search $PATH.
41512        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
41513$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
41514        # Extract the first word of "$tool_basename", so it can be a program name with args.
41515set dummy $tool_basename; ac_word=$2
41516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41517$as_echo_n "checking for $ac_word... " >&6; }
41518if ${ac_cv_path_JTREGEXE+:} false; then :
41519  $as_echo_n "(cached) " >&6
41520else
41521  case $JTREGEXE in
41522  [\\/]* | ?:[\\/]*)
41523  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41524  ;;
41525  *)
41526  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41527for as_dir in $PATH
41528do
41529  IFS=$as_save_IFS
41530  test -z "$as_dir" && as_dir=.
41531    for ac_exec_ext in '' $ac_executable_extensions; do
41532  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41533    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41534    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41535    break 2
41536  fi
41537done
41538  done
41539IFS=$as_save_IFS
41540
41541  ;;
41542esac
41543fi
41544JTREGEXE=$ac_cv_path_JTREGEXE
41545if test -n "$JTREGEXE"; then
41546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41547$as_echo "$JTREGEXE" >&6; }
41548else
41549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41550$as_echo "no" >&6; }
41551fi
41552
41553
41554        if test "x$JTREGEXE" = x; then
41555          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41556        fi
41557      else
41558        # Otherwise we believe it is a complete path. Use it as it is.
41559        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
41560$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
41561        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
41562$as_echo_n "checking for JTREGEXE... " >&6; }
41563        if test ! -x "$tool_specified"; then
41564          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41565$as_echo "not found" >&6; }
41566          as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
41567        fi
41568        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41569$as_echo "$tool_specified" >&6; }
41570      fi
41571    fi
41572  fi
41573
41574
41575
41576  if test "x$JTREGEXE" = x; then
41577    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
41578  fi
41579
41580
41581      JT_HOME="`$DIRNAME $JTREGEXE`"
41582    fi
41583  fi
41584
41585
41586
41587
41588
41589
41590  # Option used to tell the compiler whether to create 32- or 64-bit executables
41591  if test "x$TOOLCHAIN_TYPE" = xxlc; then
41592    COMPILER_TARGET_BITS_FLAG="-q"
41593  else
41594    COMPILER_TARGET_BITS_FLAG="-m"
41595  fi
41596
41597
41598  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
41599  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41600    ARFLAGS="-r"
41601  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41602    ARFLAGS="-X64"
41603  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
41604    # lib.exe is used as AR to create static libraries.
41605    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
41606  else
41607    ARFLAGS=""
41608  fi
41609
41610
41611  ## Setup strip.
41612  # FIXME: should this really be per platform, or should it be per toolchain type?
41613  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
41614  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
41615  if test "x$OPENJDK_TARGET_OS" = xlinux; then
41616    STRIPFLAGS="-g"
41617  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
41618    STRIPFLAGS="-x"
41619  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41620    STRIPFLAGS="-S"
41621  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41622    STRIPFLAGS="-X32_64"
41623  fi
41624
41625  if test "x$OPENJDK_TARGET_OS" != xwindows; then
41626    POST_STRIP_CMD="$STRIP $STRIPFLAGS"
41627  fi
41628
41629
41630  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41631    # FIXME: break out into MCSFLAGS
41632    POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
41633  fi
41634
41635
41636  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41637    CC_OUT_OPTION=-Fo
41638    EXE_OUT_OPTION=-out:
41639    LD_OUT_OPTION=-out:
41640    AR_OUT_OPTION=-out:
41641  else
41642    # The option used to specify the target .o,.a or .so file.
41643    # When compiling, how to specify the to be created object file.
41644    CC_OUT_OPTION='-o$(SPACE)'
41645    # When linking, how to specify the to be created executable.
41646    EXE_OUT_OPTION='-o$(SPACE)'
41647    # When linking, how to specify the to be created dynamically linkable library.
41648    LD_OUT_OPTION='-o$(SPACE)'
41649    # When archiving, how to specify the to be create static archive for object files.
41650    AR_OUT_OPTION='rcs$(SPACE)'
41651  fi
41652
41653
41654
41655
41656
41657  # On Windows, we need to set RC flags.
41658  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41659    RC_FLAGS="-nologo -l 0x409 -r"
41660    if test "x$VARIANT" = xOPT; then
41661      RC_FLAGS="$RC_FLAGS -d NDEBUG"
41662    fi
41663
41664    # The version variables used to create RC_FLAGS may be overridden
41665    # in a custom configure script, or possibly the command line.
41666    # Let those variables be expanded at make time in spec.gmk.
41667    # The \$ are escaped to the shell, and the $(...) variables
41668    # are evaluated by make.
41669    RC_FLAGS="$RC_FLAGS \
41670        -d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \
41671        -d \"JDK_COMPANY=\$(COMPANY_NAME)\" \
41672        -d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
41673        -d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
41674        -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
41675        -d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
41676        -d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
41677  fi
41678
41679
41680  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41681    # silence copyright notice and other headers.
41682    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
41683  fi
41684
41685  if test "x$SYSROOT" != "x"; then
41686    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41687      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41688        # Solaris Studio does not have a concept of sysroot. Instead we must
41689        # make sure the default include and lib dirs are appended to each
41690        # compile and link command line.
41691        SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
41692        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
41693            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
41694            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
41695      fi
41696    elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41697      # Apple only wants -isysroot <path>, but we also need -iframework<path>/System/Library/Frameworks
41698      SYSROOT_CFLAGS="-isysroot \"$SYSROOT\" -iframework\"$SYSROOT/System/Library/Frameworks\""
41699      SYSROOT_LDFLAGS=$SYSROOT_CFLAGS
41700    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
41701      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
41702      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
41703    elif test "x$TOOLCHAIN_TYPE" = xclang; then
41704      SYSROOT_CFLAGS="-isysroot \"$SYSROOT\""
41705      SYSROOT_LDFLAGS="-isysroot \"$SYSROOT\""
41706    fi
41707    # Propagate the sysroot args to hotspot
41708    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
41709    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
41710    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
41711  fi
41712
41713  # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
41714  # set this here so it doesn't have to be peppered throughout the forest
41715  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41716    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
41717    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
41718  fi
41719
41720
41721
41722
41723
41724# FIXME: Currently we must test this after toolchain but before flags. Fix!
41725
41726# Now we can test some aspects on the target using configure macros.
41727
41728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
41729$as_echo_n "checking for ANSI C header files... " >&6; }
41730if ${ac_cv_header_stdc+:} false; then :
41731  $as_echo_n "(cached) " >&6
41732else
41733  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41734/* end confdefs.h.  */
41735#include <stdlib.h>
41736#include <stdarg.h>
41737#include <string.h>
41738#include <float.h>
41739
41740int
41741main ()
41742{
41743
41744  ;
41745  return 0;
41746}
41747_ACEOF
41748if ac_fn_cxx_try_compile "$LINENO"; then :
41749  ac_cv_header_stdc=yes
41750else
41751  ac_cv_header_stdc=no
41752fi
41753rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41754
41755if test $ac_cv_header_stdc = yes; then
41756  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
41757  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41758/* end confdefs.h.  */
41759#include <string.h>
41760
41761_ACEOF
41762if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41763  $EGREP "memchr" >/dev/null 2>&1; then :
41764
41765else
41766  ac_cv_header_stdc=no
41767fi
41768rm -f conftest*
41769
41770fi
41771
41772if test $ac_cv_header_stdc = yes; then
41773  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
41774  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41775/* end confdefs.h.  */
41776#include <stdlib.h>
41777
41778_ACEOF
41779if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41780  $EGREP "free" >/dev/null 2>&1; then :
41781
41782else
41783  ac_cv_header_stdc=no
41784fi
41785rm -f conftest*
41786
41787fi
41788
41789if test $ac_cv_header_stdc = yes; then
41790  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
41791  if test "$cross_compiling" = yes; then :
41792  :
41793else
41794  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41795/* end confdefs.h.  */
41796#include <ctype.h>
41797#include <stdlib.h>
41798#if ((' ' & 0x0FF) == 0x020)
41799# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
41800# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
41801#else
41802# define ISLOWER(c) \
41803		   (('a' <= (c) && (c) <= 'i') \
41804		     || ('j' <= (c) && (c) <= 'r') \
41805		     || ('s' <= (c) && (c) <= 'z'))
41806# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
41807#endif
41808
41809#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
41810int
41811main ()
41812{
41813  int i;
41814  for (i = 0; i < 256; i++)
41815    if (XOR (islower (i), ISLOWER (i))
41816	|| toupper (i) != TOUPPER (i))
41817      return 2;
41818  return 0;
41819}
41820_ACEOF
41821if ac_fn_cxx_try_run "$LINENO"; then :
41822
41823else
41824  ac_cv_header_stdc=no
41825fi
41826rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41827  conftest.$ac_objext conftest.beam conftest.$ac_ext
41828fi
41829
41830fi
41831fi
41832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
41833$as_echo "$ac_cv_header_stdc" >&6; }
41834if test $ac_cv_header_stdc = yes; then
41835
41836$as_echo "#define STDC_HEADERS 1" >>confdefs.h
41837
41838fi
41839
41840# On IRIX 5.3, sys/types and inttypes.h are conflicting.
41841for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
41842		  inttypes.h stdint.h unistd.h
41843do :
41844  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
41845ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
41846"
41847if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
41848  cat >>confdefs.h <<_ACEOF
41849#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
41850_ACEOF
41851
41852fi
41853
41854done
41855
41856
41857
41858  ###############################################################################
41859  #
41860  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
41861  # (The JVM can use 32 or 64 bit Java pointers but that decision
41862  # is made at runtime.)
41863  #
41864
41865  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
41866    # Always specify -m flag on Solaris
41867    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
41868
41869  # When we add flags to the "official" CFLAGS etc, we need to
41870  # keep track of these additions in ADDED_CFLAGS etc. These
41871  # will later be checked to make sure only controlled additions
41872  # have been made to CFLAGS etc.
41873  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41874  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41875  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41876
41877  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41878  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41879  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41880
41881  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41882  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41883  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41884
41885  elif test "x$COMPILE_TYPE" = xreduced; then
41886    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
41887      # Specify -m if running reduced on unix platforms
41888
41889  # When we add flags to the "official" CFLAGS etc, we need to
41890  # keep track of these additions in ADDED_CFLAGS etc. These
41891  # will later be checked to make sure only controlled additions
41892  # have been made to CFLAGS etc.
41893  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41894  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41895  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41896
41897  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41898  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41899  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41900
41901  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41902  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41903  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41904
41905    fi
41906  fi
41907
41908  # Make compilation sanity check
41909  for ac_header in stdio.h
41910do :
41911  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
41912if test "x$ac_cv_header_stdio_h" = xyes; then :
41913  cat >>confdefs.h <<_ACEOF
41914#define HAVE_STDIO_H 1
41915_ACEOF
41916
41917else
41918
41919    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
41920$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
41921    if test "x$COMPILE_TYPE" = xreduced; then
41922      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
41923$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
41924    elif test "x$COMPILE_TYPE" = xcross; then
41925      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
41926$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
41927    fi
41928    as_fn_error $? "Cannot continue." "$LINENO" 5
41929
41930fi
41931
41932done
41933
41934
41935  # The cast to long int works around a bug in the HP C Compiler
41936# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41937# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41938# This bug is HP SR number 8606223364.
41939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41940$as_echo_n "checking size of int *... " >&6; }
41941if ${ac_cv_sizeof_int_p+:} false; then :
41942  $as_echo_n "(cached) " >&6
41943else
41944  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41945
41946else
41947  if test "$ac_cv_type_int_p" = yes; then
41948     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41949$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41950as_fn_error 77 "cannot compute sizeof (int *)
41951See \`config.log' for more details" "$LINENO" 5; }
41952   else
41953     ac_cv_sizeof_int_p=0
41954   fi
41955fi
41956
41957fi
41958{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41959$as_echo "$ac_cv_sizeof_int_p" >&6; }
41960
41961
41962
41963cat >>confdefs.h <<_ACEOF
41964#define SIZEOF_INT_P $ac_cv_sizeof_int_p
41965_ACEOF
41966
41967
41968
41969  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
41970  if test "x$ac_cv_sizeof_int_p" = x; then
41971    # The test failed, lets stick to the assumed value.
41972    { $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
41973$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
41974  else
41975    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41976
41977    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41978      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
41979      # Let's try to implicitely set the compilers target architecture and retry the test
41980      { $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
41981$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;}
41982      { $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
41983$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;}
41984
41985  # When we add flags to the "official" CFLAGS etc, we need to
41986  # keep track of these additions in ADDED_CFLAGS etc. These
41987  # will later be checked to make sure only controlled additions
41988  # have been made to CFLAGS etc.
41989  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41990  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41991  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41992
41993  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41994  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41995  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41996
41997  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41998  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41999  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
42000
42001
42002      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
42003      unset ac_cv_sizeof_int_p
42004      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
42005      cat >>confdefs.h <<_ACEOF
42006#undef SIZEOF_INT_P
42007_ACEOF
42008
42009      # The cast to long int works around a bug in the HP C Compiler
42010# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
42011# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
42012# This bug is HP SR number 8606223364.
42013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
42014$as_echo_n "checking size of int *... " >&6; }
42015if ${ac_cv_sizeof_int_p+:} false; then :
42016  $as_echo_n "(cached) " >&6
42017else
42018  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
42019
42020else
42021  if test "$ac_cv_type_int_p" = yes; then
42022     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
42023$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
42024as_fn_error 77 "cannot compute sizeof (int *)
42025See \`config.log' for more details" "$LINENO" 5; }
42026   else
42027     ac_cv_sizeof_int_p=0
42028   fi
42029fi
42030
42031fi
42032{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
42033$as_echo "$ac_cv_sizeof_int_p" >&6; }
42034
42035
42036
42037cat >>confdefs.h <<_ACEOF
42038#define SIZEOF_INT_P $ac_cv_sizeof_int_p
42039_ACEOF
42040
42041
42042
42043      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
42044
42045      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
42046        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
42047      fi
42048    fi
42049  fi
42050
42051  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
42052$as_echo_n "checking for target address size... " >&6; }
42053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
42054$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
42055
42056
42057  ###############################################################################
42058  #
42059  # Is the target little of big endian?
42060  #
42061   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
42062$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
42063if ${ac_cv_c_bigendian+:} false; then :
42064  $as_echo_n "(cached) " >&6
42065else
42066  ac_cv_c_bigendian=unknown
42067    # See if we're dealing with a universal compiler.
42068    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42069/* end confdefs.h.  */
42070#ifndef __APPLE_CC__
42071	       not a universal capable compiler
42072	     #endif
42073	     typedef int dummy;
42074
42075_ACEOF
42076if ac_fn_cxx_try_compile "$LINENO"; then :
42077
42078	# Check for potential -arch flags.  It is not universal unless
42079	# there are at least two -arch flags with different values.
42080	ac_arch=
42081	ac_prev=
42082	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
42083	 if test -n "$ac_prev"; then
42084	   case $ac_word in
42085	     i?86 | x86_64 | ppc | ppc64)
42086	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
42087		 ac_arch=$ac_word
42088	       else
42089		 ac_cv_c_bigendian=universal
42090		 break
42091	       fi
42092	       ;;
42093	   esac
42094	   ac_prev=
42095	 elif test "x$ac_word" = "x-arch"; then
42096	   ac_prev=arch
42097	 fi
42098       done
42099fi
42100rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42101    if test $ac_cv_c_bigendian = unknown; then
42102      # See if sys/param.h defines the BYTE_ORDER macro.
42103      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42104/* end confdefs.h.  */
42105#include <sys/types.h>
42106	     #include <sys/param.h>
42107
42108int
42109main ()
42110{
42111#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
42112		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
42113		     && LITTLE_ENDIAN)
42114	      bogus endian macros
42115	     #endif
42116
42117  ;
42118  return 0;
42119}
42120_ACEOF
42121if ac_fn_cxx_try_compile "$LINENO"; then :
42122  # It does; now see whether it defined to BIG_ENDIAN or not.
42123	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42124/* end confdefs.h.  */
42125#include <sys/types.h>
42126		#include <sys/param.h>
42127
42128int
42129main ()
42130{
42131#if BYTE_ORDER != BIG_ENDIAN
42132		 not big endian
42133		#endif
42134
42135  ;
42136  return 0;
42137}
42138_ACEOF
42139if ac_fn_cxx_try_compile "$LINENO"; then :
42140  ac_cv_c_bigendian=yes
42141else
42142  ac_cv_c_bigendian=no
42143fi
42144rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42145fi
42146rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42147    fi
42148    if test $ac_cv_c_bigendian = unknown; then
42149      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
42150      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42151/* end confdefs.h.  */
42152#include <limits.h>
42153
42154int
42155main ()
42156{
42157#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
42158	      bogus endian macros
42159	     #endif
42160
42161  ;
42162  return 0;
42163}
42164_ACEOF
42165if ac_fn_cxx_try_compile "$LINENO"; then :
42166  # It does; now see whether it defined to _BIG_ENDIAN or not.
42167	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42168/* end confdefs.h.  */
42169#include <limits.h>
42170
42171int
42172main ()
42173{
42174#ifndef _BIG_ENDIAN
42175		 not big endian
42176		#endif
42177
42178  ;
42179  return 0;
42180}
42181_ACEOF
42182if ac_fn_cxx_try_compile "$LINENO"; then :
42183  ac_cv_c_bigendian=yes
42184else
42185  ac_cv_c_bigendian=no
42186fi
42187rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42188fi
42189rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42190    fi
42191    if test $ac_cv_c_bigendian = unknown; then
42192      # Compile a test program.
42193      if test "$cross_compiling" = yes; then :
42194  # Try to guess by grepping values from an object file.
42195	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42196/* end confdefs.h.  */
42197short int ascii_mm[] =
42198		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
42199		short int ascii_ii[] =
42200		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
42201		int use_ascii (int i) {
42202		  return ascii_mm[i] + ascii_ii[i];
42203		}
42204		short int ebcdic_ii[] =
42205		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
42206		short int ebcdic_mm[] =
42207		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
42208		int use_ebcdic (int i) {
42209		  return ebcdic_mm[i] + ebcdic_ii[i];
42210		}
42211		extern int foo;
42212
42213int
42214main ()
42215{
42216return use_ascii (foo) == use_ebcdic (foo);
42217  ;
42218  return 0;
42219}
42220_ACEOF
42221if ac_fn_cxx_try_compile "$LINENO"; then :
42222  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
42223	      ac_cv_c_bigendian=yes
42224	    fi
42225	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
42226	      if test "$ac_cv_c_bigendian" = unknown; then
42227		ac_cv_c_bigendian=no
42228	      else
42229		# finding both strings is unlikely to happen, but who knows?
42230		ac_cv_c_bigendian=unknown
42231	      fi
42232	    fi
42233fi
42234rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42235else
42236  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42237/* end confdefs.h.  */
42238$ac_includes_default
42239int
42240main ()
42241{
42242
42243	     /* Are we little or big endian?  From Harbison&Steele.  */
42244	     union
42245	     {
42246	       long int l;
42247	       char c[sizeof (long int)];
42248	     } u;
42249	     u.l = 1;
42250	     return u.c[sizeof (long int) - 1] == 1;
42251
42252  ;
42253  return 0;
42254}
42255_ACEOF
42256if ac_fn_cxx_try_run "$LINENO"; then :
42257  ac_cv_c_bigendian=no
42258else
42259  ac_cv_c_bigendian=yes
42260fi
42261rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
42262  conftest.$ac_objext conftest.beam conftest.$ac_ext
42263fi
42264
42265    fi
42266fi
42267{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
42268$as_echo "$ac_cv_c_bigendian" >&6; }
42269 case $ac_cv_c_bigendian in #(
42270   yes)
42271     ENDIAN="big";; #(
42272   no)
42273     ENDIAN="little" ;; #(
42274   universal)
42275     ENDIAN="universal_endianness"
42276     ;; #(
42277   *)
42278     ENDIAN="unknown" ;;
42279 esac
42280
42281
42282  if test "x$ENDIAN" = xuniversal_endianness; then
42283    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
42284  fi
42285  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
42286    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
42287  fi
42288
42289
42290# Configure flags for the tools
42291
42292  ###############################################################################
42293  #
42294  # How to compile shared libraries.
42295  #
42296
42297  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42298    PICFLAG="-fPIC"
42299    C_FLAG_REORDER=''
42300    CXX_FLAG_REORDER=''
42301
42302    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42303      # Linking is different on MacOSX
42304      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
42305      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
42306      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42307      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
42308      SET_SHARED_LIBRARY_MAPFILE=''
42309    else
42310      # Default works for linux, might work on other platforms as well.
42311      SHARED_LIBRARY_FLAGS='-shared'
42312      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
42313      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
42314      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
42315      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
42316    fi
42317  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42318    PICFLAG=''
42319    C_FLAG_REORDER=''
42320    CXX_FLAG_REORDER=''
42321
42322    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42323      # Linking is different on MacOSX
42324      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
42325      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
42326      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42327      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
42328      SET_SHARED_LIBRARY_MAPFILE=''
42329    else
42330      # Default works for linux, might work on other platforms as well.
42331      SHARED_LIBRARY_FLAGS='-shared'
42332      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
42333      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
42334      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
42335      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
42336    fi
42337  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42338    PICFLAG="-KPIC"
42339    C_FLAG_REORDER='-xF'
42340    CXX_FLAG_REORDER='-xF'
42341    SHARED_LIBRARY_FLAGS="-G"
42342    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
42343    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42344    SET_SHARED_LIBRARY_NAME=''
42345    SET_SHARED_LIBRARY_MAPFILE='-M$1'
42346  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42347    PICFLAG="-qpic=large"
42348    C_FLAG_REORDER=''
42349    CXX_FLAG_REORDER=''
42350    SHARED_LIBRARY_FLAGS="-qmkshrobj"
42351    SET_EXECUTABLE_ORIGIN=""
42352    SET_SHARED_LIBRARY_ORIGIN=''
42353    SET_SHARED_LIBRARY_NAME=''
42354    SET_SHARED_LIBRARY_MAPFILE=''
42355  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42356    PICFLAG=""
42357    C_FLAG_REORDER=''
42358    CXX_FLAG_REORDER=''
42359    SHARED_LIBRARY_FLAGS="-LD"
42360    SET_EXECUTABLE_ORIGIN=''
42361    SET_SHARED_LIBRARY_ORIGIN=''
42362    SET_SHARED_LIBRARY_NAME=''
42363    SET_SHARED_LIBRARY_MAPFILE=''
42364  fi
42365
42366
42367
42368
42369
42370
42371
42372
42373
42374  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42375    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
42376    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
42377    CFLAGS_JDKLIB_EXTRA='-xstrconst'
42378  fi
42379  # The (cross) compiler is now configured, we can now test capabilities
42380  # of the target platform.
42381
42382
42383
42384  ###############################################################################
42385  #
42386  # Setup the opt flags for different compilers
42387  # and different operating systems.
42388  #
42389
42390  # FIXME: this was indirectly the old default, but just inherited.
42391  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42392  #   C_FLAG_DEPS="-MMD -MF"
42393  # fi
42394
42395  # Generate make dependency files
42396  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42397    C_FLAG_DEPS="-MMD -MF"
42398  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42399    C_FLAG_DEPS="-MMD -MF"
42400  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42401    C_FLAG_DEPS="-xMMD -xMF"
42402  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42403    C_FLAG_DEPS="-qmakedep=gcc -MF"
42404  fi
42405  CXX_FLAG_DEPS="$C_FLAG_DEPS"
42406
42407
42408
42409  # Debug symbols
42410  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42411    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
42412      # reduce from default "-g2" option to save space
42413      CFLAGS_DEBUG_SYMBOLS="-g1"
42414      CXXFLAGS_DEBUG_SYMBOLS="-g1"
42415    else
42416      CFLAGS_DEBUG_SYMBOLS="-g"
42417      CXXFLAGS_DEBUG_SYMBOLS="-g"
42418    fi
42419  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42420    CFLAGS_DEBUG_SYMBOLS="-g"
42421    CXXFLAGS_DEBUG_SYMBOLS="-g"
42422  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42423    CFLAGS_DEBUG_SYMBOLS="-g -xs"
42424    # FIXME: likely a bug, this disables debug symbols rather than enables them
42425    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
42426  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42427    CFLAGS_DEBUG_SYMBOLS="-g"
42428    CXXFLAGS_DEBUG_SYMBOLS="-g"
42429  fi
42430
42431
42432
42433  # bounds, memory and behavior checking options
42434  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42435    case $DEBUG_LEVEL in
42436    release )
42437      # no adjustment
42438      ;;
42439    fastdebug )
42440      # no adjustment
42441      ;;
42442    slowdebug )
42443      # Add runtime stack smashing and undefined behavior checks
42444      CFLAGS_DEBUG_OPTIONS="-fstack-protector-all --param ssp-buffer-size=1"
42445      CXXFLAGS_DEBUG_OPTIONS="-fstack-protector-all --param ssp-buffer-size=1"
42446      if test "x$HAS_CFLAG_DETECT_UNDEFINED_BEHAVIOR" = "xtrue"; then
42447        CFLAGS_DEBUG_OPTIONS="$CFLAGS_DEBUG_OPTIONS  $CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG"
42448        CXXFLAGS_DEBUG_OPTIONS="$CXXFLAGS_DEBUG_OPTIONS $CFLAG_DETECT_UNDEFINED_BEHAVIsOR_FLAG"
42449      fi
42450      ;;
42451    esac
42452  fi
42453
42454
42455
42456  # Optimization levels
42457  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42458    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
42459
42460    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
42461      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
42462      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
42463      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
42464      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
42465      C_O_FLAG_DEBUG="-xregs=no%frameptr"
42466      C_O_FLAG_NONE="-xregs=no%frameptr"
42467      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
42468      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
42469      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
42470      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
42471      CXX_O_FLAG_NONE="-xregs=no%frameptr"
42472      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
42473        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
42474        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
42475      fi
42476    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
42477      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
42478      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
42479      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
42480      C_O_FLAG_DEBUG=""
42481      C_O_FLAG_NONE=""
42482      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
42483      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
42484      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
42485      C_O_FLAG_DEBUG=""
42486      CXX_O_FLAG_NONE=""
42487    fi
42488  else
42489    # The remaining toolchains share opt flags between CC and CXX;
42490    # setup for C and duplicate afterwards.
42491    if test "x$TOOLCHAIN_TYPE" = xgcc; then
42492      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42493        # On MacOSX we optimize for size, something
42494        # we should do for all platforms?
42495        C_O_FLAG_HIGHEST="-Os"
42496        C_O_FLAG_HI="-Os"
42497        C_O_FLAG_NORM="-Os"
42498      else
42499        C_O_FLAG_HIGHEST="-O3"
42500        C_O_FLAG_HI="-O3"
42501        C_O_FLAG_NORM="-O2"
42502      fi
42503      C_O_FLAG_DEBUG="-O0"
42504      C_O_FLAG_NONE="-O0"
42505    elif test "x$TOOLCHAIN_TYPE" = xclang; then
42506      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42507        # On MacOSX we optimize for size, something
42508        # we should do for all platforms?
42509        C_O_FLAG_HIGHEST="-Os"
42510        C_O_FLAG_HI="-Os"
42511        C_O_FLAG_NORM="-Os"
42512      else
42513        C_O_FLAG_HIGHEST="-O3"
42514        C_O_FLAG_HI="-O3"
42515        C_O_FLAG_NORM="-O2"
42516      fi
42517      C_O_FLAG_DEBUG="-O0"
42518      C_O_FLAG_NONE="-O0"
42519    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42520      C_O_FLAG_HIGHEST="-O3"
42521      C_O_FLAG_HI="-O3 -qstrict"
42522      C_O_FLAG_NORM="-O2"
42523      C_O_FLAG_DEBUG="-qnoopt"
42524      C_O_FLAG_NONE="-qnoop"
42525    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42526      C_O_FLAG_HIGHEST="-O2"
42527      C_O_FLAG_HI="-O1"
42528      C_O_FLAG_NORM="-O1"
42529      C_O_FLAG_DEBUG="-Od"
42530      C_O_FLAG_NONE="-Od"
42531    fi
42532    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
42533    CXX_O_FLAG_HI="$C_O_FLAG_HI"
42534    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
42535    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
42536    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
42537  fi
42538
42539  # Adjust optimization flags according to debug level.
42540  case $DEBUG_LEVEL in
42541    release )
42542      # no adjustment
42543      ;;
42544    fastdebug )
42545      # Not quite so much optimization
42546      C_O_FLAG_HI="$C_O_FLAG_NORM"
42547      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
42548      ;;
42549    slowdebug )
42550      # Disable optimization
42551      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
42552      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
42553      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
42554      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
42555      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
42556      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
42557      ;;
42558  esac
42559
42560
42561
42562
42563
42564
42565
42566
42567
42568
42569
42570
42571
42572  # Special extras...
42573  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42574    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
42575      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
42576      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
42577    fi
42578  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42579    LDFLAGS_JDK="${LDFLAGS_JDK} -q64 -brtl -bnolibpath -liconv -bexpall"
42580    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
42581    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
42582  fi
42583
42584  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
42585    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
42586$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
42587  fi
42588
42589  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
42590    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
42591$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
42592  fi
42593
42594  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
42595    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
42596$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
42597  fi
42598
42599
42600# Check whether --with-extra-cflags was given.
42601if test "${with_extra_cflags+set}" = set; then :
42602  withval=$with_extra_cflags;
42603fi
42604
42605
42606
42607# Check whether --with-extra-cxxflags was given.
42608if test "${with_extra_cxxflags+set}" = set; then :
42609  withval=$with_extra_cxxflags;
42610fi
42611
42612
42613
42614# Check whether --with-extra-ldflags was given.
42615if test "${with_extra_ldflags+set}" = set; then :
42616  withval=$with_extra_ldflags;
42617fi
42618
42619
42620  CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
42621  CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
42622  LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
42623
42624  # Hotspot needs these set in their legacy form
42625  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $with_extra_cflags"
42626  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $with_extra_cxxflags"
42627  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $with_extra_ldflags"
42628
42629
42630
42631
42632
42633  ###############################################################################
42634  #
42635  # Now setup the CFLAGS and LDFLAGS for the JDK build.
42636  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
42637  #
42638
42639  # Setup compiler/platform specific flags into
42640  #    CFLAGS_JDK    - C Compiler flags
42641  #    CXXFLAGS_JDK  - C++ Compiler flags
42642  #    COMMON_CCXXFLAGS_JDK - common to C and C++
42643  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42644    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wno-parentheses -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
42645        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
42646    case $OPENJDK_TARGET_CPU_ARCH in
42647      arm )
42648        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42649        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42650        ;;
42651      ppc )
42652        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42653        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42654        ;;
42655      * )
42656        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
42657        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42658        ;;
42659    esac
42660  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42661    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
42662    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
42663      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
42664      CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
42665    fi
42666
42667    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
42668    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
42669  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42670    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42671    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42672  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42673    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
42674    -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
42675    -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
42676    -DWIN32 -DIAL"
42677    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
42678      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
42679    else
42680      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
42681    fi
42682  fi
42683
42684  ###############################################################################
42685
42686  # Adjust flags according to debug level.
42687  case $DEBUG_LEVEL in
42688    fastdebug | slowdebug )
42689      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
42690      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
42691      JAVAC_FLAGS="$JAVAC_FLAGS -g"
42692      ;;
42693    release )
42694      ;;
42695    * )
42696      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42697      ;;
42698  esac
42699
42700  # Setup LP64
42701  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $ADD_LP64"
42702
42703  # Set some common defines. These works for all compilers, but assume
42704  # -D is universally accepted.
42705
42706  # Setup endianness
42707  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
42708    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
42709    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
42710    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
42711    #   Note: -Dmacro         is the same as    #define macro 1
42712    #         -Dmacro=        is the same as    #define macro
42713    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42714      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
42715    else
42716      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
42717    fi
42718  else
42719    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
42720    # are defined in the system?
42721    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42722      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
42723    else
42724      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
42725    fi
42726  fi
42727
42728  # Setup target OS define. Use OS target name but in upper case.
42729  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
42730  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
42731
42732  # Setup target CPU
42733  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
42734
42735  # Setup debug/release defines
42736  if test "x$DEBUG_LEVEL" = xrelease; then
42737    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
42738    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42739      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
42740    fi
42741  else
42742    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
42743  fi
42744
42745  # Setup release name
42746  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
42747
42748
42749  # Set some additional per-OS defines.
42750  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42751    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
42752  elif test "x$OPENJDK_TARGET_OS" = xaix; then
42753    # FIXME: PPC64 should not be here.
42754    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DPPC64"
42755  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
42756    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
42757  fi
42758
42759  # Additional macosx handling
42760  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42761    # Setting these parameters makes it an error to link to macosx APIs that are
42762    # newer than the given OS version and makes the linked binaries compatible
42763    # even if built on a newer version of the OS.
42764    # The expected format is X.Y.Z
42765    MACOSX_VERSION_MIN=10.7.0
42766
42767
42768    # The macro takes the version with no dots, ex: 1070
42769    # Let the flags variables get resolved in make for easier override on make
42770    # command line.
42771    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42772    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42773  fi
42774
42775  # Setup some hard coded includes
42776  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
42777      -I${JDK_TOPDIR}/src/java.base/share/native/include \
42778      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
42779      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include"
42780
42781  # The shared libraries are compiled using the picflag.
42782  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
42783  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
42784
42785  # Executable flags
42786  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
42787  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
42788
42789
42790
42791
42792
42793
42794  # Setup LDFLAGS et al.
42795  #
42796
42797  # Now this is odd. The JDK native libraries have to link against libjvm.so
42798  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
42799  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
42800  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
42801  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
42802  # libraries will link to whatever is in memory. Yuck.
42803  #
42804  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
42805  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42806    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
42807    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
42808      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
42809    fi
42810    # TODO: make -debug optional "--disable-full-debug-symbols"
42811    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
42812  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
42813    # If this is a --hash-style=gnu system, use --hash-style=both, why?
42814    # We have previously set HAS_GNU_HASH if this is the case
42815    if test -n "$HAS_GNU_HASH"; then
42816      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both"
42817    fi
42818    if test "x$OPENJDK_TARGET_OS" = xlinux; then
42819      # And since we now know that the linker is gnu, then add -z defs, to forbid
42820      # undefined symbols in object files.
42821      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
42822      case $DEBUG_LEVEL in
42823        release )
42824          # tell linker to optimize libraries.
42825          # Should this be supplied to the OSS linker as well?
42826          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
42827          ;;
42828        slowdebug )
42829          if test "x$HAS_LINKER_NOW" = "xtrue"; then
42830            # do relocations at load
42831            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
42832            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
42833          fi
42834          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42835            # mark relocations read only
42836            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42837            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42838          fi
42839          ;;
42840        fastdebug )
42841          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42842            # mark relocations read only
42843            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42844            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42845          fi
42846          ;;
42847        * )
42848          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42849          ;;
42850        esac
42851    fi
42852  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42853    LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
42854    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
42855  fi
42856
42857  if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; then
42858    # If undefined behaviour detection is enabled then we need to tell linker.
42859    case $DEBUG_LEVEL in
42860      release | fastdebug )
42861        ;;
42862      slowdebug )
42863        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $HAS_CFLAG_DETECT_UNDEFINED_BEHAVIOR" >&5
42864$as_echo "$as_me: WARNING: $HAS_CFLAG_DETECT_UNDEFINED_BEHAVIOR" >&2;}
42865        if test "x$HAS_CFLAG_DETECT_UNDEFINED_BEHAVIOR" = "xtrue"; then
42866          # enable undefined behaviour checking
42867          LDFLAGS_JDK="$LDFLAGS_JDK `$ECHO -n $CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG | sed -e "s/ *\(^ \+\)/ -Xlinker \1/g"`"
42868          LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK `$ECHO -n $CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG | sed -e "s/ *\(^ \+\)/ -Xlinker \1/g"`"
42869        fi
42870        ;;
42871      * )
42872        as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42873        ;;
42874    esac
42875  fi
42876
42877  # Customize LDFLAGS for executables
42878
42879  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
42880
42881  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42882    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
42883      LDFLAGS_STACK_SIZE=1048576
42884    else
42885      LDFLAGS_STACK_SIZE=327680
42886    fi
42887    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
42888  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
42889    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
42890  fi
42891
42892  # Customize LDFLAGS for libs
42893  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
42894
42895  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42896    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -dll -libpath:${JDK_OUTPUTDIR}/lib"
42897    LDFLAGS_JDKLIB_SUFFIX=""
42898  else
42899    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB}  ${SHARED_LIBRARY_FLAGS} \
42900        -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
42901
42902    # On some platforms (mac) the linker warns about non existing -L dirs.
42903    # Add server first if available. Linking aginst client does not always produce the same results.
42904    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
42905    # Default to server for other variants.
42906    if test "x$JVM_VARIANT_SERVER" = xtrue; then
42907      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
42908    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
42909      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
42910    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
42911      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
42912    else
42913      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
42914    fi
42915
42916    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
42917    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42918      LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
42919    fi
42920  fi
42921
42922
42923
42924
42925
42926
42927
42928
42929  # Some Zero and Shark settings.
42930  # ZERO_ARCHFLAG tells the compiler which mode to build for
42931  case "${OPENJDK_TARGET_CPU}" in
42932    s390)
42933      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
42934      ;;
42935    *)
42936      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42937  esac
42938
42939  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
42940$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
42941  supports=yes
42942
42943  saved_cflags="$CFLAGS"
42944  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
42945  ac_ext=c
42946ac_cpp='$CPP $CPPFLAGS'
42947ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42948ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42949ac_compiler_gnu=$ac_cv_c_compiler_gnu
42950
42951  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42952/* end confdefs.h.  */
42953int i;
42954_ACEOF
42955if ac_fn_c_try_compile "$LINENO"; then :
42956
42957else
42958  supports=no
42959fi
42960rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42961  ac_ext=cpp
42962ac_cpp='$CXXCPP $CPPFLAGS'
42963ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42964ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42965ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42966
42967  CFLAGS="$saved_cflags"
42968
42969  saved_cxxflags="$CXXFLAGS"
42970  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
42971  ac_ext=cpp
42972ac_cpp='$CXXCPP $CPPFLAGS'
42973ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42974ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42975ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42976
42977  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42978/* end confdefs.h.  */
42979int i;
42980_ACEOF
42981if ac_fn_cxx_try_compile "$LINENO"; then :
42982
42983else
42984  supports=no
42985fi
42986rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42987  ac_ext=cpp
42988ac_cpp='$CXXCPP $CPPFLAGS'
42989ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42990ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42991ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42992
42993  CXXFLAGS="$saved_cxxflags"
42994
42995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42996$as_echo "$supports" >&6; }
42997  if test "x$supports" = "xyes" ; then
42998    :
42999  else
43000    ZERO_ARCHFLAG=""
43001  fi
43002
43003
43004
43005  # Check that the compiler supports -mX (or -qX on AIX) flags
43006  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
43007
43008  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
43009$as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
43010  supports=yes
43011
43012  saved_cflags="$CFLAGS"
43013  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
43014  ac_ext=c
43015ac_cpp='$CPP $CPPFLAGS'
43016ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43017ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43018ac_compiler_gnu=$ac_cv_c_compiler_gnu
43019
43020  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43021/* end confdefs.h.  */
43022int i;
43023_ACEOF
43024if ac_fn_c_try_compile "$LINENO"; then :
43025
43026else
43027  supports=no
43028fi
43029rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43030  ac_ext=cpp
43031ac_cpp='$CXXCPP $CPPFLAGS'
43032ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43033ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43034ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43035
43036  CFLAGS="$saved_cflags"
43037
43038  saved_cxxflags="$CXXFLAGS"
43039  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
43040  ac_ext=cpp
43041ac_cpp='$CXXCPP $CPPFLAGS'
43042ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43043ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43044ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43045
43046  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43047/* end confdefs.h.  */
43048int i;
43049_ACEOF
43050if ac_fn_cxx_try_compile "$LINENO"; then :
43051
43052else
43053  supports=no
43054fi
43055rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43056  ac_ext=cpp
43057ac_cpp='$CXXCPP $CPPFLAGS'
43058ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43059ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43060ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43061
43062  CXXFLAGS="$saved_cxxflags"
43063
43064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
43065$as_echo "$supports" >&6; }
43066  if test "x$supports" = "xyes" ; then
43067    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
43068  else
43069    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
43070  fi
43071
43072
43073
43074  case "${TOOLCHAIN_TYPE}" in
43075    microsoft)
43076      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
43077      ;;
43078    solstudio)
43079      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
43080      ;;
43081    gcc)
43082      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
43083      ;;
43084    clang)
43085      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
43086      ;;
43087  esac
43088
43089
43090
43091# Setup debug symbols (need objcopy from the toolchain for that)
43092
43093  #
43094  # ENABLE_DEBUG_SYMBOLS
43095  # This must be done after the toolchain is setup, since we're looking at objcopy.
43096  #
43097  # Check whether --enable-debug-symbols was given.
43098if test "${enable_debug_symbols+set}" = set; then :
43099  enableval=$enable_debug_symbols;
43100fi
43101
43102
43103  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
43104$as_echo_n "checking if we should generate debug symbols... " >&6; }
43105
43106  if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
43107    # explicit enabling of enable-debug-symbols and can't find objcopy
43108    #   this is an error
43109    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
43110  fi
43111
43112  if test "x$enable_debug_symbols" = "xyes"; then
43113    ENABLE_DEBUG_SYMBOLS=true
43114  elif test "x$enable_debug_symbols" = "xno"; then
43115    ENABLE_DEBUG_SYMBOLS=false
43116  else
43117    # Default is on if objcopy is found
43118    if test "x$OBJCOPY" != x; then
43119      ENABLE_DEBUG_SYMBOLS=true
43120    # MacOS X and Windows don't use objcopy but default is on for those OSes
43121    elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
43122      ENABLE_DEBUG_SYMBOLS=true
43123    else
43124      ENABLE_DEBUG_SYMBOLS=false
43125    fi
43126  fi
43127
43128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
43129$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
43130
43131  #
43132  # ZIP_DEBUGINFO_FILES
43133  #
43134  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
43135$as_echo_n "checking if we should zip debug-info files... " >&6; }
43136  # Check whether --enable-zip-debug-info was given.
43137if test "${enable_zip_debug_info+set}" = set; then :
43138  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
43139else
43140  enable_zip_debug_info="yes"
43141fi
43142
43143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
43144$as_echo "${enable_zip_debug_info}" >&6; }
43145
43146  if test "x${enable_zip_debug_info}" = "xno"; then
43147    ZIP_DEBUGINFO_FILES=false
43148  else
43149    ZIP_DEBUGINFO_FILES=true
43150  fi
43151
43152
43153
43154
43155
43156###############################################################################
43157#
43158# Check dependencies for external and internal libraries.
43159#
43160###############################################################################
43161
43162# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
43163
43164  # When using cygwin or msys, we need a wrapper binary that renames
43165  # /cygdrive/c/ arguments into c:/ arguments and peeks into
43166  # @files and rewrites these too! This wrapper binary is
43167  # called fixpath.
43168  FIXPATH=
43169  if test "x$OPENJDK_BUILD_OS" = xwindows; then
43170    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
43171$as_echo_n "checking if fixpath can be created... " >&6; }
43172    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
43173    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
43174    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
43175      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
43176      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
43177      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
43178      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
43179    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
43180      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
43181      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
43182
43183      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
43184      # @ was chosen as separator to minimize risk of other tools messing around with it
43185      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
43186      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
43187
43188      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
43189    fi
43190    rm -f $OUTPUT_ROOT/fixpath*
43191    cd $OUTPUT_ROOT
43192    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
43193    cd $CURDIR
43194
43195    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
43196      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43197$as_echo "no" >&6; }
43198      cat $OUTPUT_ROOT/fixpath1.log
43199      as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
43200    fi
43201    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43202$as_echo "yes" >&6; }
43203    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
43204$as_echo_n "checking if fixpath.exe works... " >&6; }
43205    cd $OUTPUT_ROOT
43206    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
43207    cd $CURDIR
43208    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
43209      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43210$as_echo "no" >&6; }
43211      cat $OUTPUT_ROOT/fixpath2.log
43212      as_fn_error $? "fixpath did not work!" "$LINENO" 5
43213    fi
43214    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43215$as_echo "yes" >&6; }
43216    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
43217  fi
43218
43219
43220
43221
43222
43223
43224  ###############################################################################
43225  #
43226  # OS specific settings that we never will need to probe.
43227  #
43228  if test "x$OPENJDK_TARGET_OS" = xlinux; then
43229    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
43230$as_echo_n "checking what is not needed on Linux?... " >&6; }
43231    PULSE_NOT_NEEDED=yes
43232    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
43233$as_echo "pulse" >&6; }
43234  fi
43235
43236  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43237    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
43238$as_echo_n "checking what is not needed on Solaris?... " >&6; }
43239    ALSA_NOT_NEEDED=yes
43240    PULSE_NOT_NEEDED=yes
43241    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
43242$as_echo "alsa pulse" >&6; }
43243  fi
43244
43245  if test "x$OPENJDK_TARGET_OS" = xaix; then
43246    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on AIX?" >&5
43247$as_echo_n "checking what is not needed on AIX?... " >&6; }
43248    ALSA_NOT_NEEDED=yes
43249    PULSE_NOT_NEEDED=yes
43250    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
43251$as_echo "alsa pulse" >&6; }
43252  fi
43253
43254
43255  if test "x$OPENJDK_TARGET_OS" = xwindows; then
43256    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
43257$as_echo_n "checking what is not needed on Windows?... " >&6; }
43258    CUPS_NOT_NEEDED=yes
43259    ALSA_NOT_NEEDED=yes
43260    PULSE_NOT_NEEDED=yes
43261    X11_NOT_NEEDED=yes
43262    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
43263$as_echo "alsa cups pulse x11" >&6; }
43264  fi
43265
43266  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
43267    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
43268$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
43269    ALSA_NOT_NEEDED=yes
43270    PULSE_NOT_NEEDED=yes
43271    X11_NOT_NEEDED=yes
43272    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
43273$as_echo "alsa pulse x11" >&6; }
43274  fi
43275
43276  if test "x$OPENJDK_TARGET_OS" = xbsd; then
43277    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
43278$as_echo_n "checking what is not needed on bsd?... " >&6; }
43279    ALSA_NOT_NEEDED=yes
43280    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
43281$as_echo "alsa" >&6; }
43282  fi
43283
43284  if test "x$OPENJDK" = "xfalse"; then
43285    FREETYPE_NOT_NEEDED=yes
43286  fi
43287
43288  if test "x$SUPPORT_HEADFUL" = xno; then
43289    X11_NOT_NEEDED=yes
43290  fi
43291
43292
43293
43294  ###############################################################################
43295  #
43296  # Check for X Windows
43297  #
43298
43299  if test "x$X11_NOT_NEEDED" = xyes; then
43300    if test "x${with_x}" != x; then
43301      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
43302$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
43303    fi
43304    X_CFLAGS=
43305    X_LIBS=
43306  else
43307    # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
43308    # Make a simple check for the libraries at the sysroot, and setup --x-includes and
43309    # --x-libraries for the sysroot, if that seems to be correct.
43310    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
43311      if test "x$SYSROOT" != "x"; then
43312        if test "x$x_includes" = xNONE; then
43313          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
43314            x_includes="$SYSROOT/usr/X11R6/include"
43315          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
43316            x_includes="$SYSROOT/usr/include"
43317          fi
43318        fi
43319        if test "x$x_libraries" = xNONE; then
43320          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
43321            x_libraries="$SYSROOT/usr/X11R6/lib"
43322          elif test "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
43323            x_libraries="$SYSROOT/usr/lib64"
43324          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
43325            x_libraries="$SYSROOT/usr/lib"
43326          fi
43327        fi
43328      fi
43329    fi
43330
43331    # Now let autoconf do it's magic
43332    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
43333$as_echo_n "checking for X... " >&6; }
43334
43335
43336# Check whether --with-x was given.
43337if test "${with_x+set}" = set; then :
43338  withval=$with_x;
43339fi
43340
43341# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
43342if test "x$with_x" = xno; then
43343  # The user explicitly disabled X.
43344  have_x=disabled
43345else
43346  case $x_includes,$x_libraries in #(
43347    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
43348    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
43349  $as_echo_n "(cached) " >&6
43350else
43351  # One or both of the vars are not set, and there is no cached value.
43352ac_x_includes=no ac_x_libraries=no
43353rm -f -r conftest.dir
43354if mkdir conftest.dir; then
43355  cd conftest.dir
43356  cat >Imakefile <<'_ACEOF'
43357incroot:
43358	@echo incroot='${INCROOT}'
43359usrlibdir:
43360	@echo usrlibdir='${USRLIBDIR}'
43361libdir:
43362	@echo libdir='${LIBDIR}'
43363_ACEOF
43364  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
43365    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
43366    for ac_var in incroot usrlibdir libdir; do
43367      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
43368    done
43369    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
43370    for ac_extension in a so sl dylib la dll; do
43371      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
43372	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
43373	ac_im_usrlibdir=$ac_im_libdir; break
43374      fi
43375    done
43376    # Screen out bogus values from the imake configuration.  They are
43377    # bogus both because they are the default anyway, and because
43378    # using them would break gcc on systems where it needs fixed includes.
43379    case $ac_im_incroot in
43380	/usr/include) ac_x_includes= ;;
43381	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
43382    esac
43383    case $ac_im_usrlibdir in
43384	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
43385	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
43386    esac
43387  fi
43388  cd ..
43389  rm -f -r conftest.dir
43390fi
43391
43392# Standard set of common directories for X headers.
43393# Check X11 before X11Rn because it is often a symlink to the current release.
43394ac_x_header_dirs='
43395/usr/X11/include
43396/usr/X11R7/include
43397/usr/X11R6/include
43398/usr/X11R5/include
43399/usr/X11R4/include
43400
43401/usr/include/X11
43402/usr/include/X11R7
43403/usr/include/X11R6
43404/usr/include/X11R5
43405/usr/include/X11R4
43406
43407/usr/local/X11/include
43408/usr/local/X11R7/include
43409/usr/local/X11R6/include
43410/usr/local/X11R5/include
43411/usr/local/X11R4/include
43412
43413/usr/local/include/X11
43414/usr/local/include/X11R7
43415/usr/local/include/X11R6
43416/usr/local/include/X11R5
43417/usr/local/include/X11R4
43418
43419/usr/X386/include
43420/usr/x386/include
43421/usr/XFree86/include/X11
43422
43423/usr/include
43424/usr/local/include
43425/usr/unsupported/include
43426/usr/athena/include
43427/usr/local/x11r5/include
43428/usr/lpp/Xamples/include
43429
43430/usr/openwin/include
43431/usr/openwin/share/include'
43432
43433if test "$ac_x_includes" = no; then
43434  # Guess where to find include files, by looking for Xlib.h.
43435  # First, try using that file with no special directory specified.
43436  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43437/* end confdefs.h.  */
43438#include <X11/Xlib.h>
43439_ACEOF
43440if ac_fn_cxx_try_cpp "$LINENO"; then :
43441  # We can compile using X headers with no special include directory.
43442ac_x_includes=
43443else
43444  for ac_dir in $ac_x_header_dirs; do
43445  if test -r "$ac_dir/X11/Xlib.h"; then
43446    ac_x_includes=$ac_dir
43447    break
43448  fi
43449done
43450fi
43451rm -f conftest.err conftest.i conftest.$ac_ext
43452fi # $ac_x_includes = no
43453
43454if test "$ac_x_libraries" = no; then
43455  # Check for the libraries.
43456  # See if we find them without any special options.
43457  # Don't add to $LIBS permanently.
43458  ac_save_LIBS=$LIBS
43459  LIBS="-lX11 $LIBS"
43460  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43461/* end confdefs.h.  */
43462#include <X11/Xlib.h>
43463int
43464main ()
43465{
43466XrmInitialize ()
43467  ;
43468  return 0;
43469}
43470_ACEOF
43471if ac_fn_cxx_try_link "$LINENO"; then :
43472  LIBS=$ac_save_LIBS
43473# We can link X programs with no special library path.
43474ac_x_libraries=
43475else
43476  LIBS=$ac_save_LIBS
43477for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
43478do
43479  # Don't even attempt the hair of trying to link an X program!
43480  for ac_extension in a so sl dylib la dll; do
43481    if test -r "$ac_dir/libX11.$ac_extension"; then
43482      ac_x_libraries=$ac_dir
43483      break 2
43484    fi
43485  done
43486done
43487fi
43488rm -f core conftest.err conftest.$ac_objext \
43489    conftest$ac_exeext conftest.$ac_ext
43490fi # $ac_x_libraries = no
43491
43492case $ac_x_includes,$ac_x_libraries in #(
43493  no,* | *,no | *\'*)
43494    # Didn't find X, or a directory has "'" in its name.
43495    ac_cv_have_x="have_x=no";; #(
43496  *)
43497    # Record where we found X for the cache.
43498    ac_cv_have_x="have_x=yes\
43499	ac_x_includes='$ac_x_includes'\
43500	ac_x_libraries='$ac_x_libraries'"
43501esac
43502fi
43503;; #(
43504    *) have_x=yes;;
43505  esac
43506  eval "$ac_cv_have_x"
43507fi # $with_x != no
43508
43509if test "$have_x" != yes; then
43510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
43511$as_echo "$have_x" >&6; }
43512  no_x=yes
43513else
43514  # If each of the values was on the command line, it overrides each guess.
43515  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
43516  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
43517  # Update the cache value to reflect the command line values.
43518  ac_cv_have_x="have_x=yes\
43519	ac_x_includes='$x_includes'\
43520	ac_x_libraries='$x_libraries'"
43521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
43522$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
43523fi
43524
43525    if test "$no_x" = yes; then
43526  # Not all programs may use this symbol, but it does not hurt to define it.
43527
43528$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
43529
43530  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
43531else
43532  if test -n "$x_includes"; then
43533    X_CFLAGS="$X_CFLAGS -I$x_includes"
43534  fi
43535
43536  # It would also be nice to do this for all -L options, not just this one.
43537  if test -n "$x_libraries"; then
43538    X_LIBS="$X_LIBS -L$x_libraries"
43539    # For Solaris; some versions of Sun CC require a space after -R and
43540    # others require no space.  Words are not sufficient . . . .
43541    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
43542$as_echo_n "checking whether -R must be followed by a space... " >&6; }
43543    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
43544    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
43545    ac_cxx_werror_flag=yes
43546    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43547/* end confdefs.h.  */
43548
43549int
43550main ()
43551{
43552
43553  ;
43554  return 0;
43555}
43556_ACEOF
43557if ac_fn_cxx_try_link "$LINENO"; then :
43558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43559$as_echo "no" >&6; }
43560       X_LIBS="$X_LIBS -R$x_libraries"
43561else
43562  LIBS="$ac_xsave_LIBS -R $x_libraries"
43563       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43564/* end confdefs.h.  */
43565
43566int
43567main ()
43568{
43569
43570  ;
43571  return 0;
43572}
43573_ACEOF
43574if ac_fn_cxx_try_link "$LINENO"; then :
43575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43576$as_echo "yes" >&6; }
43577	  X_LIBS="$X_LIBS -R $x_libraries"
43578else
43579  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
43580$as_echo "neither works" >&6; }
43581fi
43582rm -f core conftest.err conftest.$ac_objext \
43583    conftest$ac_exeext conftest.$ac_ext
43584fi
43585rm -f core conftest.err conftest.$ac_objext \
43586    conftest$ac_exeext conftest.$ac_ext
43587    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
43588    LIBS=$ac_xsave_LIBS
43589  fi
43590
43591  # Check for system-dependent libraries X programs must link with.
43592  # Do this before checking for the system-independent R6 libraries
43593  # (-lICE), since we may need -lsocket or whatever for X linking.
43594
43595  if test "$ISC" = yes; then
43596    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
43597  else
43598    # Martyn Johnson says this is needed for Ultrix, if the X
43599    # libraries were built with DECnet support.  And Karl Berry says
43600    # the Alpha needs dnet_stub (dnet does not exist).
43601    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
43602    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43603/* end confdefs.h.  */
43604
43605/* Override any GCC internal prototype to avoid an error.
43606   Use char because int might match the return type of a GCC
43607   builtin and then its argument prototype would still apply.  */
43608#ifdef __cplusplus
43609extern "C"
43610#endif
43611char XOpenDisplay ();
43612int
43613main ()
43614{
43615return XOpenDisplay ();
43616  ;
43617  return 0;
43618}
43619_ACEOF
43620if ac_fn_cxx_try_link "$LINENO"; then :
43621
43622else
43623  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
43624$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
43625if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
43626  $as_echo_n "(cached) " >&6
43627else
43628  ac_check_lib_save_LIBS=$LIBS
43629LIBS="-ldnet  $LIBS"
43630cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43631/* end confdefs.h.  */
43632
43633/* Override any GCC internal prototype to avoid an error.
43634   Use char because int might match the return type of a GCC
43635   builtin and then its argument prototype would still apply.  */
43636#ifdef __cplusplus
43637extern "C"
43638#endif
43639char dnet_ntoa ();
43640int
43641main ()
43642{
43643return dnet_ntoa ();
43644  ;
43645  return 0;
43646}
43647_ACEOF
43648if ac_fn_cxx_try_link "$LINENO"; then :
43649  ac_cv_lib_dnet_dnet_ntoa=yes
43650else
43651  ac_cv_lib_dnet_dnet_ntoa=no
43652fi
43653rm -f core conftest.err conftest.$ac_objext \
43654    conftest$ac_exeext conftest.$ac_ext
43655LIBS=$ac_check_lib_save_LIBS
43656fi
43657{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
43658$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
43659if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
43660  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
43661fi
43662
43663    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
43664      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
43665$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
43666if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
43667  $as_echo_n "(cached) " >&6
43668else
43669  ac_check_lib_save_LIBS=$LIBS
43670LIBS="-ldnet_stub  $LIBS"
43671cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43672/* end confdefs.h.  */
43673
43674/* Override any GCC internal prototype to avoid an error.
43675   Use char because int might match the return type of a GCC
43676   builtin and then its argument prototype would still apply.  */
43677#ifdef __cplusplus
43678extern "C"
43679#endif
43680char dnet_ntoa ();
43681int
43682main ()
43683{
43684return dnet_ntoa ();
43685  ;
43686  return 0;
43687}
43688_ACEOF
43689if ac_fn_cxx_try_link "$LINENO"; then :
43690  ac_cv_lib_dnet_stub_dnet_ntoa=yes
43691else
43692  ac_cv_lib_dnet_stub_dnet_ntoa=no
43693fi
43694rm -f core conftest.err conftest.$ac_objext \
43695    conftest$ac_exeext conftest.$ac_ext
43696LIBS=$ac_check_lib_save_LIBS
43697fi
43698{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
43699$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
43700if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
43701  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
43702fi
43703
43704    fi
43705fi
43706rm -f core conftest.err conftest.$ac_objext \
43707    conftest$ac_exeext conftest.$ac_ext
43708    LIBS="$ac_xsave_LIBS"
43709
43710    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
43711    # to get the SysV transport functions.
43712    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
43713    # needs -lnsl.
43714    # The nsl library prevents programs from opening the X display
43715    # on Irix 5.2, according to T.E. Dickey.
43716    # The functions gethostbyname, getservbyname, and inet_addr are
43717    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
43718    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
43719if test "x$ac_cv_func_gethostbyname" = xyes; then :
43720
43721fi
43722
43723    if test $ac_cv_func_gethostbyname = no; then
43724      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
43725$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
43726if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
43727  $as_echo_n "(cached) " >&6
43728else
43729  ac_check_lib_save_LIBS=$LIBS
43730LIBS="-lnsl  $LIBS"
43731cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43732/* end confdefs.h.  */
43733
43734/* Override any GCC internal prototype to avoid an error.
43735   Use char because int might match the return type of a GCC
43736   builtin and then its argument prototype would still apply.  */
43737#ifdef __cplusplus
43738extern "C"
43739#endif
43740char gethostbyname ();
43741int
43742main ()
43743{
43744return gethostbyname ();
43745  ;
43746  return 0;
43747}
43748_ACEOF
43749if ac_fn_cxx_try_link "$LINENO"; then :
43750  ac_cv_lib_nsl_gethostbyname=yes
43751else
43752  ac_cv_lib_nsl_gethostbyname=no
43753fi
43754rm -f core conftest.err conftest.$ac_objext \
43755    conftest$ac_exeext conftest.$ac_ext
43756LIBS=$ac_check_lib_save_LIBS
43757fi
43758{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
43759$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
43760if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
43761  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
43762fi
43763
43764      if test $ac_cv_lib_nsl_gethostbyname = no; then
43765	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
43766$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
43767if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
43768  $as_echo_n "(cached) " >&6
43769else
43770  ac_check_lib_save_LIBS=$LIBS
43771LIBS="-lbsd  $LIBS"
43772cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43773/* end confdefs.h.  */
43774
43775/* Override any GCC internal prototype to avoid an error.
43776   Use char because int might match the return type of a GCC
43777   builtin and then its argument prototype would still apply.  */
43778#ifdef __cplusplus
43779extern "C"
43780#endif
43781char gethostbyname ();
43782int
43783main ()
43784{
43785return gethostbyname ();
43786  ;
43787  return 0;
43788}
43789_ACEOF
43790if ac_fn_cxx_try_link "$LINENO"; then :
43791  ac_cv_lib_bsd_gethostbyname=yes
43792else
43793  ac_cv_lib_bsd_gethostbyname=no
43794fi
43795rm -f core conftest.err conftest.$ac_objext \
43796    conftest$ac_exeext conftest.$ac_ext
43797LIBS=$ac_check_lib_save_LIBS
43798fi
43799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
43800$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
43801if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
43802  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
43803fi
43804
43805      fi
43806    fi
43807
43808    # lieder@skyler.mavd.honeywell.com says without -lsocket,
43809    # socket/setsockopt and other routines are undefined under SCO ODT
43810    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
43811    # on later versions), says Simon Leinen: it contains gethostby*
43812    # variants that don't use the name server (or something).  -lsocket
43813    # must be given before -lnsl if both are needed.  We assume that
43814    # if connect needs -lnsl, so does gethostbyname.
43815    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
43816if test "x$ac_cv_func_connect" = xyes; then :
43817
43818fi
43819
43820    if test $ac_cv_func_connect = no; then
43821      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
43822$as_echo_n "checking for connect in -lsocket... " >&6; }
43823if ${ac_cv_lib_socket_connect+:} false; then :
43824  $as_echo_n "(cached) " >&6
43825else
43826  ac_check_lib_save_LIBS=$LIBS
43827LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
43828cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43829/* end confdefs.h.  */
43830
43831/* Override any GCC internal prototype to avoid an error.
43832   Use char because int might match the return type of a GCC
43833   builtin and then its argument prototype would still apply.  */
43834#ifdef __cplusplus
43835extern "C"
43836#endif
43837char connect ();
43838int
43839main ()
43840{
43841return connect ();
43842  ;
43843  return 0;
43844}
43845_ACEOF
43846if ac_fn_cxx_try_link "$LINENO"; then :
43847  ac_cv_lib_socket_connect=yes
43848else
43849  ac_cv_lib_socket_connect=no
43850fi
43851rm -f core conftest.err conftest.$ac_objext \
43852    conftest$ac_exeext conftest.$ac_ext
43853LIBS=$ac_check_lib_save_LIBS
43854fi
43855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
43856$as_echo "$ac_cv_lib_socket_connect" >&6; }
43857if test "x$ac_cv_lib_socket_connect" = xyes; then :
43858  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
43859fi
43860
43861    fi
43862
43863    # Guillermo Gomez says -lposix is necessary on A/UX.
43864    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
43865if test "x$ac_cv_func_remove" = xyes; then :
43866
43867fi
43868
43869    if test $ac_cv_func_remove = no; then
43870      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
43871$as_echo_n "checking for remove in -lposix... " >&6; }
43872if ${ac_cv_lib_posix_remove+:} false; then :
43873  $as_echo_n "(cached) " >&6
43874else
43875  ac_check_lib_save_LIBS=$LIBS
43876LIBS="-lposix  $LIBS"
43877cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43878/* end confdefs.h.  */
43879
43880/* Override any GCC internal prototype to avoid an error.
43881   Use char because int might match the return type of a GCC
43882   builtin and then its argument prototype would still apply.  */
43883#ifdef __cplusplus
43884extern "C"
43885#endif
43886char remove ();
43887int
43888main ()
43889{
43890return remove ();
43891  ;
43892  return 0;
43893}
43894_ACEOF
43895if ac_fn_cxx_try_link "$LINENO"; then :
43896  ac_cv_lib_posix_remove=yes
43897else
43898  ac_cv_lib_posix_remove=no
43899fi
43900rm -f core conftest.err conftest.$ac_objext \
43901    conftest$ac_exeext conftest.$ac_ext
43902LIBS=$ac_check_lib_save_LIBS
43903fi
43904{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
43905$as_echo "$ac_cv_lib_posix_remove" >&6; }
43906if test "x$ac_cv_lib_posix_remove" = xyes; then :
43907  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
43908fi
43909
43910    fi
43911
43912    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
43913    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
43914if test "x$ac_cv_func_shmat" = xyes; then :
43915
43916fi
43917
43918    if test $ac_cv_func_shmat = no; then
43919      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
43920$as_echo_n "checking for shmat in -lipc... " >&6; }
43921if ${ac_cv_lib_ipc_shmat+:} false; then :
43922  $as_echo_n "(cached) " >&6
43923else
43924  ac_check_lib_save_LIBS=$LIBS
43925LIBS="-lipc  $LIBS"
43926cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43927/* end confdefs.h.  */
43928
43929/* Override any GCC internal prototype to avoid an error.
43930   Use char because int might match the return type of a GCC
43931   builtin and then its argument prototype would still apply.  */
43932#ifdef __cplusplus
43933extern "C"
43934#endif
43935char shmat ();
43936int
43937main ()
43938{
43939return shmat ();
43940  ;
43941  return 0;
43942}
43943_ACEOF
43944if ac_fn_cxx_try_link "$LINENO"; then :
43945  ac_cv_lib_ipc_shmat=yes
43946else
43947  ac_cv_lib_ipc_shmat=no
43948fi
43949rm -f core conftest.err conftest.$ac_objext \
43950    conftest$ac_exeext conftest.$ac_ext
43951LIBS=$ac_check_lib_save_LIBS
43952fi
43953{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
43954$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
43955if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
43956  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
43957fi
43958
43959    fi
43960  fi
43961
43962  # Check for libraries that X11R6 Xt/Xaw programs need.
43963  ac_save_LDFLAGS=$LDFLAGS
43964  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
43965  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
43966  # check for ICE first), but we must link in the order -lSM -lICE or
43967  # we get undefined symbols.  So assume we have SM if we have ICE.
43968  # These have to be linked with before -lX11, unlike the other
43969  # libraries we check for below, so use a different variable.
43970  # John Interrante, Karl Berry
43971  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
43972$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
43973if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
43974  $as_echo_n "(cached) " >&6
43975else
43976  ac_check_lib_save_LIBS=$LIBS
43977LIBS="-lICE $X_EXTRA_LIBS $LIBS"
43978cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43979/* end confdefs.h.  */
43980
43981/* Override any GCC internal prototype to avoid an error.
43982   Use char because int might match the return type of a GCC
43983   builtin and then its argument prototype would still apply.  */
43984#ifdef __cplusplus
43985extern "C"
43986#endif
43987char IceConnectionNumber ();
43988int
43989main ()
43990{
43991return IceConnectionNumber ();
43992  ;
43993  return 0;
43994}
43995_ACEOF
43996if ac_fn_cxx_try_link "$LINENO"; then :
43997  ac_cv_lib_ICE_IceConnectionNumber=yes
43998else
43999  ac_cv_lib_ICE_IceConnectionNumber=no
44000fi
44001rm -f core conftest.err conftest.$ac_objext \
44002    conftest$ac_exeext conftest.$ac_ext
44003LIBS=$ac_check_lib_save_LIBS
44004fi
44005{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
44006$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
44007if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
44008  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
44009fi
44010
44011  LDFLAGS=$ac_save_LDFLAGS
44012
44013fi
44014
44015
44016    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
44017    # this doesn't make sense so we remove it.
44018    if test "x$COMPILE_TYPE" = xcross; then
44019      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
44020    fi
44021
44022    if test "x$no_x" = xyes; then
44023
44024  # Print a helpful message on how to acquire the necessary build dependency.
44025  # x11 is the help tag: freetype, cups, pulse, alsa etc
44026  MISSING_DEPENDENCY=x11
44027
44028  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44029    cygwin_help $MISSING_DEPENDENCY
44030  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44031    msys_help $MISSING_DEPENDENCY
44032  else
44033    PKGHANDLER_COMMAND=
44034
44035    case $PKGHANDLER in
44036      apt-get)
44037        apt_help     $MISSING_DEPENDENCY ;;
44038      yum)
44039        yum_help     $MISSING_DEPENDENCY ;;
44040      port)
44041        port_help    $MISSING_DEPENDENCY ;;
44042      pkgutil)
44043        pkgutil_help $MISSING_DEPENDENCY ;;
44044      pkgadd)
44045        pkgadd_help  $MISSING_DEPENDENCY ;;
44046    esac
44047
44048    if test "x$PKGHANDLER_COMMAND" != x; then
44049      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44050    fi
44051  fi
44052
44053      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
44054    fi
44055
44056    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
44057      OPENWIN_HOME="/usr/openwin"
44058      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
44059      X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
44060          -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
44061          -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
44062          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
44063    fi
44064
44065    ac_ext=c
44066ac_cpp='$CPP $CPPFLAGS'
44067ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44068ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44069ac_compiler_gnu=$ac_cv_c_compiler_gnu
44070
44071    OLD_CFLAGS="$CFLAGS"
44072    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
44073
44074    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
44075    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
44076do :
44077  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
44078ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
44079          # include <X11/Xlib.h>
44080          # include <X11/Xutil.h>
44081
44082
44083"
44084if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
44085  cat >>confdefs.h <<_ACEOF
44086#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
44087_ACEOF
44088 X11_HEADERS_OK=yes
44089else
44090  X11_HEADERS_OK=no; break
44091fi
44092
44093done
44094
44095
44096    if test "x$X11_HEADERS_OK" = xno; then
44097
44098  # Print a helpful message on how to acquire the necessary build dependency.
44099  # x11 is the help tag: freetype, cups, pulse, alsa etc
44100  MISSING_DEPENDENCY=x11
44101
44102  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44103    cygwin_help $MISSING_DEPENDENCY
44104  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44105    msys_help $MISSING_DEPENDENCY
44106  else
44107    PKGHANDLER_COMMAND=
44108
44109    case $PKGHANDLER in
44110      apt-get)
44111        apt_help     $MISSING_DEPENDENCY ;;
44112      yum)
44113        yum_help     $MISSING_DEPENDENCY ;;
44114      port)
44115        port_help    $MISSING_DEPENDENCY ;;
44116      pkgutil)
44117        pkgutil_help $MISSING_DEPENDENCY ;;
44118      pkgadd)
44119        pkgadd_help  $MISSING_DEPENDENCY ;;
44120    esac
44121
44122    if test "x$PKGHANDLER_COMMAND" != x; then
44123      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44124    fi
44125  fi
44126
44127      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
44128    fi
44129
44130    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
44131    # defined in libawt_xawt.
44132    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
44133$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
44134    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44135/* end confdefs.h.  */
44136#include <X11/extensions/Xrender.h>
44137int
44138main ()
44139{
44140XLinearGradient x;
44141  ;
44142  return 0;
44143}
44144_ACEOF
44145if ac_fn_c_try_compile "$LINENO"; then :
44146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
44147$as_echo "yes" >&6; }
44148else
44149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44150$as_echo "no" >&6; }
44151         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
44152fi
44153rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44154
44155    CFLAGS="$OLD_CFLAGS"
44156    ac_ext=cpp
44157ac_cpp='$CXXCPP $CPPFLAGS'
44158ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44159ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44160ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44161
44162  fi # X11_NOT_NEEDED
44163
44164
44165
44166
44167
44168
44169  ###############################################################################
44170  #
44171  # The common unix printing system cups is used to print from java.
44172  #
44173
44174# Check whether --with-cups was given.
44175if test "${with_cups+set}" = set; then :
44176  withval=$with_cups;
44177fi
44178
44179
44180# Check whether --with-cups-include was given.
44181if test "${with_cups_include+set}" = set; then :
44182  withval=$with_cups_include;
44183fi
44184
44185
44186  if test "x$CUPS_NOT_NEEDED" = xyes; then
44187    if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
44188      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
44189$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
44190    fi
44191    CUPS_CFLAGS=
44192  else
44193    CUPS_FOUND=no
44194
44195    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
44196      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
44197    fi
44198
44199    if test "x${with_cups}" != x; then
44200      CUPS_CFLAGS="-I${with_cups}/include"
44201      CUPS_FOUND=yes
44202    fi
44203    if test "x${with_cups_include}" != x; then
44204      CUPS_CFLAGS="-I${with_cups_include}"
44205      CUPS_FOUND=yes
44206    fi
44207    if test "x$CUPS_FOUND" = xno; then
44208
44209
44210  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
44211    # Source the builddeps file again, to make sure it uses the latest variables!
44212    . $builddepsfile
44213    # Look for a target and build machine specific resource!
44214    eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
44215    if test "x$resource" = x; then
44216      # Ok, lets instead look for a target specific resource
44217      eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
44218    fi
44219    if test "x$resource" = x; then
44220      # Ok, lets instead look for a build specific resource
44221      eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
44222    fi
44223    if test "x$resource" = x; then
44224      # Ok, lets instead look for a generic resource
44225      # (The cups comes from M4 and not the shell, thus no need for eval here.)
44226      resource=${builddep_cups}
44227    fi
44228    if test "x$resource" != x; then
44229      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
44230$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
44231      # If the resource in the builddeps.conf file is an existing directory,
44232      # for example /java/linux/cups
44233      if test -d ${resource}; then
44234        depdir=${resource}
44235      else
44236
44237  # cups is for example mymodule
44238  # $resource is for example libs/general/libmymod_1_2_3.zip
44239  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
44240  # $with_builddeps_dir is for example /localhome/builddeps
44241  # depdir is the name of the variable into which we store the depdir, eg MYMOD
44242  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
44243  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
44244  filename=`basename $resource`
44245  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
44246  filebase=${filename%%.*}
44247  extension=${filename#*.}
44248  installdir=$with_builddeps_dir/$filebase
44249  if test ! -f $installdir/$filename.unpacked; then
44250    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
44251$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
44252    if test ! -d $installdir; then
44253      mkdir -p $installdir
44254    fi
44255    if test ! -d $installdir; then
44256      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
44257    fi
44258    tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
44259    touch $tmpfile
44260    if test ! -f $tmpfile; then
44261      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
44262    fi
44263
44264  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
44265  # $tmpfile is the local file name for the downloaded file.
44266  VALID_TOOL=no
44267  if test "x$BDEPS_FTP" = xwget; then
44268    VALID_TOOL=yes
44269    wget -O $tmpfile $with_builddeps_server/$resource
44270  fi
44271  if test "x$BDEPS_FTP" = xlftp; then
44272    VALID_TOOL=yes
44273    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
44274  fi
44275  if test "x$BDEPS_FTP" = xftp; then
44276    VALID_TOOL=yes
44277    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
44278    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
44279    FTPUSERPWD=${FTPSERVER%%@*}
44280    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
44281      FTPUSER=${userpwd%%:*}
44282      FTPPWD=${userpwd#*@}
44283      FTPSERVER=${FTPSERVER#*@}
44284    else
44285      FTPUSER=ftp
44286      FTPPWD=ftp
44287    fi
44288    # the "pass" command does not work on some
44289    # ftp clients (read ftp.exe) but if it works,
44290    # passive mode is better!
44291    ( \
44292        echo "user $FTPUSER $FTPPWD"        ; \
44293        echo "pass"                         ; \
44294        echo "bin"                          ; \
44295        echo "get $FTPPATH $tmpfile"              ; \
44296    ) | ftp -in $FTPSERVER
44297  fi
44298  if test "x$VALID_TOOL" != xyes; then
44299    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
44300  fi
44301
44302    mv $tmpfile $installdir/$filename
44303    if test ! -s $installdir/$filename; then
44304      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
44305    fi
44306    case "$extension" in
44307      zip)  echo "Unzipping $installdir/$filename..."
44308        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
44309        ;;
44310      tar.gz) echo "Untaring $installdir/$filename..."
44311        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44312        ;;
44313      tgz) echo "Untaring $installdir/$filename..."
44314        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44315        ;;
44316      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
44317        ;;
44318    esac
44319  fi
44320  if test -f $installdir/$filename.unpacked; then
44321    depdir=$installdir
44322  fi
44323
44324      fi
44325      # Source the builddeps file again, because in the previous command, the depdir
44326      # was updated to point at the current build dependency install directory.
44327      . $builddepsfile
44328      # Now extract variables from the builddeps.conf files.
44329      theroot=${builddep_cups_ROOT}
44330      thecflags=${builddep_cups_CFLAGS}
44331      thelibs=${builddep_cups_LIBS}
44332      if test "x$depdir" = x; then
44333        as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
44334      fi
44335      CUPS=$depdir
44336      if test "x$theroot" != x; then
44337        CUPS="$theroot"
44338      fi
44339      if test "x$thecflags" != x; then
44340        CUPS_CFLAGS="$thecflags"
44341      fi
44342      if test "x$thelibs" != x; then
44343        CUPS_LIBS="$thelibs"
44344      fi
44345      CUPS_FOUND=yes
44346
44347    fi
44348
44349  fi
44350
44351    fi
44352    if test "x$CUPS_FOUND" = xno; then
44353      # Are the cups headers installed in the default /usr/include location?
44354      for ac_header in cups/cups.h cups/ppd.h
44355do :
44356  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
44357ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
44358if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
44359  cat >>confdefs.h <<_ACEOF
44360#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
44361_ACEOF
44362
44363            CUPS_FOUND=yes
44364            CUPS_CFLAGS=
44365            DEFAULT_CUPS=yes
44366
44367
44368fi
44369
44370done
44371
44372    fi
44373    if test "x$CUPS_FOUND" = xno; then
44374      # Getting nervous now? Lets poke around for standard Solaris third-party
44375      # package installation locations.
44376      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
44377$as_echo_n "checking for cups headers... " >&6; }
44378      if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
44379        # An SFW package seems to be installed!
44380        CUPS_FOUND=yes
44381        CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
44382      elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
44383        # A CSW package seems to be installed!
44384        CUPS_FOUND=yes
44385        CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
44386      fi
44387      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
44388$as_echo "$CUPS_FOUND" >&6; }
44389    fi
44390    if test "x$CUPS_FOUND" = xno; then
44391
44392  # Print a helpful message on how to acquire the necessary build dependency.
44393  # cups is the help tag: freetype, cups, pulse, alsa etc
44394  MISSING_DEPENDENCY=cups
44395
44396  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44397    cygwin_help $MISSING_DEPENDENCY
44398  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44399    msys_help $MISSING_DEPENDENCY
44400  else
44401    PKGHANDLER_COMMAND=
44402
44403    case $PKGHANDLER in
44404      apt-get)
44405        apt_help     $MISSING_DEPENDENCY ;;
44406      yum)
44407        yum_help     $MISSING_DEPENDENCY ;;
44408      port)
44409        port_help    $MISSING_DEPENDENCY ;;
44410      pkgutil)
44411        pkgutil_help $MISSING_DEPENDENCY ;;
44412      pkgadd)
44413        pkgadd_help  $MISSING_DEPENDENCY ;;
44414    esac
44415
44416    if test "x$PKGHANDLER_COMMAND" != x; then
44417      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44418    fi
44419  fi
44420
44421      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
44422    fi
44423  fi
44424
44425
44426
44427
44428
44429
44430  ###############################################################################
44431  #
44432  # The ubiquitous freetype library is used to render fonts.
44433  #
44434
44435# Check whether --with-freetype was given.
44436if test "${with_freetype+set}" = set; then :
44437  withval=$with_freetype;
44438fi
44439
44440
44441# Check whether --with-freetype-include was given.
44442if test "${with_freetype_include+set}" = set; then :
44443  withval=$with_freetype_include;
44444fi
44445
44446
44447# Check whether --with-freetype-lib was given.
44448if test "${with_freetype_lib+set}" = set; then :
44449  withval=$with_freetype_lib;
44450fi
44451
44452
44453# Check whether --with-freetype-src was given.
44454if test "${with_freetype_src+set}" = set; then :
44455  withval=$with_freetype_src;
44456fi
44457
44458  # Check whether --enable-freetype-bundling was given.
44459if test "${enable_freetype_bundling+set}" = set; then :
44460  enableval=$enable_freetype_bundling;
44461fi
44462
44463
44464  # Need to specify explicitly since it needs to be overridden on some versions of macosx
44465  FREETYPE_BASE_NAME=freetype
44466  FREETYPE_CFLAGS=
44467  FREETYPE_LIBS=
44468  FREETYPE_BUNDLE_LIB_PATH=
44469
44470  if test "x$FREETYPE_NOT_NEEDED" = xyes; then
44471    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
44472      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
44473$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
44474    fi
44475    if test "x$enable_freetype_bundling" != x; then
44476      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
44477$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
44478    fi
44479  else
44480    # freetype is needed to build; go get it!
44481
44482    BUNDLE_FREETYPE="$enable_freetype_bundling"
44483
44484    if  test "x$with_freetype_src" != x; then
44485      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44486        # Try to build freetype if --with-freetype-src was given on Windows
44487
44488  FREETYPE_SRC_PATH="$with_freetype_src"
44489  BUILD_FREETYPE=yes
44490
44491  # Check if the freetype sources are acessible..
44492  if ! test -d $FREETYPE_SRC_PATH; then
44493    { $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
44494$as_echo "$as_me: WARNING: --with-freetype-src specified, but can't find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
44495    BUILD_FREETYPE=no
44496  fi
44497  # ..and contain a vc2010 project file
44498  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
44499  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
44500    { $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
44501$as_echo "$as_me: WARNING: Can't find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
44502    BUILD_FREETYPE=no
44503  fi
44504  # Now check if configure found a version of 'msbuild.exe'
44505  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
44506    { $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
44507$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;}
44508    BUILD_FREETYPE=no
44509  fi
44510
44511  # Ready to go..
44512  if test "x$BUILD_FREETYPE" = xyes; then
44513
44514    # msbuild requires trailing slashes for output directories
44515    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
44516    freetype_lib_path_unix="$freetype_lib_path"
44517    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
44518
44519  unix_path="$vcxproj_path"
44520  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44521    windows_path=`$CYGPATH -m "$unix_path"`
44522    vcxproj_path="$windows_path"
44523  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44524    windows_path=`cmd //c echo $unix_path`
44525    vcxproj_path="$windows_path"
44526  fi
44527
44528
44529  unix_path="$freetype_lib_path"
44530  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44531    windows_path=`$CYGPATH -m "$unix_path"`
44532    freetype_lib_path="$windows_path"
44533  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44534    windows_path=`cmd //c echo $unix_path`
44535    freetype_lib_path="$windows_path"
44536  fi
44537
44538
44539  unix_path="$freetype_obj_path"
44540  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44541    windows_path=`$CYGPATH -m "$unix_path"`
44542    freetype_obj_path="$windows_path"
44543  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44544    windows_path=`cmd //c echo $unix_path`
44545    freetype_obj_path="$windows_path"
44546  fi
44547
44548    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
44549      freetype_platform=x64
44550    else
44551      freetype_platform=win32
44552    fi
44553
44554    # The original freetype project file is for VS 2010 (i.e. 'v100'),
44555    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
44556    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
44557    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
44558    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
44559$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
44560
44561    # First we try to build the freetype.dll
44562    $ECHO -e "@echo off\n"\
44563	     "$MSBUILD $vcxproj_path "\
44564		       "/p:PlatformToolset=$PLATFORM_TOOLSET "\
44565		       "/p:Configuration=\"Release Multithreaded\" "\
44566		       "/p:Platform=$freetype_platform "\
44567		       "/p:ConfigurationType=DynamicLibrary "\
44568		       "/p:TargetName=freetype "\
44569		       "/p:OutDir=\"$freetype_lib_path\" "\
44570		       "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
44571    cmd /c freetype.bat
44572
44573    if test -s "$freetype_lib_path_unix/freetype.dll"; then
44574      # If that succeeds we also build freetype.lib
44575      $ECHO -e "@echo off\n"\
44576	       "$MSBUILD $vcxproj_path "\
44577			 "/p:PlatformToolset=$PLATFORM_TOOLSET "\
44578			 "/p:Configuration=\"Release Multithreaded\" "\
44579			 "/p:Platform=$freetype_platform "\
44580			 "/p:ConfigurationType=StaticLibrary "\
44581			 "/p:TargetName=freetype "\
44582			 "/p:OutDir=\"$freetype_lib_path\" "\
44583			 "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
44584      cmd /c freetype.bat
44585
44586      if test -s "$freetype_lib_path_unix/freetype.lib"; then
44587	# Once we build both, lib and dll, set freetype lib and include path appropriately
44588	POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
44589	POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
44590	{ $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
44591$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
44592      else
44593	BUILD_FREETYPE=no
44594      fi
44595    else
44596      BUILD_FREETYPE=no
44597    fi
44598  fi
44599
44600        if test "x$BUILD_FREETYPE" = xyes; then
44601          # Okay, we built it. Check that it works.
44602
44603  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44604  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44605  METHOD="--with-freetype-src"
44606
44607  # Let's start with an optimistic view of the world :-)
44608  FOUND_FREETYPE=yes
44609
44610  # First look for the canonical freetype main include file ft2build.h.
44611  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44612    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
44613    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
44614    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44615      # Fail.
44616      FOUND_FREETYPE=no
44617    fi
44618  fi
44619
44620  if test "x$FOUND_FREETYPE" = xyes; then
44621    # Include file found, let's continue the sanity check.
44622    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44623$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44624
44625    # Reset to default value
44626    FREETYPE_BASE_NAME=freetype
44627    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44628    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44629      if test "x$OPENJDK_TARGET_OS" = xmacosx \
44630          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
44631        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
44632        # for the .6 version explicitly.
44633        FREETYPE_BASE_NAME=freetype.6
44634        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44635        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
44636$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
44637      else
44638        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44639$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44640        FOUND_FREETYPE=no
44641      fi
44642    else
44643      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44644        # On Windows, we will need both .lib and .dll file.
44645        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
44646          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
44647$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
44648          FOUND_FREETYPE=no
44649        fi
44650      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
44651          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
44652        # Found lib in isa dir, use that instead.
44653        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
44654        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
44655$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
44656      fi
44657    fi
44658  fi
44659
44660  if test "x$FOUND_FREETYPE" = xyes; then
44661
44662  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44663
44664  # Input might be given as Windows format, start by converting to
44665  # unix format.
44666  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44667  new_path=`$CYGPATH -u "$path"`
44668
44669  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44670  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44671  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44672  # "foo.exe" is OK but "foo" is an error.
44673  #
44674  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44675  # It is also a way to make sure we got the proper file name for the real test later on.
44676  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44677  if test "x$test_shortpath" = x; then
44678    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44679$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44680    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44681  fi
44682
44683  # Call helper function which possibly converts this using DOS-style short mode.
44684  # If so, the updated path is stored in $new_path.
44685
44686  input_path="$new_path"
44687  # Check if we need to convert this using DOS-style short mode. If the path
44688  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44689  # take no chances and rewrite it.
44690  # Note: m4 eats our [], so we need to use [ and ] instead.
44691  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44692  if test "x$has_forbidden_chars" != x; then
44693    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44694    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44695    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44696    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44697      # Going to short mode and back again did indeed matter. Since short mode is
44698      # case insensitive, let's make it lowercase to improve readability.
44699      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44700      # Now convert it back to Unix-stile (cygpath)
44701      input_path=`$CYGPATH -u "$shortmode_path"`
44702      new_path="$input_path"
44703    fi
44704  fi
44705
44706  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44707  if test "x$test_cygdrive_prefix" = x; then
44708    # As a simple fix, exclude /usr/bin since it's not a real path.
44709    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44710      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44711      # a path prefixed by /cygdrive for fixpath to work.
44712      new_path="$CYGWIN_ROOT_PATH$input_path"
44713    fi
44714  fi
44715
44716
44717  if test "x$path" != "x$new_path"; then
44718    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44719    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44720$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44721  fi
44722
44723  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44724
44725  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44726  has_colon=`$ECHO $path | $GREP ^.:`
44727  new_path="$path"
44728  if test "x$has_colon" = x; then
44729    # Not in mixed or Windows style, start by that.
44730    new_path=`cmd //c echo $path`
44731  fi
44732
44733
44734  input_path="$new_path"
44735  # Check if we need to convert this using DOS-style short mode. If the path
44736  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44737  # take no chances and rewrite it.
44738  # Note: m4 eats our [], so we need to use [ and ] instead.
44739  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44740  if test "x$has_forbidden_chars" != x; then
44741    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44742    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44743  fi
44744
44745
44746  windows_path="$new_path"
44747  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44748    unix_path=`$CYGPATH -u "$windows_path"`
44749    new_path="$unix_path"
44750  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44751    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44752    new_path="$unix_path"
44753  fi
44754
44755  if test "x$path" != "x$new_path"; then
44756    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44757    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44758$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44759  fi
44760
44761  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44762  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44763
44764  else
44765    # We're on a unix platform. Hooray! :)
44766    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44767    has_space=`$ECHO "$path" | $GREP " "`
44768    if test "x$has_space" != x; then
44769      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44770$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44771      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44772    fi
44773
44774    # Use eval to expand a potential ~
44775    eval path="$path"
44776    if test ! -f "$path" && test ! -d "$path"; then
44777      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44778    fi
44779
44780    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44781  fi
44782
44783
44784  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44785
44786  # Input might be given as Windows format, start by converting to
44787  # unix format.
44788  path="$POTENTIAL_FREETYPE_LIB_PATH"
44789  new_path=`$CYGPATH -u "$path"`
44790
44791  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44792  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44793  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44794  # "foo.exe" is OK but "foo" is an error.
44795  #
44796  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44797  # It is also a way to make sure we got the proper file name for the real test later on.
44798  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44799  if test "x$test_shortpath" = x; then
44800    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44801$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44802    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44803  fi
44804
44805  # Call helper function which possibly converts this using DOS-style short mode.
44806  # If so, the updated path is stored in $new_path.
44807
44808  input_path="$new_path"
44809  # Check if we need to convert this using DOS-style short mode. If the path
44810  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44811  # take no chances and rewrite it.
44812  # Note: m4 eats our [], so we need to use [ and ] instead.
44813  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44814  if test "x$has_forbidden_chars" != x; then
44815    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44816    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44817    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44818    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44819      # Going to short mode and back again did indeed matter. Since short mode is
44820      # case insensitive, let's make it lowercase to improve readability.
44821      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44822      # Now convert it back to Unix-stile (cygpath)
44823      input_path=`$CYGPATH -u "$shortmode_path"`
44824      new_path="$input_path"
44825    fi
44826  fi
44827
44828  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44829  if test "x$test_cygdrive_prefix" = x; then
44830    # As a simple fix, exclude /usr/bin since it's not a real path.
44831    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44832      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44833      # a path prefixed by /cygdrive for fixpath to work.
44834      new_path="$CYGWIN_ROOT_PATH$input_path"
44835    fi
44836  fi
44837
44838
44839  if test "x$path" != "x$new_path"; then
44840    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44841    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44842$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44843  fi
44844
44845  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44846
44847  path="$POTENTIAL_FREETYPE_LIB_PATH"
44848  has_colon=`$ECHO $path | $GREP ^.:`
44849  new_path="$path"
44850  if test "x$has_colon" = x; then
44851    # Not in mixed or Windows style, start by that.
44852    new_path=`cmd //c echo $path`
44853  fi
44854
44855
44856  input_path="$new_path"
44857  # Check if we need to convert this using DOS-style short mode. If the path
44858  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44859  # take no chances and rewrite it.
44860  # Note: m4 eats our [], so we need to use [ and ] instead.
44861  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44862  if test "x$has_forbidden_chars" != x; then
44863    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44864    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44865  fi
44866
44867
44868  windows_path="$new_path"
44869  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44870    unix_path=`$CYGPATH -u "$windows_path"`
44871    new_path="$unix_path"
44872  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44873    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44874    new_path="$unix_path"
44875  fi
44876
44877  if test "x$path" != "x$new_path"; then
44878    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44879    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44880$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44881  fi
44882
44883  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44884  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44885
44886  else
44887    # We're on a unix platform. Hooray! :)
44888    path="$POTENTIAL_FREETYPE_LIB_PATH"
44889    has_space=`$ECHO "$path" | $GREP " "`
44890    if test "x$has_space" != x; then
44891      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44892$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44893      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44894    fi
44895
44896    # Use eval to expand a potential ~
44897    eval path="$path"
44898    if test ! -f "$path" && test ! -d "$path"; then
44899      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44900    fi
44901
44902    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44903  fi
44904
44905
44906    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44907    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44908$as_echo_n "checking for freetype includes... " >&6; }
44909    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44910$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44911    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44912    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44913$as_echo_n "checking for freetype libraries... " >&6; }
44914    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44915$as_echo "$FREETYPE_LIB_PATH" >&6; }
44916  fi
44917
44918          if test "x$FOUND_FREETYPE" != xyes; then
44919            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
44920          fi
44921        else
44922          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
44923$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
44924          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
44925        fi
44926      else
44927        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
44928$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
44929      fi
44930    fi
44931
44932    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
44933      # User has specified settings
44934
44935      if test "x$BUNDLE_FREETYPE" = x; then
44936        # If not specified, default is to bundle freetype
44937        BUNDLE_FREETYPE=yes
44938      fi
44939
44940      if test "x$with_freetype" != x; then
44941        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
44942        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
44943      fi
44944
44945      # Allow --with-freetype-lib and --with-freetype-include to override
44946      if test "x$with_freetype_include" != x; then
44947        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
44948      fi
44949      if test "x$with_freetype_lib" != x; then
44950        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
44951      fi
44952
44953      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
44954        # Okay, we got it. Check that it works.
44955
44956  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44957  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44958  METHOD="--with-freetype"
44959
44960  # Let's start with an optimistic view of the world :-)
44961  FOUND_FREETYPE=yes
44962
44963  # First look for the canonical freetype main include file ft2build.h.
44964  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44965    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
44966    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
44967    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44968      # Fail.
44969      FOUND_FREETYPE=no
44970    fi
44971  fi
44972
44973  if test "x$FOUND_FREETYPE" = xyes; then
44974    # Include file found, let's continue the sanity check.
44975    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44976$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44977
44978    # Reset to default value
44979    FREETYPE_BASE_NAME=freetype
44980    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44981    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44982      if test "x$OPENJDK_TARGET_OS" = xmacosx \
44983          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
44984        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
44985        # for the .6 version explicitly.
44986        FREETYPE_BASE_NAME=freetype.6
44987        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44988        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
44989$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
44990      else
44991        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44992$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44993        FOUND_FREETYPE=no
44994      fi
44995    else
44996      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44997        # On Windows, we will need both .lib and .dll file.
44998        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
44999          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45000$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45001          FOUND_FREETYPE=no
45002        fi
45003      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45004          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45005        # Found lib in isa dir, use that instead.
45006        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45007        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45008$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45009      fi
45010    fi
45011  fi
45012
45013  if test "x$FOUND_FREETYPE" = xyes; then
45014
45015  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45016
45017  # Input might be given as Windows format, start by converting to
45018  # unix format.
45019  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45020  new_path=`$CYGPATH -u "$path"`
45021
45022  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45023  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45024  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45025  # "foo.exe" is OK but "foo" is an error.
45026  #
45027  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45028  # It is also a way to make sure we got the proper file name for the real test later on.
45029  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45030  if test "x$test_shortpath" = x; then
45031    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45032$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45033    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45034  fi
45035
45036  # Call helper function which possibly converts this using DOS-style short mode.
45037  # If so, the updated path is stored in $new_path.
45038
45039  input_path="$new_path"
45040  # Check if we need to convert this using DOS-style short mode. If the path
45041  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45042  # take no chances and rewrite it.
45043  # Note: m4 eats our [], so we need to use [ and ] instead.
45044  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45045  if test "x$has_forbidden_chars" != x; then
45046    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45047    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45048    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45049    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45050      # Going to short mode and back again did indeed matter. Since short mode is
45051      # case insensitive, let's make it lowercase to improve readability.
45052      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45053      # Now convert it back to Unix-stile (cygpath)
45054      input_path=`$CYGPATH -u "$shortmode_path"`
45055      new_path="$input_path"
45056    fi
45057  fi
45058
45059  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45060  if test "x$test_cygdrive_prefix" = x; then
45061    # As a simple fix, exclude /usr/bin since it's not a real path.
45062    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45063      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45064      # a path prefixed by /cygdrive for fixpath to work.
45065      new_path="$CYGWIN_ROOT_PATH$input_path"
45066    fi
45067  fi
45068
45069
45070  if test "x$path" != "x$new_path"; then
45071    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45072    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45073$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45074  fi
45075
45076  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45077
45078  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45079  has_colon=`$ECHO $path | $GREP ^.:`
45080  new_path="$path"
45081  if test "x$has_colon" = x; then
45082    # Not in mixed or Windows style, start by that.
45083    new_path=`cmd //c echo $path`
45084  fi
45085
45086
45087  input_path="$new_path"
45088  # Check if we need to convert this using DOS-style short mode. If the path
45089  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45090  # take no chances and rewrite it.
45091  # Note: m4 eats our [], so we need to use [ and ] instead.
45092  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45093  if test "x$has_forbidden_chars" != x; then
45094    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45095    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45096  fi
45097
45098
45099  windows_path="$new_path"
45100  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45101    unix_path=`$CYGPATH -u "$windows_path"`
45102    new_path="$unix_path"
45103  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45104    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45105    new_path="$unix_path"
45106  fi
45107
45108  if test "x$path" != "x$new_path"; then
45109    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45110    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45111$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45112  fi
45113
45114  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45115  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45116
45117  else
45118    # We're on a unix platform. Hooray! :)
45119    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45120    has_space=`$ECHO "$path" | $GREP " "`
45121    if test "x$has_space" != x; then
45122      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45123$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45124      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45125    fi
45126
45127    # Use eval to expand a potential ~
45128    eval path="$path"
45129    if test ! -f "$path" && test ! -d "$path"; then
45130      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45131    fi
45132
45133    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45134  fi
45135
45136
45137  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45138
45139  # Input might be given as Windows format, start by converting to
45140  # unix format.
45141  path="$POTENTIAL_FREETYPE_LIB_PATH"
45142  new_path=`$CYGPATH -u "$path"`
45143
45144  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45145  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45146  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45147  # "foo.exe" is OK but "foo" is an error.
45148  #
45149  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45150  # It is also a way to make sure we got the proper file name for the real test later on.
45151  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45152  if test "x$test_shortpath" = x; then
45153    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45154$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45155    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45156  fi
45157
45158  # Call helper function which possibly converts this using DOS-style short mode.
45159  # If so, the updated path is stored in $new_path.
45160
45161  input_path="$new_path"
45162  # Check if we need to convert this using DOS-style short mode. If the path
45163  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45164  # take no chances and rewrite it.
45165  # Note: m4 eats our [], so we need to use [ and ] instead.
45166  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45167  if test "x$has_forbidden_chars" != x; then
45168    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45169    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45170    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45171    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45172      # Going to short mode and back again did indeed matter. Since short mode is
45173      # case insensitive, let's make it lowercase to improve readability.
45174      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45175      # Now convert it back to Unix-stile (cygpath)
45176      input_path=`$CYGPATH -u "$shortmode_path"`
45177      new_path="$input_path"
45178    fi
45179  fi
45180
45181  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45182  if test "x$test_cygdrive_prefix" = x; then
45183    # As a simple fix, exclude /usr/bin since it's not a real path.
45184    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45185      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45186      # a path prefixed by /cygdrive for fixpath to work.
45187      new_path="$CYGWIN_ROOT_PATH$input_path"
45188    fi
45189  fi
45190
45191
45192  if test "x$path" != "x$new_path"; then
45193    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45194    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45195$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45196  fi
45197
45198  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45199
45200  path="$POTENTIAL_FREETYPE_LIB_PATH"
45201  has_colon=`$ECHO $path | $GREP ^.:`
45202  new_path="$path"
45203  if test "x$has_colon" = x; then
45204    # Not in mixed or Windows style, start by that.
45205    new_path=`cmd //c echo $path`
45206  fi
45207
45208
45209  input_path="$new_path"
45210  # Check if we need to convert this using DOS-style short mode. If the path
45211  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45212  # take no chances and rewrite it.
45213  # Note: m4 eats our [], so we need to use [ and ] instead.
45214  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45215  if test "x$has_forbidden_chars" != x; then
45216    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45217    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45218  fi
45219
45220
45221  windows_path="$new_path"
45222  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45223    unix_path=`$CYGPATH -u "$windows_path"`
45224    new_path="$unix_path"
45225  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45226    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45227    new_path="$unix_path"
45228  fi
45229
45230  if test "x$path" != "x$new_path"; then
45231    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45232    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45233$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45234  fi
45235
45236  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45237  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45238
45239  else
45240    # We're on a unix platform. Hooray! :)
45241    path="$POTENTIAL_FREETYPE_LIB_PATH"
45242    has_space=`$ECHO "$path" | $GREP " "`
45243    if test "x$has_space" != x; then
45244      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45245$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45246      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45247    fi
45248
45249    # Use eval to expand a potential ~
45250    eval path="$path"
45251    if test ! -f "$path" && test ! -d "$path"; then
45252      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45253    fi
45254
45255    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45256  fi
45257
45258
45259    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45260    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45261$as_echo_n "checking for freetype includes... " >&6; }
45262    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45263$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45264    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45265    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45266$as_echo_n "checking for freetype libraries... " >&6; }
45267    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45268$as_echo "$FREETYPE_LIB_PATH" >&6; }
45269  fi
45270
45271        if test "x$FOUND_FREETYPE" != xyes; then
45272          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
45273        fi
45274      else
45275        # User specified only one of lib or include. This is an error.
45276        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
45277          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
45278$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
45279          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
45280        else
45281          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
45282$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
45283          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
45284        fi
45285      fi
45286    else
45287      # User did not specify settings, but we need freetype. Try to locate it.
45288
45289      if test "x$BUNDLE_FREETYPE" = x; then
45290        # If not specified, default is to bundle freetype only on windows
45291        if test "x$OPENJDK_TARGET_OS" = xwindows; then
45292          BUNDLE_FREETYPE=yes
45293        else
45294          BUNDLE_FREETYPE=no
45295        fi
45296      fi
45297
45298      if test "x$FOUND_FREETYPE" != xyes; then
45299        # Check builddeps
45300
45301
45302  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
45303    # Source the builddeps file again, to make sure it uses the latest variables!
45304    . $builddepsfile
45305    # Look for a target and build machine specific resource!
45306    eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
45307    if test "x$resource" = x; then
45308      # Ok, lets instead look for a target specific resource
45309      eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
45310    fi
45311    if test "x$resource" = x; then
45312      # Ok, lets instead look for a build specific resource
45313      eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
45314    fi
45315    if test "x$resource" = x; then
45316      # Ok, lets instead look for a generic resource
45317      # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
45318      resource=${builddep_freetype2}
45319    fi
45320    if test "x$resource" != x; then
45321      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
45322$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
45323      # If the resource in the builddeps.conf file is an existing directory,
45324      # for example /java/linux/cups
45325      if test -d ${resource}; then
45326        depdir=${resource}
45327      else
45328
45329  # freetype2 is for example mymodule
45330  # $resource is for example libs/general/libmymod_1_2_3.zip
45331  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
45332  # $with_builddeps_dir is for example /localhome/builddeps
45333  # depdir is the name of the variable into which we store the depdir, eg MYMOD
45334  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
45335  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
45336  filename=`basename $resource`
45337  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
45338  filebase=${filename%%.*}
45339  extension=${filename#*.}
45340  installdir=$with_builddeps_dir/$filebase
45341  if test ! -f $installdir/$filename.unpacked; then
45342    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
45343$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
45344    if test ! -d $installdir; then
45345      mkdir -p $installdir
45346    fi
45347    if test ! -d $installdir; then
45348      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
45349    fi
45350    tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
45351    touch $tmpfile
45352    if test ! -f $tmpfile; then
45353      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
45354    fi
45355
45356  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
45357  # $tmpfile is the local file name for the downloaded file.
45358  VALID_TOOL=no
45359  if test "x$BDEPS_FTP" = xwget; then
45360    VALID_TOOL=yes
45361    wget -O $tmpfile $with_builddeps_server/$resource
45362  fi
45363  if test "x$BDEPS_FTP" = xlftp; then
45364    VALID_TOOL=yes
45365    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
45366  fi
45367  if test "x$BDEPS_FTP" = xftp; then
45368    VALID_TOOL=yes
45369    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
45370    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
45371    FTPUSERPWD=${FTPSERVER%%@*}
45372    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
45373      FTPUSER=${userpwd%%:*}
45374      FTPPWD=${userpwd#*@}
45375      FTPSERVER=${FTPSERVER#*@}
45376    else
45377      FTPUSER=ftp
45378      FTPPWD=ftp
45379    fi
45380    # the "pass" command does not work on some
45381    # ftp clients (read ftp.exe) but if it works,
45382    # passive mode is better!
45383    ( \
45384        echo "user $FTPUSER $FTPPWD"        ; \
45385        echo "pass"                         ; \
45386        echo "bin"                          ; \
45387        echo "get $FTPPATH $tmpfile"              ; \
45388    ) | ftp -in $FTPSERVER
45389  fi
45390  if test "x$VALID_TOOL" != xyes; then
45391    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
45392  fi
45393
45394    mv $tmpfile $installdir/$filename
45395    if test ! -s $installdir/$filename; then
45396      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
45397    fi
45398    case "$extension" in
45399      zip)  echo "Unzipping $installdir/$filename..."
45400        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
45401        ;;
45402      tar.gz) echo "Untaring $installdir/$filename..."
45403        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
45404        ;;
45405      tgz) echo "Untaring $installdir/$filename..."
45406        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
45407        ;;
45408      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
45409        ;;
45410    esac
45411  fi
45412  if test -f $installdir/$filename.unpacked; then
45413    depdir=$installdir
45414  fi
45415
45416      fi
45417      # Source the builddeps file again, because in the previous command, the depdir
45418      # was updated to point at the current build dependency install directory.
45419      . $builddepsfile
45420      # Now extract variables from the builddeps.conf files.
45421      theroot=${builddep_freetype2_ROOT}
45422      thecflags=${builddep_freetype2_CFLAGS}
45423      thelibs=${builddep_freetype2_LIBS}
45424      if test "x$depdir" = x; then
45425        as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
45426      fi
45427      FREETYPE=$depdir
45428      if test "x$theroot" != x; then
45429        FREETYPE="$theroot"
45430      fi
45431      if test "x$thecflags" != x; then
45432        FREETYPE_CFLAGS="$thecflags"
45433      fi
45434      if test "x$thelibs" != x; then
45435        FREETYPE_LIBS="$thelibs"
45436      fi
45437      FOUND_FREETYPE=yes
45438      else FOUND_FREETYPE=no
45439
45440    fi
45441    else FOUND_FREETYPE=no
45442
45443  fi
45444
45445        # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
45446        if test "x$FOUND_FREETYPE" = xyes; then
45447          if test "x$BUNDLE_FREETYPE" = xyes; then
45448            { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
45449$as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
45450            FOUND_FREETYPE=no
45451          else
45452            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
45453$as_echo_n "checking for freetype... " >&6; }
45454            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
45455$as_echo "yes (using builddeps)" >&6; }
45456          fi
45457        fi
45458      fi
45459
45460      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
45461      if test "x$SYSROOT" = x; then
45462        if test "x$FOUND_FREETYPE" != xyes; then
45463          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
45464          if test "x$PKG_CONFIG" != x; then
45465
45466pkg_failed=no
45467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
45468$as_echo_n "checking for FREETYPE... " >&6; }
45469
45470if test -n "$FREETYPE_CFLAGS"; then
45471    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
45472 elif test -n "$PKG_CONFIG"; then
45473    if test -n "$PKG_CONFIG" && \
45474    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
45475  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
45476  ac_status=$?
45477  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45478  test $ac_status = 0; }; then
45479  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
45480else
45481  pkg_failed=yes
45482fi
45483 else
45484    pkg_failed=untried
45485fi
45486if test -n "$FREETYPE_LIBS"; then
45487    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
45488 elif test -n "$PKG_CONFIG"; then
45489    if test -n "$PKG_CONFIG" && \
45490    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
45491  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
45492  ac_status=$?
45493  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45494  test $ac_status = 0; }; then
45495  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
45496else
45497  pkg_failed=yes
45498fi
45499 else
45500    pkg_failed=untried
45501fi
45502
45503
45504
45505if test $pkg_failed = yes; then
45506
45507if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
45508        _pkg_short_errors_supported=yes
45509else
45510        _pkg_short_errors_supported=no
45511fi
45512        if test $_pkg_short_errors_supported = yes; then
45513	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
45514        else
45515	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
45516        fi
45517	# Put the nasty error message in config.log where it belongs
45518	echo "$FREETYPE_PKG_ERRORS" >&5
45519
45520	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45521$as_echo "no" >&6; }
45522                FOUND_FREETYPE=no
45523elif test $pkg_failed = untried; then
45524	FOUND_FREETYPE=no
45525else
45526	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
45527	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
45528        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45529$as_echo "yes" >&6; }
45530	FOUND_FREETYPE=yes
45531fi
45532            if test "x$FOUND_FREETYPE" = xyes; then
45533              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
45534              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
45535              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
45536              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
45537                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
45538              fi
45539              # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
45540              if test "x$BUNDLE_FREETYPE" = xyes; then
45541                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
45542$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
45543                FOUND_FREETYPE=no
45544              else
45545                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
45546$as_echo_n "checking for freetype... " >&6; }
45547                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
45548$as_echo "yes (using pkg-config)" >&6; }
45549              fi
45550            fi
45551          fi
45552        fi
45553      fi
45554
45555      if test "x$FOUND_FREETYPE" != xyes; then
45556        # Check in well-known locations
45557        if test "x$OPENJDK_TARGET_OS" = xwindows; then
45558          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
45559
45560  windows_path="$FREETYPE_BASE_DIR"
45561  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45562    unix_path=`$CYGPATH -u "$windows_path"`
45563    FREETYPE_BASE_DIR="$unix_path"
45564  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45565    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45566    FREETYPE_BASE_DIR="$unix_path"
45567  fi
45568
45569
45570  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45571  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45572  METHOD="well-known location"
45573
45574  # Let's start with an optimistic view of the world :-)
45575  FOUND_FREETYPE=yes
45576
45577  # First look for the canonical freetype main include file ft2build.h.
45578  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45579    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45580    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45581    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45582      # Fail.
45583      FOUND_FREETYPE=no
45584    fi
45585  fi
45586
45587  if test "x$FOUND_FREETYPE" = xyes; then
45588    # Include file found, let's continue the sanity check.
45589    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45590$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45591
45592    # Reset to default value
45593    FREETYPE_BASE_NAME=freetype
45594    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45595    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45596      if test "x$OPENJDK_TARGET_OS" = xmacosx \
45597          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45598        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45599        # for the .6 version explicitly.
45600        FREETYPE_BASE_NAME=freetype.6
45601        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45602        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45603$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45604      else
45605        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45606$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45607        FOUND_FREETYPE=no
45608      fi
45609    else
45610      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45611        # On Windows, we will need both .lib and .dll file.
45612        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45613          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45614$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45615          FOUND_FREETYPE=no
45616        fi
45617      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45618          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45619        # Found lib in isa dir, use that instead.
45620        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45621        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45622$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45623      fi
45624    fi
45625  fi
45626
45627  if test "x$FOUND_FREETYPE" = xyes; then
45628
45629  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45630
45631  # Input might be given as Windows format, start by converting to
45632  # unix format.
45633  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45634  new_path=`$CYGPATH -u "$path"`
45635
45636  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45637  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45638  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45639  # "foo.exe" is OK but "foo" is an error.
45640  #
45641  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45642  # It is also a way to make sure we got the proper file name for the real test later on.
45643  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45644  if test "x$test_shortpath" = x; then
45645    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45646$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45647    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45648  fi
45649
45650  # Call helper function which possibly converts this using DOS-style short mode.
45651  # If so, the updated path is stored in $new_path.
45652
45653  input_path="$new_path"
45654  # Check if we need to convert this using DOS-style short mode. If the path
45655  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45656  # take no chances and rewrite it.
45657  # Note: m4 eats our [], so we need to use [ and ] instead.
45658  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45659  if test "x$has_forbidden_chars" != x; then
45660    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45661    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45662    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45663    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45664      # Going to short mode and back again did indeed matter. Since short mode is
45665      # case insensitive, let's make it lowercase to improve readability.
45666      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45667      # Now convert it back to Unix-stile (cygpath)
45668      input_path=`$CYGPATH -u "$shortmode_path"`
45669      new_path="$input_path"
45670    fi
45671  fi
45672
45673  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45674  if test "x$test_cygdrive_prefix" = x; then
45675    # As a simple fix, exclude /usr/bin since it's not a real path.
45676    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45677      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45678      # a path prefixed by /cygdrive for fixpath to work.
45679      new_path="$CYGWIN_ROOT_PATH$input_path"
45680    fi
45681  fi
45682
45683
45684  if test "x$path" != "x$new_path"; then
45685    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45686    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45687$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45688  fi
45689
45690  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45691
45692  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45693  has_colon=`$ECHO $path | $GREP ^.:`
45694  new_path="$path"
45695  if test "x$has_colon" = x; then
45696    # Not in mixed or Windows style, start by that.
45697    new_path=`cmd //c echo $path`
45698  fi
45699
45700
45701  input_path="$new_path"
45702  # Check if we need to convert this using DOS-style short mode. If the path
45703  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45704  # take no chances and rewrite it.
45705  # Note: m4 eats our [], so we need to use [ and ] instead.
45706  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45707  if test "x$has_forbidden_chars" != x; then
45708    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45709    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45710  fi
45711
45712
45713  windows_path="$new_path"
45714  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45715    unix_path=`$CYGPATH -u "$windows_path"`
45716    new_path="$unix_path"
45717  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45718    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45719    new_path="$unix_path"
45720  fi
45721
45722  if test "x$path" != "x$new_path"; then
45723    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45724    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45725$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45726  fi
45727
45728  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45729  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45730
45731  else
45732    # We're on a unix platform. Hooray! :)
45733    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45734    has_space=`$ECHO "$path" | $GREP " "`
45735    if test "x$has_space" != x; then
45736      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45737$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45738      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45739    fi
45740
45741    # Use eval to expand a potential ~
45742    eval path="$path"
45743    if test ! -f "$path" && test ! -d "$path"; then
45744      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45745    fi
45746
45747    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45748  fi
45749
45750
45751  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45752
45753  # Input might be given as Windows format, start by converting to
45754  # unix format.
45755  path="$POTENTIAL_FREETYPE_LIB_PATH"
45756  new_path=`$CYGPATH -u "$path"`
45757
45758  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45759  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45760  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45761  # "foo.exe" is OK but "foo" is an error.
45762  #
45763  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45764  # It is also a way to make sure we got the proper file name for the real test later on.
45765  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45766  if test "x$test_shortpath" = x; then
45767    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45768$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45769    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45770  fi
45771
45772  # Call helper function which possibly converts this using DOS-style short mode.
45773  # If so, the updated path is stored in $new_path.
45774
45775  input_path="$new_path"
45776  # Check if we need to convert this using DOS-style short mode. If the path
45777  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45778  # take no chances and rewrite it.
45779  # Note: m4 eats our [], so we need to use [ and ] instead.
45780  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45781  if test "x$has_forbidden_chars" != x; then
45782    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45783    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45784    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45785    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45786      # Going to short mode and back again did indeed matter. Since short mode is
45787      # case insensitive, let's make it lowercase to improve readability.
45788      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45789      # Now convert it back to Unix-stile (cygpath)
45790      input_path=`$CYGPATH -u "$shortmode_path"`
45791      new_path="$input_path"
45792    fi
45793  fi
45794
45795  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45796  if test "x$test_cygdrive_prefix" = x; then
45797    # As a simple fix, exclude /usr/bin since it's not a real path.
45798    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45799      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45800      # a path prefixed by /cygdrive for fixpath to work.
45801      new_path="$CYGWIN_ROOT_PATH$input_path"
45802    fi
45803  fi
45804
45805
45806  if test "x$path" != "x$new_path"; then
45807    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45808    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45809$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45810  fi
45811
45812  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45813
45814  path="$POTENTIAL_FREETYPE_LIB_PATH"
45815  has_colon=`$ECHO $path | $GREP ^.:`
45816  new_path="$path"
45817  if test "x$has_colon" = x; then
45818    # Not in mixed or Windows style, start by that.
45819    new_path=`cmd //c echo $path`
45820  fi
45821
45822
45823  input_path="$new_path"
45824  # Check if we need to convert this using DOS-style short mode. If the path
45825  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45826  # take no chances and rewrite it.
45827  # Note: m4 eats our [], so we need to use [ and ] instead.
45828  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45829  if test "x$has_forbidden_chars" != x; then
45830    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45831    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45832  fi
45833
45834
45835  windows_path="$new_path"
45836  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45837    unix_path=`$CYGPATH -u "$windows_path"`
45838    new_path="$unix_path"
45839  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45840    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45841    new_path="$unix_path"
45842  fi
45843
45844  if test "x$path" != "x$new_path"; then
45845    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45846    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45847$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45848  fi
45849
45850  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45851  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45852
45853  else
45854    # We're on a unix platform. Hooray! :)
45855    path="$POTENTIAL_FREETYPE_LIB_PATH"
45856    has_space=`$ECHO "$path" | $GREP " "`
45857    if test "x$has_space" != x; then
45858      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45859$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45860      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45861    fi
45862
45863    # Use eval to expand a potential ~
45864    eval path="$path"
45865    if test ! -f "$path" && test ! -d "$path"; then
45866      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45867    fi
45868
45869    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45870  fi
45871
45872
45873    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45874    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45875$as_echo_n "checking for freetype includes... " >&6; }
45876    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45877$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45878    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45879    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45880$as_echo_n "checking for freetype libraries... " >&6; }
45881    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45882$as_echo "$FREETYPE_LIB_PATH" >&6; }
45883  fi
45884
45885          if test "x$FOUND_FREETYPE" != xyes; then
45886            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
45887
45888  windows_path="$FREETYPE_BASE_DIR"
45889  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45890    unix_path=`$CYGPATH -u "$windows_path"`
45891    FREETYPE_BASE_DIR="$unix_path"
45892  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45893    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45894    FREETYPE_BASE_DIR="$unix_path"
45895  fi
45896
45897
45898  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45899  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45900  METHOD="well-known location"
45901
45902  # Let's start with an optimistic view of the world :-)
45903  FOUND_FREETYPE=yes
45904
45905  # First look for the canonical freetype main include file ft2build.h.
45906  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45907    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45908    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45909    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45910      # Fail.
45911      FOUND_FREETYPE=no
45912    fi
45913  fi
45914
45915  if test "x$FOUND_FREETYPE" = xyes; then
45916    # Include file found, let's continue the sanity check.
45917    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45918$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45919
45920    # Reset to default value
45921    FREETYPE_BASE_NAME=freetype
45922    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45923    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45924      if test "x$OPENJDK_TARGET_OS" = xmacosx \
45925          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45926        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45927        # for the .6 version explicitly.
45928        FREETYPE_BASE_NAME=freetype.6
45929        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45930        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45931$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45932      else
45933        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45934$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45935        FOUND_FREETYPE=no
45936      fi
45937    else
45938      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45939        # On Windows, we will need both .lib and .dll file.
45940        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45941          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45942$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45943          FOUND_FREETYPE=no
45944        fi
45945      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45946          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45947        # Found lib in isa dir, use that instead.
45948        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45949        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45950$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45951      fi
45952    fi
45953  fi
45954
45955  if test "x$FOUND_FREETYPE" = xyes; then
45956
45957  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45958
45959  # Input might be given as Windows format, start by converting to
45960  # unix format.
45961  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45962  new_path=`$CYGPATH -u "$path"`
45963
45964  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45965  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45966  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45967  # "foo.exe" is OK but "foo" is an error.
45968  #
45969  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45970  # It is also a way to make sure we got the proper file name for the real test later on.
45971  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45972  if test "x$test_shortpath" = x; then
45973    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45974$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45975    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45976  fi
45977
45978  # Call helper function which possibly converts this using DOS-style short mode.
45979  # If so, the updated path is stored in $new_path.
45980
45981  input_path="$new_path"
45982  # Check if we need to convert this using DOS-style short mode. If the path
45983  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45984  # take no chances and rewrite it.
45985  # Note: m4 eats our [], so we need to use [ and ] instead.
45986  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45987  if test "x$has_forbidden_chars" != x; then
45988    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45989    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45990    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45991    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45992      # Going to short mode and back again did indeed matter. Since short mode is
45993      # case insensitive, let's make it lowercase to improve readability.
45994      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45995      # Now convert it back to Unix-stile (cygpath)
45996      input_path=`$CYGPATH -u "$shortmode_path"`
45997      new_path="$input_path"
45998    fi
45999  fi
46000
46001  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46002  if test "x$test_cygdrive_prefix" = x; then
46003    # As a simple fix, exclude /usr/bin since it's not a real path.
46004    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46005      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46006      # a path prefixed by /cygdrive for fixpath to work.
46007      new_path="$CYGWIN_ROOT_PATH$input_path"
46008    fi
46009  fi
46010
46011
46012  if test "x$path" != "x$new_path"; then
46013    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46014    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46015$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46016  fi
46017
46018  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46019
46020  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46021  has_colon=`$ECHO $path | $GREP ^.:`
46022  new_path="$path"
46023  if test "x$has_colon" = x; then
46024    # Not in mixed or Windows style, start by that.
46025    new_path=`cmd //c echo $path`
46026  fi
46027
46028
46029  input_path="$new_path"
46030  # Check if we need to convert this using DOS-style short mode. If the path
46031  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46032  # take no chances and rewrite it.
46033  # Note: m4 eats our [], so we need to use [ and ] instead.
46034  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46035  if test "x$has_forbidden_chars" != x; then
46036    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46037    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46038  fi
46039
46040
46041  windows_path="$new_path"
46042  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46043    unix_path=`$CYGPATH -u "$windows_path"`
46044    new_path="$unix_path"
46045  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46046    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46047    new_path="$unix_path"
46048  fi
46049
46050  if test "x$path" != "x$new_path"; then
46051    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46052    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46053$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46054  fi
46055
46056  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46057  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46058
46059  else
46060    # We're on a unix platform. Hooray! :)
46061    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46062    has_space=`$ECHO "$path" | $GREP " "`
46063    if test "x$has_space" != x; then
46064      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46065$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46066      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46067    fi
46068
46069    # Use eval to expand a potential ~
46070    eval path="$path"
46071    if test ! -f "$path" && test ! -d "$path"; then
46072      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46073    fi
46074
46075    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46076  fi
46077
46078
46079  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46080
46081  # Input might be given as Windows format, start by converting to
46082  # unix format.
46083  path="$POTENTIAL_FREETYPE_LIB_PATH"
46084  new_path=`$CYGPATH -u "$path"`
46085
46086  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46087  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46088  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46089  # "foo.exe" is OK but "foo" is an error.
46090  #
46091  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46092  # It is also a way to make sure we got the proper file name for the real test later on.
46093  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46094  if test "x$test_shortpath" = x; then
46095    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46096$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46097    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46098  fi
46099
46100  # Call helper function which possibly converts this using DOS-style short mode.
46101  # If so, the updated path is stored in $new_path.
46102
46103  input_path="$new_path"
46104  # Check if we need to convert this using DOS-style short mode. If the path
46105  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46106  # take no chances and rewrite it.
46107  # Note: m4 eats our [], so we need to use [ and ] instead.
46108  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46109  if test "x$has_forbidden_chars" != x; then
46110    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46111    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46112    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46113    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46114      # Going to short mode and back again did indeed matter. Since short mode is
46115      # case insensitive, let's make it lowercase to improve readability.
46116      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46117      # Now convert it back to Unix-stile (cygpath)
46118      input_path=`$CYGPATH -u "$shortmode_path"`
46119      new_path="$input_path"
46120    fi
46121  fi
46122
46123  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46124  if test "x$test_cygdrive_prefix" = x; then
46125    # As a simple fix, exclude /usr/bin since it's not a real path.
46126    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46127      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46128      # a path prefixed by /cygdrive for fixpath to work.
46129      new_path="$CYGWIN_ROOT_PATH$input_path"
46130    fi
46131  fi
46132
46133
46134  if test "x$path" != "x$new_path"; then
46135    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46136    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46137$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46138  fi
46139
46140  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46141
46142  path="$POTENTIAL_FREETYPE_LIB_PATH"
46143  has_colon=`$ECHO $path | $GREP ^.:`
46144  new_path="$path"
46145  if test "x$has_colon" = x; then
46146    # Not in mixed or Windows style, start by that.
46147    new_path=`cmd //c echo $path`
46148  fi
46149
46150
46151  input_path="$new_path"
46152  # Check if we need to convert this using DOS-style short mode. If the path
46153  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46154  # take no chances and rewrite it.
46155  # Note: m4 eats our [], so we need to use [ and ] instead.
46156  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46157  if test "x$has_forbidden_chars" != x; then
46158    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46159    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46160  fi
46161
46162
46163  windows_path="$new_path"
46164  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46165    unix_path=`$CYGPATH -u "$windows_path"`
46166    new_path="$unix_path"
46167  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46168    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46169    new_path="$unix_path"
46170  fi
46171
46172  if test "x$path" != "x$new_path"; then
46173    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46174    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46175$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46176  fi
46177
46178  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46179  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46180
46181  else
46182    # We're on a unix platform. Hooray! :)
46183    path="$POTENTIAL_FREETYPE_LIB_PATH"
46184    has_space=`$ECHO "$path" | $GREP " "`
46185    if test "x$has_space" != x; then
46186      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46187$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46188      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46189    fi
46190
46191    # Use eval to expand a potential ~
46192    eval path="$path"
46193    if test ! -f "$path" && test ! -d "$path"; then
46194      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46195    fi
46196
46197    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46198  fi
46199
46200
46201    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46202    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46203$as_echo_n "checking for freetype includes... " >&6; }
46204    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46205$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46206    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46207    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46208$as_echo_n "checking for freetype libraries... " >&6; }
46209    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46210$as_echo "$FREETYPE_LIB_PATH" >&6; }
46211  fi
46212
46213          fi
46214        else
46215          FREETYPE_BASE_DIR="$SYSROOT/usr"
46216
46217  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46218  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46219  METHOD="well-known location"
46220
46221  # Let's start with an optimistic view of the world :-)
46222  FOUND_FREETYPE=yes
46223
46224  # First look for the canonical freetype main include file ft2build.h.
46225  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46226    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46227    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46228    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46229      # Fail.
46230      FOUND_FREETYPE=no
46231    fi
46232  fi
46233
46234  if test "x$FOUND_FREETYPE" = xyes; then
46235    # Include file found, let's continue the sanity check.
46236    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46237$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46238
46239    # Reset to default value
46240    FREETYPE_BASE_NAME=freetype
46241    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46242    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46243      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46244          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46245        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46246        # for the .6 version explicitly.
46247        FREETYPE_BASE_NAME=freetype.6
46248        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46249        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46250$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46251      else
46252        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46253$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46254        FOUND_FREETYPE=no
46255      fi
46256    else
46257      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46258        # On Windows, we will need both .lib and .dll file.
46259        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46260          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46261$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46262          FOUND_FREETYPE=no
46263        fi
46264      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46265          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46266        # Found lib in isa dir, use that instead.
46267        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46268        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46269$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46270      fi
46271    fi
46272  fi
46273
46274  if test "x$FOUND_FREETYPE" = xyes; then
46275
46276  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46277
46278  # Input might be given as Windows format, start by converting to
46279  # unix format.
46280  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46281  new_path=`$CYGPATH -u "$path"`
46282
46283  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46284  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46285  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46286  # "foo.exe" is OK but "foo" is an error.
46287  #
46288  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46289  # It is also a way to make sure we got the proper file name for the real test later on.
46290  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46291  if test "x$test_shortpath" = x; then
46292    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46293$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46294    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46295  fi
46296
46297  # Call helper function which possibly converts this using DOS-style short mode.
46298  # If so, the updated path is stored in $new_path.
46299
46300  input_path="$new_path"
46301  # Check if we need to convert this using DOS-style short mode. If the path
46302  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46303  # take no chances and rewrite it.
46304  # Note: m4 eats our [], so we need to use [ and ] instead.
46305  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46306  if test "x$has_forbidden_chars" != x; then
46307    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46308    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46309    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46310    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46311      # Going to short mode and back again did indeed matter. Since short mode is
46312      # case insensitive, let's make it lowercase to improve readability.
46313      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46314      # Now convert it back to Unix-stile (cygpath)
46315      input_path=`$CYGPATH -u "$shortmode_path"`
46316      new_path="$input_path"
46317    fi
46318  fi
46319
46320  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46321  if test "x$test_cygdrive_prefix" = x; then
46322    # As a simple fix, exclude /usr/bin since it's not a real path.
46323    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46324      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46325      # a path prefixed by /cygdrive for fixpath to work.
46326      new_path="$CYGWIN_ROOT_PATH$input_path"
46327    fi
46328  fi
46329
46330
46331  if test "x$path" != "x$new_path"; then
46332    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46333    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46334$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46335  fi
46336
46337  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46338
46339  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46340  has_colon=`$ECHO $path | $GREP ^.:`
46341  new_path="$path"
46342  if test "x$has_colon" = x; then
46343    # Not in mixed or Windows style, start by that.
46344    new_path=`cmd //c echo $path`
46345  fi
46346
46347
46348  input_path="$new_path"
46349  # Check if we need to convert this using DOS-style short mode. If the path
46350  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46351  # take no chances and rewrite it.
46352  # Note: m4 eats our [], so we need to use [ and ] instead.
46353  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46354  if test "x$has_forbidden_chars" != x; then
46355    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46356    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46357  fi
46358
46359
46360  windows_path="$new_path"
46361  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46362    unix_path=`$CYGPATH -u "$windows_path"`
46363    new_path="$unix_path"
46364  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46365    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46366    new_path="$unix_path"
46367  fi
46368
46369  if test "x$path" != "x$new_path"; then
46370    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46371    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46372$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46373  fi
46374
46375  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46376  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46377
46378  else
46379    # We're on a unix platform. Hooray! :)
46380    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46381    has_space=`$ECHO "$path" | $GREP " "`
46382    if test "x$has_space" != x; then
46383      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46384$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46385      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46386    fi
46387
46388    # Use eval to expand a potential ~
46389    eval path="$path"
46390    if test ! -f "$path" && test ! -d "$path"; then
46391      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46392    fi
46393
46394    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46395  fi
46396
46397
46398  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46399
46400  # Input might be given as Windows format, start by converting to
46401  # unix format.
46402  path="$POTENTIAL_FREETYPE_LIB_PATH"
46403  new_path=`$CYGPATH -u "$path"`
46404
46405  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46406  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46407  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46408  # "foo.exe" is OK but "foo" is an error.
46409  #
46410  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46411  # It is also a way to make sure we got the proper file name for the real test later on.
46412  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46413  if test "x$test_shortpath" = x; then
46414    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46415$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46416    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46417  fi
46418
46419  # Call helper function which possibly converts this using DOS-style short mode.
46420  # If so, the updated path is stored in $new_path.
46421
46422  input_path="$new_path"
46423  # Check if we need to convert this using DOS-style short mode. If the path
46424  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46425  # take no chances and rewrite it.
46426  # Note: m4 eats our [], so we need to use [ and ] instead.
46427  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46428  if test "x$has_forbidden_chars" != x; then
46429    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46430    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46431    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46432    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46433      # Going to short mode and back again did indeed matter. Since short mode is
46434      # case insensitive, let's make it lowercase to improve readability.
46435      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46436      # Now convert it back to Unix-stile (cygpath)
46437      input_path=`$CYGPATH -u "$shortmode_path"`
46438      new_path="$input_path"
46439    fi
46440  fi
46441
46442  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46443  if test "x$test_cygdrive_prefix" = x; then
46444    # As a simple fix, exclude /usr/bin since it's not a real path.
46445    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46446      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46447      # a path prefixed by /cygdrive for fixpath to work.
46448      new_path="$CYGWIN_ROOT_PATH$input_path"
46449    fi
46450  fi
46451
46452
46453  if test "x$path" != "x$new_path"; then
46454    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46455    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46456$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46457  fi
46458
46459  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46460
46461  path="$POTENTIAL_FREETYPE_LIB_PATH"
46462  has_colon=`$ECHO $path | $GREP ^.:`
46463  new_path="$path"
46464  if test "x$has_colon" = x; then
46465    # Not in mixed or Windows style, start by that.
46466    new_path=`cmd //c echo $path`
46467  fi
46468
46469
46470  input_path="$new_path"
46471  # Check if we need to convert this using DOS-style short mode. If the path
46472  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46473  # take no chances and rewrite it.
46474  # Note: m4 eats our [], so we need to use [ and ] instead.
46475  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46476  if test "x$has_forbidden_chars" != x; then
46477    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46478    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46479  fi
46480
46481
46482  windows_path="$new_path"
46483  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46484    unix_path=`$CYGPATH -u "$windows_path"`
46485    new_path="$unix_path"
46486  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46487    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46488    new_path="$unix_path"
46489  fi
46490
46491  if test "x$path" != "x$new_path"; then
46492    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46493    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46494$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46495  fi
46496
46497  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46498  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46499
46500  else
46501    # We're on a unix platform. Hooray! :)
46502    path="$POTENTIAL_FREETYPE_LIB_PATH"
46503    has_space=`$ECHO "$path" | $GREP " "`
46504    if test "x$has_space" != x; then
46505      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46506$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46507      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46508    fi
46509
46510    # Use eval to expand a potential ~
46511    eval path="$path"
46512    if test ! -f "$path" && test ! -d "$path"; then
46513      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46514    fi
46515
46516    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46517  fi
46518
46519
46520    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46521    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46522$as_echo_n "checking for freetype includes... " >&6; }
46523    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46524$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46525    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46526    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46527$as_echo_n "checking for freetype libraries... " >&6; }
46528    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46529$as_echo "$FREETYPE_LIB_PATH" >&6; }
46530  fi
46531
46532
46533          if test "x$FOUND_FREETYPE" != xyes; then
46534            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
46535
46536  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46537  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46538  METHOD="well-known location"
46539
46540  # Let's start with an optimistic view of the world :-)
46541  FOUND_FREETYPE=yes
46542
46543  # First look for the canonical freetype main include file ft2build.h.
46544  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46545    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46546    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46547    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46548      # Fail.
46549      FOUND_FREETYPE=no
46550    fi
46551  fi
46552
46553  if test "x$FOUND_FREETYPE" = xyes; then
46554    # Include file found, let's continue the sanity check.
46555    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46556$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46557
46558    # Reset to default value
46559    FREETYPE_BASE_NAME=freetype
46560    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46561    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46562      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46563          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46564        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46565        # for the .6 version explicitly.
46566        FREETYPE_BASE_NAME=freetype.6
46567        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46568        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46569$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46570      else
46571        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46572$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46573        FOUND_FREETYPE=no
46574      fi
46575    else
46576      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46577        # On Windows, we will need both .lib and .dll file.
46578        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46579          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46580$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46581          FOUND_FREETYPE=no
46582        fi
46583      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46584          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46585        # Found lib in isa dir, use that instead.
46586        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46587        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46588$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46589      fi
46590    fi
46591  fi
46592
46593  if test "x$FOUND_FREETYPE" = xyes; then
46594
46595  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46596
46597  # Input might be given as Windows format, start by converting to
46598  # unix format.
46599  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46600  new_path=`$CYGPATH -u "$path"`
46601
46602  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46603  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46604  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46605  # "foo.exe" is OK but "foo" is an error.
46606  #
46607  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46608  # It is also a way to make sure we got the proper file name for the real test later on.
46609  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46610  if test "x$test_shortpath" = x; then
46611    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46612$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46613    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46614  fi
46615
46616  # Call helper function which possibly converts this using DOS-style short mode.
46617  # If so, the updated path is stored in $new_path.
46618
46619  input_path="$new_path"
46620  # Check if we need to convert this using DOS-style short mode. If the path
46621  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46622  # take no chances and rewrite it.
46623  # Note: m4 eats our [], so we need to use [ and ] instead.
46624  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46625  if test "x$has_forbidden_chars" != x; then
46626    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46627    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46628    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46629    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46630      # Going to short mode and back again did indeed matter. Since short mode is
46631      # case insensitive, let's make it lowercase to improve readability.
46632      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46633      # Now convert it back to Unix-stile (cygpath)
46634      input_path=`$CYGPATH -u "$shortmode_path"`
46635      new_path="$input_path"
46636    fi
46637  fi
46638
46639  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46640  if test "x$test_cygdrive_prefix" = x; then
46641    # As a simple fix, exclude /usr/bin since it's not a real path.
46642    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46643      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46644      # a path prefixed by /cygdrive for fixpath to work.
46645      new_path="$CYGWIN_ROOT_PATH$input_path"
46646    fi
46647  fi
46648
46649
46650  if test "x$path" != "x$new_path"; then
46651    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46652    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46653$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46654  fi
46655
46656  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46657
46658  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46659  has_colon=`$ECHO $path | $GREP ^.:`
46660  new_path="$path"
46661  if test "x$has_colon" = x; then
46662    # Not in mixed or Windows style, start by that.
46663    new_path=`cmd //c echo $path`
46664  fi
46665
46666
46667  input_path="$new_path"
46668  # Check if we need to convert this using DOS-style short mode. If the path
46669  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46670  # take no chances and rewrite it.
46671  # Note: m4 eats our [], so we need to use [ and ] instead.
46672  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46673  if test "x$has_forbidden_chars" != x; then
46674    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46675    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46676  fi
46677
46678
46679  windows_path="$new_path"
46680  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46681    unix_path=`$CYGPATH -u "$windows_path"`
46682    new_path="$unix_path"
46683  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46684    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46685    new_path="$unix_path"
46686  fi
46687
46688  if test "x$path" != "x$new_path"; then
46689    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46690    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46691$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46692  fi
46693
46694  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46695  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46696
46697  else
46698    # We're on a unix platform. Hooray! :)
46699    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46700    has_space=`$ECHO "$path" | $GREP " "`
46701    if test "x$has_space" != x; then
46702      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46703$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46704      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46705    fi
46706
46707    # Use eval to expand a potential ~
46708    eval path="$path"
46709    if test ! -f "$path" && test ! -d "$path"; then
46710      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46711    fi
46712
46713    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46714  fi
46715
46716
46717  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46718
46719  # Input might be given as Windows format, start by converting to
46720  # unix format.
46721  path="$POTENTIAL_FREETYPE_LIB_PATH"
46722  new_path=`$CYGPATH -u "$path"`
46723
46724  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46725  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46726  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46727  # "foo.exe" is OK but "foo" is an error.
46728  #
46729  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46730  # It is also a way to make sure we got the proper file name for the real test later on.
46731  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46732  if test "x$test_shortpath" = x; then
46733    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46734$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46735    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46736  fi
46737
46738  # Call helper function which possibly converts this using DOS-style short mode.
46739  # If so, the updated path is stored in $new_path.
46740
46741  input_path="$new_path"
46742  # Check if we need to convert this using DOS-style short mode. If the path
46743  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46744  # take no chances and rewrite it.
46745  # Note: m4 eats our [], so we need to use [ and ] instead.
46746  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46747  if test "x$has_forbidden_chars" != x; then
46748    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46749    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46750    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46751    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46752      # Going to short mode and back again did indeed matter. Since short mode is
46753      # case insensitive, let's make it lowercase to improve readability.
46754      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46755      # Now convert it back to Unix-stile (cygpath)
46756      input_path=`$CYGPATH -u "$shortmode_path"`
46757      new_path="$input_path"
46758    fi
46759  fi
46760
46761  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46762  if test "x$test_cygdrive_prefix" = x; then
46763    # As a simple fix, exclude /usr/bin since it's not a real path.
46764    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46765      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46766      # a path prefixed by /cygdrive for fixpath to work.
46767      new_path="$CYGWIN_ROOT_PATH$input_path"
46768    fi
46769  fi
46770
46771
46772  if test "x$path" != "x$new_path"; then
46773    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46774    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46775$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46776  fi
46777
46778  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46779
46780  path="$POTENTIAL_FREETYPE_LIB_PATH"
46781  has_colon=`$ECHO $path | $GREP ^.:`
46782  new_path="$path"
46783  if test "x$has_colon" = x; then
46784    # Not in mixed or Windows style, start by that.
46785    new_path=`cmd //c echo $path`
46786  fi
46787
46788
46789  input_path="$new_path"
46790  # Check if we need to convert this using DOS-style short mode. If the path
46791  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46792  # take no chances and rewrite it.
46793  # Note: m4 eats our [], so we need to use [ and ] instead.
46794  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46795  if test "x$has_forbidden_chars" != x; then
46796    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46797    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46798  fi
46799
46800
46801  windows_path="$new_path"
46802  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46803    unix_path=`$CYGPATH -u "$windows_path"`
46804    new_path="$unix_path"
46805  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46806    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46807    new_path="$unix_path"
46808  fi
46809
46810  if test "x$path" != "x$new_path"; then
46811    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46812    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46813$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46814  fi
46815
46816  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46817  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46818
46819  else
46820    # We're on a unix platform. Hooray! :)
46821    path="$POTENTIAL_FREETYPE_LIB_PATH"
46822    has_space=`$ECHO "$path" | $GREP " "`
46823    if test "x$has_space" != x; then
46824      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46825$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46826      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46827    fi
46828
46829    # Use eval to expand a potential ~
46830    eval path="$path"
46831    if test ! -f "$path" && test ! -d "$path"; then
46832      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46833    fi
46834
46835    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46836  fi
46837
46838
46839    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46840    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46841$as_echo_n "checking for freetype includes... " >&6; }
46842    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46843$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46844    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46845    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46846$as_echo_n "checking for freetype libraries... " >&6; }
46847    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46848$as_echo "$FREETYPE_LIB_PATH" >&6; }
46849  fi
46850
46851          fi
46852
46853          if test "x$FOUND_FREETYPE" != xyes; then
46854            FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
46855
46856  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46857  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46858  METHOD="well-known location"
46859
46860  # Let's start with an optimistic view of the world :-)
46861  FOUND_FREETYPE=yes
46862
46863  # First look for the canonical freetype main include file ft2build.h.
46864  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46865    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46866    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46867    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46868      # Fail.
46869      FOUND_FREETYPE=no
46870    fi
46871  fi
46872
46873  if test "x$FOUND_FREETYPE" = xyes; then
46874    # Include file found, let's continue the sanity check.
46875    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46876$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46877
46878    # Reset to default value
46879    FREETYPE_BASE_NAME=freetype
46880    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46881    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46882      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46883          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46884        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46885        # for the .6 version explicitly.
46886        FREETYPE_BASE_NAME=freetype.6
46887        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46888        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46889$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46890      else
46891        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46892$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46893        FOUND_FREETYPE=no
46894      fi
46895    else
46896      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46897        # On Windows, we will need both .lib and .dll file.
46898        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46899          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46900$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46901          FOUND_FREETYPE=no
46902        fi
46903      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46904          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46905        # Found lib in isa dir, use that instead.
46906        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46907        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46908$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46909      fi
46910    fi
46911  fi
46912
46913  if test "x$FOUND_FREETYPE" = xyes; then
46914
46915  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46916
46917  # Input might be given as Windows format, start by converting to
46918  # unix format.
46919  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46920  new_path=`$CYGPATH -u "$path"`
46921
46922  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46923  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46924  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46925  # "foo.exe" is OK but "foo" is an error.
46926  #
46927  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46928  # It is also a way to make sure we got the proper file name for the real test later on.
46929  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46930  if test "x$test_shortpath" = x; then
46931    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46932$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46933    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46934  fi
46935
46936  # Call helper function which possibly converts this using DOS-style short mode.
46937  # If so, the updated path is stored in $new_path.
46938
46939  input_path="$new_path"
46940  # Check if we need to convert this using DOS-style short mode. If the path
46941  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46942  # take no chances and rewrite it.
46943  # Note: m4 eats our [], so we need to use [ and ] instead.
46944  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46945  if test "x$has_forbidden_chars" != x; then
46946    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46947    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46948    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46949    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46950      # Going to short mode and back again did indeed matter. Since short mode is
46951      # case insensitive, let's make it lowercase to improve readability.
46952      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46953      # Now convert it back to Unix-stile (cygpath)
46954      input_path=`$CYGPATH -u "$shortmode_path"`
46955      new_path="$input_path"
46956    fi
46957  fi
46958
46959  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46960  if test "x$test_cygdrive_prefix" = x; then
46961    # As a simple fix, exclude /usr/bin since it's not a real path.
46962    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46963      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46964      # a path prefixed by /cygdrive for fixpath to work.
46965      new_path="$CYGWIN_ROOT_PATH$input_path"
46966    fi
46967  fi
46968
46969
46970  if test "x$path" != "x$new_path"; then
46971    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46972    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46973$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46974  fi
46975
46976  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46977
46978  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46979  has_colon=`$ECHO $path | $GREP ^.:`
46980  new_path="$path"
46981  if test "x$has_colon" = x; then
46982    # Not in mixed or Windows style, start by that.
46983    new_path=`cmd //c echo $path`
46984  fi
46985
46986
46987  input_path="$new_path"
46988  # Check if we need to convert this using DOS-style short mode. If the path
46989  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46990  # take no chances and rewrite it.
46991  # Note: m4 eats our [], so we need to use [ and ] instead.
46992  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46993  if test "x$has_forbidden_chars" != x; then
46994    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46995    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46996  fi
46997
46998
46999  windows_path="$new_path"
47000  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47001    unix_path=`$CYGPATH -u "$windows_path"`
47002    new_path="$unix_path"
47003  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47004    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47005    new_path="$unix_path"
47006  fi
47007
47008  if test "x$path" != "x$new_path"; then
47009    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47010    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47011$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47012  fi
47013
47014  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47015  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47016
47017  else
47018    # We're on a unix platform. Hooray! :)
47019    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47020    has_space=`$ECHO "$path" | $GREP " "`
47021    if test "x$has_space" != x; then
47022      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47023$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47024      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47025    fi
47026
47027    # Use eval to expand a potential ~
47028    eval path="$path"
47029    if test ! -f "$path" && test ! -d "$path"; then
47030      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47031    fi
47032
47033    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47034  fi
47035
47036
47037  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47038
47039  # Input might be given as Windows format, start by converting to
47040  # unix format.
47041  path="$POTENTIAL_FREETYPE_LIB_PATH"
47042  new_path=`$CYGPATH -u "$path"`
47043
47044  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47045  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47046  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47047  # "foo.exe" is OK but "foo" is an error.
47048  #
47049  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47050  # It is also a way to make sure we got the proper file name for the real test later on.
47051  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47052  if test "x$test_shortpath" = x; then
47053    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47054$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47055    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47056  fi
47057
47058  # Call helper function which possibly converts this using DOS-style short mode.
47059  # If so, the updated path is stored in $new_path.
47060
47061  input_path="$new_path"
47062  # Check if we need to convert this using DOS-style short mode. If the path
47063  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47064  # take no chances and rewrite it.
47065  # Note: m4 eats our [], so we need to use [ and ] instead.
47066  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47067  if test "x$has_forbidden_chars" != x; then
47068    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47069    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47070    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47071    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47072      # Going to short mode and back again did indeed matter. Since short mode is
47073      # case insensitive, let's make it lowercase to improve readability.
47074      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47075      # Now convert it back to Unix-stile (cygpath)
47076      input_path=`$CYGPATH -u "$shortmode_path"`
47077      new_path="$input_path"
47078    fi
47079  fi
47080
47081  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47082  if test "x$test_cygdrive_prefix" = x; then
47083    # As a simple fix, exclude /usr/bin since it's not a real path.
47084    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47085      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47086      # a path prefixed by /cygdrive for fixpath to work.
47087      new_path="$CYGWIN_ROOT_PATH$input_path"
47088    fi
47089  fi
47090
47091
47092  if test "x$path" != "x$new_path"; then
47093    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47094    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47095$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47096  fi
47097
47098  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47099
47100  path="$POTENTIAL_FREETYPE_LIB_PATH"
47101  has_colon=`$ECHO $path | $GREP ^.:`
47102  new_path="$path"
47103  if test "x$has_colon" = x; then
47104    # Not in mixed or Windows style, start by that.
47105    new_path=`cmd //c echo $path`
47106  fi
47107
47108
47109  input_path="$new_path"
47110  # Check if we need to convert this using DOS-style short mode. If the path
47111  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47112  # take no chances and rewrite it.
47113  # Note: m4 eats our [], so we need to use [ and ] instead.
47114  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47115  if test "x$has_forbidden_chars" != x; then
47116    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47117    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47118  fi
47119
47120
47121  windows_path="$new_path"
47122  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47123    unix_path=`$CYGPATH -u "$windows_path"`
47124    new_path="$unix_path"
47125  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47126    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47127    new_path="$unix_path"
47128  fi
47129
47130  if test "x$path" != "x$new_path"; then
47131    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47132    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47133$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47134  fi
47135
47136  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47137  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47138
47139  else
47140    # We're on a unix platform. Hooray! :)
47141    path="$POTENTIAL_FREETYPE_LIB_PATH"
47142    has_space=`$ECHO "$path" | $GREP " "`
47143    if test "x$has_space" != x; then
47144      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47145$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47146      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47147    fi
47148
47149    # Use eval to expand a potential ~
47150    eval path="$path"
47151    if test ! -f "$path" && test ! -d "$path"; then
47152      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47153    fi
47154
47155    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47156  fi
47157
47158
47159    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47160    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47161$as_echo_n "checking for freetype includes... " >&6; }
47162    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47163$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47164    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47165    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47166$as_echo_n "checking for freetype libraries... " >&6; }
47167    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47168$as_echo "$FREETYPE_LIB_PATH" >&6; }
47169  fi
47170
47171          fi
47172
47173          if test "x$FOUND_FREETYPE" != xyes; then
47174            FREETYPE_BASE_DIR="$SYSROOT/usr"
47175            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
47176
47177  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47178  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
47179  METHOD="well-known location"
47180
47181  # Let's start with an optimistic view of the world :-)
47182  FOUND_FREETYPE=yes
47183
47184  # First look for the canonical freetype main include file ft2build.h.
47185  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47186    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47187    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47188    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47189      # Fail.
47190      FOUND_FREETYPE=no
47191    fi
47192  fi
47193
47194  if test "x$FOUND_FREETYPE" = xyes; then
47195    # Include file found, let's continue the sanity check.
47196    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47197$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47198
47199    # Reset to default value
47200    FREETYPE_BASE_NAME=freetype
47201    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47202    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47203      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47204          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47205        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47206        # for the .6 version explicitly.
47207        FREETYPE_BASE_NAME=freetype.6
47208        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47209        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47210$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47211      else
47212        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47213$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47214        FOUND_FREETYPE=no
47215      fi
47216    else
47217      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47218        # On Windows, we will need both .lib and .dll file.
47219        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47220          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47221$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47222          FOUND_FREETYPE=no
47223        fi
47224      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47225          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47226        # Found lib in isa dir, use that instead.
47227        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47228        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47229$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47230      fi
47231    fi
47232  fi
47233
47234  if test "x$FOUND_FREETYPE" = xyes; then
47235
47236  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47237
47238  # Input might be given as Windows format, start by converting to
47239  # unix format.
47240  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47241  new_path=`$CYGPATH -u "$path"`
47242
47243  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47244  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47245  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47246  # "foo.exe" is OK but "foo" is an error.
47247  #
47248  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47249  # It is also a way to make sure we got the proper file name for the real test later on.
47250  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47251  if test "x$test_shortpath" = x; then
47252    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47253$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47254    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47255  fi
47256
47257  # Call helper function which possibly converts this using DOS-style short mode.
47258  # If so, the updated path is stored in $new_path.
47259
47260  input_path="$new_path"
47261  # Check if we need to convert this using DOS-style short mode. If the path
47262  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47263  # take no chances and rewrite it.
47264  # Note: m4 eats our [], so we need to use [ and ] instead.
47265  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47266  if test "x$has_forbidden_chars" != x; then
47267    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47268    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47269    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47270    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47271      # Going to short mode and back again did indeed matter. Since short mode is
47272      # case insensitive, let's make it lowercase to improve readability.
47273      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47274      # Now convert it back to Unix-stile (cygpath)
47275      input_path=`$CYGPATH -u "$shortmode_path"`
47276      new_path="$input_path"
47277    fi
47278  fi
47279
47280  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47281  if test "x$test_cygdrive_prefix" = x; then
47282    # As a simple fix, exclude /usr/bin since it's not a real path.
47283    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47284      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47285      # a path prefixed by /cygdrive for fixpath to work.
47286      new_path="$CYGWIN_ROOT_PATH$input_path"
47287    fi
47288  fi
47289
47290
47291  if test "x$path" != "x$new_path"; then
47292    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47293    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47294$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47295  fi
47296
47297  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47298
47299  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47300  has_colon=`$ECHO $path | $GREP ^.:`
47301  new_path="$path"
47302  if test "x$has_colon" = x; then
47303    # Not in mixed or Windows style, start by that.
47304    new_path=`cmd //c echo $path`
47305  fi
47306
47307
47308  input_path="$new_path"
47309  # Check if we need to convert this using DOS-style short mode. If the path
47310  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47311  # take no chances and rewrite it.
47312  # Note: m4 eats our [], so we need to use [ and ] instead.
47313  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47314  if test "x$has_forbidden_chars" != x; then
47315    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47316    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47317  fi
47318
47319
47320  windows_path="$new_path"
47321  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47322    unix_path=`$CYGPATH -u "$windows_path"`
47323    new_path="$unix_path"
47324  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47325    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47326    new_path="$unix_path"
47327  fi
47328
47329  if test "x$path" != "x$new_path"; then
47330    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47331    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47332$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47333  fi
47334
47335  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47336  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47337
47338  else
47339    # We're on a unix platform. Hooray! :)
47340    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47341    has_space=`$ECHO "$path" | $GREP " "`
47342    if test "x$has_space" != x; then
47343      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47344$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47345      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47346    fi
47347
47348    # Use eval to expand a potential ~
47349    eval path="$path"
47350    if test ! -f "$path" && test ! -d "$path"; then
47351      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47352    fi
47353
47354    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47355  fi
47356
47357
47358  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47359
47360  # Input might be given as Windows format, start by converting to
47361  # unix format.
47362  path="$POTENTIAL_FREETYPE_LIB_PATH"
47363  new_path=`$CYGPATH -u "$path"`
47364
47365  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47366  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47367  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47368  # "foo.exe" is OK but "foo" is an error.
47369  #
47370  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47371  # It is also a way to make sure we got the proper file name for the real test later on.
47372  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47373  if test "x$test_shortpath" = x; then
47374    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47375$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47376    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47377  fi
47378
47379  # Call helper function which possibly converts this using DOS-style short mode.
47380  # If so, the updated path is stored in $new_path.
47381
47382  input_path="$new_path"
47383  # Check if we need to convert this using DOS-style short mode. If the path
47384  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47385  # take no chances and rewrite it.
47386  # Note: m4 eats our [], so we need to use [ and ] instead.
47387  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47388  if test "x$has_forbidden_chars" != x; then
47389    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47390    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47391    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47392    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47393      # Going to short mode and back again did indeed matter. Since short mode is
47394      # case insensitive, let's make it lowercase to improve readability.
47395      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47396      # Now convert it back to Unix-stile (cygpath)
47397      input_path=`$CYGPATH -u "$shortmode_path"`
47398      new_path="$input_path"
47399    fi
47400  fi
47401
47402  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47403  if test "x$test_cygdrive_prefix" = x; then
47404    # As a simple fix, exclude /usr/bin since it's not a real path.
47405    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47406      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47407      # a path prefixed by /cygdrive for fixpath to work.
47408      new_path="$CYGWIN_ROOT_PATH$input_path"
47409    fi
47410  fi
47411
47412
47413  if test "x$path" != "x$new_path"; then
47414    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47415    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47416$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47417  fi
47418
47419  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47420
47421  path="$POTENTIAL_FREETYPE_LIB_PATH"
47422  has_colon=`$ECHO $path | $GREP ^.:`
47423  new_path="$path"
47424  if test "x$has_colon" = x; then
47425    # Not in mixed or Windows style, start by that.
47426    new_path=`cmd //c echo $path`
47427  fi
47428
47429
47430  input_path="$new_path"
47431  # Check if we need to convert this using DOS-style short mode. If the path
47432  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47433  # take no chances and rewrite it.
47434  # Note: m4 eats our [], so we need to use [ and ] instead.
47435  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47436  if test "x$has_forbidden_chars" != x; then
47437    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47438    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47439  fi
47440
47441
47442  windows_path="$new_path"
47443  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47444    unix_path=`$CYGPATH -u "$windows_path"`
47445    new_path="$unix_path"
47446  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47447    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47448    new_path="$unix_path"
47449  fi
47450
47451  if test "x$path" != "x$new_path"; then
47452    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47453    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47454$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47455  fi
47456
47457  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47458  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47459
47460  else
47461    # We're on a unix platform. Hooray! :)
47462    path="$POTENTIAL_FREETYPE_LIB_PATH"
47463    has_space=`$ECHO "$path" | $GREP " "`
47464    if test "x$has_space" != x; then
47465      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47466$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47467      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47468    fi
47469
47470    # Use eval to expand a potential ~
47471    eval path="$path"
47472    if test ! -f "$path" && test ! -d "$path"; then
47473      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47474    fi
47475
47476    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47477  fi
47478
47479
47480    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47481    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47482$as_echo_n "checking for freetype includes... " >&6; }
47483    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47484$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47485    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47486    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47487$as_echo_n "checking for freetype libraries... " >&6; }
47488    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47489$as_echo "$FREETYPE_LIB_PATH" >&6; }
47490  fi
47491
47492            else
47493
47494  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47495  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
47496  METHOD="well-known location"
47497
47498  # Let's start with an optimistic view of the world :-)
47499  FOUND_FREETYPE=yes
47500
47501  # First look for the canonical freetype main include file ft2build.h.
47502  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47503    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47504    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47505    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47506      # Fail.
47507      FOUND_FREETYPE=no
47508    fi
47509  fi
47510
47511  if test "x$FOUND_FREETYPE" = xyes; then
47512    # Include file found, let's continue the sanity check.
47513    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47514$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47515
47516    # Reset to default value
47517    FREETYPE_BASE_NAME=freetype
47518    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47519    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47520      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47521          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47522        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47523        # for the .6 version explicitly.
47524        FREETYPE_BASE_NAME=freetype.6
47525        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47526        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47527$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47528      else
47529        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47530$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47531        FOUND_FREETYPE=no
47532      fi
47533    else
47534      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47535        # On Windows, we will need both .lib and .dll file.
47536        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47537          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47538$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47539          FOUND_FREETYPE=no
47540        fi
47541      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47542          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47543        # Found lib in isa dir, use that instead.
47544        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47545        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47546$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47547      fi
47548    fi
47549  fi
47550
47551  if test "x$FOUND_FREETYPE" = xyes; then
47552
47553  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47554
47555  # Input might be given as Windows format, start by converting to
47556  # unix format.
47557  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47558  new_path=`$CYGPATH -u "$path"`
47559
47560  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47561  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47562  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47563  # "foo.exe" is OK but "foo" is an error.
47564  #
47565  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47566  # It is also a way to make sure we got the proper file name for the real test later on.
47567  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47568  if test "x$test_shortpath" = x; then
47569    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47570$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47571    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47572  fi
47573
47574  # Call helper function which possibly converts this using DOS-style short mode.
47575  # If so, the updated path is stored in $new_path.
47576
47577  input_path="$new_path"
47578  # Check if we need to convert this using DOS-style short mode. If the path
47579  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47580  # take no chances and rewrite it.
47581  # Note: m4 eats our [], so we need to use [ and ] instead.
47582  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47583  if test "x$has_forbidden_chars" != x; then
47584    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47585    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47586    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47587    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47588      # Going to short mode and back again did indeed matter. Since short mode is
47589      # case insensitive, let's make it lowercase to improve readability.
47590      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47591      # Now convert it back to Unix-stile (cygpath)
47592      input_path=`$CYGPATH -u "$shortmode_path"`
47593      new_path="$input_path"
47594    fi
47595  fi
47596
47597  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47598  if test "x$test_cygdrive_prefix" = x; then
47599    # As a simple fix, exclude /usr/bin since it's not a real path.
47600    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47601      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47602      # a path prefixed by /cygdrive for fixpath to work.
47603      new_path="$CYGWIN_ROOT_PATH$input_path"
47604    fi
47605  fi
47606
47607
47608  if test "x$path" != "x$new_path"; then
47609    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47610    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47611$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47612  fi
47613
47614  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47615
47616  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47617  has_colon=`$ECHO $path | $GREP ^.:`
47618  new_path="$path"
47619  if test "x$has_colon" = x; then
47620    # Not in mixed or Windows style, start by that.
47621    new_path=`cmd //c echo $path`
47622  fi
47623
47624
47625  input_path="$new_path"
47626  # Check if we need to convert this using DOS-style short mode. If the path
47627  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47628  # take no chances and rewrite it.
47629  # Note: m4 eats our [], so we need to use [ and ] instead.
47630  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47631  if test "x$has_forbidden_chars" != x; then
47632    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47633    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47634  fi
47635
47636
47637  windows_path="$new_path"
47638  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47639    unix_path=`$CYGPATH -u "$windows_path"`
47640    new_path="$unix_path"
47641  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47642    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47643    new_path="$unix_path"
47644  fi
47645
47646  if test "x$path" != "x$new_path"; then
47647    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47648    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47649$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47650  fi
47651
47652  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47653  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47654
47655  else
47656    # We're on a unix platform. Hooray! :)
47657    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47658    has_space=`$ECHO "$path" | $GREP " "`
47659    if test "x$has_space" != x; then
47660      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47661$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47662      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47663    fi
47664
47665    # Use eval to expand a potential ~
47666    eval path="$path"
47667    if test ! -f "$path" && test ! -d "$path"; then
47668      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47669    fi
47670
47671    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47672  fi
47673
47674
47675  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47676
47677  # Input might be given as Windows format, start by converting to
47678  # unix format.
47679  path="$POTENTIAL_FREETYPE_LIB_PATH"
47680  new_path=`$CYGPATH -u "$path"`
47681
47682  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47683  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47684  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47685  # "foo.exe" is OK but "foo" is an error.
47686  #
47687  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47688  # It is also a way to make sure we got the proper file name for the real test later on.
47689  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47690  if test "x$test_shortpath" = x; then
47691    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47692$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47693    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47694  fi
47695
47696  # Call helper function which possibly converts this using DOS-style short mode.
47697  # If so, the updated path is stored in $new_path.
47698
47699  input_path="$new_path"
47700  # Check if we need to convert this using DOS-style short mode. If the path
47701  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47702  # take no chances and rewrite it.
47703  # Note: m4 eats our [], so we need to use [ and ] instead.
47704  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47705  if test "x$has_forbidden_chars" != x; then
47706    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47707    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47708    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47709    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47710      # Going to short mode and back again did indeed matter. Since short mode is
47711      # case insensitive, let's make it lowercase to improve readability.
47712      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47713      # Now convert it back to Unix-stile (cygpath)
47714      input_path=`$CYGPATH -u "$shortmode_path"`
47715      new_path="$input_path"
47716    fi
47717  fi
47718
47719  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47720  if test "x$test_cygdrive_prefix" = x; then
47721    # As a simple fix, exclude /usr/bin since it's not a real path.
47722    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47723      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47724      # a path prefixed by /cygdrive for fixpath to work.
47725      new_path="$CYGWIN_ROOT_PATH$input_path"
47726    fi
47727  fi
47728
47729
47730  if test "x$path" != "x$new_path"; then
47731    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47732    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47733$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47734  fi
47735
47736  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47737
47738  path="$POTENTIAL_FREETYPE_LIB_PATH"
47739  has_colon=`$ECHO $path | $GREP ^.:`
47740  new_path="$path"
47741  if test "x$has_colon" = x; then
47742    # Not in mixed or Windows style, start by that.
47743    new_path=`cmd //c echo $path`
47744  fi
47745
47746
47747  input_path="$new_path"
47748  # Check if we need to convert this using DOS-style short mode. If the path
47749  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47750  # take no chances and rewrite it.
47751  # Note: m4 eats our [], so we need to use [ and ] instead.
47752  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47753  if test "x$has_forbidden_chars" != x; then
47754    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47755    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47756  fi
47757
47758
47759  windows_path="$new_path"
47760  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47761    unix_path=`$CYGPATH -u "$windows_path"`
47762    new_path="$unix_path"
47763  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47764    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47765    new_path="$unix_path"
47766  fi
47767
47768  if test "x$path" != "x$new_path"; then
47769    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47770    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47771$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47772  fi
47773
47774  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47775  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47776
47777  else
47778    # We're on a unix platform. Hooray! :)
47779    path="$POTENTIAL_FREETYPE_LIB_PATH"
47780    has_space=`$ECHO "$path" | $GREP " "`
47781    if test "x$has_space" != x; then
47782      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47783$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47784      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47785    fi
47786
47787    # Use eval to expand a potential ~
47788    eval path="$path"
47789    if test ! -f "$path" && test ! -d "$path"; then
47790      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47791    fi
47792
47793    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47794  fi
47795
47796
47797    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47798    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47799$as_echo_n "checking for freetype includes... " >&6; }
47800    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47801$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47802    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47803    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47804$as_echo_n "checking for freetype libraries... " >&6; }
47805    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47806$as_echo "$FREETYPE_LIB_PATH" >&6; }
47807  fi
47808
47809              if test "x$FOUND_FREETYPE" != xyes; then
47810
47811  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47812  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
47813  METHOD="well-known location"
47814
47815  # Let's start with an optimistic view of the world :-)
47816  FOUND_FREETYPE=yes
47817
47818  # First look for the canonical freetype main include file ft2build.h.
47819  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47820    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47821    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47822    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47823      # Fail.
47824      FOUND_FREETYPE=no
47825    fi
47826  fi
47827
47828  if test "x$FOUND_FREETYPE" = xyes; then
47829    # Include file found, let's continue the sanity check.
47830    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47831$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47832
47833    # Reset to default value
47834    FREETYPE_BASE_NAME=freetype
47835    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47836    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47837      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47838          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47839        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47840        # for the .6 version explicitly.
47841        FREETYPE_BASE_NAME=freetype.6
47842        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47843        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47844$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47845      else
47846        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47847$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47848        FOUND_FREETYPE=no
47849      fi
47850    else
47851      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47852        # On Windows, we will need both .lib and .dll file.
47853        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47854          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47855$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47856          FOUND_FREETYPE=no
47857        fi
47858      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47859          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47860        # Found lib in isa dir, use that instead.
47861        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47862        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47863$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47864      fi
47865    fi
47866  fi
47867
47868  if test "x$FOUND_FREETYPE" = xyes; then
47869
47870  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47871
47872  # Input might be given as Windows format, start by converting to
47873  # unix format.
47874  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47875  new_path=`$CYGPATH -u "$path"`
47876
47877  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47878  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47879  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47880  # "foo.exe" is OK but "foo" is an error.
47881  #
47882  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47883  # It is also a way to make sure we got the proper file name for the real test later on.
47884  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47885  if test "x$test_shortpath" = x; then
47886    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47887$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47888    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47889  fi
47890
47891  # Call helper function which possibly converts this using DOS-style short mode.
47892  # If so, the updated path is stored in $new_path.
47893
47894  input_path="$new_path"
47895  # Check if we need to convert this using DOS-style short mode. If the path
47896  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47897  # take no chances and rewrite it.
47898  # Note: m4 eats our [], so we need to use [ and ] instead.
47899  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47900  if test "x$has_forbidden_chars" != x; then
47901    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47902    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47903    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47904    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47905      # Going to short mode and back again did indeed matter. Since short mode is
47906      # case insensitive, let's make it lowercase to improve readability.
47907      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47908      # Now convert it back to Unix-stile (cygpath)
47909      input_path=`$CYGPATH -u "$shortmode_path"`
47910      new_path="$input_path"
47911    fi
47912  fi
47913
47914  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47915  if test "x$test_cygdrive_prefix" = x; then
47916    # As a simple fix, exclude /usr/bin since it's not a real path.
47917    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47918      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47919      # a path prefixed by /cygdrive for fixpath to work.
47920      new_path="$CYGWIN_ROOT_PATH$input_path"
47921    fi
47922  fi
47923
47924
47925  if test "x$path" != "x$new_path"; then
47926    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47927    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47928$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47929  fi
47930
47931  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47932
47933  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47934  has_colon=`$ECHO $path | $GREP ^.:`
47935  new_path="$path"
47936  if test "x$has_colon" = x; then
47937    # Not in mixed or Windows style, start by that.
47938    new_path=`cmd //c echo $path`
47939  fi
47940
47941
47942  input_path="$new_path"
47943  # Check if we need to convert this using DOS-style short mode. If the path
47944  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47945  # take no chances and rewrite it.
47946  # Note: m4 eats our [], so we need to use [ and ] instead.
47947  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47948  if test "x$has_forbidden_chars" != x; then
47949    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47950    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47951  fi
47952
47953
47954  windows_path="$new_path"
47955  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47956    unix_path=`$CYGPATH -u "$windows_path"`
47957    new_path="$unix_path"
47958  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47959    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47960    new_path="$unix_path"
47961  fi
47962
47963  if test "x$path" != "x$new_path"; then
47964    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47965    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47966$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47967  fi
47968
47969  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47970  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47971
47972  else
47973    # We're on a unix platform. Hooray! :)
47974    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47975    has_space=`$ECHO "$path" | $GREP " "`
47976    if test "x$has_space" != x; then
47977      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47978$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47979      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47980    fi
47981
47982    # Use eval to expand a potential ~
47983    eval path="$path"
47984    if test ! -f "$path" && test ! -d "$path"; then
47985      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47986    fi
47987
47988    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47989  fi
47990
47991
47992  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47993
47994  # Input might be given as Windows format, start by converting to
47995  # unix format.
47996  path="$POTENTIAL_FREETYPE_LIB_PATH"
47997  new_path=`$CYGPATH -u "$path"`
47998
47999  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48000  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48001  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48002  # "foo.exe" is OK but "foo" is an error.
48003  #
48004  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48005  # It is also a way to make sure we got the proper file name for the real test later on.
48006  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48007  if test "x$test_shortpath" = x; then
48008    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48009$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48010    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
48011  fi
48012
48013  # Call helper function which possibly converts this using DOS-style short mode.
48014  # If so, the updated path is stored in $new_path.
48015
48016  input_path="$new_path"
48017  # Check if we need to convert this using DOS-style short mode. If the path
48018  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48019  # take no chances and rewrite it.
48020  # Note: m4 eats our [], so we need to use [ and ] instead.
48021  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48022  if test "x$has_forbidden_chars" != x; then
48023    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48024    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48025    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48026    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48027      # Going to short mode and back again did indeed matter. Since short mode is
48028      # case insensitive, let's make it lowercase to improve readability.
48029      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48030      # Now convert it back to Unix-stile (cygpath)
48031      input_path=`$CYGPATH -u "$shortmode_path"`
48032      new_path="$input_path"
48033    fi
48034  fi
48035
48036  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48037  if test "x$test_cygdrive_prefix" = x; then
48038    # As a simple fix, exclude /usr/bin since it's not a real path.
48039    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48040      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48041      # a path prefixed by /cygdrive for fixpath to work.
48042      new_path="$CYGWIN_ROOT_PATH$input_path"
48043    fi
48044  fi
48045
48046
48047  if test "x$path" != "x$new_path"; then
48048    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
48049    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
48050$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48051  fi
48052
48053  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48054
48055  path="$POTENTIAL_FREETYPE_LIB_PATH"
48056  has_colon=`$ECHO $path | $GREP ^.:`
48057  new_path="$path"
48058  if test "x$has_colon" = x; then
48059    # Not in mixed or Windows style, start by that.
48060    new_path=`cmd //c echo $path`
48061  fi
48062
48063
48064  input_path="$new_path"
48065  # Check if we need to convert this using DOS-style short mode. If the path
48066  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48067  # take no chances and rewrite it.
48068  # Note: m4 eats our [], so we need to use [ and ] instead.
48069  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48070  if test "x$has_forbidden_chars" != x; then
48071    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48072    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48073  fi
48074
48075
48076  windows_path="$new_path"
48077  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48078    unix_path=`$CYGPATH -u "$windows_path"`
48079    new_path="$unix_path"
48080  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48081    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48082    new_path="$unix_path"
48083  fi
48084
48085  if test "x$path" != "x$new_path"; then
48086    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
48087    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
48088$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48089  fi
48090
48091  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48092  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48093
48094  else
48095    # We're on a unix platform. Hooray! :)
48096    path="$POTENTIAL_FREETYPE_LIB_PATH"
48097    has_space=`$ECHO "$path" | $GREP " "`
48098    if test "x$has_space" != x; then
48099      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48100$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48101      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48102    fi
48103
48104    # Use eval to expand a potential ~
48105    eval path="$path"
48106    if test ! -f "$path" && test ! -d "$path"; then
48107      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48108    fi
48109
48110    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
48111  fi
48112
48113
48114    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48115    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
48116$as_echo_n "checking for freetype includes... " >&6; }
48117    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
48118$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
48119    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
48120    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
48121$as_echo_n "checking for freetype libraries... " >&6; }
48122    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
48123$as_echo "$FREETYPE_LIB_PATH" >&6; }
48124  fi
48125
48126              fi
48127            fi
48128          fi
48129        fi
48130      fi # end check in well-known locations
48131
48132      if test "x$FOUND_FREETYPE" != xyes; then
48133
48134  # Print a helpful message on how to acquire the necessary build dependency.
48135  # freetype is the help tag: freetype, cups, pulse, alsa etc
48136  MISSING_DEPENDENCY=freetype
48137
48138  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48139    cygwin_help $MISSING_DEPENDENCY
48140  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48141    msys_help $MISSING_DEPENDENCY
48142  else
48143    PKGHANDLER_COMMAND=
48144
48145    case $PKGHANDLER in
48146      apt-get)
48147        apt_help     $MISSING_DEPENDENCY ;;
48148      yum)
48149        yum_help     $MISSING_DEPENDENCY ;;
48150      port)
48151        port_help    $MISSING_DEPENDENCY ;;
48152      pkgutil)
48153        pkgutil_help $MISSING_DEPENDENCY ;;
48154      pkgadd)
48155        pkgadd_help  $MISSING_DEPENDENCY ;;
48156    esac
48157
48158    if test "x$PKGHANDLER_COMMAND" != x; then
48159      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48160    fi
48161  fi
48162
48163        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
48164      fi
48165    fi # end user specified settings
48166
48167    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
48168    if test "x$FREETYPE_CFLAGS" = x; then
48169
48170  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48171
48172  # Input might be given as Windows format, start by converting to
48173  # unix format.
48174  path="$FREETYPE_INCLUDE_PATH"
48175  new_path=`$CYGPATH -u "$path"`
48176
48177  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48178  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48179  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48180  # "foo.exe" is OK but "foo" is an error.
48181  #
48182  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48183  # It is also a way to make sure we got the proper file name for the real test later on.
48184  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48185  if test "x$test_shortpath" = x; then
48186    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48187$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48188    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
48189  fi
48190
48191  # Call helper function which possibly converts this using DOS-style short mode.
48192  # If so, the updated path is stored in $new_path.
48193
48194  input_path="$new_path"
48195  # Check if we need to convert this using DOS-style short mode. If the path
48196  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48197  # take no chances and rewrite it.
48198  # Note: m4 eats our [], so we need to use [ and ] instead.
48199  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48200  if test "x$has_forbidden_chars" != x; then
48201    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48202    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48203    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48204    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48205      # Going to short mode and back again did indeed matter. Since short mode is
48206      # case insensitive, let's make it lowercase to improve readability.
48207      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48208      # Now convert it back to Unix-stile (cygpath)
48209      input_path=`$CYGPATH -u "$shortmode_path"`
48210      new_path="$input_path"
48211    fi
48212  fi
48213
48214  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48215  if test "x$test_cygdrive_prefix" = x; then
48216    # As a simple fix, exclude /usr/bin since it's not a real path.
48217    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48218      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48219      # a path prefixed by /cygdrive for fixpath to work.
48220      new_path="$CYGWIN_ROOT_PATH$input_path"
48221    fi
48222  fi
48223
48224
48225  if test "x$path" != "x$new_path"; then
48226    FREETYPE_INCLUDE_PATH="$new_path"
48227    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48228$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48229  fi
48230
48231  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48232
48233  path="$FREETYPE_INCLUDE_PATH"
48234  has_colon=`$ECHO $path | $GREP ^.:`
48235  new_path="$path"
48236  if test "x$has_colon" = x; then
48237    # Not in mixed or Windows style, start by that.
48238    new_path=`cmd //c echo $path`
48239  fi
48240
48241
48242  input_path="$new_path"
48243  # Check if we need to convert this using DOS-style short mode. If the path
48244  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48245  # take no chances and rewrite it.
48246  # Note: m4 eats our [], so we need to use [ and ] instead.
48247  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48248  if test "x$has_forbidden_chars" != x; then
48249    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48250    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48251  fi
48252
48253
48254  windows_path="$new_path"
48255  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48256    unix_path=`$CYGPATH -u "$windows_path"`
48257    new_path="$unix_path"
48258  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48259    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48260    new_path="$unix_path"
48261  fi
48262
48263  if test "x$path" != "x$new_path"; then
48264    FREETYPE_INCLUDE_PATH="$new_path"
48265    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48266$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48267  fi
48268
48269  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48270  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48271
48272  else
48273    # We're on a unix platform. Hooray! :)
48274    path="$FREETYPE_INCLUDE_PATH"
48275    has_space=`$ECHO "$path" | $GREP " "`
48276    if test "x$has_space" != x; then
48277      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48278$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48279      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48280    fi
48281
48282    # Use eval to expand a potential ~
48283    eval path="$path"
48284    if test ! -f "$path" && test ! -d "$path"; then
48285      as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48286    fi
48287
48288    FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
48289  fi
48290
48291      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
48292        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
48293      else
48294        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
48295      fi
48296    fi
48297
48298    if test "x$FREETYPE_LIBS" = x; then
48299
48300  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48301
48302  # Input might be given as Windows format, start by converting to
48303  # unix format.
48304  path="$FREETYPE_LIB_PATH"
48305  new_path=`$CYGPATH -u "$path"`
48306
48307  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48308  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48309  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48310  # "foo.exe" is OK but "foo" is an error.
48311  #
48312  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48313  # It is also a way to make sure we got the proper file name for the real test later on.
48314  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48315  if test "x$test_shortpath" = x; then
48316    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48317$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48318    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
48319  fi
48320
48321  # Call helper function which possibly converts this using DOS-style short mode.
48322  # If so, the updated path is stored in $new_path.
48323
48324  input_path="$new_path"
48325  # Check if we need to convert this using DOS-style short mode. If the path
48326  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48327  # take no chances and rewrite it.
48328  # Note: m4 eats our [], so we need to use [ and ] instead.
48329  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48330  if test "x$has_forbidden_chars" != x; then
48331    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48332    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48333    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48334    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48335      # Going to short mode and back again did indeed matter. Since short mode is
48336      # case insensitive, let's make it lowercase to improve readability.
48337      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48338      # Now convert it back to Unix-stile (cygpath)
48339      input_path=`$CYGPATH -u "$shortmode_path"`
48340      new_path="$input_path"
48341    fi
48342  fi
48343
48344  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48345  if test "x$test_cygdrive_prefix" = x; then
48346    # As a simple fix, exclude /usr/bin since it's not a real path.
48347    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48348      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48349      # a path prefixed by /cygdrive for fixpath to work.
48350      new_path="$CYGWIN_ROOT_PATH$input_path"
48351    fi
48352  fi
48353
48354
48355  if test "x$path" != "x$new_path"; then
48356    FREETYPE_LIB_PATH="$new_path"
48357    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
48358$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48359  fi
48360
48361  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48362
48363  path="$FREETYPE_LIB_PATH"
48364  has_colon=`$ECHO $path | $GREP ^.:`
48365  new_path="$path"
48366  if test "x$has_colon" = x; then
48367    # Not in mixed or Windows style, start by that.
48368    new_path=`cmd //c echo $path`
48369  fi
48370
48371
48372  input_path="$new_path"
48373  # Check if we need to convert this using DOS-style short mode. If the path
48374  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48375  # take no chances and rewrite it.
48376  # Note: m4 eats our [], so we need to use [ and ] instead.
48377  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48378  if test "x$has_forbidden_chars" != x; then
48379    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48380    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48381  fi
48382
48383
48384  windows_path="$new_path"
48385  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48386    unix_path=`$CYGPATH -u "$windows_path"`
48387    new_path="$unix_path"
48388  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48389    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48390    new_path="$unix_path"
48391  fi
48392
48393  if test "x$path" != "x$new_path"; then
48394    FREETYPE_LIB_PATH="$new_path"
48395    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
48396$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48397  fi
48398
48399  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48400  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48401
48402  else
48403    # We're on a unix platform. Hooray! :)
48404    path="$FREETYPE_LIB_PATH"
48405    has_space=`$ECHO "$path" | $GREP " "`
48406    if test "x$has_space" != x; then
48407      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48408$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48409      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48410    fi
48411
48412    # Use eval to expand a potential ~
48413    eval path="$path"
48414    if test ! -f "$path" && test ! -d "$path"; then
48415      as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48416    fi
48417
48418    FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
48419  fi
48420
48421      if test "x$OPENJDK_TARGET_OS" = xwindows; then
48422        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
48423      else
48424        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
48425      fi
48426    fi
48427
48428    # Try to compile it
48429    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
48430$as_echo_n "checking if we can compile and link with freetype... " >&6; }
48431    ac_ext=cpp
48432ac_cpp='$CXXCPP $CPPFLAGS'
48433ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48434ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48435ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48436
48437    PREV_CXXCFLAGS="$CXXFLAGS"
48438    PREV_LIBS="$LIBS"
48439    PREV_CXX="$CXX"
48440    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
48441    LIBS="$LIBS $FREETYPE_LIBS"
48442    CXX="$FIXPATH $CXX"
48443    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48444/* end confdefs.h.  */
48445
48446          #include<ft2build.h>
48447          #include FT_FREETYPE_H
48448          int main () {
48449            FT_Init_FreeType(NULL);
48450            return 0;
48451          }
48452
48453_ACEOF
48454if ac_fn_cxx_try_link "$LINENO"; then :
48455
48456          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48457$as_echo "yes" >&6; }
48458
48459else
48460
48461          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48462$as_echo "no" >&6; }
48463          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
48464$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
48465          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
48466$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
48467
48468
48469  # Print a helpful message on how to acquire the necessary build dependency.
48470  # freetype is the help tag: freetype, cups, pulse, alsa etc
48471  MISSING_DEPENDENCY=freetype
48472
48473  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48474    cygwin_help $MISSING_DEPENDENCY
48475  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48476    msys_help $MISSING_DEPENDENCY
48477  else
48478    PKGHANDLER_COMMAND=
48479
48480    case $PKGHANDLER in
48481      apt-get)
48482        apt_help     $MISSING_DEPENDENCY ;;
48483      yum)
48484        yum_help     $MISSING_DEPENDENCY ;;
48485      port)
48486        port_help    $MISSING_DEPENDENCY ;;
48487      pkgutil)
48488        pkgutil_help $MISSING_DEPENDENCY ;;
48489      pkgadd)
48490        pkgadd_help  $MISSING_DEPENDENCY ;;
48491    esac
48492
48493    if test "x$PKGHANDLER_COMMAND" != x; then
48494      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48495    fi
48496  fi
48497
48498
48499          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
48500
48501
48502fi
48503rm -f core conftest.err conftest.$ac_objext \
48504    conftest$ac_exeext conftest.$ac_ext
48505    CXXCFLAGS="$PREV_CXXFLAGS"
48506    LIBS="$PREV_LIBS"
48507    CXX="$PREV_CXX"
48508    ac_ext=cpp
48509ac_cpp='$CXXCPP $CPPFLAGS'
48510ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48511ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48512ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48513
48514
48515    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
48516$as_echo_n "checking if we should bundle freetype... " >&6; }
48517    if test "x$BUNDLE_FREETYPE" = xyes; then
48518      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
48519    fi
48520    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
48521$as_echo "$BUNDLE_FREETYPE" >&6; }
48522
48523  fi # end freetype needed
48524
48525
48526
48527
48528
48529
48530
48531  ###############################################################################
48532  #
48533  # Check for alsa headers and libraries. Used on Linux/GNU systems.
48534  #
48535
48536# Check whether --with-alsa was given.
48537if test "${with_alsa+set}" = set; then :
48538  withval=$with_alsa;
48539fi
48540
48541
48542# Check whether --with-alsa-include was given.
48543if test "${with_alsa_include+set}" = set; then :
48544  withval=$with_alsa_include;
48545fi
48546
48547
48548# Check whether --with-alsa-lib was given.
48549if test "${with_alsa_lib+set}" = set; then :
48550  withval=$with_alsa_lib;
48551fi
48552
48553
48554  if test "x$ALSA_NOT_NEEDED" = xyes; then
48555    if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
48556      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
48557$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
48558    fi
48559    ALSA_CFLAGS=
48560    ALSA_LIBS=
48561  else
48562    ALSA_FOUND=no
48563
48564    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
48565      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
48566    fi
48567
48568    if test "x${with_alsa}" != x; then
48569      ALSA_LIBS="-L${with_alsa}/lib -lasound"
48570      ALSA_CFLAGS="-I${with_alsa}/include"
48571      ALSA_FOUND=yes
48572    fi
48573    if test "x${with_alsa_include}" != x; then
48574      ALSA_CFLAGS="-I${with_alsa_include}"
48575      ALSA_FOUND=yes
48576    fi
48577    if test "x${with_alsa_lib}" != x; then
48578      ALSA_LIBS="-L${with_alsa_lib} -lasound"
48579      ALSA_FOUND=yes
48580    fi
48581    if test "x$ALSA_FOUND" = xno; then
48582
48583
48584  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
48585    # Source the builddeps file again, to make sure it uses the latest variables!
48586    . $builddepsfile
48587    # Look for a target and build machine specific resource!
48588    eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
48589    if test "x$resource" = x; then
48590      # Ok, lets instead look for a target specific resource
48591      eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
48592    fi
48593    if test "x$resource" = x; then
48594      # Ok, lets instead look for a build specific resource
48595      eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
48596    fi
48597    if test "x$resource" = x; then
48598      # Ok, lets instead look for a generic resource
48599      # (The alsa comes from M4 and not the shell, thus no need for eval here.)
48600      resource=${builddep_alsa}
48601    fi
48602    if test "x$resource" != x; then
48603      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
48604$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
48605      # If the resource in the builddeps.conf file is an existing directory,
48606      # for example /java/linux/cups
48607      if test -d ${resource}; then
48608        depdir=${resource}
48609      else
48610
48611  # alsa is for example mymodule
48612  # $resource is for example libs/general/libmymod_1_2_3.zip
48613  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
48614  # $with_builddeps_dir is for example /localhome/builddeps
48615  # depdir is the name of the variable into which we store the depdir, eg MYMOD
48616  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
48617  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
48618  filename=`basename $resource`
48619  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
48620  filebase=${filename%%.*}
48621  extension=${filename#*.}
48622  installdir=$with_builddeps_dir/$filebase
48623  if test ! -f $installdir/$filename.unpacked; then
48624    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
48625$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
48626    if test ! -d $installdir; then
48627      mkdir -p $installdir
48628    fi
48629    if test ! -d $installdir; then
48630      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
48631    fi
48632    tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
48633    touch $tmpfile
48634    if test ! -f $tmpfile; then
48635      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
48636    fi
48637
48638  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
48639  # $tmpfile is the local file name for the downloaded file.
48640  VALID_TOOL=no
48641  if test "x$BDEPS_FTP" = xwget; then
48642    VALID_TOOL=yes
48643    wget -O $tmpfile $with_builddeps_server/$resource
48644  fi
48645  if test "x$BDEPS_FTP" = xlftp; then
48646    VALID_TOOL=yes
48647    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
48648  fi
48649  if test "x$BDEPS_FTP" = xftp; then
48650    VALID_TOOL=yes
48651    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
48652    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
48653    FTPUSERPWD=${FTPSERVER%%@*}
48654    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
48655      FTPUSER=${userpwd%%:*}
48656      FTPPWD=${userpwd#*@}
48657      FTPSERVER=${FTPSERVER#*@}
48658    else
48659      FTPUSER=ftp
48660      FTPPWD=ftp
48661    fi
48662    # the "pass" command does not work on some
48663    # ftp clients (read ftp.exe) but if it works,
48664    # passive mode is better!
48665    ( \
48666        echo "user $FTPUSER $FTPPWD"        ; \
48667        echo "pass"                         ; \
48668        echo "bin"                          ; \
48669        echo "get $FTPPATH $tmpfile"              ; \
48670    ) | ftp -in $FTPSERVER
48671  fi
48672  if test "x$VALID_TOOL" != xyes; then
48673    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
48674  fi
48675
48676    mv $tmpfile $installdir/$filename
48677    if test ! -s $installdir/$filename; then
48678      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
48679    fi
48680    case "$extension" in
48681      zip)  echo "Unzipping $installdir/$filename..."
48682        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
48683        ;;
48684      tar.gz) echo "Untaring $installdir/$filename..."
48685        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
48686        ;;
48687      tgz) echo "Untaring $installdir/$filename..."
48688        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
48689        ;;
48690      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
48691        ;;
48692    esac
48693  fi
48694  if test -f $installdir/$filename.unpacked; then
48695    depdir=$installdir
48696  fi
48697
48698      fi
48699      # Source the builddeps file again, because in the previous command, the depdir
48700      # was updated to point at the current build dependency install directory.
48701      . $builddepsfile
48702      # Now extract variables from the builddeps.conf files.
48703      theroot=${builddep_alsa_ROOT}
48704      thecflags=${builddep_alsa_CFLAGS}
48705      thelibs=${builddep_alsa_LIBS}
48706      if test "x$depdir" = x; then
48707        as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
48708      fi
48709      ALSA=$depdir
48710      if test "x$theroot" != x; then
48711        ALSA="$theroot"
48712      fi
48713      if test "x$thecflags" != x; then
48714        ALSA_CFLAGS="$thecflags"
48715      fi
48716      if test "x$thelibs" != x; then
48717        ALSA_LIBS="$thelibs"
48718      fi
48719      ALSA_FOUND=yes
48720      else ALSA_FOUND=no
48721
48722    fi
48723    else ALSA_FOUND=no
48724
48725  fi
48726
48727    fi
48728    # Do not try pkg-config if we have a sysroot set.
48729    if test "x$SYSROOT" = x; then
48730      if test "x$ALSA_FOUND" = xno; then
48731
48732pkg_failed=no
48733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
48734$as_echo_n "checking for ALSA... " >&6; }
48735
48736if test -n "$ALSA_CFLAGS"; then
48737    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
48738 elif test -n "$PKG_CONFIG"; then
48739    if test -n "$PKG_CONFIG" && \
48740    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
48741  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
48742  ac_status=$?
48743  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48744  test $ac_status = 0; }; then
48745  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
48746else
48747  pkg_failed=yes
48748fi
48749 else
48750    pkg_failed=untried
48751fi
48752if test -n "$ALSA_LIBS"; then
48753    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
48754 elif test -n "$PKG_CONFIG"; then
48755    if test -n "$PKG_CONFIG" && \
48756    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
48757  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
48758  ac_status=$?
48759  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48760  test $ac_status = 0; }; then
48761  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
48762else
48763  pkg_failed=yes
48764fi
48765 else
48766    pkg_failed=untried
48767fi
48768
48769
48770
48771if test $pkg_failed = yes; then
48772
48773if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48774        _pkg_short_errors_supported=yes
48775else
48776        _pkg_short_errors_supported=no
48777fi
48778        if test $_pkg_short_errors_supported = yes; then
48779	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
48780        else
48781	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
48782        fi
48783	# Put the nasty error message in config.log where it belongs
48784	echo "$ALSA_PKG_ERRORS" >&5
48785
48786	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48787$as_echo "no" >&6; }
48788                ALSA_FOUND=no
48789elif test $pkg_failed = untried; then
48790	ALSA_FOUND=no
48791else
48792	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
48793	ALSA_LIBS=$pkg_cv_ALSA_LIBS
48794        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48795$as_echo "yes" >&6; }
48796	ALSA_FOUND=yes
48797fi
48798      fi
48799    fi
48800    if test "x$ALSA_FOUND" = xno; then
48801      for ac_header in alsa/asoundlib.h
48802do :
48803  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
48804if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
48805  cat >>confdefs.h <<_ACEOF
48806#define HAVE_ALSA_ASOUNDLIB_H 1
48807_ACEOF
48808
48809            ALSA_FOUND=yes
48810            ALSA_CFLAGS=-Iignoreme
48811            ALSA_LIBS=-lasound
48812            DEFAULT_ALSA=yes
48813
48814else
48815  ALSA_FOUND=no
48816fi
48817
48818done
48819
48820    fi
48821    if test "x$ALSA_FOUND" = xno; then
48822
48823  # Print a helpful message on how to acquire the necessary build dependency.
48824  # alsa is the help tag: freetype, cups, pulse, alsa etc
48825  MISSING_DEPENDENCY=alsa
48826
48827  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48828    cygwin_help $MISSING_DEPENDENCY
48829  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48830    msys_help $MISSING_DEPENDENCY
48831  else
48832    PKGHANDLER_COMMAND=
48833
48834    case $PKGHANDLER in
48835      apt-get)
48836        apt_help     $MISSING_DEPENDENCY ;;
48837      yum)
48838        yum_help     $MISSING_DEPENDENCY ;;
48839      port)
48840        port_help    $MISSING_DEPENDENCY ;;
48841      pkgutil)
48842        pkgutil_help $MISSING_DEPENDENCY ;;
48843      pkgadd)
48844        pkgadd_help  $MISSING_DEPENDENCY ;;
48845    esac
48846
48847    if test "x$PKGHANDLER_COMMAND" != x; then
48848      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48849    fi
48850  fi
48851
48852      as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
48853    fi
48854  fi
48855
48856
48857
48858
48859
48860
48861  ###############################################################################
48862  #
48863  # Check for the jpeg library
48864  #
48865
48866
48867# Check whether --with-libjpeg was given.
48868if test "${with_libjpeg+set}" = set; then :
48869  withval=$with_libjpeg;
48870fi
48871
48872
48873  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
48874$as_echo_n "checking for which libjpeg to use... " >&6; }
48875
48876  # default is bundled
48877  DEFAULT_LIBJPEG=bundled
48878
48879  #
48880  # if user didn't specify, use DEFAULT_LIBJPEG
48881  #
48882  if test "x${with_libjpeg}" = "x"; then
48883    with_libjpeg=${DEFAULT_LIBJPEG}
48884  fi
48885
48886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
48887$as_echo "${with_libjpeg}" >&6; }
48888
48889  if test "x${with_libjpeg}" = "xbundled"; then
48890    USE_EXTERNAL_LIBJPEG=false
48891  elif test "x${with_libjpeg}" = "xsystem"; then
48892    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
48893if test "x$ac_cv_header_jpeglib_h" = xyes; then :
48894
48895else
48896   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
48897fi
48898
48899
48900    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
48901$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
48902if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
48903  $as_echo_n "(cached) " >&6
48904else
48905  ac_check_lib_save_LIBS=$LIBS
48906LIBS="-ljpeg  $LIBS"
48907cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48908/* end confdefs.h.  */
48909
48910/* Override any GCC internal prototype to avoid an error.
48911   Use char because int might match the return type of a GCC
48912   builtin and then its argument prototype would still apply.  */
48913#ifdef __cplusplus
48914extern "C"
48915#endif
48916char jpeg_CreateDecompress ();
48917int
48918main ()
48919{
48920return jpeg_CreateDecompress ();
48921  ;
48922  return 0;
48923}
48924_ACEOF
48925if ac_fn_cxx_try_link "$LINENO"; then :
48926  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
48927else
48928  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
48929fi
48930rm -f core conftest.err conftest.$ac_objext \
48931    conftest$ac_exeext conftest.$ac_ext
48932LIBS=$ac_check_lib_save_LIBS
48933fi
48934{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
48935$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
48936if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
48937  cat >>confdefs.h <<_ACEOF
48938#define HAVE_LIBJPEG 1
48939_ACEOF
48940
48941  LIBS="-ljpeg $LIBS"
48942
48943else
48944   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
48945fi
48946
48947
48948    USE_EXTERNAL_LIBJPEG=true
48949  else
48950    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
48951  fi
48952
48953
48954
48955  ###############################################################################
48956  #
48957  # Check for the gif library
48958  #
48959
48960
48961# Check whether --with-giflib was given.
48962if test "${with_giflib+set}" = set; then :
48963  withval=$with_giflib;
48964fi
48965
48966
48967
48968  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
48969$as_echo_n "checking for which giflib to use... " >&6; }
48970
48971  # default is bundled
48972  DEFAULT_GIFLIB=bundled
48973
48974  #
48975  # if user didn't specify, use DEFAULT_GIFLIB
48976  #
48977  if test "x${with_giflib}" = "x"; then
48978    with_giflib=${DEFAULT_GIFLIB}
48979  fi
48980
48981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
48982$as_echo "${with_giflib}" >&6; }
48983
48984  if test "x${with_giflib}" = "xbundled"; then
48985    USE_EXTERNAL_LIBGIF=false
48986  elif test "x${with_giflib}" = "xsystem"; then
48987    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
48988if test "x$ac_cv_header_gif_lib_h" = xyes; then :
48989
48990else
48991   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
48992fi
48993
48994
48995    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
48996$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
48997if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
48998  $as_echo_n "(cached) " >&6
48999else
49000  ac_check_lib_save_LIBS=$LIBS
49001LIBS="-lgif  $LIBS"
49002cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49003/* end confdefs.h.  */
49004
49005/* Override any GCC internal prototype to avoid an error.
49006   Use char because int might match the return type of a GCC
49007   builtin and then its argument prototype would still apply.  */
49008#ifdef __cplusplus
49009extern "C"
49010#endif
49011char DGifGetCode ();
49012int
49013main ()
49014{
49015return DGifGetCode ();
49016  ;
49017  return 0;
49018}
49019_ACEOF
49020if ac_fn_cxx_try_link "$LINENO"; then :
49021  ac_cv_lib_gif_DGifGetCode=yes
49022else
49023  ac_cv_lib_gif_DGifGetCode=no
49024fi
49025rm -f core conftest.err conftest.$ac_objext \
49026    conftest$ac_exeext conftest.$ac_ext
49027LIBS=$ac_check_lib_save_LIBS
49028fi
49029{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
49030$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
49031if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
49032  cat >>confdefs.h <<_ACEOF
49033#define HAVE_LIBGIF 1
49034_ACEOF
49035
49036  LIBS="-lgif $LIBS"
49037
49038else
49039   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
49040fi
49041
49042
49043    USE_EXTERNAL_LIBGIF=true
49044  else
49045    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
49046  fi
49047
49048
49049  ###############################################################################
49050  #
49051  # Check for the lcms2 library
49052  #
49053
49054
49055# Check whether --with-lcms was given.
49056if test "${with_lcms+set}" = set; then :
49057  withval=$with_lcms;
49058fi
49059
49060
49061  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
49062$as_echo_n "checking for which lcms to use... " >&6; }
49063
49064  DEFAULT_LCMS=bundled
49065
49066  #
49067  # If user didn't specify, use DEFAULT_LCMS
49068  #
49069  if test "x${with_lcms}" = "x"; then
49070      with_lcms=${DEFAULT_LCMS}
49071  fi
49072
49073  if test "x${with_lcms}" = "xbundled"; then
49074    USE_EXTERNAL_LCMS=false
49075    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
49076$as_echo "bundled" >&6; }
49077  elif test "x${with_lcms}" = "xsystem"; then
49078    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49079$as_echo "system" >&6; }
49080
49081pkg_failed=no
49082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
49083$as_echo_n "checking for LCMS... " >&6; }
49084
49085if test -n "$LCMS_CFLAGS"; then
49086    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
49087 elif test -n "$PKG_CONFIG"; then
49088    if test -n "$PKG_CONFIG" && \
49089    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
49090  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
49091  ac_status=$?
49092  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49093  test $ac_status = 0; }; then
49094  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
49095else
49096  pkg_failed=yes
49097fi
49098 else
49099    pkg_failed=untried
49100fi
49101if test -n "$LCMS_LIBS"; then
49102    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
49103 elif test -n "$PKG_CONFIG"; then
49104    if test -n "$PKG_CONFIG" && \
49105    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
49106  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
49107  ac_status=$?
49108  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49109  test $ac_status = 0; }; then
49110  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
49111else
49112  pkg_failed=yes
49113fi
49114 else
49115    pkg_failed=untried
49116fi
49117
49118
49119
49120if test $pkg_failed = yes; then
49121
49122if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49123        _pkg_short_errors_supported=yes
49124else
49125        _pkg_short_errors_supported=no
49126fi
49127        if test $_pkg_short_errors_supported = yes; then
49128	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
49129        else
49130	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
49131        fi
49132	# Put the nasty error message in config.log where it belongs
49133	echo "$LCMS_PKG_ERRORS" >&5
49134
49135	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49136$as_echo "no" >&6; }
49137                LCMS_FOUND=no
49138elif test $pkg_failed = untried; then
49139	LCMS_FOUND=no
49140else
49141	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
49142	LCMS_LIBS=$pkg_cv_LCMS_LIBS
49143        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49144$as_echo "yes" >&6; }
49145	LCMS_FOUND=yes
49146fi
49147    if test "x${LCMS_FOUND}" = "xyes"; then
49148      USE_EXTERNAL_LCMS=true
49149    else
49150      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
49151    fi
49152  else
49153    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
49154  fi
49155
49156
49157
49158  ###############################################################################
49159  #
49160  # Check for the png library
49161  #
49162
49163
49164# Check whether --with-libpng was given.
49165if test "${with_libpng+set}" = set; then :
49166  withval=$with_libpng;
49167fi
49168
49169
49170
49171  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
49172$as_echo_n "checking for which libpng to use... " >&6; }
49173
49174  # default is bundled
49175  DEFAULT_LIBPNG=bundled
49176
49177  #
49178  # if user didn't specify, use DEFAULT_LIBPNG
49179  #
49180  if test "x${with_libpng}" = "x"; then
49181      with_libpng=${DEFAULT_LIBPNG}
49182  fi
49183
49184  if test "x${with_libpng}" = "xbundled"; then
49185      USE_EXTERNAL_LIBPNG=false
49186      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
49187$as_echo "bundled" >&6; }
49188  elif test "x${with_libpng}" = "xsystem"; then
49189
49190pkg_failed=no
49191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
49192$as_echo_n "checking for PNG... " >&6; }
49193
49194if test -n "$PNG_CFLAGS"; then
49195    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
49196 elif test -n "$PKG_CONFIG"; then
49197    if test -n "$PKG_CONFIG" && \
49198    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
49199  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
49200  ac_status=$?
49201  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49202  test $ac_status = 0; }; then
49203  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
49204else
49205  pkg_failed=yes
49206fi
49207 else
49208    pkg_failed=untried
49209fi
49210if test -n "$PNG_LIBS"; then
49211    pkg_cv_PNG_LIBS="$PNG_LIBS"
49212 elif test -n "$PKG_CONFIG"; then
49213    if test -n "$PKG_CONFIG" && \
49214    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
49215  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
49216  ac_status=$?
49217  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49218  test $ac_status = 0; }; then
49219  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
49220else
49221  pkg_failed=yes
49222fi
49223 else
49224    pkg_failed=untried
49225fi
49226
49227
49228
49229if test $pkg_failed = yes; then
49230
49231if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49232        _pkg_short_errors_supported=yes
49233else
49234        _pkg_short_errors_supported=no
49235fi
49236        if test $_pkg_short_errors_supported = yes; then
49237	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
49238        else
49239	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
49240        fi
49241	# Put the nasty error message in config.log where it belongs
49242	echo "$PNG_PKG_ERRORS" >&5
49243
49244	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49245$as_echo "no" >&6; }
49246                 LIBPNG_FOUND=no
49247elif test $pkg_failed = untried; then
49248	 LIBPNG_FOUND=no
49249else
49250	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
49251	PNG_LIBS=$pkg_cv_PNG_LIBS
49252        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49253$as_echo "yes" >&6; }
49254	 LIBPNG_FOUND=yes
49255fi
49256      if test "x${LIBPNG_FOUND}" = "xyes"; then
49257          USE_EXTERNAL_LIBPNG=true
49258          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49259$as_echo "system" >&6; }
49260      else
49261          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
49262$as_echo "system not found" >&6; }
49263          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
49264      fi
49265  else
49266      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
49267  fi
49268
49269
49270  ###############################################################################
49271  #
49272  # Check for the zlib library
49273  #
49274
49275
49276# Check whether --with-zlib was given.
49277if test "${with_zlib+set}" = set; then :
49278  withval=$with_zlib;
49279fi
49280
49281
49282  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
49283$as_echo_n "checking for compress in -lz... " >&6; }
49284if ${ac_cv_lib_z_compress+:} false; then :
49285  $as_echo_n "(cached) " >&6
49286else
49287  ac_check_lib_save_LIBS=$LIBS
49288LIBS="-lz  $LIBS"
49289cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49290/* end confdefs.h.  */
49291
49292/* Override any GCC internal prototype to avoid an error.
49293   Use char because int might match the return type of a GCC
49294   builtin and then its argument prototype would still apply.  */
49295#ifdef __cplusplus
49296extern "C"
49297#endif
49298char compress ();
49299int
49300main ()
49301{
49302return compress ();
49303  ;
49304  return 0;
49305}
49306_ACEOF
49307if ac_fn_cxx_try_link "$LINENO"; then :
49308  ac_cv_lib_z_compress=yes
49309else
49310  ac_cv_lib_z_compress=no
49311fi
49312rm -f core conftest.err conftest.$ac_objext \
49313    conftest$ac_exeext conftest.$ac_ext
49314LIBS=$ac_check_lib_save_LIBS
49315fi
49316{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
49317$as_echo "$ac_cv_lib_z_compress" >&6; }
49318if test "x$ac_cv_lib_z_compress" = xyes; then :
49319   ZLIB_FOUND=yes
49320else
49321   ZLIB_FOUND=no
49322fi
49323
49324
49325  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
49326$as_echo_n "checking for which zlib to use... " >&6; }
49327
49328  DEFAULT_ZLIB=bundled
49329  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49330    #
49331    # On macosx default is system...on others default is
49332    #
49333    DEFAULT_ZLIB=system
49334  fi
49335
49336  if test "x${ZLIB_FOUND}" != "xyes"; then
49337    #
49338    # If we don't find any system...set default to bundled
49339    #
49340    DEFAULT_ZLIB=bundled
49341  fi
49342
49343  #
49344  # If user didn't specify, use DEFAULT_ZLIB
49345  #
49346  if test "x${with_zlib}" = "x"; then
49347    with_zlib=${DEFAULT_ZLIB}
49348  fi
49349
49350  if test "x${with_zlib}" = "xbundled"; then
49351    USE_EXTERNAL_LIBZ=false
49352    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
49353$as_echo "bundled" >&6; }
49354  elif test "x${with_zlib}" = "xsystem"; then
49355    if test "x${ZLIB_FOUND}" = "xyes"; then
49356      USE_EXTERNAL_LIBZ=true
49357      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49358$as_echo "system" >&6; }
49359    else
49360      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
49361$as_echo "system not found" >&6; }
49362      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
49363    fi
49364  else
49365    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
49366  fi
49367
49368
49369
49370  ###############################################################################
49371  LIBZIP_CAN_USE_MMAP=true
49372
49373
49374
49375  ###############################################################################
49376  #
49377  # Check if altzone exists in time.h
49378  #
49379
49380  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49381/* end confdefs.h.  */
49382#include <time.h>
49383int
49384main ()
49385{
49386return (int)altzone;
49387  ;
49388  return 0;
49389}
49390_ACEOF
49391if ac_fn_cxx_try_link "$LINENO"; then :
49392  has_altzone=yes
49393else
49394  has_altzone=no
49395fi
49396rm -f core conftest.err conftest.$ac_objext \
49397    conftest$ac_exeext conftest.$ac_ext
49398  if test "x$has_altzone" = xyes; then
49399
49400$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
49401
49402  fi
49403
49404  ###############################################################################
49405  #
49406  # Check the maths library
49407  #
49408
49409  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
49410$as_echo_n "checking for cos in -lm... " >&6; }
49411if ${ac_cv_lib_m_cos+:} false; then :
49412  $as_echo_n "(cached) " >&6
49413else
49414  ac_check_lib_save_LIBS=$LIBS
49415LIBS="-lm  $LIBS"
49416cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49417/* end confdefs.h.  */
49418
49419/* Override any GCC internal prototype to avoid an error.
49420   Use char because int might match the return type of a GCC
49421   builtin and then its argument prototype would still apply.  */
49422#ifdef __cplusplus
49423extern "C"
49424#endif
49425char cos ();
49426int
49427main ()
49428{
49429return cos ();
49430  ;
49431  return 0;
49432}
49433_ACEOF
49434if ac_fn_cxx_try_link "$LINENO"; then :
49435  ac_cv_lib_m_cos=yes
49436else
49437  ac_cv_lib_m_cos=no
49438fi
49439rm -f core conftest.err conftest.$ac_objext \
49440    conftest$ac_exeext conftest.$ac_ext
49441LIBS=$ac_check_lib_save_LIBS
49442fi
49443{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
49444$as_echo "$ac_cv_lib_m_cos" >&6; }
49445if test "x$ac_cv_lib_m_cos" = xyes; then :
49446  cat >>confdefs.h <<_ACEOF
49447#define HAVE_LIBM 1
49448_ACEOF
49449
49450  LIBS="-lm $LIBS"
49451
49452else
49453
49454        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
49455$as_echo "$as_me: Maths library was not found" >&6;}
49456
49457
49458fi
49459
49460
49461
49462  ###############################################################################
49463  #
49464  # Check for libdl.so
49465
49466  save_LIBS="$LIBS"
49467  LIBS=""
49468  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
49469$as_echo_n "checking for dlopen in -ldl... " >&6; }
49470if ${ac_cv_lib_dl_dlopen+:} false; then :
49471  $as_echo_n "(cached) " >&6
49472else
49473  ac_check_lib_save_LIBS=$LIBS
49474LIBS="-ldl  $LIBS"
49475cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49476/* end confdefs.h.  */
49477
49478/* Override any GCC internal prototype to avoid an error.
49479   Use char because int might match the return type of a GCC
49480   builtin and then its argument prototype would still apply.  */
49481#ifdef __cplusplus
49482extern "C"
49483#endif
49484char dlopen ();
49485int
49486main ()
49487{
49488return dlopen ();
49489  ;
49490  return 0;
49491}
49492_ACEOF
49493if ac_fn_cxx_try_link "$LINENO"; then :
49494  ac_cv_lib_dl_dlopen=yes
49495else
49496  ac_cv_lib_dl_dlopen=no
49497fi
49498rm -f core conftest.err conftest.$ac_objext \
49499    conftest$ac_exeext conftest.$ac_ext
49500LIBS=$ac_check_lib_save_LIBS
49501fi
49502{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
49503$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
49504if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
49505  cat >>confdefs.h <<_ACEOF
49506#define HAVE_LIBDL 1
49507_ACEOF
49508
49509  LIBS="-ldl $LIBS"
49510
49511fi
49512
49513  LIBDL="$LIBS"
49514
49515  LIBS="$save_LIBS"
49516
49517
49518  ###############################################################################
49519  #
49520  # statically link libstdc++ before C++ ABI is stablized on Linux unless
49521  # dynamic build is configured on command line.
49522  #
49523
49524# Check whether --with-stdc++lib was given.
49525if test "${with_stdc__lib+set}" = set; then :
49526  withval=$with_stdc__lib;
49527        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
49528                && test "x$with_stdc__lib" != xdefault; then
49529          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
49530        fi
49531
49532else
49533  with_stdc__lib=default
49534
49535fi
49536
49537
49538  if test "x$OPENJDK_TARGET_OS" = xlinux; then
49539    # Test if -lstdc++ works.
49540    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
49541$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
49542    ac_ext=cpp
49543ac_cpp='$CXXCPP $CPPFLAGS'
49544ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49545ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49546ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49547
49548    OLD_CXXFLAGS="$CXXFLAGS"
49549    CXXFLAGS="$CXXFLAGS -lstdc++"
49550    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49551/* end confdefs.h.  */
49552
49553int
49554main ()
49555{
49556return 0;
49557  ;
49558  return 0;
49559}
49560_ACEOF
49561if ac_fn_cxx_try_link "$LINENO"; then :
49562  has_dynamic_libstdcxx=yes
49563else
49564  has_dynamic_libstdcxx=no
49565fi
49566rm -f core conftest.err conftest.$ac_objext \
49567    conftest$ac_exeext conftest.$ac_ext
49568    CXXFLAGS="$OLD_CXXFLAGS"
49569    ac_ext=cpp
49570ac_cpp='$CXXCPP $CPPFLAGS'
49571ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49572ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49573ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49574
49575    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
49576$as_echo "$has_dynamic_libstdcxx" >&6; }
49577
49578    # Test if stdc++ can be linked statically.
49579    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
49580$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
49581    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
49582    ac_ext=cpp
49583ac_cpp='$CXXCPP $CPPFLAGS'
49584ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49585ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49586ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49587
49588    OLD_LIBS="$LIBS"
49589    OLD_CXX="$CXX"
49590    LIBS="$STATIC_STDCXX_FLAGS"
49591    CXX="$CC"
49592    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49593/* end confdefs.h.  */
49594
49595int
49596main ()
49597{
49598return 0;
49599  ;
49600  return 0;
49601}
49602_ACEOF
49603if ac_fn_cxx_try_link "$LINENO"; then :
49604  has_static_libstdcxx=yes
49605else
49606  has_static_libstdcxx=no
49607fi
49608rm -f core conftest.err conftest.$ac_objext \
49609    conftest$ac_exeext conftest.$ac_ext
49610    LIBS="$OLD_LIBS"
49611    CXX="$OLD_CXX"
49612    ac_ext=cpp
49613ac_cpp='$CXXCPP $CPPFLAGS'
49614ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49615ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49616ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49617
49618    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
49619$as_echo "$has_static_libstdcxx" >&6; }
49620
49621    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
49622      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
49623    fi
49624
49625    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
49626      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
49627    fi
49628
49629    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
49630      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
49631    fi
49632
49633    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
49634$as_echo_n "checking how to link with libstdc++... " >&6; }
49635    # If dynamic was requested, it's available since it would fail above otherwise.
49636    # If dynamic wasn't requested, go with static unless it isn't available.
49637    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49638      LIBCXX="$LIBCXX -lstdc++"
49639      LDCXX="$CXX"
49640      STATIC_CXX_SETTING="STATIC_CXX=false"
49641      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
49642$as_echo "dynamic" >&6; }
49643    else
49644      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
49645      LDCXX="$CC"
49646      STATIC_CXX_SETTING="STATIC_CXX=true"
49647      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
49648$as_echo "static" >&6; }
49649    fi
49650  fi
49651
49652
49653  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49654    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
49655
49656pkg_failed=no
49657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
49658$as_echo_n "checking for LIBFFI... " >&6; }
49659
49660if test -n "$LIBFFI_CFLAGS"; then
49661    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
49662 elif test -n "$PKG_CONFIG"; then
49663    if test -n "$PKG_CONFIG" && \
49664    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
49665  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
49666  ac_status=$?
49667  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49668  test $ac_status = 0; }; then
49669  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
49670else
49671  pkg_failed=yes
49672fi
49673 else
49674    pkg_failed=untried
49675fi
49676if test -n "$LIBFFI_LIBS"; then
49677    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
49678 elif test -n "$PKG_CONFIG"; then
49679    if test -n "$PKG_CONFIG" && \
49680    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
49681  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
49682  ac_status=$?
49683  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49684  test $ac_status = 0; }; then
49685  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
49686else
49687  pkg_failed=yes
49688fi
49689 else
49690    pkg_failed=untried
49691fi
49692
49693
49694
49695if test $pkg_failed = yes; then
49696
49697if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49698        _pkg_short_errors_supported=yes
49699else
49700        _pkg_short_errors_supported=no
49701fi
49702        if test $_pkg_short_errors_supported = yes; then
49703	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
49704        else
49705	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
49706        fi
49707	# Put the nasty error message in config.log where it belongs
49708	echo "$LIBFFI_PKG_ERRORS" >&5
49709
49710	as_fn_error $? "Package requirements (libffi) were not met:
49711
49712$LIBFFI_PKG_ERRORS
49713
49714Consider adjusting the PKG_CONFIG_PATH environment variable if you
49715installed software in a non-standard prefix.
49716
49717Alternatively, you may set the environment variables LIBFFI_CFLAGS
49718and LIBFFI_LIBS to avoid the need to call pkg-config.
49719See the pkg-config man page for more details.
49720" "$LINENO" 5
49721elif test $pkg_failed = untried; then
49722	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
49723$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
49724as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
49725is in your PATH or set the PKG_CONFIG environment variable to the full
49726path to pkg-config.
49727
49728Alternatively, you may set the environment variables LIBFFI_CFLAGS
49729and LIBFFI_LIBS to avoid the need to call pkg-config.
49730See the pkg-config man page for more details.
49731
49732To get pkg-config, see <http://pkg-config.freedesktop.org/>.
49733See \`config.log' for more details" "$LINENO" 5; }
49734else
49735	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
49736	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
49737        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49738$as_echo "yes" >&6; }
49739	:
49740fi
49741
49742  fi
49743
49744  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49745    # Extract the first word of "llvm-config", so it can be a program name with args.
49746set dummy llvm-config; ac_word=$2
49747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
49748$as_echo_n "checking for $ac_word... " >&6; }
49749if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
49750  $as_echo_n "(cached) " >&6
49751else
49752  if test -n "$LLVM_CONFIG"; then
49753  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
49754else
49755as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49756for as_dir in $PATH
49757do
49758  IFS=$as_save_IFS
49759  test -z "$as_dir" && as_dir=.
49760    for ac_exec_ext in '' $ac_executable_extensions; do
49761  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
49762    ac_cv_prog_LLVM_CONFIG="llvm-config"
49763    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
49764    break 2
49765  fi
49766done
49767  done
49768IFS=$as_save_IFS
49769
49770fi
49771fi
49772LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
49773if test -n "$LLVM_CONFIG"; then
49774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
49775$as_echo "$LLVM_CONFIG" >&6; }
49776else
49777  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49778$as_echo "no" >&6; }
49779fi
49780
49781
49782
49783    if test "x$LLVM_CONFIG" != xllvm-config; then
49784      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
49785    fi
49786
49787    llvm_components="jit mcjit engine nativecodegen native"
49788    unset LLVM_CFLAGS
49789    for flag in $("$LLVM_CONFIG" --cxxflags); do
49790      if echo "${flag}" | grep -q '^-[ID]'; then
49791        if test "${flag}" != "-D_DEBUG" ; then
49792          if test "${LLVM_CFLAGS}" != "" ; then
49793            LLVM_CFLAGS="${LLVM_CFLAGS} "
49794          fi
49795          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
49796        fi
49797      fi
49798    done
49799    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
49800    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
49801
49802    unset LLVM_LDFLAGS
49803    for flag in $("${LLVM_CONFIG}" --ldflags); do
49804      if echo "${flag}" | grep -q '^-L'; then
49805        if test "${LLVM_LDFLAGS}" != ""; then
49806          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
49807        fi
49808        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
49809      fi
49810    done
49811
49812    unset LLVM_LIBS
49813    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
49814      if echo "${flag}" | grep -q '^-l'; then
49815        if test "${LLVM_LIBS}" != ""; then
49816          LLVM_LIBS="${LLVM_LIBS} "
49817        fi
49818        LLVM_LIBS="${LLVM_LIBS}${flag}"
49819      fi
49820    done
49821
49822
49823
49824
49825  fi
49826
49827  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
49828  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
49829    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
49830  fi
49831
49832  # TODO better (platform agnostic) test
49833  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
49834    LIBCXX="-lstdc++"
49835  fi
49836
49837
49838
49839
49840  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
49841
49842
49843# Check whether --with-msvcr-dll was given.
49844if test "${with_msvcr_dll+set}" = set; then :
49845  withval=$with_msvcr_dll;
49846fi
49847
49848
49849  if test "x$with_msvcr_dll" != x; then
49850    # If given explicitely by user, do not probe. If not present, fail directly.
49851
49852  POSSIBLE_MSVCR_DLL="$with_msvcr_dll"
49853  METHOD="--with-msvcr-dll"
49854  if test -e "$POSSIBLE_MSVCR_DLL"; then
49855    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
49856$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
49857
49858    # Need to check if the found msvcr is correct architecture
49859    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
49860$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
49861    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
49862    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49863      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49864      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49865      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49866        CORRECT_MSVCR_ARCH="PE32 executable"
49867      else
49868        CORRECT_MSVCR_ARCH="PE32+ executable"
49869      fi
49870    else
49871      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49872        CORRECT_MSVCR_ARCH=386
49873      else
49874        CORRECT_MSVCR_ARCH=x86-64
49875      fi
49876    fi
49877    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49878      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49879$as_echo "ok" >&6; }
49880      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49881      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
49882$as_echo_n "checking for msvcr100.dll... " >&6; }
49883      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
49884$as_echo "$MSVCR_DLL" >&6; }
49885    else
49886      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49887$as_echo "incorrect, ignoring" >&6; }
49888      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
49889$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
49890    fi
49891  fi
49892
49893    if test "x$MSVCR_DLL" = x; then
49894      as_fn_error $? "Could not find a proper msvcr100.dll as specified by --with-msvcr-dll" "$LINENO" 5
49895    fi
49896  fi
49897
49898  if test "x$MSVCR_DLL" = x; then
49899    # Probe: Using well-known location from Visual Studio 10.0
49900    if test "x$VCINSTALLDIR" != x; then
49901      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
49902
49903  windows_path="$CYGWIN_VC_INSTALL_DIR"
49904  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49905    unix_path=`$CYGPATH -u "$windows_path"`
49906    CYGWIN_VC_INSTALL_DIR="$unix_path"
49907  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49908    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49909    CYGWIN_VC_INSTALL_DIR="$unix_path"
49910  fi
49911
49912      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49913        POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC100.CRT/msvcr100.dll"
49914      else
49915        POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC100.CRT/msvcr100.dll"
49916      fi
49917
49918  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49919  METHOD="well-known location in VCINSTALLDIR"
49920  if test -e "$POSSIBLE_MSVCR_DLL"; then
49921    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
49922$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
49923
49924    # Need to check if the found msvcr is correct architecture
49925    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
49926$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
49927    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
49928    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49929      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49930      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49931      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49932        CORRECT_MSVCR_ARCH="PE32 executable"
49933      else
49934        CORRECT_MSVCR_ARCH="PE32+ executable"
49935      fi
49936    else
49937      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49938        CORRECT_MSVCR_ARCH=386
49939      else
49940        CORRECT_MSVCR_ARCH=x86-64
49941      fi
49942    fi
49943    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49944      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49945$as_echo "ok" >&6; }
49946      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49947      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
49948$as_echo_n "checking for msvcr100.dll... " >&6; }
49949      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
49950$as_echo "$MSVCR_DLL" >&6; }
49951    else
49952      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49953$as_echo "incorrect, ignoring" >&6; }
49954      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
49955$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
49956    fi
49957  fi
49958
49959    fi
49960  fi
49961
49962  if test "x$MSVCR_DLL" = x; then
49963    # Probe: Check in the Boot JDK directory.
49964    POSSIBLE_MSVCR_DLL="$BOOT_JDK/bin/msvcr100.dll"
49965
49966  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49967  METHOD="well-known location in Boot JDK"
49968  if test -e "$POSSIBLE_MSVCR_DLL"; then
49969    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
49970$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
49971
49972    # Need to check if the found msvcr is correct architecture
49973    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
49974$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
49975    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
49976    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49977      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49978      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49979      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49980        CORRECT_MSVCR_ARCH="PE32 executable"
49981      else
49982        CORRECT_MSVCR_ARCH="PE32+ executable"
49983      fi
49984    else
49985      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49986        CORRECT_MSVCR_ARCH=386
49987      else
49988        CORRECT_MSVCR_ARCH=x86-64
49989      fi
49990    fi
49991    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49992      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49993$as_echo "ok" >&6; }
49994      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49995      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
49996$as_echo_n "checking for msvcr100.dll... " >&6; }
49997      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
49998$as_echo "$MSVCR_DLL" >&6; }
49999    else
50000      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50001$as_echo "incorrect, ignoring" >&6; }
50002      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
50003$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
50004    fi
50005  fi
50006
50007  fi
50008
50009  if test "x$MSVCR_DLL" = x; then
50010    # Probe: Look in the Windows system32 directory
50011    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
50012
50013  windows_path="$CYGWIN_SYSTEMROOT"
50014  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50015    unix_path=`$CYGPATH -u "$windows_path"`
50016    CYGWIN_SYSTEMROOT="$unix_path"
50017  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50018    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50019    CYGWIN_SYSTEMROOT="$unix_path"
50020  fi
50021
50022    POSSIBLE_MSVCR_DLL="$CYGWIN_SYSTEMROOT/system32/msvcr100.dll"
50023
50024  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
50025  METHOD="well-known location in SYSTEMROOT"
50026  if test -e "$POSSIBLE_MSVCR_DLL"; then
50027    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
50028$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
50029
50030    # Need to check if the found msvcr is correct architecture
50031    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
50032$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
50033    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
50034    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50035      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50036      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50037      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50038        CORRECT_MSVCR_ARCH="PE32 executable"
50039      else
50040        CORRECT_MSVCR_ARCH="PE32+ executable"
50041      fi
50042    else
50043      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50044        CORRECT_MSVCR_ARCH=386
50045      else
50046        CORRECT_MSVCR_ARCH=x86-64
50047      fi
50048    fi
50049    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50050      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50051$as_echo "ok" >&6; }
50052      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
50053      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
50054$as_echo_n "checking for msvcr100.dll... " >&6; }
50055      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
50056$as_echo "$MSVCR_DLL" >&6; }
50057    else
50058      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50059$as_echo "incorrect, ignoring" >&6; }
50060      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
50061$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
50062    fi
50063  fi
50064
50065  fi
50066
50067  if test "x$MSVCR_DLL" = x; then
50068    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
50069    if test "x$VS100COMNTOOLS" != x; then
50070      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
50071
50072  windows_path="$CYGWIN_VS_TOOLS_DIR"
50073  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50074    unix_path=`$CYGPATH -u "$windows_path"`
50075    CYGWIN_VS_TOOLS_DIR="$unix_path"
50076  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50077    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50078    CYGWIN_VS_TOOLS_DIR="$unix_path"
50079  fi
50080
50081      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50082        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x64/ | $HEAD --lines 1`
50083      else
50084        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x86/ | $HEAD --lines 1`
50085      fi
50086
50087  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
50088  METHOD="search of VS100COMNTOOLS"
50089  if test -e "$POSSIBLE_MSVCR_DLL"; then
50090    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
50091$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
50092
50093    # Need to check if the found msvcr is correct architecture
50094    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
50095$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
50096    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
50097    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50098      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50099      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50100      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50101        CORRECT_MSVCR_ARCH="PE32 executable"
50102      else
50103        CORRECT_MSVCR_ARCH="PE32+ executable"
50104      fi
50105    else
50106      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50107        CORRECT_MSVCR_ARCH=386
50108      else
50109        CORRECT_MSVCR_ARCH=x86-64
50110      fi
50111    fi
50112    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50113      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50114$as_echo "ok" >&6; }
50115      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
50116      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
50117$as_echo_n "checking for msvcr100.dll... " >&6; }
50118      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
50119$as_echo "$MSVCR_DLL" >&6; }
50120    else
50121      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50122$as_echo "incorrect, ignoring" >&6; }
50123      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
50124$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
50125    fi
50126  fi
50127
50128    fi
50129  fi
50130
50131  if test "x$MSVCR_DLL" = x; then
50132    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
50133    # (This was the original behaviour; kept since it might turn up something)
50134    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
50135      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50136        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x64 | $HEAD --lines 1`
50137      else
50138        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
50139        if test "x$POSSIBLE_MSVCR_DLL" = x; then
50140          # We're grasping at straws now...
50141          POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $HEAD --lines 1`
50142        fi
50143      fi
50144
50145
50146  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
50147  METHOD="search of VCINSTALLDIR"
50148  if test -e "$POSSIBLE_MSVCR_DLL"; then
50149    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
50150$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
50151
50152    # Need to check if the found msvcr is correct architecture
50153    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
50154$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
50155    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
50156    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50157      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50158      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50159      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50160        CORRECT_MSVCR_ARCH="PE32 executable"
50161      else
50162        CORRECT_MSVCR_ARCH="PE32+ executable"
50163      fi
50164    else
50165      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50166        CORRECT_MSVCR_ARCH=386
50167      else
50168        CORRECT_MSVCR_ARCH=x86-64
50169      fi
50170    fi
50171    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50172      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50173$as_echo "ok" >&6; }
50174      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
50175      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
50176$as_echo_n "checking for msvcr100.dll... " >&6; }
50177      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
50178$as_echo "$MSVCR_DLL" >&6; }
50179    else
50180      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50181$as_echo "incorrect, ignoring" >&6; }
50182      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
50183$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
50184    fi
50185  fi
50186
50187    fi
50188  fi
50189
50190  if test "x$MSVCR_DLL" = x; then
50191    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
50192$as_echo_n "checking for msvcr100.dll... " >&6; }
50193    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50194$as_echo "no" >&6; }
50195    as_fn_error $? "Could not find msvcr100.dll. Please specify using --with-msvcr-dll." "$LINENO" 5
50196  fi
50197
50198
50199  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50200
50201  # Input might be given as Windows format, start by converting to
50202  # unix format.
50203  path="$MSVCR_DLL"
50204  new_path=`$CYGPATH -u "$path"`
50205
50206  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50207  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50208  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50209  # "foo.exe" is OK but "foo" is an error.
50210  #
50211  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50212  # It is also a way to make sure we got the proper file name for the real test later on.
50213  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50214  if test "x$test_shortpath" = x; then
50215    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
50216$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
50217    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
50218  fi
50219
50220  # Call helper function which possibly converts this using DOS-style short mode.
50221  # If so, the updated path is stored in $new_path.
50222
50223  input_path="$new_path"
50224  # Check if we need to convert this using DOS-style short mode. If the path
50225  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50226  # take no chances and rewrite it.
50227  # Note: m4 eats our [], so we need to use [ and ] instead.
50228  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50229  if test "x$has_forbidden_chars" != x; then
50230    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50231    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50232    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50233    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50234      # Going to short mode and back again did indeed matter. Since short mode is
50235      # case insensitive, let's make it lowercase to improve readability.
50236      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50237      # Now convert it back to Unix-stile (cygpath)
50238      input_path=`$CYGPATH -u "$shortmode_path"`
50239      new_path="$input_path"
50240    fi
50241  fi
50242
50243  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50244  if test "x$test_cygdrive_prefix" = x; then
50245    # As a simple fix, exclude /usr/bin since it's not a real path.
50246    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50247      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50248      # a path prefixed by /cygdrive for fixpath to work.
50249      new_path="$CYGWIN_ROOT_PATH$input_path"
50250    fi
50251  fi
50252
50253
50254  if test "x$path" != "x$new_path"; then
50255    MSVCR_DLL="$new_path"
50256    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
50257$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
50258  fi
50259
50260  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50261
50262  path="$MSVCR_DLL"
50263  has_colon=`$ECHO $path | $GREP ^.:`
50264  new_path="$path"
50265  if test "x$has_colon" = x; then
50266    # Not in mixed or Windows style, start by that.
50267    new_path=`cmd //c echo $path`
50268  fi
50269
50270
50271  input_path="$new_path"
50272  # Check if we need to convert this using DOS-style short mode. If the path
50273  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50274  # take no chances and rewrite it.
50275  # Note: m4 eats our [], so we need to use [ and ] instead.
50276  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50277  if test "x$has_forbidden_chars" != x; then
50278    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50279    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50280  fi
50281
50282
50283  windows_path="$new_path"
50284  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50285    unix_path=`$CYGPATH -u "$windows_path"`
50286    new_path="$unix_path"
50287  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50288    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50289    new_path="$unix_path"
50290  fi
50291
50292  if test "x$path" != "x$new_path"; then
50293    MSVCR_DLL="$new_path"
50294    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
50295$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
50296  fi
50297
50298  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50299  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50300
50301  else
50302    # We're on a unix platform. Hooray! :)
50303    path="$MSVCR_DLL"
50304    has_space=`$ECHO "$path" | $GREP " "`
50305    if test "x$has_space" != x; then
50306      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
50307$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
50308      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50309    fi
50310
50311    # Use eval to expand a potential ~
50312    eval path="$path"
50313    if test ! -f "$path" && test ! -d "$path"; then
50314      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50315    fi
50316
50317    MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
50318  fi
50319
50320
50321
50322
50323# Check whether --with-dxsdk was given.
50324if test "${with_dxsdk+set}" = set; then :
50325  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
50326$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
50327fi
50328
50329
50330
50331
50332# Check whether --with-dxsdk-lib was given.
50333if test "${with_dxsdk_lib+set}" = set; then :
50334  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
50335$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
50336fi
50337
50338
50339
50340
50341# Check whether --with-dxsdk-include was given.
50342if test "${with_dxsdk_include+set}" = set; then :
50343  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
50344$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
50345fi
50346
50347
50348  fi
50349
50350
50351
50352###############################################################################
50353#
50354# We need to do some final tweaking, when everything else is done.
50355#
50356###############################################################################
50357
50358
50359  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
50360
50361
50362  # The name of the Service Agent jar.
50363  SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
50364  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
50365    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
50366  fi
50367
50368
50369
50370    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
50371$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
50372
50373    if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
50374      ENABLE_INTREE_EC=yes
50375      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50376$as_echo "yes" >&6; }
50377    else
50378      ENABLE_INTREE_EC=no
50379      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50380$as_echo "no" >&6; }
50381    fi
50382
50383
50384
50385
50386###############################################################################
50387#
50388# Configure parts of the build that only affect the build performance,
50389# not the result.
50390#
50391###############################################################################
50392
50393
50394  # How many cores do we have on this build system?
50395
50396# Check whether --with-num-cores was given.
50397if test "${with_num_cores+set}" = set; then :
50398  withval=$with_num_cores;
50399fi
50400
50401  if test "x$with_num_cores" = x; then
50402    # The number of cores were not specified, try to probe them.
50403
50404  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
50405$as_echo_n "checking for number of cores... " >&6; }
50406  NUM_CORES=1
50407  FOUND_CORES=no
50408
50409  if test -f /proc/cpuinfo; then
50410    # Looks like a Linux (or cygwin) system
50411    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
50412    FOUND_CORES=yes
50413  elif test -x /usr/sbin/psrinfo; then
50414    # Looks like a Solaris system
50415    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
50416    FOUND_CORES=yes
50417  elif test -x /usr/sbin/system_profiler; then
50418    # Looks like a MacOSX system
50419    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
50420    FOUND_CORES=yes
50421  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
50422    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
50423    FOUND_CORES=yes
50424  elif test -n "$NUMBER_OF_PROCESSORS"; then
50425    # On windows, look in the env
50426    NUM_CORES=$NUMBER_OF_PROCESSORS
50427    FOUND_CORES=yes
50428  fi
50429
50430  if test "x$FOUND_CORES" = xyes; then
50431    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
50432$as_echo "$NUM_CORES" >&6; }
50433  else
50434    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
50435$as_echo "could not detect number of cores, defaulting to 1" >&6; }
50436    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
50437$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
50438  fi
50439
50440  else
50441    NUM_CORES=$with_num_cores
50442  fi
50443
50444
50445
50446  # How much memory do we have on this build system?
50447
50448# Check whether --with-memory-size was given.
50449if test "${with_memory_size+set}" = set; then :
50450  withval=$with_memory_size;
50451fi
50452
50453  if test "x$with_memory_size" = x; then
50454    # The memory size was not specified, try to probe it.
50455
50456  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
50457$as_echo_n "checking for memory size... " >&6; }
50458  # Default to 1024 MB
50459  MEMORY_SIZE=1024
50460  FOUND_MEM=no
50461
50462  if test -f /proc/meminfo; then
50463    # Looks like a Linux (or cygwin) system
50464    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
50465    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
50466    FOUND_MEM=yes
50467  elif test -x /usr/sbin/prtconf; then
50468    # Looks like a Solaris or AIX system
50469    MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
50470    FOUND_MEM=yes
50471  elif test -x /usr/sbin/system_profiler; then
50472    # Looks like a MacOSX system
50473    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
50474    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
50475    FOUND_MEM=yes
50476  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
50477    # Windows, but without cygwin
50478    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
50479    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
50480    FOUND_MEM=yes
50481  fi
50482
50483  if test "x$FOUND_MEM" = xyes; then
50484    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
50485$as_echo "$MEMORY_SIZE MB" >&6; }
50486  else
50487    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
50488$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
50489    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
50490$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
50491  fi
50492
50493  else
50494    MEMORY_SIZE=$with_memory_size
50495  fi
50496
50497
50498
50499  # Provide a decent default number of parallel jobs for make depending on
50500  # number of cores, amount of memory and machine architecture.
50501
50502# Check whether --with-jobs was given.
50503if test "${with_jobs+set}" = set; then :
50504  withval=$with_jobs;
50505fi
50506
50507  if test "x$with_jobs" = x; then
50508    # Number of jobs was not specified, calculate.
50509    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
50510$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
50511    # Approximate memory in GB.
50512    memory_gb=`expr $MEMORY_SIZE / 1024`
50513    # Pick the lowest of memory in gb and number of cores.
50514    if test "$memory_gb" -lt "$NUM_CORES"; then
50515      JOBS="$memory_gb"
50516    else
50517      JOBS="$NUM_CORES"
50518      # On bigger machines, leave some room for other processes to run
50519      if test "$JOBS" -gt "4"; then
50520        JOBS=`expr $JOBS '*' 90 / 100`
50521      fi
50522    fi
50523    # Cap number of jobs to 16
50524    if test "$JOBS" -gt "16"; then
50525      JOBS=16
50526    fi
50527    if test "$JOBS" -eq "0"; then
50528      JOBS=1
50529    fi
50530    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
50531$as_echo "$JOBS" >&6; }
50532  else
50533    JOBS=$with_jobs
50534  fi
50535
50536
50537
50538# Setup arguments for the boot jdk (after cores and memory have been setup)
50539
50540  ##############################################################################
50541  #
50542  # Specify jvm options for anything that is run with the Boot JDK.
50543  # Not all JVM:s accept the same arguments on the command line.
50544  #
50545
50546# Check whether --with-boot-jdk-jvmargs was given.
50547if test "${with_boot_jdk_jvmargs+set}" = set; then :
50548  withval=$with_boot_jdk_jvmargs;
50549fi
50550
50551
50552  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
50553$as_echo_n "checking flags for boot jdk java command ... " >&6; }
50554
50555  # Disable special log output when a debug build is used as Boot JDK...
50556
50557  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
50558  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
50559  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
50560  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50561  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50562  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50563    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
50564    JVM_ARG_OK=true
50565  else
50566    $ECHO "Arg failed:" >&5
50567    $ECHO "$OUTPUT" >&5
50568    JVM_ARG_OK=false
50569  fi
50570
50571
50572  # Apply user provided options.
50573
50574  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
50575  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
50576  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -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="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
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  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
50590$as_echo "$boot_jdk_jvmargs" >&6; }
50591
50592  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
50593  JAVA_FLAGS=$boot_jdk_jvmargs
50594
50595
50596
50597  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
50598$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
50599
50600  # Starting amount of heap memory.
50601
50602  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
50603  $ECHO "Command: $JAVA -Xms64M -version" >&5
50604  OUTPUT=`$JAVA -Xms64M -version 2>&1`
50605  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50606  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50607  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50608    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
50609    JVM_ARG_OK=true
50610  else
50611    $ECHO "Arg failed:" >&5
50612    $ECHO "$OUTPUT" >&5
50613    JVM_ARG_OK=false
50614  fi
50615
50616
50617  # Maximum amount of heap memory.
50618  # Maximum stack size.
50619  JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
50620  if test "x$BUILD_NUM_BITS" = x32; then
50621    if test "$JVM_MAX_HEAP" -gt "1100"; then
50622      JVM_MAX_HEAP=1100
50623    elif test "$JVM_MAX_HEAP" -lt "512"; then
50624      JVM_MAX_HEAP=512
50625    fi
50626    STACK_SIZE=768
50627  else
50628    # Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit
50629    # pointers are used. Apparently, we need to increase the heap and stack
50630    # space for the jvm. More specifically, when running javac to build huge
50631    # jdk batch
50632    if test "$JVM_MAX_HEAP" -gt "1600"; then
50633      JVM_MAX_HEAP=1600
50634    elif test "$JVM_MAX_HEAP" -lt "512"; then
50635      JVM_MAX_HEAP=512
50636    fi
50637    STACK_SIZE=1536
50638  fi
50639
50640  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
50641  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
50642  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
50643  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50644  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50645  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50646    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
50647    JVM_ARG_OK=true
50648  else
50649    $ECHO "Arg failed:" >&5
50650    $ECHO "$OUTPUT" >&5
50651    JVM_ARG_OK=false
50652  fi
50653
50654
50655  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
50656  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
50657  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
50658  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50659  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50660  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50661    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
50662    JVM_ARG_OK=true
50663  else
50664    $ECHO "Arg failed:" >&5
50665    $ECHO "$OUTPUT" >&5
50666    JVM_ARG_OK=false
50667  fi
50668
50669
50670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
50671$as_echo "$boot_jdk_jvmargs_big" >&6; }
50672
50673  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
50674
50675
50676
50677  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
50678$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
50679
50680  # Use serial gc for small short lived tools if possible
50681
50682  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
50683  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
50684  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
50685  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50686  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50687  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50688    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
50689    JVM_ARG_OK=true
50690  else
50691    $ECHO "Arg failed:" >&5
50692    $ECHO "$OUTPUT" >&5
50693    JVM_ARG_OK=false
50694  fi
50695
50696
50697  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
50698  $ECHO "Command: $JAVA -Xms32M -version" >&5
50699  OUTPUT=`$JAVA -Xms32M -version 2>&1`
50700  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50701  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50702  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50703    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
50704    JVM_ARG_OK=true
50705  else
50706    $ECHO "Arg failed:" >&5
50707    $ECHO "$OUTPUT" >&5
50708    JVM_ARG_OK=false
50709  fi
50710
50711
50712  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
50713  $ECHO "Command: $JAVA -Xmx512M -version" >&5
50714  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
50715  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50716  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50717  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50718    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
50719    JVM_ARG_OK=true
50720  else
50721    $ECHO "Arg failed:" >&5
50722    $ECHO "$OUTPUT" >&5
50723    JVM_ARG_OK=false
50724  fi
50725
50726
50727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
50728$as_echo "$boot_jdk_jvmargs_small" >&6; }
50729
50730  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
50731
50732
50733  JAVA_TOOL_FLAGS_SMALL=""
50734  for f in $JAVA_FLAGS_SMALL; do
50735    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
50736  done
50737
50738
50739
50740# Setup smart javac (after cores and memory have been setup)
50741
50742
50743# Check whether --with-sjavac-server-java was given.
50744if test "${with_sjavac_server_java+set}" = set; then :
50745  withval=$with_sjavac_server_java;
50746fi
50747
50748
50749  if test "x$with_sjavac_server_java" != x; then
50750    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
50751    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
50752    if test "x$FOUND_VERSION" = x; then
50753      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
50754    fi
50755  else
50756    SJAVAC_SERVER_JAVA="$JAVA"
50757  fi
50758
50759
50760  if test "$MEMORY_SIZE" -gt "3000"; then
50761
50762  $ECHO "Check if jvm arg is ok: -d64" >&5
50763  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
50764  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
50765  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50766  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50767  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50768    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
50769    JVM_ARG_OK=true
50770  else
50771    $ECHO "Arg failed:" >&5
50772    $ECHO "$OUTPUT" >&5
50773    JVM_ARG_OK=false
50774  fi
50775
50776    if test "$JVM_ARG_OK" = true; then
50777      JVM_64BIT=true
50778      JVM_ARG_OK=false
50779    fi
50780  fi
50781
50782  MX_VALUE=`expr $MEMORY_SIZE / 2`
50783  if test "$JVM_64BIT" = true; then
50784    # Set ms lower than mx since more than one instance of the server might
50785    # get launched at the same time before they figure out which instance won.
50786    MS_VALUE=512
50787    if test "$MX_VALUE" -gt "2048"; then
50788      MX_VALUE=2048
50789    fi
50790  else
50791    MS_VALUE=256
50792    if test "$MX_VALUE" -gt "1500"; then
50793      MX_VALUE=1500
50794    fi
50795  fi
50796  if test "$MX_VALUE" -lt "512"; then
50797    MX_VALUE=512
50798  fi
50799
50800  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
50801  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
50802  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
50803  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50804  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50805  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50806    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
50807    JVM_ARG_OK=true
50808  else
50809    $ECHO "Arg failed:" >&5
50810    $ECHO "$OUTPUT" >&5
50811    JVM_ARG_OK=false
50812  fi
50813
50814
50815
50816  # Check whether --enable-sjavac was given.
50817if test "${enable_sjavac+set}" = set; then :
50818  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
50819else
50820  ENABLE_SJAVAC='no'
50821fi
50822
50823  if test "x$JVM_ARG_OK" = "xfalse"; then
50824    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
50825$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
50826    ENABLE_SJAVAC=no;
50827  fi
50828  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
50829$as_echo_n "checking whether to use sjavac... " >&6; }
50830  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
50831$as_echo "$ENABLE_SJAVAC" >&6; }
50832
50833
50834  if test "x$ENABLE_SJAVAC" = xyes; then
50835    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
50836  else
50837    SJAVAC_SERVER_DIR=
50838  fi
50839
50840
50841
50842# Can the C/C++ compiler use precompiled headers?
50843
50844
50845  ###############################################################################
50846  #
50847  # Can the C/C++ compiler use precompiled headers?
50848  #
50849  # Check whether --enable-precompiled-headers was given.
50850if test "${enable_precompiled_headers+set}" = set; then :
50851  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
50852else
50853  ENABLE_PRECOMPH=yes
50854fi
50855
50856
50857  USE_PRECOMPILED_HEADER=1
50858  if test "x$ENABLE_PRECOMPH" = xno; then
50859    USE_PRECOMPILED_HEADER=0
50860  fi
50861
50862  if test "x$ENABLE_PRECOMPH" = xyes; then
50863    # Check that the compiler actually supports precomp headers.
50864    if test "x$TOOLCHAIN_TYPE" = xgcc; then
50865      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
50866$as_echo_n "checking that precompiled headers work... " >&6; }
50867      echo "int alfa();" > conftest.h
50868      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
50869      if test ! -f conftest.hpp.gch; then
50870        USE_PRECOMPILED_HEADER=0
50871        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50872$as_echo "no" >&6; }
50873      else
50874        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50875$as_echo "yes" >&6; }
50876      fi
50877      rm -f conftest.h conftest.hpp.gch
50878    fi
50879  fi
50880
50881
50882
50883
50884# Setup use of ccache, if available
50885
50886  # Check whether --enable-ccache was given.
50887if test "${enable_ccache+set}" = set; then :
50888  enableval=$enable_ccache;
50889fi
50890
50891
50892  CCACHE=
50893  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
50894$as_echo_n "checking is ccache enabled... " >&6; }
50895  ENABLE_CCACHE=$enable_ccache
50896  if test "x$enable_ccache" = xyes; then
50897    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50898$as_echo "yes" >&6; }
50899    OLD_PATH="$PATH"
50900    if test "x$TOOLCHAIN_PATH" != x; then
50901      PATH=$TOOLCHAIN_PATH:$PATH
50902    fi
50903
50904
50905
50906  # Publish this variable in the help.
50907
50908
50909  if test "x$CCACHE" = x; then
50910    # The variable is not set by user, try to locate tool using the code snippet
50911    for ac_prog in ccache
50912do
50913  # Extract the first word of "$ac_prog", so it can be a program name with args.
50914set dummy $ac_prog; ac_word=$2
50915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
50916$as_echo_n "checking for $ac_word... " >&6; }
50917if ${ac_cv_path_CCACHE+:} false; then :
50918  $as_echo_n "(cached) " >&6
50919else
50920  case $CCACHE in
50921  [\\/]* | ?:[\\/]*)
50922  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
50923  ;;
50924  *)
50925  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
50926for as_dir in $PATH
50927do
50928  IFS=$as_save_IFS
50929  test -z "$as_dir" && as_dir=.
50930    for ac_exec_ext in '' $ac_executable_extensions; do
50931  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
50932    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
50933    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
50934    break 2
50935  fi
50936done
50937  done
50938IFS=$as_save_IFS
50939
50940  ;;
50941esac
50942fi
50943CCACHE=$ac_cv_path_CCACHE
50944if test -n "$CCACHE"; then
50945  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
50946$as_echo "$CCACHE" >&6; }
50947else
50948  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50949$as_echo "no" >&6; }
50950fi
50951
50952
50953  test -n "$CCACHE" && break
50954done
50955
50956  else
50957    # The variable is set, but is it from the command line or the environment?
50958
50959    # Try to remove the string !CCACHE! from our list.
50960    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
50961    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
50962      # If it failed, the variable was not from the command line. Ignore it,
50963      # but warn the user (except for BASH, which is always set by the calling BASH).
50964      if test "xCCACHE" != xBASH; then
50965        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
50966$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
50967      fi
50968      # Try to locate tool using the code snippet
50969      for ac_prog in ccache
50970do
50971  # Extract the first word of "$ac_prog", so it can be a program name with args.
50972set dummy $ac_prog; ac_word=$2
50973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
50974$as_echo_n "checking for $ac_word... " >&6; }
50975if ${ac_cv_path_CCACHE+:} false; then :
50976  $as_echo_n "(cached) " >&6
50977else
50978  case $CCACHE in
50979  [\\/]* | ?:[\\/]*)
50980  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
50981  ;;
50982  *)
50983  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
50984for as_dir in $PATH
50985do
50986  IFS=$as_save_IFS
50987  test -z "$as_dir" && as_dir=.
50988    for ac_exec_ext in '' $ac_executable_extensions; do
50989  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
50990    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
50991    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
50992    break 2
50993  fi
50994done
50995  done
50996IFS=$as_save_IFS
50997
50998  ;;
50999esac
51000fi
51001CCACHE=$ac_cv_path_CCACHE
51002if test -n "$CCACHE"; then
51003  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
51004$as_echo "$CCACHE" >&6; }
51005else
51006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51007$as_echo "no" >&6; }
51008fi
51009
51010
51011  test -n "$CCACHE" && break
51012done
51013
51014    else
51015      # If it succeeded, then it was overridden by the user. We will use it
51016      # for the tool.
51017
51018      # First remove it from the list of overridden variables, so we can test
51019      # for unknown variables in the end.
51020      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
51021
51022      # Check if the provided tool contains a complete path.
51023      tool_specified="$CCACHE"
51024      tool_basename="${tool_specified##*/}"
51025      if test "x$tool_basename" = "x$tool_specified"; then
51026        # A command without a complete path is provided, search $PATH.
51027        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
51028$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
51029        # Extract the first word of "$tool_basename", so it can be a program name with args.
51030set dummy $tool_basename; ac_word=$2
51031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
51032$as_echo_n "checking for $ac_word... " >&6; }
51033if ${ac_cv_path_CCACHE+:} false; then :
51034  $as_echo_n "(cached) " >&6
51035else
51036  case $CCACHE in
51037  [\\/]* | ?:[\\/]*)
51038  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
51039  ;;
51040  *)
51041  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
51042for as_dir in $PATH
51043do
51044  IFS=$as_save_IFS
51045  test -z "$as_dir" && as_dir=.
51046    for ac_exec_ext in '' $ac_executable_extensions; do
51047  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
51048    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
51049    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
51050    break 2
51051  fi
51052done
51053  done
51054IFS=$as_save_IFS
51055
51056  ;;
51057esac
51058fi
51059CCACHE=$ac_cv_path_CCACHE
51060if test -n "$CCACHE"; then
51061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
51062$as_echo "$CCACHE" >&6; }
51063else
51064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51065$as_echo "no" >&6; }
51066fi
51067
51068
51069        if test "x$CCACHE" = x; then
51070          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
51071        fi
51072      else
51073        # Otherwise we believe it is a complete path. Use it as it is.
51074        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
51075$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
51076        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
51077$as_echo_n "checking for CCACHE... " >&6; }
51078        if test ! -x "$tool_specified"; then
51079          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
51080$as_echo "not found" >&6; }
51081          as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
51082        fi
51083        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
51084$as_echo "$tool_specified" >&6; }
51085      fi
51086    fi
51087  fi
51088
51089
51090
51091  if test "x$CCACHE" = x; then
51092    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
51093  fi
51094
51095
51096    CCACHE_STATUS="enabled"
51097    PATH="$OLD_PATH"
51098  elif test "x$enable_ccache" = xno; then
51099    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
51100$as_echo "no, explicitly disabled" >&6; }
51101  elif test "x$enable_ccache" = x; then
51102    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51103$as_echo "no" >&6; }
51104  else
51105    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
51106$as_echo "unknown" >&6; }
51107    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
51108  fi
51109
51110
51111
51112# Check whether --with-ccache-dir was given.
51113if test "${with_ccache_dir+set}" = set; then :
51114  withval=$with_ccache_dir;
51115fi
51116
51117
51118  if test "x$with_ccache_dir" != x; then
51119    # When using a non home ccache directory, assume the use is to share ccache files
51120    # with other users. Thus change the umask.
51121    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
51122    if test "x$CCACHE" = x; then
51123      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
51124$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
51125    fi
51126  fi
51127
51128  if test "x$CCACHE" != x; then
51129
51130  if test "x$CCACHE" != x; then
51131    # Only use ccache if it is 3.1.4 or later, which supports
51132    # precompiled headers.
51133    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
51134$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
51135    HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
51136    if test "x$HAS_GOOD_CCACHE" = x; then
51137      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
51138$as_echo "no, disabling ccache" >&6; }
51139      CCACHE=
51140      CCACHE_STATUS="disabled"
51141    else
51142      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
51143$as_echo "yes" >&6; }
51144      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
51145$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
51146      PUSHED_FLAGS="$CXXFLAGS"
51147      CXXFLAGS="-fpch-preprocess $CXXFLAGS"
51148      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51149/* end confdefs.h.  */
51150
51151int
51152main ()
51153{
51154
51155  ;
51156  return 0;
51157}
51158_ACEOF
51159if ac_fn_cxx_try_compile "$LINENO"; then :
51160  CC_KNOWS_CCACHE_TRICK=yes
51161else
51162  CC_KNOWS_CCACHE_TRICK=no
51163fi
51164rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51165      CXXFLAGS="$PUSHED_FLAGS"
51166      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
51167        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
51168$as_echo "yes" >&6; }
51169      else
51170        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
51171$as_echo "no, disabling ccaching of precompiled headers" >&6; }
51172        CCACHE=
51173        CCACHE_STATUS="disabled"
51174      fi
51175    fi
51176  fi
51177
51178  if test "x$CCACHE" != x; then
51179    CCACHE_SLOPPINESS=time_macros
51180    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
51181    CCACHE_FLAGS=-fpch-preprocess
51182
51183    if test "x$SET_CCACHE_DIR" != x; then
51184      mkdir -p $CCACHE_DIR > /dev/null 2>&1
51185      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
51186    fi
51187  fi
51188
51189  fi
51190
51191
51192###############################################################################
51193#
51194# And now the finish...
51195#
51196###############################################################################
51197
51198# Check for some common pitfalls
51199
51200  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51201    file_to_test="$SRC_ROOT/LICENSE"
51202    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
51203      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
51204    fi
51205  fi
51206
51207
51208  # Did user specify any unknown variables?
51209
51210  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
51211    # Replace the separating ! with spaces before presenting for end user.
51212    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
51213    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
51214$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
51215  fi
51216
51217
51218  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
51219$as_echo_n "checking if build directory is on local disk... " >&6; }
51220
51221  # df -l lists only local disks; if the given directory is not found then
51222  # a non-zero exit code is given
51223  if test "x$DF" = x; then
51224    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51225      # msys does not have df; use Windows "net use" instead.
51226      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
51227      if test "x$IS_NETWORK_DISK" = x; then
51228        OUTPUT_DIR_IS_LOCAL="yes"
51229      else
51230        OUTPUT_DIR_IS_LOCAL="no"
51231      fi
51232    else
51233      # No df here, say it's local
51234      OUTPUT_DIR_IS_LOCAL="yes"
51235    fi
51236  else
51237    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
51238      OUTPUT_DIR_IS_LOCAL="yes"
51239    else
51240      OUTPUT_DIR_IS_LOCAL="no"
51241    fi
51242  fi
51243
51244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
51245$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
51246
51247
51248
51249  # Check if the user has any old-style ALT_ variables set.
51250  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
51251
51252  # Before generating output files, test if they exist. If they do, this is a reconfigure.
51253  # Since we can't properly handle the dependencies for this, warn the user about the situation
51254  if test -e $OUTPUT_ROOT/spec.gmk; then
51255    IS_RECONFIGURE=yes
51256  else
51257    IS_RECONFIGURE=no
51258  fi
51259
51260
51261# At the end, call the custom hook. (Dummy macro if no custom sources available)
51262
51263
51264# We're messing a bit with internal autoconf variables to put the config.status
51265# in the output directory instead of the current directory.
51266CONFIG_STATUS="$OUTPUT_ROOT/config.status"
51267
51268# Create the actual output files. Now the main work of configure is done.
51269cat >confcache <<\_ACEOF
51270# This file is a shell script that caches the results of configure
51271# tests run on this system so they can be shared between configure
51272# scripts and configure runs, see configure's option --config-cache.
51273# It is not useful on other systems.  If it contains results you don't
51274# want to keep, you may remove or edit it.
51275#
51276# config.status only pays attention to the cache file if you give it
51277# the --recheck option to rerun configure.
51278#
51279# `ac_cv_env_foo' variables (set or unset) will be overridden when
51280# loading this file, other *unset* `ac_cv_foo' will be assigned the
51281# following values.
51282
51283_ACEOF
51284
51285# The following way of writing the cache mishandles newlines in values,
51286# but we know of no workaround that is simple, portable, and efficient.
51287# So, we kill variables containing newlines.
51288# Ultrix sh set writes to stderr and can't be redirected directly,
51289# and sets the high bit in the cache file unless we assign to the vars.
51290(
51291  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
51292    eval ac_val=\$$ac_var
51293    case $ac_val in #(
51294    *${as_nl}*)
51295      case $ac_var in #(
51296      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
51297$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
51298      esac
51299      case $ac_var in #(
51300      _ | IFS | as_nl) ;; #(
51301      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
51302      *) { eval $ac_var=; unset $ac_var;} ;;
51303      esac ;;
51304    esac
51305  done
51306
51307  (set) 2>&1 |
51308    case $as_nl`(ac_space=' '; set) 2>&1` in #(
51309    *${as_nl}ac_space=\ *)
51310      # `set' does not quote correctly, so add quotes: double-quote
51311      # substitution turns \\\\ into \\, and sed turns \\ into \.
51312      sed -n \
51313	"s/'/'\\\\''/g;
51314	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
51315      ;; #(
51316    *)
51317      # `set' quotes correctly as required by POSIX, so do not add quotes.
51318      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
51319      ;;
51320    esac |
51321    sort
51322) |
51323  sed '
51324     /^ac_cv_env_/b end
51325     t clear
51326     :clear
51327     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
51328     t end
51329     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
51330     :end' >>confcache
51331if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
51332  if test -w "$cache_file"; then
51333    if test "x$cache_file" != "x/dev/null"; then
51334      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
51335$as_echo "$as_me: updating cache $cache_file" >&6;}
51336      if test ! -f "$cache_file" || test -h "$cache_file"; then
51337	cat confcache >"$cache_file"
51338      else
51339        case $cache_file in #(
51340        */* | ?:*)
51341	  mv -f confcache "$cache_file"$$ &&
51342	  mv -f "$cache_file"$$ "$cache_file" ;; #(
51343        *)
51344	  mv -f confcache "$cache_file" ;;
51345	esac
51346      fi
51347    fi
51348  else
51349    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
51350$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
51351  fi
51352fi
51353rm -f confcache
51354
51355test "x$prefix" = xNONE && prefix=$ac_default_prefix
51356# Let make expand exec_prefix.
51357test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
51358
51359# Transform confdefs.h into DEFS.
51360# Protect against shell expansion while executing Makefile rules.
51361# Protect against Makefile macro expansion.
51362#
51363# If the first sed substitution is executed (which looks for macros that
51364# take arguments), then branch to the quote section.  Otherwise,
51365# look for a macro that doesn't take arguments.
51366ac_script='
51367:mline
51368/\\$/{
51369 N
51370 s,\\\n,,
51371 b mline
51372}
51373t clear
51374:clear
51375s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
51376t quote
51377s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
51378t quote
51379b any
51380:quote
51381s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
51382s/\[/\\&/g
51383s/\]/\\&/g
51384s/\$/$$/g
51385H
51386:any
51387${
51388	g
51389	s/^\n//
51390	s/\n/ /g
51391	p
51392}
51393'
51394DEFS=`sed -n "$ac_script" confdefs.h`
51395
51396
51397ac_libobjs=
51398ac_ltlibobjs=
51399U=
51400for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
51401  # 1. Remove the extension, and $U if already installed.
51402  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
51403  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
51404  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
51405  #    will be set to the directory where LIBOBJS objects are built.
51406  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
51407  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
51408done
51409LIBOBJS=$ac_libobjs
51410
51411LTLIBOBJS=$ac_ltlibobjs
51412
51413
51414
51415: "${CONFIG_STATUS=./config.status}"
51416ac_write_fail=0
51417ac_clean_files_save=$ac_clean_files
51418ac_clean_files="$ac_clean_files $CONFIG_STATUS"
51419{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
51420$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
51421as_write_fail=0
51422cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
51423#! $SHELL
51424# Generated by $as_me.
51425# Run this file to recreate the current configuration.
51426# Compiler output produced by configure, useful for debugging
51427# configure, is in config.log if it exists.
51428
51429debug=false
51430ac_cs_recheck=false
51431ac_cs_silent=false
51432
51433SHELL=\${CONFIG_SHELL-$SHELL}
51434export SHELL
51435_ASEOF
51436cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
51437## -------------------- ##
51438## M4sh Initialization. ##
51439## -------------------- ##
51440
51441# Be more Bourne compatible
51442DUALCASE=1; export DUALCASE # for MKS sh
51443if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
51444  emulate sh
51445  NULLCMD=:
51446  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
51447  # is contrary to our usage.  Disable this feature.
51448  alias -g '${1+"$@"}'='"$@"'
51449  setopt NO_GLOB_SUBST
51450else
51451  case `(set -o) 2>/dev/null` in #(
51452  *posix*) :
51453    set -o posix ;; #(
51454  *) :
51455     ;;
51456esac
51457fi
51458
51459
51460as_nl='
51461'
51462export as_nl
51463# Printing a long string crashes Solaris 7 /usr/bin/printf.
51464as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
51465as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
51466as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
51467# Prefer a ksh shell builtin over an external printf program on Solaris,
51468# but without wasting forks for bash or zsh.
51469if test -z "$BASH_VERSION$ZSH_VERSION" \
51470    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
51471  as_echo='print -r --'
51472  as_echo_n='print -rn --'
51473elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
51474  as_echo='printf %s\n'
51475  as_echo_n='printf %s'
51476else
51477  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
51478    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
51479    as_echo_n='/usr/ucb/echo -n'
51480  else
51481    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
51482    as_echo_n_body='eval
51483      arg=$1;
51484      case $arg in #(
51485      *"$as_nl"*)
51486	expr "X$arg" : "X\\(.*\\)$as_nl";
51487	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
51488      esac;
51489      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
51490    '
51491    export as_echo_n_body
51492    as_echo_n='sh -c $as_echo_n_body as_echo'
51493  fi
51494  export as_echo_body
51495  as_echo='sh -c $as_echo_body as_echo'
51496fi
51497
51498# The user is always right.
51499if test "${PATH_SEPARATOR+set}" != set; then
51500  PATH_SEPARATOR=:
51501  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
51502    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
51503      PATH_SEPARATOR=';'
51504  }
51505fi
51506
51507
51508# IFS
51509# We need space, tab and new line, in precisely that order.  Quoting is
51510# there to prevent editors from complaining about space-tab.
51511# (If _AS_PATH_WALK were called with IFS unset, it would disable word
51512# splitting by setting IFS to empty value.)
51513IFS=" ""	$as_nl"
51514
51515# Find who we are.  Look in the path if we contain no directory separator.
51516as_myself=
51517case $0 in #((
51518  *[\\/]* ) as_myself=$0 ;;
51519  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
51520for as_dir in $PATH
51521do
51522  IFS=$as_save_IFS
51523  test -z "$as_dir" && as_dir=.
51524    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
51525  done
51526IFS=$as_save_IFS
51527
51528     ;;
51529esac
51530# We did not find ourselves, most probably we were run as `sh COMMAND'
51531# in which case we are not to be found in the path.
51532if test "x$as_myself" = x; then
51533  as_myself=$0
51534fi
51535if test ! -f "$as_myself"; then
51536  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
51537  exit 1
51538fi
51539
51540# Unset variables that we do not need and which cause bugs (e.g. in
51541# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
51542# suppresses any "Segmentation fault" message there.  '((' could
51543# trigger a bug in pdksh 5.2.14.
51544for as_var in BASH_ENV ENV MAIL MAILPATH
51545do eval test x\${$as_var+set} = xset \
51546  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
51547done
51548PS1='$ '
51549PS2='> '
51550PS4='+ '
51551
51552# NLS nuisances.
51553LC_ALL=C
51554export LC_ALL
51555LANGUAGE=C
51556export LANGUAGE
51557
51558# CDPATH.
51559(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
51560
51561
51562# as_fn_error STATUS ERROR [LINENO LOG_FD]
51563# ----------------------------------------
51564# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
51565# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
51566# script with STATUS, using 1 if that was 0.
51567as_fn_error ()
51568{
51569  as_status=$1; test $as_status -eq 0 && as_status=1
51570  if test "$4"; then
51571    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
51572    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
51573  fi
51574  $as_echo "$as_me: error: $2" >&2
51575  as_fn_exit $as_status
51576} # as_fn_error
51577
51578
51579# as_fn_set_status STATUS
51580# -----------------------
51581# Set $? to STATUS, without forking.
51582as_fn_set_status ()
51583{
51584  return $1
51585} # as_fn_set_status
51586
51587# as_fn_exit STATUS
51588# -----------------
51589# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
51590as_fn_exit ()
51591{
51592  set +e
51593  as_fn_set_status $1
51594  exit $1
51595} # as_fn_exit
51596
51597# as_fn_unset VAR
51598# ---------------
51599# Portably unset VAR.
51600as_fn_unset ()
51601{
51602  { eval $1=; unset $1;}
51603}
51604as_unset=as_fn_unset
51605# as_fn_append VAR VALUE
51606# ----------------------
51607# Append the text in VALUE to the end of the definition contained in VAR. Take
51608# advantage of any shell optimizations that allow amortized linear growth over
51609# repeated appends, instead of the typical quadratic growth present in naive
51610# implementations.
51611if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
51612  eval 'as_fn_append ()
51613  {
51614    eval $1+=\$2
51615  }'
51616else
51617  as_fn_append ()
51618  {
51619    eval $1=\$$1\$2
51620  }
51621fi # as_fn_append
51622
51623# as_fn_arith ARG...
51624# ------------------
51625# Perform arithmetic evaluation on the ARGs, and store the result in the
51626# global $as_val. Take advantage of shells that can avoid forks. The arguments
51627# must be portable across $(()) and expr.
51628if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
51629  eval 'as_fn_arith ()
51630  {
51631    as_val=$(( $* ))
51632  }'
51633else
51634  as_fn_arith ()
51635  {
51636    as_val=`expr "$@" || test $? -eq 1`
51637  }
51638fi # as_fn_arith
51639
51640
51641if expr a : '\(a\)' >/dev/null 2>&1 &&
51642   test "X`expr 00001 : '.*\(...\)'`" = X001; then
51643  as_expr=expr
51644else
51645  as_expr=false
51646fi
51647
51648if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
51649  as_basename=basename
51650else
51651  as_basename=false
51652fi
51653
51654if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
51655  as_dirname=dirname
51656else
51657  as_dirname=false
51658fi
51659
51660as_me=`$as_basename -- "$0" ||
51661$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
51662	 X"$0" : 'X\(//\)$' \| \
51663	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
51664$as_echo X/"$0" |
51665    sed '/^.*\/\([^/][^/]*\)\/*$/{
51666	    s//\1/
51667	    q
51668	  }
51669	  /^X\/\(\/\/\)$/{
51670	    s//\1/
51671	    q
51672	  }
51673	  /^X\/\(\/\).*/{
51674	    s//\1/
51675	    q
51676	  }
51677	  s/.*/./; q'`
51678
51679# Avoid depending upon Character Ranges.
51680as_cr_letters='abcdefghijklmnopqrstuvwxyz'
51681as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
51682as_cr_Letters=$as_cr_letters$as_cr_LETTERS
51683as_cr_digits='0123456789'
51684as_cr_alnum=$as_cr_Letters$as_cr_digits
51685
51686ECHO_C= ECHO_N= ECHO_T=
51687case `echo -n x` in #(((((
51688-n*)
51689  case `echo 'xy\c'` in
51690  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
51691  xy)  ECHO_C='\c';;
51692  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
51693       ECHO_T='	';;
51694  esac;;
51695*)
51696  ECHO_N='-n';;
51697esac
51698
51699rm -f conf$$ conf$$.exe conf$$.file
51700if test -d conf$$.dir; then
51701  rm -f conf$$.dir/conf$$.file
51702else
51703  rm -f conf$$.dir
51704  mkdir conf$$.dir 2>/dev/null
51705fi
51706if (echo >conf$$.file) 2>/dev/null; then
51707  if ln -s conf$$.file conf$$ 2>/dev/null; then
51708    as_ln_s='ln -s'
51709    # ... but there are two gotchas:
51710    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
51711    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
51712    # In both cases, we have to default to `cp -pR'.
51713    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
51714      as_ln_s='cp -pR'
51715  elif ln conf$$.file conf$$ 2>/dev/null; then
51716    as_ln_s=ln
51717  else
51718    as_ln_s='cp -pR'
51719  fi
51720else
51721  as_ln_s='cp -pR'
51722fi
51723rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
51724rmdir conf$$.dir 2>/dev/null
51725
51726
51727# as_fn_mkdir_p
51728# -------------
51729# Create "$as_dir" as a directory, including parents if necessary.
51730as_fn_mkdir_p ()
51731{
51732
51733  case $as_dir in #(
51734  -*) as_dir=./$as_dir;;
51735  esac
51736  test -d "$as_dir" || eval $as_mkdir_p || {
51737    as_dirs=
51738    while :; do
51739      case $as_dir in #(
51740      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
51741      *) as_qdir=$as_dir;;
51742      esac
51743      as_dirs="'$as_qdir' $as_dirs"
51744      as_dir=`$as_dirname -- "$as_dir" ||
51745$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
51746	 X"$as_dir" : 'X\(//\)[^/]' \| \
51747	 X"$as_dir" : 'X\(//\)$' \| \
51748	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
51749$as_echo X"$as_dir" |
51750    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
51751	    s//\1/
51752	    q
51753	  }
51754	  /^X\(\/\/\)[^/].*/{
51755	    s//\1/
51756	    q
51757	  }
51758	  /^X\(\/\/\)$/{
51759	    s//\1/
51760	    q
51761	  }
51762	  /^X\(\/\).*/{
51763	    s//\1/
51764	    q
51765	  }
51766	  s/.*/./; q'`
51767      test -d "$as_dir" && break
51768    done
51769    test -z "$as_dirs" || eval "mkdir $as_dirs"
51770  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
51771
51772
51773} # as_fn_mkdir_p
51774if mkdir -p . 2>/dev/null; then
51775  as_mkdir_p='mkdir -p "$as_dir"'
51776else
51777  test -d ./-p && rmdir ./-p
51778  as_mkdir_p=false
51779fi
51780
51781
51782# as_fn_executable_p FILE
51783# -----------------------
51784# Test if FILE is an executable regular file.
51785as_fn_executable_p ()
51786{
51787  test -f "$1" && test -x "$1"
51788} # as_fn_executable_p
51789as_test_x='test -x'
51790as_executable_p=as_fn_executable_p
51791
51792# Sed expression to map a string onto a valid CPP name.
51793as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
51794
51795# Sed expression to map a string onto a valid variable name.
51796as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
51797
51798
51799exec 6>&1
51800## ----------------------------------- ##
51801## Main body of $CONFIG_STATUS script. ##
51802## ----------------------------------- ##
51803_ASEOF
51804test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
51805
51806cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51807# Save the log message, to keep $0 and so on meaningful, and to
51808# report actual input values of CONFIG_FILES etc. instead of their
51809# values after options handling.
51810ac_log="
51811This file was extended by OpenJDK $as_me jdk9, which was
51812generated by GNU Autoconf 2.69.  Invocation command line was
51813
51814  CONFIG_FILES    = $CONFIG_FILES
51815  CONFIG_HEADERS  = $CONFIG_HEADERS
51816  CONFIG_LINKS    = $CONFIG_LINKS
51817  CONFIG_COMMANDS = $CONFIG_COMMANDS
51818  $ $0 $@
51819
51820on `(hostname || uname -n) 2>/dev/null | sed 1q`
51821"
51822
51823_ACEOF
51824
51825case $ac_config_files in *"
51826"*) set x $ac_config_files; shift; ac_config_files=$*;;
51827esac
51828
51829
51830
51831cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51832# Files that config.status was made for.
51833config_files="$ac_config_files"
51834
51835_ACEOF
51836
51837cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51838ac_cs_usage="\
51839\`$as_me' instantiates files and other configuration actions
51840from templates according to the current configuration.  Unless the files
51841and actions are specified as TAGs, all are instantiated by default.
51842
51843Usage: $0 [OPTION]... [TAG]...
51844
51845  -h, --help       print this help, then exit
51846  -V, --version    print version number and configuration settings, then exit
51847      --config     print configuration, then exit
51848  -q, --quiet, --silent
51849                   do not print progress messages
51850  -d, --debug      don't remove temporary files
51851      --recheck    update $as_me by reconfiguring in the same conditions
51852      --file=FILE[:TEMPLATE]
51853                   instantiate the configuration file FILE
51854
51855Configuration files:
51856$config_files
51857
51858Report bugs to <build-dev@openjdk.java.net>.
51859OpenJDK home page: <http://openjdk.java.net>."
51860
51861_ACEOF
51862cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51863ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
51864ac_cs_version="\\
51865OpenJDK config.status jdk9
51866configured by $0, generated by GNU Autoconf 2.69,
51867  with options \\"\$ac_cs_config\\"
51868
51869Copyright (C) 2012 Free Software Foundation, Inc.
51870This config.status script is free software; the Free Software Foundation
51871gives unlimited permission to copy, distribute and modify it."
51872
51873ac_pwd='$ac_pwd'
51874srcdir='$srcdir'
51875AWK='$AWK'
51876test -n "\$AWK" || AWK=awk
51877_ACEOF
51878
51879cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51880# The default lists apply if the user does not specify any file.
51881ac_need_defaults=:
51882while test $# != 0
51883do
51884  case $1 in
51885  --*=?*)
51886    ac_option=`expr "X$1" : 'X\([^=]*\)='`
51887    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
51888    ac_shift=:
51889    ;;
51890  --*=)
51891    ac_option=`expr "X$1" : 'X\([^=]*\)='`
51892    ac_optarg=
51893    ac_shift=:
51894    ;;
51895  *)
51896    ac_option=$1
51897    ac_optarg=$2
51898    ac_shift=shift
51899    ;;
51900  esac
51901
51902  case $ac_option in
51903  # Handling of the options.
51904  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
51905    ac_cs_recheck=: ;;
51906  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
51907    $as_echo "$ac_cs_version"; exit ;;
51908  --config | --confi | --conf | --con | --co | --c )
51909    $as_echo "$ac_cs_config"; exit ;;
51910  --debug | --debu | --deb | --de | --d | -d )
51911    debug=: ;;
51912  --file | --fil | --fi | --f )
51913    $ac_shift
51914    case $ac_optarg in
51915    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
51916    '') as_fn_error $? "missing file argument" ;;
51917    esac
51918    as_fn_append CONFIG_FILES " '$ac_optarg'"
51919    ac_need_defaults=false;;
51920  --he | --h |  --help | --hel | -h )
51921    $as_echo "$ac_cs_usage"; exit ;;
51922  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
51923  | -silent | --silent | --silen | --sile | --sil | --si | --s)
51924    ac_cs_silent=: ;;
51925
51926  # This is an error.
51927  -*) as_fn_error $? "unrecognized option: \`$1'
51928Try \`$0 --help' for more information." ;;
51929
51930  *) as_fn_append ac_config_targets " $1"
51931     ac_need_defaults=false ;;
51932
51933  esac
51934  shift
51935done
51936
51937ac_configure_extra_args=
51938
51939if $ac_cs_silent; then
51940  exec 6>/dev/null
51941  ac_configure_extra_args="$ac_configure_extra_args --silent"
51942fi
51943
51944_ACEOF
51945cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51946if \$ac_cs_recheck; then
51947  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
51948  shift
51949  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
51950  CONFIG_SHELL='$SHELL'
51951  export CONFIG_SHELL
51952  exec "\$@"
51953fi
51954
51955_ACEOF
51956cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51957exec 5>>config.log
51958{
51959  echo
51960  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
51961## Running $as_me. ##
51962_ASBOX
51963  $as_echo "$ac_log"
51964} >&5
51965
51966_ACEOF
51967cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51968_ACEOF
51969
51970cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51971
51972# Handling of arguments.
51973for ac_config_target in $ac_config_targets
51974do
51975  case $ac_config_target in
51976    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
51977    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
51978    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
51979    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
51980    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
51981
51982  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
51983  esac
51984done
51985
51986
51987# If the user did not use the arguments to specify the items to instantiate,
51988# then the envvar interface is used.  Set only those that are not.
51989# We use the long form for the default assignment because of an extremely
51990# bizarre bug on SunOS 4.1.3.
51991if $ac_need_defaults; then
51992  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
51993fi
51994
51995# Have a temporary directory for convenience.  Make it in the build tree
51996# simply because there is no reason against having it here, and in addition,
51997# creating and moving files from /tmp can sometimes cause problems.
51998# Hook for its removal unless debugging.
51999# Note that there is a small window in which the directory will not be cleaned:
52000# after its creation but before its name has been assigned to `$tmp'.
52001$debug ||
52002{
52003  tmp= ac_tmp=
52004  trap 'exit_status=$?
52005  : "${ac_tmp:=$tmp}"
52006  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
52007' 0
52008  trap 'as_fn_exit 1' 1 2 13 15
52009}
52010# Create a (secure) tmp directory for tmp files.
52011
52012{
52013  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
52014  test -d "$tmp"
52015}  ||
52016{
52017  tmp=./conf$$-$RANDOM
52018  (umask 077 && mkdir "$tmp")
52019} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
52020ac_tmp=$tmp
52021
52022# Set up the scripts for CONFIG_FILES section.
52023# No need to generate them if there are no CONFIG_FILES.
52024# This happens for instance with `./config.status config.h'.
52025if test -n "$CONFIG_FILES"; then
52026
52027
52028ac_cr=`echo X | tr X '\015'`
52029# On cygwin, bash can eat \r inside `` if the user requested igncr.
52030# But we know of no other shell where ac_cr would be empty at this
52031# point, so we can use a bashism as a fallback.
52032if test "x$ac_cr" = x; then
52033  eval ac_cr=\$\'\\r\'
52034fi
52035ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
52036if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
52037  ac_cs_awk_cr='\\r'
52038else
52039  ac_cs_awk_cr=$ac_cr
52040fi
52041
52042echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
52043_ACEOF
52044
52045
52046{
52047  echo "cat >conf$$subs.awk <<_ACEOF" &&
52048  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
52049  echo "_ACEOF"
52050} >conf$$subs.sh ||
52051  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
52052ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
52053ac_delim='%!_!# '
52054for ac_last_try in false false false false false :; do
52055  . ./conf$$subs.sh ||
52056    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
52057
52058  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
52059  if test $ac_delim_n = $ac_delim_num; then
52060    break
52061  elif $ac_last_try; then
52062    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
52063  else
52064    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
52065  fi
52066done
52067rm -f conf$$subs.sh
52068
52069cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52070cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
52071_ACEOF
52072sed -n '
52073h
52074s/^/S["/; s/!.*/"]=/
52075p
52076g
52077s/^[^!]*!//
52078:repl
52079t repl
52080s/'"$ac_delim"'$//
52081t delim
52082:nl
52083h
52084s/\(.\{148\}\)..*/\1/
52085t more1
52086s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
52087p
52088n
52089b repl
52090:more1
52091s/["\\]/\\&/g; s/^/"/; s/$/"\\/
52092p
52093g
52094s/.\{148\}//
52095t nl
52096:delim
52097h
52098s/\(.\{148\}\)..*/\1/
52099t more2
52100s/["\\]/\\&/g; s/^/"/; s/$/"/
52101p
52102b
52103:more2
52104s/["\\]/\\&/g; s/^/"/; s/$/"\\/
52105p
52106g
52107s/.\{148\}//
52108t delim
52109' <conf$$subs.awk | sed '
52110/^[^""]/{
52111  N
52112  s/\n//
52113}
52114' >>$CONFIG_STATUS || ac_write_fail=1
52115rm -f conf$$subs.awk
52116cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52117_ACAWK
52118cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
52119  for (key in S) S_is_set[key] = 1
52120  FS = ""
52121
52122}
52123{
52124  line = $ 0
52125  nfields = split(line, field, "@")
52126  substed = 0
52127  len = length(field[1])
52128  for (i = 2; i < nfields; i++) {
52129    key = field[i]
52130    keylen = length(key)
52131    if (S_is_set[key]) {
52132      value = S[key]
52133      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
52134      len += length(value) + length(field[++i])
52135      substed = 1
52136    } else
52137      len += 1 + keylen
52138  }
52139
52140  print line
52141}
52142
52143_ACAWK
52144_ACEOF
52145cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52146if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
52147  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
52148else
52149  cat
52150fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
52151  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
52152_ACEOF
52153
52154# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
52155# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
52156# trailing colons and then remove the whole line if VPATH becomes empty
52157# (actually we leave an empty line to preserve line numbers).
52158if test "x$srcdir" = x.; then
52159  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
52160h
52161s///
52162s/^/:/
52163s/[	 ]*$/:/
52164s/:\$(srcdir):/:/g
52165s/:\${srcdir}:/:/g
52166s/:@srcdir@:/:/g
52167s/^:*//
52168s/:*$//
52169x
52170s/\(=[	 ]*\).*/\1/
52171G
52172s/\n//
52173s/^[^=]*=[	 ]*$//
52174}'
52175fi
52176
52177cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52178fi # test -n "$CONFIG_FILES"
52179
52180
52181eval set X "  :F $CONFIG_FILES      "
52182shift
52183for ac_tag
52184do
52185  case $ac_tag in
52186  :[FHLC]) ac_mode=$ac_tag; continue;;
52187  esac
52188  case $ac_mode$ac_tag in
52189  :[FHL]*:*);;
52190  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
52191  :[FH]-) ac_tag=-:-;;
52192  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
52193  esac
52194  ac_save_IFS=$IFS
52195  IFS=:
52196  set x $ac_tag
52197  IFS=$ac_save_IFS
52198  shift
52199  ac_file=$1
52200  shift
52201
52202  case $ac_mode in
52203  :L) ac_source=$1;;
52204  :[FH])
52205    ac_file_inputs=
52206    for ac_f
52207    do
52208      case $ac_f in
52209      -) ac_f="$ac_tmp/stdin";;
52210      *) # Look for the file first in the build tree, then in the source tree
52211	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
52212	 # because $ac_f cannot contain `:'.
52213	 test -f "$ac_f" ||
52214	   case $ac_f in
52215	   [\\/$]*) false;;
52216	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
52217	   esac ||
52218	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
52219      esac
52220      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
52221      as_fn_append ac_file_inputs " '$ac_f'"
52222    done
52223
52224    # Let's still pretend it is `configure' which instantiates (i.e., don't
52225    # use $as_me), people would be surprised to read:
52226    #    /* config.h.  Generated by config.status.  */
52227    configure_input='Generated from '`
52228	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
52229	`' by configure.'
52230    if test x"$ac_file" != x-; then
52231      configure_input="$ac_file.  $configure_input"
52232      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
52233$as_echo "$as_me: creating $ac_file" >&6;}
52234    fi
52235    # Neutralize special characters interpreted by sed in replacement strings.
52236    case $configure_input in #(
52237    *\&* | *\|* | *\\* )
52238       ac_sed_conf_input=`$as_echo "$configure_input" |
52239       sed 's/[\\\\&|]/\\\\&/g'`;; #(
52240    *) ac_sed_conf_input=$configure_input;;
52241    esac
52242
52243    case $ac_tag in
52244    *:-:* | *:-) cat >"$ac_tmp/stdin" \
52245      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
52246    esac
52247    ;;
52248  esac
52249
52250  ac_dir=`$as_dirname -- "$ac_file" ||
52251$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
52252	 X"$ac_file" : 'X\(//\)[^/]' \| \
52253	 X"$ac_file" : 'X\(//\)$' \| \
52254	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
52255$as_echo X"$ac_file" |
52256    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
52257	    s//\1/
52258	    q
52259	  }
52260	  /^X\(\/\/\)[^/].*/{
52261	    s//\1/
52262	    q
52263	  }
52264	  /^X\(\/\/\)$/{
52265	    s//\1/
52266	    q
52267	  }
52268	  /^X\(\/\).*/{
52269	    s//\1/
52270	    q
52271	  }
52272	  s/.*/./; q'`
52273  as_dir="$ac_dir"; as_fn_mkdir_p
52274  ac_builddir=.
52275
52276case "$ac_dir" in
52277.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
52278*)
52279  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
52280  # A ".." for each directory in $ac_dir_suffix.
52281  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
52282  case $ac_top_builddir_sub in
52283  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
52284  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
52285  esac ;;
52286esac
52287ac_abs_top_builddir=$ac_pwd
52288ac_abs_builddir=$ac_pwd$ac_dir_suffix
52289# for backward compatibility:
52290ac_top_builddir=$ac_top_build_prefix
52291
52292case $srcdir in
52293  .)  # We are building in place.
52294    ac_srcdir=.
52295    ac_top_srcdir=$ac_top_builddir_sub
52296    ac_abs_top_srcdir=$ac_pwd ;;
52297  [\\/]* | ?:[\\/]* )  # Absolute name.
52298    ac_srcdir=$srcdir$ac_dir_suffix;
52299    ac_top_srcdir=$srcdir
52300    ac_abs_top_srcdir=$srcdir ;;
52301  *) # Relative name.
52302    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
52303    ac_top_srcdir=$ac_top_build_prefix$srcdir
52304    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
52305esac
52306ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
52307
52308
52309  case $ac_mode in
52310  :F)
52311  #
52312  # CONFIG_FILE
52313  #
52314
52315_ACEOF
52316
52317cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52318# If the template does not know about datarootdir, expand it.
52319# FIXME: This hack should be removed a few years after 2.60.
52320ac_datarootdir_hack=; ac_datarootdir_seen=
52321ac_sed_dataroot='
52322/datarootdir/ {
52323  p
52324  q
52325}
52326/@datadir@/p
52327/@docdir@/p
52328/@infodir@/p
52329/@localedir@/p
52330/@mandir@/p'
52331case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
52332*datarootdir*) ac_datarootdir_seen=yes;;
52333*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
52334  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
52335$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
52336_ACEOF
52337cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52338  ac_datarootdir_hack='
52339  s&@datadir@&$datadir&g
52340  s&@docdir@&$docdir&g
52341  s&@infodir@&$infodir&g
52342  s&@localedir@&$localedir&g
52343  s&@mandir@&$mandir&g
52344  s&\\\${datarootdir}&$datarootdir&g' ;;
52345esac
52346_ACEOF
52347
52348# Neutralize VPATH when `$srcdir' = `.'.
52349# Shell code in configure.ac might set extrasub.
52350# FIXME: do we really want to maintain this feature?
52351cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52352ac_sed_extra="$ac_vpsub
52353$extrasub
52354_ACEOF
52355cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52356:t
52357/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
52358s|@configure_input@|$ac_sed_conf_input|;t t
52359s&@top_builddir@&$ac_top_builddir_sub&;t t
52360s&@top_build_prefix@&$ac_top_build_prefix&;t t
52361s&@srcdir@&$ac_srcdir&;t t
52362s&@abs_srcdir@&$ac_abs_srcdir&;t t
52363s&@top_srcdir@&$ac_top_srcdir&;t t
52364s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
52365s&@builddir@&$ac_builddir&;t t
52366s&@abs_builddir@&$ac_abs_builddir&;t t
52367s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
52368$ac_datarootdir_hack
52369"
52370eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
52371  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
52372
52373test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
52374  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
52375  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
52376      "$ac_tmp/out"`; test -z "$ac_out"; } &&
52377  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
52378which seems to be undefined.  Please make sure it is defined" >&5
52379$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
52380which seems to be undefined.  Please make sure it is defined" >&2;}
52381
52382  rm -f "$ac_tmp/stdin"
52383  case $ac_file in
52384  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
52385  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
52386  esac \
52387  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
52388 ;;
52389
52390
52391
52392  esac
52393
52394done # for ac_tag
52395
52396
52397as_fn_exit 0
52398_ACEOF
52399ac_clean_files=$ac_clean_files_save
52400
52401test $ac_write_fail = 0 ||
52402  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
52403
52404
52405# configure is writing to config.log, and then calls config.status.
52406# config.status does its own redirection, appending to config.log.
52407# Unfortunately, on DOS this fails, as config.log is still kept open
52408# by configure, so config.status won't be able to write to it; its
52409# output is simply discarded.  So we exec the FD to /dev/null,
52410# effectively closing config.log, so it can be properly (re)opened and
52411# appended to by config.status.  When coming back to configure, we
52412# need to make the FD available again.
52413if test "$no_create" != yes; then
52414  ac_cs_success=:
52415  ac_config_status_args=
52416  test "$silent" = yes &&
52417    ac_config_status_args="$ac_config_status_args --quiet"
52418  exec 5>/dev/null
52419  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
52420  exec 5>>config.log
52421  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
52422  # would make configure fail if this is the last instruction.
52423  $ac_cs_success || as_fn_exit 1
52424fi
52425if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
52426  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
52427$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
52428fi
52429
52430
52431# Try to move the config.log file to the output directory.
52432if test -e ./config.log; then
52433  $MV -f ./config.log "$OUTPUT_ROOT/config.log" 2> /dev/null
52434fi
52435
52436# Make the compare script executable
52437$CHMOD +x $OUTPUT_ROOT/compare.sh
52438
52439# Finally output some useful information to the user
52440
52441  # Finally output some useful information to the user
52442
52443  printf "\n"
52444  printf "====================================================\n"
52445  if test "x$no_create" != "xyes"; then
52446    if test "x$IS_RECONFIGURE" != "xyes"; then
52447      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
52448    else
52449      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
52450    fi
52451  else
52452    if test "x$IS_RECONFIGURE" != "xyes"; then
52453      printf "A configuration has been successfully checked but not created\n"
52454    else
52455      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
52456    fi
52457  fi
52458  if test "x$CONFIGURE_COMMAND_LINE" != x; then
52459    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
52460  else
52461    printf "using default settings.\n"
52462  fi
52463
52464  printf "\n"
52465  printf "Configuration summary:\n"
52466  printf "* Debug level:    $DEBUG_LEVEL\n"
52467  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
52468  printf "* JDK variant:    $JDK_VARIANT\n"
52469  printf "* JVM variants:   $with_jvm_variants\n"
52470  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
52471
52472  printf "\n"
52473  printf "Tools summary:\n"
52474  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
52475    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
52476  fi
52477  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
52478  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)\n"
52479  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
52480  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
52481
52482  printf "\n"
52483  printf "Build performance summary:\n"
52484  printf "* Cores to use:   $JOBS\n"
52485  printf "* Memory limit:   $MEMORY_SIZE MB\n"
52486  if test "x$CCACHE_STATUS" != "x"; then
52487    printf "* ccache status:  $CCACHE_STATUS\n"
52488  fi
52489  printf "\n"
52490
52491  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
52492    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
52493    printf "will result in longer build times.\n"
52494    printf "\n"
52495  fi
52496
52497  if test "x$FOUND_ALT_VARIABLES" != "x"; then
52498    printf "WARNING: You have old-style ALT_ environment variables set.\n"
52499    printf "These are not respected, and will be ignored. It is recommended\n"
52500    printf "that you clean your environment. The following variables are set:\n"
52501    printf "$FOUND_ALT_VARIABLES\n"
52502    printf "\n"
52503  fi
52504
52505  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
52506    printf "WARNING: Your build output directory is not on a local disk.\n"
52507    printf "This will severely degrade build performance!\n"
52508    printf "It is recommended that you create an output directory on a local disk,\n"
52509    printf "and run the configure script again from that directory.\n"
52510    printf "\n"
52511  fi
52512
52513  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
52514    printf "WARNING: The result of this configuration has overridden an older\n"
52515    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
52516    printf "proper build. Failure to do so might result in strange build problems.\n"
52517    printf "\n"
52518  fi
52519
52520  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
52521    printf "WARNING: The result of this configuration was not saved.\n"
52522    printf "You should run without '--no-create | -n' to create the configuration.\n"
52523    printf "\n"
52524  fi
52525
52526
52527
52528if test -e "$OUTPUT_ROOT/config.log"; then
52529  $GREP '^configure:.*: WARNING:' "$OUTPUT_ROOT/config.log" > /dev/null 2>&1
52530  if test $? -eq 0; then
52531    printf "The following warnings were produced. Repeated here for convenience:\n"
52532    # We must quote sed expression (using []) to stop m4 from eating the [].
52533    $GREP '^configure:.*: WARNING:' "$OUTPUT_ROOT/config.log" | $SED -e  's/^configure:[0-9]*: //'
52534    printf "\n"
52535  fi
52536fi
52537
52538
52539