generated-configure.sh revision 1484:2038a6987213
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
632CFLAGS_CCACHE
633CCACHE
634USE_PRECOMPILED_HEADER
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
648MSVCP_DLL
649MSVCR_DLL
650LIBCXX
651LLVM_LIBS
652LLVM_LDFLAGS
653LLVM_CFLAGS
654LLVM_CONFIG
655LIBFFI_LIBS
656LIBFFI_CFLAGS
657STATIC_CXX_SETTING
658LIBDL
659LIBM
660LIBZIP_CAN_USE_MMAP
661USE_EXTERNAL_LIBZ
662USE_EXTERNAL_LIBPNG
663PNG_LIBS
664PNG_CFLAGS
665USE_EXTERNAL_LCMS
666LCMS_LIBS
667LCMS_CFLAGS
668USE_EXTERNAL_LIBGIF
669USE_EXTERNAL_LIBJPEG
670ALSA_LIBS
671ALSA_CFLAGS
672FREETYPE_BUNDLE_LIB_PATH
673FREETYPE_LIBS
674FREETYPE_CFLAGS
675CUPS_CFLAGS
676X_EXTRA_LIBS
677X_LIBS
678X_PRE_LIBS
679X_CFLAGS
680XMKMF
681FIXPATH
682GCOV_ENABLED
683ZIP_DEBUGINFO_FILES
684ENABLE_DEBUG_SYMBOLS
685CFLAGS_WARNINGS_ARE_ERRORS
686DISABLE_WARNING_PREFIX
687WARNINGS_AS_ERRORS
688COMPILER_SUPPORTS_TARGET_BITS_FLAG
689ZERO_ARCHFLAG
690LDFLAGS_TESTEXE_SUFFIX
691LDFLAGS_TESTLIB_SUFFIX
692LDFLAGS_TESTEXE
693LDFLAGS_TESTLIB
694LDFLAGS_CXX_JDK
695LDFLAGS_JDKEXE_SUFFIX
696LDFLAGS_JDKLIB_SUFFIX
697LDFLAGS_JDKEXE
698LDFLAGS_JDKLIB
699CXXFLAGS_TESTEXE
700CXXFLAGS_TESTLIB
701CFLAGS_TESTEXE
702CFLAGS_TESTLIB
703CXXFLAGS_JDKEXE
704CXXFLAGS_JDKLIB
705CFLAGS_JDKEXE
706CFLAGS_JDKLIB
707MACOSX_VERSION_MIN
708LEGACY_EXTRA_LDFLAGS
709LEGACY_EXTRA_CXXFLAGS
710LEGACY_EXTRA_CFLAGS
711CXX_O_FLAG_NONE
712CXX_O_FLAG_DEBUG
713CXX_O_FLAG_NORM
714CXX_O_FLAG_HI
715CXX_O_FLAG_HIGHEST
716C_O_FLAG_NONE
717C_O_FLAG_DEBUG
718C_O_FLAG_NORM
719C_O_FLAG_HI
720C_O_FLAG_HIGHEST
721CXXFLAGS_DEBUG_OPTIONS
722CFLAGS_DEBUG_OPTIONS
723CXXFLAGS_DEBUG_SYMBOLS
724CFLAGS_DEBUG_SYMBOLS
725CXX_FLAG_DEPS
726C_FLAG_DEPS
727SET_SHARED_LIBRARY_MAPFILE
728SET_SHARED_LIBRARY_NAME
729SET_SHARED_LIBRARY_ORIGIN
730SET_EXECUTABLE_ORIGIN
731CXX_FLAG_REORDER
732C_FLAG_REORDER
733SYSROOT_LDFLAGS
734SYSROOT_CFLAGS
735RC_FLAGS
736AR_OUT_OPTION
737LD_OUT_OPTION
738EXE_OUT_OPTION
739CC_OUT_OPTION
740POST_STRIP_CMD
741ARFLAGS
742COMPILER_TARGET_BITS_FLAG
743JT_HOME
744JTREGEXE
745USING_BROKEN_SUSE_LD
746PACKAGE_PATH
747USE_CLANG
748HOTSPOT_LD
749HOTSPOT_CXX
750HOTSPOT_RC
751HOTSPOT_MT
752BUILD_LD
753BUILD_CXX
754BUILD_CC
755ac_ct_OBJDUMP
756OBJDUMP
757ac_ct_OBJCOPY
758OBJCOPY
759ac_ct_NM
760ac_ct_STRIP
761GNM
762NM
763STRIP
764MSBUILD
765DUMPBIN
766RC
767MT
768LIPO
769ac_ct_AR
770AR
771AS
772LDCXX
773LD
774CXXCPP
775CPP
776ac_ct_CXX
777CXXFLAGS
778CXX
779ac_ct_PROPER_COMPILER_CXX
780PROPER_COMPILER_CXX
781TOOLCHAIN_PATH_CXX
782POTENTIAL_CXX
783OBJEXT
784EXEEXT
785ac_ct_CC
786CPPFLAGS
787LDFLAGS
788CFLAGS
789CC
790ac_ct_PROPER_COMPILER_CC
791PROPER_COMPILER_CC
792TOOLCHAIN_PATH_CC
793POTENTIAL_CC
794VS_LIB
795VS_INCLUDE
796VS_PATH
797CYGWIN_LINK
798EXE_SUFFIX
799OBJ_SUFFIX
800STATIC_LIBRARY
801SHARED_LIBRARY
802STATIC_LIBRARY_SUFFIX
803SHARED_LIBRARY_SUFFIX
804LIBRARY_PREFIX
805TOOLCHAIN_TYPE
806BUILD_HOTSPOT
807HOTSPOT_DIST
808BUILD_OUTPUT
809OVERRIDE_SRC_ROOT
810ADD_SRC_ROOT
811JDK_TOPDIR
812NASHORN_TOPDIR
813HOTSPOT_TOPDIR
814JAXWS_TOPDIR
815JAXP_TOPDIR
816CORBA_TOPDIR
817LANGTOOLS_TOPDIR
818JAVAC_FLAGS
819BOOT_JDK_SOURCETARGET
820JARSIGNER
821JAR
822JAVAH
823JAVAC
824JAVA
825BOOT_JDK
826JAVA_CHECK
827JAVAC_CHECK
828COOKED_BUILD_NUMBER
829JDK_VERSION
830COPYRIGHT_YEAR
831MACOSX_BUNDLE_ID_BASE
832MACOSX_BUNDLE_NAME_BASE
833COMPANY_NAME
834JDK_RC_PLATFORM_NAME
835PRODUCT_SUFFIX
836PRODUCT_NAME
837LAUNCHER_NAME
838MILESTONE
839JDK_BUILD_NUMBER
840JDK_UPDATE_VERSION
841JDK_MICRO_VERSION
842JDK_MINOR_VERSION
843JDK_MAJOR_VERSION
844USER_RELEASE_SUFFIX
845COMPRESS_JARS
846RMICONNECTOR_IIOP
847UNLIMITED_CRYPTO
848CACERTS_FILE
849TEST_IN_BUILD
850BUILD_HEADLESS
851SUPPORT_HEADFUL
852SUPPORT_HEADLESS
853BDEPS_FTP
854BDEPS_UNZIP
855OS_VERSION_MICRO
856OS_VERSION_MINOR
857OS_VERSION_MAJOR
858PKG_CONFIG
859BASH_ARGS
860CODESIGN
861XATTR
862DSYMUTIL
863IS_GNU_TIME
864TIME
865STAT
866HG
867READELF
868OTOOL
869LDD
870ZIP
871UNZIP
872FIND_DELETE
873OUTPUT_SYNC
874OUTPUT_SYNC_SUPPORTED
875MAKE
876CHECK_TOOLSDIR_MAKE
877CHECK_TOOLSDIR_GMAKE
878CHECK_MAKE
879CHECK_GMAKE
880PKGHANDLER
881CONFIGURESUPPORT_OUTPUTDIR
882OUTPUT_ROOT
883CONF_NAME
884SPEC
885SDKROOT
886XCODEBUILD
887BUILD_VARIANT_RELEASE
888DEBUG_CLASSFILES
889FASTDEBUG
890VARIANT
891DEBUG_LEVEL
892MACOSX_UNIVERSAL
893INCLUDE_SA
894JVM_VARIANT_CORE
895JVM_VARIANT_ZEROSHARK
896JVM_VARIANT_ZERO
897JVM_VARIANT_KERNEL
898JVM_VARIANT_MINIMAL1
899JVM_VARIANT_CLIENT
900JVM_VARIANT_SERVER
901JVM_VARIANTS
902JVM_INTERPRETER
903JDK_VARIANT
904SET_OPENJDK
905CANONICAL_TOPDIR
906ORIGINAL_TOPDIR
907TOPDIR
908PATH_SEP
909ZERO_ARCHDEF
910DEFINE_CROSS_COMPILE_ARCH
911LP64
912OPENJDK_TARGET_OS_EXPORT_DIR
913OPENJDK_TARGET_CPU_JLI_CFLAGS
914OPENJDK_TARGET_CPU_OSARCH
915OPENJDK_TARGET_CPU_ISADIR
916OPENJDK_TARGET_CPU_LIBDIR
917OPENJDK_TARGET_CPU_LEGACY_LIB
918OPENJDK_TARGET_CPU_LEGACY
919REQUIRED_OS_VERSION
920REQUIRED_OS_NAME
921COMPILE_TYPE
922OPENJDK_TARGET_CPU_ENDIAN
923OPENJDK_TARGET_CPU_BITS
924OPENJDK_TARGET_CPU_ARCH
925OPENJDK_TARGET_CPU
926OPENJDK_TARGET_OS_ENV
927OPENJDK_TARGET_OS_TYPE
928OPENJDK_TARGET_OS
929OPENJDK_BUILD_CPU_ENDIAN
930OPENJDK_BUILD_CPU_BITS
931OPENJDK_BUILD_CPU_ARCH
932OPENJDK_BUILD_CPU
933OPENJDK_BUILD_OS_ENV
934OPENJDK_BUILD_OS_TYPE
935OPENJDK_BUILD_OS
936OPENJDK_BUILD_AUTOCONF_NAME
937OPENJDK_TARGET_AUTOCONF_NAME
938target_os
939target_vendor
940target_cpu
941target
942host_os
943host_vendor
944host_cpu
945host
946build_os
947build_vendor
948build_cpu
949build
950CPIO
951SETFILE
952DF
953READLINK
954CYGPATH
955SED
956FGREP
957EGREP
958GREP
959AWK
960XARGS
961WHICH
962WC
963UNIQ
964UNAME
965TR
966TOUCH
967TEE
968TAR
969TAIL
970SORT
971SH
972RM
973PRINTF
974NAWK
975MV
976MKTEMP
977MKDIR
978LS
979LN
980HEAD
981FIND
982FILE
983EXPR
984ECHO
985DIRNAME
986DIFF
987DATE
988CUT
989CP
990COMM
991CMP
992CHMOD
993CAT
994BASH
995BASENAME
996DATE_WHEN_CONFIGURED
997ORIGINAL_PATH
998CONFIGURE_COMMAND_LINE
999target_alias
1000host_alias
1001build_alias
1002LIBS
1003ECHO_T
1004ECHO_N
1005ECHO_C
1006DEFS
1007mandir
1008localedir
1009libdir
1010psdir
1011pdfdir
1012dvidir
1013htmldir
1014infodir
1015docdir
1016oldincludedir
1017includedir
1018localstatedir
1019sharedstatedir
1020sysconfdir
1021datadir
1022datarootdir
1023libexecdir
1024sbindir
1025bindir
1026program_transform_name
1027prefix
1028exec_prefix
1029PACKAGE_URL
1030PACKAGE_BUGREPORT
1031PACKAGE_STRING
1032PACKAGE_VERSION
1033PACKAGE_TARNAME
1034PACKAGE_NAME
1035PATH_SEPARATOR
1036SHELL'
1037ac_subst_files=''
1038ac_user_opts='
1039enable_option_checking
1040with_target_bits
1041enable_openjdk_only
1042with_custom_make_dir
1043with_jdk_variant
1044with_jvm_interpreter
1045with_jvm_variants
1046enable_debug
1047with_debug_level
1048with_devkit
1049with_sys_root
1050with_sysroot
1051with_tools_dir
1052with_toolchain_path
1053with_extra_path
1054with_sdk_name
1055with_conf_name
1056with_output_sync
1057with_builddeps_conf
1058with_builddeps_server
1059with_builddeps_dir
1060with_builddeps_group
1061enable_headful
1062enable_hotspot_test_in_build
1063with_cacerts_file
1064enable_unlimited_crypto
1065enable_rmiconnector_iiop
1066with_milestone
1067with_update_version
1068with_user_release_suffix
1069with_build_number
1070with_copyright_year
1071with_boot_jdk
1072with_add_source_root
1073with_override_source_root
1074with_adds_and_overrides
1075with_override_langtools
1076with_override_corba
1077with_override_jaxp
1078with_override_jaxws
1079with_override_hotspot
1080with_override_nashorn
1081with_override_jdk
1082with_import_hotspot
1083with_toolchain_type
1084with_toolchain_version
1085with_jtreg
1086with_extra_cflags
1087with_extra_cxxflags
1088with_extra_ldflags
1089enable_warnings_as_errors
1090enable_debug_symbols
1091enable_zip_debug_info
1092enable_native_coverage
1093with_x
1094with_cups
1095with_cups_include
1096with_freetype
1097with_freetype_include
1098with_freetype_lib
1099with_freetype_src
1100enable_freetype_bundling
1101with_alsa
1102with_alsa_include
1103with_alsa_lib
1104with_libjpeg
1105with_giflib
1106with_lcms
1107with_libpng
1108with_zlib
1109with_stdc__lib
1110with_msvcr_dll
1111with_msvcp_dll
1112with_dxsdk
1113with_dxsdk_lib
1114with_dxsdk_include
1115with_num_cores
1116with_memory_size
1117with_jobs
1118with_boot_jdk_jvmargs
1119with_sjavac_server_java
1120enable_sjavac
1121enable_precompiled_headers
1122enable_ccache
1123with_ccache_dir
1124'
1125      ac_precious_vars='build_alias
1126host_alias
1127target_alias
1128BASENAME
1129BASH
1130CAT
1131CHMOD
1132CMP
1133COMM
1134CP
1135CUT
1136DATE
1137DIFF
1138DIRNAME
1139ECHO
1140EXPR
1141FILE
1142FIND
1143HEAD
1144LN
1145LS
1146MKDIR
1147MKTEMP
1148MV
1149NAWK
1150PRINTF
1151RM
1152SH
1153SORT
1154TAIL
1155TAR
1156TEE
1157TOUCH
1158TR
1159UNAME
1160UNIQ
1161WC
1162WHICH
1163XARGS
1164AWK
1165GREP
1166EGREP
1167FGREP
1168SED
1169CYGPATH
1170READLINK
1171DF
1172SETFILE
1173CPIO
1174UNZIP
1175ZIP
1176LDD
1177OTOOL
1178READELF
1179HG
1180STAT
1181TIME
1182DSYMUTIL
1183XATTR
1184CODESIGN
1185PKG_CONFIG
1186JAVA
1187JAVAC
1188JAVAH
1189JAR
1190JARSIGNER
1191CC
1192CFLAGS
1193LDFLAGS
1194LIBS
1195CPPFLAGS
1196CXX
1197CXXFLAGS
1198CCC
1199CPP
1200CXXCPP
1201AS
1202AR
1203LIPO
1204STRIP
1205NM
1206GNM
1207OBJCOPY
1208OBJDUMP
1209BUILD_CC
1210BUILD_CXX
1211BUILD_LD
1212JTREGEXE
1213XMKMF
1214FREETYPE_CFLAGS
1215FREETYPE_LIBS
1216ALSA_CFLAGS
1217ALSA_LIBS
1218LCMS_CFLAGS
1219LCMS_LIBS
1220PNG_CFLAGS
1221PNG_LIBS
1222LIBFFI_CFLAGS
1223LIBFFI_LIBS
1224CCACHE'
1225
1226
1227# Initialize some variables set by options.
1228ac_init_help=
1229ac_init_version=false
1230ac_unrecognized_opts=
1231ac_unrecognized_sep=
1232# The variables have the same names as the options, with
1233# dashes changed to underlines.
1234cache_file=/dev/null
1235exec_prefix=NONE
1236no_create=
1237no_recursion=
1238prefix=NONE
1239program_prefix=NONE
1240program_suffix=NONE
1241program_transform_name=s,x,x,
1242silent=
1243site=
1244srcdir=
1245verbose=
1246x_includes=NONE
1247x_libraries=NONE
1248
1249# Installation directory options.
1250# These are left unexpanded so users can "make install exec_prefix=/foo"
1251# and all the variables that are supposed to be based on exec_prefix
1252# by default will actually change.
1253# Use braces instead of parens because sh, perl, etc. also accept them.
1254# (The list follows the same order as the GNU Coding Standards.)
1255bindir='${exec_prefix}/bin'
1256sbindir='${exec_prefix}/sbin'
1257libexecdir='${exec_prefix}/libexec'
1258datarootdir='${prefix}/share'
1259datadir='${datarootdir}'
1260sysconfdir='${prefix}/etc'
1261sharedstatedir='${prefix}/com'
1262localstatedir='${prefix}/var'
1263includedir='${prefix}/include'
1264oldincludedir='/usr/include'
1265docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1266infodir='${datarootdir}/info'
1267htmldir='${docdir}'
1268dvidir='${docdir}'
1269pdfdir='${docdir}'
1270psdir='${docdir}'
1271libdir='${exec_prefix}/lib'
1272localedir='${datarootdir}/locale'
1273mandir='${datarootdir}/man'
1274
1275ac_prev=
1276ac_dashdash=
1277for ac_option
1278do
1279  # If the previous option needs an argument, assign it.
1280  if test -n "$ac_prev"; then
1281    eval $ac_prev=\$ac_option
1282    ac_prev=
1283    continue
1284  fi
1285
1286  case $ac_option in
1287  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1288  *=)   ac_optarg= ;;
1289  *)    ac_optarg=yes ;;
1290  esac
1291
1292  # Accept the important Cygnus configure options, so we can diagnose typos.
1293
1294  case $ac_dashdash$ac_option in
1295  --)
1296    ac_dashdash=yes ;;
1297
1298  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1299    ac_prev=bindir ;;
1300  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1301    bindir=$ac_optarg ;;
1302
1303  -build | --build | --buil | --bui | --bu)
1304    ac_prev=build_alias ;;
1305  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1306    build_alias=$ac_optarg ;;
1307
1308  -cache-file | --cache-file | --cache-fil | --cache-fi \
1309  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1310    ac_prev=cache_file ;;
1311  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1312  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1313    cache_file=$ac_optarg ;;
1314
1315  --config-cache | -C)
1316    cache_file=config.cache ;;
1317
1318  -datadir | --datadir | --datadi | --datad)
1319    ac_prev=datadir ;;
1320  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1321    datadir=$ac_optarg ;;
1322
1323  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1324  | --dataroo | --dataro | --datar)
1325    ac_prev=datarootdir ;;
1326  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1327  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1328    datarootdir=$ac_optarg ;;
1329
1330  -disable-* | --disable-*)
1331    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1332    # Reject names that are not valid shell variable names.
1333    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1334      as_fn_error $? "invalid feature name: $ac_useropt"
1335    ac_useropt_orig=$ac_useropt
1336    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1337    case $ac_user_opts in
1338      *"
1339"enable_$ac_useropt"
1340"*) ;;
1341      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1342	 ac_unrecognized_sep=', ';;
1343    esac
1344    eval enable_$ac_useropt=no ;;
1345
1346  -docdir | --docdir | --docdi | --doc | --do)
1347    ac_prev=docdir ;;
1348  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1349    docdir=$ac_optarg ;;
1350
1351  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1352    ac_prev=dvidir ;;
1353  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1354    dvidir=$ac_optarg ;;
1355
1356  -enable-* | --enable-*)
1357    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1358    # Reject names that are not valid shell variable names.
1359    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1360      as_fn_error $? "invalid feature name: $ac_useropt"
1361    ac_useropt_orig=$ac_useropt
1362    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1363    case $ac_user_opts in
1364      *"
1365"enable_$ac_useropt"
1366"*) ;;
1367      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1368	 ac_unrecognized_sep=', ';;
1369    esac
1370    eval enable_$ac_useropt=\$ac_optarg ;;
1371
1372  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1373  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1374  | --exec | --exe | --ex)
1375    ac_prev=exec_prefix ;;
1376  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1377  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1378  | --exec=* | --exe=* | --ex=*)
1379    exec_prefix=$ac_optarg ;;
1380
1381  -gas | --gas | --ga | --g)
1382    # Obsolete; use --with-gas.
1383    with_gas=yes ;;
1384
1385  -help | --help | --hel | --he | -h)
1386    ac_init_help=long ;;
1387  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1388    ac_init_help=recursive ;;
1389  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1390    ac_init_help=short ;;
1391
1392  -host | --host | --hos | --ho)
1393    ac_prev=host_alias ;;
1394  -host=* | --host=* | --hos=* | --ho=*)
1395    host_alias=$ac_optarg ;;
1396
1397  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1398    ac_prev=htmldir ;;
1399  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1400  | --ht=*)
1401    htmldir=$ac_optarg ;;
1402
1403  -includedir | --includedir | --includedi | --included | --include \
1404  | --includ | --inclu | --incl | --inc)
1405    ac_prev=includedir ;;
1406  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1407  | --includ=* | --inclu=* | --incl=* | --inc=*)
1408    includedir=$ac_optarg ;;
1409
1410  -infodir | --infodir | --infodi | --infod | --info | --inf)
1411    ac_prev=infodir ;;
1412  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1413    infodir=$ac_optarg ;;
1414
1415  -libdir | --libdir | --libdi | --libd)
1416    ac_prev=libdir ;;
1417  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1418    libdir=$ac_optarg ;;
1419
1420  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1421  | --libexe | --libex | --libe)
1422    ac_prev=libexecdir ;;
1423  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1424  | --libexe=* | --libex=* | --libe=*)
1425    libexecdir=$ac_optarg ;;
1426
1427  -localedir | --localedir | --localedi | --localed | --locale)
1428    ac_prev=localedir ;;
1429  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1430    localedir=$ac_optarg ;;
1431
1432  -localstatedir | --localstatedir | --localstatedi | --localstated \
1433  | --localstate | --localstat | --localsta | --localst | --locals)
1434    ac_prev=localstatedir ;;
1435  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1436  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1437    localstatedir=$ac_optarg ;;
1438
1439  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1440    ac_prev=mandir ;;
1441  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1442    mandir=$ac_optarg ;;
1443
1444  -nfp | --nfp | --nf)
1445    # Obsolete; use --without-fp.
1446    with_fp=no ;;
1447
1448  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1449  | --no-cr | --no-c | -n)
1450    no_create=yes ;;
1451
1452  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1453  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1454    no_recursion=yes ;;
1455
1456  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1457  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1458  | --oldin | --oldi | --old | --ol | --o)
1459    ac_prev=oldincludedir ;;
1460  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1461  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1462  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1463    oldincludedir=$ac_optarg ;;
1464
1465  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1466    ac_prev=prefix ;;
1467  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1468    prefix=$ac_optarg ;;
1469
1470  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1471  | --program-pre | --program-pr | --program-p)
1472    ac_prev=program_prefix ;;
1473  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1474  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1475    program_prefix=$ac_optarg ;;
1476
1477  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1478  | --program-suf | --program-su | --program-s)
1479    ac_prev=program_suffix ;;
1480  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1481  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1482    program_suffix=$ac_optarg ;;
1483
1484  -program-transform-name | --program-transform-name \
1485  | --program-transform-nam | --program-transform-na \
1486  | --program-transform-n | --program-transform- \
1487  | --program-transform | --program-transfor \
1488  | --program-transfo | --program-transf \
1489  | --program-trans | --program-tran \
1490  | --progr-tra | --program-tr | --program-t)
1491    ac_prev=program_transform_name ;;
1492  -program-transform-name=* | --program-transform-name=* \
1493  | --program-transform-nam=* | --program-transform-na=* \
1494  | --program-transform-n=* | --program-transform-=* \
1495  | --program-transform=* | --program-transfor=* \
1496  | --program-transfo=* | --program-transf=* \
1497  | --program-trans=* | --program-tran=* \
1498  | --progr-tra=* | --program-tr=* | --program-t=*)
1499    program_transform_name=$ac_optarg ;;
1500
1501  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1502    ac_prev=pdfdir ;;
1503  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1504    pdfdir=$ac_optarg ;;
1505
1506  -psdir | --psdir | --psdi | --psd | --ps)
1507    ac_prev=psdir ;;
1508  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1509    psdir=$ac_optarg ;;
1510
1511  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1512  | -silent | --silent | --silen | --sile | --sil)
1513    silent=yes ;;
1514
1515  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1516    ac_prev=sbindir ;;
1517  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1518  | --sbi=* | --sb=*)
1519    sbindir=$ac_optarg ;;
1520
1521  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1522  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1523  | --sharedst | --shareds | --shared | --share | --shar \
1524  | --sha | --sh)
1525    ac_prev=sharedstatedir ;;
1526  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1527  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1528  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1529  | --sha=* | --sh=*)
1530    sharedstatedir=$ac_optarg ;;
1531
1532  -site | --site | --sit)
1533    ac_prev=site ;;
1534  -site=* | --site=* | --sit=*)
1535    site=$ac_optarg ;;
1536
1537  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1538    ac_prev=srcdir ;;
1539  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1540    srcdir=$ac_optarg ;;
1541
1542  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1543  | --syscon | --sysco | --sysc | --sys | --sy)
1544    ac_prev=sysconfdir ;;
1545  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1546  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1547    sysconfdir=$ac_optarg ;;
1548
1549  -target | --target | --targe | --targ | --tar | --ta | --t)
1550    ac_prev=target_alias ;;
1551  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1552    target_alias=$ac_optarg ;;
1553
1554  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1555    verbose=yes ;;
1556
1557  -version | --version | --versio | --versi | --vers | -V)
1558    ac_init_version=: ;;
1559
1560  -with-* | --with-*)
1561    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1562    # Reject names that are not valid shell variable names.
1563    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1564      as_fn_error $? "invalid package name: $ac_useropt"
1565    ac_useropt_orig=$ac_useropt
1566    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1567    case $ac_user_opts in
1568      *"
1569"with_$ac_useropt"
1570"*) ;;
1571      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1572	 ac_unrecognized_sep=', ';;
1573    esac
1574    eval with_$ac_useropt=\$ac_optarg ;;
1575
1576  -without-* | --without-*)
1577    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1578    # Reject names that are not valid shell variable names.
1579    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1580      as_fn_error $? "invalid package name: $ac_useropt"
1581    ac_useropt_orig=$ac_useropt
1582    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1583    case $ac_user_opts in
1584      *"
1585"with_$ac_useropt"
1586"*) ;;
1587      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1588	 ac_unrecognized_sep=', ';;
1589    esac
1590    eval with_$ac_useropt=no ;;
1591
1592  --x)
1593    # Obsolete; use --with-x.
1594    with_x=yes ;;
1595
1596  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1597  | --x-incl | --x-inc | --x-in | --x-i)
1598    ac_prev=x_includes ;;
1599  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1600  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1601    x_includes=$ac_optarg ;;
1602
1603  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1604  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1605    ac_prev=x_libraries ;;
1606  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1607  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1608    x_libraries=$ac_optarg ;;
1609
1610  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1611Try \`$0 --help' for more information"
1612    ;;
1613
1614  *=*)
1615    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1616    # Reject names that are not valid shell variable names.
1617    case $ac_envvar in #(
1618      '' | [0-9]* | *[!_$as_cr_alnum]* )
1619      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1620    esac
1621    eval $ac_envvar=\$ac_optarg
1622    export $ac_envvar ;;
1623
1624  *)
1625    # FIXME: should be removed in autoconf 3.0.
1626    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1627    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1628      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1629    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1630    ;;
1631
1632  esac
1633done
1634
1635if test -n "$ac_prev"; then
1636  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1637  as_fn_error $? "missing argument to $ac_option"
1638fi
1639
1640if test -n "$ac_unrecognized_opts"; then
1641  case $enable_option_checking in
1642    no) ;;
1643    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1644    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1645  esac
1646fi
1647
1648# Check all directory arguments for consistency.
1649for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1650		datadir sysconfdir sharedstatedir localstatedir includedir \
1651		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1652		libdir localedir mandir
1653do
1654  eval ac_val=\$$ac_var
1655  # Remove trailing slashes.
1656  case $ac_val in
1657    */ )
1658      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1659      eval $ac_var=\$ac_val;;
1660  esac
1661  # Be sure to have absolute directory names.
1662  case $ac_val in
1663    [\\/$]* | ?:[\\/]* )  continue;;
1664    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1665  esac
1666  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1667done
1668
1669# There might be people who depend on the old broken behavior: `$host'
1670# used to hold the argument of --host etc.
1671# FIXME: To remove some day.
1672build=$build_alias
1673host=$host_alias
1674target=$target_alias
1675
1676# FIXME: To remove some day.
1677if test "x$host_alias" != x; then
1678  if test "x$build_alias" = x; then
1679    cross_compiling=maybe
1680  elif test "x$build_alias" != "x$host_alias"; then
1681    cross_compiling=yes
1682  fi
1683fi
1684
1685ac_tool_prefix=
1686test -n "$host_alias" && ac_tool_prefix=$host_alias-
1687
1688test "$silent" = yes && exec 6>/dev/null
1689
1690
1691ac_pwd=`pwd` && test -n "$ac_pwd" &&
1692ac_ls_di=`ls -di .` &&
1693ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1694  as_fn_error $? "working directory cannot be determined"
1695test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1696  as_fn_error $? "pwd does not report name of working directory"
1697
1698
1699# Find the source files, if location was not specified.
1700if test -z "$srcdir"; then
1701  ac_srcdir_defaulted=yes
1702  # Try the directory containing this script, then the parent directory.
1703  ac_confdir=`$as_dirname -- "$as_myself" ||
1704$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1705	 X"$as_myself" : 'X\(//\)[^/]' \| \
1706	 X"$as_myself" : 'X\(//\)$' \| \
1707	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1708$as_echo X"$as_myself" |
1709    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1710	    s//\1/
1711	    q
1712	  }
1713	  /^X\(\/\/\)[^/].*/{
1714	    s//\1/
1715	    q
1716	  }
1717	  /^X\(\/\/\)$/{
1718	    s//\1/
1719	    q
1720	  }
1721	  /^X\(\/\).*/{
1722	    s//\1/
1723	    q
1724	  }
1725	  s/.*/./; q'`
1726  srcdir=$ac_confdir
1727  if test ! -r "$srcdir/$ac_unique_file"; then
1728    srcdir=..
1729  fi
1730else
1731  ac_srcdir_defaulted=no
1732fi
1733if test ! -r "$srcdir/$ac_unique_file"; then
1734  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1735  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1736fi
1737ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1738ac_abs_confdir=`(
1739	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1740	pwd)`
1741# When building in place, set srcdir=.
1742if test "$ac_abs_confdir" = "$ac_pwd"; then
1743  srcdir=.
1744fi
1745# Remove unnecessary trailing slashes from srcdir.
1746# Double slashes in file names in object file debugging info
1747# mess up M-x gdb in Emacs.
1748case $srcdir in
1749*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1750esac
1751for ac_var in $ac_precious_vars; do
1752  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1753  eval ac_env_${ac_var}_value=\$${ac_var}
1754  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1755  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1756done
1757
1758#
1759# Report the --help message.
1760#
1761if test "$ac_init_help" = "long"; then
1762  # Omit some internal or obsolete options to make the list less imposing.
1763  # This message is too long to be a string in the A/UX 3.1 sh.
1764  cat <<_ACEOF
1765\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1766
1767Usage: $0 [OPTION]... [VAR=VALUE]...
1768
1769To assign environment variables (e.g., CC, CFLAGS...), specify them as
1770VAR=VALUE.  See below for descriptions of some of the useful variables.
1771
1772Defaults for the options are specified in brackets.
1773
1774Configuration:
1775  -h, --help              display this help and exit
1776      --help=short        display options specific to this package
1777      --help=recursive    display the short help of all the included packages
1778  -V, --version           display version information and exit
1779  -q, --quiet, --silent   do not print \`checking ...' messages
1780      --cache-file=FILE   cache test results in FILE [disabled]
1781  -C, --config-cache      alias for \`--cache-file=config.cache'
1782  -n, --no-create         do not create output files
1783      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1784
1785Installation directories:
1786  --prefix=PREFIX         install architecture-independent files in PREFIX
1787                          [$ac_default_prefix]
1788  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1789                          [PREFIX]
1790
1791By default, \`make install' will install all the files in
1792\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1793an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1794for instance \`--prefix=\$HOME'.
1795
1796For better control, use the options below.
1797
1798Fine tuning of the installation directories:
1799  --bindir=DIR            user executables [EPREFIX/bin]
1800  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1801  --libexecdir=DIR        program executables [EPREFIX/libexec]
1802  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1803  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1804  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1805  --libdir=DIR            object code libraries [EPREFIX/lib]
1806  --includedir=DIR        C header files [PREFIX/include]
1807  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1808  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1809  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1810  --infodir=DIR           info documentation [DATAROOTDIR/info]
1811  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1812  --mandir=DIR            man documentation [DATAROOTDIR/man]
1813  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1814  --htmldir=DIR           html documentation [DOCDIR]
1815  --dvidir=DIR            dvi documentation [DOCDIR]
1816  --pdfdir=DIR            pdf documentation [DOCDIR]
1817  --psdir=DIR             ps documentation [DOCDIR]
1818_ACEOF
1819
1820  cat <<\_ACEOF
1821
1822X features:
1823  --x-includes=DIR    X include files are in DIR
1824  --x-libraries=DIR   X library files are in DIR
1825
1826System types:
1827  --build=BUILD     configure for building on BUILD [guessed]
1828  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1829  --target=TARGET   configure for building compilers for TARGET [HOST]
1830_ACEOF
1831fi
1832
1833if test -n "$ac_init_help"; then
1834  case $ac_init_help in
1835     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1836   esac
1837  cat <<\_ACEOF
1838
1839Optional Features:
1840  --disable-option-checking  ignore unrecognized --enable/--with options
1841  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1842  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1843  --enable-openjdk-only   suppress building custom source even if present
1844                          [disabled]
1845  --enable-debug          set the debug level to fastdebug (shorthand for
1846                          --with-debug-level=fastdebug) [disabled]
1847  --disable-headful       disable building headful support (graphical UI
1848                          support) [enabled]
1849  --enable-hotspot-test-in-build
1850                          run the Queens test after Hotspot build [disabled]
1851  --enable-unlimited-crypto
1852                          Enable unlimited crypto policy [disabled]
1853  --enable-rmiconnector-iiop
1854                          enable the JMX RMIConnector iiop transport
1855                          [disabled]
1856  --disable-warnings-as-errors
1857                          do not consider native warnings to be an error
1858                          [enabled]
1859  --disable-debug-symbols disable generation of debug symbols [enabled]
1860  --disable-zip-debug-info
1861                          disable zipping of debug-info files [enabled]
1862  --enable-native-coverage
1863                          enable native compilation with code coverage
1864                          data[disabled]
1865  --disable-freetype-bundling
1866                          disable bundling of the freetype library with the
1867                          build result [enabled on Windows or when using
1868                          --with-freetype, disabled otherwise]
1869  --enable-sjavac         use sjavac to do fast incremental compiles
1870                          [disabled]
1871  --disable-precompiled-headers
1872                          disable using precompiled headers when compiling C++
1873                          [enabled]
1874  --enable-ccache         enable using ccache to speed up recompilations
1875                          [disabled]
1876
1877Optional Packages:
1878  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1879  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1880  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1881                          support it), e.g. --with-target-bits=32 [guessed]
1882  --with-custom-make-dir  Deprecated. Option is kept for backwards
1883                          compatibility and is ignored
1884  --with-jdk-variant      JDK variant to build (normal) [normal]
1885  --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1886  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1887                          client, minimal1, kernel, zero, zeroshark, core)
1888                          [server]
1889  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
1890                          optimized (HotSpot build only)) [release]
1891  --with-devkit           use this devkit for compilers, tools and resources
1892  --with-sys-root         alias for --with-sysroot for backwards compatability
1893  --with-sysroot          use this directory as sysroot
1894  --with-tools-dir        alias for --with-toolchain-path for backwards
1895                          compatibility
1896  --with-toolchain-path   prepend these directories when searching for
1897                          toolchain binaries (compilers etc)
1898  --with-extra-path       prepend these directories to the default path
1899  --with-sdk-name         use the platform SDK of the given name. [macosx]
1900  --with-conf-name        use this as the name of the configuration [generated
1901                          from important configuration options]
1902  --with-output-sync      set make output sync type if supported by make.
1903                          [recurse]
1904  --with-builddeps-conf   use this configuration file for the builddeps
1905  --with-builddeps-server download and use build dependencies from this server
1906                          url
1907  --with-builddeps-dir    store downloaded build dependencies here
1908                          [/localhome/builddeps]
1909  --with-builddeps-group  chgrp the downloaded build dependencies to this
1910                          group
1911  --with-cacerts-file     specify alternative cacerts file
1912  --with-milestone        Set milestone value for build [internal]
1913  --with-update-version   Set update version value for build [b00]
1914  --with-user-release-suffix
1915                          Add a custom string to the version string if build
1916                          number is not set.[username_builddateb00]
1917  --with-build-number     Set build number value for build [b00]
1918  --with-copyright-year   Set copyright year value for build [current year]
1919  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1920  --with-add-source-root  for each and every source directory, look in this
1921                          additional source root for the same directory; if it
1922                          exists and have files in it, include it in the build
1923  --with-override-source-root
1924                          for each and every source directory, look in this
1925                          override source root for the same directory; if it
1926                          exists, use that directory instead and ignore the
1927                          directory in the original source root
1928  --with-adds-and-overrides
1929                          use the subdirs 'adds' and 'overrides' in the
1930                          specified directory as add-source-root and
1931                          override-source-root
1932  --with-override-langtools
1933                          use this langtools dir for the build
1934  --with-override-corba   use this corba dir for the build
1935  --with-override-jaxp    use this jaxp dir for the build
1936  --with-override-jaxws   use this jaxws dir for the build
1937  --with-override-hotspot use this hotspot dir for the build
1938  --with-override-nashorn use this nashorn dir for the build
1939  --with-override-jdk     use this jdk dir for the build
1940  --with-import-hotspot   import hotspot binaries from this jdk image or
1941                          hotspot build dist dir instead of building from
1942                          source
1943  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
1944                          to show possible values [platform dependent]
1945  --with-toolchain-version
1946                          the version of the toolchain to look for, use
1947                          '--help' to show possible values [platform
1948                          dependent]
1949  --with-jtreg            Regression Test Harness [probed]
1950  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1951  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1952  --with-extra-ldflags    extra flags to be used when linking jdk
1953  --with-x                use the X Window System
1954  --with-cups             specify prefix directory for the cups package
1955                          (expecting the headers under PATH/include)
1956  --with-cups-include     specify directory for the cups include files
1957  --with-freetype         specify prefix directory for the freetype package
1958                          (expecting the libraries under PATH/lib and the
1959                          headers under PATH/include)
1960  --with-freetype-include specify directory for the freetype include files
1961  --with-freetype-lib     specify directory for the freetype library
1962  --with-freetype-src     specify directory with freetype sources to
1963                          automatically build the library (experimental,
1964                          Windows-only)
1965  --with-alsa             specify prefix directory for the alsa package
1966                          (expecting the libraries under PATH/lib and the
1967                          headers under PATH/include)
1968  --with-alsa-include     specify directory for the alsa include files
1969  --with-alsa-lib         specify directory for the alsa library
1970  --with-libjpeg          use libjpeg from build system or OpenJDK source
1971                          (system, bundled) [bundled]
1972  --with-giflib           use giflib from build system or OpenJDK source
1973                          (system, bundled) [bundled]
1974  --with-lcms             use lcms2 from build system or OpenJDK source
1975                          (system, bundled) [bundled]
1976  --with-libpng           use libpng from build system or OpenJDK source
1977                          (system, bundled) [bundled]
1978  --with-zlib             use zlib from build system or OpenJDK source
1979                          (system, bundled) [bundled]
1980  --with-stdc++lib=<static>,<dynamic>,<default>
1981                          force linking of the C++ runtime on Linux to either
1982                          static or dynamic, default is static with dynamic as
1983                          fallback
1984  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
1985                          (Windows only) [probed]
1986  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
1987                          (Windows only) [probed]
1988  --with-dxsdk            Deprecated. Option is kept for backwards
1989                          compatibility and is ignored
1990  --with-dxsdk-lib        Deprecated. Option is kept for backwards
1991                          compatibility and is ignored
1992  --with-dxsdk-include    Deprecated. Option is kept for backwards
1993                          compatibility and is ignored
1994  --with-num-cores        number of cores in the build system, e.g.
1995                          --with-num-cores=8 [probed]
1996  --with-memory-size      memory (in MB) available in the build system, e.g.
1997                          --with-memory-size=1024 [probed]
1998  --with-jobs             number of parallel jobs to let make run [calculated
1999                          based on cores and memory]
2000  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2001                          invocations of boot JDK, overriding the default
2002                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2003                          -enableassertions"
2004  --with-sjavac-server-java
2005                          use this java binary for running the sjavac
2006                          background server [Boot JDK java]
2007  --with-ccache-dir       where to store ccache files [~/.ccache]
2008
2009Some influential environment variables:
2010  BASENAME    Override default value for BASENAME
2011  BASH        Override default value for BASH
2012  CAT         Override default value for CAT
2013  CHMOD       Override default value for CHMOD
2014  CMP         Override default value for CMP
2015  COMM        Override default value for COMM
2016  CP          Override default value for CP
2017  CUT         Override default value for CUT
2018  DATE        Override default value for DATE
2019  DIFF        Override default value for DIFF
2020  DIRNAME     Override default value for DIRNAME
2021  ECHO        Override default value for ECHO
2022  EXPR        Override default value for EXPR
2023  FILE        Override default value for FILE
2024  FIND        Override default value for FIND
2025  HEAD        Override default value for HEAD
2026  LN          Override default value for LN
2027  LS          Override default value for LS
2028  MKDIR       Override default value for MKDIR
2029  MKTEMP      Override default value for MKTEMP
2030  MV          Override default value for MV
2031  NAWK        Override default value for NAWK
2032  PRINTF      Override default value for PRINTF
2033  RM          Override default value for RM
2034  SH          Override default value for SH
2035  SORT        Override default value for SORT
2036  TAIL        Override default value for TAIL
2037  TAR         Override default value for TAR
2038  TEE         Override default value for TEE
2039  TOUCH       Override default value for TOUCH
2040  TR          Override default value for TR
2041  UNAME       Override default value for UNAME
2042  UNIQ        Override default value for UNIQ
2043  WC          Override default value for WC
2044  WHICH       Override default value for WHICH
2045  XARGS       Override default value for XARGS
2046  AWK         Override default value for AWK
2047  GREP        Override default value for GREP
2048  EGREP       Override default value for EGREP
2049  FGREP       Override default value for FGREP
2050  SED         Override default value for SED
2051  CYGPATH     Override default value for CYGPATH
2052  READLINK    Override default value for READLINK
2053  DF          Override default value for DF
2054  SETFILE     Override default value for SETFILE
2055  CPIO        Override default value for CPIO
2056  UNZIP       Override default value for UNZIP
2057  ZIP         Override default value for ZIP
2058  LDD         Override default value for LDD
2059  OTOOL       Override default value for OTOOL
2060  READELF     Override default value for READELF
2061  HG          Override default value for HG
2062  STAT        Override default value for STAT
2063  TIME        Override default value for TIME
2064  DSYMUTIL    Override default value for DSYMUTIL
2065  XATTR       Override default value for XATTR
2066  CODESIGN    Override default value for CODESIGN
2067  PKG_CONFIG  path to pkg-config utility
2068  JAVA        Override default value for JAVA
2069  JAVAC       Override default value for JAVAC
2070  JAVAH       Override default value for JAVAH
2071  JAR         Override default value for JAR
2072  JARSIGNER   Override default value for JARSIGNER
2073  CC          C compiler command
2074  CFLAGS      C compiler flags
2075  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2076              nonstandard directory <lib dir>
2077  LIBS        libraries to pass to the linker, e.g. -l<library>
2078  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2079              you have headers in a nonstandard directory <include dir>
2080  CXX         C++ compiler command
2081  CXXFLAGS    C++ compiler flags
2082  CPP         C preprocessor
2083  CXXCPP      C++ preprocessor
2084  AS          Override default value for AS
2085  AR          Override default value for AR
2086  LIPO        Override default value for LIPO
2087  STRIP       Override default value for STRIP
2088  NM          Override default value for NM
2089  GNM         Override default value for GNM
2090  OBJCOPY     Override default value for OBJCOPY
2091  OBJDUMP     Override default value for OBJDUMP
2092  BUILD_CC    Override default value for BUILD_CC
2093  BUILD_CXX   Override default value for BUILD_CXX
2094  BUILD_LD    Override default value for BUILD_LD
2095  JTREGEXE    Override default value for JTREGEXE
2096  XMKMF       Path to xmkmf, Makefile generator for X Window System
2097  FREETYPE_CFLAGS
2098              C compiler flags for FREETYPE, overriding pkg-config
2099  FREETYPE_LIBS
2100              linker flags for FREETYPE, overriding pkg-config
2101  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2102  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2103  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2104  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2105  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2106  PNG_LIBS    linker flags for PNG, overriding pkg-config
2107  LIBFFI_CFLAGS
2108              C compiler flags for LIBFFI, overriding pkg-config
2109  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2110  CCACHE      Override default value for CCACHE
2111
2112Use these variables to override the choices made by `configure' or to help
2113it to find libraries and programs with nonstandard names/locations.
2114
2115Report bugs to <build-dev@openjdk.java.net>.
2116OpenJDK home page: <http://openjdk.java.net>.
2117_ACEOF
2118ac_status=$?
2119fi
2120
2121if test "$ac_init_help" = "recursive"; then
2122  # If there are subdirs, report their specific --help.
2123  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2124    test -d "$ac_dir" ||
2125      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2126      continue
2127    ac_builddir=.
2128
2129case "$ac_dir" in
2130.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2131*)
2132  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2133  # A ".." for each directory in $ac_dir_suffix.
2134  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2135  case $ac_top_builddir_sub in
2136  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2137  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2138  esac ;;
2139esac
2140ac_abs_top_builddir=$ac_pwd
2141ac_abs_builddir=$ac_pwd$ac_dir_suffix
2142# for backward compatibility:
2143ac_top_builddir=$ac_top_build_prefix
2144
2145case $srcdir in
2146  .)  # We are building in place.
2147    ac_srcdir=.
2148    ac_top_srcdir=$ac_top_builddir_sub
2149    ac_abs_top_srcdir=$ac_pwd ;;
2150  [\\/]* | ?:[\\/]* )  # Absolute name.
2151    ac_srcdir=$srcdir$ac_dir_suffix;
2152    ac_top_srcdir=$srcdir
2153    ac_abs_top_srcdir=$srcdir ;;
2154  *) # Relative name.
2155    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2156    ac_top_srcdir=$ac_top_build_prefix$srcdir
2157    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2158esac
2159ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2160
2161    cd "$ac_dir" || { ac_status=$?; continue; }
2162    # Check for guested configure.
2163    if test -f "$ac_srcdir/configure.gnu"; then
2164      echo &&
2165      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2166    elif test -f "$ac_srcdir/configure"; then
2167      echo &&
2168      $SHELL "$ac_srcdir/configure" --help=recursive
2169    else
2170      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2171    fi || ac_status=$?
2172    cd "$ac_pwd" || { ac_status=$?; break; }
2173  done
2174fi
2175
2176test -n "$ac_init_help" && exit $ac_status
2177if $ac_init_version; then
2178  cat <<\_ACEOF
2179OpenJDK configure jdk9
2180generated by GNU Autoconf 2.69
2181
2182Copyright (C) 2012 Free Software Foundation, Inc.
2183This configure script is free software; the Free Software Foundation
2184gives unlimited permission to copy, distribute and modify it.
2185_ACEOF
2186  exit
2187fi
2188
2189## ------------------------ ##
2190## Autoconf initialization. ##
2191## ------------------------ ##
2192
2193# ac_fn_c_try_compile LINENO
2194# --------------------------
2195# Try to compile conftest.$ac_ext, and return whether this succeeded.
2196ac_fn_c_try_compile ()
2197{
2198  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2199  rm -f conftest.$ac_objext
2200  if { { ac_try="$ac_compile"
2201case "(($ac_try" in
2202  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2203  *) ac_try_echo=$ac_try;;
2204esac
2205eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2206$as_echo "$ac_try_echo"; } >&5
2207  (eval "$ac_compile") 2>conftest.err
2208  ac_status=$?
2209  if test -s conftest.err; then
2210    grep -v '^ *+' conftest.err >conftest.er1
2211    cat conftest.er1 >&5
2212    mv -f conftest.er1 conftest.err
2213  fi
2214  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2215  test $ac_status = 0; } && {
2216	 test -z "$ac_c_werror_flag" ||
2217	 test ! -s conftest.err
2218       } && test -s conftest.$ac_objext; then :
2219  ac_retval=0
2220else
2221  $as_echo "$as_me: failed program was:" >&5
2222sed 's/^/| /' conftest.$ac_ext >&5
2223
2224	ac_retval=1
2225fi
2226  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2227  as_fn_set_status $ac_retval
2228
2229} # ac_fn_c_try_compile
2230
2231# ac_fn_cxx_try_compile LINENO
2232# ----------------------------
2233# Try to compile conftest.$ac_ext, and return whether this succeeded.
2234ac_fn_cxx_try_compile ()
2235{
2236  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2237  rm -f conftest.$ac_objext
2238  if { { ac_try="$ac_compile"
2239case "(($ac_try" in
2240  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2241  *) ac_try_echo=$ac_try;;
2242esac
2243eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2244$as_echo "$ac_try_echo"; } >&5
2245  (eval "$ac_compile") 2>conftest.err
2246  ac_status=$?
2247  if test -s conftest.err; then
2248    grep -v '^ *+' conftest.err >conftest.er1
2249    cat conftest.er1 >&5
2250    mv -f conftest.er1 conftest.err
2251  fi
2252  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2253  test $ac_status = 0; } && {
2254	 test -z "$ac_cxx_werror_flag" ||
2255	 test ! -s conftest.err
2256       } && test -s conftest.$ac_objext; then :
2257  ac_retval=0
2258else
2259  $as_echo "$as_me: failed program was:" >&5
2260sed 's/^/| /' conftest.$ac_ext >&5
2261
2262	ac_retval=1
2263fi
2264  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2265  as_fn_set_status $ac_retval
2266
2267} # ac_fn_cxx_try_compile
2268
2269# ac_fn_c_try_cpp LINENO
2270# ----------------------
2271# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2272ac_fn_c_try_cpp ()
2273{
2274  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2275  if { { ac_try="$ac_cpp conftest.$ac_ext"
2276case "(($ac_try" in
2277  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2278  *) ac_try_echo=$ac_try;;
2279esac
2280eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2281$as_echo "$ac_try_echo"; } >&5
2282  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2283  ac_status=$?
2284  if test -s conftest.err; then
2285    grep -v '^ *+' conftest.err >conftest.er1
2286    cat conftest.er1 >&5
2287    mv -f conftest.er1 conftest.err
2288  fi
2289  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2290  test $ac_status = 0; } > conftest.i && {
2291	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2292	 test ! -s conftest.err
2293       }; then :
2294  ac_retval=0
2295else
2296  $as_echo "$as_me: failed program was:" >&5
2297sed 's/^/| /' conftest.$ac_ext >&5
2298
2299    ac_retval=1
2300fi
2301  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2302  as_fn_set_status $ac_retval
2303
2304} # ac_fn_c_try_cpp
2305
2306# ac_fn_cxx_try_cpp LINENO
2307# ------------------------
2308# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2309ac_fn_cxx_try_cpp ()
2310{
2311  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2312  if { { ac_try="$ac_cpp conftest.$ac_ext"
2313case "(($ac_try" in
2314  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2315  *) ac_try_echo=$ac_try;;
2316esac
2317eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2318$as_echo "$ac_try_echo"; } >&5
2319  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2320  ac_status=$?
2321  if test -s conftest.err; then
2322    grep -v '^ *+' conftest.err >conftest.er1
2323    cat conftest.er1 >&5
2324    mv -f conftest.er1 conftest.err
2325  fi
2326  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2327  test $ac_status = 0; } > conftest.i && {
2328	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2329	 test ! -s conftest.err
2330       }; then :
2331  ac_retval=0
2332else
2333  $as_echo "$as_me: failed program was:" >&5
2334sed 's/^/| /' conftest.$ac_ext >&5
2335
2336    ac_retval=1
2337fi
2338  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2339  as_fn_set_status $ac_retval
2340
2341} # ac_fn_cxx_try_cpp
2342
2343# ac_fn_c_try_link LINENO
2344# -----------------------
2345# Try to link conftest.$ac_ext, and return whether this succeeded.
2346ac_fn_c_try_link ()
2347{
2348  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2349  rm -f conftest.$ac_objext conftest$ac_exeext
2350  if { { ac_try="$ac_link"
2351case "(($ac_try" in
2352  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2353  *) ac_try_echo=$ac_try;;
2354esac
2355eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2356$as_echo "$ac_try_echo"; } >&5
2357  (eval "$ac_link") 2>conftest.err
2358  ac_status=$?
2359  if test -s conftest.err; then
2360    grep -v '^ *+' conftest.err >conftest.er1
2361    cat conftest.er1 >&5
2362    mv -f conftest.er1 conftest.err
2363  fi
2364  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2365  test $ac_status = 0; } && {
2366	 test -z "$ac_c_werror_flag" ||
2367	 test ! -s conftest.err
2368       } && test -s conftest$ac_exeext && {
2369	 test "$cross_compiling" = yes ||
2370	 test -x conftest$ac_exeext
2371       }; then :
2372  ac_retval=0
2373else
2374  $as_echo "$as_me: failed program was:" >&5
2375sed 's/^/| /' conftest.$ac_ext >&5
2376
2377	ac_retval=1
2378fi
2379  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2380  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2381  # interfere with the next link command; also delete a directory that is
2382  # left behind by Apple's compiler.  We do this before executing the actions.
2383  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2384  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2385  as_fn_set_status $ac_retval
2386
2387} # ac_fn_c_try_link
2388
2389# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2390# ---------------------------------------------------------
2391# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2392# the include files in INCLUDES and setting the cache variable VAR
2393# accordingly.
2394ac_fn_cxx_check_header_mongrel ()
2395{
2396  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2397  if eval \${$3+:} false; then :
2398  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2399$as_echo_n "checking for $2... " >&6; }
2400if eval \${$3+:} false; then :
2401  $as_echo_n "(cached) " >&6
2402fi
2403eval ac_res=\$$3
2404	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2405$as_echo "$ac_res" >&6; }
2406else
2407  # Is the header compilable?
2408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2409$as_echo_n "checking $2 usability... " >&6; }
2410cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2411/* end confdefs.h.  */
2412$4
2413#include <$2>
2414_ACEOF
2415if ac_fn_cxx_try_compile "$LINENO"; then :
2416  ac_header_compiler=yes
2417else
2418  ac_header_compiler=no
2419fi
2420rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2422$as_echo "$ac_header_compiler" >&6; }
2423
2424# Is the header present?
2425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2426$as_echo_n "checking $2 presence... " >&6; }
2427cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2428/* end confdefs.h.  */
2429#include <$2>
2430_ACEOF
2431if ac_fn_cxx_try_cpp "$LINENO"; then :
2432  ac_header_preproc=yes
2433else
2434  ac_header_preproc=no
2435fi
2436rm -f conftest.err conftest.i conftest.$ac_ext
2437{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2438$as_echo "$ac_header_preproc" >&6; }
2439
2440# So?  What about this header?
2441case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2442  yes:no: )
2443    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2444$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2445    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2446$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2447    ;;
2448  no:yes:* )
2449    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2450$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2451    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2452$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2453    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2454$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2455    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2456$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2457    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2458$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2459( $as_echo "## ----------------------------------------- ##
2460## Report this to build-dev@openjdk.java.net ##
2461## ----------------------------------------- ##"
2462     ) | sed "s/^/$as_me: WARNING:     /" >&2
2463    ;;
2464esac
2465  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2466$as_echo_n "checking for $2... " >&6; }
2467if eval \${$3+:} false; then :
2468  $as_echo_n "(cached) " >&6
2469else
2470  eval "$3=\$ac_header_compiler"
2471fi
2472eval ac_res=\$$3
2473	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2474$as_echo "$ac_res" >&6; }
2475fi
2476  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2477
2478} # ac_fn_cxx_check_header_mongrel
2479
2480# ac_fn_cxx_try_run LINENO
2481# ------------------------
2482# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2483# that executables *can* be run.
2484ac_fn_cxx_try_run ()
2485{
2486  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2487  if { { ac_try="$ac_link"
2488case "(($ac_try" in
2489  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2490  *) ac_try_echo=$ac_try;;
2491esac
2492eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2493$as_echo "$ac_try_echo"; } >&5
2494  (eval "$ac_link") 2>&5
2495  ac_status=$?
2496  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2497  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2498  { { case "(($ac_try" in
2499  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2500  *) ac_try_echo=$ac_try;;
2501esac
2502eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2503$as_echo "$ac_try_echo"; } >&5
2504  (eval "$ac_try") 2>&5
2505  ac_status=$?
2506  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2507  test $ac_status = 0; }; }; then :
2508  ac_retval=0
2509else
2510  $as_echo "$as_me: program exited with status $ac_status" >&5
2511       $as_echo "$as_me: failed program was:" >&5
2512sed 's/^/| /' conftest.$ac_ext >&5
2513
2514       ac_retval=$ac_status
2515fi
2516  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2517  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2518  as_fn_set_status $ac_retval
2519
2520} # ac_fn_cxx_try_run
2521
2522# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2523# ---------------------------------------------------------
2524# Tests whether HEADER exists and can be compiled using the include files in
2525# INCLUDES, setting the cache variable VAR accordingly.
2526ac_fn_cxx_check_header_compile ()
2527{
2528  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2529  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2530$as_echo_n "checking for $2... " >&6; }
2531if eval \${$3+:} false; then :
2532  $as_echo_n "(cached) " >&6
2533else
2534  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2535/* end confdefs.h.  */
2536$4
2537#include <$2>
2538_ACEOF
2539if ac_fn_cxx_try_compile "$LINENO"; then :
2540  eval "$3=yes"
2541else
2542  eval "$3=no"
2543fi
2544rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2545fi
2546eval ac_res=\$$3
2547	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2548$as_echo "$ac_res" >&6; }
2549  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2550
2551} # ac_fn_cxx_check_header_compile
2552
2553# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2554# ----------------------------------------------
2555# Tries to find the compile-time value of EXPR in a program that includes
2556# INCLUDES, setting VAR accordingly. Returns whether the value could be
2557# computed
2558ac_fn_cxx_compute_int ()
2559{
2560  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2561  if test "$cross_compiling" = yes; then
2562    # Depending upon the size, compute the lo and hi bounds.
2563cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2564/* end confdefs.h.  */
2565$4
2566int
2567main ()
2568{
2569static int test_array [1 - 2 * !(($2) >= 0)];
2570test_array [0] = 0;
2571return test_array [0];
2572
2573  ;
2574  return 0;
2575}
2576_ACEOF
2577if ac_fn_cxx_try_compile "$LINENO"; then :
2578  ac_lo=0 ac_mid=0
2579  while :; do
2580    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2581/* end confdefs.h.  */
2582$4
2583int
2584main ()
2585{
2586static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2587test_array [0] = 0;
2588return test_array [0];
2589
2590  ;
2591  return 0;
2592}
2593_ACEOF
2594if ac_fn_cxx_try_compile "$LINENO"; then :
2595  ac_hi=$ac_mid; break
2596else
2597  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2598			if test $ac_lo -le $ac_mid; then
2599			  ac_lo= ac_hi=
2600			  break
2601			fi
2602			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2603fi
2604rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2605  done
2606else
2607  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2608/* end confdefs.h.  */
2609$4
2610int
2611main ()
2612{
2613static int test_array [1 - 2 * !(($2) < 0)];
2614test_array [0] = 0;
2615return test_array [0];
2616
2617  ;
2618  return 0;
2619}
2620_ACEOF
2621if ac_fn_cxx_try_compile "$LINENO"; then :
2622  ac_hi=-1 ac_mid=-1
2623  while :; do
2624    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2625/* end confdefs.h.  */
2626$4
2627int
2628main ()
2629{
2630static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2631test_array [0] = 0;
2632return test_array [0];
2633
2634  ;
2635  return 0;
2636}
2637_ACEOF
2638if ac_fn_cxx_try_compile "$LINENO"; then :
2639  ac_lo=$ac_mid; break
2640else
2641  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2642			if test $ac_mid -le $ac_hi; then
2643			  ac_lo= ac_hi=
2644			  break
2645			fi
2646			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2647fi
2648rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2649  done
2650else
2651  ac_lo= ac_hi=
2652fi
2653rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2654fi
2655rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2656# Binary search between lo and hi bounds.
2657while test "x$ac_lo" != "x$ac_hi"; do
2658  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2659  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2660/* end confdefs.h.  */
2661$4
2662int
2663main ()
2664{
2665static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2666test_array [0] = 0;
2667return test_array [0];
2668
2669  ;
2670  return 0;
2671}
2672_ACEOF
2673if ac_fn_cxx_try_compile "$LINENO"; then :
2674  ac_hi=$ac_mid
2675else
2676  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2677fi
2678rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2679done
2680case $ac_lo in #((
2681?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2682'') ac_retval=1 ;;
2683esac
2684  else
2685    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2686/* end confdefs.h.  */
2687$4
2688static long int longval () { return $2; }
2689static unsigned long int ulongval () { return $2; }
2690#include <stdio.h>
2691#include <stdlib.h>
2692int
2693main ()
2694{
2695
2696  FILE *f = fopen ("conftest.val", "w");
2697  if (! f)
2698    return 1;
2699  if (($2) < 0)
2700    {
2701      long int i = longval ();
2702      if (i != ($2))
2703	return 1;
2704      fprintf (f, "%ld", i);
2705    }
2706  else
2707    {
2708      unsigned long int i = ulongval ();
2709      if (i != ($2))
2710	return 1;
2711      fprintf (f, "%lu", i);
2712    }
2713  /* Do not output a trailing newline, as this causes \r\n confusion
2714     on some platforms.  */
2715  return ferror (f) || fclose (f) != 0;
2716
2717  ;
2718  return 0;
2719}
2720_ACEOF
2721if ac_fn_cxx_try_run "$LINENO"; then :
2722  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2723else
2724  ac_retval=1
2725fi
2726rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2727  conftest.$ac_objext conftest.beam conftest.$ac_ext
2728rm -f conftest.val
2729
2730  fi
2731  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2732  as_fn_set_status $ac_retval
2733
2734} # ac_fn_cxx_compute_int
2735
2736# ac_fn_cxx_try_link LINENO
2737# -------------------------
2738# Try to link conftest.$ac_ext, and return whether this succeeded.
2739ac_fn_cxx_try_link ()
2740{
2741  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2742  rm -f conftest.$ac_objext conftest$ac_exeext
2743  if { { ac_try="$ac_link"
2744case "(($ac_try" in
2745  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2746  *) ac_try_echo=$ac_try;;
2747esac
2748eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2749$as_echo "$ac_try_echo"; } >&5
2750  (eval "$ac_link") 2>conftest.err
2751  ac_status=$?
2752  if test -s conftest.err; then
2753    grep -v '^ *+' conftest.err >conftest.er1
2754    cat conftest.er1 >&5
2755    mv -f conftest.er1 conftest.err
2756  fi
2757  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2758  test $ac_status = 0; } && {
2759	 test -z "$ac_cxx_werror_flag" ||
2760	 test ! -s conftest.err
2761       } && test -s conftest$ac_exeext && {
2762	 test "$cross_compiling" = yes ||
2763	 test -x conftest$ac_exeext
2764       }; then :
2765  ac_retval=0
2766else
2767  $as_echo "$as_me: failed program was:" >&5
2768sed 's/^/| /' conftest.$ac_ext >&5
2769
2770	ac_retval=1
2771fi
2772  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2773  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2774  # interfere with the next link command; also delete a directory that is
2775  # left behind by Apple's compiler.  We do this before executing the actions.
2776  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2777  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2778  as_fn_set_status $ac_retval
2779
2780} # ac_fn_cxx_try_link
2781
2782# ac_fn_cxx_check_func LINENO FUNC VAR
2783# ------------------------------------
2784# Tests whether FUNC exists, setting the cache variable VAR accordingly
2785ac_fn_cxx_check_func ()
2786{
2787  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2788  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2789$as_echo_n "checking for $2... " >&6; }
2790if eval \${$3+:} false; then :
2791  $as_echo_n "(cached) " >&6
2792else
2793  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2794/* end confdefs.h.  */
2795/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2796   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2797#define $2 innocuous_$2
2798
2799/* System header to define __stub macros and hopefully few prototypes,
2800    which can conflict with char $2 (); below.
2801    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2802    <limits.h> exists even on freestanding compilers.  */
2803
2804#ifdef __STDC__
2805# include <limits.h>
2806#else
2807# include <assert.h>
2808#endif
2809
2810#undef $2
2811
2812/* Override any GCC internal prototype to avoid an error.
2813   Use char because int might match the return type of a GCC
2814   builtin and then its argument prototype would still apply.  */
2815#ifdef __cplusplus
2816extern "C"
2817#endif
2818char $2 ();
2819/* The GNU C library defines this for functions which it implements
2820    to always fail with ENOSYS.  Some functions are actually named
2821    something starting with __ and the normal name is an alias.  */
2822#if defined __stub_$2 || defined __stub___$2
2823choke me
2824#endif
2825
2826int
2827main ()
2828{
2829return $2 ();
2830  ;
2831  return 0;
2832}
2833_ACEOF
2834if ac_fn_cxx_try_link "$LINENO"; then :
2835  eval "$3=yes"
2836else
2837  eval "$3=no"
2838fi
2839rm -f core conftest.err conftest.$ac_objext \
2840    conftest$ac_exeext conftest.$ac_ext
2841fi
2842eval ac_res=\$$3
2843	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2844$as_echo "$ac_res" >&6; }
2845  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2846
2847} # ac_fn_cxx_check_func
2848
2849# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2850# -------------------------------------------------------
2851# Tests whether HEADER exists and can be compiled using the include files in
2852# INCLUDES, setting the cache variable VAR accordingly.
2853ac_fn_c_check_header_compile ()
2854{
2855  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2856  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2857$as_echo_n "checking for $2... " >&6; }
2858if eval \${$3+:} false; then :
2859  $as_echo_n "(cached) " >&6
2860else
2861  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2862/* end confdefs.h.  */
2863$4
2864#include <$2>
2865_ACEOF
2866if ac_fn_c_try_compile "$LINENO"; then :
2867  eval "$3=yes"
2868else
2869  eval "$3=no"
2870fi
2871rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2872fi
2873eval ac_res=\$$3
2874	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2875$as_echo "$ac_res" >&6; }
2876  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2877
2878} # ac_fn_c_check_header_compile
2879cat >config.log <<_ACEOF
2880This file contains any messages produced by compilers while
2881running configure, to aid debugging if configure makes a mistake.
2882
2883It was created by OpenJDK $as_me jdk9, which was
2884generated by GNU Autoconf 2.69.  Invocation command line was
2885
2886  $ $0 $@
2887
2888_ACEOF
2889exec 5>>config.log
2890{
2891cat <<_ASUNAME
2892## --------- ##
2893## Platform. ##
2894## --------- ##
2895
2896hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2897uname -m = `(uname -m) 2>/dev/null || echo unknown`
2898uname -r = `(uname -r) 2>/dev/null || echo unknown`
2899uname -s = `(uname -s) 2>/dev/null || echo unknown`
2900uname -v = `(uname -v) 2>/dev/null || echo unknown`
2901
2902/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2903/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2904
2905/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2906/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2907/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2908/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2909/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2910/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2911/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2912
2913_ASUNAME
2914
2915as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2916for as_dir in $PATH
2917do
2918  IFS=$as_save_IFS
2919  test -z "$as_dir" && as_dir=.
2920    $as_echo "PATH: $as_dir"
2921  done
2922IFS=$as_save_IFS
2923
2924} >&5
2925
2926cat >&5 <<_ACEOF
2927
2928
2929## ----------- ##
2930## Core tests. ##
2931## ----------- ##
2932
2933_ACEOF
2934
2935
2936# Keep a trace of the command line.
2937# Strip out --no-create and --no-recursion so they do not pile up.
2938# Strip out --silent because we don't want to record it for future runs.
2939# Also quote any args containing shell meta-characters.
2940# Make two passes to allow for proper duplicate-argument suppression.
2941ac_configure_args=
2942ac_configure_args0=
2943ac_configure_args1=
2944ac_must_keep_next=false
2945for ac_pass in 1 2
2946do
2947  for ac_arg
2948  do
2949    case $ac_arg in
2950    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2951    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2952    | -silent | --silent | --silen | --sile | --sil)
2953      continue ;;
2954    *\'*)
2955      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2956    esac
2957    case $ac_pass in
2958    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2959    2)
2960      as_fn_append ac_configure_args1 " '$ac_arg'"
2961      if test $ac_must_keep_next = true; then
2962	ac_must_keep_next=false # Got value, back to normal.
2963      else
2964	case $ac_arg in
2965	  *=* | --config-cache | -C | -disable-* | --disable-* \
2966	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2967	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2968	  | -with-* | --with-* | -without-* | --without-* | --x)
2969	    case "$ac_configure_args0 " in
2970	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2971	    esac
2972	    ;;
2973	  -* ) ac_must_keep_next=true ;;
2974	esac
2975      fi
2976      as_fn_append ac_configure_args " '$ac_arg'"
2977      ;;
2978    esac
2979  done
2980done
2981{ ac_configure_args0=; unset ac_configure_args0;}
2982{ ac_configure_args1=; unset ac_configure_args1;}
2983
2984# When interrupted or exit'd, cleanup temporary files, and complete
2985# config.log.  We remove comments because anyway the quotes in there
2986# would cause problems or look ugly.
2987# WARNING: Use '\'' to represent an apostrophe within the trap.
2988# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2989trap 'exit_status=$?
2990  # Save into config.log some information that might help in debugging.
2991  {
2992    echo
2993
2994    $as_echo "## ---------------- ##
2995## Cache variables. ##
2996## ---------------- ##"
2997    echo
2998    # The following way of writing the cache mishandles newlines in values,
2999(
3000  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3001    eval ac_val=\$$ac_var
3002    case $ac_val in #(
3003    *${as_nl}*)
3004      case $ac_var in #(
3005      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3006$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3007      esac
3008      case $ac_var in #(
3009      _ | IFS | as_nl) ;; #(
3010      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3011      *) { eval $ac_var=; unset $ac_var;} ;;
3012      esac ;;
3013    esac
3014  done
3015  (set) 2>&1 |
3016    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3017    *${as_nl}ac_space=\ *)
3018      sed -n \
3019	"s/'\''/'\''\\\\'\'''\''/g;
3020	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3021      ;; #(
3022    *)
3023      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3024      ;;
3025    esac |
3026    sort
3027)
3028    echo
3029
3030    $as_echo "## ----------------- ##
3031## Output variables. ##
3032## ----------------- ##"
3033    echo
3034    for ac_var in $ac_subst_vars
3035    do
3036      eval ac_val=\$$ac_var
3037      case $ac_val in
3038      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3039      esac
3040      $as_echo "$ac_var='\''$ac_val'\''"
3041    done | sort
3042    echo
3043
3044    if test -n "$ac_subst_files"; then
3045      $as_echo "## ------------------- ##
3046## File substitutions. ##
3047## ------------------- ##"
3048      echo
3049      for ac_var in $ac_subst_files
3050      do
3051	eval ac_val=\$$ac_var
3052	case $ac_val in
3053	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3054	esac
3055	$as_echo "$ac_var='\''$ac_val'\''"
3056      done | sort
3057      echo
3058    fi
3059
3060    if test -s confdefs.h; then
3061      $as_echo "## ----------- ##
3062## confdefs.h. ##
3063## ----------- ##"
3064      echo
3065      cat confdefs.h
3066      echo
3067    fi
3068    test "$ac_signal" != 0 &&
3069      $as_echo "$as_me: caught signal $ac_signal"
3070    $as_echo "$as_me: exit $exit_status"
3071  } >&5
3072  rm -f core *.core core.conftest.* &&
3073    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3074    exit $exit_status
3075' 0
3076for ac_signal in 1 2 13 15; do
3077  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3078done
3079ac_signal=0
3080
3081# confdefs.h avoids OS command line length limits that DEFS can exceed.
3082rm -f -r conftest* confdefs.h
3083
3084$as_echo "/* confdefs.h */" > confdefs.h
3085
3086# Predefined preprocessor variables.
3087
3088cat >>confdefs.h <<_ACEOF
3089#define PACKAGE_NAME "$PACKAGE_NAME"
3090_ACEOF
3091
3092cat >>confdefs.h <<_ACEOF
3093#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3094_ACEOF
3095
3096cat >>confdefs.h <<_ACEOF
3097#define PACKAGE_VERSION "$PACKAGE_VERSION"
3098_ACEOF
3099
3100cat >>confdefs.h <<_ACEOF
3101#define PACKAGE_STRING "$PACKAGE_STRING"
3102_ACEOF
3103
3104cat >>confdefs.h <<_ACEOF
3105#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3106_ACEOF
3107
3108cat >>confdefs.h <<_ACEOF
3109#define PACKAGE_URL "$PACKAGE_URL"
3110_ACEOF
3111
3112
3113# Let the site file select an alternate cache file if it wants to.
3114# Prefer an explicitly selected file to automatically selected ones.
3115ac_site_file1=NONE
3116ac_site_file2=NONE
3117if test -n "$CONFIG_SITE"; then
3118  # We do not want a PATH search for config.site.
3119  case $CONFIG_SITE in #((
3120    -*)  ac_site_file1=./$CONFIG_SITE;;
3121    */*) ac_site_file1=$CONFIG_SITE;;
3122    *)   ac_site_file1=./$CONFIG_SITE;;
3123  esac
3124elif test "x$prefix" != xNONE; then
3125  ac_site_file1=$prefix/share/config.site
3126  ac_site_file2=$prefix/etc/config.site
3127else
3128  ac_site_file1=$ac_default_prefix/share/config.site
3129  ac_site_file2=$ac_default_prefix/etc/config.site
3130fi
3131for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3132do
3133  test "x$ac_site_file" = xNONE && continue
3134  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3135    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3136$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3137    sed 's/^/| /' "$ac_site_file" >&5
3138    . "$ac_site_file" \
3139      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3140$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3141as_fn_error $? "failed to load site script $ac_site_file
3142See \`config.log' for more details" "$LINENO" 5; }
3143  fi
3144done
3145
3146if test -r "$cache_file"; then
3147  # Some versions of bash will fail to source /dev/null (special files
3148  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3149  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3150    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3151$as_echo "$as_me: loading cache $cache_file" >&6;}
3152    case $cache_file in
3153      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3154      *)                      . "./$cache_file";;
3155    esac
3156  fi
3157else
3158  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3159$as_echo "$as_me: creating cache $cache_file" >&6;}
3160  >$cache_file
3161fi
3162
3163# Check that the precious variables saved in the cache have kept the same
3164# value.
3165ac_cache_corrupted=false
3166for ac_var in $ac_precious_vars; do
3167  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3168  eval ac_new_set=\$ac_env_${ac_var}_set
3169  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3170  eval ac_new_val=\$ac_env_${ac_var}_value
3171  case $ac_old_set,$ac_new_set in
3172    set,)
3173      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3174$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3175      ac_cache_corrupted=: ;;
3176    ,set)
3177      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3178$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3179      ac_cache_corrupted=: ;;
3180    ,);;
3181    *)
3182      if test "x$ac_old_val" != "x$ac_new_val"; then
3183	# differences in whitespace do not lead to failure.
3184	ac_old_val_w=`echo x $ac_old_val`
3185	ac_new_val_w=`echo x $ac_new_val`
3186	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3187	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3188$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3189	  ac_cache_corrupted=:
3190	else
3191	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3192$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3193	  eval $ac_var=\$ac_old_val
3194	fi
3195	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3196$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3197	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3198$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3199      fi;;
3200  esac
3201  # Pass precious variables to config.status.
3202  if test "$ac_new_set" = set; then
3203    case $ac_new_val in
3204    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3205    *) ac_arg=$ac_var=$ac_new_val ;;
3206    esac
3207    case " $ac_configure_args " in
3208      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3209      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3210    esac
3211  fi
3212done
3213if $ac_cache_corrupted; then
3214  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3215$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3216  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3217$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3218  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3219fi
3220## -------------------- ##
3221## Main body of script. ##
3222## -------------------- ##
3223
3224ac_ext=c
3225ac_cpp='$CPP $CPPFLAGS'
3226ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3227ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3228ac_compiler_gnu=$ac_cv_c_compiler_gnu
3229
3230
3231
3232ac_aux_dir=
3233for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3234  if test -f "$ac_dir/install-sh"; then
3235    ac_aux_dir=$ac_dir
3236    ac_install_sh="$ac_aux_dir/install-sh -c"
3237    break
3238  elif test -f "$ac_dir/install.sh"; then
3239    ac_aux_dir=$ac_dir
3240    ac_install_sh="$ac_aux_dir/install.sh -c"
3241    break
3242  elif test -f "$ac_dir/shtool"; then
3243    ac_aux_dir=$ac_dir
3244    ac_install_sh="$ac_aux_dir/shtool install -c"
3245    break
3246  fi
3247done
3248if test -z "$ac_aux_dir"; then
3249  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
3250fi
3251
3252# These three variables are undocumented and unsupported,
3253# and are intended to be withdrawn in a future Autoconf release.
3254# They can cause serious problems if a builder's source tree is in a directory
3255# whose full name contains unusual characters.
3256ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3257ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3258ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3259
3260
3261# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3262
3263#
3264# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3265# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3266#
3267# This code is free software; you can redistribute it and/or modify it
3268# under the terms of the GNU General Public License version 2 only, as
3269# published by the Free Software Foundation.  Oracle designates this
3270# particular file as subject to the "Classpath" exception as provided
3271# by Oracle in the LICENSE file that accompanied this code.
3272#
3273# This code is distributed in the hope that it will be useful, but WITHOUT
3274# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3275# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3276# version 2 for more details (a copy is included in the LICENSE file that
3277# accompanied this code).
3278#
3279# You should have received a copy of the GNU General Public License version
3280# 2 along with this work; if not, write to the Free Software Foundation,
3281# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3282#
3283# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3284# or visit www.oracle.com if you need additional information or have any
3285# questions.
3286#
3287
3288#
3289# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3290#
3291# This program is free software; you can redistribute it and/or modify
3292# it under the terms of the GNU General Public License as published by
3293# the Free Software Foundation; either version 2 of the License, or
3294# (at your option) any later version.
3295#
3296# This program is distributed in the hope that it will be useful, but
3297# WITHOUT ANY WARRANTY; without even the implied warranty of
3298# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3299# General Public License for more details.
3300#
3301# You should have received a copy of the GNU General Public License
3302# along with this program; if not, write to the Free Software
3303# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3304#
3305# As a special exception to the GNU General Public License, if you
3306# distribute this file as part of a program that contains a
3307# configuration script generated by Autoconf, you may include it under
3308# the same distribution terms that you use for the rest of that program.
3309
3310# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3311# ----------------------------------
3312# PKG_PROG_PKG_CONFIG
3313
3314# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3315#
3316# Check to see whether a particular set of modules exists.  Similar
3317# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3318#
3319#
3320# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3321# this or PKG_CHECK_MODULES is called, or make sure to call
3322# PKG_CHECK_EXISTS manually
3323# --------------------------------------------------------------
3324
3325
3326
3327# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3328# ---------------------------------------------
3329# _PKG_CONFIG
3330
3331# _PKG_SHORT_ERRORS_SUPPORTED
3332# -----------------------------
3333# _PKG_SHORT_ERRORS_SUPPORTED
3334
3335
3336# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3337# [ACTION-IF-NOT-FOUND])
3338#
3339#
3340# Note that if there is a possibility the first call to
3341# PKG_CHECK_MODULES might not happen, you should be sure to include an
3342# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3343#
3344#
3345# --------------------------------------------------------------
3346# PKG_CHECK_MODULES
3347
3348
3349# Include these first...
3350#
3351# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3352# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3353#
3354# This code is free software; you can redistribute it and/or modify it
3355# under the terms of the GNU General Public License version 2 only, as
3356# published by the Free Software Foundation.  Oracle designates this
3357# particular file as subject to the "Classpath" exception as provided
3358# by Oracle in the LICENSE file that accompanied this code.
3359#
3360# This code is distributed in the hope that it will be useful, but WITHOUT
3361# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3362# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3363# version 2 for more details (a copy is included in the LICENSE file that
3364# accompanied this code).
3365#
3366# You should have received a copy of the GNU General Public License version
3367# 2 along with this work; if not, write to the Free Software Foundation,
3368# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3369#
3370# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3371# or visit www.oracle.com if you need additional information or have any
3372# questions.
3373#
3374
3375# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3376# If so, then append $1 to $2 \
3377# Also set JVM_ARG_OK to true/false depending on outcome.
3378
3379
3380# Appends a string to a path variable, only adding the : when needed.
3381
3382
3383# Prepends a string to a path variable, only adding the : when needed.
3384
3385
3386# This will make sure the given variable points to a full and proper
3387# path. This means:
3388# 1) There will be no spaces in the path. On unix platforms,
3389#    spaces in the path will result in an error. On Windows,
3390#    the path will be rewritten using short-style to be space-free.
3391# 2) The path will be absolute, and it will be in unix-style (on
3392#     cygwin).
3393# $1: The name of the variable to fix
3394
3395
3396# This will make sure the given variable points to a executable
3397# with a full and proper path. This means:
3398# 1) There will be no spaces in the path. On unix platforms,
3399#    spaces in the path will result in an error. On Windows,
3400#    the path will be rewritten using short-style to be space-free.
3401# 2) The path will be absolute, and it will be in unix-style (on
3402#     cygwin).
3403# Any arguments given to the executable is preserved.
3404# If the input variable does not have a directory specification, then
3405# it need to be in the PATH.
3406# $1: The name of the variable to fix
3407
3408
3409
3410
3411# Register a --with argument but mark it as deprecated
3412# $1: The name of the with argument to deprecate, not including --with-
3413
3414
3415# Register a --enable argument but mark it as deprecated
3416# $1: The name of the with argument to deprecate, not including --enable-
3417# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3418
3419
3420
3421
3422# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3423# $1: variable to check
3424
3425
3426# Check that there are no unprocessed overridden variables left.
3427# If so, they are an incorrect argument and we will exit with an error.
3428
3429
3430# Setup a tool for the given variable. If correctly specified by the user,
3431# use that value, otherwise search for the tool using the supplied code snippet.
3432# $1: variable to set
3433# $2: code snippet to call to look for the tool
3434
3435
3436# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3437# $1: variable to set
3438# $2: executable name (or list of names) to look for
3439
3440
3441# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3442# $1: variable to set
3443# $2: executable name (or list of names) to look for
3444
3445
3446# Like BASIC_PATH_PROGS but fails if no tool was found.
3447# $1: variable to set
3448# $2: executable name (or list of names) to look for
3449
3450
3451# Like BASIC_SETUP_TOOL but fails if no tool was found.
3452# $1: variable to set
3453# $2: autoconf macro to call to look for the special tool
3454
3455
3456# Setup the most fundamental tools that relies on not much else to set up,
3457# but is used by much of the early bootstrap code.
3458
3459
3460# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3461
3462
3463# Evaluates platform specific overrides for devkit variables.
3464# $1: Name of variable
3465
3466
3467
3468
3469
3470
3471#%%% Simple tools %%%
3472
3473# Check if we have found a usable version of make
3474# $1: the path to a potential make binary (or empty)
3475# $2: the description on how we found this
3476
3477
3478
3479
3480# Goes looking for a usable version of GNU make.
3481
3482
3483
3484
3485
3486
3487# Check if build directory is on local disk. If not possible to determine,
3488# we prefer to claim it's local.
3489# Argument 1: directory to test
3490# Argument 2: what to do if it is on local disk
3491# Argument 3: what to do otherwise (remote disk or failure)
3492
3493
3494# Check that source files have basic read permissions set. This might
3495# not be the case in cygwin in certain conditions.
3496
3497
3498
3499
3500# Check for support for specific options in bash
3501
3502
3503# Code to run after AC_OUTPUT
3504
3505
3506#
3507# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3508# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3509#
3510# This code is free software; you can redistribute it and/or modify it
3511# under the terms of the GNU General Public License version 2 only, as
3512# published by the Free Software Foundation.  Oracle designates this
3513# particular file as subject to the "Classpath" exception as provided
3514# by Oracle in the LICENSE file that accompanied this code.
3515#
3516# This code is distributed in the hope that it will be useful, but WITHOUT
3517# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3518# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3519# version 2 for more details (a copy is included in the LICENSE file that
3520# accompanied this code).
3521#
3522# You should have received a copy of the GNU General Public License version
3523# 2 along with this work; if not, write to the Free Software Foundation,
3524# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3525#
3526# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3527# or visit www.oracle.com if you need additional information or have any
3528# questions.
3529#
3530
3531
3532
3533
3534
3535# Helper function which possibly converts a path using DOS-style short mode.
3536# If so, the updated path is stored in $new_path.
3537# $1: The path to check
3538
3539
3540# Helper function which possibly converts a path using DOS-style short mode.
3541# If so, the updated path is stored in $new_path.
3542# $1: The path to check
3543
3544
3545# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3546# and could probably be heavily simplified. However, all changes in this
3547# area tend to need lot of testing in different scenarios, and in lack of
3548# proper unit testing, cleaning this up has not been deemed worth the effort
3549# at the moment.
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3560
3561
3562
3563
3564#
3565# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3566# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3567#
3568# This code is free software; you can redistribute it and/or modify it
3569# under the terms of the GNU General Public License version 2 only, as
3570# published by the Free Software Foundation.  Oracle designates this
3571# particular file as subject to the "Classpath" exception as provided
3572# by Oracle in the LICENSE file that accompanied this code.
3573#
3574# This code is distributed in the hope that it will be useful, but WITHOUT
3575# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3576# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3577# version 2 for more details (a copy is included in the LICENSE file that
3578# accompanied this code).
3579#
3580# You should have received a copy of the GNU General Public License version
3581# 2 along with this work; if not, write to the Free Software Foundation,
3582# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3583#
3584# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3585# or visit www.oracle.com if you need additional information or have any
3586# questions.
3587#
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599# ... then the rest
3600#
3601# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3602# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3603#
3604# This code is free software; you can redistribute it and/or modify it
3605# under the terms of the GNU General Public License version 2 only, as
3606# published by the Free Software Foundation.  Oracle designates this
3607# particular file as subject to the "Classpath" exception as provided
3608# by Oracle in the LICENSE file that accompanied this code.
3609#
3610# This code is distributed in the hope that it will be useful, but WITHOUT
3611# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3612# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3613# version 2 for more details (a copy is included in the LICENSE file that
3614# accompanied this code).
3615#
3616# You should have received a copy of the GNU General Public License version
3617# 2 along with this work; if not, write to the Free Software Foundation,
3618# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3619#
3620# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3621# or visit www.oracle.com if you need additional information or have any
3622# questions.
3623#
3624
3625########################################################################
3626# This file handles detection of the Boot JDK. The Boot JDK detection
3627# process has been developed as a response to solve a complex real-world
3628# problem. Initially, it was simple, but it has grown as platform after
3629# platform, idiosyncracy after idiosyncracy has been supported.
3630#
3631# The basic idea is this:
3632# 1) You need an acceptable *) JDK to use as a Boot JDK
3633# 2) There are several ways to locate a JDK, that are mostly platform
3634#    dependent **)
3635# 3) You can have multiple JDKs installed
3636# 4) If possible, configure should try to dig out an acceptable JDK
3637#    automatically, without having to resort to command-line options
3638#
3639# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3640#     javac) and not a JRE, etc.
3641#
3642# **) On Windows we typically use a well-known path.
3643#     On MacOSX we typically use the tool java_home.
3644#     On Linux we typically find javac in the $PATH, and then follow a
3645#     chain of symlinks that often ends up in a real JDK.
3646#
3647# This leads to the code where we check in different ways to locate a
3648# JDK, and if one is found, check if it is acceptable. If not, we print
3649# our reasons for rejecting it (useful when debugging non-working
3650# configure situations) and continue checking the next one.
3651########################################################################
3652
3653# Execute the check given as argument, and verify the result
3654# If the Boot JDK was previously found, do nothing
3655# $1 A command line (typically autoconf macro) to execute
3656
3657
3658# Test: Is bootjdk explicitely set by command line arguments?
3659
3660
3661# Test: Is bootjdk available from builddeps?
3662
3663
3664# Test: Is $JAVA_HOME set?
3665
3666
3667# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3668
3669
3670# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3671# $1: Argument to the java_home binary (optional)
3672
3673
3674# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3675
3676
3677# Look for a jdk in the given path. If there are multiple, try to select the newest.
3678# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3679# $1 = Path to directory containing jdk installations.
3680# $2 = String to append to the found JDK directory to get the proper JDK home
3681
3682
3683# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3684# environmental variable as base for where to look.
3685# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3686
3687
3688# Test: Is there a JDK installed in default, well-known locations?
3689
3690
3691# Check that a command-line tool in the Boot JDK is correct
3692# $1 = name of variable to assign
3693# $2 = name of binary
3694
3695
3696###############################################################################
3697#
3698# We need a Boot JDK to bootstrap the build.
3699#
3700
3701
3702
3703
3704
3705#
3706# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3707# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3708#
3709# This code is free software; you can redistribute it and/or modify it
3710# under the terms of the GNU General Public License version 2 only, as
3711# published by the Free Software Foundation.  Oracle designates this
3712# particular file as subject to the "Classpath" exception as provided
3713# by Oracle in the LICENSE file that accompanied this code.
3714#
3715# This code is distributed in the hope that it will be useful, but WITHOUT
3716# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3717# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3718# version 2 for more details (a copy is included in the LICENSE file that
3719# accompanied this code).
3720#
3721# You should have received a copy of the GNU General Public License version
3722# 2 along with this work; if not, write to the Free Software Foundation,
3723# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3724#
3725# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3726# or visit www.oracle.com if you need additional information or have any
3727# questions.
3728#
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749#
3750# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3751# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3752#
3753# This code is free software; you can redistribute it and/or modify it
3754# under the terms of the GNU General Public License version 2 only, as
3755# published by the Free Software Foundation.  Oracle designates this
3756# particular file as subject to the "Classpath" exception as provided
3757# by Oracle in the LICENSE file that accompanied this code.
3758#
3759# This code is distributed in the hope that it will be useful, but WITHOUT
3760# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3761# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3762# version 2 for more details (a copy is included in the LICENSE file that
3763# accompanied this code).
3764#
3765# You should have received a copy of the GNU General Public License version
3766# 2 along with this work; if not, write to the Free Software Foundation,
3767# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3768#
3769# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3770# or visit www.oracle.com if you need additional information or have any
3771# questions.
3772#
3773
3774
3775
3776
3777
3778# Documentation on common flags used for solstudio in HIGHEST.
3779#
3780# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3781#          done with care, there are some assumptions below that need to
3782#          be understood about the use of pointers, and IEEE behavior.
3783#
3784# -fns: Use non-standard floating point mode (not IEEE 754)
3785# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3786# -fsingle: Use single precision floating point with 'float'
3787# -xalias_level=basic: Assume memory references via basic pointer types do not alias
3788#   (Source with excessing pointer casting and data access with mixed
3789#    pointer types are not recommended)
3790# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3791#   (If you expect perfect errno behavior, do not use this)
3792# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3793# -xrestrict: Pointer parameters to functions do not overlap
3794#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3795#    If you pass in multiple pointers to the same data, do not use this)
3796# -xlibmil: Inline some library routines
3797#   (If you expect perfect errno behavior, do not use this)
3798# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3799#   (If you expect perfect errno behavior, do not use this)
3800#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3801
3802    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3803    # Bug?
3804    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3805    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3806    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3807    #fi
3808
3809
3810
3811
3812
3813# FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3814#                                   [RUN-IF-FALSE])
3815# ------------------------------------------------------------
3816# Check that the c and c++ compilers support an argument
3817
3818
3819# FLAGS_LINKER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3820#                                    [RUN-IF-FALSE])
3821# ------------------------------------------------------------
3822# Check that the linker support an argument
3823
3824
3825
3826
3827#
3828# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3829# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3830#
3831# This code is free software; you can redistribute it and/or modify it
3832# under the terms of the GNU General Public License version 2 only, as
3833# published by the Free Software Foundation.  Oracle designates this
3834# particular file as subject to the "Classpath" exception as provided
3835# by Oracle in the LICENSE file that accompanied this code.
3836#
3837# This code is distributed in the hope that it will be useful, but WITHOUT
3838# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3839# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3840# version 2 for more details (a copy is included in the LICENSE file that
3841# accompanied this code).
3842#
3843# You should have received a copy of the GNU General Public License version
3844# 2 along with this work; if not, write to the Free Software Foundation,
3845# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3846#
3847# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3848# or visit www.oracle.com if you need additional information or have any
3849# questions.
3850#
3851
3852
3853
3854
3855
3856cygwin_help() {
3857  case $1 in
3858    unzip)
3859      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3860      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3861      ;;
3862    zip)
3863      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3864      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3865      ;;
3866    make)
3867      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3868      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3869      ;;
3870    freetype)
3871      HELP_MSG="
3872The freetype library can now be build during the configure process.
3873Download the freetype sources and unpack them into an arbitrary directory:
3874
3875wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
3876tar -xzf freetype-2.5.3.tar.gz
3877
3878Then run configure with '--with-freetype-src=<freetype_src>'. This will
3879automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
3880builds or into '<freetype_src>/lib32' for 32-bit builds.
3881Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
3882and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds."
3883      ;;
3884  esac
3885}
3886
3887msys_help() {
3888  PKGHANDLER_COMMAND=""
3889}
3890
3891apt_help() {
3892  case $1 in
3893    devkit)
3894      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3895    openjdk)
3896      PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3897    alsa)
3898      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3899    cups)
3900      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3901    freetype)
3902      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3903    pulse)
3904      PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3905    x11)
3906      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3907    ccache)
3908      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3909  esac
3910}
3911
3912yum_help() {
3913  case $1 in
3914    devkit)
3915      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3916    openjdk)
3917      PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3918    alsa)
3919      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3920    cups)
3921      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3922    freetype)
3923      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3924    pulse)
3925      PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3926    x11)
3927      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
3928    ccache)
3929      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3930  esac
3931}
3932
3933port_help() {
3934  PKGHANDLER_COMMAND=""
3935}
3936
3937pkgutil_help() {
3938  PKGHANDLER_COMMAND=""
3939}
3940
3941pkgadd_help() {
3942  PKGHANDLER_COMMAND=""
3943}
3944
3945# This function will check if we're called from the "configure" wrapper while
3946# printing --help. If so, we will print out additional information that can
3947# only be extracted within the autoconf script, and then exit. This must be
3948# called at the very beginning in configure.ac.
3949
3950
3951
3952
3953
3954
3955#
3956# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3957# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3958#
3959# This code is free software; you can redistribute it and/or modify it
3960# under the terms of the GNU General Public License version 2 only, as
3961# published by the Free Software Foundation.  Oracle designates this
3962# particular file as subject to the "Classpath" exception as provided
3963# by Oracle in the LICENSE file that accompanied this code.
3964#
3965# This code is distributed in the hope that it will be useful, but WITHOUT
3966# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3967# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3968# version 2 for more details (a copy is included in the LICENSE file that
3969# accompanied this code).
3970#
3971# You should have received a copy of the GNU General Public License version
3972# 2 along with this work; if not, write to the Free Software Foundation,
3973# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3974#
3975# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3976# or visit www.oracle.com if you need additional information or have any
3977# questions.
3978#
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989###############################################################################
3990#
3991# Should we build only OpenJDK even if closed sources are present?
3992#
3993
3994
3995
3996
3997###############################################################################
3998#
3999# Setup version numbers
4000#
4001
4002
4003
4004
4005
4006
4007################################################################################
4008#
4009# Gcov coverage data for hotspot
4010#
4011
4012
4013#
4014# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
4015# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4016#
4017# This code is free software; you can redistribute it and/or modify it
4018# under the terms of the GNU General Public License version 2 only, as
4019# published by the Free Software Foundation.  Oracle designates this
4020# particular file as subject to the "Classpath" exception as provided
4021# by Oracle in the LICENSE file that accompanied this code.
4022#
4023# This code is distributed in the hope that it will be useful, but WITHOUT
4024# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4025# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4026# version 2 for more details (a copy is included in the LICENSE file that
4027# accompanied this code).
4028#
4029# You should have received a copy of the GNU General Public License version
4030# 2 along with this work; if not, write to the Free Software Foundation,
4031# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4032#
4033# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4034# or visit www.oracle.com if you need additional information or have any
4035# questions.
4036#
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058#
4059# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4060# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4061#
4062# This code is free software; you can redistribute it and/or modify it
4063# under the terms of the GNU General Public License version 2 only, as
4064# published by the Free Software Foundation.  Oracle designates this
4065# particular file as subject to the "Classpath" exception as provided
4066# by Oracle in the LICENSE file that accompanied this code.
4067#
4068# This code is distributed in the hope that it will be useful, but WITHOUT
4069# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4070# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4071# version 2 for more details (a copy is included in the LICENSE file that
4072# accompanied this code).
4073#
4074# You should have received a copy of the GNU General Public License version
4075# 2 along with this work; if not, write to the Free Software Foundation,
4076# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4077#
4078# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4079# or visit www.oracle.com if you need additional information or have any
4080# questions.
4081#
4082
4083# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4084# Converts autoconf style CPU name to OpenJDK style, into
4085# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4086
4087
4088# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4089# Converts autoconf style OS name to OpenJDK style, into
4090# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4091
4092
4093# Expects $host_os $host_cpu $build_os and $build_cpu
4094# and $with_target_bits to have been setup!
4095#
4096# Translate the standard triplet(quadruplet) definition
4097# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4098# OPENJDK_BUILD_OS, etc.
4099
4100
4101# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4102# accordingly. Must be done after setting up build and target system, but before
4103# doing anything else with these values.
4104
4105
4106# Setup the legacy variables, for controlling the old makefiles.
4107#
4108
4109
4110
4111
4112#%%% Build and target systems %%%
4113
4114
4115
4116
4117# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4118# Add -mX to various FLAGS variables.
4119
4120
4121
4122
4123
4124
4125#
4126# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4127# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4128#
4129# This code is free software; you can redistribute it and/or modify it
4130# under the terms of the GNU General Public License version 2 only, as
4131# published by the Free Software Foundation.  Oracle designates this
4132# particular file as subject to the "Classpath" exception as provided
4133# by Oracle in the LICENSE file that accompanied this code.
4134#
4135# This code is distributed in the hope that it will be useful, but WITHOUT
4136# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4137# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4138# version 2 for more details (a copy is included in the LICENSE file that
4139# accompanied this code).
4140#
4141# You should have received a copy of the GNU General Public License version
4142# 2 along with this work; if not, write to the Free Software Foundation,
4143# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4144#
4145# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4146# or visit www.oracle.com if you need additional information or have any
4147# questions.
4148#
4149
4150
4151
4152
4153
4154
4155
4156
4157#
4158# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4159# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4160#
4161# This code is free software; you can redistribute it and/or modify it
4162# under the terms of the GNU General Public License version 2 only, as
4163# published by the Free Software Foundation.  Oracle designates this
4164# particular file as subject to the "Classpath" exception as provided
4165# by Oracle in the LICENSE file that accompanied this code.
4166#
4167# This code is distributed in the hope that it will be useful, but WITHOUT
4168# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4169# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4170# version 2 for more details (a copy is included in the LICENSE file that
4171# accompanied this code).
4172#
4173# You should have received a copy of the GNU General Public License version
4174# 2 along with this work; if not, write to the Free Software Foundation,
4175# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4176#
4177# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4178# or visit www.oracle.com if you need additional information or have any
4179# questions.
4180#
4181
4182########################################################################
4183# This file is responsible for detecting, verifying and setting up the
4184# toolchain, i.e. the compiler, linker and related utilities. It will setup
4185# proper paths to the binaries, but it will not setup any flags.
4186#
4187# The binaries used is determined by the toolchain type, which is the family of
4188# compilers and related tools that are used.
4189########################################################################
4190
4191
4192# All valid toolchains, regardless of platform (used by help.m4)
4193VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4194
4195# These toolchains are valid on different platforms
4196VALID_TOOLCHAINS_linux="gcc clang"
4197VALID_TOOLCHAINS_solaris="solstudio"
4198VALID_TOOLCHAINS_macosx="gcc clang"
4199VALID_TOOLCHAINS_aix="xlc"
4200VALID_TOOLCHAINS_windows="microsoft"
4201
4202# Toolchain descriptions
4203TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4204TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4205TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4206TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4207TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4208
4209# Setup a number of variables describing how native output files are
4210# named on this platform/toolchain.
4211
4212
4213# Determine which toolchain type to use, and make sure it is valid for this
4214# platform. Setup various information about the selected toolchain.
4215
4216
4217# Before we start detecting the toolchain executables, we might need some
4218# special setup, e.g. additional paths etc.
4219
4220
4221# Restore path, etc
4222
4223
4224# Check if a compiler is of the toolchain type we expect, and save the version
4225# information from it. If the compiler does not match the expected type,
4226# this function will abort using AC_MSG_ERROR. If it matches, the version will
4227# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4228# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4229#
4230# $1 = compiler to test (CC or CXX)
4231# $2 = human readable name of compiler (C or C++)
4232
4233
4234# Try to locate the given C or C++ compiler in the path, or otherwise.
4235#
4236# $1 = compiler to test (CC or CXX)
4237# $2 = human readable name of compiler (C or C++)
4238# $3 = list of compiler names to search for
4239
4240
4241# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4242# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4243# archiver (AR). Verify that the compilers are correct according to the
4244# toolchain type.
4245
4246
4247# Setup additional tools that is considered a part of the toolchain, but not the
4248# core part. Many of these are highly platform-specific and do not exist,
4249# and/or are not needed on all platforms.
4250
4251
4252# Setup the build tools (i.e, the compiler and linker used to build programs
4253# that should be run on the build platform, not the target platform, as a build
4254# helper). Since the non-cross-compile case uses the normal, target compilers
4255# for this, we can only do this after these have been setup.
4256
4257
4258# Setup legacy variables that are still needed as alternative ways to refer to
4259# parts of the toolchain.
4260
4261
4262# Do some additional checks on the detected tools.
4263
4264
4265# Setup the JTReg Regression Test Harness.
4266
4267
4268#
4269# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4270# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4271#
4272# This code is free software; you can redistribute it and/or modify it
4273# under the terms of the GNU General Public License version 2 only, as
4274# published by the Free Software Foundation.  Oracle designates this
4275# particular file as subject to the "Classpath" exception as provided
4276# by Oracle in the LICENSE file that accompanied this code.
4277#
4278# This code is distributed in the hope that it will be useful, but WITHOUT
4279# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4280# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4281# version 2 for more details (a copy is included in the LICENSE file that
4282# accompanied this code).
4283#
4284# You should have received a copy of the GNU General Public License version
4285# 2 along with this work; if not, write to the Free Software Foundation,
4286# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4287#
4288# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4289# or visit www.oracle.com if you need additional information or have any
4290# questions.
4291#
4292
4293################################################################################
4294# The order of these defines the priority by which we try to find them.
4295VALID_VS_VERSIONS="2013 2012 2010"
4296
4297VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
4298VS_VERSION_INTERNAL_2010=100
4299VS_MSVCR_2010=msvcr100.dll
4300# We don't use msvcp on Visual Studio 2010
4301#VS_MSVCP_2010=msvcp100.dll
4302VS_ENVVAR_2010="VS100COMNTOOLS"
4303VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
4304VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
4305VS_VS_PLATFORM_NAME_2010="v100"
4306VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
4307
4308VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
4309VS_VERSION_INTERNAL_2012=110
4310VS_MSVCR_2012=msvcr110.dll
4311VS_MSVCP_2012=msvcp110.dll
4312VS_ENVVAR_2012="VS110COMNTOOLS"
4313VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
4314VS_SDK_INSTALLDIR_2012=
4315VS_VS_PLATFORM_NAME_2012="v110"
4316VS_SDK_PLATFORM_NAME_2012=
4317
4318VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
4319VS_VERSION_INTERNAL_2013=120
4320VS_MSVCR_2013=msvcr120.dll
4321VS_MSVCP_2013=msvcp120.dll
4322VS_ENVVAR_2013="VS120COMNTOOLS"
4323VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
4324VS_SDK_INSTALLDIR_2013=
4325VS_VS_PLATFORM_NAME_2013="v120"
4326VS_SDK_PLATFORM_NAME_2013=
4327
4328################################################################################
4329
4330
4331
4332################################################################################
4333
4334
4335
4336################################################################################
4337# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
4338# build environment and assigns it to VS_ENV_CMD
4339
4340
4341################################################################################
4342
4343
4344
4345################################################################################
4346# Check if the VS env variables were setup prior to running configure.
4347# If not, then find vcvarsall.bat and run it automatically, and integrate
4348# the set env variables into the spec file.
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363# This line needs to be here, verbatim, after all includes and the dummy hook
4364# definitions. It is replaced with custom functionality when building
4365# custom sources.
4366#CUSTOM_AUTOCONF_INCLUDE
4367
4368# Do not change or remove the following line, it is needed for consistency checks:
4369DATE_WHEN_GENERATED=1431429776
4370
4371###############################################################################
4372#
4373# Initialization / Boot-strapping
4374#
4375# The bootstrapping process needs to solve the "chicken or the egg" problem,
4376# thus it jumps back and forth, each time gaining something needed later on.
4377#
4378###############################################################################
4379
4380# If we are requested to print additional help, do that and then exit.
4381# This must be the very first call.
4382
4383  if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4384    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4385    $PRINTF "Which are valid to use depends on the build platform.\n"
4386    for toolchain in $VALID_TOOLCHAINS_all; do
4387      # Use indirect variable referencing
4388      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4389      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4390      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4391    done
4392
4393    # And now exit directly
4394    exit 0
4395  fi
4396
4397
4398# Basic initialization that must happen first of all in the normal process.
4399
4400  # Save the original command line. This is passed to us by the wrapper configure script.
4401
4402  # Save the path variable before it gets changed
4403  ORIGINAL_PATH="$PATH"
4404
4405  DATE_WHEN_CONFIGURED=`LANG=C date`
4406
4407  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4408$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4409  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4410$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4411
4412
4413  # Start with tools that do not need have cross compilation support
4414  # and can be expected to be found in the default PATH. These tools are
4415  # used by configure. Nor are these tools expected to be found in the
4416  # devkit from the builddeps server either, since they are
4417  # needed to download the devkit.
4418
4419  # First are all the simple required tools.
4420
4421
4422
4423  # Publish this variable in the help.
4424
4425
4426  if test "x$BASENAME" = x; then
4427    # The variable is not set by user, try to locate tool using the code snippet
4428    for ac_prog in basename
4429do
4430  # Extract the first word of "$ac_prog", so it can be a program name with args.
4431set dummy $ac_prog; ac_word=$2
4432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4433$as_echo_n "checking for $ac_word... " >&6; }
4434if ${ac_cv_path_BASENAME+:} false; then :
4435  $as_echo_n "(cached) " >&6
4436else
4437  case $BASENAME in
4438  [\\/]* | ?:[\\/]*)
4439  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4440  ;;
4441  *)
4442  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4443for as_dir in $PATH
4444do
4445  IFS=$as_save_IFS
4446  test -z "$as_dir" && as_dir=.
4447    for ac_exec_ext in '' $ac_executable_extensions; do
4448  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4449    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4450    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4451    break 2
4452  fi
4453done
4454  done
4455IFS=$as_save_IFS
4456
4457  ;;
4458esac
4459fi
4460BASENAME=$ac_cv_path_BASENAME
4461if test -n "$BASENAME"; then
4462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4463$as_echo "$BASENAME" >&6; }
4464else
4465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4466$as_echo "no" >&6; }
4467fi
4468
4469
4470  test -n "$BASENAME" && break
4471done
4472
4473  else
4474    # The variable is set, but is it from the command line or the environment?
4475
4476    # Try to remove the string !BASENAME! from our list.
4477    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4478    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4479      # If it failed, the variable was not from the command line. Ignore it,
4480      # but warn the user (except for BASH, which is always set by the calling BASH).
4481      if test "xBASENAME" != xBASH; then
4482        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4483$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4484      fi
4485      # Try to locate tool using the code snippet
4486      for ac_prog in basename
4487do
4488  # Extract the first word of "$ac_prog", so it can be a program name with args.
4489set dummy $ac_prog; ac_word=$2
4490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4491$as_echo_n "checking for $ac_word... " >&6; }
4492if ${ac_cv_path_BASENAME+:} false; then :
4493  $as_echo_n "(cached) " >&6
4494else
4495  case $BASENAME in
4496  [\\/]* | ?:[\\/]*)
4497  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4498  ;;
4499  *)
4500  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4501for as_dir in $PATH
4502do
4503  IFS=$as_save_IFS
4504  test -z "$as_dir" && as_dir=.
4505    for ac_exec_ext in '' $ac_executable_extensions; do
4506  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4507    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4508    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4509    break 2
4510  fi
4511done
4512  done
4513IFS=$as_save_IFS
4514
4515  ;;
4516esac
4517fi
4518BASENAME=$ac_cv_path_BASENAME
4519if test -n "$BASENAME"; then
4520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4521$as_echo "$BASENAME" >&6; }
4522else
4523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4524$as_echo "no" >&6; }
4525fi
4526
4527
4528  test -n "$BASENAME" && break
4529done
4530
4531    else
4532      # If it succeeded, then it was overridden by the user. We will use it
4533      # for the tool.
4534
4535      # First remove it from the list of overridden variables, so we can test
4536      # for unknown variables in the end.
4537      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4538
4539      # Check if the provided tool contains a complete path.
4540      tool_specified="$BASENAME"
4541      tool_basename="${tool_specified##*/}"
4542      if test "x$tool_basename" = "x$tool_specified"; then
4543        # A command without a complete path is provided, search $PATH.
4544        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
4545$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
4546        # Extract the first word of "$tool_basename", so it can be a program name with args.
4547set dummy $tool_basename; ac_word=$2
4548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4549$as_echo_n "checking for $ac_word... " >&6; }
4550if ${ac_cv_path_BASENAME+:} false; then :
4551  $as_echo_n "(cached) " >&6
4552else
4553  case $BASENAME in
4554  [\\/]* | ?:[\\/]*)
4555  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4556  ;;
4557  *)
4558  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4559for as_dir in $PATH
4560do
4561  IFS=$as_save_IFS
4562  test -z "$as_dir" && as_dir=.
4563    for ac_exec_ext in '' $ac_executable_extensions; do
4564  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4565    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4566    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4567    break 2
4568  fi
4569done
4570  done
4571IFS=$as_save_IFS
4572
4573  ;;
4574esac
4575fi
4576BASENAME=$ac_cv_path_BASENAME
4577if test -n "$BASENAME"; then
4578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4579$as_echo "$BASENAME" >&6; }
4580else
4581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4582$as_echo "no" >&6; }
4583fi
4584
4585
4586        if test "x$BASENAME" = x; then
4587          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4588        fi
4589      else
4590        # Otherwise we believe it is a complete path. Use it as it is.
4591        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
4592$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
4593        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4594$as_echo_n "checking for BASENAME... " >&6; }
4595        if test ! -x "$tool_specified"; then
4596          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4597$as_echo "not found" >&6; }
4598          as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
4599        fi
4600        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4601$as_echo "$tool_specified" >&6; }
4602      fi
4603    fi
4604  fi
4605
4606
4607
4608  if test "x$BASENAME" = x; then
4609    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
4610  fi
4611
4612
4613
4614
4615
4616  # Publish this variable in the help.
4617
4618
4619  if test "x$BASH" = x; then
4620    # The variable is not set by user, try to locate tool using the code snippet
4621    for ac_prog in bash
4622do
4623  # Extract the first word of "$ac_prog", so it can be a program name with args.
4624set dummy $ac_prog; ac_word=$2
4625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4626$as_echo_n "checking for $ac_word... " >&6; }
4627if ${ac_cv_path_BASH+:} false; then :
4628  $as_echo_n "(cached) " >&6
4629else
4630  case $BASH in
4631  [\\/]* | ?:[\\/]*)
4632  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4633  ;;
4634  *)
4635  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4636for as_dir in $PATH
4637do
4638  IFS=$as_save_IFS
4639  test -z "$as_dir" && as_dir=.
4640    for ac_exec_ext in '' $ac_executable_extensions; do
4641  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4642    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4643    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4644    break 2
4645  fi
4646done
4647  done
4648IFS=$as_save_IFS
4649
4650  ;;
4651esac
4652fi
4653BASH=$ac_cv_path_BASH
4654if test -n "$BASH"; then
4655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4656$as_echo "$BASH" >&6; }
4657else
4658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4659$as_echo "no" >&6; }
4660fi
4661
4662
4663  test -n "$BASH" && break
4664done
4665
4666  else
4667    # The variable is set, but is it from the command line or the environment?
4668
4669    # Try to remove the string !BASH! from our list.
4670    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
4671    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4672      # If it failed, the variable was not from the command line. Ignore it,
4673      # but warn the user (except for BASH, which is always set by the calling BASH).
4674      if test "xBASH" != xBASH; then
4675        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
4676$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
4677      fi
4678      # Try to locate tool using the code snippet
4679      for ac_prog in bash
4680do
4681  # Extract the first word of "$ac_prog", so it can be a program name with args.
4682set dummy $ac_prog; ac_word=$2
4683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4684$as_echo_n "checking for $ac_word... " >&6; }
4685if ${ac_cv_path_BASH+:} false; then :
4686  $as_echo_n "(cached) " >&6
4687else
4688  case $BASH in
4689  [\\/]* | ?:[\\/]*)
4690  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4691  ;;
4692  *)
4693  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4694for as_dir in $PATH
4695do
4696  IFS=$as_save_IFS
4697  test -z "$as_dir" && as_dir=.
4698    for ac_exec_ext in '' $ac_executable_extensions; do
4699  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4700    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4701    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4702    break 2
4703  fi
4704done
4705  done
4706IFS=$as_save_IFS
4707
4708  ;;
4709esac
4710fi
4711BASH=$ac_cv_path_BASH
4712if test -n "$BASH"; then
4713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4714$as_echo "$BASH" >&6; }
4715else
4716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4717$as_echo "no" >&6; }
4718fi
4719
4720
4721  test -n "$BASH" && break
4722done
4723
4724    else
4725      # If it succeeded, then it was overridden by the user. We will use it
4726      # for the tool.
4727
4728      # First remove it from the list of overridden variables, so we can test
4729      # for unknown variables in the end.
4730      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4731
4732      # Check if the provided tool contains a complete path.
4733      tool_specified="$BASH"
4734      tool_basename="${tool_specified##*/}"
4735      if test "x$tool_basename" = "x$tool_specified"; then
4736        # A command without a complete path is provided, search $PATH.
4737        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
4738$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
4739        # Extract the first word of "$tool_basename", so it can be a program name with args.
4740set dummy $tool_basename; ac_word=$2
4741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4742$as_echo_n "checking for $ac_word... " >&6; }
4743if ${ac_cv_path_BASH+:} false; then :
4744  $as_echo_n "(cached) " >&6
4745else
4746  case $BASH in
4747  [\\/]* | ?:[\\/]*)
4748  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4749  ;;
4750  *)
4751  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4752for as_dir in $PATH
4753do
4754  IFS=$as_save_IFS
4755  test -z "$as_dir" && as_dir=.
4756    for ac_exec_ext in '' $ac_executable_extensions; do
4757  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4758    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4759    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4760    break 2
4761  fi
4762done
4763  done
4764IFS=$as_save_IFS
4765
4766  ;;
4767esac
4768fi
4769BASH=$ac_cv_path_BASH
4770if test -n "$BASH"; then
4771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4772$as_echo "$BASH" >&6; }
4773else
4774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4775$as_echo "no" >&6; }
4776fi
4777
4778
4779        if test "x$BASH" = x; then
4780          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4781        fi
4782      else
4783        # Otherwise we believe it is a complete path. Use it as it is.
4784        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
4785$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
4786        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
4787$as_echo_n "checking for BASH... " >&6; }
4788        if test ! -x "$tool_specified"; then
4789          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4790$as_echo "not found" >&6; }
4791          as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
4792        fi
4793        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4794$as_echo "$tool_specified" >&6; }
4795      fi
4796    fi
4797  fi
4798
4799
4800
4801  if test "x$BASH" = x; then
4802    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
4803  fi
4804
4805
4806
4807
4808
4809  # Publish this variable in the help.
4810
4811
4812  if test "x$CAT" = x; then
4813    # The variable is not set by user, try to locate tool using the code snippet
4814    for ac_prog in cat
4815do
4816  # Extract the first word of "$ac_prog", so it can be a program name with args.
4817set dummy $ac_prog; ac_word=$2
4818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4819$as_echo_n "checking for $ac_word... " >&6; }
4820if ${ac_cv_path_CAT+:} false; then :
4821  $as_echo_n "(cached) " >&6
4822else
4823  case $CAT in
4824  [\\/]* | ?:[\\/]*)
4825  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4826  ;;
4827  *)
4828  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4829for as_dir in $PATH
4830do
4831  IFS=$as_save_IFS
4832  test -z "$as_dir" && as_dir=.
4833    for ac_exec_ext in '' $ac_executable_extensions; do
4834  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4835    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4836    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4837    break 2
4838  fi
4839done
4840  done
4841IFS=$as_save_IFS
4842
4843  ;;
4844esac
4845fi
4846CAT=$ac_cv_path_CAT
4847if test -n "$CAT"; then
4848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4849$as_echo "$CAT" >&6; }
4850else
4851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4852$as_echo "no" >&6; }
4853fi
4854
4855
4856  test -n "$CAT" && break
4857done
4858
4859  else
4860    # The variable is set, but is it from the command line or the environment?
4861
4862    # Try to remove the string !CAT! from our list.
4863    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
4864    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4865      # If it failed, the variable was not from the command line. Ignore it,
4866      # but warn the user (except for BASH, which is always set by the calling BASH).
4867      if test "xCAT" != xBASH; then
4868        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
4869$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
4870      fi
4871      # Try to locate tool using the code snippet
4872      for ac_prog in cat
4873do
4874  # Extract the first word of "$ac_prog", so it can be a program name with args.
4875set dummy $ac_prog; ac_word=$2
4876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4877$as_echo_n "checking for $ac_word... " >&6; }
4878if ${ac_cv_path_CAT+:} false; then :
4879  $as_echo_n "(cached) " >&6
4880else
4881  case $CAT in
4882  [\\/]* | ?:[\\/]*)
4883  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4884  ;;
4885  *)
4886  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4887for as_dir in $PATH
4888do
4889  IFS=$as_save_IFS
4890  test -z "$as_dir" && as_dir=.
4891    for ac_exec_ext in '' $ac_executable_extensions; do
4892  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4893    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4894    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4895    break 2
4896  fi
4897done
4898  done
4899IFS=$as_save_IFS
4900
4901  ;;
4902esac
4903fi
4904CAT=$ac_cv_path_CAT
4905if test -n "$CAT"; then
4906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4907$as_echo "$CAT" >&6; }
4908else
4909  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4910$as_echo "no" >&6; }
4911fi
4912
4913
4914  test -n "$CAT" && break
4915done
4916
4917    else
4918      # If it succeeded, then it was overridden by the user. We will use it
4919      # for the tool.
4920
4921      # First remove it from the list of overridden variables, so we can test
4922      # for unknown variables in the end.
4923      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4924
4925      # Check if the provided tool contains a complete path.
4926      tool_specified="$CAT"
4927      tool_basename="${tool_specified##*/}"
4928      if test "x$tool_basename" = "x$tool_specified"; then
4929        # A command without a complete path is provided, search $PATH.
4930        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
4931$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
4932        # Extract the first word of "$tool_basename", so it can be a program name with args.
4933set dummy $tool_basename; ac_word=$2
4934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4935$as_echo_n "checking for $ac_word... " >&6; }
4936if ${ac_cv_path_CAT+:} false; then :
4937  $as_echo_n "(cached) " >&6
4938else
4939  case $CAT in
4940  [\\/]* | ?:[\\/]*)
4941  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4942  ;;
4943  *)
4944  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4945for as_dir in $PATH
4946do
4947  IFS=$as_save_IFS
4948  test -z "$as_dir" && as_dir=.
4949    for ac_exec_ext in '' $ac_executable_extensions; do
4950  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4951    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4952    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4953    break 2
4954  fi
4955done
4956  done
4957IFS=$as_save_IFS
4958
4959  ;;
4960esac
4961fi
4962CAT=$ac_cv_path_CAT
4963if test -n "$CAT"; then
4964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4965$as_echo "$CAT" >&6; }
4966else
4967  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4968$as_echo "no" >&6; }
4969fi
4970
4971
4972        if test "x$CAT" = x; then
4973          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4974        fi
4975      else
4976        # Otherwise we believe it is a complete path. Use it as it is.
4977        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
4978$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
4979        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
4980$as_echo_n "checking for CAT... " >&6; }
4981        if test ! -x "$tool_specified"; then
4982          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4983$as_echo "not found" >&6; }
4984          as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
4985        fi
4986        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4987$as_echo "$tool_specified" >&6; }
4988      fi
4989    fi
4990  fi
4991
4992
4993
4994  if test "x$CAT" = x; then
4995    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
4996  fi
4997
4998
4999
5000
5001
5002  # Publish this variable in the help.
5003
5004
5005  if test "x$CHMOD" = x; then
5006    # The variable is not set by user, try to locate tool using the code snippet
5007    for ac_prog in chmod
5008do
5009  # Extract the first word of "$ac_prog", so it can be a program name with args.
5010set dummy $ac_prog; ac_word=$2
5011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5012$as_echo_n "checking for $ac_word... " >&6; }
5013if ${ac_cv_path_CHMOD+:} false; then :
5014  $as_echo_n "(cached) " >&6
5015else
5016  case $CHMOD in
5017  [\\/]* | ?:[\\/]*)
5018  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5019  ;;
5020  *)
5021  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5022for as_dir in $PATH
5023do
5024  IFS=$as_save_IFS
5025  test -z "$as_dir" && as_dir=.
5026    for ac_exec_ext in '' $ac_executable_extensions; do
5027  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5028    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5029    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5030    break 2
5031  fi
5032done
5033  done
5034IFS=$as_save_IFS
5035
5036  ;;
5037esac
5038fi
5039CHMOD=$ac_cv_path_CHMOD
5040if test -n "$CHMOD"; then
5041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5042$as_echo "$CHMOD" >&6; }
5043else
5044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5045$as_echo "no" >&6; }
5046fi
5047
5048
5049  test -n "$CHMOD" && break
5050done
5051
5052  else
5053    # The variable is set, but is it from the command line or the environment?
5054
5055    # Try to remove the string !CHMOD! from our list.
5056    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5057    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5058      # If it failed, the variable was not from the command line. Ignore it,
5059      # but warn the user (except for BASH, which is always set by the calling BASH).
5060      if test "xCHMOD" != xBASH; then
5061        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5062$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5063      fi
5064      # Try to locate tool using the code snippet
5065      for ac_prog in chmod
5066do
5067  # Extract the first word of "$ac_prog", so it can be a program name with args.
5068set dummy $ac_prog; ac_word=$2
5069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5070$as_echo_n "checking for $ac_word... " >&6; }
5071if ${ac_cv_path_CHMOD+:} false; then :
5072  $as_echo_n "(cached) " >&6
5073else
5074  case $CHMOD in
5075  [\\/]* | ?:[\\/]*)
5076  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5077  ;;
5078  *)
5079  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5080for as_dir in $PATH
5081do
5082  IFS=$as_save_IFS
5083  test -z "$as_dir" && as_dir=.
5084    for ac_exec_ext in '' $ac_executable_extensions; do
5085  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5086    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5087    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5088    break 2
5089  fi
5090done
5091  done
5092IFS=$as_save_IFS
5093
5094  ;;
5095esac
5096fi
5097CHMOD=$ac_cv_path_CHMOD
5098if test -n "$CHMOD"; then
5099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5100$as_echo "$CHMOD" >&6; }
5101else
5102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5103$as_echo "no" >&6; }
5104fi
5105
5106
5107  test -n "$CHMOD" && break
5108done
5109
5110    else
5111      # If it succeeded, then it was overridden by the user. We will use it
5112      # for the tool.
5113
5114      # First remove it from the list of overridden variables, so we can test
5115      # for unknown variables in the end.
5116      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5117
5118      # Check if the provided tool contains a complete path.
5119      tool_specified="$CHMOD"
5120      tool_basename="${tool_specified##*/}"
5121      if test "x$tool_basename" = "x$tool_specified"; then
5122        # A command without a complete path is provided, search $PATH.
5123        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5124$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5125        # Extract the first word of "$tool_basename", so it can be a program name with args.
5126set dummy $tool_basename; ac_word=$2
5127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5128$as_echo_n "checking for $ac_word... " >&6; }
5129if ${ac_cv_path_CHMOD+:} false; then :
5130  $as_echo_n "(cached) " >&6
5131else
5132  case $CHMOD in
5133  [\\/]* | ?:[\\/]*)
5134  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5135  ;;
5136  *)
5137  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5138for as_dir in $PATH
5139do
5140  IFS=$as_save_IFS
5141  test -z "$as_dir" && as_dir=.
5142    for ac_exec_ext in '' $ac_executable_extensions; do
5143  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5144    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5145    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5146    break 2
5147  fi
5148done
5149  done
5150IFS=$as_save_IFS
5151
5152  ;;
5153esac
5154fi
5155CHMOD=$ac_cv_path_CHMOD
5156if test -n "$CHMOD"; then
5157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5158$as_echo "$CHMOD" >&6; }
5159else
5160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5161$as_echo "no" >&6; }
5162fi
5163
5164
5165        if test "x$CHMOD" = x; then
5166          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5167        fi
5168      else
5169        # Otherwise we believe it is a complete path. Use it as it is.
5170        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5171$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5172        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5173$as_echo_n "checking for CHMOD... " >&6; }
5174        if test ! -x "$tool_specified"; then
5175          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5176$as_echo "not found" >&6; }
5177          as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5178        fi
5179        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5180$as_echo "$tool_specified" >&6; }
5181      fi
5182    fi
5183  fi
5184
5185
5186
5187  if test "x$CHMOD" = x; then
5188    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5189  fi
5190
5191
5192
5193
5194
5195  # Publish this variable in the help.
5196
5197
5198  if test "x$CMP" = x; then
5199    # The variable is not set by user, try to locate tool using the code snippet
5200    for ac_prog in cmp
5201do
5202  # Extract the first word of "$ac_prog", so it can be a program name with args.
5203set dummy $ac_prog; ac_word=$2
5204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5205$as_echo_n "checking for $ac_word... " >&6; }
5206if ${ac_cv_path_CMP+:} false; then :
5207  $as_echo_n "(cached) " >&6
5208else
5209  case $CMP in
5210  [\\/]* | ?:[\\/]*)
5211  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5212  ;;
5213  *)
5214  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5215for as_dir in $PATH
5216do
5217  IFS=$as_save_IFS
5218  test -z "$as_dir" && as_dir=.
5219    for ac_exec_ext in '' $ac_executable_extensions; do
5220  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5221    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5222    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5223    break 2
5224  fi
5225done
5226  done
5227IFS=$as_save_IFS
5228
5229  ;;
5230esac
5231fi
5232CMP=$ac_cv_path_CMP
5233if test -n "$CMP"; then
5234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5235$as_echo "$CMP" >&6; }
5236else
5237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5238$as_echo "no" >&6; }
5239fi
5240
5241
5242  test -n "$CMP" && break
5243done
5244
5245  else
5246    # The variable is set, but is it from the command line or the environment?
5247
5248    # Try to remove the string !CMP! from our list.
5249    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5250    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5251      # If it failed, the variable was not from the command line. Ignore it,
5252      # but warn the user (except for BASH, which is always set by the calling BASH).
5253      if test "xCMP" != xBASH; then
5254        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5255$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5256      fi
5257      # Try to locate tool using the code snippet
5258      for ac_prog in cmp
5259do
5260  # Extract the first word of "$ac_prog", so it can be a program name with args.
5261set dummy $ac_prog; ac_word=$2
5262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5263$as_echo_n "checking for $ac_word... " >&6; }
5264if ${ac_cv_path_CMP+:} false; then :
5265  $as_echo_n "(cached) " >&6
5266else
5267  case $CMP in
5268  [\\/]* | ?:[\\/]*)
5269  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5270  ;;
5271  *)
5272  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5273for as_dir in $PATH
5274do
5275  IFS=$as_save_IFS
5276  test -z "$as_dir" && as_dir=.
5277    for ac_exec_ext in '' $ac_executable_extensions; do
5278  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5279    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5280    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5281    break 2
5282  fi
5283done
5284  done
5285IFS=$as_save_IFS
5286
5287  ;;
5288esac
5289fi
5290CMP=$ac_cv_path_CMP
5291if test -n "$CMP"; then
5292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5293$as_echo "$CMP" >&6; }
5294else
5295  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5296$as_echo "no" >&6; }
5297fi
5298
5299
5300  test -n "$CMP" && break
5301done
5302
5303    else
5304      # If it succeeded, then it was overridden by the user. We will use it
5305      # for the tool.
5306
5307      # First remove it from the list of overridden variables, so we can test
5308      # for unknown variables in the end.
5309      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5310
5311      # Check if the provided tool contains a complete path.
5312      tool_specified="$CMP"
5313      tool_basename="${tool_specified##*/}"
5314      if test "x$tool_basename" = "x$tool_specified"; then
5315        # A command without a complete path is provided, search $PATH.
5316        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5317$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5318        # Extract the first word of "$tool_basename", so it can be a program name with args.
5319set dummy $tool_basename; ac_word=$2
5320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5321$as_echo_n "checking for $ac_word... " >&6; }
5322if ${ac_cv_path_CMP+:} false; then :
5323  $as_echo_n "(cached) " >&6
5324else
5325  case $CMP in
5326  [\\/]* | ?:[\\/]*)
5327  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5328  ;;
5329  *)
5330  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5331for as_dir in $PATH
5332do
5333  IFS=$as_save_IFS
5334  test -z "$as_dir" && as_dir=.
5335    for ac_exec_ext in '' $ac_executable_extensions; do
5336  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5337    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5338    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5339    break 2
5340  fi
5341done
5342  done
5343IFS=$as_save_IFS
5344
5345  ;;
5346esac
5347fi
5348CMP=$ac_cv_path_CMP
5349if test -n "$CMP"; then
5350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5351$as_echo "$CMP" >&6; }
5352else
5353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5354$as_echo "no" >&6; }
5355fi
5356
5357
5358        if test "x$CMP" = x; then
5359          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5360        fi
5361      else
5362        # Otherwise we believe it is a complete path. Use it as it is.
5363        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5364$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5365        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5366$as_echo_n "checking for CMP... " >&6; }
5367        if test ! -x "$tool_specified"; then
5368          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5369$as_echo "not found" >&6; }
5370          as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5371        fi
5372        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5373$as_echo "$tool_specified" >&6; }
5374      fi
5375    fi
5376  fi
5377
5378
5379
5380  if test "x$CMP" = x; then
5381    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5382  fi
5383
5384
5385
5386
5387
5388  # Publish this variable in the help.
5389
5390
5391  if test "x$COMM" = x; then
5392    # The variable is not set by user, try to locate tool using the code snippet
5393    for ac_prog in comm
5394do
5395  # Extract the first word of "$ac_prog", so it can be a program name with args.
5396set dummy $ac_prog; ac_word=$2
5397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5398$as_echo_n "checking for $ac_word... " >&6; }
5399if ${ac_cv_path_COMM+:} false; then :
5400  $as_echo_n "(cached) " >&6
5401else
5402  case $COMM in
5403  [\\/]* | ?:[\\/]*)
5404  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5405  ;;
5406  *)
5407  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5408for as_dir in $PATH
5409do
5410  IFS=$as_save_IFS
5411  test -z "$as_dir" && as_dir=.
5412    for ac_exec_ext in '' $ac_executable_extensions; do
5413  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5414    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5415    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5416    break 2
5417  fi
5418done
5419  done
5420IFS=$as_save_IFS
5421
5422  ;;
5423esac
5424fi
5425COMM=$ac_cv_path_COMM
5426if test -n "$COMM"; then
5427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5428$as_echo "$COMM" >&6; }
5429else
5430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5431$as_echo "no" >&6; }
5432fi
5433
5434
5435  test -n "$COMM" && break
5436done
5437
5438  else
5439    # The variable is set, but is it from the command line or the environment?
5440
5441    # Try to remove the string !COMM! from our list.
5442    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5443    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5444      # If it failed, the variable was not from the command line. Ignore it,
5445      # but warn the user (except for BASH, which is always set by the calling BASH).
5446      if test "xCOMM" != xBASH; then
5447        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5448$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5449      fi
5450      # Try to locate tool using the code snippet
5451      for ac_prog in comm
5452do
5453  # Extract the first word of "$ac_prog", so it can be a program name with args.
5454set dummy $ac_prog; ac_word=$2
5455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5456$as_echo_n "checking for $ac_word... " >&6; }
5457if ${ac_cv_path_COMM+:} false; then :
5458  $as_echo_n "(cached) " >&6
5459else
5460  case $COMM in
5461  [\\/]* | ?:[\\/]*)
5462  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5463  ;;
5464  *)
5465  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5466for as_dir in $PATH
5467do
5468  IFS=$as_save_IFS
5469  test -z "$as_dir" && as_dir=.
5470    for ac_exec_ext in '' $ac_executable_extensions; do
5471  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5472    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5473    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5474    break 2
5475  fi
5476done
5477  done
5478IFS=$as_save_IFS
5479
5480  ;;
5481esac
5482fi
5483COMM=$ac_cv_path_COMM
5484if test -n "$COMM"; then
5485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5486$as_echo "$COMM" >&6; }
5487else
5488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5489$as_echo "no" >&6; }
5490fi
5491
5492
5493  test -n "$COMM" && break
5494done
5495
5496    else
5497      # If it succeeded, then it was overridden by the user. We will use it
5498      # for the tool.
5499
5500      # First remove it from the list of overridden variables, so we can test
5501      # for unknown variables in the end.
5502      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5503
5504      # Check if the provided tool contains a complete path.
5505      tool_specified="$COMM"
5506      tool_basename="${tool_specified##*/}"
5507      if test "x$tool_basename" = "x$tool_specified"; then
5508        # A command without a complete path is provided, search $PATH.
5509        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
5510$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
5511        # Extract the first word of "$tool_basename", so it can be a program name with args.
5512set dummy $tool_basename; ac_word=$2
5513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5514$as_echo_n "checking for $ac_word... " >&6; }
5515if ${ac_cv_path_COMM+:} false; then :
5516  $as_echo_n "(cached) " >&6
5517else
5518  case $COMM in
5519  [\\/]* | ?:[\\/]*)
5520  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5521  ;;
5522  *)
5523  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5524for as_dir in $PATH
5525do
5526  IFS=$as_save_IFS
5527  test -z "$as_dir" && as_dir=.
5528    for ac_exec_ext in '' $ac_executable_extensions; do
5529  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5530    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5531    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5532    break 2
5533  fi
5534done
5535  done
5536IFS=$as_save_IFS
5537
5538  ;;
5539esac
5540fi
5541COMM=$ac_cv_path_COMM
5542if test -n "$COMM"; then
5543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5544$as_echo "$COMM" >&6; }
5545else
5546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5547$as_echo "no" >&6; }
5548fi
5549
5550
5551        if test "x$COMM" = x; then
5552          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5553        fi
5554      else
5555        # Otherwise we believe it is a complete path. Use it as it is.
5556        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
5557$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
5558        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5559$as_echo_n "checking for COMM... " >&6; }
5560        if test ! -x "$tool_specified"; then
5561          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5562$as_echo "not found" >&6; }
5563          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
5564        fi
5565        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5566$as_echo "$tool_specified" >&6; }
5567      fi
5568    fi
5569  fi
5570
5571
5572
5573  if test "x$COMM" = x; then
5574    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
5575  fi
5576
5577
5578
5579
5580
5581  # Publish this variable in the help.
5582
5583
5584  if test "x$CP" = x; then
5585    # The variable is not set by user, try to locate tool using the code snippet
5586    for ac_prog in cp
5587do
5588  # Extract the first word of "$ac_prog", so it can be a program name with args.
5589set dummy $ac_prog; ac_word=$2
5590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5591$as_echo_n "checking for $ac_word... " >&6; }
5592if ${ac_cv_path_CP+:} false; then :
5593  $as_echo_n "(cached) " >&6
5594else
5595  case $CP in
5596  [\\/]* | ?:[\\/]*)
5597  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5598  ;;
5599  *)
5600  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5601for as_dir in $PATH
5602do
5603  IFS=$as_save_IFS
5604  test -z "$as_dir" && as_dir=.
5605    for ac_exec_ext in '' $ac_executable_extensions; do
5606  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5607    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5608    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5609    break 2
5610  fi
5611done
5612  done
5613IFS=$as_save_IFS
5614
5615  ;;
5616esac
5617fi
5618CP=$ac_cv_path_CP
5619if test -n "$CP"; then
5620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5621$as_echo "$CP" >&6; }
5622else
5623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5624$as_echo "no" >&6; }
5625fi
5626
5627
5628  test -n "$CP" && break
5629done
5630
5631  else
5632    # The variable is set, but is it from the command line or the environment?
5633
5634    # Try to remove the string !CP! from our list.
5635    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
5636    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5637      # If it failed, the variable was not from the command line. Ignore it,
5638      # but warn the user (except for BASH, which is always set by the calling BASH).
5639      if test "xCP" != xBASH; then
5640        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
5641$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
5642      fi
5643      # Try to locate tool using the code snippet
5644      for ac_prog in cp
5645do
5646  # Extract the first word of "$ac_prog", so it can be a program name with args.
5647set dummy $ac_prog; ac_word=$2
5648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5649$as_echo_n "checking for $ac_word... " >&6; }
5650if ${ac_cv_path_CP+:} false; then :
5651  $as_echo_n "(cached) " >&6
5652else
5653  case $CP in
5654  [\\/]* | ?:[\\/]*)
5655  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5656  ;;
5657  *)
5658  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5659for as_dir in $PATH
5660do
5661  IFS=$as_save_IFS
5662  test -z "$as_dir" && as_dir=.
5663    for ac_exec_ext in '' $ac_executable_extensions; do
5664  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5665    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5666    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5667    break 2
5668  fi
5669done
5670  done
5671IFS=$as_save_IFS
5672
5673  ;;
5674esac
5675fi
5676CP=$ac_cv_path_CP
5677if test -n "$CP"; then
5678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5679$as_echo "$CP" >&6; }
5680else
5681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5682$as_echo "no" >&6; }
5683fi
5684
5685
5686  test -n "$CP" && break
5687done
5688
5689    else
5690      # If it succeeded, then it was overridden by the user. We will use it
5691      # for the tool.
5692
5693      # First remove it from the list of overridden variables, so we can test
5694      # for unknown variables in the end.
5695      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5696
5697      # Check if the provided tool contains a complete path.
5698      tool_specified="$CP"
5699      tool_basename="${tool_specified##*/}"
5700      if test "x$tool_basename" = "x$tool_specified"; then
5701        # A command without a complete path is provided, search $PATH.
5702        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
5703$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
5704        # Extract the first word of "$tool_basename", so it can be a program name with args.
5705set dummy $tool_basename; ac_word=$2
5706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5707$as_echo_n "checking for $ac_word... " >&6; }
5708if ${ac_cv_path_CP+:} false; then :
5709  $as_echo_n "(cached) " >&6
5710else
5711  case $CP in
5712  [\\/]* | ?:[\\/]*)
5713  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5714  ;;
5715  *)
5716  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5717for as_dir in $PATH
5718do
5719  IFS=$as_save_IFS
5720  test -z "$as_dir" && as_dir=.
5721    for ac_exec_ext in '' $ac_executable_extensions; do
5722  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5723    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5724    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5725    break 2
5726  fi
5727done
5728  done
5729IFS=$as_save_IFS
5730
5731  ;;
5732esac
5733fi
5734CP=$ac_cv_path_CP
5735if test -n "$CP"; then
5736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5737$as_echo "$CP" >&6; }
5738else
5739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5740$as_echo "no" >&6; }
5741fi
5742
5743
5744        if test "x$CP" = x; then
5745          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5746        fi
5747      else
5748        # Otherwise we believe it is a complete path. Use it as it is.
5749        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
5750$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
5751        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
5752$as_echo_n "checking for CP... " >&6; }
5753        if test ! -x "$tool_specified"; then
5754          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5755$as_echo "not found" >&6; }
5756          as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
5757        fi
5758        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5759$as_echo "$tool_specified" >&6; }
5760      fi
5761    fi
5762  fi
5763
5764
5765
5766  if test "x$CP" = x; then
5767    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
5768  fi
5769
5770
5771
5772
5773
5774  # Publish this variable in the help.
5775
5776
5777  if test "x$CUT" = x; then
5778    # The variable is not set by user, try to locate tool using the code snippet
5779    for ac_prog in cut
5780do
5781  # Extract the first word of "$ac_prog", so it can be a program name with args.
5782set dummy $ac_prog; ac_word=$2
5783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5784$as_echo_n "checking for $ac_word... " >&6; }
5785if ${ac_cv_path_CUT+:} false; then :
5786  $as_echo_n "(cached) " >&6
5787else
5788  case $CUT in
5789  [\\/]* | ?:[\\/]*)
5790  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5791  ;;
5792  *)
5793  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5794for as_dir in $PATH
5795do
5796  IFS=$as_save_IFS
5797  test -z "$as_dir" && as_dir=.
5798    for ac_exec_ext in '' $ac_executable_extensions; do
5799  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5800    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5801    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5802    break 2
5803  fi
5804done
5805  done
5806IFS=$as_save_IFS
5807
5808  ;;
5809esac
5810fi
5811CUT=$ac_cv_path_CUT
5812if test -n "$CUT"; then
5813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5814$as_echo "$CUT" >&6; }
5815else
5816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5817$as_echo "no" >&6; }
5818fi
5819
5820
5821  test -n "$CUT" && break
5822done
5823
5824  else
5825    # The variable is set, but is it from the command line or the environment?
5826
5827    # Try to remove the string !CUT! from our list.
5828    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
5829    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5830      # If it failed, the variable was not from the command line. Ignore it,
5831      # but warn the user (except for BASH, which is always set by the calling BASH).
5832      if test "xCUT" != xBASH; then
5833        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
5834$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
5835      fi
5836      # Try to locate tool using the code snippet
5837      for ac_prog in cut
5838do
5839  # Extract the first word of "$ac_prog", so it can be a program name with args.
5840set dummy $ac_prog; ac_word=$2
5841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5842$as_echo_n "checking for $ac_word... " >&6; }
5843if ${ac_cv_path_CUT+:} false; then :
5844  $as_echo_n "(cached) " >&6
5845else
5846  case $CUT in
5847  [\\/]* | ?:[\\/]*)
5848  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5849  ;;
5850  *)
5851  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5852for as_dir in $PATH
5853do
5854  IFS=$as_save_IFS
5855  test -z "$as_dir" && as_dir=.
5856    for ac_exec_ext in '' $ac_executable_extensions; do
5857  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5858    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5859    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5860    break 2
5861  fi
5862done
5863  done
5864IFS=$as_save_IFS
5865
5866  ;;
5867esac
5868fi
5869CUT=$ac_cv_path_CUT
5870if test -n "$CUT"; then
5871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5872$as_echo "$CUT" >&6; }
5873else
5874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5875$as_echo "no" >&6; }
5876fi
5877
5878
5879  test -n "$CUT" && break
5880done
5881
5882    else
5883      # If it succeeded, then it was overridden by the user. We will use it
5884      # for the tool.
5885
5886      # First remove it from the list of overridden variables, so we can test
5887      # for unknown variables in the end.
5888      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5889
5890      # Check if the provided tool contains a complete path.
5891      tool_specified="$CUT"
5892      tool_basename="${tool_specified##*/}"
5893      if test "x$tool_basename" = "x$tool_specified"; then
5894        # A command without a complete path is provided, search $PATH.
5895        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
5896$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
5897        # Extract the first word of "$tool_basename", so it can be a program name with args.
5898set dummy $tool_basename; ac_word=$2
5899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5900$as_echo_n "checking for $ac_word... " >&6; }
5901if ${ac_cv_path_CUT+:} false; then :
5902  $as_echo_n "(cached) " >&6
5903else
5904  case $CUT in
5905  [\\/]* | ?:[\\/]*)
5906  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5907  ;;
5908  *)
5909  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5910for as_dir in $PATH
5911do
5912  IFS=$as_save_IFS
5913  test -z "$as_dir" && as_dir=.
5914    for ac_exec_ext in '' $ac_executable_extensions; do
5915  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5916    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5917    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5918    break 2
5919  fi
5920done
5921  done
5922IFS=$as_save_IFS
5923
5924  ;;
5925esac
5926fi
5927CUT=$ac_cv_path_CUT
5928if test -n "$CUT"; then
5929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5930$as_echo "$CUT" >&6; }
5931else
5932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5933$as_echo "no" >&6; }
5934fi
5935
5936
5937        if test "x$CUT" = x; then
5938          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5939        fi
5940      else
5941        # Otherwise we believe it is a complete path. Use it as it is.
5942        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
5943$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
5944        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
5945$as_echo_n "checking for CUT... " >&6; }
5946        if test ! -x "$tool_specified"; then
5947          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5948$as_echo "not found" >&6; }
5949          as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
5950        fi
5951        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5952$as_echo "$tool_specified" >&6; }
5953      fi
5954    fi
5955  fi
5956
5957
5958
5959  if test "x$CUT" = x; then
5960    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
5961  fi
5962
5963
5964
5965
5966
5967  # Publish this variable in the help.
5968
5969
5970  if test "x$DATE" = x; then
5971    # The variable is not set by user, try to locate tool using the code snippet
5972    for ac_prog in date
5973do
5974  # Extract the first word of "$ac_prog", so it can be a program name with args.
5975set dummy $ac_prog; ac_word=$2
5976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5977$as_echo_n "checking for $ac_word... " >&6; }
5978if ${ac_cv_path_DATE+:} false; then :
5979  $as_echo_n "(cached) " >&6
5980else
5981  case $DATE in
5982  [\\/]* | ?:[\\/]*)
5983  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
5984  ;;
5985  *)
5986  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5987for as_dir in $PATH
5988do
5989  IFS=$as_save_IFS
5990  test -z "$as_dir" && as_dir=.
5991    for ac_exec_ext in '' $ac_executable_extensions; do
5992  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5993    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
5994    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5995    break 2
5996  fi
5997done
5998  done
5999IFS=$as_save_IFS
6000
6001  ;;
6002esac
6003fi
6004DATE=$ac_cv_path_DATE
6005if test -n "$DATE"; then
6006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6007$as_echo "$DATE" >&6; }
6008else
6009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6010$as_echo "no" >&6; }
6011fi
6012
6013
6014  test -n "$DATE" && break
6015done
6016
6017  else
6018    # The variable is set, but is it from the command line or the environment?
6019
6020    # Try to remove the string !DATE! from our list.
6021    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6022    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6023      # If it failed, the variable was not from the command line. Ignore it,
6024      # but warn the user (except for BASH, which is always set by the calling BASH).
6025      if test "xDATE" != xBASH; then
6026        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6027$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6028      fi
6029      # Try to locate tool using the code snippet
6030      for ac_prog in date
6031do
6032  # Extract the first word of "$ac_prog", so it can be a program name with args.
6033set dummy $ac_prog; ac_word=$2
6034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6035$as_echo_n "checking for $ac_word... " >&6; }
6036if ${ac_cv_path_DATE+:} false; then :
6037  $as_echo_n "(cached) " >&6
6038else
6039  case $DATE in
6040  [\\/]* | ?:[\\/]*)
6041  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6042  ;;
6043  *)
6044  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6045for as_dir in $PATH
6046do
6047  IFS=$as_save_IFS
6048  test -z "$as_dir" && as_dir=.
6049    for ac_exec_ext in '' $ac_executable_extensions; do
6050  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6051    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6052    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6053    break 2
6054  fi
6055done
6056  done
6057IFS=$as_save_IFS
6058
6059  ;;
6060esac
6061fi
6062DATE=$ac_cv_path_DATE
6063if test -n "$DATE"; then
6064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6065$as_echo "$DATE" >&6; }
6066else
6067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6068$as_echo "no" >&6; }
6069fi
6070
6071
6072  test -n "$DATE" && break
6073done
6074
6075    else
6076      # If it succeeded, then it was overridden by the user. We will use it
6077      # for the tool.
6078
6079      # First remove it from the list of overridden variables, so we can test
6080      # for unknown variables in the end.
6081      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6082
6083      # Check if the provided tool contains a complete path.
6084      tool_specified="$DATE"
6085      tool_basename="${tool_specified##*/}"
6086      if test "x$tool_basename" = "x$tool_specified"; then
6087        # A command without a complete path is provided, search $PATH.
6088        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6089$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6090        # Extract the first word of "$tool_basename", so it can be a program name with args.
6091set dummy $tool_basename; ac_word=$2
6092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6093$as_echo_n "checking for $ac_word... " >&6; }
6094if ${ac_cv_path_DATE+:} false; then :
6095  $as_echo_n "(cached) " >&6
6096else
6097  case $DATE in
6098  [\\/]* | ?:[\\/]*)
6099  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6100  ;;
6101  *)
6102  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6103for as_dir in $PATH
6104do
6105  IFS=$as_save_IFS
6106  test -z "$as_dir" && as_dir=.
6107    for ac_exec_ext in '' $ac_executable_extensions; do
6108  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6109    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6110    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6111    break 2
6112  fi
6113done
6114  done
6115IFS=$as_save_IFS
6116
6117  ;;
6118esac
6119fi
6120DATE=$ac_cv_path_DATE
6121if test -n "$DATE"; then
6122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6123$as_echo "$DATE" >&6; }
6124else
6125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6126$as_echo "no" >&6; }
6127fi
6128
6129
6130        if test "x$DATE" = x; then
6131          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6132        fi
6133      else
6134        # Otherwise we believe it is a complete path. Use it as it is.
6135        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6136$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6137        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6138$as_echo_n "checking for DATE... " >&6; }
6139        if test ! -x "$tool_specified"; then
6140          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6141$as_echo "not found" >&6; }
6142          as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6143        fi
6144        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6145$as_echo "$tool_specified" >&6; }
6146      fi
6147    fi
6148  fi
6149
6150
6151
6152  if test "x$DATE" = x; then
6153    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6154  fi
6155
6156
6157
6158
6159
6160  # Publish this variable in the help.
6161
6162
6163  if test "x$DIFF" = x; then
6164    # The variable is not set by user, try to locate tool using the code snippet
6165    for ac_prog in gdiff diff
6166do
6167  # Extract the first word of "$ac_prog", so it can be a program name with args.
6168set dummy $ac_prog; ac_word=$2
6169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6170$as_echo_n "checking for $ac_word... " >&6; }
6171if ${ac_cv_path_DIFF+:} false; then :
6172  $as_echo_n "(cached) " >&6
6173else
6174  case $DIFF in
6175  [\\/]* | ?:[\\/]*)
6176  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6177  ;;
6178  *)
6179  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6180for as_dir in $PATH
6181do
6182  IFS=$as_save_IFS
6183  test -z "$as_dir" && as_dir=.
6184    for ac_exec_ext in '' $ac_executable_extensions; do
6185  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6186    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6187    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6188    break 2
6189  fi
6190done
6191  done
6192IFS=$as_save_IFS
6193
6194  ;;
6195esac
6196fi
6197DIFF=$ac_cv_path_DIFF
6198if test -n "$DIFF"; then
6199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6200$as_echo "$DIFF" >&6; }
6201else
6202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6203$as_echo "no" >&6; }
6204fi
6205
6206
6207  test -n "$DIFF" && break
6208done
6209
6210  else
6211    # The variable is set, but is it from the command line or the environment?
6212
6213    # Try to remove the string !DIFF! from our list.
6214    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6215    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6216      # If it failed, the variable was not from the command line. Ignore it,
6217      # but warn the user (except for BASH, which is always set by the calling BASH).
6218      if test "xDIFF" != xBASH; then
6219        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6220$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6221      fi
6222      # Try to locate tool using the code snippet
6223      for ac_prog in gdiff diff
6224do
6225  # Extract the first word of "$ac_prog", so it can be a program name with args.
6226set dummy $ac_prog; ac_word=$2
6227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6228$as_echo_n "checking for $ac_word... " >&6; }
6229if ${ac_cv_path_DIFF+:} false; then :
6230  $as_echo_n "(cached) " >&6
6231else
6232  case $DIFF in
6233  [\\/]* | ?:[\\/]*)
6234  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6235  ;;
6236  *)
6237  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6238for as_dir in $PATH
6239do
6240  IFS=$as_save_IFS
6241  test -z "$as_dir" && as_dir=.
6242    for ac_exec_ext in '' $ac_executable_extensions; do
6243  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6244    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6245    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6246    break 2
6247  fi
6248done
6249  done
6250IFS=$as_save_IFS
6251
6252  ;;
6253esac
6254fi
6255DIFF=$ac_cv_path_DIFF
6256if test -n "$DIFF"; then
6257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6258$as_echo "$DIFF" >&6; }
6259else
6260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6261$as_echo "no" >&6; }
6262fi
6263
6264
6265  test -n "$DIFF" && break
6266done
6267
6268    else
6269      # If it succeeded, then it was overridden by the user. We will use it
6270      # for the tool.
6271
6272      # First remove it from the list of overridden variables, so we can test
6273      # for unknown variables in the end.
6274      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6275
6276      # Check if the provided tool contains a complete path.
6277      tool_specified="$DIFF"
6278      tool_basename="${tool_specified##*/}"
6279      if test "x$tool_basename" = "x$tool_specified"; then
6280        # A command without a complete path is provided, search $PATH.
6281        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6282$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6283        # Extract the first word of "$tool_basename", so it can be a program name with args.
6284set dummy $tool_basename; ac_word=$2
6285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6286$as_echo_n "checking for $ac_word... " >&6; }
6287if ${ac_cv_path_DIFF+:} false; then :
6288  $as_echo_n "(cached) " >&6
6289else
6290  case $DIFF in
6291  [\\/]* | ?:[\\/]*)
6292  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6293  ;;
6294  *)
6295  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6296for as_dir in $PATH
6297do
6298  IFS=$as_save_IFS
6299  test -z "$as_dir" && as_dir=.
6300    for ac_exec_ext in '' $ac_executable_extensions; do
6301  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6302    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6303    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6304    break 2
6305  fi
6306done
6307  done
6308IFS=$as_save_IFS
6309
6310  ;;
6311esac
6312fi
6313DIFF=$ac_cv_path_DIFF
6314if test -n "$DIFF"; then
6315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6316$as_echo "$DIFF" >&6; }
6317else
6318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6319$as_echo "no" >&6; }
6320fi
6321
6322
6323        if test "x$DIFF" = x; then
6324          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6325        fi
6326      else
6327        # Otherwise we believe it is a complete path. Use it as it is.
6328        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6329$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6330        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6331$as_echo_n "checking for DIFF... " >&6; }
6332        if test ! -x "$tool_specified"; then
6333          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6334$as_echo "not found" >&6; }
6335          as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6336        fi
6337        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6338$as_echo "$tool_specified" >&6; }
6339      fi
6340    fi
6341  fi
6342
6343
6344
6345  if test "x$DIFF" = x; then
6346    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6347  fi
6348
6349
6350
6351
6352
6353  # Publish this variable in the help.
6354
6355
6356  if test "x$DIRNAME" = x; then
6357    # The variable is not set by user, try to locate tool using the code snippet
6358    for ac_prog in dirname
6359do
6360  # Extract the first word of "$ac_prog", so it can be a program name with args.
6361set dummy $ac_prog; ac_word=$2
6362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6363$as_echo_n "checking for $ac_word... " >&6; }
6364if ${ac_cv_path_DIRNAME+:} false; then :
6365  $as_echo_n "(cached) " >&6
6366else
6367  case $DIRNAME in
6368  [\\/]* | ?:[\\/]*)
6369  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6370  ;;
6371  *)
6372  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6373for as_dir in $PATH
6374do
6375  IFS=$as_save_IFS
6376  test -z "$as_dir" && as_dir=.
6377    for ac_exec_ext in '' $ac_executable_extensions; do
6378  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6379    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6380    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6381    break 2
6382  fi
6383done
6384  done
6385IFS=$as_save_IFS
6386
6387  ;;
6388esac
6389fi
6390DIRNAME=$ac_cv_path_DIRNAME
6391if test -n "$DIRNAME"; then
6392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6393$as_echo "$DIRNAME" >&6; }
6394else
6395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6396$as_echo "no" >&6; }
6397fi
6398
6399
6400  test -n "$DIRNAME" && break
6401done
6402
6403  else
6404    # The variable is set, but is it from the command line or the environment?
6405
6406    # Try to remove the string !DIRNAME! from our list.
6407    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6408    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6409      # If it failed, the variable was not from the command line. Ignore it,
6410      # but warn the user (except for BASH, which is always set by the calling BASH).
6411      if test "xDIRNAME" != xBASH; then
6412        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6413$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6414      fi
6415      # Try to locate tool using the code snippet
6416      for ac_prog in dirname
6417do
6418  # Extract the first word of "$ac_prog", so it can be a program name with args.
6419set dummy $ac_prog; ac_word=$2
6420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6421$as_echo_n "checking for $ac_word... " >&6; }
6422if ${ac_cv_path_DIRNAME+:} false; then :
6423  $as_echo_n "(cached) " >&6
6424else
6425  case $DIRNAME in
6426  [\\/]* | ?:[\\/]*)
6427  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6428  ;;
6429  *)
6430  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6431for as_dir in $PATH
6432do
6433  IFS=$as_save_IFS
6434  test -z "$as_dir" && as_dir=.
6435    for ac_exec_ext in '' $ac_executable_extensions; do
6436  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6437    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6438    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6439    break 2
6440  fi
6441done
6442  done
6443IFS=$as_save_IFS
6444
6445  ;;
6446esac
6447fi
6448DIRNAME=$ac_cv_path_DIRNAME
6449if test -n "$DIRNAME"; then
6450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6451$as_echo "$DIRNAME" >&6; }
6452else
6453  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6454$as_echo "no" >&6; }
6455fi
6456
6457
6458  test -n "$DIRNAME" && break
6459done
6460
6461    else
6462      # If it succeeded, then it was overridden by the user. We will use it
6463      # for the tool.
6464
6465      # First remove it from the list of overridden variables, so we can test
6466      # for unknown variables in the end.
6467      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6468
6469      # Check if the provided tool contains a complete path.
6470      tool_specified="$DIRNAME"
6471      tool_basename="${tool_specified##*/}"
6472      if test "x$tool_basename" = "x$tool_specified"; then
6473        # A command without a complete path is provided, search $PATH.
6474        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
6475$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
6476        # Extract the first word of "$tool_basename", so it can be a program name with args.
6477set dummy $tool_basename; ac_word=$2
6478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6479$as_echo_n "checking for $ac_word... " >&6; }
6480if ${ac_cv_path_DIRNAME+:} false; then :
6481  $as_echo_n "(cached) " >&6
6482else
6483  case $DIRNAME in
6484  [\\/]* | ?:[\\/]*)
6485  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6486  ;;
6487  *)
6488  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6489for as_dir in $PATH
6490do
6491  IFS=$as_save_IFS
6492  test -z "$as_dir" && as_dir=.
6493    for ac_exec_ext in '' $ac_executable_extensions; do
6494  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6495    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6496    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6497    break 2
6498  fi
6499done
6500  done
6501IFS=$as_save_IFS
6502
6503  ;;
6504esac
6505fi
6506DIRNAME=$ac_cv_path_DIRNAME
6507if test -n "$DIRNAME"; then
6508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6509$as_echo "$DIRNAME" >&6; }
6510else
6511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6512$as_echo "no" >&6; }
6513fi
6514
6515
6516        if test "x$DIRNAME" = x; then
6517          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6518        fi
6519      else
6520        # Otherwise we believe it is a complete path. Use it as it is.
6521        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
6522$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
6523        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6524$as_echo_n "checking for DIRNAME... " >&6; }
6525        if test ! -x "$tool_specified"; then
6526          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6527$as_echo "not found" >&6; }
6528          as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
6529        fi
6530        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6531$as_echo "$tool_specified" >&6; }
6532      fi
6533    fi
6534  fi
6535
6536
6537
6538  if test "x$DIRNAME" = x; then
6539    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
6540  fi
6541
6542
6543
6544
6545
6546  # Publish this variable in the help.
6547
6548
6549  if test "x$ECHO" = x; then
6550    # The variable is not set by user, try to locate tool using the code snippet
6551    for ac_prog in echo
6552do
6553  # Extract the first word of "$ac_prog", so it can be a program name with args.
6554set dummy $ac_prog; ac_word=$2
6555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6556$as_echo_n "checking for $ac_word... " >&6; }
6557if ${ac_cv_path_ECHO+:} false; then :
6558  $as_echo_n "(cached) " >&6
6559else
6560  case $ECHO in
6561  [\\/]* | ?:[\\/]*)
6562  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6563  ;;
6564  *)
6565  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6566for as_dir in $PATH
6567do
6568  IFS=$as_save_IFS
6569  test -z "$as_dir" && as_dir=.
6570    for ac_exec_ext in '' $ac_executable_extensions; do
6571  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6572    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6573    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6574    break 2
6575  fi
6576done
6577  done
6578IFS=$as_save_IFS
6579
6580  ;;
6581esac
6582fi
6583ECHO=$ac_cv_path_ECHO
6584if test -n "$ECHO"; then
6585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6586$as_echo "$ECHO" >&6; }
6587else
6588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6589$as_echo "no" >&6; }
6590fi
6591
6592
6593  test -n "$ECHO" && break
6594done
6595
6596  else
6597    # The variable is set, but is it from the command line or the environment?
6598
6599    # Try to remove the string !ECHO! from our list.
6600    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
6601    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6602      # If it failed, the variable was not from the command line. Ignore it,
6603      # but warn the user (except for BASH, which is always set by the calling BASH).
6604      if test "xECHO" != xBASH; then
6605        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
6606$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
6607      fi
6608      # Try to locate tool using the code snippet
6609      for ac_prog in echo
6610do
6611  # Extract the first word of "$ac_prog", so it can be a program name with args.
6612set dummy $ac_prog; ac_word=$2
6613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6614$as_echo_n "checking for $ac_word... " >&6; }
6615if ${ac_cv_path_ECHO+:} false; then :
6616  $as_echo_n "(cached) " >&6
6617else
6618  case $ECHO in
6619  [\\/]* | ?:[\\/]*)
6620  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6621  ;;
6622  *)
6623  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6624for as_dir in $PATH
6625do
6626  IFS=$as_save_IFS
6627  test -z "$as_dir" && as_dir=.
6628    for ac_exec_ext in '' $ac_executable_extensions; do
6629  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6630    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6631    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6632    break 2
6633  fi
6634done
6635  done
6636IFS=$as_save_IFS
6637
6638  ;;
6639esac
6640fi
6641ECHO=$ac_cv_path_ECHO
6642if test -n "$ECHO"; then
6643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6644$as_echo "$ECHO" >&6; }
6645else
6646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6647$as_echo "no" >&6; }
6648fi
6649
6650
6651  test -n "$ECHO" && break
6652done
6653
6654    else
6655      # If it succeeded, then it was overridden by the user. We will use it
6656      # for the tool.
6657
6658      # First remove it from the list of overridden variables, so we can test
6659      # for unknown variables in the end.
6660      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6661
6662      # Check if the provided tool contains a complete path.
6663      tool_specified="$ECHO"
6664      tool_basename="${tool_specified##*/}"
6665      if test "x$tool_basename" = "x$tool_specified"; then
6666        # A command without a complete path is provided, search $PATH.
6667        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
6668$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
6669        # Extract the first word of "$tool_basename", so it can be a program name with args.
6670set dummy $tool_basename; ac_word=$2
6671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6672$as_echo_n "checking for $ac_word... " >&6; }
6673if ${ac_cv_path_ECHO+:} false; then :
6674  $as_echo_n "(cached) " >&6
6675else
6676  case $ECHO in
6677  [\\/]* | ?:[\\/]*)
6678  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6679  ;;
6680  *)
6681  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6682for as_dir in $PATH
6683do
6684  IFS=$as_save_IFS
6685  test -z "$as_dir" && as_dir=.
6686    for ac_exec_ext in '' $ac_executable_extensions; do
6687  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6688    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6689    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6690    break 2
6691  fi
6692done
6693  done
6694IFS=$as_save_IFS
6695
6696  ;;
6697esac
6698fi
6699ECHO=$ac_cv_path_ECHO
6700if test -n "$ECHO"; then
6701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6702$as_echo "$ECHO" >&6; }
6703else
6704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6705$as_echo "no" >&6; }
6706fi
6707
6708
6709        if test "x$ECHO" = x; then
6710          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6711        fi
6712      else
6713        # Otherwise we believe it is a complete path. Use it as it is.
6714        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
6715$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
6716        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
6717$as_echo_n "checking for ECHO... " >&6; }
6718        if test ! -x "$tool_specified"; then
6719          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6720$as_echo "not found" >&6; }
6721          as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
6722        fi
6723        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6724$as_echo "$tool_specified" >&6; }
6725      fi
6726    fi
6727  fi
6728
6729
6730
6731  if test "x$ECHO" = x; then
6732    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
6733  fi
6734
6735
6736
6737
6738
6739  # Publish this variable in the help.
6740
6741
6742  if test "x$EXPR" = x; then
6743    # The variable is not set by user, try to locate tool using the code snippet
6744    for ac_prog in expr
6745do
6746  # Extract the first word of "$ac_prog", so it can be a program name with args.
6747set dummy $ac_prog; ac_word=$2
6748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6749$as_echo_n "checking for $ac_word... " >&6; }
6750if ${ac_cv_path_EXPR+:} false; then :
6751  $as_echo_n "(cached) " >&6
6752else
6753  case $EXPR in
6754  [\\/]* | ?:[\\/]*)
6755  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6756  ;;
6757  *)
6758  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6759for as_dir in $PATH
6760do
6761  IFS=$as_save_IFS
6762  test -z "$as_dir" && as_dir=.
6763    for ac_exec_ext in '' $ac_executable_extensions; do
6764  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6765    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6766    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6767    break 2
6768  fi
6769done
6770  done
6771IFS=$as_save_IFS
6772
6773  ;;
6774esac
6775fi
6776EXPR=$ac_cv_path_EXPR
6777if test -n "$EXPR"; then
6778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6779$as_echo "$EXPR" >&6; }
6780else
6781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6782$as_echo "no" >&6; }
6783fi
6784
6785
6786  test -n "$EXPR" && break
6787done
6788
6789  else
6790    # The variable is set, but is it from the command line or the environment?
6791
6792    # Try to remove the string !EXPR! from our list.
6793    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
6794    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6795      # If it failed, the variable was not from the command line. Ignore it,
6796      # but warn the user (except for BASH, which is always set by the calling BASH).
6797      if test "xEXPR" != xBASH; then
6798        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
6799$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
6800      fi
6801      # Try to locate tool using the code snippet
6802      for ac_prog in expr
6803do
6804  # Extract the first word of "$ac_prog", so it can be a program name with args.
6805set dummy $ac_prog; ac_word=$2
6806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6807$as_echo_n "checking for $ac_word... " >&6; }
6808if ${ac_cv_path_EXPR+:} false; then :
6809  $as_echo_n "(cached) " >&6
6810else
6811  case $EXPR in
6812  [\\/]* | ?:[\\/]*)
6813  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6814  ;;
6815  *)
6816  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6817for as_dir in $PATH
6818do
6819  IFS=$as_save_IFS
6820  test -z "$as_dir" && as_dir=.
6821    for ac_exec_ext in '' $ac_executable_extensions; do
6822  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6823    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6824    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6825    break 2
6826  fi
6827done
6828  done
6829IFS=$as_save_IFS
6830
6831  ;;
6832esac
6833fi
6834EXPR=$ac_cv_path_EXPR
6835if test -n "$EXPR"; then
6836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6837$as_echo "$EXPR" >&6; }
6838else
6839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6840$as_echo "no" >&6; }
6841fi
6842
6843
6844  test -n "$EXPR" && break
6845done
6846
6847    else
6848      # If it succeeded, then it was overridden by the user. We will use it
6849      # for the tool.
6850
6851      # First remove it from the list of overridden variables, so we can test
6852      # for unknown variables in the end.
6853      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6854
6855      # Check if the provided tool contains a complete path.
6856      tool_specified="$EXPR"
6857      tool_basename="${tool_specified##*/}"
6858      if test "x$tool_basename" = "x$tool_specified"; then
6859        # A command without a complete path is provided, search $PATH.
6860        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
6861$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
6862        # Extract the first word of "$tool_basename", so it can be a program name with args.
6863set dummy $tool_basename; ac_word=$2
6864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6865$as_echo_n "checking for $ac_word... " >&6; }
6866if ${ac_cv_path_EXPR+:} false; then :
6867  $as_echo_n "(cached) " >&6
6868else
6869  case $EXPR in
6870  [\\/]* | ?:[\\/]*)
6871  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6872  ;;
6873  *)
6874  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6875for as_dir in $PATH
6876do
6877  IFS=$as_save_IFS
6878  test -z "$as_dir" && as_dir=.
6879    for ac_exec_ext in '' $ac_executable_extensions; do
6880  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6881    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6882    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6883    break 2
6884  fi
6885done
6886  done
6887IFS=$as_save_IFS
6888
6889  ;;
6890esac
6891fi
6892EXPR=$ac_cv_path_EXPR
6893if test -n "$EXPR"; then
6894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6895$as_echo "$EXPR" >&6; }
6896else
6897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6898$as_echo "no" >&6; }
6899fi
6900
6901
6902        if test "x$EXPR" = x; then
6903          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6904        fi
6905      else
6906        # Otherwise we believe it is a complete path. Use it as it is.
6907        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
6908$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
6909        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
6910$as_echo_n "checking for EXPR... " >&6; }
6911        if test ! -x "$tool_specified"; then
6912          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6913$as_echo "not found" >&6; }
6914          as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
6915        fi
6916        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6917$as_echo "$tool_specified" >&6; }
6918      fi
6919    fi
6920  fi
6921
6922
6923
6924  if test "x$EXPR" = x; then
6925    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
6926  fi
6927
6928
6929
6930
6931
6932  # Publish this variable in the help.
6933
6934
6935  if test "x$FILE" = x; then
6936    # The variable is not set by user, try to locate tool using the code snippet
6937    for ac_prog in file
6938do
6939  # Extract the first word of "$ac_prog", so it can be a program name with args.
6940set dummy $ac_prog; ac_word=$2
6941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6942$as_echo_n "checking for $ac_word... " >&6; }
6943if ${ac_cv_path_FILE+:} false; then :
6944  $as_echo_n "(cached) " >&6
6945else
6946  case $FILE in
6947  [\\/]* | ?:[\\/]*)
6948  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
6949  ;;
6950  *)
6951  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6952for as_dir in $PATH
6953do
6954  IFS=$as_save_IFS
6955  test -z "$as_dir" && as_dir=.
6956    for ac_exec_ext in '' $ac_executable_extensions; do
6957  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6958    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
6959    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6960    break 2
6961  fi
6962done
6963  done
6964IFS=$as_save_IFS
6965
6966  ;;
6967esac
6968fi
6969FILE=$ac_cv_path_FILE
6970if test -n "$FILE"; then
6971  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
6972$as_echo "$FILE" >&6; }
6973else
6974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6975$as_echo "no" >&6; }
6976fi
6977
6978
6979  test -n "$FILE" && break
6980done
6981
6982  else
6983    # The variable is set, but is it from the command line or the environment?
6984
6985    # Try to remove the string !FILE! from our list.
6986    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
6987    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6988      # If it failed, the variable was not from the command line. Ignore it,
6989      # but warn the user (except for BASH, which is always set by the calling BASH).
6990      if test "xFILE" != xBASH; then
6991        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
6992$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
6993      fi
6994      # Try to locate tool using the code snippet
6995      for ac_prog in file
6996do
6997  # Extract the first word of "$ac_prog", so it can be a program name with args.
6998set dummy $ac_prog; ac_word=$2
6999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7000$as_echo_n "checking for $ac_word... " >&6; }
7001if ${ac_cv_path_FILE+:} false; then :
7002  $as_echo_n "(cached) " >&6
7003else
7004  case $FILE in
7005  [\\/]* | ?:[\\/]*)
7006  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7007  ;;
7008  *)
7009  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7010for as_dir in $PATH
7011do
7012  IFS=$as_save_IFS
7013  test -z "$as_dir" && as_dir=.
7014    for ac_exec_ext in '' $ac_executable_extensions; do
7015  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7016    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7017    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7018    break 2
7019  fi
7020done
7021  done
7022IFS=$as_save_IFS
7023
7024  ;;
7025esac
7026fi
7027FILE=$ac_cv_path_FILE
7028if test -n "$FILE"; then
7029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7030$as_echo "$FILE" >&6; }
7031else
7032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7033$as_echo "no" >&6; }
7034fi
7035
7036
7037  test -n "$FILE" && break
7038done
7039
7040    else
7041      # If it succeeded, then it was overridden by the user. We will use it
7042      # for the tool.
7043
7044      # First remove it from the list of overridden variables, so we can test
7045      # for unknown variables in the end.
7046      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7047
7048      # Check if the provided tool contains a complete path.
7049      tool_specified="$FILE"
7050      tool_basename="${tool_specified##*/}"
7051      if test "x$tool_basename" = "x$tool_specified"; then
7052        # A command without a complete path is provided, search $PATH.
7053        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7054$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7055        # Extract the first word of "$tool_basename", so it can be a program name with args.
7056set dummy $tool_basename; ac_word=$2
7057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7058$as_echo_n "checking for $ac_word... " >&6; }
7059if ${ac_cv_path_FILE+:} false; then :
7060  $as_echo_n "(cached) " >&6
7061else
7062  case $FILE in
7063  [\\/]* | ?:[\\/]*)
7064  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7065  ;;
7066  *)
7067  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7068for as_dir in $PATH
7069do
7070  IFS=$as_save_IFS
7071  test -z "$as_dir" && as_dir=.
7072    for ac_exec_ext in '' $ac_executable_extensions; do
7073  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7074    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7075    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7076    break 2
7077  fi
7078done
7079  done
7080IFS=$as_save_IFS
7081
7082  ;;
7083esac
7084fi
7085FILE=$ac_cv_path_FILE
7086if test -n "$FILE"; then
7087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7088$as_echo "$FILE" >&6; }
7089else
7090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7091$as_echo "no" >&6; }
7092fi
7093
7094
7095        if test "x$FILE" = x; then
7096          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7097        fi
7098      else
7099        # Otherwise we believe it is a complete path. Use it as it is.
7100        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7101$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7102        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7103$as_echo_n "checking for FILE... " >&6; }
7104        if test ! -x "$tool_specified"; then
7105          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7106$as_echo "not found" >&6; }
7107          as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7108        fi
7109        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7110$as_echo "$tool_specified" >&6; }
7111      fi
7112    fi
7113  fi
7114
7115
7116
7117  if test "x$FILE" = x; then
7118    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7119  fi
7120
7121
7122
7123
7124
7125  # Publish this variable in the help.
7126
7127
7128  if test "x$FIND" = x; then
7129    # The variable is not set by user, try to locate tool using the code snippet
7130    for ac_prog in find
7131do
7132  # Extract the first word of "$ac_prog", so it can be a program name with args.
7133set dummy $ac_prog; ac_word=$2
7134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7135$as_echo_n "checking for $ac_word... " >&6; }
7136if ${ac_cv_path_FIND+:} false; then :
7137  $as_echo_n "(cached) " >&6
7138else
7139  case $FIND in
7140  [\\/]* | ?:[\\/]*)
7141  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7142  ;;
7143  *)
7144  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7145for as_dir in $PATH
7146do
7147  IFS=$as_save_IFS
7148  test -z "$as_dir" && as_dir=.
7149    for ac_exec_ext in '' $ac_executable_extensions; do
7150  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7151    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7152    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7153    break 2
7154  fi
7155done
7156  done
7157IFS=$as_save_IFS
7158
7159  ;;
7160esac
7161fi
7162FIND=$ac_cv_path_FIND
7163if test -n "$FIND"; then
7164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7165$as_echo "$FIND" >&6; }
7166else
7167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7168$as_echo "no" >&6; }
7169fi
7170
7171
7172  test -n "$FIND" && break
7173done
7174
7175  else
7176    # The variable is set, but is it from the command line or the environment?
7177
7178    # Try to remove the string !FIND! from our list.
7179    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7180    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7181      # If it failed, the variable was not from the command line. Ignore it,
7182      # but warn the user (except for BASH, which is always set by the calling BASH).
7183      if test "xFIND" != xBASH; then
7184        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7185$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7186      fi
7187      # Try to locate tool using the code snippet
7188      for ac_prog in find
7189do
7190  # Extract the first word of "$ac_prog", so it can be a program name with args.
7191set dummy $ac_prog; ac_word=$2
7192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7193$as_echo_n "checking for $ac_word... " >&6; }
7194if ${ac_cv_path_FIND+:} false; then :
7195  $as_echo_n "(cached) " >&6
7196else
7197  case $FIND in
7198  [\\/]* | ?:[\\/]*)
7199  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7200  ;;
7201  *)
7202  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7203for as_dir in $PATH
7204do
7205  IFS=$as_save_IFS
7206  test -z "$as_dir" && as_dir=.
7207    for ac_exec_ext in '' $ac_executable_extensions; do
7208  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7209    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7210    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7211    break 2
7212  fi
7213done
7214  done
7215IFS=$as_save_IFS
7216
7217  ;;
7218esac
7219fi
7220FIND=$ac_cv_path_FIND
7221if test -n "$FIND"; then
7222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7223$as_echo "$FIND" >&6; }
7224else
7225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7226$as_echo "no" >&6; }
7227fi
7228
7229
7230  test -n "$FIND" && break
7231done
7232
7233    else
7234      # If it succeeded, then it was overridden by the user. We will use it
7235      # for the tool.
7236
7237      # First remove it from the list of overridden variables, so we can test
7238      # for unknown variables in the end.
7239      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7240
7241      # Check if the provided tool contains a complete path.
7242      tool_specified="$FIND"
7243      tool_basename="${tool_specified##*/}"
7244      if test "x$tool_basename" = "x$tool_specified"; then
7245        # A command without a complete path is provided, search $PATH.
7246        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7247$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7248        # Extract the first word of "$tool_basename", so it can be a program name with args.
7249set dummy $tool_basename; ac_word=$2
7250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7251$as_echo_n "checking for $ac_word... " >&6; }
7252if ${ac_cv_path_FIND+:} false; then :
7253  $as_echo_n "(cached) " >&6
7254else
7255  case $FIND in
7256  [\\/]* | ?:[\\/]*)
7257  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7258  ;;
7259  *)
7260  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7261for as_dir in $PATH
7262do
7263  IFS=$as_save_IFS
7264  test -z "$as_dir" && as_dir=.
7265    for ac_exec_ext in '' $ac_executable_extensions; do
7266  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7267    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7268    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7269    break 2
7270  fi
7271done
7272  done
7273IFS=$as_save_IFS
7274
7275  ;;
7276esac
7277fi
7278FIND=$ac_cv_path_FIND
7279if test -n "$FIND"; then
7280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7281$as_echo "$FIND" >&6; }
7282else
7283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7284$as_echo "no" >&6; }
7285fi
7286
7287
7288        if test "x$FIND" = x; then
7289          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7290        fi
7291      else
7292        # Otherwise we believe it is a complete path. Use it as it is.
7293        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7294$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7295        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7296$as_echo_n "checking for FIND... " >&6; }
7297        if test ! -x "$tool_specified"; then
7298          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7299$as_echo "not found" >&6; }
7300          as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7301        fi
7302        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7303$as_echo "$tool_specified" >&6; }
7304      fi
7305    fi
7306  fi
7307
7308
7309
7310  if test "x$FIND" = x; then
7311    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7312  fi
7313
7314
7315
7316
7317
7318  # Publish this variable in the help.
7319
7320
7321  if test "x$HEAD" = x; then
7322    # The variable is not set by user, try to locate tool using the code snippet
7323    for ac_prog in head
7324do
7325  # Extract the first word of "$ac_prog", so it can be a program name with args.
7326set dummy $ac_prog; ac_word=$2
7327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7328$as_echo_n "checking for $ac_word... " >&6; }
7329if ${ac_cv_path_HEAD+:} false; then :
7330  $as_echo_n "(cached) " >&6
7331else
7332  case $HEAD in
7333  [\\/]* | ?:[\\/]*)
7334  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7335  ;;
7336  *)
7337  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7338for as_dir in $PATH
7339do
7340  IFS=$as_save_IFS
7341  test -z "$as_dir" && as_dir=.
7342    for ac_exec_ext in '' $ac_executable_extensions; do
7343  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7344    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7345    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7346    break 2
7347  fi
7348done
7349  done
7350IFS=$as_save_IFS
7351
7352  ;;
7353esac
7354fi
7355HEAD=$ac_cv_path_HEAD
7356if test -n "$HEAD"; then
7357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7358$as_echo "$HEAD" >&6; }
7359else
7360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7361$as_echo "no" >&6; }
7362fi
7363
7364
7365  test -n "$HEAD" && break
7366done
7367
7368  else
7369    # The variable is set, but is it from the command line or the environment?
7370
7371    # Try to remove the string !HEAD! from our list.
7372    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
7373    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7374      # If it failed, the variable was not from the command line. Ignore it,
7375      # but warn the user (except for BASH, which is always set by the calling BASH).
7376      if test "xHEAD" != xBASH; then
7377        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
7378$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
7379      fi
7380      # Try to locate tool using the code snippet
7381      for ac_prog in head
7382do
7383  # Extract the first word of "$ac_prog", so it can be a program name with args.
7384set dummy $ac_prog; ac_word=$2
7385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7386$as_echo_n "checking for $ac_word... " >&6; }
7387if ${ac_cv_path_HEAD+:} false; then :
7388  $as_echo_n "(cached) " >&6
7389else
7390  case $HEAD in
7391  [\\/]* | ?:[\\/]*)
7392  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7393  ;;
7394  *)
7395  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7396for as_dir in $PATH
7397do
7398  IFS=$as_save_IFS
7399  test -z "$as_dir" && as_dir=.
7400    for ac_exec_ext in '' $ac_executable_extensions; do
7401  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7402    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7403    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7404    break 2
7405  fi
7406done
7407  done
7408IFS=$as_save_IFS
7409
7410  ;;
7411esac
7412fi
7413HEAD=$ac_cv_path_HEAD
7414if test -n "$HEAD"; then
7415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7416$as_echo "$HEAD" >&6; }
7417else
7418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7419$as_echo "no" >&6; }
7420fi
7421
7422
7423  test -n "$HEAD" && break
7424done
7425
7426    else
7427      # If it succeeded, then it was overridden by the user. We will use it
7428      # for the tool.
7429
7430      # First remove it from the list of overridden variables, so we can test
7431      # for unknown variables in the end.
7432      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7433
7434      # Check if the provided tool contains a complete path.
7435      tool_specified="$HEAD"
7436      tool_basename="${tool_specified##*/}"
7437      if test "x$tool_basename" = "x$tool_specified"; then
7438        # A command without a complete path is provided, search $PATH.
7439        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
7440$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
7441        # Extract the first word of "$tool_basename", so it can be a program name with args.
7442set dummy $tool_basename; ac_word=$2
7443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7444$as_echo_n "checking for $ac_word... " >&6; }
7445if ${ac_cv_path_HEAD+:} false; then :
7446  $as_echo_n "(cached) " >&6
7447else
7448  case $HEAD in
7449  [\\/]* | ?:[\\/]*)
7450  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7451  ;;
7452  *)
7453  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7454for as_dir in $PATH
7455do
7456  IFS=$as_save_IFS
7457  test -z "$as_dir" && as_dir=.
7458    for ac_exec_ext in '' $ac_executable_extensions; do
7459  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7460    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7461    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7462    break 2
7463  fi
7464done
7465  done
7466IFS=$as_save_IFS
7467
7468  ;;
7469esac
7470fi
7471HEAD=$ac_cv_path_HEAD
7472if test -n "$HEAD"; then
7473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7474$as_echo "$HEAD" >&6; }
7475else
7476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7477$as_echo "no" >&6; }
7478fi
7479
7480
7481        if test "x$HEAD" = x; then
7482          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7483        fi
7484      else
7485        # Otherwise we believe it is a complete path. Use it as it is.
7486        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
7487$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
7488        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7489$as_echo_n "checking for HEAD... " >&6; }
7490        if test ! -x "$tool_specified"; then
7491          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7492$as_echo "not found" >&6; }
7493          as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
7494        fi
7495        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7496$as_echo "$tool_specified" >&6; }
7497      fi
7498    fi
7499  fi
7500
7501
7502
7503  if test "x$HEAD" = x; then
7504    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
7505  fi
7506
7507
7508
7509
7510
7511  # Publish this variable in the help.
7512
7513
7514  if test "x$LN" = x; then
7515    # The variable is not set by user, try to locate tool using the code snippet
7516    for ac_prog in ln
7517do
7518  # Extract the first word of "$ac_prog", so it can be a program name with args.
7519set dummy $ac_prog; ac_word=$2
7520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7521$as_echo_n "checking for $ac_word... " >&6; }
7522if ${ac_cv_path_LN+:} false; then :
7523  $as_echo_n "(cached) " >&6
7524else
7525  case $LN in
7526  [\\/]* | ?:[\\/]*)
7527  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7528  ;;
7529  *)
7530  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7531for as_dir in $PATH
7532do
7533  IFS=$as_save_IFS
7534  test -z "$as_dir" && as_dir=.
7535    for ac_exec_ext in '' $ac_executable_extensions; do
7536  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7537    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7538    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7539    break 2
7540  fi
7541done
7542  done
7543IFS=$as_save_IFS
7544
7545  ;;
7546esac
7547fi
7548LN=$ac_cv_path_LN
7549if test -n "$LN"; then
7550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7551$as_echo "$LN" >&6; }
7552else
7553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7554$as_echo "no" >&6; }
7555fi
7556
7557
7558  test -n "$LN" && break
7559done
7560
7561  else
7562    # The variable is set, but is it from the command line or the environment?
7563
7564    # Try to remove the string !LN! from our list.
7565    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
7566    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7567      # If it failed, the variable was not from the command line. Ignore it,
7568      # but warn the user (except for BASH, which is always set by the calling BASH).
7569      if test "xLN" != xBASH; then
7570        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
7571$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
7572      fi
7573      # Try to locate tool using the code snippet
7574      for ac_prog in ln
7575do
7576  # Extract the first word of "$ac_prog", so it can be a program name with args.
7577set dummy $ac_prog; ac_word=$2
7578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7579$as_echo_n "checking for $ac_word... " >&6; }
7580if ${ac_cv_path_LN+:} false; then :
7581  $as_echo_n "(cached) " >&6
7582else
7583  case $LN in
7584  [\\/]* | ?:[\\/]*)
7585  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7586  ;;
7587  *)
7588  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7589for as_dir in $PATH
7590do
7591  IFS=$as_save_IFS
7592  test -z "$as_dir" && as_dir=.
7593    for ac_exec_ext in '' $ac_executable_extensions; do
7594  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7595    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7596    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7597    break 2
7598  fi
7599done
7600  done
7601IFS=$as_save_IFS
7602
7603  ;;
7604esac
7605fi
7606LN=$ac_cv_path_LN
7607if test -n "$LN"; then
7608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7609$as_echo "$LN" >&6; }
7610else
7611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7612$as_echo "no" >&6; }
7613fi
7614
7615
7616  test -n "$LN" && break
7617done
7618
7619    else
7620      # If it succeeded, then it was overridden by the user. We will use it
7621      # for the tool.
7622
7623      # First remove it from the list of overridden variables, so we can test
7624      # for unknown variables in the end.
7625      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7626
7627      # Check if the provided tool contains a complete path.
7628      tool_specified="$LN"
7629      tool_basename="${tool_specified##*/}"
7630      if test "x$tool_basename" = "x$tool_specified"; then
7631        # A command without a complete path is provided, search $PATH.
7632        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
7633$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
7634        # Extract the first word of "$tool_basename", so it can be a program name with args.
7635set dummy $tool_basename; ac_word=$2
7636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7637$as_echo_n "checking for $ac_word... " >&6; }
7638if ${ac_cv_path_LN+:} false; then :
7639  $as_echo_n "(cached) " >&6
7640else
7641  case $LN in
7642  [\\/]* | ?:[\\/]*)
7643  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7644  ;;
7645  *)
7646  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7647for as_dir in $PATH
7648do
7649  IFS=$as_save_IFS
7650  test -z "$as_dir" && as_dir=.
7651    for ac_exec_ext in '' $ac_executable_extensions; do
7652  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7653    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7654    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7655    break 2
7656  fi
7657done
7658  done
7659IFS=$as_save_IFS
7660
7661  ;;
7662esac
7663fi
7664LN=$ac_cv_path_LN
7665if test -n "$LN"; then
7666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7667$as_echo "$LN" >&6; }
7668else
7669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7670$as_echo "no" >&6; }
7671fi
7672
7673
7674        if test "x$LN" = x; then
7675          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7676        fi
7677      else
7678        # Otherwise we believe it is a complete path. Use it as it is.
7679        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
7680$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
7681        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
7682$as_echo_n "checking for LN... " >&6; }
7683        if test ! -x "$tool_specified"; then
7684          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7685$as_echo "not found" >&6; }
7686          as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
7687        fi
7688        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7689$as_echo "$tool_specified" >&6; }
7690      fi
7691    fi
7692  fi
7693
7694
7695
7696  if test "x$LN" = x; then
7697    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
7698  fi
7699
7700
7701
7702
7703
7704  # Publish this variable in the help.
7705
7706
7707  if test "x$LS" = x; then
7708    # The variable is not set by user, try to locate tool using the code snippet
7709    for ac_prog in ls
7710do
7711  # Extract the first word of "$ac_prog", so it can be a program name with args.
7712set dummy $ac_prog; ac_word=$2
7713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7714$as_echo_n "checking for $ac_word... " >&6; }
7715if ${ac_cv_path_LS+:} false; then :
7716  $as_echo_n "(cached) " >&6
7717else
7718  case $LS in
7719  [\\/]* | ?:[\\/]*)
7720  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7721  ;;
7722  *)
7723  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7724for as_dir in $PATH
7725do
7726  IFS=$as_save_IFS
7727  test -z "$as_dir" && as_dir=.
7728    for ac_exec_ext in '' $ac_executable_extensions; do
7729  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7730    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7731    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7732    break 2
7733  fi
7734done
7735  done
7736IFS=$as_save_IFS
7737
7738  ;;
7739esac
7740fi
7741LS=$ac_cv_path_LS
7742if test -n "$LS"; then
7743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7744$as_echo "$LS" >&6; }
7745else
7746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7747$as_echo "no" >&6; }
7748fi
7749
7750
7751  test -n "$LS" && break
7752done
7753
7754  else
7755    # The variable is set, but is it from the command line or the environment?
7756
7757    # Try to remove the string !LS! from our list.
7758    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
7759    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7760      # If it failed, the variable was not from the command line. Ignore it,
7761      # but warn the user (except for BASH, which is always set by the calling BASH).
7762      if test "xLS" != xBASH; then
7763        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
7764$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
7765      fi
7766      # Try to locate tool using the code snippet
7767      for ac_prog in ls
7768do
7769  # Extract the first word of "$ac_prog", so it can be a program name with args.
7770set dummy $ac_prog; ac_word=$2
7771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7772$as_echo_n "checking for $ac_word... " >&6; }
7773if ${ac_cv_path_LS+:} false; then :
7774  $as_echo_n "(cached) " >&6
7775else
7776  case $LS in
7777  [\\/]* | ?:[\\/]*)
7778  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7779  ;;
7780  *)
7781  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7782for as_dir in $PATH
7783do
7784  IFS=$as_save_IFS
7785  test -z "$as_dir" && as_dir=.
7786    for ac_exec_ext in '' $ac_executable_extensions; do
7787  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7788    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7789    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7790    break 2
7791  fi
7792done
7793  done
7794IFS=$as_save_IFS
7795
7796  ;;
7797esac
7798fi
7799LS=$ac_cv_path_LS
7800if test -n "$LS"; then
7801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7802$as_echo "$LS" >&6; }
7803else
7804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7805$as_echo "no" >&6; }
7806fi
7807
7808
7809  test -n "$LS" && break
7810done
7811
7812    else
7813      # If it succeeded, then it was overridden by the user. We will use it
7814      # for the tool.
7815
7816      # First remove it from the list of overridden variables, so we can test
7817      # for unknown variables in the end.
7818      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7819
7820      # Check if the provided tool contains a complete path.
7821      tool_specified="$LS"
7822      tool_basename="${tool_specified##*/}"
7823      if test "x$tool_basename" = "x$tool_specified"; then
7824        # A command without a complete path is provided, search $PATH.
7825        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
7826$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
7827        # Extract the first word of "$tool_basename", so it can be a program name with args.
7828set dummy $tool_basename; ac_word=$2
7829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7830$as_echo_n "checking for $ac_word... " >&6; }
7831if ${ac_cv_path_LS+:} false; then :
7832  $as_echo_n "(cached) " >&6
7833else
7834  case $LS in
7835  [\\/]* | ?:[\\/]*)
7836  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7837  ;;
7838  *)
7839  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7840for as_dir in $PATH
7841do
7842  IFS=$as_save_IFS
7843  test -z "$as_dir" && as_dir=.
7844    for ac_exec_ext in '' $ac_executable_extensions; do
7845  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7846    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7847    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7848    break 2
7849  fi
7850done
7851  done
7852IFS=$as_save_IFS
7853
7854  ;;
7855esac
7856fi
7857LS=$ac_cv_path_LS
7858if test -n "$LS"; then
7859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7860$as_echo "$LS" >&6; }
7861else
7862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7863$as_echo "no" >&6; }
7864fi
7865
7866
7867        if test "x$LS" = x; then
7868          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7869        fi
7870      else
7871        # Otherwise we believe it is a complete path. Use it as it is.
7872        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
7873$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
7874        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
7875$as_echo_n "checking for LS... " >&6; }
7876        if test ! -x "$tool_specified"; then
7877          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7878$as_echo "not found" >&6; }
7879          as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
7880        fi
7881        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7882$as_echo "$tool_specified" >&6; }
7883      fi
7884    fi
7885  fi
7886
7887
7888
7889  if test "x$LS" = x; then
7890    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
7891  fi
7892
7893
7894
7895
7896
7897  # Publish this variable in the help.
7898
7899
7900  if test "x$MKDIR" = x; then
7901    # The variable is not set by user, try to locate tool using the code snippet
7902    for ac_prog in mkdir
7903do
7904  # Extract the first word of "$ac_prog", so it can be a program name with args.
7905set dummy $ac_prog; ac_word=$2
7906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7907$as_echo_n "checking for $ac_word... " >&6; }
7908if ${ac_cv_path_MKDIR+:} false; then :
7909  $as_echo_n "(cached) " >&6
7910else
7911  case $MKDIR in
7912  [\\/]* | ?:[\\/]*)
7913  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7914  ;;
7915  *)
7916  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7917for as_dir in $PATH
7918do
7919  IFS=$as_save_IFS
7920  test -z "$as_dir" && as_dir=.
7921    for ac_exec_ext in '' $ac_executable_extensions; do
7922  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7923    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7924    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7925    break 2
7926  fi
7927done
7928  done
7929IFS=$as_save_IFS
7930
7931  ;;
7932esac
7933fi
7934MKDIR=$ac_cv_path_MKDIR
7935if test -n "$MKDIR"; then
7936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
7937$as_echo "$MKDIR" >&6; }
7938else
7939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7940$as_echo "no" >&6; }
7941fi
7942
7943
7944  test -n "$MKDIR" && break
7945done
7946
7947  else
7948    # The variable is set, but is it from the command line or the environment?
7949
7950    # Try to remove the string !MKDIR! from our list.
7951    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
7952    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7953      # If it failed, the variable was not from the command line. Ignore it,
7954      # but warn the user (except for BASH, which is always set by the calling BASH).
7955      if test "xMKDIR" != xBASH; then
7956        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
7957$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
7958      fi
7959      # Try to locate tool using the code snippet
7960      for ac_prog in mkdir
7961do
7962  # Extract the first word of "$ac_prog", so it can be a program name with args.
7963set dummy $ac_prog; ac_word=$2
7964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7965$as_echo_n "checking for $ac_word... " >&6; }
7966if ${ac_cv_path_MKDIR+:} false; then :
7967  $as_echo_n "(cached) " >&6
7968else
7969  case $MKDIR in
7970  [\\/]* | ?:[\\/]*)
7971  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7972  ;;
7973  *)
7974  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7975for as_dir in $PATH
7976do
7977  IFS=$as_save_IFS
7978  test -z "$as_dir" && as_dir=.
7979    for ac_exec_ext in '' $ac_executable_extensions; do
7980  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7981    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7982    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7983    break 2
7984  fi
7985done
7986  done
7987IFS=$as_save_IFS
7988
7989  ;;
7990esac
7991fi
7992MKDIR=$ac_cv_path_MKDIR
7993if test -n "$MKDIR"; then
7994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
7995$as_echo "$MKDIR" >&6; }
7996else
7997  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7998$as_echo "no" >&6; }
7999fi
8000
8001
8002  test -n "$MKDIR" && break
8003done
8004
8005    else
8006      # If it succeeded, then it was overridden by the user. We will use it
8007      # for the tool.
8008
8009      # First remove it from the list of overridden variables, so we can test
8010      # for unknown variables in the end.
8011      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8012
8013      # Check if the provided tool contains a complete path.
8014      tool_specified="$MKDIR"
8015      tool_basename="${tool_specified##*/}"
8016      if test "x$tool_basename" = "x$tool_specified"; then
8017        # A command without a complete path is provided, search $PATH.
8018        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8019$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8020        # Extract the first word of "$tool_basename", so it can be a program name with args.
8021set dummy $tool_basename; ac_word=$2
8022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8023$as_echo_n "checking for $ac_word... " >&6; }
8024if ${ac_cv_path_MKDIR+:} false; then :
8025  $as_echo_n "(cached) " >&6
8026else
8027  case $MKDIR in
8028  [\\/]* | ?:[\\/]*)
8029  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8030  ;;
8031  *)
8032  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8033for as_dir in $PATH
8034do
8035  IFS=$as_save_IFS
8036  test -z "$as_dir" && as_dir=.
8037    for ac_exec_ext in '' $ac_executable_extensions; do
8038  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8039    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8040    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8041    break 2
8042  fi
8043done
8044  done
8045IFS=$as_save_IFS
8046
8047  ;;
8048esac
8049fi
8050MKDIR=$ac_cv_path_MKDIR
8051if test -n "$MKDIR"; then
8052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8053$as_echo "$MKDIR" >&6; }
8054else
8055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8056$as_echo "no" >&6; }
8057fi
8058
8059
8060        if test "x$MKDIR" = x; then
8061          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8062        fi
8063      else
8064        # Otherwise we believe it is a complete path. Use it as it is.
8065        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8066$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8067        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8068$as_echo_n "checking for MKDIR... " >&6; }
8069        if test ! -x "$tool_specified"; then
8070          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8071$as_echo "not found" >&6; }
8072          as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8073        fi
8074        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8075$as_echo "$tool_specified" >&6; }
8076      fi
8077    fi
8078  fi
8079
8080
8081
8082  if test "x$MKDIR" = x; then
8083    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8084  fi
8085
8086
8087
8088
8089
8090  # Publish this variable in the help.
8091
8092
8093  if test "x$MKTEMP" = x; then
8094    # The variable is not set by user, try to locate tool using the code snippet
8095    for ac_prog in mktemp
8096do
8097  # Extract the first word of "$ac_prog", so it can be a program name with args.
8098set dummy $ac_prog; ac_word=$2
8099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8100$as_echo_n "checking for $ac_word... " >&6; }
8101if ${ac_cv_path_MKTEMP+:} false; then :
8102  $as_echo_n "(cached) " >&6
8103else
8104  case $MKTEMP in
8105  [\\/]* | ?:[\\/]*)
8106  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8107  ;;
8108  *)
8109  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8110for as_dir in $PATH
8111do
8112  IFS=$as_save_IFS
8113  test -z "$as_dir" && as_dir=.
8114    for ac_exec_ext in '' $ac_executable_extensions; do
8115  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8116    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8117    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8118    break 2
8119  fi
8120done
8121  done
8122IFS=$as_save_IFS
8123
8124  ;;
8125esac
8126fi
8127MKTEMP=$ac_cv_path_MKTEMP
8128if test -n "$MKTEMP"; then
8129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8130$as_echo "$MKTEMP" >&6; }
8131else
8132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8133$as_echo "no" >&6; }
8134fi
8135
8136
8137  test -n "$MKTEMP" && break
8138done
8139
8140  else
8141    # The variable is set, but is it from the command line or the environment?
8142
8143    # Try to remove the string !MKTEMP! from our list.
8144    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8145    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8146      # If it failed, the variable was not from the command line. Ignore it,
8147      # but warn the user (except for BASH, which is always set by the calling BASH).
8148      if test "xMKTEMP" != xBASH; then
8149        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8150$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8151      fi
8152      # Try to locate tool using the code snippet
8153      for ac_prog in mktemp
8154do
8155  # Extract the first word of "$ac_prog", so it can be a program name with args.
8156set dummy $ac_prog; ac_word=$2
8157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8158$as_echo_n "checking for $ac_word... " >&6; }
8159if ${ac_cv_path_MKTEMP+:} false; then :
8160  $as_echo_n "(cached) " >&6
8161else
8162  case $MKTEMP in
8163  [\\/]* | ?:[\\/]*)
8164  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8165  ;;
8166  *)
8167  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8168for as_dir in $PATH
8169do
8170  IFS=$as_save_IFS
8171  test -z "$as_dir" && as_dir=.
8172    for ac_exec_ext in '' $ac_executable_extensions; do
8173  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8174    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8175    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8176    break 2
8177  fi
8178done
8179  done
8180IFS=$as_save_IFS
8181
8182  ;;
8183esac
8184fi
8185MKTEMP=$ac_cv_path_MKTEMP
8186if test -n "$MKTEMP"; then
8187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8188$as_echo "$MKTEMP" >&6; }
8189else
8190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8191$as_echo "no" >&6; }
8192fi
8193
8194
8195  test -n "$MKTEMP" && break
8196done
8197
8198    else
8199      # If it succeeded, then it was overridden by the user. We will use it
8200      # for the tool.
8201
8202      # First remove it from the list of overridden variables, so we can test
8203      # for unknown variables in the end.
8204      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8205
8206      # Check if the provided tool contains a complete path.
8207      tool_specified="$MKTEMP"
8208      tool_basename="${tool_specified##*/}"
8209      if test "x$tool_basename" = "x$tool_specified"; then
8210        # A command without a complete path is provided, search $PATH.
8211        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8212$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8213        # Extract the first word of "$tool_basename", so it can be a program name with args.
8214set dummy $tool_basename; ac_word=$2
8215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8216$as_echo_n "checking for $ac_word... " >&6; }
8217if ${ac_cv_path_MKTEMP+:} false; then :
8218  $as_echo_n "(cached) " >&6
8219else
8220  case $MKTEMP in
8221  [\\/]* | ?:[\\/]*)
8222  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8223  ;;
8224  *)
8225  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8226for as_dir in $PATH
8227do
8228  IFS=$as_save_IFS
8229  test -z "$as_dir" && as_dir=.
8230    for ac_exec_ext in '' $ac_executable_extensions; do
8231  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8232    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8233    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8234    break 2
8235  fi
8236done
8237  done
8238IFS=$as_save_IFS
8239
8240  ;;
8241esac
8242fi
8243MKTEMP=$ac_cv_path_MKTEMP
8244if test -n "$MKTEMP"; then
8245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8246$as_echo "$MKTEMP" >&6; }
8247else
8248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8249$as_echo "no" >&6; }
8250fi
8251
8252
8253        if test "x$MKTEMP" = x; then
8254          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8255        fi
8256      else
8257        # Otherwise we believe it is a complete path. Use it as it is.
8258        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8259$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8260        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8261$as_echo_n "checking for MKTEMP... " >&6; }
8262        if test ! -x "$tool_specified"; then
8263          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8264$as_echo "not found" >&6; }
8265          as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8266        fi
8267        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8268$as_echo "$tool_specified" >&6; }
8269      fi
8270    fi
8271  fi
8272
8273
8274
8275  if test "x$MKTEMP" = x; then
8276    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8277  fi
8278
8279
8280
8281
8282
8283  # Publish this variable in the help.
8284
8285
8286  if test "x$MV" = x; then
8287    # The variable is not set by user, try to locate tool using the code snippet
8288    for ac_prog in mv
8289do
8290  # Extract the first word of "$ac_prog", so it can be a program name with args.
8291set dummy $ac_prog; ac_word=$2
8292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8293$as_echo_n "checking for $ac_word... " >&6; }
8294if ${ac_cv_path_MV+:} false; then :
8295  $as_echo_n "(cached) " >&6
8296else
8297  case $MV in
8298  [\\/]* | ?:[\\/]*)
8299  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8300  ;;
8301  *)
8302  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8303for as_dir in $PATH
8304do
8305  IFS=$as_save_IFS
8306  test -z "$as_dir" && as_dir=.
8307    for ac_exec_ext in '' $ac_executable_extensions; do
8308  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8309    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8310    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8311    break 2
8312  fi
8313done
8314  done
8315IFS=$as_save_IFS
8316
8317  ;;
8318esac
8319fi
8320MV=$ac_cv_path_MV
8321if test -n "$MV"; then
8322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8323$as_echo "$MV" >&6; }
8324else
8325  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8326$as_echo "no" >&6; }
8327fi
8328
8329
8330  test -n "$MV" && break
8331done
8332
8333  else
8334    # The variable is set, but is it from the command line or the environment?
8335
8336    # Try to remove the string !MV! from our list.
8337    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
8338    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8339      # If it failed, the variable was not from the command line. Ignore it,
8340      # but warn the user (except for BASH, which is always set by the calling BASH).
8341      if test "xMV" != xBASH; then
8342        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
8343$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
8344      fi
8345      # Try to locate tool using the code snippet
8346      for ac_prog in mv
8347do
8348  # Extract the first word of "$ac_prog", so it can be a program name with args.
8349set dummy $ac_prog; ac_word=$2
8350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8351$as_echo_n "checking for $ac_word... " >&6; }
8352if ${ac_cv_path_MV+:} false; then :
8353  $as_echo_n "(cached) " >&6
8354else
8355  case $MV in
8356  [\\/]* | ?:[\\/]*)
8357  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8358  ;;
8359  *)
8360  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8361for as_dir in $PATH
8362do
8363  IFS=$as_save_IFS
8364  test -z "$as_dir" && as_dir=.
8365    for ac_exec_ext in '' $ac_executable_extensions; do
8366  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8367    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8368    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8369    break 2
8370  fi
8371done
8372  done
8373IFS=$as_save_IFS
8374
8375  ;;
8376esac
8377fi
8378MV=$ac_cv_path_MV
8379if test -n "$MV"; then
8380  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8381$as_echo "$MV" >&6; }
8382else
8383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8384$as_echo "no" >&6; }
8385fi
8386
8387
8388  test -n "$MV" && break
8389done
8390
8391    else
8392      # If it succeeded, then it was overridden by the user. We will use it
8393      # for the tool.
8394
8395      # First remove it from the list of overridden variables, so we can test
8396      # for unknown variables in the end.
8397      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8398
8399      # Check if the provided tool contains a complete path.
8400      tool_specified="$MV"
8401      tool_basename="${tool_specified##*/}"
8402      if test "x$tool_basename" = "x$tool_specified"; then
8403        # A command without a complete path is provided, search $PATH.
8404        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
8405$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
8406        # Extract the first word of "$tool_basename", so it can be a program name with args.
8407set dummy $tool_basename; ac_word=$2
8408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8409$as_echo_n "checking for $ac_word... " >&6; }
8410if ${ac_cv_path_MV+:} false; then :
8411  $as_echo_n "(cached) " >&6
8412else
8413  case $MV in
8414  [\\/]* | ?:[\\/]*)
8415  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8416  ;;
8417  *)
8418  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8419for as_dir in $PATH
8420do
8421  IFS=$as_save_IFS
8422  test -z "$as_dir" && as_dir=.
8423    for ac_exec_ext in '' $ac_executable_extensions; do
8424  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8425    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8426    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8427    break 2
8428  fi
8429done
8430  done
8431IFS=$as_save_IFS
8432
8433  ;;
8434esac
8435fi
8436MV=$ac_cv_path_MV
8437if test -n "$MV"; then
8438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8439$as_echo "$MV" >&6; }
8440else
8441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8442$as_echo "no" >&6; }
8443fi
8444
8445
8446        if test "x$MV" = x; then
8447          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8448        fi
8449      else
8450        # Otherwise we believe it is a complete path. Use it as it is.
8451        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
8452$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
8453        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8454$as_echo_n "checking for MV... " >&6; }
8455        if test ! -x "$tool_specified"; then
8456          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8457$as_echo "not found" >&6; }
8458          as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
8459        fi
8460        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8461$as_echo "$tool_specified" >&6; }
8462      fi
8463    fi
8464  fi
8465
8466
8467
8468  if test "x$MV" = x; then
8469    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
8470  fi
8471
8472
8473
8474
8475
8476  # Publish this variable in the help.
8477
8478
8479  if test "x$NAWK" = x; then
8480    # The variable is not set by user, try to locate tool using the code snippet
8481    for ac_prog in nawk gawk awk
8482do
8483  # Extract the first word of "$ac_prog", so it can be a program name with args.
8484set dummy $ac_prog; ac_word=$2
8485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8486$as_echo_n "checking for $ac_word... " >&6; }
8487if ${ac_cv_path_NAWK+:} false; then :
8488  $as_echo_n "(cached) " >&6
8489else
8490  case $NAWK in
8491  [\\/]* | ?:[\\/]*)
8492  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8493  ;;
8494  *)
8495  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8496for as_dir in $PATH
8497do
8498  IFS=$as_save_IFS
8499  test -z "$as_dir" && as_dir=.
8500    for ac_exec_ext in '' $ac_executable_extensions; do
8501  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8502    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8503    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8504    break 2
8505  fi
8506done
8507  done
8508IFS=$as_save_IFS
8509
8510  ;;
8511esac
8512fi
8513NAWK=$ac_cv_path_NAWK
8514if test -n "$NAWK"; then
8515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8516$as_echo "$NAWK" >&6; }
8517else
8518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8519$as_echo "no" >&6; }
8520fi
8521
8522
8523  test -n "$NAWK" && break
8524done
8525
8526  else
8527    # The variable is set, but is it from the command line or the environment?
8528
8529    # Try to remove the string !NAWK! from our list.
8530    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
8531    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8532      # If it failed, the variable was not from the command line. Ignore it,
8533      # but warn the user (except for BASH, which is always set by the calling BASH).
8534      if test "xNAWK" != xBASH; then
8535        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
8536$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
8537      fi
8538      # Try to locate tool using the code snippet
8539      for ac_prog in nawk gawk awk
8540do
8541  # Extract the first word of "$ac_prog", so it can be a program name with args.
8542set dummy $ac_prog; ac_word=$2
8543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8544$as_echo_n "checking for $ac_word... " >&6; }
8545if ${ac_cv_path_NAWK+:} false; then :
8546  $as_echo_n "(cached) " >&6
8547else
8548  case $NAWK in
8549  [\\/]* | ?:[\\/]*)
8550  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8551  ;;
8552  *)
8553  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8554for as_dir in $PATH
8555do
8556  IFS=$as_save_IFS
8557  test -z "$as_dir" && as_dir=.
8558    for ac_exec_ext in '' $ac_executable_extensions; do
8559  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8560    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8561    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8562    break 2
8563  fi
8564done
8565  done
8566IFS=$as_save_IFS
8567
8568  ;;
8569esac
8570fi
8571NAWK=$ac_cv_path_NAWK
8572if test -n "$NAWK"; then
8573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8574$as_echo "$NAWK" >&6; }
8575else
8576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8577$as_echo "no" >&6; }
8578fi
8579
8580
8581  test -n "$NAWK" && break
8582done
8583
8584    else
8585      # If it succeeded, then it was overridden by the user. We will use it
8586      # for the tool.
8587
8588      # First remove it from the list of overridden variables, so we can test
8589      # for unknown variables in the end.
8590      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8591
8592      # Check if the provided tool contains a complete path.
8593      tool_specified="$NAWK"
8594      tool_basename="${tool_specified##*/}"
8595      if test "x$tool_basename" = "x$tool_specified"; then
8596        # A command without a complete path is provided, search $PATH.
8597        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
8598$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
8599        # Extract the first word of "$tool_basename", so it can be a program name with args.
8600set dummy $tool_basename; ac_word=$2
8601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8602$as_echo_n "checking for $ac_word... " >&6; }
8603if ${ac_cv_path_NAWK+:} false; then :
8604  $as_echo_n "(cached) " >&6
8605else
8606  case $NAWK in
8607  [\\/]* | ?:[\\/]*)
8608  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8609  ;;
8610  *)
8611  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8612for as_dir in $PATH
8613do
8614  IFS=$as_save_IFS
8615  test -z "$as_dir" && as_dir=.
8616    for ac_exec_ext in '' $ac_executable_extensions; do
8617  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8618    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8619    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8620    break 2
8621  fi
8622done
8623  done
8624IFS=$as_save_IFS
8625
8626  ;;
8627esac
8628fi
8629NAWK=$ac_cv_path_NAWK
8630if test -n "$NAWK"; then
8631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8632$as_echo "$NAWK" >&6; }
8633else
8634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8635$as_echo "no" >&6; }
8636fi
8637
8638
8639        if test "x$NAWK" = x; then
8640          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8641        fi
8642      else
8643        # Otherwise we believe it is a complete path. Use it as it is.
8644        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
8645$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
8646        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
8647$as_echo_n "checking for NAWK... " >&6; }
8648        if test ! -x "$tool_specified"; then
8649          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8650$as_echo "not found" >&6; }
8651          as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
8652        fi
8653        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8654$as_echo "$tool_specified" >&6; }
8655      fi
8656    fi
8657  fi
8658
8659
8660
8661  if test "x$NAWK" = x; then
8662    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
8663  fi
8664
8665
8666
8667
8668
8669  # Publish this variable in the help.
8670
8671
8672  if test "x$PRINTF" = x; then
8673    # The variable is not set by user, try to locate tool using the code snippet
8674    for ac_prog in printf
8675do
8676  # Extract the first word of "$ac_prog", so it can be a program name with args.
8677set dummy $ac_prog; ac_word=$2
8678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8679$as_echo_n "checking for $ac_word... " >&6; }
8680if ${ac_cv_path_PRINTF+:} false; then :
8681  $as_echo_n "(cached) " >&6
8682else
8683  case $PRINTF in
8684  [\\/]* | ?:[\\/]*)
8685  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8686  ;;
8687  *)
8688  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8689for as_dir in $PATH
8690do
8691  IFS=$as_save_IFS
8692  test -z "$as_dir" && as_dir=.
8693    for ac_exec_ext in '' $ac_executable_extensions; do
8694  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8695    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8696    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8697    break 2
8698  fi
8699done
8700  done
8701IFS=$as_save_IFS
8702
8703  ;;
8704esac
8705fi
8706PRINTF=$ac_cv_path_PRINTF
8707if test -n "$PRINTF"; then
8708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8709$as_echo "$PRINTF" >&6; }
8710else
8711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8712$as_echo "no" >&6; }
8713fi
8714
8715
8716  test -n "$PRINTF" && break
8717done
8718
8719  else
8720    # The variable is set, but is it from the command line or the environment?
8721
8722    # Try to remove the string !PRINTF! from our list.
8723    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
8724    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8725      # If it failed, the variable was not from the command line. Ignore it,
8726      # but warn the user (except for BASH, which is always set by the calling BASH).
8727      if test "xPRINTF" != xBASH; then
8728        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
8729$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
8730      fi
8731      # Try to locate tool using the code snippet
8732      for ac_prog in printf
8733do
8734  # Extract the first word of "$ac_prog", so it can be a program name with args.
8735set dummy $ac_prog; ac_word=$2
8736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8737$as_echo_n "checking for $ac_word... " >&6; }
8738if ${ac_cv_path_PRINTF+:} false; then :
8739  $as_echo_n "(cached) " >&6
8740else
8741  case $PRINTF in
8742  [\\/]* | ?:[\\/]*)
8743  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8744  ;;
8745  *)
8746  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8747for as_dir in $PATH
8748do
8749  IFS=$as_save_IFS
8750  test -z "$as_dir" && as_dir=.
8751    for ac_exec_ext in '' $ac_executable_extensions; do
8752  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8753    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8754    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8755    break 2
8756  fi
8757done
8758  done
8759IFS=$as_save_IFS
8760
8761  ;;
8762esac
8763fi
8764PRINTF=$ac_cv_path_PRINTF
8765if test -n "$PRINTF"; then
8766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8767$as_echo "$PRINTF" >&6; }
8768else
8769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8770$as_echo "no" >&6; }
8771fi
8772
8773
8774  test -n "$PRINTF" && break
8775done
8776
8777    else
8778      # If it succeeded, then it was overridden by the user. We will use it
8779      # for the tool.
8780
8781      # First remove it from the list of overridden variables, so we can test
8782      # for unknown variables in the end.
8783      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8784
8785      # Check if the provided tool contains a complete path.
8786      tool_specified="$PRINTF"
8787      tool_basename="${tool_specified##*/}"
8788      if test "x$tool_basename" = "x$tool_specified"; then
8789        # A command without a complete path is provided, search $PATH.
8790        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
8791$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
8792        # Extract the first word of "$tool_basename", so it can be a program name with args.
8793set dummy $tool_basename; ac_word=$2
8794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8795$as_echo_n "checking for $ac_word... " >&6; }
8796if ${ac_cv_path_PRINTF+:} false; then :
8797  $as_echo_n "(cached) " >&6
8798else
8799  case $PRINTF in
8800  [\\/]* | ?:[\\/]*)
8801  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8802  ;;
8803  *)
8804  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8805for as_dir in $PATH
8806do
8807  IFS=$as_save_IFS
8808  test -z "$as_dir" && as_dir=.
8809    for ac_exec_ext in '' $ac_executable_extensions; do
8810  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8811    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8812    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8813    break 2
8814  fi
8815done
8816  done
8817IFS=$as_save_IFS
8818
8819  ;;
8820esac
8821fi
8822PRINTF=$ac_cv_path_PRINTF
8823if test -n "$PRINTF"; then
8824  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8825$as_echo "$PRINTF" >&6; }
8826else
8827  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8828$as_echo "no" >&6; }
8829fi
8830
8831
8832        if test "x$PRINTF" = x; then
8833          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8834        fi
8835      else
8836        # Otherwise we believe it is a complete path. Use it as it is.
8837        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
8838$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
8839        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
8840$as_echo_n "checking for PRINTF... " >&6; }
8841        if test ! -x "$tool_specified"; then
8842          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8843$as_echo "not found" >&6; }
8844          as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
8845        fi
8846        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8847$as_echo "$tool_specified" >&6; }
8848      fi
8849    fi
8850  fi
8851
8852
8853
8854  if test "x$PRINTF" = x; then
8855    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
8856  fi
8857
8858
8859
8860
8861
8862  # Publish this variable in the help.
8863
8864
8865  if test "x$RM" = x; then
8866    # The variable is not set by user, try to locate tool using the code snippet
8867    for ac_prog in rm
8868do
8869  # Extract the first word of "$ac_prog", so it can be a program name with args.
8870set dummy $ac_prog; ac_word=$2
8871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8872$as_echo_n "checking for $ac_word... " >&6; }
8873if ${ac_cv_path_RM+:} false; then :
8874  $as_echo_n "(cached) " >&6
8875else
8876  case $RM in
8877  [\\/]* | ?:[\\/]*)
8878  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8879  ;;
8880  *)
8881  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8882for as_dir in $PATH
8883do
8884  IFS=$as_save_IFS
8885  test -z "$as_dir" && as_dir=.
8886    for ac_exec_ext in '' $ac_executable_extensions; do
8887  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8888    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8889    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8890    break 2
8891  fi
8892done
8893  done
8894IFS=$as_save_IFS
8895
8896  ;;
8897esac
8898fi
8899RM=$ac_cv_path_RM
8900if test -n "$RM"; then
8901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8902$as_echo "$RM" >&6; }
8903else
8904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8905$as_echo "no" >&6; }
8906fi
8907
8908
8909  test -n "$RM" && break
8910done
8911
8912  else
8913    # The variable is set, but is it from the command line or the environment?
8914
8915    # Try to remove the string !RM! from our list.
8916    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
8917    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8918      # If it failed, the variable was not from the command line. Ignore it,
8919      # but warn the user (except for BASH, which is always set by the calling BASH).
8920      if test "xRM" != xBASH; then
8921        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
8922$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
8923      fi
8924      # Try to locate tool using the code snippet
8925      for ac_prog in rm
8926do
8927  # Extract the first word of "$ac_prog", so it can be a program name with args.
8928set dummy $ac_prog; ac_word=$2
8929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8930$as_echo_n "checking for $ac_word... " >&6; }
8931if ${ac_cv_path_RM+:} false; then :
8932  $as_echo_n "(cached) " >&6
8933else
8934  case $RM in
8935  [\\/]* | ?:[\\/]*)
8936  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8937  ;;
8938  *)
8939  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8940for as_dir in $PATH
8941do
8942  IFS=$as_save_IFS
8943  test -z "$as_dir" && as_dir=.
8944    for ac_exec_ext in '' $ac_executable_extensions; do
8945  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8946    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8947    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8948    break 2
8949  fi
8950done
8951  done
8952IFS=$as_save_IFS
8953
8954  ;;
8955esac
8956fi
8957RM=$ac_cv_path_RM
8958if test -n "$RM"; then
8959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8960$as_echo "$RM" >&6; }
8961else
8962  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8963$as_echo "no" >&6; }
8964fi
8965
8966
8967  test -n "$RM" && break
8968done
8969
8970    else
8971      # If it succeeded, then it was overridden by the user. We will use it
8972      # for the tool.
8973
8974      # First remove it from the list of overridden variables, so we can test
8975      # for unknown variables in the end.
8976      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8977
8978      # Check if the provided tool contains a complete path.
8979      tool_specified="$RM"
8980      tool_basename="${tool_specified##*/}"
8981      if test "x$tool_basename" = "x$tool_specified"; then
8982        # A command without a complete path is provided, search $PATH.
8983        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
8984$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
8985        # Extract the first word of "$tool_basename", so it can be a program name with args.
8986set dummy $tool_basename; ac_word=$2
8987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8988$as_echo_n "checking for $ac_word... " >&6; }
8989if ${ac_cv_path_RM+:} false; then :
8990  $as_echo_n "(cached) " >&6
8991else
8992  case $RM in
8993  [\\/]* | ?:[\\/]*)
8994  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8995  ;;
8996  *)
8997  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8998for as_dir in $PATH
8999do
9000  IFS=$as_save_IFS
9001  test -z "$as_dir" && as_dir=.
9002    for ac_exec_ext in '' $ac_executable_extensions; do
9003  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9004    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9005    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9006    break 2
9007  fi
9008done
9009  done
9010IFS=$as_save_IFS
9011
9012  ;;
9013esac
9014fi
9015RM=$ac_cv_path_RM
9016if test -n "$RM"; then
9017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9018$as_echo "$RM" >&6; }
9019else
9020  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9021$as_echo "no" >&6; }
9022fi
9023
9024
9025        if test "x$RM" = x; then
9026          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9027        fi
9028      else
9029        # Otherwise we believe it is a complete path. Use it as it is.
9030        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
9031$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
9032        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9033$as_echo_n "checking for RM... " >&6; }
9034        if test ! -x "$tool_specified"; then
9035          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9036$as_echo "not found" >&6; }
9037          as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
9038        fi
9039        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9040$as_echo "$tool_specified" >&6; }
9041      fi
9042    fi
9043  fi
9044
9045
9046
9047  if test "x$RM" = x; then
9048    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9049  fi
9050
9051
9052
9053
9054
9055  # Publish this variable in the help.
9056
9057
9058  if test "x$SH" = x; then
9059    # The variable is not set by user, try to locate tool using the code snippet
9060    for ac_prog in sh
9061do
9062  # Extract the first word of "$ac_prog", so it can be a program name with args.
9063set dummy $ac_prog; ac_word=$2
9064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9065$as_echo_n "checking for $ac_word... " >&6; }
9066if ${ac_cv_path_SH+:} false; then :
9067  $as_echo_n "(cached) " >&6
9068else
9069  case $SH in
9070  [\\/]* | ?:[\\/]*)
9071  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9072  ;;
9073  *)
9074  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9075for as_dir in $PATH
9076do
9077  IFS=$as_save_IFS
9078  test -z "$as_dir" && as_dir=.
9079    for ac_exec_ext in '' $ac_executable_extensions; do
9080  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9081    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9082    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9083    break 2
9084  fi
9085done
9086  done
9087IFS=$as_save_IFS
9088
9089  ;;
9090esac
9091fi
9092SH=$ac_cv_path_SH
9093if test -n "$SH"; then
9094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9095$as_echo "$SH" >&6; }
9096else
9097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9098$as_echo "no" >&6; }
9099fi
9100
9101
9102  test -n "$SH" && break
9103done
9104
9105  else
9106    # The variable is set, but is it from the command line or the environment?
9107
9108    # Try to remove the string !SH! from our list.
9109    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
9110    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9111      # If it failed, the variable was not from the command line. Ignore it,
9112      # but warn the user (except for BASH, which is always set by the calling BASH).
9113      if test "xSH" != xBASH; then
9114        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
9115$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
9116      fi
9117      # Try to locate tool using the code snippet
9118      for ac_prog in sh
9119do
9120  # Extract the first word of "$ac_prog", so it can be a program name with args.
9121set dummy $ac_prog; ac_word=$2
9122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9123$as_echo_n "checking for $ac_word... " >&6; }
9124if ${ac_cv_path_SH+:} false; then :
9125  $as_echo_n "(cached) " >&6
9126else
9127  case $SH in
9128  [\\/]* | ?:[\\/]*)
9129  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9130  ;;
9131  *)
9132  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9133for as_dir in $PATH
9134do
9135  IFS=$as_save_IFS
9136  test -z "$as_dir" && as_dir=.
9137    for ac_exec_ext in '' $ac_executable_extensions; do
9138  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9139    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9140    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9141    break 2
9142  fi
9143done
9144  done
9145IFS=$as_save_IFS
9146
9147  ;;
9148esac
9149fi
9150SH=$ac_cv_path_SH
9151if test -n "$SH"; then
9152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9153$as_echo "$SH" >&6; }
9154else
9155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9156$as_echo "no" >&6; }
9157fi
9158
9159
9160  test -n "$SH" && break
9161done
9162
9163    else
9164      # If it succeeded, then it was overridden by the user. We will use it
9165      # for the tool.
9166
9167      # First remove it from the list of overridden variables, so we can test
9168      # for unknown variables in the end.
9169      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9170
9171      # Check if the provided tool contains a complete path.
9172      tool_specified="$SH"
9173      tool_basename="${tool_specified##*/}"
9174      if test "x$tool_basename" = "x$tool_specified"; then
9175        # A command without a complete path is provided, search $PATH.
9176        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
9177$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
9178        # Extract the first word of "$tool_basename", so it can be a program name with args.
9179set dummy $tool_basename; ac_word=$2
9180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9181$as_echo_n "checking for $ac_word... " >&6; }
9182if ${ac_cv_path_SH+:} false; then :
9183  $as_echo_n "(cached) " >&6
9184else
9185  case $SH in
9186  [\\/]* | ?:[\\/]*)
9187  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9188  ;;
9189  *)
9190  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9191for as_dir in $PATH
9192do
9193  IFS=$as_save_IFS
9194  test -z "$as_dir" && as_dir=.
9195    for ac_exec_ext in '' $ac_executable_extensions; do
9196  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9197    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9198    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9199    break 2
9200  fi
9201done
9202  done
9203IFS=$as_save_IFS
9204
9205  ;;
9206esac
9207fi
9208SH=$ac_cv_path_SH
9209if test -n "$SH"; then
9210  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9211$as_echo "$SH" >&6; }
9212else
9213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9214$as_echo "no" >&6; }
9215fi
9216
9217
9218        if test "x$SH" = x; then
9219          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9220        fi
9221      else
9222        # Otherwise we believe it is a complete path. Use it as it is.
9223        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
9224$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
9225        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9226$as_echo_n "checking for SH... " >&6; }
9227        if test ! -x "$tool_specified"; then
9228          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9229$as_echo "not found" >&6; }
9230          as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
9231        fi
9232        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9233$as_echo "$tool_specified" >&6; }
9234      fi
9235    fi
9236  fi
9237
9238
9239
9240  if test "x$SH" = x; then
9241    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
9242  fi
9243
9244
9245
9246
9247
9248  # Publish this variable in the help.
9249
9250
9251  if test "x$SORT" = x; then
9252    # The variable is not set by user, try to locate tool using the code snippet
9253    for ac_prog in sort
9254do
9255  # Extract the first word of "$ac_prog", so it can be a program name with args.
9256set dummy $ac_prog; ac_word=$2
9257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9258$as_echo_n "checking for $ac_word... " >&6; }
9259if ${ac_cv_path_SORT+:} false; then :
9260  $as_echo_n "(cached) " >&6
9261else
9262  case $SORT in
9263  [\\/]* | ?:[\\/]*)
9264  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9265  ;;
9266  *)
9267  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9268for as_dir in $PATH
9269do
9270  IFS=$as_save_IFS
9271  test -z "$as_dir" && as_dir=.
9272    for ac_exec_ext in '' $ac_executable_extensions; do
9273  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9274    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9275    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9276    break 2
9277  fi
9278done
9279  done
9280IFS=$as_save_IFS
9281
9282  ;;
9283esac
9284fi
9285SORT=$ac_cv_path_SORT
9286if test -n "$SORT"; then
9287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9288$as_echo "$SORT" >&6; }
9289else
9290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9291$as_echo "no" >&6; }
9292fi
9293
9294
9295  test -n "$SORT" && break
9296done
9297
9298  else
9299    # The variable is set, but is it from the command line or the environment?
9300
9301    # Try to remove the string !SORT! from our list.
9302    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
9303    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9304      # If it failed, the variable was not from the command line. Ignore it,
9305      # but warn the user (except for BASH, which is always set by the calling BASH).
9306      if test "xSORT" != xBASH; then
9307        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
9308$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
9309      fi
9310      # Try to locate tool using the code snippet
9311      for ac_prog in sort
9312do
9313  # Extract the first word of "$ac_prog", so it can be a program name with args.
9314set dummy $ac_prog; ac_word=$2
9315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9316$as_echo_n "checking for $ac_word... " >&6; }
9317if ${ac_cv_path_SORT+:} false; then :
9318  $as_echo_n "(cached) " >&6
9319else
9320  case $SORT in
9321  [\\/]* | ?:[\\/]*)
9322  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9323  ;;
9324  *)
9325  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9326for as_dir in $PATH
9327do
9328  IFS=$as_save_IFS
9329  test -z "$as_dir" && as_dir=.
9330    for ac_exec_ext in '' $ac_executable_extensions; do
9331  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9332    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9333    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9334    break 2
9335  fi
9336done
9337  done
9338IFS=$as_save_IFS
9339
9340  ;;
9341esac
9342fi
9343SORT=$ac_cv_path_SORT
9344if test -n "$SORT"; then
9345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9346$as_echo "$SORT" >&6; }
9347else
9348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9349$as_echo "no" >&6; }
9350fi
9351
9352
9353  test -n "$SORT" && break
9354done
9355
9356    else
9357      # If it succeeded, then it was overridden by the user. We will use it
9358      # for the tool.
9359
9360      # First remove it from the list of overridden variables, so we can test
9361      # for unknown variables in the end.
9362      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9363
9364      # Check if the provided tool contains a complete path.
9365      tool_specified="$SORT"
9366      tool_basename="${tool_specified##*/}"
9367      if test "x$tool_basename" = "x$tool_specified"; then
9368        # A command without a complete path is provided, search $PATH.
9369        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
9370$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
9371        # Extract the first word of "$tool_basename", so it can be a program name with args.
9372set dummy $tool_basename; ac_word=$2
9373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9374$as_echo_n "checking for $ac_word... " >&6; }
9375if ${ac_cv_path_SORT+:} false; then :
9376  $as_echo_n "(cached) " >&6
9377else
9378  case $SORT in
9379  [\\/]* | ?:[\\/]*)
9380  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9381  ;;
9382  *)
9383  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9384for as_dir in $PATH
9385do
9386  IFS=$as_save_IFS
9387  test -z "$as_dir" && as_dir=.
9388    for ac_exec_ext in '' $ac_executable_extensions; do
9389  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9390    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9391    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9392    break 2
9393  fi
9394done
9395  done
9396IFS=$as_save_IFS
9397
9398  ;;
9399esac
9400fi
9401SORT=$ac_cv_path_SORT
9402if test -n "$SORT"; then
9403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9404$as_echo "$SORT" >&6; }
9405else
9406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9407$as_echo "no" >&6; }
9408fi
9409
9410
9411        if test "x$SORT" = x; then
9412          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9413        fi
9414      else
9415        # Otherwise we believe it is a complete path. Use it as it is.
9416        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
9417$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
9418        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
9419$as_echo_n "checking for SORT... " >&6; }
9420        if test ! -x "$tool_specified"; then
9421          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9422$as_echo "not found" >&6; }
9423          as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
9424        fi
9425        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9426$as_echo "$tool_specified" >&6; }
9427      fi
9428    fi
9429  fi
9430
9431
9432
9433  if test "x$SORT" = x; then
9434    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
9435  fi
9436
9437
9438
9439
9440
9441  # Publish this variable in the help.
9442
9443
9444  if test "x$TAIL" = x; then
9445    # The variable is not set by user, try to locate tool using the code snippet
9446    for ac_prog in tail
9447do
9448  # Extract the first word of "$ac_prog", so it can be a program name with args.
9449set dummy $ac_prog; ac_word=$2
9450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9451$as_echo_n "checking for $ac_word... " >&6; }
9452if ${ac_cv_path_TAIL+:} false; then :
9453  $as_echo_n "(cached) " >&6
9454else
9455  case $TAIL in
9456  [\\/]* | ?:[\\/]*)
9457  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9458  ;;
9459  *)
9460  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9461for as_dir in $PATH
9462do
9463  IFS=$as_save_IFS
9464  test -z "$as_dir" && as_dir=.
9465    for ac_exec_ext in '' $ac_executable_extensions; do
9466  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9467    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9468    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9469    break 2
9470  fi
9471done
9472  done
9473IFS=$as_save_IFS
9474
9475  ;;
9476esac
9477fi
9478TAIL=$ac_cv_path_TAIL
9479if test -n "$TAIL"; then
9480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9481$as_echo "$TAIL" >&6; }
9482else
9483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9484$as_echo "no" >&6; }
9485fi
9486
9487
9488  test -n "$TAIL" && break
9489done
9490
9491  else
9492    # The variable is set, but is it from the command line or the environment?
9493
9494    # Try to remove the string !TAIL! from our list.
9495    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
9496    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9497      # If it failed, the variable was not from the command line. Ignore it,
9498      # but warn the user (except for BASH, which is always set by the calling BASH).
9499      if test "xTAIL" != xBASH; then
9500        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
9501$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
9502      fi
9503      # Try to locate tool using the code snippet
9504      for ac_prog in tail
9505do
9506  # Extract the first word of "$ac_prog", so it can be a program name with args.
9507set dummy $ac_prog; ac_word=$2
9508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9509$as_echo_n "checking for $ac_word... " >&6; }
9510if ${ac_cv_path_TAIL+:} false; then :
9511  $as_echo_n "(cached) " >&6
9512else
9513  case $TAIL in
9514  [\\/]* | ?:[\\/]*)
9515  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9516  ;;
9517  *)
9518  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9519for as_dir in $PATH
9520do
9521  IFS=$as_save_IFS
9522  test -z "$as_dir" && as_dir=.
9523    for ac_exec_ext in '' $ac_executable_extensions; do
9524  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9525    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9526    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9527    break 2
9528  fi
9529done
9530  done
9531IFS=$as_save_IFS
9532
9533  ;;
9534esac
9535fi
9536TAIL=$ac_cv_path_TAIL
9537if test -n "$TAIL"; then
9538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9539$as_echo "$TAIL" >&6; }
9540else
9541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9542$as_echo "no" >&6; }
9543fi
9544
9545
9546  test -n "$TAIL" && break
9547done
9548
9549    else
9550      # If it succeeded, then it was overridden by the user. We will use it
9551      # for the tool.
9552
9553      # First remove it from the list of overridden variables, so we can test
9554      # for unknown variables in the end.
9555      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9556
9557      # Check if the provided tool contains a complete path.
9558      tool_specified="$TAIL"
9559      tool_basename="${tool_specified##*/}"
9560      if test "x$tool_basename" = "x$tool_specified"; then
9561        # A command without a complete path is provided, search $PATH.
9562        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
9563$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
9564        # Extract the first word of "$tool_basename", so it can be a program name with args.
9565set dummy $tool_basename; ac_word=$2
9566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9567$as_echo_n "checking for $ac_word... " >&6; }
9568if ${ac_cv_path_TAIL+:} false; then :
9569  $as_echo_n "(cached) " >&6
9570else
9571  case $TAIL in
9572  [\\/]* | ?:[\\/]*)
9573  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9574  ;;
9575  *)
9576  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9577for as_dir in $PATH
9578do
9579  IFS=$as_save_IFS
9580  test -z "$as_dir" && as_dir=.
9581    for ac_exec_ext in '' $ac_executable_extensions; do
9582  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9583    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9584    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9585    break 2
9586  fi
9587done
9588  done
9589IFS=$as_save_IFS
9590
9591  ;;
9592esac
9593fi
9594TAIL=$ac_cv_path_TAIL
9595if test -n "$TAIL"; then
9596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9597$as_echo "$TAIL" >&6; }
9598else
9599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9600$as_echo "no" >&6; }
9601fi
9602
9603
9604        if test "x$TAIL" = x; then
9605          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9606        fi
9607      else
9608        # Otherwise we believe it is a complete path. Use it as it is.
9609        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
9610$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
9611        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
9612$as_echo_n "checking for TAIL... " >&6; }
9613        if test ! -x "$tool_specified"; then
9614          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9615$as_echo "not found" >&6; }
9616          as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
9617        fi
9618        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9619$as_echo "$tool_specified" >&6; }
9620      fi
9621    fi
9622  fi
9623
9624
9625
9626  if test "x$TAIL" = x; then
9627    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
9628  fi
9629
9630
9631
9632
9633
9634  # Publish this variable in the help.
9635
9636
9637  if test "x$TAR" = x; then
9638    # The variable is not set by user, try to locate tool using the code snippet
9639    for ac_prog in tar
9640do
9641  # Extract the first word of "$ac_prog", so it can be a program name with args.
9642set dummy $ac_prog; ac_word=$2
9643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9644$as_echo_n "checking for $ac_word... " >&6; }
9645if ${ac_cv_path_TAR+:} false; then :
9646  $as_echo_n "(cached) " >&6
9647else
9648  case $TAR in
9649  [\\/]* | ?:[\\/]*)
9650  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9651  ;;
9652  *)
9653  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9654for as_dir in $PATH
9655do
9656  IFS=$as_save_IFS
9657  test -z "$as_dir" && as_dir=.
9658    for ac_exec_ext in '' $ac_executable_extensions; do
9659  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9660    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9661    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9662    break 2
9663  fi
9664done
9665  done
9666IFS=$as_save_IFS
9667
9668  ;;
9669esac
9670fi
9671TAR=$ac_cv_path_TAR
9672if test -n "$TAR"; then
9673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9674$as_echo "$TAR" >&6; }
9675else
9676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9677$as_echo "no" >&6; }
9678fi
9679
9680
9681  test -n "$TAR" && break
9682done
9683
9684  else
9685    # The variable is set, but is it from the command line or the environment?
9686
9687    # Try to remove the string !TAR! from our list.
9688    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
9689    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9690      # If it failed, the variable was not from the command line. Ignore it,
9691      # but warn the user (except for BASH, which is always set by the calling BASH).
9692      if test "xTAR" != xBASH; then
9693        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
9694$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
9695      fi
9696      # Try to locate tool using the code snippet
9697      for ac_prog in tar
9698do
9699  # Extract the first word of "$ac_prog", so it can be a program name with args.
9700set dummy $ac_prog; ac_word=$2
9701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9702$as_echo_n "checking for $ac_word... " >&6; }
9703if ${ac_cv_path_TAR+:} false; then :
9704  $as_echo_n "(cached) " >&6
9705else
9706  case $TAR in
9707  [\\/]* | ?:[\\/]*)
9708  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9709  ;;
9710  *)
9711  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9712for as_dir in $PATH
9713do
9714  IFS=$as_save_IFS
9715  test -z "$as_dir" && as_dir=.
9716    for ac_exec_ext in '' $ac_executable_extensions; do
9717  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9718    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9719    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9720    break 2
9721  fi
9722done
9723  done
9724IFS=$as_save_IFS
9725
9726  ;;
9727esac
9728fi
9729TAR=$ac_cv_path_TAR
9730if test -n "$TAR"; then
9731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9732$as_echo "$TAR" >&6; }
9733else
9734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9735$as_echo "no" >&6; }
9736fi
9737
9738
9739  test -n "$TAR" && break
9740done
9741
9742    else
9743      # If it succeeded, then it was overridden by the user. We will use it
9744      # for the tool.
9745
9746      # First remove it from the list of overridden variables, so we can test
9747      # for unknown variables in the end.
9748      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9749
9750      # Check if the provided tool contains a complete path.
9751      tool_specified="$TAR"
9752      tool_basename="${tool_specified##*/}"
9753      if test "x$tool_basename" = "x$tool_specified"; then
9754        # A command without a complete path is provided, search $PATH.
9755        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
9756$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
9757        # Extract the first word of "$tool_basename", so it can be a program name with args.
9758set dummy $tool_basename; ac_word=$2
9759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9760$as_echo_n "checking for $ac_word... " >&6; }
9761if ${ac_cv_path_TAR+:} false; then :
9762  $as_echo_n "(cached) " >&6
9763else
9764  case $TAR in
9765  [\\/]* | ?:[\\/]*)
9766  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9767  ;;
9768  *)
9769  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9770for as_dir in $PATH
9771do
9772  IFS=$as_save_IFS
9773  test -z "$as_dir" && as_dir=.
9774    for ac_exec_ext in '' $ac_executable_extensions; do
9775  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9776    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9777    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9778    break 2
9779  fi
9780done
9781  done
9782IFS=$as_save_IFS
9783
9784  ;;
9785esac
9786fi
9787TAR=$ac_cv_path_TAR
9788if test -n "$TAR"; then
9789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9790$as_echo "$TAR" >&6; }
9791else
9792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9793$as_echo "no" >&6; }
9794fi
9795
9796
9797        if test "x$TAR" = x; then
9798          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9799        fi
9800      else
9801        # Otherwise we believe it is a complete path. Use it as it is.
9802        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
9803$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
9804        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9805$as_echo_n "checking for TAR... " >&6; }
9806        if test ! -x "$tool_specified"; then
9807          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9808$as_echo "not found" >&6; }
9809          as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
9810        fi
9811        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9812$as_echo "$tool_specified" >&6; }
9813      fi
9814    fi
9815  fi
9816
9817
9818
9819  if test "x$TAR" = x; then
9820    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
9821  fi
9822
9823
9824
9825
9826
9827  # Publish this variable in the help.
9828
9829
9830  if test "x$TEE" = x; then
9831    # The variable is not set by user, try to locate tool using the code snippet
9832    for ac_prog in tee
9833do
9834  # Extract the first word of "$ac_prog", so it can be a program name with args.
9835set dummy $ac_prog; ac_word=$2
9836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9837$as_echo_n "checking for $ac_word... " >&6; }
9838if ${ac_cv_path_TEE+:} false; then :
9839  $as_echo_n "(cached) " >&6
9840else
9841  case $TEE in
9842  [\\/]* | ?:[\\/]*)
9843  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9844  ;;
9845  *)
9846  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9847for as_dir in $PATH
9848do
9849  IFS=$as_save_IFS
9850  test -z "$as_dir" && as_dir=.
9851    for ac_exec_ext in '' $ac_executable_extensions; do
9852  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9853    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9854    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9855    break 2
9856  fi
9857done
9858  done
9859IFS=$as_save_IFS
9860
9861  ;;
9862esac
9863fi
9864TEE=$ac_cv_path_TEE
9865if test -n "$TEE"; then
9866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9867$as_echo "$TEE" >&6; }
9868else
9869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9870$as_echo "no" >&6; }
9871fi
9872
9873
9874  test -n "$TEE" && break
9875done
9876
9877  else
9878    # The variable is set, but is it from the command line or the environment?
9879
9880    # Try to remove the string !TEE! from our list.
9881    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
9882    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9883      # If it failed, the variable was not from the command line. Ignore it,
9884      # but warn the user (except for BASH, which is always set by the calling BASH).
9885      if test "xTEE" != xBASH; then
9886        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
9887$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
9888      fi
9889      # Try to locate tool using the code snippet
9890      for ac_prog in tee
9891do
9892  # Extract the first word of "$ac_prog", so it can be a program name with args.
9893set dummy $ac_prog; ac_word=$2
9894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9895$as_echo_n "checking for $ac_word... " >&6; }
9896if ${ac_cv_path_TEE+:} false; then :
9897  $as_echo_n "(cached) " >&6
9898else
9899  case $TEE in
9900  [\\/]* | ?:[\\/]*)
9901  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9902  ;;
9903  *)
9904  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9905for as_dir in $PATH
9906do
9907  IFS=$as_save_IFS
9908  test -z "$as_dir" && as_dir=.
9909    for ac_exec_ext in '' $ac_executable_extensions; do
9910  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9911    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9912    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9913    break 2
9914  fi
9915done
9916  done
9917IFS=$as_save_IFS
9918
9919  ;;
9920esac
9921fi
9922TEE=$ac_cv_path_TEE
9923if test -n "$TEE"; then
9924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9925$as_echo "$TEE" >&6; }
9926else
9927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9928$as_echo "no" >&6; }
9929fi
9930
9931
9932  test -n "$TEE" && break
9933done
9934
9935    else
9936      # If it succeeded, then it was overridden by the user. We will use it
9937      # for the tool.
9938
9939      # First remove it from the list of overridden variables, so we can test
9940      # for unknown variables in the end.
9941      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9942
9943      # Check if the provided tool contains a complete path.
9944      tool_specified="$TEE"
9945      tool_basename="${tool_specified##*/}"
9946      if test "x$tool_basename" = "x$tool_specified"; then
9947        # A command without a complete path is provided, search $PATH.
9948        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
9949$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
9950        # Extract the first word of "$tool_basename", so it can be a program name with args.
9951set dummy $tool_basename; ac_word=$2
9952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9953$as_echo_n "checking for $ac_word... " >&6; }
9954if ${ac_cv_path_TEE+:} false; then :
9955  $as_echo_n "(cached) " >&6
9956else
9957  case $TEE in
9958  [\\/]* | ?:[\\/]*)
9959  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9960  ;;
9961  *)
9962  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9963for as_dir in $PATH
9964do
9965  IFS=$as_save_IFS
9966  test -z "$as_dir" && as_dir=.
9967    for ac_exec_ext in '' $ac_executable_extensions; do
9968  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9969    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9970    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9971    break 2
9972  fi
9973done
9974  done
9975IFS=$as_save_IFS
9976
9977  ;;
9978esac
9979fi
9980TEE=$ac_cv_path_TEE
9981if test -n "$TEE"; then
9982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9983$as_echo "$TEE" >&6; }
9984else
9985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9986$as_echo "no" >&6; }
9987fi
9988
9989
9990        if test "x$TEE" = x; then
9991          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9992        fi
9993      else
9994        # Otherwise we believe it is a complete path. Use it as it is.
9995        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
9996$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
9997        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
9998$as_echo_n "checking for TEE... " >&6; }
9999        if test ! -x "$tool_specified"; then
10000          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10001$as_echo "not found" >&6; }
10002          as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
10003        fi
10004        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10005$as_echo "$tool_specified" >&6; }
10006      fi
10007    fi
10008  fi
10009
10010
10011
10012  if test "x$TEE" = x; then
10013    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
10014  fi
10015
10016
10017
10018
10019
10020  # Publish this variable in the help.
10021
10022
10023  if test "x$TOUCH" = x; then
10024    # The variable is not set by user, try to locate tool using the code snippet
10025    for ac_prog in touch
10026do
10027  # Extract the first word of "$ac_prog", so it can be a program name with args.
10028set dummy $ac_prog; ac_word=$2
10029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10030$as_echo_n "checking for $ac_word... " >&6; }
10031if ${ac_cv_path_TOUCH+:} false; then :
10032  $as_echo_n "(cached) " >&6
10033else
10034  case $TOUCH in
10035  [\\/]* | ?:[\\/]*)
10036  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10037  ;;
10038  *)
10039  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10040for as_dir in $PATH
10041do
10042  IFS=$as_save_IFS
10043  test -z "$as_dir" && as_dir=.
10044    for ac_exec_ext in '' $ac_executable_extensions; do
10045  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10046    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10047    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10048    break 2
10049  fi
10050done
10051  done
10052IFS=$as_save_IFS
10053
10054  ;;
10055esac
10056fi
10057TOUCH=$ac_cv_path_TOUCH
10058if test -n "$TOUCH"; then
10059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10060$as_echo "$TOUCH" >&6; }
10061else
10062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10063$as_echo "no" >&6; }
10064fi
10065
10066
10067  test -n "$TOUCH" && break
10068done
10069
10070  else
10071    # The variable is set, but is it from the command line or the environment?
10072
10073    # Try to remove the string !TOUCH! from our list.
10074    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
10075    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10076      # If it failed, the variable was not from the command line. Ignore it,
10077      # but warn the user (except for BASH, which is always set by the calling BASH).
10078      if test "xTOUCH" != xBASH; then
10079        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
10080$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
10081      fi
10082      # Try to locate tool using the code snippet
10083      for ac_prog in touch
10084do
10085  # Extract the first word of "$ac_prog", so it can be a program name with args.
10086set dummy $ac_prog; ac_word=$2
10087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10088$as_echo_n "checking for $ac_word... " >&6; }
10089if ${ac_cv_path_TOUCH+:} false; then :
10090  $as_echo_n "(cached) " >&6
10091else
10092  case $TOUCH in
10093  [\\/]* | ?:[\\/]*)
10094  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10095  ;;
10096  *)
10097  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10098for as_dir in $PATH
10099do
10100  IFS=$as_save_IFS
10101  test -z "$as_dir" && as_dir=.
10102    for ac_exec_ext in '' $ac_executable_extensions; do
10103  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10104    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10105    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10106    break 2
10107  fi
10108done
10109  done
10110IFS=$as_save_IFS
10111
10112  ;;
10113esac
10114fi
10115TOUCH=$ac_cv_path_TOUCH
10116if test -n "$TOUCH"; then
10117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10118$as_echo "$TOUCH" >&6; }
10119else
10120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10121$as_echo "no" >&6; }
10122fi
10123
10124
10125  test -n "$TOUCH" && break
10126done
10127
10128    else
10129      # If it succeeded, then it was overridden by the user. We will use it
10130      # for the tool.
10131
10132      # First remove it from the list of overridden variables, so we can test
10133      # for unknown variables in the end.
10134      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10135
10136      # Check if the provided tool contains a complete path.
10137      tool_specified="$TOUCH"
10138      tool_basename="${tool_specified##*/}"
10139      if test "x$tool_basename" = "x$tool_specified"; then
10140        # A command without a complete path is provided, search $PATH.
10141        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
10142$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
10143        # Extract the first word of "$tool_basename", so it can be a program name with args.
10144set dummy $tool_basename; ac_word=$2
10145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10146$as_echo_n "checking for $ac_word... " >&6; }
10147if ${ac_cv_path_TOUCH+:} false; then :
10148  $as_echo_n "(cached) " >&6
10149else
10150  case $TOUCH in
10151  [\\/]* | ?:[\\/]*)
10152  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10153  ;;
10154  *)
10155  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10156for as_dir in $PATH
10157do
10158  IFS=$as_save_IFS
10159  test -z "$as_dir" && as_dir=.
10160    for ac_exec_ext in '' $ac_executable_extensions; do
10161  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10162    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10163    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10164    break 2
10165  fi
10166done
10167  done
10168IFS=$as_save_IFS
10169
10170  ;;
10171esac
10172fi
10173TOUCH=$ac_cv_path_TOUCH
10174if test -n "$TOUCH"; then
10175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10176$as_echo "$TOUCH" >&6; }
10177else
10178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10179$as_echo "no" >&6; }
10180fi
10181
10182
10183        if test "x$TOUCH" = x; then
10184          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10185        fi
10186      else
10187        # Otherwise we believe it is a complete path. Use it as it is.
10188        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
10189$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
10190        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10191$as_echo_n "checking for TOUCH... " >&6; }
10192        if test ! -x "$tool_specified"; then
10193          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10194$as_echo "not found" >&6; }
10195          as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
10196        fi
10197        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10198$as_echo "$tool_specified" >&6; }
10199      fi
10200    fi
10201  fi
10202
10203
10204
10205  if test "x$TOUCH" = x; then
10206    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
10207  fi
10208
10209
10210
10211
10212
10213  # Publish this variable in the help.
10214
10215
10216  if test "x$TR" = x; then
10217    # The variable is not set by user, try to locate tool using the code snippet
10218    for ac_prog in tr
10219do
10220  # Extract the first word of "$ac_prog", so it can be a program name with args.
10221set dummy $ac_prog; ac_word=$2
10222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10223$as_echo_n "checking for $ac_word... " >&6; }
10224if ${ac_cv_path_TR+:} false; then :
10225  $as_echo_n "(cached) " >&6
10226else
10227  case $TR in
10228  [\\/]* | ?:[\\/]*)
10229  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10230  ;;
10231  *)
10232  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10233for as_dir in $PATH
10234do
10235  IFS=$as_save_IFS
10236  test -z "$as_dir" && as_dir=.
10237    for ac_exec_ext in '' $ac_executable_extensions; do
10238  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10239    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10240    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10241    break 2
10242  fi
10243done
10244  done
10245IFS=$as_save_IFS
10246
10247  ;;
10248esac
10249fi
10250TR=$ac_cv_path_TR
10251if test -n "$TR"; then
10252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10253$as_echo "$TR" >&6; }
10254else
10255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10256$as_echo "no" >&6; }
10257fi
10258
10259
10260  test -n "$TR" && break
10261done
10262
10263  else
10264    # The variable is set, but is it from the command line or the environment?
10265
10266    # Try to remove the string !TR! from our list.
10267    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
10268    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10269      # If it failed, the variable was not from the command line. Ignore it,
10270      # but warn the user (except for BASH, which is always set by the calling BASH).
10271      if test "xTR" != xBASH; then
10272        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
10273$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
10274      fi
10275      # Try to locate tool using the code snippet
10276      for ac_prog in tr
10277do
10278  # Extract the first word of "$ac_prog", so it can be a program name with args.
10279set dummy $ac_prog; ac_word=$2
10280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10281$as_echo_n "checking for $ac_word... " >&6; }
10282if ${ac_cv_path_TR+:} false; then :
10283  $as_echo_n "(cached) " >&6
10284else
10285  case $TR in
10286  [\\/]* | ?:[\\/]*)
10287  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10288  ;;
10289  *)
10290  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10291for as_dir in $PATH
10292do
10293  IFS=$as_save_IFS
10294  test -z "$as_dir" && as_dir=.
10295    for ac_exec_ext in '' $ac_executable_extensions; do
10296  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10297    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10298    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10299    break 2
10300  fi
10301done
10302  done
10303IFS=$as_save_IFS
10304
10305  ;;
10306esac
10307fi
10308TR=$ac_cv_path_TR
10309if test -n "$TR"; then
10310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10311$as_echo "$TR" >&6; }
10312else
10313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10314$as_echo "no" >&6; }
10315fi
10316
10317
10318  test -n "$TR" && break
10319done
10320
10321    else
10322      # If it succeeded, then it was overridden by the user. We will use it
10323      # for the tool.
10324
10325      # First remove it from the list of overridden variables, so we can test
10326      # for unknown variables in the end.
10327      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10328
10329      # Check if the provided tool contains a complete path.
10330      tool_specified="$TR"
10331      tool_basename="${tool_specified##*/}"
10332      if test "x$tool_basename" = "x$tool_specified"; then
10333        # A command without a complete path is provided, search $PATH.
10334        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
10335$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
10336        # Extract the first word of "$tool_basename", so it can be a program name with args.
10337set dummy $tool_basename; ac_word=$2
10338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10339$as_echo_n "checking for $ac_word... " >&6; }
10340if ${ac_cv_path_TR+:} false; then :
10341  $as_echo_n "(cached) " >&6
10342else
10343  case $TR in
10344  [\\/]* | ?:[\\/]*)
10345  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10346  ;;
10347  *)
10348  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10349for as_dir in $PATH
10350do
10351  IFS=$as_save_IFS
10352  test -z "$as_dir" && as_dir=.
10353    for ac_exec_ext in '' $ac_executable_extensions; do
10354  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10355    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10356    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10357    break 2
10358  fi
10359done
10360  done
10361IFS=$as_save_IFS
10362
10363  ;;
10364esac
10365fi
10366TR=$ac_cv_path_TR
10367if test -n "$TR"; then
10368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10369$as_echo "$TR" >&6; }
10370else
10371  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10372$as_echo "no" >&6; }
10373fi
10374
10375
10376        if test "x$TR" = x; then
10377          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10378        fi
10379      else
10380        # Otherwise we believe it is a complete path. Use it as it is.
10381        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
10382$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
10383        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
10384$as_echo_n "checking for TR... " >&6; }
10385        if test ! -x "$tool_specified"; then
10386          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10387$as_echo "not found" >&6; }
10388          as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
10389        fi
10390        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10391$as_echo "$tool_specified" >&6; }
10392      fi
10393    fi
10394  fi
10395
10396
10397
10398  if test "x$TR" = x; then
10399    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
10400  fi
10401
10402
10403
10404
10405
10406  # Publish this variable in the help.
10407
10408
10409  if test "x$UNAME" = x; then
10410    # The variable is not set by user, try to locate tool using the code snippet
10411    for ac_prog in uname
10412do
10413  # Extract the first word of "$ac_prog", so it can be a program name with args.
10414set dummy $ac_prog; ac_word=$2
10415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10416$as_echo_n "checking for $ac_word... " >&6; }
10417if ${ac_cv_path_UNAME+:} false; then :
10418  $as_echo_n "(cached) " >&6
10419else
10420  case $UNAME in
10421  [\\/]* | ?:[\\/]*)
10422  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10423  ;;
10424  *)
10425  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10426for as_dir in $PATH
10427do
10428  IFS=$as_save_IFS
10429  test -z "$as_dir" && as_dir=.
10430    for ac_exec_ext in '' $ac_executable_extensions; do
10431  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10432    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10433    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10434    break 2
10435  fi
10436done
10437  done
10438IFS=$as_save_IFS
10439
10440  ;;
10441esac
10442fi
10443UNAME=$ac_cv_path_UNAME
10444if test -n "$UNAME"; then
10445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10446$as_echo "$UNAME" >&6; }
10447else
10448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10449$as_echo "no" >&6; }
10450fi
10451
10452
10453  test -n "$UNAME" && break
10454done
10455
10456  else
10457    # The variable is set, but is it from the command line or the environment?
10458
10459    # Try to remove the string !UNAME! from our list.
10460    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
10461    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10462      # If it failed, the variable was not from the command line. Ignore it,
10463      # but warn the user (except for BASH, which is always set by the calling BASH).
10464      if test "xUNAME" != xBASH; then
10465        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
10466$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
10467      fi
10468      # Try to locate tool using the code snippet
10469      for ac_prog in uname
10470do
10471  # Extract the first word of "$ac_prog", so it can be a program name with args.
10472set dummy $ac_prog; ac_word=$2
10473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10474$as_echo_n "checking for $ac_word... " >&6; }
10475if ${ac_cv_path_UNAME+:} false; then :
10476  $as_echo_n "(cached) " >&6
10477else
10478  case $UNAME in
10479  [\\/]* | ?:[\\/]*)
10480  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10481  ;;
10482  *)
10483  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10484for as_dir in $PATH
10485do
10486  IFS=$as_save_IFS
10487  test -z "$as_dir" && as_dir=.
10488    for ac_exec_ext in '' $ac_executable_extensions; do
10489  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10490    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10491    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10492    break 2
10493  fi
10494done
10495  done
10496IFS=$as_save_IFS
10497
10498  ;;
10499esac
10500fi
10501UNAME=$ac_cv_path_UNAME
10502if test -n "$UNAME"; then
10503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10504$as_echo "$UNAME" >&6; }
10505else
10506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10507$as_echo "no" >&6; }
10508fi
10509
10510
10511  test -n "$UNAME" && break
10512done
10513
10514    else
10515      # If it succeeded, then it was overridden by the user. We will use it
10516      # for the tool.
10517
10518      # First remove it from the list of overridden variables, so we can test
10519      # for unknown variables in the end.
10520      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10521
10522      # Check if the provided tool contains a complete path.
10523      tool_specified="$UNAME"
10524      tool_basename="${tool_specified##*/}"
10525      if test "x$tool_basename" = "x$tool_specified"; then
10526        # A command without a complete path is provided, search $PATH.
10527        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
10528$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
10529        # Extract the first word of "$tool_basename", so it can be a program name with args.
10530set dummy $tool_basename; ac_word=$2
10531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10532$as_echo_n "checking for $ac_word... " >&6; }
10533if ${ac_cv_path_UNAME+:} false; then :
10534  $as_echo_n "(cached) " >&6
10535else
10536  case $UNAME in
10537  [\\/]* | ?:[\\/]*)
10538  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10539  ;;
10540  *)
10541  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10542for as_dir in $PATH
10543do
10544  IFS=$as_save_IFS
10545  test -z "$as_dir" && as_dir=.
10546    for ac_exec_ext in '' $ac_executable_extensions; do
10547  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10548    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10549    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10550    break 2
10551  fi
10552done
10553  done
10554IFS=$as_save_IFS
10555
10556  ;;
10557esac
10558fi
10559UNAME=$ac_cv_path_UNAME
10560if test -n "$UNAME"; then
10561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10562$as_echo "$UNAME" >&6; }
10563else
10564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10565$as_echo "no" >&6; }
10566fi
10567
10568
10569        if test "x$UNAME" = x; then
10570          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10571        fi
10572      else
10573        # Otherwise we believe it is a complete path. Use it as it is.
10574        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
10575$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
10576        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
10577$as_echo_n "checking for UNAME... " >&6; }
10578        if test ! -x "$tool_specified"; then
10579          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10580$as_echo "not found" >&6; }
10581          as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
10582        fi
10583        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10584$as_echo "$tool_specified" >&6; }
10585      fi
10586    fi
10587  fi
10588
10589
10590
10591  if test "x$UNAME" = x; then
10592    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
10593  fi
10594
10595
10596
10597
10598
10599  # Publish this variable in the help.
10600
10601
10602  if test "x$UNIQ" = x; then
10603    # The variable is not set by user, try to locate tool using the code snippet
10604    for ac_prog in uniq
10605do
10606  # Extract the first word of "$ac_prog", so it can be a program name with args.
10607set dummy $ac_prog; ac_word=$2
10608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10609$as_echo_n "checking for $ac_word... " >&6; }
10610if ${ac_cv_path_UNIQ+:} false; then :
10611  $as_echo_n "(cached) " >&6
10612else
10613  case $UNIQ in
10614  [\\/]* | ?:[\\/]*)
10615  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10616  ;;
10617  *)
10618  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10619for as_dir in $PATH
10620do
10621  IFS=$as_save_IFS
10622  test -z "$as_dir" && as_dir=.
10623    for ac_exec_ext in '' $ac_executable_extensions; do
10624  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10625    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10626    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10627    break 2
10628  fi
10629done
10630  done
10631IFS=$as_save_IFS
10632
10633  ;;
10634esac
10635fi
10636UNIQ=$ac_cv_path_UNIQ
10637if test -n "$UNIQ"; then
10638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10639$as_echo "$UNIQ" >&6; }
10640else
10641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10642$as_echo "no" >&6; }
10643fi
10644
10645
10646  test -n "$UNIQ" && break
10647done
10648
10649  else
10650    # The variable is set, but is it from the command line or the environment?
10651
10652    # Try to remove the string !UNIQ! from our list.
10653    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
10654    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10655      # If it failed, the variable was not from the command line. Ignore it,
10656      # but warn the user (except for BASH, which is always set by the calling BASH).
10657      if test "xUNIQ" != xBASH; then
10658        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
10659$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
10660      fi
10661      # Try to locate tool using the code snippet
10662      for ac_prog in uniq
10663do
10664  # Extract the first word of "$ac_prog", so it can be a program name with args.
10665set dummy $ac_prog; ac_word=$2
10666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10667$as_echo_n "checking for $ac_word... " >&6; }
10668if ${ac_cv_path_UNIQ+:} false; then :
10669  $as_echo_n "(cached) " >&6
10670else
10671  case $UNIQ in
10672  [\\/]* | ?:[\\/]*)
10673  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10674  ;;
10675  *)
10676  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10677for as_dir in $PATH
10678do
10679  IFS=$as_save_IFS
10680  test -z "$as_dir" && as_dir=.
10681    for ac_exec_ext in '' $ac_executable_extensions; do
10682  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10683    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10684    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10685    break 2
10686  fi
10687done
10688  done
10689IFS=$as_save_IFS
10690
10691  ;;
10692esac
10693fi
10694UNIQ=$ac_cv_path_UNIQ
10695if test -n "$UNIQ"; then
10696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10697$as_echo "$UNIQ" >&6; }
10698else
10699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10700$as_echo "no" >&6; }
10701fi
10702
10703
10704  test -n "$UNIQ" && break
10705done
10706
10707    else
10708      # If it succeeded, then it was overridden by the user. We will use it
10709      # for the tool.
10710
10711      # First remove it from the list of overridden variables, so we can test
10712      # for unknown variables in the end.
10713      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10714
10715      # Check if the provided tool contains a complete path.
10716      tool_specified="$UNIQ"
10717      tool_basename="${tool_specified##*/}"
10718      if test "x$tool_basename" = "x$tool_specified"; then
10719        # A command without a complete path is provided, search $PATH.
10720        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
10721$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
10722        # Extract the first word of "$tool_basename", so it can be a program name with args.
10723set dummy $tool_basename; ac_word=$2
10724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10725$as_echo_n "checking for $ac_word... " >&6; }
10726if ${ac_cv_path_UNIQ+:} false; then :
10727  $as_echo_n "(cached) " >&6
10728else
10729  case $UNIQ in
10730  [\\/]* | ?:[\\/]*)
10731  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10732  ;;
10733  *)
10734  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10735for as_dir in $PATH
10736do
10737  IFS=$as_save_IFS
10738  test -z "$as_dir" && as_dir=.
10739    for ac_exec_ext in '' $ac_executable_extensions; do
10740  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10741    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10742    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10743    break 2
10744  fi
10745done
10746  done
10747IFS=$as_save_IFS
10748
10749  ;;
10750esac
10751fi
10752UNIQ=$ac_cv_path_UNIQ
10753if test -n "$UNIQ"; then
10754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10755$as_echo "$UNIQ" >&6; }
10756else
10757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10758$as_echo "no" >&6; }
10759fi
10760
10761
10762        if test "x$UNIQ" = x; then
10763          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10764        fi
10765      else
10766        # Otherwise we believe it is a complete path. Use it as it is.
10767        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
10768$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
10769        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
10770$as_echo_n "checking for UNIQ... " >&6; }
10771        if test ! -x "$tool_specified"; then
10772          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10773$as_echo "not found" >&6; }
10774          as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
10775        fi
10776        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10777$as_echo "$tool_specified" >&6; }
10778      fi
10779    fi
10780  fi
10781
10782
10783
10784  if test "x$UNIQ" = x; then
10785    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
10786  fi
10787
10788
10789
10790
10791
10792  # Publish this variable in the help.
10793
10794
10795  if test "x$WC" = x; then
10796    # The variable is not set by user, try to locate tool using the code snippet
10797    for ac_prog in wc
10798do
10799  # Extract the first word of "$ac_prog", so it can be a program name with args.
10800set dummy $ac_prog; ac_word=$2
10801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10802$as_echo_n "checking for $ac_word... " >&6; }
10803if ${ac_cv_path_WC+:} false; then :
10804  $as_echo_n "(cached) " >&6
10805else
10806  case $WC in
10807  [\\/]* | ?:[\\/]*)
10808  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10809  ;;
10810  *)
10811  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10812for as_dir in $PATH
10813do
10814  IFS=$as_save_IFS
10815  test -z "$as_dir" && as_dir=.
10816    for ac_exec_ext in '' $ac_executable_extensions; do
10817  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10818    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10819    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10820    break 2
10821  fi
10822done
10823  done
10824IFS=$as_save_IFS
10825
10826  ;;
10827esac
10828fi
10829WC=$ac_cv_path_WC
10830if test -n "$WC"; then
10831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10832$as_echo "$WC" >&6; }
10833else
10834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10835$as_echo "no" >&6; }
10836fi
10837
10838
10839  test -n "$WC" && break
10840done
10841
10842  else
10843    # The variable is set, but is it from the command line or the environment?
10844
10845    # Try to remove the string !WC! from our list.
10846    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
10847    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10848      # If it failed, the variable was not from the command line. Ignore it,
10849      # but warn the user (except for BASH, which is always set by the calling BASH).
10850      if test "xWC" != xBASH; then
10851        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
10852$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
10853      fi
10854      # Try to locate tool using the code snippet
10855      for ac_prog in wc
10856do
10857  # Extract the first word of "$ac_prog", so it can be a program name with args.
10858set dummy $ac_prog; ac_word=$2
10859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10860$as_echo_n "checking for $ac_word... " >&6; }
10861if ${ac_cv_path_WC+:} false; then :
10862  $as_echo_n "(cached) " >&6
10863else
10864  case $WC in
10865  [\\/]* | ?:[\\/]*)
10866  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10867  ;;
10868  *)
10869  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10870for as_dir in $PATH
10871do
10872  IFS=$as_save_IFS
10873  test -z "$as_dir" && as_dir=.
10874    for ac_exec_ext in '' $ac_executable_extensions; do
10875  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10876    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10877    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10878    break 2
10879  fi
10880done
10881  done
10882IFS=$as_save_IFS
10883
10884  ;;
10885esac
10886fi
10887WC=$ac_cv_path_WC
10888if test -n "$WC"; then
10889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10890$as_echo "$WC" >&6; }
10891else
10892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10893$as_echo "no" >&6; }
10894fi
10895
10896
10897  test -n "$WC" && break
10898done
10899
10900    else
10901      # If it succeeded, then it was overridden by the user. We will use it
10902      # for the tool.
10903
10904      # First remove it from the list of overridden variables, so we can test
10905      # for unknown variables in the end.
10906      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10907
10908      # Check if the provided tool contains a complete path.
10909      tool_specified="$WC"
10910      tool_basename="${tool_specified##*/}"
10911      if test "x$tool_basename" = "x$tool_specified"; then
10912        # A command without a complete path is provided, search $PATH.
10913        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
10914$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
10915        # Extract the first word of "$tool_basename", so it can be a program name with args.
10916set dummy $tool_basename; ac_word=$2
10917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10918$as_echo_n "checking for $ac_word... " >&6; }
10919if ${ac_cv_path_WC+:} false; then :
10920  $as_echo_n "(cached) " >&6
10921else
10922  case $WC in
10923  [\\/]* | ?:[\\/]*)
10924  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10925  ;;
10926  *)
10927  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10928for as_dir in $PATH
10929do
10930  IFS=$as_save_IFS
10931  test -z "$as_dir" && as_dir=.
10932    for ac_exec_ext in '' $ac_executable_extensions; do
10933  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10934    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10935    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10936    break 2
10937  fi
10938done
10939  done
10940IFS=$as_save_IFS
10941
10942  ;;
10943esac
10944fi
10945WC=$ac_cv_path_WC
10946if test -n "$WC"; then
10947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10948$as_echo "$WC" >&6; }
10949else
10950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10951$as_echo "no" >&6; }
10952fi
10953
10954
10955        if test "x$WC" = x; then
10956          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10957        fi
10958      else
10959        # Otherwise we believe it is a complete path. Use it as it is.
10960        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
10961$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
10962        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
10963$as_echo_n "checking for WC... " >&6; }
10964        if test ! -x "$tool_specified"; then
10965          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10966$as_echo "not found" >&6; }
10967          as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
10968        fi
10969        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10970$as_echo "$tool_specified" >&6; }
10971      fi
10972    fi
10973  fi
10974
10975
10976
10977  if test "x$WC" = x; then
10978    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
10979  fi
10980
10981
10982
10983
10984
10985  # Publish this variable in the help.
10986
10987
10988  if test "x$WHICH" = x; then
10989    # The variable is not set by user, try to locate tool using the code snippet
10990    for ac_prog in which
10991do
10992  # Extract the first word of "$ac_prog", so it can be a program name with args.
10993set dummy $ac_prog; ac_word=$2
10994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10995$as_echo_n "checking for $ac_word... " >&6; }
10996if ${ac_cv_path_WHICH+:} false; then :
10997  $as_echo_n "(cached) " >&6
10998else
10999  case $WHICH in
11000  [\\/]* | ?:[\\/]*)
11001  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11002  ;;
11003  *)
11004  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11005for as_dir in $PATH
11006do
11007  IFS=$as_save_IFS
11008  test -z "$as_dir" && as_dir=.
11009    for ac_exec_ext in '' $ac_executable_extensions; do
11010  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11011    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11012    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11013    break 2
11014  fi
11015done
11016  done
11017IFS=$as_save_IFS
11018
11019  ;;
11020esac
11021fi
11022WHICH=$ac_cv_path_WHICH
11023if test -n "$WHICH"; then
11024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11025$as_echo "$WHICH" >&6; }
11026else
11027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11028$as_echo "no" >&6; }
11029fi
11030
11031
11032  test -n "$WHICH" && break
11033done
11034
11035  else
11036    # The variable is set, but is it from the command line or the environment?
11037
11038    # Try to remove the string !WHICH! from our list.
11039    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
11040    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11041      # If it failed, the variable was not from the command line. Ignore it,
11042      # but warn the user (except for BASH, which is always set by the calling BASH).
11043      if test "xWHICH" != xBASH; then
11044        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
11045$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
11046      fi
11047      # Try to locate tool using the code snippet
11048      for ac_prog in which
11049do
11050  # Extract the first word of "$ac_prog", so it can be a program name with args.
11051set dummy $ac_prog; ac_word=$2
11052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11053$as_echo_n "checking for $ac_word... " >&6; }
11054if ${ac_cv_path_WHICH+:} false; then :
11055  $as_echo_n "(cached) " >&6
11056else
11057  case $WHICH in
11058  [\\/]* | ?:[\\/]*)
11059  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11060  ;;
11061  *)
11062  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11063for as_dir in $PATH
11064do
11065  IFS=$as_save_IFS
11066  test -z "$as_dir" && as_dir=.
11067    for ac_exec_ext in '' $ac_executable_extensions; do
11068  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11069    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11070    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11071    break 2
11072  fi
11073done
11074  done
11075IFS=$as_save_IFS
11076
11077  ;;
11078esac
11079fi
11080WHICH=$ac_cv_path_WHICH
11081if test -n "$WHICH"; then
11082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11083$as_echo "$WHICH" >&6; }
11084else
11085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11086$as_echo "no" >&6; }
11087fi
11088
11089
11090  test -n "$WHICH" && break
11091done
11092
11093    else
11094      # If it succeeded, then it was overridden by the user. We will use it
11095      # for the tool.
11096
11097      # First remove it from the list of overridden variables, so we can test
11098      # for unknown variables in the end.
11099      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11100
11101      # Check if the provided tool contains a complete path.
11102      tool_specified="$WHICH"
11103      tool_basename="${tool_specified##*/}"
11104      if test "x$tool_basename" = "x$tool_specified"; then
11105        # A command without a complete path is provided, search $PATH.
11106        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
11107$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
11108        # Extract the first word of "$tool_basename", so it can be a program name with args.
11109set dummy $tool_basename; ac_word=$2
11110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11111$as_echo_n "checking for $ac_word... " >&6; }
11112if ${ac_cv_path_WHICH+:} false; then :
11113  $as_echo_n "(cached) " >&6
11114else
11115  case $WHICH in
11116  [\\/]* | ?:[\\/]*)
11117  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11118  ;;
11119  *)
11120  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11121for as_dir in $PATH
11122do
11123  IFS=$as_save_IFS
11124  test -z "$as_dir" && as_dir=.
11125    for ac_exec_ext in '' $ac_executable_extensions; do
11126  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11127    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11128    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11129    break 2
11130  fi
11131done
11132  done
11133IFS=$as_save_IFS
11134
11135  ;;
11136esac
11137fi
11138WHICH=$ac_cv_path_WHICH
11139if test -n "$WHICH"; then
11140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11141$as_echo "$WHICH" >&6; }
11142else
11143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11144$as_echo "no" >&6; }
11145fi
11146
11147
11148        if test "x$WHICH" = x; then
11149          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11150        fi
11151      else
11152        # Otherwise we believe it is a complete path. Use it as it is.
11153        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
11154$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
11155        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11156$as_echo_n "checking for WHICH... " >&6; }
11157        if test ! -x "$tool_specified"; then
11158          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11159$as_echo "not found" >&6; }
11160          as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
11161        fi
11162        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11163$as_echo "$tool_specified" >&6; }
11164      fi
11165    fi
11166  fi
11167
11168
11169
11170  if test "x$WHICH" = x; then
11171    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
11172  fi
11173
11174
11175
11176
11177
11178  # Publish this variable in the help.
11179
11180
11181  if test "x$XARGS" = x; then
11182    # The variable is not set by user, try to locate tool using the code snippet
11183    for ac_prog in xargs
11184do
11185  # Extract the first word of "$ac_prog", so it can be a program name with args.
11186set dummy $ac_prog; ac_word=$2
11187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11188$as_echo_n "checking for $ac_word... " >&6; }
11189if ${ac_cv_path_XARGS+:} false; then :
11190  $as_echo_n "(cached) " >&6
11191else
11192  case $XARGS in
11193  [\\/]* | ?:[\\/]*)
11194  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11195  ;;
11196  *)
11197  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11198for as_dir in $PATH
11199do
11200  IFS=$as_save_IFS
11201  test -z "$as_dir" && as_dir=.
11202    for ac_exec_ext in '' $ac_executable_extensions; do
11203  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11204    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11205    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11206    break 2
11207  fi
11208done
11209  done
11210IFS=$as_save_IFS
11211
11212  ;;
11213esac
11214fi
11215XARGS=$ac_cv_path_XARGS
11216if test -n "$XARGS"; then
11217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11218$as_echo "$XARGS" >&6; }
11219else
11220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11221$as_echo "no" >&6; }
11222fi
11223
11224
11225  test -n "$XARGS" && break
11226done
11227
11228  else
11229    # The variable is set, but is it from the command line or the environment?
11230
11231    # Try to remove the string !XARGS! from our list.
11232    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
11233    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11234      # If it failed, the variable was not from the command line. Ignore it,
11235      # but warn the user (except for BASH, which is always set by the calling BASH).
11236      if test "xXARGS" != xBASH; then
11237        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
11238$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
11239      fi
11240      # Try to locate tool using the code snippet
11241      for ac_prog in xargs
11242do
11243  # Extract the first word of "$ac_prog", so it can be a program name with args.
11244set dummy $ac_prog; ac_word=$2
11245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11246$as_echo_n "checking for $ac_word... " >&6; }
11247if ${ac_cv_path_XARGS+:} false; then :
11248  $as_echo_n "(cached) " >&6
11249else
11250  case $XARGS in
11251  [\\/]* | ?:[\\/]*)
11252  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11253  ;;
11254  *)
11255  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11256for as_dir in $PATH
11257do
11258  IFS=$as_save_IFS
11259  test -z "$as_dir" && as_dir=.
11260    for ac_exec_ext in '' $ac_executable_extensions; do
11261  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11262    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11263    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11264    break 2
11265  fi
11266done
11267  done
11268IFS=$as_save_IFS
11269
11270  ;;
11271esac
11272fi
11273XARGS=$ac_cv_path_XARGS
11274if test -n "$XARGS"; then
11275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11276$as_echo "$XARGS" >&6; }
11277else
11278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11279$as_echo "no" >&6; }
11280fi
11281
11282
11283  test -n "$XARGS" && break
11284done
11285
11286    else
11287      # If it succeeded, then it was overridden by the user. We will use it
11288      # for the tool.
11289
11290      # First remove it from the list of overridden variables, so we can test
11291      # for unknown variables in the end.
11292      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11293
11294      # Check if the provided tool contains a complete path.
11295      tool_specified="$XARGS"
11296      tool_basename="${tool_specified##*/}"
11297      if test "x$tool_basename" = "x$tool_specified"; then
11298        # A command without a complete path is provided, search $PATH.
11299        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
11300$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
11301        # Extract the first word of "$tool_basename", so it can be a program name with args.
11302set dummy $tool_basename; ac_word=$2
11303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11304$as_echo_n "checking for $ac_word... " >&6; }
11305if ${ac_cv_path_XARGS+:} false; then :
11306  $as_echo_n "(cached) " >&6
11307else
11308  case $XARGS in
11309  [\\/]* | ?:[\\/]*)
11310  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11311  ;;
11312  *)
11313  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11314for as_dir in $PATH
11315do
11316  IFS=$as_save_IFS
11317  test -z "$as_dir" && as_dir=.
11318    for ac_exec_ext in '' $ac_executable_extensions; do
11319  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11320    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11321    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11322    break 2
11323  fi
11324done
11325  done
11326IFS=$as_save_IFS
11327
11328  ;;
11329esac
11330fi
11331XARGS=$ac_cv_path_XARGS
11332if test -n "$XARGS"; then
11333  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11334$as_echo "$XARGS" >&6; }
11335else
11336  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11337$as_echo "no" >&6; }
11338fi
11339
11340
11341        if test "x$XARGS" = x; then
11342          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11343        fi
11344      else
11345        # Otherwise we believe it is a complete path. Use it as it is.
11346        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
11347$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
11348        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
11349$as_echo_n "checking for XARGS... " >&6; }
11350        if test ! -x "$tool_specified"; then
11351          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11352$as_echo "not found" >&6; }
11353          as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
11354        fi
11355        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11356$as_echo "$tool_specified" >&6; }
11357      fi
11358    fi
11359  fi
11360
11361
11362
11363  if test "x$XARGS" = x; then
11364    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
11365  fi
11366
11367
11368
11369  # Then required tools that require some special treatment.
11370
11371
11372  # Publish this variable in the help.
11373
11374
11375  if test "x$AWK" = x; then
11376    # The variable is not set by user, try to locate tool using the code snippet
11377    for ac_prog in gawk mawk nawk awk
11378do
11379  # Extract the first word of "$ac_prog", so it can be a program name with args.
11380set dummy $ac_prog; ac_word=$2
11381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11382$as_echo_n "checking for $ac_word... " >&6; }
11383if ${ac_cv_prog_AWK+:} false; then :
11384  $as_echo_n "(cached) " >&6
11385else
11386  if test -n "$AWK"; then
11387  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11388else
11389as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11390for as_dir in $PATH
11391do
11392  IFS=$as_save_IFS
11393  test -z "$as_dir" && as_dir=.
11394    for ac_exec_ext in '' $ac_executable_extensions; do
11395  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11396    ac_cv_prog_AWK="$ac_prog"
11397    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11398    break 2
11399  fi
11400done
11401  done
11402IFS=$as_save_IFS
11403
11404fi
11405fi
11406AWK=$ac_cv_prog_AWK
11407if test -n "$AWK"; then
11408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11409$as_echo "$AWK" >&6; }
11410else
11411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11412$as_echo "no" >&6; }
11413fi
11414
11415
11416  test -n "$AWK" && break
11417done
11418
11419  else
11420    # The variable is set, but is it from the command line or the environment?
11421
11422    # Try to remove the string !AWK! from our list.
11423    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
11424    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11425      # If it failed, the variable was not from the command line. Ignore it,
11426      # but warn the user (except for BASH, which is always set by the calling BASH).
11427      if test "xAWK" != xBASH; then
11428        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
11429$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
11430      fi
11431      # Try to locate tool using the code snippet
11432      for ac_prog in gawk mawk nawk awk
11433do
11434  # Extract the first word of "$ac_prog", so it can be a program name with args.
11435set dummy $ac_prog; ac_word=$2
11436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11437$as_echo_n "checking for $ac_word... " >&6; }
11438if ${ac_cv_prog_AWK+:} false; then :
11439  $as_echo_n "(cached) " >&6
11440else
11441  if test -n "$AWK"; then
11442  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11443else
11444as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11445for as_dir in $PATH
11446do
11447  IFS=$as_save_IFS
11448  test -z "$as_dir" && as_dir=.
11449    for ac_exec_ext in '' $ac_executable_extensions; do
11450  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11451    ac_cv_prog_AWK="$ac_prog"
11452    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11453    break 2
11454  fi
11455done
11456  done
11457IFS=$as_save_IFS
11458
11459fi
11460fi
11461AWK=$ac_cv_prog_AWK
11462if test -n "$AWK"; then
11463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11464$as_echo "$AWK" >&6; }
11465else
11466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11467$as_echo "no" >&6; }
11468fi
11469
11470
11471  test -n "$AWK" && break
11472done
11473
11474    else
11475      # If it succeeded, then it was overridden by the user. We will use it
11476      # for the tool.
11477
11478      # First remove it from the list of overridden variables, so we can test
11479      # for unknown variables in the end.
11480      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11481
11482      # Check if the provided tool contains a complete path.
11483      tool_specified="$AWK"
11484      tool_basename="${tool_specified##*/}"
11485      if test "x$tool_basename" = "x$tool_specified"; then
11486        # A command without a complete path is provided, search $PATH.
11487        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
11488$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
11489        # Extract the first word of "$tool_basename", so it can be a program name with args.
11490set dummy $tool_basename; ac_word=$2
11491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11492$as_echo_n "checking for $ac_word... " >&6; }
11493if ${ac_cv_path_AWK+:} false; then :
11494  $as_echo_n "(cached) " >&6
11495else
11496  case $AWK in
11497  [\\/]* | ?:[\\/]*)
11498  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
11499  ;;
11500  *)
11501  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11502for as_dir in $PATH
11503do
11504  IFS=$as_save_IFS
11505  test -z "$as_dir" && as_dir=.
11506    for ac_exec_ext in '' $ac_executable_extensions; do
11507  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11508    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
11509    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11510    break 2
11511  fi
11512done
11513  done
11514IFS=$as_save_IFS
11515
11516  ;;
11517esac
11518fi
11519AWK=$ac_cv_path_AWK
11520if test -n "$AWK"; then
11521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11522$as_echo "$AWK" >&6; }
11523else
11524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11525$as_echo "no" >&6; }
11526fi
11527
11528
11529        if test "x$AWK" = x; then
11530          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11531        fi
11532      else
11533        # Otherwise we believe it is a complete path. Use it as it is.
11534        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
11535$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
11536        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
11537$as_echo_n "checking for AWK... " >&6; }
11538        if test ! -x "$tool_specified"; then
11539          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11540$as_echo "not found" >&6; }
11541          as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
11542        fi
11543        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11544$as_echo "$tool_specified" >&6; }
11545      fi
11546    fi
11547  fi
11548
11549
11550  if test "x$AWK" = x; then
11551    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
11552  fi
11553
11554
11555
11556
11557  # Publish this variable in the help.
11558
11559
11560  if test "x$GREP" = x; then
11561    # The variable is not set by user, try to locate tool using the code snippet
11562    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11563$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11564if ${ac_cv_path_GREP+:} false; then :
11565  $as_echo_n "(cached) " >&6
11566else
11567  if test -z "$GREP"; then
11568  ac_path_GREP_found=false
11569  # Loop through the user's path and test for each of PROGNAME-LIST
11570  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11571for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11572do
11573  IFS=$as_save_IFS
11574  test -z "$as_dir" && as_dir=.
11575    for ac_prog in grep ggrep; do
11576    for ac_exec_ext in '' $ac_executable_extensions; do
11577      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11578      as_fn_executable_p "$ac_path_GREP" || continue
11579# Check for GNU ac_path_GREP and select it if it is found.
11580  # Check for GNU $ac_path_GREP
11581case `"$ac_path_GREP" --version 2>&1` in
11582*GNU*)
11583  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11584*)
11585  ac_count=0
11586  $as_echo_n 0123456789 >"conftest.in"
11587  while :
11588  do
11589    cat "conftest.in" "conftest.in" >"conftest.tmp"
11590    mv "conftest.tmp" "conftest.in"
11591    cp "conftest.in" "conftest.nl"
11592    $as_echo 'GREP' >> "conftest.nl"
11593    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11594    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11595    as_fn_arith $ac_count + 1 && ac_count=$as_val
11596    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11597      # Best one so far, save it but keep looking for a better one
11598      ac_cv_path_GREP="$ac_path_GREP"
11599      ac_path_GREP_max=$ac_count
11600    fi
11601    # 10*(2^10) chars as input seems more than enough
11602    test $ac_count -gt 10 && break
11603  done
11604  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11605esac
11606
11607      $ac_path_GREP_found && break 3
11608    done
11609  done
11610  done
11611IFS=$as_save_IFS
11612  if test -z "$ac_cv_path_GREP"; then
11613    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11614  fi
11615else
11616  ac_cv_path_GREP=$GREP
11617fi
11618
11619fi
11620{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11621$as_echo "$ac_cv_path_GREP" >&6; }
11622 GREP="$ac_cv_path_GREP"
11623
11624
11625  else
11626    # The variable is set, but is it from the command line or the environment?
11627
11628    # Try to remove the string !GREP! from our list.
11629    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
11630    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11631      # If it failed, the variable was not from the command line. Ignore it,
11632      # but warn the user (except for BASH, which is always set by the calling BASH).
11633      if test "xGREP" != xBASH; then
11634        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
11635$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
11636      fi
11637      # Try to locate tool using the code snippet
11638      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11639$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11640if ${ac_cv_path_GREP+:} false; then :
11641  $as_echo_n "(cached) " >&6
11642else
11643  if test -z "$GREP"; then
11644  ac_path_GREP_found=false
11645  # Loop through the user's path and test for each of PROGNAME-LIST
11646  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11647for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11648do
11649  IFS=$as_save_IFS
11650  test -z "$as_dir" && as_dir=.
11651    for ac_prog in grep ggrep; do
11652    for ac_exec_ext in '' $ac_executable_extensions; do
11653      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11654      as_fn_executable_p "$ac_path_GREP" || continue
11655# Check for GNU ac_path_GREP and select it if it is found.
11656  # Check for GNU $ac_path_GREP
11657case `"$ac_path_GREP" --version 2>&1` in
11658*GNU*)
11659  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11660*)
11661  ac_count=0
11662  $as_echo_n 0123456789 >"conftest.in"
11663  while :
11664  do
11665    cat "conftest.in" "conftest.in" >"conftest.tmp"
11666    mv "conftest.tmp" "conftest.in"
11667    cp "conftest.in" "conftest.nl"
11668    $as_echo 'GREP' >> "conftest.nl"
11669    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11670    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11671    as_fn_arith $ac_count + 1 && ac_count=$as_val
11672    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11673      # Best one so far, save it but keep looking for a better one
11674      ac_cv_path_GREP="$ac_path_GREP"
11675      ac_path_GREP_max=$ac_count
11676    fi
11677    # 10*(2^10) chars as input seems more than enough
11678    test $ac_count -gt 10 && break
11679  done
11680  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11681esac
11682
11683      $ac_path_GREP_found && break 3
11684    done
11685  done
11686  done
11687IFS=$as_save_IFS
11688  if test -z "$ac_cv_path_GREP"; then
11689    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11690  fi
11691else
11692  ac_cv_path_GREP=$GREP
11693fi
11694
11695fi
11696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11697$as_echo "$ac_cv_path_GREP" >&6; }
11698 GREP="$ac_cv_path_GREP"
11699
11700
11701    else
11702      # If it succeeded, then it was overridden by the user. We will use it
11703      # for the tool.
11704
11705      # First remove it from the list of overridden variables, so we can test
11706      # for unknown variables in the end.
11707      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11708
11709      # Check if the provided tool contains a complete path.
11710      tool_specified="$GREP"
11711      tool_basename="${tool_specified##*/}"
11712      if test "x$tool_basename" = "x$tool_specified"; then
11713        # A command without a complete path is provided, search $PATH.
11714        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
11715$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
11716        # Extract the first word of "$tool_basename", so it can be a program name with args.
11717set dummy $tool_basename; ac_word=$2
11718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11719$as_echo_n "checking for $ac_word... " >&6; }
11720if ${ac_cv_path_GREP+:} false; then :
11721  $as_echo_n "(cached) " >&6
11722else
11723  case $GREP in
11724  [\\/]* | ?:[\\/]*)
11725  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
11726  ;;
11727  *)
11728  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11729for as_dir in $PATH
11730do
11731  IFS=$as_save_IFS
11732  test -z "$as_dir" && as_dir=.
11733    for ac_exec_ext in '' $ac_executable_extensions; do
11734  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11735    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
11736    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11737    break 2
11738  fi
11739done
11740  done
11741IFS=$as_save_IFS
11742
11743  ;;
11744esac
11745fi
11746GREP=$ac_cv_path_GREP
11747if test -n "$GREP"; then
11748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
11749$as_echo "$GREP" >&6; }
11750else
11751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11752$as_echo "no" >&6; }
11753fi
11754
11755
11756        if test "x$GREP" = x; then
11757          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11758        fi
11759      else
11760        # Otherwise we believe it is a complete path. Use it as it is.
11761        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
11762$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
11763        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
11764$as_echo_n "checking for GREP... " >&6; }
11765        if test ! -x "$tool_specified"; then
11766          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11767$as_echo "not found" >&6; }
11768          as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
11769        fi
11770        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11771$as_echo "$tool_specified" >&6; }
11772      fi
11773    fi
11774  fi
11775
11776
11777  if test "x$GREP" = x; then
11778    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
11779  fi
11780
11781
11782
11783
11784  # Publish this variable in the help.
11785
11786
11787  if test "x$EGREP" = x; then
11788    # The variable is not set by user, try to locate tool using the code snippet
11789    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11790$as_echo_n "checking for egrep... " >&6; }
11791if ${ac_cv_path_EGREP+:} false; then :
11792  $as_echo_n "(cached) " >&6
11793else
11794  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11795   then ac_cv_path_EGREP="$GREP -E"
11796   else
11797     if test -z "$EGREP"; then
11798  ac_path_EGREP_found=false
11799  # Loop through the user's path and test for each of PROGNAME-LIST
11800  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11801for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11802do
11803  IFS=$as_save_IFS
11804  test -z "$as_dir" && as_dir=.
11805    for ac_prog in egrep; do
11806    for ac_exec_ext in '' $ac_executable_extensions; do
11807      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11808      as_fn_executable_p "$ac_path_EGREP" || continue
11809# Check for GNU ac_path_EGREP and select it if it is found.
11810  # Check for GNU $ac_path_EGREP
11811case `"$ac_path_EGREP" --version 2>&1` in
11812*GNU*)
11813  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11814*)
11815  ac_count=0
11816  $as_echo_n 0123456789 >"conftest.in"
11817  while :
11818  do
11819    cat "conftest.in" "conftest.in" >"conftest.tmp"
11820    mv "conftest.tmp" "conftest.in"
11821    cp "conftest.in" "conftest.nl"
11822    $as_echo 'EGREP' >> "conftest.nl"
11823    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11824    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11825    as_fn_arith $ac_count + 1 && ac_count=$as_val
11826    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11827      # Best one so far, save it but keep looking for a better one
11828      ac_cv_path_EGREP="$ac_path_EGREP"
11829      ac_path_EGREP_max=$ac_count
11830    fi
11831    # 10*(2^10) chars as input seems more than enough
11832    test $ac_count -gt 10 && break
11833  done
11834  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11835esac
11836
11837      $ac_path_EGREP_found && break 3
11838    done
11839  done
11840  done
11841IFS=$as_save_IFS
11842  if test -z "$ac_cv_path_EGREP"; then
11843    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11844  fi
11845else
11846  ac_cv_path_EGREP=$EGREP
11847fi
11848
11849   fi
11850fi
11851{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11852$as_echo "$ac_cv_path_EGREP" >&6; }
11853 EGREP="$ac_cv_path_EGREP"
11854
11855
11856  else
11857    # The variable is set, but is it from the command line or the environment?
11858
11859    # Try to remove the string !EGREP! from our list.
11860    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
11861    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11862      # If it failed, the variable was not from the command line. Ignore it,
11863      # but warn the user (except for BASH, which is always set by the calling BASH).
11864      if test "xEGREP" != xBASH; then
11865        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
11866$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
11867      fi
11868      # Try to locate tool using the code snippet
11869      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11870$as_echo_n "checking for egrep... " >&6; }
11871if ${ac_cv_path_EGREP+:} false; then :
11872  $as_echo_n "(cached) " >&6
11873else
11874  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11875   then ac_cv_path_EGREP="$GREP -E"
11876   else
11877     if test -z "$EGREP"; then
11878  ac_path_EGREP_found=false
11879  # Loop through the user's path and test for each of PROGNAME-LIST
11880  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11881for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11882do
11883  IFS=$as_save_IFS
11884  test -z "$as_dir" && as_dir=.
11885    for ac_prog in egrep; do
11886    for ac_exec_ext in '' $ac_executable_extensions; do
11887      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11888      as_fn_executable_p "$ac_path_EGREP" || continue
11889# Check for GNU ac_path_EGREP and select it if it is found.
11890  # Check for GNU $ac_path_EGREP
11891case `"$ac_path_EGREP" --version 2>&1` in
11892*GNU*)
11893  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11894*)
11895  ac_count=0
11896  $as_echo_n 0123456789 >"conftest.in"
11897  while :
11898  do
11899    cat "conftest.in" "conftest.in" >"conftest.tmp"
11900    mv "conftest.tmp" "conftest.in"
11901    cp "conftest.in" "conftest.nl"
11902    $as_echo 'EGREP' >> "conftest.nl"
11903    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11904    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11905    as_fn_arith $ac_count + 1 && ac_count=$as_val
11906    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11907      # Best one so far, save it but keep looking for a better one
11908      ac_cv_path_EGREP="$ac_path_EGREP"
11909      ac_path_EGREP_max=$ac_count
11910    fi
11911    # 10*(2^10) chars as input seems more than enough
11912    test $ac_count -gt 10 && break
11913  done
11914  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11915esac
11916
11917      $ac_path_EGREP_found && break 3
11918    done
11919  done
11920  done
11921IFS=$as_save_IFS
11922  if test -z "$ac_cv_path_EGREP"; then
11923    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11924  fi
11925else
11926  ac_cv_path_EGREP=$EGREP
11927fi
11928
11929   fi
11930fi
11931{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11932$as_echo "$ac_cv_path_EGREP" >&6; }
11933 EGREP="$ac_cv_path_EGREP"
11934
11935
11936    else
11937      # If it succeeded, then it was overridden by the user. We will use it
11938      # for the tool.
11939
11940      # First remove it from the list of overridden variables, so we can test
11941      # for unknown variables in the end.
11942      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11943
11944      # Check if the provided tool contains a complete path.
11945      tool_specified="$EGREP"
11946      tool_basename="${tool_specified##*/}"
11947      if test "x$tool_basename" = "x$tool_specified"; then
11948        # A command without a complete path is provided, search $PATH.
11949        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
11950$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
11951        # Extract the first word of "$tool_basename", so it can be a program name with args.
11952set dummy $tool_basename; ac_word=$2
11953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11954$as_echo_n "checking for $ac_word... " >&6; }
11955if ${ac_cv_path_EGREP+:} false; then :
11956  $as_echo_n "(cached) " >&6
11957else
11958  case $EGREP in
11959  [\\/]* | ?:[\\/]*)
11960  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
11961  ;;
11962  *)
11963  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11964for as_dir in $PATH
11965do
11966  IFS=$as_save_IFS
11967  test -z "$as_dir" && as_dir=.
11968    for ac_exec_ext in '' $ac_executable_extensions; do
11969  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11970    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
11971    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11972    break 2
11973  fi
11974done
11975  done
11976IFS=$as_save_IFS
11977
11978  ;;
11979esac
11980fi
11981EGREP=$ac_cv_path_EGREP
11982if test -n "$EGREP"; then
11983  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
11984$as_echo "$EGREP" >&6; }
11985else
11986  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11987$as_echo "no" >&6; }
11988fi
11989
11990
11991        if test "x$EGREP" = x; then
11992          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11993        fi
11994      else
11995        # Otherwise we believe it is a complete path. Use it as it is.
11996        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
11997$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
11998        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
11999$as_echo_n "checking for EGREP... " >&6; }
12000        if test ! -x "$tool_specified"; then
12001          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12002$as_echo "not found" >&6; }
12003          as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12004        fi
12005        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12006$as_echo "$tool_specified" >&6; }
12007      fi
12008    fi
12009  fi
12010
12011
12012  if test "x$EGREP" = x; then
12013    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
12014  fi
12015
12016
12017
12018
12019  # Publish this variable in the help.
12020
12021
12022  if test "x$FGREP" = x; then
12023    # The variable is not set by user, try to locate tool using the code snippet
12024    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12025$as_echo_n "checking for fgrep... " >&6; }
12026if ${ac_cv_path_FGREP+:} false; then :
12027  $as_echo_n "(cached) " >&6
12028else
12029  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12030   then ac_cv_path_FGREP="$GREP -F"
12031   else
12032     if test -z "$FGREP"; then
12033  ac_path_FGREP_found=false
12034  # Loop through the user's path and test for each of PROGNAME-LIST
12035  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12036for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12037do
12038  IFS=$as_save_IFS
12039  test -z "$as_dir" && as_dir=.
12040    for ac_prog in fgrep; do
12041    for ac_exec_ext in '' $ac_executable_extensions; do
12042      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12043      as_fn_executable_p "$ac_path_FGREP" || continue
12044# Check for GNU ac_path_FGREP and select it if it is found.
12045  # Check for GNU $ac_path_FGREP
12046case `"$ac_path_FGREP" --version 2>&1` in
12047*GNU*)
12048  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12049*)
12050  ac_count=0
12051  $as_echo_n 0123456789 >"conftest.in"
12052  while :
12053  do
12054    cat "conftest.in" "conftest.in" >"conftest.tmp"
12055    mv "conftest.tmp" "conftest.in"
12056    cp "conftest.in" "conftest.nl"
12057    $as_echo 'FGREP' >> "conftest.nl"
12058    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12059    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12060    as_fn_arith $ac_count + 1 && ac_count=$as_val
12061    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12062      # Best one so far, save it but keep looking for a better one
12063      ac_cv_path_FGREP="$ac_path_FGREP"
12064      ac_path_FGREP_max=$ac_count
12065    fi
12066    # 10*(2^10) chars as input seems more than enough
12067    test $ac_count -gt 10 && break
12068  done
12069  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12070esac
12071
12072      $ac_path_FGREP_found && break 3
12073    done
12074  done
12075  done
12076IFS=$as_save_IFS
12077  if test -z "$ac_cv_path_FGREP"; then
12078    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12079  fi
12080else
12081  ac_cv_path_FGREP=$FGREP
12082fi
12083
12084   fi
12085fi
12086{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12087$as_echo "$ac_cv_path_FGREP" >&6; }
12088 FGREP="$ac_cv_path_FGREP"
12089
12090
12091  else
12092    # The variable is set, but is it from the command line or the environment?
12093
12094    # Try to remove the string !FGREP! from our list.
12095    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
12096    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12097      # If it failed, the variable was not from the command line. Ignore it,
12098      # but warn the user (except for BASH, which is always set by the calling BASH).
12099      if test "xFGREP" != xBASH; then
12100        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
12101$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
12102      fi
12103      # Try to locate tool using the code snippet
12104      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12105$as_echo_n "checking for fgrep... " >&6; }
12106if ${ac_cv_path_FGREP+:} false; then :
12107  $as_echo_n "(cached) " >&6
12108else
12109  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12110   then ac_cv_path_FGREP="$GREP -F"
12111   else
12112     if test -z "$FGREP"; then
12113  ac_path_FGREP_found=false
12114  # Loop through the user's path and test for each of PROGNAME-LIST
12115  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12116for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12117do
12118  IFS=$as_save_IFS
12119  test -z "$as_dir" && as_dir=.
12120    for ac_prog in fgrep; do
12121    for ac_exec_ext in '' $ac_executable_extensions; do
12122      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12123      as_fn_executable_p "$ac_path_FGREP" || continue
12124# Check for GNU ac_path_FGREP and select it if it is found.
12125  # Check for GNU $ac_path_FGREP
12126case `"$ac_path_FGREP" --version 2>&1` in
12127*GNU*)
12128  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12129*)
12130  ac_count=0
12131  $as_echo_n 0123456789 >"conftest.in"
12132  while :
12133  do
12134    cat "conftest.in" "conftest.in" >"conftest.tmp"
12135    mv "conftest.tmp" "conftest.in"
12136    cp "conftest.in" "conftest.nl"
12137    $as_echo 'FGREP' >> "conftest.nl"
12138    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12139    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12140    as_fn_arith $ac_count + 1 && ac_count=$as_val
12141    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12142      # Best one so far, save it but keep looking for a better one
12143      ac_cv_path_FGREP="$ac_path_FGREP"
12144      ac_path_FGREP_max=$ac_count
12145    fi
12146    # 10*(2^10) chars as input seems more than enough
12147    test $ac_count -gt 10 && break
12148  done
12149  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12150esac
12151
12152      $ac_path_FGREP_found && break 3
12153    done
12154  done
12155  done
12156IFS=$as_save_IFS
12157  if test -z "$ac_cv_path_FGREP"; then
12158    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12159  fi
12160else
12161  ac_cv_path_FGREP=$FGREP
12162fi
12163
12164   fi
12165fi
12166{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12167$as_echo "$ac_cv_path_FGREP" >&6; }
12168 FGREP="$ac_cv_path_FGREP"
12169
12170
12171    else
12172      # If it succeeded, then it was overridden by the user. We will use it
12173      # for the tool.
12174
12175      # First remove it from the list of overridden variables, so we can test
12176      # for unknown variables in the end.
12177      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12178
12179      # Check if the provided tool contains a complete path.
12180      tool_specified="$FGREP"
12181      tool_basename="${tool_specified##*/}"
12182      if test "x$tool_basename" = "x$tool_specified"; then
12183        # A command without a complete path is provided, search $PATH.
12184        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
12185$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
12186        # Extract the first word of "$tool_basename", so it can be a program name with args.
12187set dummy $tool_basename; ac_word=$2
12188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12189$as_echo_n "checking for $ac_word... " >&6; }
12190if ${ac_cv_path_FGREP+:} false; then :
12191  $as_echo_n "(cached) " >&6
12192else
12193  case $FGREP in
12194  [\\/]* | ?:[\\/]*)
12195  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
12196  ;;
12197  *)
12198  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12199for as_dir in $PATH
12200do
12201  IFS=$as_save_IFS
12202  test -z "$as_dir" && as_dir=.
12203    for ac_exec_ext in '' $ac_executable_extensions; do
12204  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12205    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
12206    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12207    break 2
12208  fi
12209done
12210  done
12211IFS=$as_save_IFS
12212
12213  ;;
12214esac
12215fi
12216FGREP=$ac_cv_path_FGREP
12217if test -n "$FGREP"; then
12218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
12219$as_echo "$FGREP" >&6; }
12220else
12221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12222$as_echo "no" >&6; }
12223fi
12224
12225
12226        if test "x$FGREP" = x; then
12227          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12228        fi
12229      else
12230        # Otherwise we believe it is a complete path. Use it as it is.
12231        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
12232$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
12233        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
12234$as_echo_n "checking for FGREP... " >&6; }
12235        if test ! -x "$tool_specified"; then
12236          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12237$as_echo "not found" >&6; }
12238          as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12239        fi
12240        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12241$as_echo "$tool_specified" >&6; }
12242      fi
12243    fi
12244  fi
12245
12246
12247  if test "x$FGREP" = x; then
12248    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
12249  fi
12250
12251
12252
12253
12254  # Publish this variable in the help.
12255
12256
12257  if test "x$SED" = x; then
12258    # The variable is not set by user, try to locate tool using the code snippet
12259    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12260$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12261if ${ac_cv_path_SED+:} false; then :
12262  $as_echo_n "(cached) " >&6
12263else
12264            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12265     for ac_i in 1 2 3 4 5 6 7; do
12266       ac_script="$ac_script$as_nl$ac_script"
12267     done
12268     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12269     { ac_script=; unset ac_script;}
12270     if test -z "$SED"; then
12271  ac_path_SED_found=false
12272  # Loop through the user's path and test for each of PROGNAME-LIST
12273  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12274for as_dir in $PATH
12275do
12276  IFS=$as_save_IFS
12277  test -z "$as_dir" && as_dir=.
12278    for ac_prog in sed gsed; do
12279    for ac_exec_ext in '' $ac_executable_extensions; do
12280      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12281      as_fn_executable_p "$ac_path_SED" || continue
12282# Check for GNU ac_path_SED and select it if it is found.
12283  # Check for GNU $ac_path_SED
12284case `"$ac_path_SED" --version 2>&1` in
12285*GNU*)
12286  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12287*)
12288  ac_count=0
12289  $as_echo_n 0123456789 >"conftest.in"
12290  while :
12291  do
12292    cat "conftest.in" "conftest.in" >"conftest.tmp"
12293    mv "conftest.tmp" "conftest.in"
12294    cp "conftest.in" "conftest.nl"
12295    $as_echo '' >> "conftest.nl"
12296    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12297    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12298    as_fn_arith $ac_count + 1 && ac_count=$as_val
12299    if test $ac_count -gt ${ac_path_SED_max-0}; then
12300      # Best one so far, save it but keep looking for a better one
12301      ac_cv_path_SED="$ac_path_SED"
12302      ac_path_SED_max=$ac_count
12303    fi
12304    # 10*(2^10) chars as input seems more than enough
12305    test $ac_count -gt 10 && break
12306  done
12307  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12308esac
12309
12310      $ac_path_SED_found && break 3
12311    done
12312  done
12313  done
12314IFS=$as_save_IFS
12315  if test -z "$ac_cv_path_SED"; then
12316    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12317  fi
12318else
12319  ac_cv_path_SED=$SED
12320fi
12321
12322fi
12323{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12324$as_echo "$ac_cv_path_SED" >&6; }
12325 SED="$ac_cv_path_SED"
12326  rm -f conftest.sed
12327
12328  else
12329    # The variable is set, but is it from the command line or the environment?
12330
12331    # Try to remove the string !SED! from our list.
12332    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
12333    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12334      # If it failed, the variable was not from the command line. Ignore it,
12335      # but warn the user (except for BASH, which is always set by the calling BASH).
12336      if test "xSED" != xBASH; then
12337        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
12338$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
12339      fi
12340      # Try to locate tool using the code snippet
12341      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12342$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12343if ${ac_cv_path_SED+:} false; then :
12344  $as_echo_n "(cached) " >&6
12345else
12346            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12347     for ac_i in 1 2 3 4 5 6 7; do
12348       ac_script="$ac_script$as_nl$ac_script"
12349     done
12350     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12351     { ac_script=; unset ac_script;}
12352     if test -z "$SED"; then
12353  ac_path_SED_found=false
12354  # Loop through the user's path and test for each of PROGNAME-LIST
12355  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12356for as_dir in $PATH
12357do
12358  IFS=$as_save_IFS
12359  test -z "$as_dir" && as_dir=.
12360    for ac_prog in sed gsed; do
12361    for ac_exec_ext in '' $ac_executable_extensions; do
12362      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12363      as_fn_executable_p "$ac_path_SED" || continue
12364# Check for GNU ac_path_SED and select it if it is found.
12365  # Check for GNU $ac_path_SED
12366case `"$ac_path_SED" --version 2>&1` in
12367*GNU*)
12368  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12369*)
12370  ac_count=0
12371  $as_echo_n 0123456789 >"conftest.in"
12372  while :
12373  do
12374    cat "conftest.in" "conftest.in" >"conftest.tmp"
12375    mv "conftest.tmp" "conftest.in"
12376    cp "conftest.in" "conftest.nl"
12377    $as_echo '' >> "conftest.nl"
12378    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12379    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12380    as_fn_arith $ac_count + 1 && ac_count=$as_val
12381    if test $ac_count -gt ${ac_path_SED_max-0}; then
12382      # Best one so far, save it but keep looking for a better one
12383      ac_cv_path_SED="$ac_path_SED"
12384      ac_path_SED_max=$ac_count
12385    fi
12386    # 10*(2^10) chars as input seems more than enough
12387    test $ac_count -gt 10 && break
12388  done
12389  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12390esac
12391
12392      $ac_path_SED_found && break 3
12393    done
12394  done
12395  done
12396IFS=$as_save_IFS
12397  if test -z "$ac_cv_path_SED"; then
12398    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12399  fi
12400else
12401  ac_cv_path_SED=$SED
12402fi
12403
12404fi
12405{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12406$as_echo "$ac_cv_path_SED" >&6; }
12407 SED="$ac_cv_path_SED"
12408  rm -f conftest.sed
12409
12410    else
12411      # If it succeeded, then it was overridden by the user. We will use it
12412      # for the tool.
12413
12414      # First remove it from the list of overridden variables, so we can test
12415      # for unknown variables in the end.
12416      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12417
12418      # Check if the provided tool contains a complete path.
12419      tool_specified="$SED"
12420      tool_basename="${tool_specified##*/}"
12421      if test "x$tool_basename" = "x$tool_specified"; then
12422        # A command without a complete path is provided, search $PATH.
12423        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
12424$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
12425        # Extract the first word of "$tool_basename", so it can be a program name with args.
12426set dummy $tool_basename; ac_word=$2
12427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12428$as_echo_n "checking for $ac_word... " >&6; }
12429if ${ac_cv_path_SED+:} false; then :
12430  $as_echo_n "(cached) " >&6
12431else
12432  case $SED in
12433  [\\/]* | ?:[\\/]*)
12434  ac_cv_path_SED="$SED" # Let the user override the test with a path.
12435  ;;
12436  *)
12437  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12438for as_dir in $PATH
12439do
12440  IFS=$as_save_IFS
12441  test -z "$as_dir" && as_dir=.
12442    for ac_exec_ext in '' $ac_executable_extensions; do
12443  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12444    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
12445    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12446    break 2
12447  fi
12448done
12449  done
12450IFS=$as_save_IFS
12451
12452  ;;
12453esac
12454fi
12455SED=$ac_cv_path_SED
12456if test -n "$SED"; then
12457  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
12458$as_echo "$SED" >&6; }
12459else
12460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12461$as_echo "no" >&6; }
12462fi
12463
12464
12465        if test "x$SED" = x; then
12466          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12467        fi
12468      else
12469        # Otherwise we believe it is a complete path. Use it as it is.
12470        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
12471$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
12472        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
12473$as_echo_n "checking for SED... " >&6; }
12474        if test ! -x "$tool_specified"; then
12475          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12476$as_echo "not found" >&6; }
12477          as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
12478        fi
12479        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12480$as_echo "$tool_specified" >&6; }
12481      fi
12482    fi
12483  fi
12484
12485
12486  if test "x$SED" = x; then
12487    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
12488  fi
12489
12490
12491
12492  # Always force rm.
12493  RM="$RM -f"
12494
12495  # pwd behaves differently on various platforms and some don't support the -L flag.
12496  # Always use the bash builtin pwd to get uniform behavior.
12497  THEPWDCMD=pwd
12498
12499  # These are not required on all platforms
12500
12501
12502  # Publish this variable in the help.
12503
12504
12505  if test "x$CYGPATH" = x; then
12506    # The variable is not set by user, try to locate tool using the code snippet
12507    for ac_prog in cygpath
12508do
12509  # Extract the first word of "$ac_prog", so it can be a program name with args.
12510set dummy $ac_prog; ac_word=$2
12511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12512$as_echo_n "checking for $ac_word... " >&6; }
12513if ${ac_cv_path_CYGPATH+:} false; then :
12514  $as_echo_n "(cached) " >&6
12515else
12516  case $CYGPATH in
12517  [\\/]* | ?:[\\/]*)
12518  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12519  ;;
12520  *)
12521  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12522for as_dir in $PATH
12523do
12524  IFS=$as_save_IFS
12525  test -z "$as_dir" && as_dir=.
12526    for ac_exec_ext in '' $ac_executable_extensions; do
12527  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12528    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12529    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12530    break 2
12531  fi
12532done
12533  done
12534IFS=$as_save_IFS
12535
12536  ;;
12537esac
12538fi
12539CYGPATH=$ac_cv_path_CYGPATH
12540if test -n "$CYGPATH"; then
12541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12542$as_echo "$CYGPATH" >&6; }
12543else
12544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12545$as_echo "no" >&6; }
12546fi
12547
12548
12549  test -n "$CYGPATH" && break
12550done
12551
12552  else
12553    # The variable is set, but is it from the command line or the environment?
12554
12555    # Try to remove the string !CYGPATH! from our list.
12556    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
12557    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12558      # If it failed, the variable was not from the command line. Ignore it,
12559      # but warn the user (except for BASH, which is always set by the calling BASH).
12560      if test "xCYGPATH" != xBASH; then
12561        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
12562$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
12563      fi
12564      # Try to locate tool using the code snippet
12565      for ac_prog in cygpath
12566do
12567  # Extract the first word of "$ac_prog", so it can be a program name with args.
12568set dummy $ac_prog; ac_word=$2
12569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12570$as_echo_n "checking for $ac_word... " >&6; }
12571if ${ac_cv_path_CYGPATH+:} false; then :
12572  $as_echo_n "(cached) " >&6
12573else
12574  case $CYGPATH in
12575  [\\/]* | ?:[\\/]*)
12576  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12577  ;;
12578  *)
12579  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12580for as_dir in $PATH
12581do
12582  IFS=$as_save_IFS
12583  test -z "$as_dir" && as_dir=.
12584    for ac_exec_ext in '' $ac_executable_extensions; do
12585  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12586    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12587    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12588    break 2
12589  fi
12590done
12591  done
12592IFS=$as_save_IFS
12593
12594  ;;
12595esac
12596fi
12597CYGPATH=$ac_cv_path_CYGPATH
12598if test -n "$CYGPATH"; then
12599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12600$as_echo "$CYGPATH" >&6; }
12601else
12602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12603$as_echo "no" >&6; }
12604fi
12605
12606
12607  test -n "$CYGPATH" && break
12608done
12609
12610    else
12611      # If it succeeded, then it was overridden by the user. We will use it
12612      # for the tool.
12613
12614      # First remove it from the list of overridden variables, so we can test
12615      # for unknown variables in the end.
12616      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12617
12618      # Check if the provided tool contains a complete path.
12619      tool_specified="$CYGPATH"
12620      tool_basename="${tool_specified##*/}"
12621      if test "x$tool_basename" = "x$tool_specified"; then
12622        # A command without a complete path is provided, search $PATH.
12623        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
12624$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
12625        # Extract the first word of "$tool_basename", so it can be a program name with args.
12626set dummy $tool_basename; ac_word=$2
12627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12628$as_echo_n "checking for $ac_word... " >&6; }
12629if ${ac_cv_path_CYGPATH+:} false; then :
12630  $as_echo_n "(cached) " >&6
12631else
12632  case $CYGPATH in
12633  [\\/]* | ?:[\\/]*)
12634  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12635  ;;
12636  *)
12637  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12638for as_dir in $PATH
12639do
12640  IFS=$as_save_IFS
12641  test -z "$as_dir" && as_dir=.
12642    for ac_exec_ext in '' $ac_executable_extensions; do
12643  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12644    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12645    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12646    break 2
12647  fi
12648done
12649  done
12650IFS=$as_save_IFS
12651
12652  ;;
12653esac
12654fi
12655CYGPATH=$ac_cv_path_CYGPATH
12656if test -n "$CYGPATH"; then
12657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12658$as_echo "$CYGPATH" >&6; }
12659else
12660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12661$as_echo "no" >&6; }
12662fi
12663
12664
12665        if test "x$CYGPATH" = x; then
12666          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12667        fi
12668      else
12669        # Otherwise we believe it is a complete path. Use it as it is.
12670        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
12671$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
12672        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
12673$as_echo_n "checking for CYGPATH... " >&6; }
12674        if test ! -x "$tool_specified"; then
12675          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12676$as_echo "not found" >&6; }
12677          as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
12678        fi
12679        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12680$as_echo "$tool_specified" >&6; }
12681      fi
12682    fi
12683  fi
12684
12685
12686
12687
12688  # Publish this variable in the help.
12689
12690
12691  if test "x$READLINK" = x; then
12692    # The variable is not set by user, try to locate tool using the code snippet
12693    for ac_prog in greadlink readlink
12694do
12695  # Extract the first word of "$ac_prog", so it can be a program name with args.
12696set dummy $ac_prog; ac_word=$2
12697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12698$as_echo_n "checking for $ac_word... " >&6; }
12699if ${ac_cv_path_READLINK+:} false; then :
12700  $as_echo_n "(cached) " >&6
12701else
12702  case $READLINK in
12703  [\\/]* | ?:[\\/]*)
12704  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12705  ;;
12706  *)
12707  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12708for as_dir in $PATH
12709do
12710  IFS=$as_save_IFS
12711  test -z "$as_dir" && as_dir=.
12712    for ac_exec_ext in '' $ac_executable_extensions; do
12713  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12714    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12715    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12716    break 2
12717  fi
12718done
12719  done
12720IFS=$as_save_IFS
12721
12722  ;;
12723esac
12724fi
12725READLINK=$ac_cv_path_READLINK
12726if test -n "$READLINK"; then
12727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12728$as_echo "$READLINK" >&6; }
12729else
12730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12731$as_echo "no" >&6; }
12732fi
12733
12734
12735  test -n "$READLINK" && break
12736done
12737
12738  else
12739    # The variable is set, but is it from the command line or the environment?
12740
12741    # Try to remove the string !READLINK! from our list.
12742    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
12743    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12744      # If it failed, the variable was not from the command line. Ignore it,
12745      # but warn the user (except for BASH, which is always set by the calling BASH).
12746      if test "xREADLINK" != xBASH; then
12747        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
12748$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
12749      fi
12750      # Try to locate tool using the code snippet
12751      for ac_prog in greadlink readlink
12752do
12753  # Extract the first word of "$ac_prog", so it can be a program name with args.
12754set dummy $ac_prog; ac_word=$2
12755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12756$as_echo_n "checking for $ac_word... " >&6; }
12757if ${ac_cv_path_READLINK+:} false; then :
12758  $as_echo_n "(cached) " >&6
12759else
12760  case $READLINK in
12761  [\\/]* | ?:[\\/]*)
12762  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12763  ;;
12764  *)
12765  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12766for as_dir in $PATH
12767do
12768  IFS=$as_save_IFS
12769  test -z "$as_dir" && as_dir=.
12770    for ac_exec_ext in '' $ac_executable_extensions; do
12771  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12772    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12773    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12774    break 2
12775  fi
12776done
12777  done
12778IFS=$as_save_IFS
12779
12780  ;;
12781esac
12782fi
12783READLINK=$ac_cv_path_READLINK
12784if test -n "$READLINK"; then
12785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12786$as_echo "$READLINK" >&6; }
12787else
12788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12789$as_echo "no" >&6; }
12790fi
12791
12792
12793  test -n "$READLINK" && break
12794done
12795
12796    else
12797      # If it succeeded, then it was overridden by the user. We will use it
12798      # for the tool.
12799
12800      # First remove it from the list of overridden variables, so we can test
12801      # for unknown variables in the end.
12802      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12803
12804      # Check if the provided tool contains a complete path.
12805      tool_specified="$READLINK"
12806      tool_basename="${tool_specified##*/}"
12807      if test "x$tool_basename" = "x$tool_specified"; then
12808        # A command without a complete path is provided, search $PATH.
12809        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
12810$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
12811        # Extract the first word of "$tool_basename", so it can be a program name with args.
12812set dummy $tool_basename; ac_word=$2
12813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12814$as_echo_n "checking for $ac_word... " >&6; }
12815if ${ac_cv_path_READLINK+:} false; then :
12816  $as_echo_n "(cached) " >&6
12817else
12818  case $READLINK in
12819  [\\/]* | ?:[\\/]*)
12820  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12821  ;;
12822  *)
12823  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12824for as_dir in $PATH
12825do
12826  IFS=$as_save_IFS
12827  test -z "$as_dir" && as_dir=.
12828    for ac_exec_ext in '' $ac_executable_extensions; do
12829  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12830    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12831    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12832    break 2
12833  fi
12834done
12835  done
12836IFS=$as_save_IFS
12837
12838  ;;
12839esac
12840fi
12841READLINK=$ac_cv_path_READLINK
12842if test -n "$READLINK"; then
12843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12844$as_echo "$READLINK" >&6; }
12845else
12846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12847$as_echo "no" >&6; }
12848fi
12849
12850
12851        if test "x$READLINK" = x; then
12852          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12853        fi
12854      else
12855        # Otherwise we believe it is a complete path. Use it as it is.
12856        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
12857$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
12858        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
12859$as_echo_n "checking for READLINK... " >&6; }
12860        if test ! -x "$tool_specified"; then
12861          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12862$as_echo "not found" >&6; }
12863          as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
12864        fi
12865        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12866$as_echo "$tool_specified" >&6; }
12867      fi
12868    fi
12869  fi
12870
12871
12872
12873
12874  # Publish this variable in the help.
12875
12876
12877  if test "x$DF" = x; then
12878    # The variable is not set by user, try to locate tool using the code snippet
12879    for ac_prog in df
12880do
12881  # Extract the first word of "$ac_prog", so it can be a program name with args.
12882set dummy $ac_prog; ac_word=$2
12883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12884$as_echo_n "checking for $ac_word... " >&6; }
12885if ${ac_cv_path_DF+:} false; then :
12886  $as_echo_n "(cached) " >&6
12887else
12888  case $DF in
12889  [\\/]* | ?:[\\/]*)
12890  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12891  ;;
12892  *)
12893  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12894for as_dir in $PATH
12895do
12896  IFS=$as_save_IFS
12897  test -z "$as_dir" && as_dir=.
12898    for ac_exec_ext in '' $ac_executable_extensions; do
12899  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12900    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12901    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12902    break 2
12903  fi
12904done
12905  done
12906IFS=$as_save_IFS
12907
12908  ;;
12909esac
12910fi
12911DF=$ac_cv_path_DF
12912if test -n "$DF"; then
12913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12914$as_echo "$DF" >&6; }
12915else
12916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12917$as_echo "no" >&6; }
12918fi
12919
12920
12921  test -n "$DF" && break
12922done
12923
12924  else
12925    # The variable is set, but is it from the command line or the environment?
12926
12927    # Try to remove the string !DF! from our list.
12928    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
12929    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12930      # If it failed, the variable was not from the command line. Ignore it,
12931      # but warn the user (except for BASH, which is always set by the calling BASH).
12932      if test "xDF" != xBASH; then
12933        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
12934$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
12935      fi
12936      # Try to locate tool using the code snippet
12937      for ac_prog in df
12938do
12939  # Extract the first word of "$ac_prog", so it can be a program name with args.
12940set dummy $ac_prog; ac_word=$2
12941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12942$as_echo_n "checking for $ac_word... " >&6; }
12943if ${ac_cv_path_DF+:} false; then :
12944  $as_echo_n "(cached) " >&6
12945else
12946  case $DF in
12947  [\\/]* | ?:[\\/]*)
12948  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12949  ;;
12950  *)
12951  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12952for as_dir in $PATH
12953do
12954  IFS=$as_save_IFS
12955  test -z "$as_dir" && as_dir=.
12956    for ac_exec_ext in '' $ac_executable_extensions; do
12957  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12958    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12959    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12960    break 2
12961  fi
12962done
12963  done
12964IFS=$as_save_IFS
12965
12966  ;;
12967esac
12968fi
12969DF=$ac_cv_path_DF
12970if test -n "$DF"; then
12971  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12972$as_echo "$DF" >&6; }
12973else
12974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12975$as_echo "no" >&6; }
12976fi
12977
12978
12979  test -n "$DF" && break
12980done
12981
12982    else
12983      # If it succeeded, then it was overridden by the user. We will use it
12984      # for the tool.
12985
12986      # First remove it from the list of overridden variables, so we can test
12987      # for unknown variables in the end.
12988      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12989
12990      # Check if the provided tool contains a complete path.
12991      tool_specified="$DF"
12992      tool_basename="${tool_specified##*/}"
12993      if test "x$tool_basename" = "x$tool_specified"; then
12994        # A command without a complete path is provided, search $PATH.
12995        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
12996$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
12997        # Extract the first word of "$tool_basename", so it can be a program name with args.
12998set dummy $tool_basename; ac_word=$2
12999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13000$as_echo_n "checking for $ac_word... " >&6; }
13001if ${ac_cv_path_DF+:} false; then :
13002  $as_echo_n "(cached) " >&6
13003else
13004  case $DF in
13005  [\\/]* | ?:[\\/]*)
13006  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13007  ;;
13008  *)
13009  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13010for as_dir in $PATH
13011do
13012  IFS=$as_save_IFS
13013  test -z "$as_dir" && as_dir=.
13014    for ac_exec_ext in '' $ac_executable_extensions; do
13015  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13016    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13017    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13018    break 2
13019  fi
13020done
13021  done
13022IFS=$as_save_IFS
13023
13024  ;;
13025esac
13026fi
13027DF=$ac_cv_path_DF
13028if test -n "$DF"; then
13029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13030$as_echo "$DF" >&6; }
13031else
13032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13033$as_echo "no" >&6; }
13034fi
13035
13036
13037        if test "x$DF" = x; then
13038          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13039        fi
13040      else
13041        # Otherwise we believe it is a complete path. Use it as it is.
13042        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
13043$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
13044        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
13045$as_echo_n "checking for DF... " >&6; }
13046        if test ! -x "$tool_specified"; then
13047          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13048$as_echo "not found" >&6; }
13049          as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
13050        fi
13051        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13052$as_echo "$tool_specified" >&6; }
13053      fi
13054    fi
13055  fi
13056
13057
13058
13059
13060  # Publish this variable in the help.
13061
13062
13063  if test "x$SETFILE" = x; then
13064    # The variable is not set by user, try to locate tool using the code snippet
13065    for ac_prog in SetFile
13066do
13067  # Extract the first word of "$ac_prog", so it can be a program name with args.
13068set dummy $ac_prog; ac_word=$2
13069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13070$as_echo_n "checking for $ac_word... " >&6; }
13071if ${ac_cv_path_SETFILE+:} false; then :
13072  $as_echo_n "(cached) " >&6
13073else
13074  case $SETFILE in
13075  [\\/]* | ?:[\\/]*)
13076  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13077  ;;
13078  *)
13079  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13080for as_dir in $PATH
13081do
13082  IFS=$as_save_IFS
13083  test -z "$as_dir" && as_dir=.
13084    for ac_exec_ext in '' $ac_executable_extensions; do
13085  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13086    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13087    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13088    break 2
13089  fi
13090done
13091  done
13092IFS=$as_save_IFS
13093
13094  ;;
13095esac
13096fi
13097SETFILE=$ac_cv_path_SETFILE
13098if test -n "$SETFILE"; then
13099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13100$as_echo "$SETFILE" >&6; }
13101else
13102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13103$as_echo "no" >&6; }
13104fi
13105
13106
13107  test -n "$SETFILE" && break
13108done
13109
13110  else
13111    # The variable is set, but is it from the command line or the environment?
13112
13113    # Try to remove the string !SETFILE! from our list.
13114    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
13115    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13116      # If it failed, the variable was not from the command line. Ignore it,
13117      # but warn the user (except for BASH, which is always set by the calling BASH).
13118      if test "xSETFILE" != xBASH; then
13119        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
13120$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
13121      fi
13122      # Try to locate tool using the code snippet
13123      for ac_prog in SetFile
13124do
13125  # Extract the first word of "$ac_prog", so it can be a program name with args.
13126set dummy $ac_prog; ac_word=$2
13127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13128$as_echo_n "checking for $ac_word... " >&6; }
13129if ${ac_cv_path_SETFILE+:} false; then :
13130  $as_echo_n "(cached) " >&6
13131else
13132  case $SETFILE in
13133  [\\/]* | ?:[\\/]*)
13134  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13135  ;;
13136  *)
13137  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13138for as_dir in $PATH
13139do
13140  IFS=$as_save_IFS
13141  test -z "$as_dir" && as_dir=.
13142    for ac_exec_ext in '' $ac_executable_extensions; do
13143  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13144    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13145    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13146    break 2
13147  fi
13148done
13149  done
13150IFS=$as_save_IFS
13151
13152  ;;
13153esac
13154fi
13155SETFILE=$ac_cv_path_SETFILE
13156if test -n "$SETFILE"; then
13157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13158$as_echo "$SETFILE" >&6; }
13159else
13160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13161$as_echo "no" >&6; }
13162fi
13163
13164
13165  test -n "$SETFILE" && break
13166done
13167
13168    else
13169      # If it succeeded, then it was overridden by the user. We will use it
13170      # for the tool.
13171
13172      # First remove it from the list of overridden variables, so we can test
13173      # for unknown variables in the end.
13174      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13175
13176      # Check if the provided tool contains a complete path.
13177      tool_specified="$SETFILE"
13178      tool_basename="${tool_specified##*/}"
13179      if test "x$tool_basename" = "x$tool_specified"; then
13180        # A command without a complete path is provided, search $PATH.
13181        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
13182$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
13183        # Extract the first word of "$tool_basename", so it can be a program name with args.
13184set dummy $tool_basename; ac_word=$2
13185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13186$as_echo_n "checking for $ac_word... " >&6; }
13187if ${ac_cv_path_SETFILE+:} false; then :
13188  $as_echo_n "(cached) " >&6
13189else
13190  case $SETFILE in
13191  [\\/]* | ?:[\\/]*)
13192  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13193  ;;
13194  *)
13195  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13196for as_dir in $PATH
13197do
13198  IFS=$as_save_IFS
13199  test -z "$as_dir" && as_dir=.
13200    for ac_exec_ext in '' $ac_executable_extensions; do
13201  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13202    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13203    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13204    break 2
13205  fi
13206done
13207  done
13208IFS=$as_save_IFS
13209
13210  ;;
13211esac
13212fi
13213SETFILE=$ac_cv_path_SETFILE
13214if test -n "$SETFILE"; then
13215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13216$as_echo "$SETFILE" >&6; }
13217else
13218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13219$as_echo "no" >&6; }
13220fi
13221
13222
13223        if test "x$SETFILE" = x; then
13224          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13225        fi
13226      else
13227        # Otherwise we believe it is a complete path. Use it as it is.
13228        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
13229$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
13230        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
13231$as_echo_n "checking for SETFILE... " >&6; }
13232        if test ! -x "$tool_specified"; then
13233          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13234$as_echo "not found" >&6; }
13235          as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
13236        fi
13237        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13238$as_echo "$tool_specified" >&6; }
13239      fi
13240    fi
13241  fi
13242
13243
13244
13245
13246  # Publish this variable in the help.
13247
13248
13249  if test "x$CPIO" = x; then
13250    # The variable is not set by user, try to locate tool using the code snippet
13251    for ac_prog in cpio bsdcpio
13252do
13253  # Extract the first word of "$ac_prog", so it can be a program name with args.
13254set dummy $ac_prog; ac_word=$2
13255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13256$as_echo_n "checking for $ac_word... " >&6; }
13257if ${ac_cv_path_CPIO+:} false; then :
13258  $as_echo_n "(cached) " >&6
13259else
13260  case $CPIO in
13261  [\\/]* | ?:[\\/]*)
13262  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13263  ;;
13264  *)
13265  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13266for as_dir in $PATH
13267do
13268  IFS=$as_save_IFS
13269  test -z "$as_dir" && as_dir=.
13270    for ac_exec_ext in '' $ac_executable_extensions; do
13271  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13272    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13273    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13274    break 2
13275  fi
13276done
13277  done
13278IFS=$as_save_IFS
13279
13280  ;;
13281esac
13282fi
13283CPIO=$ac_cv_path_CPIO
13284if test -n "$CPIO"; then
13285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13286$as_echo "$CPIO" >&6; }
13287else
13288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13289$as_echo "no" >&6; }
13290fi
13291
13292
13293  test -n "$CPIO" && break
13294done
13295
13296  else
13297    # The variable is set, but is it from the command line or the environment?
13298
13299    # Try to remove the string !CPIO! from our list.
13300    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
13301    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13302      # If it failed, the variable was not from the command line. Ignore it,
13303      # but warn the user (except for BASH, which is always set by the calling BASH).
13304      if test "xCPIO" != xBASH; then
13305        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
13306$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
13307      fi
13308      # Try to locate tool using the code snippet
13309      for ac_prog in cpio bsdcpio
13310do
13311  # Extract the first word of "$ac_prog", so it can be a program name with args.
13312set dummy $ac_prog; ac_word=$2
13313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13314$as_echo_n "checking for $ac_word... " >&6; }
13315if ${ac_cv_path_CPIO+:} false; then :
13316  $as_echo_n "(cached) " >&6
13317else
13318  case $CPIO in
13319  [\\/]* | ?:[\\/]*)
13320  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13321  ;;
13322  *)
13323  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13324for as_dir in $PATH
13325do
13326  IFS=$as_save_IFS
13327  test -z "$as_dir" && as_dir=.
13328    for ac_exec_ext in '' $ac_executable_extensions; do
13329  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13330    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13331    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13332    break 2
13333  fi
13334done
13335  done
13336IFS=$as_save_IFS
13337
13338  ;;
13339esac
13340fi
13341CPIO=$ac_cv_path_CPIO
13342if test -n "$CPIO"; then
13343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13344$as_echo "$CPIO" >&6; }
13345else
13346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13347$as_echo "no" >&6; }
13348fi
13349
13350
13351  test -n "$CPIO" && break
13352done
13353
13354    else
13355      # If it succeeded, then it was overridden by the user. We will use it
13356      # for the tool.
13357
13358      # First remove it from the list of overridden variables, so we can test
13359      # for unknown variables in the end.
13360      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13361
13362      # Check if the provided tool contains a complete path.
13363      tool_specified="$CPIO"
13364      tool_basename="${tool_specified##*/}"
13365      if test "x$tool_basename" = "x$tool_specified"; then
13366        # A command without a complete path is provided, search $PATH.
13367        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
13368$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
13369        # Extract the first word of "$tool_basename", so it can be a program name with args.
13370set dummy $tool_basename; ac_word=$2
13371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13372$as_echo_n "checking for $ac_word... " >&6; }
13373if ${ac_cv_path_CPIO+:} false; then :
13374  $as_echo_n "(cached) " >&6
13375else
13376  case $CPIO in
13377  [\\/]* | ?:[\\/]*)
13378  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13379  ;;
13380  *)
13381  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13382for as_dir in $PATH
13383do
13384  IFS=$as_save_IFS
13385  test -z "$as_dir" && as_dir=.
13386    for ac_exec_ext in '' $ac_executable_extensions; do
13387  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13388    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13389    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13390    break 2
13391  fi
13392done
13393  done
13394IFS=$as_save_IFS
13395
13396  ;;
13397esac
13398fi
13399CPIO=$ac_cv_path_CPIO
13400if test -n "$CPIO"; then
13401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13402$as_echo "$CPIO" >&6; }
13403else
13404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13405$as_echo "no" >&6; }
13406fi
13407
13408
13409        if test "x$CPIO" = x; then
13410          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13411        fi
13412      else
13413        # Otherwise we believe it is a complete path. Use it as it is.
13414        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
13415$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
13416        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
13417$as_echo_n "checking for CPIO... " >&6; }
13418        if test ! -x "$tool_specified"; then
13419          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13420$as_echo "not found" >&6; }
13421          as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
13422        fi
13423        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13424$as_echo "$tool_specified" >&6; }
13425      fi
13426    fi
13427  fi
13428
13429
13430
13431
13432# Now we can determine OpenJDK build and target platforms. This is required to
13433# have early on.
13434# Make sure we can run config.sub.
13435$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
13436  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
13437
13438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
13439$as_echo_n "checking build system type... " >&6; }
13440if ${ac_cv_build+:} false; then :
13441  $as_echo_n "(cached) " >&6
13442else
13443  ac_build_alias=$build_alias
13444test "x$ac_build_alias" = x &&
13445  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
13446test "x$ac_build_alias" = x &&
13447  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
13448ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
13449  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
13450
13451fi
13452{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
13453$as_echo "$ac_cv_build" >&6; }
13454case $ac_cv_build in
13455*-*-*) ;;
13456*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
13457esac
13458build=$ac_cv_build
13459ac_save_IFS=$IFS; IFS='-'
13460set x $ac_cv_build
13461shift
13462build_cpu=$1
13463build_vendor=$2
13464shift; shift
13465# Remember, the first character of IFS is used to create $*,
13466# except with old shells:
13467build_os=$*
13468IFS=$ac_save_IFS
13469case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
13470
13471
13472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
13473$as_echo_n "checking host system type... " >&6; }
13474if ${ac_cv_host+:} false; then :
13475  $as_echo_n "(cached) " >&6
13476else
13477  if test "x$host_alias" = x; then
13478  ac_cv_host=$ac_cv_build
13479else
13480  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
13481    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
13482fi
13483
13484fi
13485{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
13486$as_echo "$ac_cv_host" >&6; }
13487case $ac_cv_host in
13488*-*-*) ;;
13489*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
13490esac
13491host=$ac_cv_host
13492ac_save_IFS=$IFS; IFS='-'
13493set x $ac_cv_host
13494shift
13495host_cpu=$1
13496host_vendor=$2
13497shift; shift
13498# Remember, the first character of IFS is used to create $*,
13499# except with old shells:
13500host_os=$*
13501IFS=$ac_save_IFS
13502case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
13503
13504
13505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
13506$as_echo_n "checking target system type... " >&6; }
13507if ${ac_cv_target+:} false; then :
13508  $as_echo_n "(cached) " >&6
13509else
13510  if test "x$target_alias" = x; then
13511  ac_cv_target=$ac_cv_host
13512else
13513  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
13514    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
13515fi
13516
13517fi
13518{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
13519$as_echo "$ac_cv_target" >&6; }
13520case $ac_cv_target in
13521*-*-*) ;;
13522*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
13523esac
13524target=$ac_cv_target
13525ac_save_IFS=$IFS; IFS='-'
13526set x $ac_cv_target
13527shift
13528target_cpu=$1
13529target_vendor=$2
13530shift; shift
13531# Remember, the first character of IFS is used to create $*,
13532# except with old shells:
13533target_os=$*
13534IFS=$ac_save_IFS
13535case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
13536
13537
13538# The aliases save the names the user supplied, while $host etc.
13539# will get canonicalized.
13540test -n "$target_alias" &&
13541  test "$program_prefix$program_suffix$program_transform_name" = \
13542    NONENONEs,x,x, &&
13543  program_prefix=${target_alias}-
13544
13545  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
13546  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
13547  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
13548  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
13549  # to use the configure naming style.
13550
13551
13552
13553
13554
13555  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
13556  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
13557  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
13558  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
13559  OPENJDK_TARGET_AUTOCONF_NAME="$host"
13560  OPENJDK_BUILD_AUTOCONF_NAME="$build"
13561
13562
13563
13564  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13565
13566  case "$build_os" in
13567    *linux*)
13568      VAR_OS=linux
13569      VAR_OS_TYPE=unix
13570      ;;
13571    *solaris*)
13572      VAR_OS=solaris
13573      VAR_OS_TYPE=unix
13574      ;;
13575    *darwin*)
13576      VAR_OS=macosx
13577      VAR_OS_TYPE=unix
13578      ;;
13579    *bsd*)
13580      VAR_OS=bsd
13581      VAR_OS_TYPE=unix
13582      ;;
13583    *cygwin*)
13584      VAR_OS=windows
13585      VAR_OS_ENV=windows.cygwin
13586      ;;
13587    *mingw*)
13588      VAR_OS=windows
13589      VAR_OS_ENV=windows.msys
13590      ;;
13591    *aix*)
13592      VAR_OS=aix
13593      VAR_OS_TYPE=unix
13594      ;;
13595    *)
13596      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
13597      ;;
13598  esac
13599
13600
13601  # First argument is the cpu name from the trip/quad
13602  case "$build_cpu" in
13603    x86_64)
13604      VAR_CPU=x86_64
13605      VAR_CPU_ARCH=x86
13606      VAR_CPU_BITS=64
13607      VAR_CPU_ENDIAN=little
13608      ;;
13609    i?86)
13610      VAR_CPU=x86
13611      VAR_CPU_ARCH=x86
13612      VAR_CPU_BITS=32
13613      VAR_CPU_ENDIAN=little
13614      ;;
13615    arm*)
13616      VAR_CPU=arm
13617      VAR_CPU_ARCH=arm
13618      VAR_CPU_BITS=32
13619      VAR_CPU_ENDIAN=little
13620      ;;
13621    aarch64)
13622      VAR_CPU=aarch64
13623      VAR_CPU_ARCH=aarch64
13624      VAR_CPU_BITS=64
13625      VAR_CPU_ENDIAN=little
13626      ;;
13627    powerpc)
13628      VAR_CPU=ppc
13629      VAR_CPU_ARCH=ppc
13630      VAR_CPU_BITS=32
13631      VAR_CPU_ENDIAN=big
13632      ;;
13633    powerpc64)
13634      VAR_CPU=ppc64
13635      VAR_CPU_ARCH=ppc
13636      VAR_CPU_BITS=64
13637      VAR_CPU_ENDIAN=big
13638      ;;
13639    powerpc64le)
13640      VAR_CPU=ppc64
13641      VAR_CPU_ARCH=ppc
13642      VAR_CPU_BITS=64
13643      VAR_CPU_ENDIAN=little
13644      ;;
13645    s390)
13646      VAR_CPU=s390
13647      VAR_CPU_ARCH=s390
13648      VAR_CPU_BITS=32
13649      VAR_CPU_ENDIAN=big
13650      ;;
13651    s390x)
13652      VAR_CPU=s390x
13653      VAR_CPU_ARCH=s390
13654      VAR_CPU_BITS=64
13655      VAR_CPU_ENDIAN=big
13656      ;;
13657    sparc)
13658      VAR_CPU=sparc
13659      VAR_CPU_ARCH=sparc
13660      VAR_CPU_BITS=32
13661      VAR_CPU_ENDIAN=big
13662      ;;
13663    sparcv9|sparc64)
13664      VAR_CPU=sparcv9
13665      VAR_CPU_ARCH=sparc
13666      VAR_CPU_BITS=64
13667      VAR_CPU_ENDIAN=big
13668      ;;
13669    *)
13670      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
13671      ;;
13672  esac
13673
13674  # ..and setup our own variables. (Do this explicitely to facilitate searching)
13675  OPENJDK_BUILD_OS="$VAR_OS"
13676  if test "x$VAR_OS_TYPE" != x; then
13677    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
13678  else
13679    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
13680  fi
13681  if test "x$VAR_OS_ENV" != x; then
13682    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
13683  else
13684    OPENJDK_BUILD_OS_ENV="$VAR_OS"
13685  fi
13686  OPENJDK_BUILD_CPU="$VAR_CPU"
13687  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
13688  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
13689  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13690
13691
13692
13693
13694
13695
13696
13697
13698  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
13699$as_echo_n "checking openjdk-build os-cpu... " >&6; }
13700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
13701$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
13702
13703  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13704
13705  case "$host_os" in
13706    *linux*)
13707      VAR_OS=linux
13708      VAR_OS_TYPE=unix
13709      ;;
13710    *solaris*)
13711      VAR_OS=solaris
13712      VAR_OS_TYPE=unix
13713      ;;
13714    *darwin*)
13715      VAR_OS=macosx
13716      VAR_OS_TYPE=unix
13717      ;;
13718    *bsd*)
13719      VAR_OS=bsd
13720      VAR_OS_TYPE=unix
13721      ;;
13722    *cygwin*)
13723      VAR_OS=windows
13724      VAR_OS_ENV=windows.cygwin
13725      ;;
13726    *mingw*)
13727      VAR_OS=windows
13728      VAR_OS_ENV=windows.msys
13729      ;;
13730    *aix*)
13731      VAR_OS=aix
13732      VAR_OS_TYPE=unix
13733      ;;
13734    *)
13735      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
13736      ;;
13737  esac
13738
13739
13740  # First argument is the cpu name from the trip/quad
13741  case "$host_cpu" in
13742    x86_64)
13743      VAR_CPU=x86_64
13744      VAR_CPU_ARCH=x86
13745      VAR_CPU_BITS=64
13746      VAR_CPU_ENDIAN=little
13747      ;;
13748    i?86)
13749      VAR_CPU=x86
13750      VAR_CPU_ARCH=x86
13751      VAR_CPU_BITS=32
13752      VAR_CPU_ENDIAN=little
13753      ;;
13754    arm*)
13755      VAR_CPU=arm
13756      VAR_CPU_ARCH=arm
13757      VAR_CPU_BITS=32
13758      VAR_CPU_ENDIAN=little
13759      ;;
13760    aarch64)
13761      VAR_CPU=aarch64
13762      VAR_CPU_ARCH=aarch64
13763      VAR_CPU_BITS=64
13764      VAR_CPU_ENDIAN=little
13765      ;;
13766    powerpc)
13767      VAR_CPU=ppc
13768      VAR_CPU_ARCH=ppc
13769      VAR_CPU_BITS=32
13770      VAR_CPU_ENDIAN=big
13771      ;;
13772    powerpc64)
13773      VAR_CPU=ppc64
13774      VAR_CPU_ARCH=ppc
13775      VAR_CPU_BITS=64
13776      VAR_CPU_ENDIAN=big
13777      ;;
13778    powerpc64le)
13779      VAR_CPU=ppc64
13780      VAR_CPU_ARCH=ppc
13781      VAR_CPU_BITS=64
13782      VAR_CPU_ENDIAN=little
13783      ;;
13784    s390)
13785      VAR_CPU=s390
13786      VAR_CPU_ARCH=s390
13787      VAR_CPU_BITS=32
13788      VAR_CPU_ENDIAN=big
13789      ;;
13790    s390x)
13791      VAR_CPU=s390x
13792      VAR_CPU_ARCH=s390
13793      VAR_CPU_BITS=64
13794      VAR_CPU_ENDIAN=big
13795      ;;
13796    sparc)
13797      VAR_CPU=sparc
13798      VAR_CPU_ARCH=sparc
13799      VAR_CPU_BITS=32
13800      VAR_CPU_ENDIAN=big
13801      ;;
13802    sparcv9|sparc64)
13803      VAR_CPU=sparcv9
13804      VAR_CPU_ARCH=sparc
13805      VAR_CPU_BITS=64
13806      VAR_CPU_ENDIAN=big
13807      ;;
13808    *)
13809      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
13810      ;;
13811  esac
13812
13813  # ... and setup our own variables. (Do this explicitely to facilitate searching)
13814  OPENJDK_TARGET_OS="$VAR_OS"
13815  if test "x$VAR_OS_TYPE" != x; then
13816    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
13817  else
13818    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
13819  fi
13820  if test "x$VAR_OS_ENV" != x; then
13821    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
13822  else
13823    OPENJDK_TARGET_OS_ENV="$VAR_OS"
13824  fi
13825  OPENJDK_TARGET_CPU="$VAR_CPU"
13826  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
13827  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
13828  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13829
13830
13831
13832
13833
13834
13835
13836
13837  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
13838$as_echo_n "checking openjdk-target os-cpu... " >&6; }
13839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
13840$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
13841
13842
13843
13844# Check whether --with-target-bits was given.
13845if test "${with_target_bits+set}" = set; then :
13846  withval=$with_target_bits;
13847fi
13848
13849
13850  # We have three types of compiles:
13851  # native  == normal compilation, target system == build system
13852  # cross   == traditional cross compilation, target system != build system; special toolchain needed
13853  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
13854  #
13855  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
13856    # We're doing a proper cross-compilation
13857    COMPILE_TYPE="cross"
13858  else
13859    COMPILE_TYPE="native"
13860  fi
13861
13862  if test "x$with_target_bits" != x; then
13863    if test "x$COMPILE_TYPE" = "xcross"; then
13864      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
13865    fi
13866
13867    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13868      # A reduced build is requested
13869      COMPILE_TYPE="reduced"
13870      OPENJDK_TARGET_CPU_BITS=32
13871      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
13872        OPENJDK_TARGET_CPU=x86
13873      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
13874        OPENJDK_TARGET_CPU=sparc
13875      else
13876        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
13877      fi
13878    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
13879      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
13880    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
13881      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
13882$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
13883    else
13884      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
13885    fi
13886  fi
13887
13888
13889  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
13890$as_echo_n "checking compilation type... " >&6; }
13891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
13892$as_echo "$COMPILE_TYPE" >&6; }
13893
13894
13895  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
13896    REQUIRED_OS_NAME=SunOS
13897    REQUIRED_OS_VERSION=5.10
13898  fi
13899  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
13900    REQUIRED_OS_NAME=Linux
13901    REQUIRED_OS_VERSION=2.6
13902  fi
13903  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13904    REQUIRED_OS_NAME=Windows
13905    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
13906      REQUIRED_OS_VERSION=5.2
13907    else
13908      REQUIRED_OS_VERSION=5.1
13909    fi
13910  fi
13911  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
13912    REQUIRED_OS_NAME=Darwin
13913    REQUIRED_OS_VERSION=11.2
13914  fi
13915
13916
13917
13918
13919
13920  # Also store the legacy naming of the cpu.
13921  # Ie i586 and amd64 instead of x86 and x86_64
13922  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
13923  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13924    OPENJDK_TARGET_CPU_LEGACY="i586"
13925  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13926    # On all platforms except MacOSX replace x86_64 with amd64.
13927    OPENJDK_TARGET_CPU_LEGACY="amd64"
13928  fi
13929
13930
13931  # And the second legacy naming of the cpu.
13932  # Ie i386 and amd64 instead of x86 and x86_64.
13933  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
13934  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13935    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
13936  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13937    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
13938  fi
13939
13940
13941  # This is the name of the cpu (but using i386 and amd64 instead of
13942  # x86 and x86_64, respectively), preceeded by a /, to be used when
13943  # locating libraries. On macosx, it's empty, though.
13944  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
13945  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13946    OPENJDK_TARGET_CPU_LIBDIR=""
13947  fi
13948
13949
13950  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
13951  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
13952  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
13953  OPENJDK_TARGET_CPU_ISADIR=""
13954  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13955    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13956      OPENJDK_TARGET_CPU_ISADIR="/amd64"
13957    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
13958      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
13959    fi
13960  fi
13961
13962
13963  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
13964  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
13965  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
13966    # On linux only, we replace x86 with i386.
13967    OPENJDK_TARGET_CPU_OSARCH="i386"
13968  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13969    # On all platforms except macosx, we replace x86_64 with amd64.
13970    OPENJDK_TARGET_CPU_OSARCH="amd64"
13971  fi
13972
13973
13974  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
13975  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13976    OPENJDK_TARGET_CPU_JLI="i386"
13977  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13978    # On all platforms except macosx, we replace x86_64 with amd64.
13979    OPENJDK_TARGET_CPU_JLI="amd64"
13980  fi
13981  # Now setup the -D flags for building libjli.
13982  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
13983  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13984    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
13985      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
13986    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
13987      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
13988    fi
13989  fi
13990
13991
13992  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13993      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
13994  else
13995      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
13996  fi
13997
13998
13999  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14000    A_LP64="LP64:="
14001    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
14002    # unpack200.exe
14003    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
14004      ADD_LP64="-D_LP64=1"
14005    fi
14006  fi
14007  LP64=$A_LP64
14008
14009
14010  if test "x$COMPILE_TYPE" = "xcross"; then
14011    # FIXME: ... or should this include reduced builds..?
14012    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
14013  else
14014    DEFINE_CROSS_COMPILE_ARCH=""
14015  fi
14016
14017
14018  # ZERO_ARCHDEF is used to enable architecture-specific code
14019  case "${OPENJDK_TARGET_CPU}" in
14020    ppc)     ZERO_ARCHDEF=PPC32 ;;
14021    ppc64)   ZERO_ARCHDEF=PPC64 ;;
14022    s390*)   ZERO_ARCHDEF=S390  ;;
14023    sparc*)  ZERO_ARCHDEF=SPARC ;;
14024    x86_64*) ZERO_ARCHDEF=AMD64 ;;
14025    x86)     ZERO_ARCHDEF=IA32  ;;
14026    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
14027  esac
14028
14029
14030
14031
14032# Continue setting up basic stuff. Most remaining code require fundamental tools.
14033
14034  # Save the current directory this script was started from
14035  CURDIR="$PWD"
14036
14037  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
14038    PATH_SEP=";"
14039
14040  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
14041  if test $SRC_ROOT_LENGTH -gt 100; then
14042    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
14043  fi
14044
14045  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14046    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
14047$as_echo_n "checking cygwin release... " >&6; }
14048    CYGWIN_VERSION=`$UNAME -r`
14049    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
14050$as_echo "$CYGWIN_VERSION" >&6; }
14051    WINDOWS_ENV_VENDOR='cygwin'
14052    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
14053
14054    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
14055    if test "x$CYGWIN_VERSION_OLD" != x; then
14056      { $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
14057$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;}
14058      as_fn_error $? "Cannot continue" "$LINENO" 5
14059    fi
14060    if test "x$CYGPATH" = x; then
14061      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
14062    fi
14063    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
14064$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
14065    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
14066    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
14067    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
14068    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
14069    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
14070$as_echo "$CYGWIN_ROOT_PATH" >&6; }
14071    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
14072    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
14073    if test "x$test_cygdrive_prefix" = x; then
14074      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
14075    fi
14076  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14077    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
14078$as_echo_n "checking msys release... " >&6; }
14079    MSYS_VERSION=`$UNAME -r`
14080    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
14081$as_echo "$MSYS_VERSION" >&6; }
14082
14083    WINDOWS_ENV_VENDOR='msys'
14084    WINDOWS_ENV_VERSION="$MSYS_VERSION"
14085
14086    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
14087$as_echo_n "checking msys root directory as unix-style path... " >&6; }
14088    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
14089    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
14090
14091  windows_path="$MSYS_ROOT_PATH"
14092  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14093    unix_path=`$CYGPATH -u "$windows_path"`
14094    MSYS_ROOT_PATH="$unix_path"
14095  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14096    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14097    MSYS_ROOT_PATH="$unix_path"
14098  fi
14099
14100    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
14101$as_echo "$MSYS_ROOT_PATH" >&6; }
14102    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
14103  else
14104    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
14105  fi
14106
14107  # Test if windows or unix (cygwin/msys) find is first in path.
14108  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
14109$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
14110  FIND_BINARY_OUTPUT=`find --version 2>&1`
14111  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
14112    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
14113$as_echo "unix style" >&6; }
14114  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
14115    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
14116$as_echo "Windows" >&6; }
14117    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
14118$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
14119    { $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
14120$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
14121    as_fn_error $? "Cannot continue" "$LINENO" 5
14122  else
14123    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
14124$as_echo "unknown" >&6; }
14125    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
14126$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
14127  fi
14128
14129  else
14130    PATH_SEP=":"
14131  fi
14132
14133
14134  # We get the top-level directory from the supporting wrappers.
14135  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
14136$as_echo_n "checking for top-level directory... " >&6; }
14137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
14138$as_echo "$TOPDIR" >&6; }
14139
14140
14141  # Save the original version of TOPDIR for string comparisons
14142  ORIGINAL_TOPDIR="$TOPDIR"
14143
14144
14145  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
14146
14147  # Only process if variable expands to non-empty
14148
14149  if test "x$CURDIR" != x; then
14150    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14151
14152  # Input might be given as Windows format, start by converting to
14153  # unix format.
14154  path="$CURDIR"
14155  new_path=`$CYGPATH -u "$path"`
14156
14157  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14158  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14159  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14160  # "foo.exe" is OK but "foo" is an error.
14161  #
14162  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14163  # It is also a way to make sure we got the proper file name for the real test later on.
14164  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14165  if test "x$test_shortpath" = x; then
14166    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14167$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14168    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
14169  fi
14170
14171  # Call helper function which possibly converts this using DOS-style short mode.
14172  # If so, the updated path is stored in $new_path.
14173
14174  input_path="$new_path"
14175  # Check if we need to convert this using DOS-style short mode. If the path
14176  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14177  # take no chances and rewrite it.
14178  # Note: m4 eats our [], so we need to use [ and ] instead.
14179  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14180  if test "x$has_forbidden_chars" != x; then
14181    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14182    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14183    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14184    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14185      # Going to short mode and back again did indeed matter. Since short mode is
14186      # case insensitive, let's make it lowercase to improve readability.
14187      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14188      # Now convert it back to Unix-style (cygpath)
14189      input_path=`$CYGPATH -u "$shortmode_path"`
14190      new_path="$input_path"
14191    fi
14192  fi
14193
14194  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14195  if test "x$test_cygdrive_prefix" = x; then
14196    # As a simple fix, exclude /usr/bin since it's not a real path.
14197    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14198      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14199      # a path prefixed by /cygdrive for fixpath to work.
14200      new_path="$CYGWIN_ROOT_PATH$input_path"
14201    fi
14202  fi
14203
14204
14205  if test "x$path" != "x$new_path"; then
14206    CURDIR="$new_path"
14207    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14208$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14209  fi
14210
14211    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14212
14213  path="$CURDIR"
14214  has_colon=`$ECHO $path | $GREP ^.:`
14215  new_path="$path"
14216  if test "x$has_colon" = x; then
14217    # Not in mixed or Windows style, start by that.
14218    new_path=`cmd //c echo $path`
14219  fi
14220
14221
14222  input_path="$new_path"
14223  # Check if we need to convert this using DOS-style short mode. If the path
14224  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14225  # take no chances and rewrite it.
14226  # Note: m4 eats our [], so we need to use [ and ] instead.
14227  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14228  if test "x$has_forbidden_chars" != x; then
14229    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14230    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14231  fi
14232
14233
14234  windows_path="$new_path"
14235  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14236    unix_path=`$CYGPATH -u "$windows_path"`
14237    new_path="$unix_path"
14238  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14239    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14240    new_path="$unix_path"
14241  fi
14242
14243  if test "x$path" != "x$new_path"; then
14244    CURDIR="$new_path"
14245    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14246$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14247  fi
14248
14249  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14250  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14251
14252    else
14253      # We're on a unix platform. Hooray! :)
14254      path="$CURDIR"
14255      has_space=`$ECHO "$path" | $GREP " "`
14256      if test "x$has_space" != x; then
14257        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14258$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14259        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14260      fi
14261
14262      # Use eval to expand a potential ~
14263      eval path="$path"
14264      if test ! -f "$path" && test ! -d "$path"; then
14265        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14266      fi
14267
14268      CURDIR="`cd "$path"; $THEPWDCMD -L`"
14269    fi
14270  fi
14271
14272
14273  # Only process if variable expands to non-empty
14274
14275  if test "x$TOPDIR" != x; then
14276    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14277
14278  # Input might be given as Windows format, start by converting to
14279  # unix format.
14280  path="$TOPDIR"
14281  new_path=`$CYGPATH -u "$path"`
14282
14283  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14284  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14285  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14286  # "foo.exe" is OK but "foo" is an error.
14287  #
14288  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14289  # It is also a way to make sure we got the proper file name for the real test later on.
14290  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14291  if test "x$test_shortpath" = x; then
14292    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14293$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14294    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
14295  fi
14296
14297  # Call helper function which possibly converts this using DOS-style short mode.
14298  # If so, the updated path is stored in $new_path.
14299
14300  input_path="$new_path"
14301  # Check if we need to convert this using DOS-style short mode. If the path
14302  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14303  # take no chances and rewrite it.
14304  # Note: m4 eats our [], so we need to use [ and ] instead.
14305  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14306  if test "x$has_forbidden_chars" != x; then
14307    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14308    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14309    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14310    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14311      # Going to short mode and back again did indeed matter. Since short mode is
14312      # case insensitive, let's make it lowercase to improve readability.
14313      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14314      # Now convert it back to Unix-style (cygpath)
14315      input_path=`$CYGPATH -u "$shortmode_path"`
14316      new_path="$input_path"
14317    fi
14318  fi
14319
14320  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14321  if test "x$test_cygdrive_prefix" = x; then
14322    # As a simple fix, exclude /usr/bin since it's not a real path.
14323    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14324      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14325      # a path prefixed by /cygdrive for fixpath to work.
14326      new_path="$CYGWIN_ROOT_PATH$input_path"
14327    fi
14328  fi
14329
14330
14331  if test "x$path" != "x$new_path"; then
14332    TOPDIR="$new_path"
14333    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14334$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14335  fi
14336
14337    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14338
14339  path="$TOPDIR"
14340  has_colon=`$ECHO $path | $GREP ^.:`
14341  new_path="$path"
14342  if test "x$has_colon" = x; then
14343    # Not in mixed or Windows style, start by that.
14344    new_path=`cmd //c echo $path`
14345  fi
14346
14347
14348  input_path="$new_path"
14349  # Check if we need to convert this using DOS-style short mode. If the path
14350  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14351  # take no chances and rewrite it.
14352  # Note: m4 eats our [], so we need to use [ and ] instead.
14353  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14354  if test "x$has_forbidden_chars" != x; then
14355    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14356    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14357  fi
14358
14359
14360  windows_path="$new_path"
14361  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14362    unix_path=`$CYGPATH -u "$windows_path"`
14363    new_path="$unix_path"
14364  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14365    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14366    new_path="$unix_path"
14367  fi
14368
14369  if test "x$path" != "x$new_path"; then
14370    TOPDIR="$new_path"
14371    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14372$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14373  fi
14374
14375  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14376  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14377
14378    else
14379      # We're on a unix platform. Hooray! :)
14380      path="$TOPDIR"
14381      has_space=`$ECHO "$path" | $GREP " "`
14382      if test "x$has_space" != x; then
14383        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14384$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14385        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14386      fi
14387
14388      # Use eval to expand a potential ~
14389      eval path="$path"
14390      if test ! -f "$path" && test ! -d "$path"; then
14391        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14392      fi
14393
14394      TOPDIR="`cd "$path"; $THEPWDCMD -L`"
14395    fi
14396  fi
14397
14398  # SRC_ROOT is a traditional alias for TOPDIR.
14399  SRC_ROOT=$TOPDIR
14400
14401  # Calculate a canonical version of TOPDIR for string comparisons
14402  CANONICAL_TOPDIR=$TOPDIR
14403
14404  if test "x$OPENJDK_BUILD_OS" != xwindows; then
14405    # Follow a chain of symbolic links. Use readlink
14406    # where it exists, else fall back to horribly
14407    # complicated shell code.
14408    if test "x$READLINK_TESTED" != yes; then
14409      # On MacOSX there is a readlink tool with a different
14410      # purpose than the GNU readlink tool. Check the found readlink.
14411      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
14412      if test "x$ISGNU" = x; then
14413        # A readlink that we do not know how to use.
14414        # Are there other non-GNU readlinks out there?
14415        READLINK_TESTED=yes
14416        READLINK=
14417      fi
14418    fi
14419
14420    if test "x$READLINK" != x; then
14421      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
14422    else
14423      # Save the current directory for restoring afterwards
14424      STARTDIR=$PWD
14425      COUNTER=0
14426      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
14427      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
14428      cd $sym_link_dir
14429      # Use -P flag to resolve symlinks in directories.
14430      cd `$THEPWDCMD -P`
14431      sym_link_dir=`$THEPWDCMD -P`
14432      # Resolve file symlinks
14433      while test $COUNTER -lt 20; do
14434        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
14435        if test "x$ISLINK" == x; then
14436          # This is not a symbolic link! We are done!
14437          break
14438        fi
14439        # Again resolve directory symlinks since the target of the just found
14440        # link could be in a different directory
14441        cd `$DIRNAME $ISLINK`
14442        sym_link_dir=`$THEPWDCMD -P`
14443        sym_link_file=`$BASENAME $ISLINK`
14444        let COUNTER=COUNTER+1
14445      done
14446      cd $STARTDIR
14447      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
14448    fi
14449  fi
14450
14451
14452
14453  # Locate the directory of this script.
14454  AUTOCONF_DIR=$TOPDIR/common/autoconf
14455
14456
14457# Check if it's a pure open build or if custom sources are to be used.
14458
14459  # Check whether --enable-openjdk-only was given.
14460if test "${enable_openjdk_only+set}" = set; then :
14461  enableval=$enable_openjdk_only;
14462else
14463  enable_openjdk_only="no"
14464fi
14465
14466
14467  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
14468$as_echo_n "checking for presence of closed sources... " >&6; }
14469  if test -d "$SRC_ROOT/jdk/src/closed"; then
14470    CLOSED_SOURCE_PRESENT=yes
14471  else
14472    CLOSED_SOURCE_PRESENT=no
14473  fi
14474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
14475$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
14476
14477  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
14478$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
14479  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
14480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
14481$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
14482
14483  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
14484    OPENJDK=true
14485    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14486      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
14487$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
14488    fi
14489  else
14490    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14491      OPENJDK=true
14492    else
14493      OPENJDK=false
14494    fi
14495  fi
14496
14497  if test "x$OPENJDK" = "xtrue"; then
14498    SET_OPENJDK="OPENJDK=true"
14499  fi
14500
14501
14502
14503  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
14504  # the IncludeCustomExtension macro.
14505
14506
14507# Check whether --with-custom-make-dir was given.
14508if test "${with_custom_make_dir+set}" = set; then :
14509  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
14510$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
14511fi
14512
14513
14514
14515
14516# These are needed to be able to create a configuration name (and thus the output directory)
14517
14518  ###############################################################################
14519  #
14520  # Check which variant of the JDK that we want to build.
14521  # Currently we have:
14522  #    normal:   standard edition
14523  # but the custom make system may add other variants
14524  #
14525  # Effectively the JDK variant gives a name to a specific set of
14526  # modules to compile into the JDK. In the future, these modules
14527  # might even be Jigsaw modules.
14528  #
14529  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
14530$as_echo_n "checking which variant of the JDK to build... " >&6; }
14531
14532# Check whether --with-jdk-variant was given.
14533if test "${with_jdk_variant+set}" = set; then :
14534  withval=$with_jdk_variant;
14535fi
14536
14537
14538  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
14539    JDK_VARIANT="normal"
14540  else
14541    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
14542  fi
14543
14544
14545
14546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
14547$as_echo "$JDK_VARIANT" >&6; }
14548
14549
14550###############################################################################
14551#
14552# Check which interpreter of the JVM we want to build.
14553# Currently we have:
14554#    template: Template interpreter (the default)
14555#    cpp     : C++ interpreter
14556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
14557$as_echo_n "checking which interpreter of the JVM to build... " >&6; }
14558
14559# Check whether --with-jvm-interpreter was given.
14560if test "${with_jvm_interpreter+set}" = set; then :
14561  withval=$with_jvm_interpreter;
14562fi
14563
14564
14565if test "x$with_jvm_interpreter" = x; then
14566     with_jvm_interpreter="template"
14567fi
14568
14569JVM_INTERPRETER="$with_jvm_interpreter"
14570
14571if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
14572   as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
14573fi
14574
14575
14576
14577{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
14578$as_echo "$with_jvm_interpreter" >&6; }
14579
14580
14581
14582  ###############################################################################
14583  #
14584  # Check which variants of the JVM that we want to build.
14585  # Currently we have:
14586  #    server: normal interpreter and a tiered C1/C2 compiler
14587  #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
14588  #    minimal1: reduced form of client with optional VM services and features stripped out
14589  #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
14590  #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
14591  #    zero: no machine code interpreter, no compiler
14592  #    zeroshark: zero interpreter and shark/llvm compiler backend
14593#    core: interpreter only, no compiler (only works on some platforms)
14594  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
14595$as_echo_n "checking which variants of the JVM to build... " >&6; }
14596
14597# Check whether --with-jvm-variants was given.
14598if test "${with_jvm_variants+set}" = set; then :
14599  withval=$with_jvm_variants;
14600fi
14601
14602
14603  if test "x$with_jvm_variants" = x; then
14604    with_jvm_variants="server"
14605  fi
14606
14607  JVM_VARIANTS=",$with_jvm_variants,"
14608  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,//'`
14609
14610  if test "x$TEST_VARIANTS" != "x,"; then
14611     as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
14612  fi
14613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
14614$as_echo "$with_jvm_variants" >&6; }
14615
14616  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
14617  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
14618  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
14619  JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
14620  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
14621  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
14622  JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
14623
14624  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14625    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14626      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
14627    fi
14628  fi
14629  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14630    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14631      as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
14632    fi
14633  fi
14634  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14635    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14636      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
14637    fi
14638  fi
14639
14640  # Replace the commas with AND for use in the build directory name.
14641  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
14642  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/'`
14643  if test "x$COUNT_VARIANTS" != "x,1"; then
14644    BUILDING_MULTIPLE_JVM_VARIANTS=yes
14645  else
14646    BUILDING_MULTIPLE_JVM_VARIANTS=no
14647  fi
14648
14649
14650
14651
14652
14653
14654
14655
14656
14657
14658  INCLUDE_SA=true
14659  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
14660    INCLUDE_SA=false
14661  fi
14662  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
14663    INCLUDE_SA=false
14664  fi
14665  if test "x$OPENJDK_TARGET_OS" = xaix ; then
14666    INCLUDE_SA=false
14667  fi
14668  if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
14669    INCLUDE_SA=false
14670  fi
14671
14672
14673  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
14674    MACOSX_UNIVERSAL="true"
14675  fi
14676
14677
14678
14679
14680  ###############################################################################
14681  #
14682  # Set the debug level
14683  #    release: no debug information, all optimizations, no asserts.
14684  #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
14685  #    fastdebug: debug information (-g), all optimizations, all asserts
14686  #    slowdebug: debug information (-g), no optimizations, all asserts
14687  #
14688  DEBUG_LEVEL="release"
14689  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
14690$as_echo_n "checking which debug level to use... " >&6; }
14691  # Check whether --enable-debug was given.
14692if test "${enable_debug+set}" = set; then :
14693  enableval=$enable_debug;
14694        ENABLE_DEBUG="${enableval}"
14695        DEBUG_LEVEL="fastdebug"
14696
14697else
14698  ENABLE_DEBUG="no"
14699fi
14700
14701
14702
14703# Check whether --with-debug-level was given.
14704if test "${with_debug_level+set}" = set; then :
14705  withval=$with_debug_level;
14706        DEBUG_LEVEL="${withval}"
14707        if test "x$ENABLE_DEBUG" = xyes; then
14708          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
14709        fi
14710
14711fi
14712
14713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
14714$as_echo "$DEBUG_LEVEL" >&6; }
14715
14716  if test "x$DEBUG_LEVEL" != xrelease && \
14717      test "x$DEBUG_LEVEL" != xoptimized && \
14718      test "x$DEBUG_LEVEL" != xfastdebug && \
14719      test "x$DEBUG_LEVEL" != xslowdebug; then
14720    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
14721  fi
14722
14723
14724  ###############################################################################
14725  #
14726  # Setup legacy vars/targets and new vars to deal with different debug levels.
14727  #
14728
14729  case $DEBUG_LEVEL in
14730    release )
14731      VARIANT="OPT"
14732      FASTDEBUG="false"
14733      DEBUG_CLASSFILES="false"
14734      BUILD_VARIANT_RELEASE=""
14735      HOTSPOT_DEBUG_LEVEL="product"
14736      HOTSPOT_EXPORT="product"
14737      ;;
14738    fastdebug )
14739      VARIANT="DBG"
14740      FASTDEBUG="true"
14741      DEBUG_CLASSFILES="true"
14742      BUILD_VARIANT_RELEASE="-fastdebug"
14743      HOTSPOT_DEBUG_LEVEL="fastdebug"
14744      HOTSPOT_EXPORT="fastdebug"
14745      ;;
14746    slowdebug )
14747      VARIANT="DBG"
14748      FASTDEBUG="false"
14749      DEBUG_CLASSFILES="true"
14750      BUILD_VARIANT_RELEASE="-debug"
14751      HOTSPOT_DEBUG_LEVEL="debug"
14752      HOTSPOT_EXPORT="debug"
14753      ;;
14754    optimized )
14755      VARIANT="OPT"
14756      FASTDEBUG="false"
14757      DEBUG_CLASSFILES="false"
14758      BUILD_VARIANT_RELEASE="-optimized"
14759      HOTSPOT_DEBUG_LEVEL="optimized"
14760      HOTSPOT_EXPORT="optimized"
14761      ;;
14762  esac
14763
14764  # The debug level 'optimized' is a little special because it is currently only
14765  # applicable to the HotSpot build where it means to build a completely
14766  # optimized version of the VM without any debugging code (like for the
14767  # 'release' debug level which is called 'product' in the HotSpot build) but
14768  # with the exception that it can contain additional code which is otherwise
14769  # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
14770  # test new and/or experimental features which are not intended for customer
14771  # shipment. Because these new features need to be tested and benchmarked in
14772  # real world scenarios, we want to build the containing JDK at the 'release'
14773  # debug level.
14774  if test "x$DEBUG_LEVEL" = xoptimized; then
14775    DEBUG_LEVEL="release"
14776  fi
14777
14778  #####
14779  # Generate the legacy makefile targets for hotspot.
14780  # The hotspot api for selecting the build artifacts, really, needs to be improved.
14781  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
14782  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
14783  # But until then ...
14784  HOTSPOT_TARGET=""
14785
14786  if test "x$JVM_VARIANT_SERVER" = xtrue; then
14787    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
14788  fi
14789
14790  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14791    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
14792  fi
14793
14794  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14795    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
14796  fi
14797
14798  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14799    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
14800  fi
14801
14802  if test "x$JVM_VARIANT_ZERO" = xtrue; then
14803    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
14804  fi
14805
14806  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
14807    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
14808  fi
14809
14810  if test "x$JVM_VARIANT_CORE" = xtrue; then
14811    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
14812  fi
14813
14814  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
14815
14816  # On Macosx universal binaries are produced, but they only contain
14817  # 64 bit intel. This invalidates control of which jvms are built
14818  # from configure, but only server is valid anyway. Fix this
14819  # when hotspot makefiles are rewritten.
14820  if test "x$MACOSX_UNIVERSAL" = xtrue; then
14821    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
14822  fi
14823
14824  #####
14825
14826
14827
14828
14829
14830
14831
14832
14833# With basic setup done, call the custom early hook.
14834
14835
14836# Check if we have devkits, extra paths or sysroot set.
14837
14838
14839# Check whether --with-devkit was given.
14840if test "${with_devkit+set}" = set; then :
14841  withval=$with_devkit;
14842
14843  # Only process if variable expands to non-empty
14844
14845  if test "x$with_devkit" != x; then
14846    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14847
14848  # Input might be given as Windows format, start by converting to
14849  # unix format.
14850  path="$with_devkit"
14851  new_path=`$CYGPATH -u "$path"`
14852
14853  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14854  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14855  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14856  # "foo.exe" is OK but "foo" is an error.
14857  #
14858  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14859  # It is also a way to make sure we got the proper file name for the real test later on.
14860  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14861  if test "x$test_shortpath" = x; then
14862    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14863$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14864    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
14865  fi
14866
14867  # Call helper function which possibly converts this using DOS-style short mode.
14868  # If so, the updated path is stored in $new_path.
14869
14870  input_path="$new_path"
14871  # Check if we need to convert this using DOS-style short mode. If the path
14872  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14873  # take no chances and rewrite it.
14874  # Note: m4 eats our [], so we need to use [ and ] instead.
14875  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14876  if test "x$has_forbidden_chars" != x; then
14877    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14878    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14879    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14880    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14881      # Going to short mode and back again did indeed matter. Since short mode is
14882      # case insensitive, let's make it lowercase to improve readability.
14883      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14884      # Now convert it back to Unix-style (cygpath)
14885      input_path=`$CYGPATH -u "$shortmode_path"`
14886      new_path="$input_path"
14887    fi
14888  fi
14889
14890  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14891  if test "x$test_cygdrive_prefix" = x; then
14892    # As a simple fix, exclude /usr/bin since it's not a real path.
14893    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14894      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14895      # a path prefixed by /cygdrive for fixpath to work.
14896      new_path="$CYGWIN_ROOT_PATH$input_path"
14897    fi
14898  fi
14899
14900
14901  if test "x$path" != "x$new_path"; then
14902    with_devkit="$new_path"
14903    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14904$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14905  fi
14906
14907    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14908
14909  path="$with_devkit"
14910  has_colon=`$ECHO $path | $GREP ^.:`
14911  new_path="$path"
14912  if test "x$has_colon" = x; then
14913    # Not in mixed or Windows style, start by that.
14914    new_path=`cmd //c echo $path`
14915  fi
14916
14917
14918  input_path="$new_path"
14919  # Check if we need to convert this using DOS-style short mode. If the path
14920  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14921  # take no chances and rewrite it.
14922  # Note: m4 eats our [], so we need to use [ and ] instead.
14923  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14924  if test "x$has_forbidden_chars" != x; then
14925    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14926    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14927  fi
14928
14929
14930  windows_path="$new_path"
14931  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14932    unix_path=`$CYGPATH -u "$windows_path"`
14933    new_path="$unix_path"
14934  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14935    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14936    new_path="$unix_path"
14937  fi
14938
14939  if test "x$path" != "x$new_path"; then
14940    with_devkit="$new_path"
14941    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14942$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14943  fi
14944
14945  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14946  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14947
14948    else
14949      # We're on a unix platform. Hooray! :)
14950      path="$with_devkit"
14951      has_space=`$ECHO "$path" | $GREP " "`
14952      if test "x$has_space" != x; then
14953        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14954$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14955        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14956      fi
14957
14958      # Use eval to expand a potential ~
14959      eval path="$path"
14960      if test ! -f "$path" && test ! -d "$path"; then
14961        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
14962      fi
14963
14964      with_devkit="`cd "$path"; $THEPWDCMD -L`"
14965    fi
14966  fi
14967
14968        DEVKIT_ROOT="$with_devkit"
14969        # Check for a meta data info file in the root of the devkit
14970        if test -f "$DEVKIT_ROOT/devkit.info"; then
14971          . $DEVKIT_ROOT/devkit.info
14972          # This potentially sets the following:
14973          # A descriptive name of the devkit
14974
14975  if test "x$DEVKIT_NAME" = x; then
14976    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
14977  fi
14978
14979          # Corresponds to --with-extra-path
14980
14981  if test "x$DEVKIT_EXTRA_PATH" = x; then
14982    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
14983  fi
14984
14985          # Corresponds to --with-toolchain-path
14986
14987  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
14988    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
14989  fi
14990
14991          # Corresponds to --with-sysroot
14992
14993  if test "x$DEVKIT_SYSROOT" = x; then
14994    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
14995  fi
14996
14997
14998          # Identifies the Visual Studio version in the devkit
14999
15000  if test "x$DEVKIT_VS_VERSION" = x; then
15001    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
15002  fi
15003
15004          # The Visual Studio include environment variable
15005
15006  if test "x$DEVKIT_VS_INCLUDE" = x; then
15007    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
15008  fi
15009
15010          # The Visual Studio lib environment variable
15011
15012  if test "x$DEVKIT_VS_LIB" = x; then
15013    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
15014  fi
15015
15016          # Corresponds to --with-msvcr-dll
15017
15018  if test "x$DEVKIT_MSVCR_DLL" = x; then
15019    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
15020  fi
15021
15022          # Corresponds to --with-msvcp-dll
15023
15024  if test "x$DEVKIT_MSVCP_DLL" = x; then
15025    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
15026  fi
15027
15028        fi
15029
15030        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
15031$as_echo_n "checking for devkit... " >&6; }
15032        if test "x$DEVKIT_NAME" != x; then
15033          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
15034$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
15035        else
15036          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
15037$as_echo "$DEVKIT_ROOT" >&6; }
15038        fi
15039
15040
15041  if test "x$DEVKIT_EXTRA_PATH" != x; then
15042    if test "x$EXTRA_PATH" = x; then
15043      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
15044    else
15045      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
15046    fi
15047  fi
15048
15049
15050        # Fallback default of just /bin if DEVKIT_PATH is not defined
15051        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
15052          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
15053        fi
15054
15055  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
15056    if test "x$TOOLCHAIN_PATH" = x; then
15057      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
15058    else
15059      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
15060    fi
15061  fi
15062
15063
15064        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
15065        # places for backwards compatiblity.
15066        if test "x$DEVKIT_SYSROOT" != x; then
15067          SYSROOT="$DEVKIT_SYSROOT"
15068        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
15069          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
15070        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
15071          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
15072        fi
15073
15074
15075fi
15076
15077
15078  # You can force the sysroot if the sysroot encoded into the compiler tools
15079  # is not correct.
15080
15081# Check whether --with-sys-root was given.
15082if test "${with_sys_root+set}" = set; then :
15083  withval=$with_sys_root; SYSROOT=$with_sys_root
15084
15085fi
15086
15087
15088
15089# Check whether --with-sysroot was given.
15090if test "${with_sysroot+set}" = set; then :
15091  withval=$with_sysroot; SYSROOT=$with_sysroot
15092
15093fi
15094
15095
15096
15097# Check whether --with-tools-dir was given.
15098if test "${with_tools_dir+set}" = set; then :
15099  withval=$with_tools_dir;
15100  if test "x$with_tools_dir" != x; then
15101    if test "x$TOOLCHAIN_PATH" = x; then
15102      TOOLCHAIN_PATH="$with_tools_dir"
15103    else
15104      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
15105    fi
15106  fi
15107
15108
15109fi
15110
15111
15112
15113# Check whether --with-toolchain-path was given.
15114if test "${with_toolchain_path+set}" = set; then :
15115  withval=$with_toolchain_path;
15116  if test "x$with_toolchain_path" != x; then
15117    if test "x$TOOLCHAIN_PATH" = x; then
15118      TOOLCHAIN_PATH="$with_toolchain_path"
15119    else
15120      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
15121    fi
15122  fi
15123
15124
15125fi
15126
15127
15128
15129# Check whether --with-extra-path was given.
15130if test "${with_extra_path+set}" = set; then :
15131  withval=$with_extra_path;
15132  if test "x$with_extra_path" != x; then
15133    if test "x$EXTRA_PATH" = x; then
15134      EXTRA_PATH="$with_extra_path"
15135    else
15136      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
15137    fi
15138  fi
15139
15140
15141fi
15142
15143
15144  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
15145    # detect if Xcode is installed by running xcodebuild -version
15146    # if no Xcode installed, xcodebuild exits with 1
15147    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
15148    if /usr/bin/xcodebuild -version >/dev/null 2>&1; then
15149      # We need to use xcodebuild in the toolchain dir provided by the user, this will
15150      # fall back on the stub binary in /usr/bin/xcodebuild
15151      # Extract the first word of "xcodebuild", so it can be a program name with args.
15152set dummy xcodebuild; ac_word=$2
15153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15154$as_echo_n "checking for $ac_word... " >&6; }
15155if ${ac_cv_path_XCODEBUILD+:} false; then :
15156  $as_echo_n "(cached) " >&6
15157else
15158  case $XCODEBUILD in
15159  [\\/]* | ?:[\\/]*)
15160  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
15161  ;;
15162  *)
15163  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15164for as_dir in $TOOLCHAIN_PATH
15165do
15166  IFS=$as_save_IFS
15167  test -z "$as_dir" && as_dir=.
15168    for ac_exec_ext in '' $ac_executable_extensions; do
15169  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15170    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
15171    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15172    break 2
15173  fi
15174done
15175  done
15176IFS=$as_save_IFS
15177
15178  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
15179  ;;
15180esac
15181fi
15182XCODEBUILD=$ac_cv_path_XCODEBUILD
15183if test -n "$XCODEBUILD"; then
15184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
15185$as_echo "$XCODEBUILD" >&6; }
15186else
15187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15188$as_echo "no" >&6; }
15189fi
15190
15191
15192    else
15193      # this should result in SYSROOT being empty, unless --with-sysroot is provided
15194      # when only the command line tools are installed there are no SDKs, so headers
15195      # are copied into the system frameworks
15196      XCODEBUILD=
15197
15198    fi
15199
15200    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
15201$as_echo_n "checking for sdk name... " >&6; }
15202
15203# Check whether --with-sdk-name was given.
15204if test "${with_sdk_name+set}" = set; then :
15205  withval=$with_sdk_name; SDKNAME=$with_sdk_name
15206
15207fi
15208
15209    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
15210$as_echo "$SDKNAME" >&6; }
15211
15212    # if toolchain path is specified then don't rely on system headers, they may not compile
15213    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
15214    test -z "$TOOLCHAIN_PATH" && \
15215      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
15216
15217    if test -z "$SYSROOT"; then
15218      if test -n "$XCODEBUILD"; then
15219        # if we don't have system headers, use default SDK name (last resort)
15220        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15221          SDKNAME=${SDKNAME:-macosx}
15222        fi
15223
15224        if test -n "$SDKNAME"; then
15225          # Call xcodebuild to determine SYSROOT
15226          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | grep '^Path: ' | sed 's/Path: //'`
15227        fi
15228      else
15229        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15230          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
15231        fi
15232      fi
15233    else
15234      # warn user if --with-sdk-name was also set
15235      if test -n "$with_sdk_name"; then
15236        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
15237$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
15238      fi
15239    fi
15240
15241    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
15242      # If no system framework headers, then SYSROOT must be set, or we won't build
15243      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
15244    fi
15245
15246    # Perform a basic sanity test
15247    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
15248      if test -z "$SYSROOT"; then
15249        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
15250      else
15251        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
15252      fi
15253    fi
15254
15255    # set SDKROOT too, Xcode tools will pick it up
15256    SDKROOT=$SYSROOT
15257
15258  fi
15259
15260  # Prepend the extra path to the global path
15261
15262  if test "x$EXTRA_PATH" != x; then
15263    if test "x$PATH" = x; then
15264      PATH="$EXTRA_PATH"
15265    else
15266      PATH="$EXTRA_PATH:$PATH"
15267    fi
15268  fi
15269
15270
15271  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
15272    # Add extra search paths on solaris for utilities like ar and as etc...
15273    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
15274  fi
15275
15276  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
15277$as_echo_n "checking for sysroot... " >&6; }
15278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
15279$as_echo "$SYSROOT" >&6; }
15280  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
15281$as_echo_n "checking for toolchain path... " >&6; }
15282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
15283$as_echo "$TOOLCHAIN_PATH" >&6; }
15284  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
15285$as_echo_n "checking for extra path... " >&6; }
15286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
15287$as_echo "$EXTRA_PATH" >&6; }
15288
15289
15290# To properly create a configuration name, we need to have the OpenJDK target
15291# and options (variants and debug level) parsed.
15292
15293
15294
15295# Check whether --with-conf-name was given.
15296if test "${with_conf_name+set}" = set; then :
15297  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
15298fi
15299
15300
15301  # Test from where we are running configure, in or outside of src root.
15302  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
15303$as_echo_n "checking where to store configuration... " >&6; }
15304  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
15305      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
15306      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
15307    # We are running configure from the src root.
15308    # Create a default ./build/target-variant-debuglevel output root.
15309    if test "x${CONF_NAME}" = x; then
15310      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
15311$as_echo "in default location" >&6; }
15312      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
15313    else
15314      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
15315$as_echo "in build directory with custom name" >&6; }
15316    fi
15317    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
15318    $MKDIR -p "$OUTPUT_ROOT"
15319    if test ! -d "$OUTPUT_ROOT"; then
15320      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
15321    fi
15322  else
15323    # We are running configure from outside of the src dir.
15324    # Then use the current directory as output dir!
15325    # If configuration is situated in normal build directory, just use the build
15326    # directory name as configuration name, otherwise use the complete path.
15327    if test "x${CONF_NAME}" = x; then
15328      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
15329    fi
15330    OUTPUT_ROOT="$CURDIR"
15331    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
15332$as_echo "in current directory" >&6; }
15333
15334    # WARNING: This might be a bad thing to do. You need to be sure you want to
15335    # have a configuration in this directory. Do some sanity checks!
15336
15337    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
15338      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
15339      # other files
15340      files_present=`$LS $OUTPUT_ROOT`
15341      # Configure has already touched config.log and confdefs.h in the current dir when this check
15342      # is performed.
15343      filtered_files=`$ECHO "$files_present" \
15344          | $SED -e 's/config.log//g' \
15345              -e 's/configure.log//g' \
15346              -e 's/confdefs.h//g' \
15347              -e 's/ //g' \
15348          | $TR -d '\n'`
15349      if test "x$filtered_files" != x; then
15350        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
15351$as_echo "$as_me: Current directory is $CURDIR." >&6;}
15352        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
15353$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
15354        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
15355$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
15356        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
15357$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
15358        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
15359$as_echo "$as_me: seriously mess up just about everything." >&6;}
15360        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
15361$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
15362        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
15363$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
15364        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
15365      fi
15366    fi
15367  fi
15368  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
15369$as_echo_n "checking what configuration name to use... " >&6; }
15370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
15371$as_echo "$CONF_NAME" >&6; }
15372
15373
15374  # Only process if variable expands to non-empty
15375
15376  if test "x$OUTPUT_ROOT" != x; then
15377    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15378
15379  # Input might be given as Windows format, start by converting to
15380  # unix format.
15381  path="$OUTPUT_ROOT"
15382  new_path=`$CYGPATH -u "$path"`
15383
15384  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15385  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15386  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15387  # "foo.exe" is OK but "foo" is an error.
15388  #
15389  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15390  # It is also a way to make sure we got the proper file name for the real test later on.
15391  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15392  if test "x$test_shortpath" = x; then
15393    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15394$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15395    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
15396  fi
15397
15398  # Call helper function which possibly converts this using DOS-style short mode.
15399  # If so, the updated path is stored in $new_path.
15400
15401  input_path="$new_path"
15402  # Check if we need to convert this using DOS-style short mode. If the path
15403  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15404  # take no chances and rewrite it.
15405  # Note: m4 eats our [], so we need to use [ and ] instead.
15406  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15407  if test "x$has_forbidden_chars" != x; then
15408    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15409    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15410    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15411    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15412      # Going to short mode and back again did indeed matter. Since short mode is
15413      # case insensitive, let's make it lowercase to improve readability.
15414      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15415      # Now convert it back to Unix-style (cygpath)
15416      input_path=`$CYGPATH -u "$shortmode_path"`
15417      new_path="$input_path"
15418    fi
15419  fi
15420
15421  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15422  if test "x$test_cygdrive_prefix" = x; then
15423    # As a simple fix, exclude /usr/bin since it's not a real path.
15424    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15425      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15426      # a path prefixed by /cygdrive for fixpath to work.
15427      new_path="$CYGWIN_ROOT_PATH$input_path"
15428    fi
15429  fi
15430
15431
15432  if test "x$path" != "x$new_path"; then
15433    OUTPUT_ROOT="$new_path"
15434    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15435$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15436  fi
15437
15438    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15439
15440  path="$OUTPUT_ROOT"
15441  has_colon=`$ECHO $path | $GREP ^.:`
15442  new_path="$path"
15443  if test "x$has_colon" = x; then
15444    # Not in mixed or Windows style, start by that.
15445    new_path=`cmd //c echo $path`
15446  fi
15447
15448
15449  input_path="$new_path"
15450  # Check if we need to convert this using DOS-style short mode. If the path
15451  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15452  # take no chances and rewrite it.
15453  # Note: m4 eats our [], so we need to use [ and ] instead.
15454  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15455  if test "x$has_forbidden_chars" != x; then
15456    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15457    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15458  fi
15459
15460
15461  windows_path="$new_path"
15462  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15463    unix_path=`$CYGPATH -u "$windows_path"`
15464    new_path="$unix_path"
15465  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15466    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15467    new_path="$unix_path"
15468  fi
15469
15470  if test "x$path" != "x$new_path"; then
15471    OUTPUT_ROOT="$new_path"
15472    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15473$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15474  fi
15475
15476  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15477  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15478
15479    else
15480      # We're on a unix platform. Hooray! :)
15481      path="$OUTPUT_ROOT"
15482      has_space=`$ECHO "$path" | $GREP " "`
15483      if test "x$has_space" != x; then
15484        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15485$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15486        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15487      fi
15488
15489      # Use eval to expand a potential ~
15490      eval path="$path"
15491      if test ! -f "$path" && test ! -d "$path"; then
15492        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
15493      fi
15494
15495      OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
15496    fi
15497  fi
15498
15499
15500  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
15501  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
15502
15503  SPEC=$OUTPUT_ROOT/spec.gmk
15504
15505  CONF_NAME=$CONF_NAME
15506
15507  OUTPUT_ROOT=$OUTPUT_ROOT
15508
15509
15510
15511  # The spec.gmk file contains all variables for the make system.
15512  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
15513
15514  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
15515  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
15516
15517  # The bootcycle-spec.gmk file contains support for boot cycle builds.
15518  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
15519
15520  # The compare.sh is used to compare the build output to other builds.
15521  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
15522
15523  # The generated Makefile knows where the spec.gmk is and where the source is.
15524  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
15525  # which will look for generated configurations
15526  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
15527
15528
15529
15530# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
15531
15532  for ac_prog in apt-get yum port pkgutil pkgadd
15533do
15534  # Extract the first word of "$ac_prog", so it can be a program name with args.
15535set dummy $ac_prog; ac_word=$2
15536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15537$as_echo_n "checking for $ac_word... " >&6; }
15538if ${ac_cv_prog_PKGHANDLER+:} false; then :
15539  $as_echo_n "(cached) " >&6
15540else
15541  if test -n "$PKGHANDLER"; then
15542  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
15543else
15544as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15545for as_dir in $PATH
15546do
15547  IFS=$as_save_IFS
15548  test -z "$as_dir" && as_dir=.
15549    for ac_exec_ext in '' $ac_executable_extensions; do
15550  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15551    ac_cv_prog_PKGHANDLER="$ac_prog"
15552    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15553    break 2
15554  fi
15555done
15556  done
15557IFS=$as_save_IFS
15558
15559fi
15560fi
15561PKGHANDLER=$ac_cv_prog_PKGHANDLER
15562if test -n "$PKGHANDLER"; then
15563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
15564$as_echo "$PKGHANDLER" >&6; }
15565else
15566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15567$as_echo "no" >&6; }
15568fi
15569
15570
15571  test -n "$PKGHANDLER" && break
15572done
15573
15574
15575
15576# Setup tools that requires more complex handling, or that is not needed by the configure script.
15577
15578
15579  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
15580  if test "x$MAKE" != x; then
15581    # User has supplied a make, test it.
15582    if test ! -f "$MAKE"; then
15583      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
15584    fi
15585
15586  MAKE_CANDIDATE=""$MAKE""
15587  DESCRIPTION="user supplied MAKE=$MAKE"
15588
15589  # On Cygwin, we require a newer version of make than on other platforms
15590  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15591    MAKE_VERSION_EXPR="-e 4\."
15592    MAKE_REQUIRED_VERSION="4.0"
15593   else
15594    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
15595    MAKE_REQUIRED_VERSION="3.81"
15596  fi
15597
15598  if test "x$MAKE_CANDIDATE" != x; then
15599    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15600$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15601    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15602    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15603    if test "x$IS_GNU_MAKE" = x; then
15604      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15605$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15606    else
15607      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
15608      if test "x$IS_MODERN_MAKE" = x; then
15609        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
15610$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
15611      else
15612        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15613          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15614            MAKE_EXPECTED_ENV='cygwin'
15615          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15616            MAKE_EXPECTED_ENV='msys'
15617          else
15618            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15619          fi
15620          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15621          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15622        else
15623          # Not relevant for non-Windows
15624          IS_MAKE_CORRECT_ENV=true
15625        fi
15626        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15627          { $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
15628$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;}
15629        else
15630          FOUND_MAKE=$MAKE_CANDIDATE
15631
15632  # Only process if variable expands to non-empty
15633
15634  if test "x$FOUND_MAKE" != x; then
15635    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15636
15637  # First separate the path from the arguments. This will split at the first
15638  # space.
15639  complete="$FOUND_MAKE"
15640  path="${complete%% *}"
15641  tmp="$complete EOL"
15642  arguments="${tmp#* }"
15643
15644  # Input might be given as Windows format, start by converting to
15645  # unix format.
15646  new_path=`$CYGPATH -u "$path"`
15647
15648  # Now try to locate executable using which
15649  new_path=`$WHICH "$new_path" 2> /dev/null`
15650  # bat and cmd files are not always considered executable in cygwin causing which
15651  # to not find them
15652  if test "x$new_path" = x \
15653      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15654      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15655    new_path=`$CYGPATH -u "$path"`
15656  fi
15657  if test "x$new_path" = x; then
15658    # Oops. Which didn't find the executable.
15659    # The splitting of arguments from the executable at a space might have been incorrect,
15660    # since paths with space are more likely in Windows. Give it another try with the whole
15661    # argument.
15662    path="$complete"
15663    arguments="EOL"
15664    new_path=`$CYGPATH -u "$path"`
15665    new_path=`$WHICH "$new_path" 2> /dev/null`
15666    # bat and cmd files are not always considered executable in cygwin causing which
15667    # to not find them
15668    if test "x$new_path" = x \
15669        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15670        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15671      new_path=`$CYGPATH -u "$path"`
15672    fi
15673    if test "x$new_path" = x; then
15674      # It's still not found. Now this is an unrecoverable error.
15675      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15676$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15677      has_space=`$ECHO "$complete" | $GREP " "`
15678      if test "x$has_space" != x; then
15679        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15680$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15681      fi
15682      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15683    fi
15684  fi
15685
15686  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15687  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15688  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15689  # "foo.exe" is OK but "foo" is an error.
15690  #
15691  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15692  # It is also a way to make sure we got the proper file name for the real test later on.
15693  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15694  if test "x$test_shortpath" = x; then
15695    # Short path failed, file does not exist as specified.
15696    # Try adding .exe or .cmd
15697    if test -f "${new_path}.exe"; then
15698      input_to_shortpath="${new_path}.exe"
15699    elif test -f "${new_path}.cmd"; then
15700      input_to_shortpath="${new_path}.cmd"
15701    else
15702      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15703$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15704      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15705$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15706      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15707    fi
15708  else
15709    input_to_shortpath="$new_path"
15710  fi
15711
15712  # Call helper function which possibly converts this using DOS-style short mode.
15713  # If so, the updated path is stored in $new_path.
15714  new_path="$input_to_shortpath"
15715
15716  input_path="$input_to_shortpath"
15717  # Check if we need to convert this using DOS-style short mode. If the path
15718  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15719  # take no chances and rewrite it.
15720  # Note: m4 eats our [], so we need to use [ and ] instead.
15721  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15722  if test "x$has_forbidden_chars" != x; then
15723    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15724    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15725    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15726    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15727      # Going to short mode and back again did indeed matter. Since short mode is
15728      # case insensitive, let's make it lowercase to improve readability.
15729      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15730      # Now convert it back to Unix-style (cygpath)
15731      input_path=`$CYGPATH -u "$shortmode_path"`
15732      new_path="$input_path"
15733    fi
15734  fi
15735
15736  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15737  if test "x$test_cygdrive_prefix" = x; then
15738    # As a simple fix, exclude /usr/bin since it's not a real path.
15739    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15740      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15741      # a path prefixed by /cygdrive for fixpath to work.
15742      new_path="$CYGWIN_ROOT_PATH$input_path"
15743    fi
15744  fi
15745
15746  # remove trailing .exe if any
15747  new_path="${new_path/%.exe/}"
15748
15749    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15750
15751  # First separate the path from the arguments. This will split at the first
15752  # space.
15753  complete="$FOUND_MAKE"
15754  path="${complete%% *}"
15755  tmp="$complete EOL"
15756  arguments="${tmp#* }"
15757
15758  # Input might be given as Windows format, start by converting to
15759  # unix format.
15760  new_path="$path"
15761
15762  windows_path="$new_path"
15763  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15764    unix_path=`$CYGPATH -u "$windows_path"`
15765    new_path="$unix_path"
15766  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15767    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15768    new_path="$unix_path"
15769  fi
15770
15771
15772  # Now try to locate executable using which
15773  new_path=`$WHICH "$new_path" 2> /dev/null`
15774
15775  if test "x$new_path" = x; then
15776    # Oops. Which didn't find the executable.
15777    # The splitting of arguments from the executable at a space might have been incorrect,
15778    # since paths with space are more likely in Windows. Give it another try with the whole
15779    # argument.
15780    path="$complete"
15781    arguments="EOL"
15782    new_path="$path"
15783
15784  windows_path="$new_path"
15785  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15786    unix_path=`$CYGPATH -u "$windows_path"`
15787    new_path="$unix_path"
15788  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15789    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15790    new_path="$unix_path"
15791  fi
15792
15793
15794    new_path=`$WHICH "$new_path" 2> /dev/null`
15795    # bat and cmd files are not always considered executable in MSYS causing which
15796    # to not find them
15797    if test "x$new_path" = x \
15798        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15799        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15800      new_path="$path"
15801
15802  windows_path="$new_path"
15803  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15804    unix_path=`$CYGPATH -u "$windows_path"`
15805    new_path="$unix_path"
15806  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15807    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15808    new_path="$unix_path"
15809  fi
15810
15811    fi
15812
15813    if test "x$new_path" = x; then
15814      # It's still not found. Now this is an unrecoverable error.
15815      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15816$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15817      has_space=`$ECHO "$complete" | $GREP " "`
15818      if test "x$has_space" != x; then
15819        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15820$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15821      fi
15822      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15823    fi
15824  fi
15825
15826  # Now new_path has a complete unix path to the binary
15827  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15828    # Keep paths in /bin as-is, but remove trailing .exe if any
15829    new_path="${new_path/%.exe/}"
15830    # Do not save /bin paths to all_fixpath_prefixes!
15831  else
15832    # Not in mixed or Windows style, start by that.
15833    new_path=`cmd //c echo $new_path`
15834
15835  input_path="$new_path"
15836  # Check if we need to convert this using DOS-style short mode. If the path
15837  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15838  # take no chances and rewrite it.
15839  # Note: m4 eats our [], so we need to use [ and ] instead.
15840  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15841  if test "x$has_forbidden_chars" != x; then
15842    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15843    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15844  fi
15845
15846    # Output is in $new_path
15847
15848  windows_path="$new_path"
15849  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15850    unix_path=`$CYGPATH -u "$windows_path"`
15851    new_path="$unix_path"
15852  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15853    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15854    new_path="$unix_path"
15855  fi
15856
15857    # remove trailing .exe if any
15858    new_path="${new_path/%.exe/}"
15859
15860    # Save the first 10 bytes of this path to the storage, so fixpath can work.
15861    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15862  fi
15863
15864    else
15865      # We're on a unix platform. Hooray! :)
15866      # First separate the path from the arguments. This will split at the first
15867      # space.
15868      complete="$FOUND_MAKE"
15869      path="${complete%% *}"
15870      tmp="$complete EOL"
15871      arguments="${tmp#* }"
15872
15873      # Cannot rely on the command "which" here since it doesn't always work.
15874      is_absolute_path=`$ECHO "$path" | $GREP ^/`
15875      if test -z "$is_absolute_path"; then
15876        # Path to executable is not absolute. Find it.
15877        IFS_save="$IFS"
15878        IFS=:
15879        for p in $PATH; do
15880          if test -f "$p/$path" && test -x "$p/$path"; then
15881            new_path="$p/$path"
15882            break
15883          fi
15884        done
15885        IFS="$IFS_save"
15886      else
15887        # This is an absolute path, we can use it without further modifications.
15888        new_path="$path"
15889      fi
15890
15891      if test "x$new_path" = x; then
15892        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15893$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15894        has_space=`$ECHO "$complete" | $GREP " "`
15895        if test "x$has_space" != x; then
15896          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15897$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15898        fi
15899        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15900      fi
15901    fi
15902
15903    # Now join together the path and the arguments once again
15904    if test "x$arguments" != xEOL; then
15905      new_complete="$new_path ${arguments% *}"
15906    else
15907      new_complete="$new_path"
15908    fi
15909
15910    if test "x$complete" != "x$new_complete"; then
15911      FOUND_MAKE="$new_complete"
15912      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15913$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15914    fi
15915  fi
15916
15917        fi
15918      fi
15919    fi
15920  fi
15921
15922    if test "x$FOUND_MAKE" = x; then
15923      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
15924    fi
15925  else
15926    # Try our hardest to locate a correct version of GNU make
15927    for ac_prog in gmake
15928do
15929  # Extract the first word of "$ac_prog", so it can be a program name with args.
15930set dummy $ac_prog; ac_word=$2
15931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15932$as_echo_n "checking for $ac_word... " >&6; }
15933if ${ac_cv_path_CHECK_GMAKE+:} false; then :
15934  $as_echo_n "(cached) " >&6
15935else
15936  case $CHECK_GMAKE in
15937  [\\/]* | ?:[\\/]*)
15938  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
15939  ;;
15940  *)
15941  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15942for as_dir in $PATH
15943do
15944  IFS=$as_save_IFS
15945  test -z "$as_dir" && as_dir=.
15946    for ac_exec_ext in '' $ac_executable_extensions; do
15947  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15948    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
15949    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15950    break 2
15951  fi
15952done
15953  done
15954IFS=$as_save_IFS
15955
15956  ;;
15957esac
15958fi
15959CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
15960if test -n "$CHECK_GMAKE"; then
15961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
15962$as_echo "$CHECK_GMAKE" >&6; }
15963else
15964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15965$as_echo "no" >&6; }
15966fi
15967
15968
15969  test -n "$CHECK_GMAKE" && break
15970done
15971
15972
15973  MAKE_CANDIDATE=""$CHECK_GMAKE""
15974  DESCRIPTION="gmake in PATH"
15975
15976  # On Cygwin, we require a newer version of make than on other platforms
15977  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15978    MAKE_VERSION_EXPR="-e 4\."
15979    MAKE_REQUIRED_VERSION="4.0"
15980   else
15981    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
15982    MAKE_REQUIRED_VERSION="3.81"
15983  fi
15984
15985  if test "x$MAKE_CANDIDATE" != x; then
15986    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15987$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15988    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15989    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15990    if test "x$IS_GNU_MAKE" = x; then
15991      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15992$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15993    else
15994      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
15995      if test "x$IS_MODERN_MAKE" = x; then
15996        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
15997$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
15998      else
15999        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16000          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16001            MAKE_EXPECTED_ENV='cygwin'
16002          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16003            MAKE_EXPECTED_ENV='msys'
16004          else
16005            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16006          fi
16007          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16008          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16009        else
16010          # Not relevant for non-Windows
16011          IS_MAKE_CORRECT_ENV=true
16012        fi
16013        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16014          { $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
16015$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;}
16016        else
16017          FOUND_MAKE=$MAKE_CANDIDATE
16018
16019  # Only process if variable expands to non-empty
16020
16021  if test "x$FOUND_MAKE" != x; then
16022    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16023
16024  # First separate the path from the arguments. This will split at the first
16025  # space.
16026  complete="$FOUND_MAKE"
16027  path="${complete%% *}"
16028  tmp="$complete EOL"
16029  arguments="${tmp#* }"
16030
16031  # Input might be given as Windows format, start by converting to
16032  # unix format.
16033  new_path=`$CYGPATH -u "$path"`
16034
16035  # Now try to locate executable using which
16036  new_path=`$WHICH "$new_path" 2> /dev/null`
16037  # bat and cmd files are not always considered executable in cygwin causing which
16038  # to not find them
16039  if test "x$new_path" = x \
16040      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16041      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16042    new_path=`$CYGPATH -u "$path"`
16043  fi
16044  if test "x$new_path" = x; then
16045    # Oops. Which didn't find the executable.
16046    # The splitting of arguments from the executable at a space might have been incorrect,
16047    # since paths with space are more likely in Windows. Give it another try with the whole
16048    # argument.
16049    path="$complete"
16050    arguments="EOL"
16051    new_path=`$CYGPATH -u "$path"`
16052    new_path=`$WHICH "$new_path" 2> /dev/null`
16053    # bat and cmd files are not always considered executable in cygwin causing which
16054    # to not find them
16055    if test "x$new_path" = x \
16056        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16057        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16058      new_path=`$CYGPATH -u "$path"`
16059    fi
16060    if test "x$new_path" = x; then
16061      # It's still not found. Now this is an unrecoverable error.
16062      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16063$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16064      has_space=`$ECHO "$complete" | $GREP " "`
16065      if test "x$has_space" != x; then
16066        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16067$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16068      fi
16069      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16070    fi
16071  fi
16072
16073  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16074  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16075  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16076  # "foo.exe" is OK but "foo" is an error.
16077  #
16078  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16079  # It is also a way to make sure we got the proper file name for the real test later on.
16080  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16081  if test "x$test_shortpath" = x; then
16082    # Short path failed, file does not exist as specified.
16083    # Try adding .exe or .cmd
16084    if test -f "${new_path}.exe"; then
16085      input_to_shortpath="${new_path}.exe"
16086    elif test -f "${new_path}.cmd"; then
16087      input_to_shortpath="${new_path}.cmd"
16088    else
16089      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16090$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16091      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16092$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16093      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16094    fi
16095  else
16096    input_to_shortpath="$new_path"
16097  fi
16098
16099  # Call helper function which possibly converts this using DOS-style short mode.
16100  # If so, the updated path is stored in $new_path.
16101  new_path="$input_to_shortpath"
16102
16103  input_path="$input_to_shortpath"
16104  # Check if we need to convert this using DOS-style short mode. If the path
16105  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16106  # take no chances and rewrite it.
16107  # Note: m4 eats our [], so we need to use [ and ] instead.
16108  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16109  if test "x$has_forbidden_chars" != x; then
16110    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16111    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16112    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16113    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16114      # Going to short mode and back again did indeed matter. Since short mode is
16115      # case insensitive, let's make it lowercase to improve readability.
16116      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16117      # Now convert it back to Unix-style (cygpath)
16118      input_path=`$CYGPATH -u "$shortmode_path"`
16119      new_path="$input_path"
16120    fi
16121  fi
16122
16123  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16124  if test "x$test_cygdrive_prefix" = x; then
16125    # As a simple fix, exclude /usr/bin since it's not a real path.
16126    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16127      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16128      # a path prefixed by /cygdrive for fixpath to work.
16129      new_path="$CYGWIN_ROOT_PATH$input_path"
16130    fi
16131  fi
16132
16133  # remove trailing .exe if any
16134  new_path="${new_path/%.exe/}"
16135
16136    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16137
16138  # First separate the path from the arguments. This will split at the first
16139  # space.
16140  complete="$FOUND_MAKE"
16141  path="${complete%% *}"
16142  tmp="$complete EOL"
16143  arguments="${tmp#* }"
16144
16145  # Input might be given as Windows format, start by converting to
16146  # unix format.
16147  new_path="$path"
16148
16149  windows_path="$new_path"
16150  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16151    unix_path=`$CYGPATH -u "$windows_path"`
16152    new_path="$unix_path"
16153  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16154    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16155    new_path="$unix_path"
16156  fi
16157
16158
16159  # Now try to locate executable using which
16160  new_path=`$WHICH "$new_path" 2> /dev/null`
16161
16162  if test "x$new_path" = x; then
16163    # Oops. Which didn't find the executable.
16164    # The splitting of arguments from the executable at a space might have been incorrect,
16165    # since paths with space are more likely in Windows. Give it another try with the whole
16166    # argument.
16167    path="$complete"
16168    arguments="EOL"
16169    new_path="$path"
16170
16171  windows_path="$new_path"
16172  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16173    unix_path=`$CYGPATH -u "$windows_path"`
16174    new_path="$unix_path"
16175  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16176    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16177    new_path="$unix_path"
16178  fi
16179
16180
16181    new_path=`$WHICH "$new_path" 2> /dev/null`
16182    # bat and cmd files are not always considered executable in MSYS causing which
16183    # to not find them
16184    if test "x$new_path" = x \
16185        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16186        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16187      new_path="$path"
16188
16189  windows_path="$new_path"
16190  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16191    unix_path=`$CYGPATH -u "$windows_path"`
16192    new_path="$unix_path"
16193  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16194    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16195    new_path="$unix_path"
16196  fi
16197
16198    fi
16199
16200    if test "x$new_path" = x; then
16201      # It's still not found. Now this is an unrecoverable error.
16202      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16203$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16204      has_space=`$ECHO "$complete" | $GREP " "`
16205      if test "x$has_space" != x; then
16206        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16207$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16208      fi
16209      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16210    fi
16211  fi
16212
16213  # Now new_path has a complete unix path to the binary
16214  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16215    # Keep paths in /bin as-is, but remove trailing .exe if any
16216    new_path="${new_path/%.exe/}"
16217    # Do not save /bin paths to all_fixpath_prefixes!
16218  else
16219    # Not in mixed or Windows style, start by that.
16220    new_path=`cmd //c echo $new_path`
16221
16222  input_path="$new_path"
16223  # Check if we need to convert this using DOS-style short mode. If the path
16224  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16225  # take no chances and rewrite it.
16226  # Note: m4 eats our [], so we need to use [ and ] instead.
16227  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16228  if test "x$has_forbidden_chars" != x; then
16229    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16230    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16231  fi
16232
16233    # Output is in $new_path
16234
16235  windows_path="$new_path"
16236  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16237    unix_path=`$CYGPATH -u "$windows_path"`
16238    new_path="$unix_path"
16239  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16240    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16241    new_path="$unix_path"
16242  fi
16243
16244    # remove trailing .exe if any
16245    new_path="${new_path/%.exe/}"
16246
16247    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16248    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16249  fi
16250
16251    else
16252      # We're on a unix platform. Hooray! :)
16253      # First separate the path from the arguments. This will split at the first
16254      # space.
16255      complete="$FOUND_MAKE"
16256      path="${complete%% *}"
16257      tmp="$complete EOL"
16258      arguments="${tmp#* }"
16259
16260      # Cannot rely on the command "which" here since it doesn't always work.
16261      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16262      if test -z "$is_absolute_path"; then
16263        # Path to executable is not absolute. Find it.
16264        IFS_save="$IFS"
16265        IFS=:
16266        for p in $PATH; do
16267          if test -f "$p/$path" && test -x "$p/$path"; then
16268            new_path="$p/$path"
16269            break
16270          fi
16271        done
16272        IFS="$IFS_save"
16273      else
16274        # This is an absolute path, we can use it without further modifications.
16275        new_path="$path"
16276      fi
16277
16278      if test "x$new_path" = x; then
16279        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16280$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16281        has_space=`$ECHO "$complete" | $GREP " "`
16282        if test "x$has_space" != x; then
16283          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16284$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16285        fi
16286        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16287      fi
16288    fi
16289
16290    # Now join together the path and the arguments once again
16291    if test "x$arguments" != xEOL; then
16292      new_complete="$new_path ${arguments% *}"
16293    else
16294      new_complete="$new_path"
16295    fi
16296
16297    if test "x$complete" != "x$new_complete"; then
16298      FOUND_MAKE="$new_complete"
16299      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16300$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16301    fi
16302  fi
16303
16304        fi
16305      fi
16306    fi
16307  fi
16308
16309
16310    if test "x$FOUND_MAKE" = x; then
16311      for ac_prog in make
16312do
16313  # Extract the first word of "$ac_prog", so it can be a program name with args.
16314set dummy $ac_prog; ac_word=$2
16315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16316$as_echo_n "checking for $ac_word... " >&6; }
16317if ${ac_cv_path_CHECK_MAKE+:} false; then :
16318  $as_echo_n "(cached) " >&6
16319else
16320  case $CHECK_MAKE in
16321  [\\/]* | ?:[\\/]*)
16322  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
16323  ;;
16324  *)
16325  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16326for as_dir in $PATH
16327do
16328  IFS=$as_save_IFS
16329  test -z "$as_dir" && as_dir=.
16330    for ac_exec_ext in '' $ac_executable_extensions; do
16331  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16332    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
16333    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16334    break 2
16335  fi
16336done
16337  done
16338IFS=$as_save_IFS
16339
16340  ;;
16341esac
16342fi
16343CHECK_MAKE=$ac_cv_path_CHECK_MAKE
16344if test -n "$CHECK_MAKE"; then
16345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
16346$as_echo "$CHECK_MAKE" >&6; }
16347else
16348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16349$as_echo "no" >&6; }
16350fi
16351
16352
16353  test -n "$CHECK_MAKE" && break
16354done
16355
16356
16357  MAKE_CANDIDATE=""$CHECK_MAKE""
16358  DESCRIPTION="make in PATH"
16359
16360  # On Cygwin, we require a newer version of make than on other platforms
16361  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16362    MAKE_VERSION_EXPR="-e 4\."
16363    MAKE_REQUIRED_VERSION="4.0"
16364   else
16365    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16366    MAKE_REQUIRED_VERSION="3.81"
16367  fi
16368
16369  if test "x$MAKE_CANDIDATE" != x; then
16370    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16371$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16372    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16373    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16374    if test "x$IS_GNU_MAKE" = x; then
16375      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16376$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16377    else
16378      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
16379      if test "x$IS_MODERN_MAKE" = x; then
16380        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
16381$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
16382      else
16383        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16384          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16385            MAKE_EXPECTED_ENV='cygwin'
16386          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16387            MAKE_EXPECTED_ENV='msys'
16388          else
16389            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16390          fi
16391          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16392          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16393        else
16394          # Not relevant for non-Windows
16395          IS_MAKE_CORRECT_ENV=true
16396        fi
16397        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16398          { $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
16399$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;}
16400        else
16401          FOUND_MAKE=$MAKE_CANDIDATE
16402
16403  # Only process if variable expands to non-empty
16404
16405  if test "x$FOUND_MAKE" != x; then
16406    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16407
16408  # First separate the path from the arguments. This will split at the first
16409  # space.
16410  complete="$FOUND_MAKE"
16411  path="${complete%% *}"
16412  tmp="$complete EOL"
16413  arguments="${tmp#* }"
16414
16415  # Input might be given as Windows format, start by converting to
16416  # unix format.
16417  new_path=`$CYGPATH -u "$path"`
16418
16419  # Now try to locate executable using which
16420  new_path=`$WHICH "$new_path" 2> /dev/null`
16421  # bat and cmd files are not always considered executable in cygwin causing which
16422  # to not find them
16423  if test "x$new_path" = x \
16424      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16425      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16426    new_path=`$CYGPATH -u "$path"`
16427  fi
16428  if test "x$new_path" = x; then
16429    # Oops. Which didn't find the executable.
16430    # The splitting of arguments from the executable at a space might have been incorrect,
16431    # since paths with space are more likely in Windows. Give it another try with the whole
16432    # argument.
16433    path="$complete"
16434    arguments="EOL"
16435    new_path=`$CYGPATH -u "$path"`
16436    new_path=`$WHICH "$new_path" 2> /dev/null`
16437    # bat and cmd files are not always considered executable in cygwin causing which
16438    # to not find them
16439    if test "x$new_path" = x \
16440        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16441        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16442      new_path=`$CYGPATH -u "$path"`
16443    fi
16444    if test "x$new_path" = x; then
16445      # It's still not found. Now this is an unrecoverable error.
16446      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16447$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16448      has_space=`$ECHO "$complete" | $GREP " "`
16449      if test "x$has_space" != x; then
16450        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16451$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16452      fi
16453      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16454    fi
16455  fi
16456
16457  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16458  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16459  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16460  # "foo.exe" is OK but "foo" is an error.
16461  #
16462  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16463  # It is also a way to make sure we got the proper file name for the real test later on.
16464  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16465  if test "x$test_shortpath" = x; then
16466    # Short path failed, file does not exist as specified.
16467    # Try adding .exe or .cmd
16468    if test -f "${new_path}.exe"; then
16469      input_to_shortpath="${new_path}.exe"
16470    elif test -f "${new_path}.cmd"; then
16471      input_to_shortpath="${new_path}.cmd"
16472    else
16473      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16474$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16475      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16476$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16477      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16478    fi
16479  else
16480    input_to_shortpath="$new_path"
16481  fi
16482
16483  # Call helper function which possibly converts this using DOS-style short mode.
16484  # If so, the updated path is stored in $new_path.
16485  new_path="$input_to_shortpath"
16486
16487  input_path="$input_to_shortpath"
16488  # Check if we need to convert this using DOS-style short mode. If the path
16489  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16490  # take no chances and rewrite it.
16491  # Note: m4 eats our [], so we need to use [ and ] instead.
16492  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16493  if test "x$has_forbidden_chars" != x; then
16494    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16495    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16496    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16497    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16498      # Going to short mode and back again did indeed matter. Since short mode is
16499      # case insensitive, let's make it lowercase to improve readability.
16500      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16501      # Now convert it back to Unix-style (cygpath)
16502      input_path=`$CYGPATH -u "$shortmode_path"`
16503      new_path="$input_path"
16504    fi
16505  fi
16506
16507  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16508  if test "x$test_cygdrive_prefix" = x; then
16509    # As a simple fix, exclude /usr/bin since it's not a real path.
16510    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16511      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16512      # a path prefixed by /cygdrive for fixpath to work.
16513      new_path="$CYGWIN_ROOT_PATH$input_path"
16514    fi
16515  fi
16516
16517  # remove trailing .exe if any
16518  new_path="${new_path/%.exe/}"
16519
16520    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16521
16522  # First separate the path from the arguments. This will split at the first
16523  # space.
16524  complete="$FOUND_MAKE"
16525  path="${complete%% *}"
16526  tmp="$complete EOL"
16527  arguments="${tmp#* }"
16528
16529  # Input might be given as Windows format, start by converting to
16530  # unix format.
16531  new_path="$path"
16532
16533  windows_path="$new_path"
16534  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16535    unix_path=`$CYGPATH -u "$windows_path"`
16536    new_path="$unix_path"
16537  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16538    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16539    new_path="$unix_path"
16540  fi
16541
16542
16543  # Now try to locate executable using which
16544  new_path=`$WHICH "$new_path" 2> /dev/null`
16545
16546  if test "x$new_path" = x; then
16547    # Oops. Which didn't find the executable.
16548    # The splitting of arguments from the executable at a space might have been incorrect,
16549    # since paths with space are more likely in Windows. Give it another try with the whole
16550    # argument.
16551    path="$complete"
16552    arguments="EOL"
16553    new_path="$path"
16554
16555  windows_path="$new_path"
16556  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16557    unix_path=`$CYGPATH -u "$windows_path"`
16558    new_path="$unix_path"
16559  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16560    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16561    new_path="$unix_path"
16562  fi
16563
16564
16565    new_path=`$WHICH "$new_path" 2> /dev/null`
16566    # bat and cmd files are not always considered executable in MSYS causing which
16567    # to not find them
16568    if test "x$new_path" = x \
16569        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16570        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16571      new_path="$path"
16572
16573  windows_path="$new_path"
16574  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16575    unix_path=`$CYGPATH -u "$windows_path"`
16576    new_path="$unix_path"
16577  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16578    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16579    new_path="$unix_path"
16580  fi
16581
16582    fi
16583
16584    if test "x$new_path" = x; then
16585      # It's still not found. Now this is an unrecoverable error.
16586      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16587$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16588      has_space=`$ECHO "$complete" | $GREP " "`
16589      if test "x$has_space" != x; then
16590        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16591$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16592      fi
16593      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16594    fi
16595  fi
16596
16597  # Now new_path has a complete unix path to the binary
16598  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16599    # Keep paths in /bin as-is, but remove trailing .exe if any
16600    new_path="${new_path/%.exe/}"
16601    # Do not save /bin paths to all_fixpath_prefixes!
16602  else
16603    # Not in mixed or Windows style, start by that.
16604    new_path=`cmd //c echo $new_path`
16605
16606  input_path="$new_path"
16607  # Check if we need to convert this using DOS-style short mode. If the path
16608  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16609  # take no chances and rewrite it.
16610  # Note: m4 eats our [], so we need to use [ and ] instead.
16611  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16612  if test "x$has_forbidden_chars" != x; then
16613    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16614    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16615  fi
16616
16617    # Output is in $new_path
16618
16619  windows_path="$new_path"
16620  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16621    unix_path=`$CYGPATH -u "$windows_path"`
16622    new_path="$unix_path"
16623  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16624    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16625    new_path="$unix_path"
16626  fi
16627
16628    # remove trailing .exe if any
16629    new_path="${new_path/%.exe/}"
16630
16631    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16632    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16633  fi
16634
16635    else
16636      # We're on a unix platform. Hooray! :)
16637      # First separate the path from the arguments. This will split at the first
16638      # space.
16639      complete="$FOUND_MAKE"
16640      path="${complete%% *}"
16641      tmp="$complete EOL"
16642      arguments="${tmp#* }"
16643
16644      # Cannot rely on the command "which" here since it doesn't always work.
16645      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16646      if test -z "$is_absolute_path"; then
16647        # Path to executable is not absolute. Find it.
16648        IFS_save="$IFS"
16649        IFS=:
16650        for p in $PATH; do
16651          if test -f "$p/$path" && test -x "$p/$path"; then
16652            new_path="$p/$path"
16653            break
16654          fi
16655        done
16656        IFS="$IFS_save"
16657      else
16658        # This is an absolute path, we can use it without further modifications.
16659        new_path="$path"
16660      fi
16661
16662      if test "x$new_path" = x; then
16663        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16664$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16665        has_space=`$ECHO "$complete" | $GREP " "`
16666        if test "x$has_space" != x; then
16667          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16668$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16669        fi
16670        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16671      fi
16672    fi
16673
16674    # Now join together the path and the arguments once again
16675    if test "x$arguments" != xEOL; then
16676      new_complete="$new_path ${arguments% *}"
16677    else
16678      new_complete="$new_path"
16679    fi
16680
16681    if test "x$complete" != "x$new_complete"; then
16682      FOUND_MAKE="$new_complete"
16683      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16684$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16685    fi
16686  fi
16687
16688        fi
16689      fi
16690    fi
16691  fi
16692
16693    fi
16694
16695    if test "x$FOUND_MAKE" = x; then
16696      if test "x$TOOLCHAIN_PATH" != x; then
16697        # We have a toolchain path, check that as well before giving up.
16698        OLD_PATH=$PATH
16699        PATH=$TOOLCHAIN_PATH:$PATH
16700        for ac_prog in gmake
16701do
16702  # Extract the first word of "$ac_prog", so it can be a program name with args.
16703set dummy $ac_prog; ac_word=$2
16704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16705$as_echo_n "checking for $ac_word... " >&6; }
16706if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
16707  $as_echo_n "(cached) " >&6
16708else
16709  case $CHECK_TOOLSDIR_GMAKE in
16710  [\\/]* | ?:[\\/]*)
16711  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
16712  ;;
16713  *)
16714  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16715for as_dir in $PATH
16716do
16717  IFS=$as_save_IFS
16718  test -z "$as_dir" && as_dir=.
16719    for ac_exec_ext in '' $ac_executable_extensions; do
16720  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16721    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16722    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16723    break 2
16724  fi
16725done
16726  done
16727IFS=$as_save_IFS
16728
16729  ;;
16730esac
16731fi
16732CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
16733if test -n "$CHECK_TOOLSDIR_GMAKE"; then
16734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
16735$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
16736else
16737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16738$as_echo "no" >&6; }
16739fi
16740
16741
16742  test -n "$CHECK_TOOLSDIR_GMAKE" && break
16743done
16744
16745
16746  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
16747  DESCRIPTION="gmake in tools-dir"
16748
16749  # On Cygwin, we require a newer version of make than on other platforms
16750  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16751    MAKE_VERSION_EXPR="-e 4\."
16752    MAKE_REQUIRED_VERSION="4.0"
16753   else
16754    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16755    MAKE_REQUIRED_VERSION="3.81"
16756  fi
16757
16758  if test "x$MAKE_CANDIDATE" != x; then
16759    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16760$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16761    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16762    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16763    if test "x$IS_GNU_MAKE" = x; then
16764      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16765$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16766    else
16767      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
16768      if test "x$IS_MODERN_MAKE" = x; then
16769        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
16770$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
16771      else
16772        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16773          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16774            MAKE_EXPECTED_ENV='cygwin'
16775          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16776            MAKE_EXPECTED_ENV='msys'
16777          else
16778            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16779          fi
16780          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16781          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16782        else
16783          # Not relevant for non-Windows
16784          IS_MAKE_CORRECT_ENV=true
16785        fi
16786        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16787          { $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
16788$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;}
16789        else
16790          FOUND_MAKE=$MAKE_CANDIDATE
16791
16792  # Only process if variable expands to non-empty
16793
16794  if test "x$FOUND_MAKE" != x; then
16795    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16796
16797  # First separate the path from the arguments. This will split at the first
16798  # space.
16799  complete="$FOUND_MAKE"
16800  path="${complete%% *}"
16801  tmp="$complete EOL"
16802  arguments="${tmp#* }"
16803
16804  # Input might be given as Windows format, start by converting to
16805  # unix format.
16806  new_path=`$CYGPATH -u "$path"`
16807
16808  # Now try to locate executable using which
16809  new_path=`$WHICH "$new_path" 2> /dev/null`
16810  # bat and cmd files are not always considered executable in cygwin causing which
16811  # to not find them
16812  if test "x$new_path" = x \
16813      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16814      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16815    new_path=`$CYGPATH -u "$path"`
16816  fi
16817  if test "x$new_path" = x; then
16818    # Oops. Which didn't find the executable.
16819    # The splitting of arguments from the executable at a space might have been incorrect,
16820    # since paths with space are more likely in Windows. Give it another try with the whole
16821    # argument.
16822    path="$complete"
16823    arguments="EOL"
16824    new_path=`$CYGPATH -u "$path"`
16825    new_path=`$WHICH "$new_path" 2> /dev/null`
16826    # bat and cmd files are not always considered executable in cygwin causing which
16827    # to not find them
16828    if test "x$new_path" = x \
16829        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16830        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16831      new_path=`$CYGPATH -u "$path"`
16832    fi
16833    if test "x$new_path" = x; then
16834      # It's still not found. Now this is an unrecoverable error.
16835      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16836$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16837      has_space=`$ECHO "$complete" | $GREP " "`
16838      if test "x$has_space" != x; then
16839        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16840$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16841      fi
16842      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16843    fi
16844  fi
16845
16846  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16847  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16848  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16849  # "foo.exe" is OK but "foo" is an error.
16850  #
16851  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16852  # It is also a way to make sure we got the proper file name for the real test later on.
16853  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16854  if test "x$test_shortpath" = x; then
16855    # Short path failed, file does not exist as specified.
16856    # Try adding .exe or .cmd
16857    if test -f "${new_path}.exe"; then
16858      input_to_shortpath="${new_path}.exe"
16859    elif test -f "${new_path}.cmd"; then
16860      input_to_shortpath="${new_path}.cmd"
16861    else
16862      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16863$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16864      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16865$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16866      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16867    fi
16868  else
16869    input_to_shortpath="$new_path"
16870  fi
16871
16872  # Call helper function which possibly converts this using DOS-style short mode.
16873  # If so, the updated path is stored in $new_path.
16874  new_path="$input_to_shortpath"
16875
16876  input_path="$input_to_shortpath"
16877  # Check if we need to convert this using DOS-style short mode. If the path
16878  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16879  # take no chances and rewrite it.
16880  # Note: m4 eats our [], so we need to use [ and ] instead.
16881  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16882  if test "x$has_forbidden_chars" != x; then
16883    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16884    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16885    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16886    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16887      # Going to short mode and back again did indeed matter. Since short mode is
16888      # case insensitive, let's make it lowercase to improve readability.
16889      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16890      # Now convert it back to Unix-style (cygpath)
16891      input_path=`$CYGPATH -u "$shortmode_path"`
16892      new_path="$input_path"
16893    fi
16894  fi
16895
16896  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16897  if test "x$test_cygdrive_prefix" = x; then
16898    # As a simple fix, exclude /usr/bin since it's not a real path.
16899    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16900      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16901      # a path prefixed by /cygdrive for fixpath to work.
16902      new_path="$CYGWIN_ROOT_PATH$input_path"
16903    fi
16904  fi
16905
16906  # remove trailing .exe if any
16907  new_path="${new_path/%.exe/}"
16908
16909    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16910
16911  # First separate the path from the arguments. This will split at the first
16912  # space.
16913  complete="$FOUND_MAKE"
16914  path="${complete%% *}"
16915  tmp="$complete EOL"
16916  arguments="${tmp#* }"
16917
16918  # Input might be given as Windows format, start by converting to
16919  # unix format.
16920  new_path="$path"
16921
16922  windows_path="$new_path"
16923  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16924    unix_path=`$CYGPATH -u "$windows_path"`
16925    new_path="$unix_path"
16926  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16927    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16928    new_path="$unix_path"
16929  fi
16930
16931
16932  # Now try to locate executable using which
16933  new_path=`$WHICH "$new_path" 2> /dev/null`
16934
16935  if test "x$new_path" = x; then
16936    # Oops. Which didn't find the executable.
16937    # The splitting of arguments from the executable at a space might have been incorrect,
16938    # since paths with space are more likely in Windows. Give it another try with the whole
16939    # argument.
16940    path="$complete"
16941    arguments="EOL"
16942    new_path="$path"
16943
16944  windows_path="$new_path"
16945  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16946    unix_path=`$CYGPATH -u "$windows_path"`
16947    new_path="$unix_path"
16948  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16949    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16950    new_path="$unix_path"
16951  fi
16952
16953
16954    new_path=`$WHICH "$new_path" 2> /dev/null`
16955    # bat and cmd files are not always considered executable in MSYS causing which
16956    # to not find them
16957    if test "x$new_path" = x \
16958        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16959        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16960      new_path="$path"
16961
16962  windows_path="$new_path"
16963  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16964    unix_path=`$CYGPATH -u "$windows_path"`
16965    new_path="$unix_path"
16966  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16967    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16968    new_path="$unix_path"
16969  fi
16970
16971    fi
16972
16973    if test "x$new_path" = x; then
16974      # It's still not found. Now this is an unrecoverable error.
16975      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16976$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16977      has_space=`$ECHO "$complete" | $GREP " "`
16978      if test "x$has_space" != x; then
16979        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16980$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16981      fi
16982      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16983    fi
16984  fi
16985
16986  # Now new_path has a complete unix path to the binary
16987  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16988    # Keep paths in /bin as-is, but remove trailing .exe if any
16989    new_path="${new_path/%.exe/}"
16990    # Do not save /bin paths to all_fixpath_prefixes!
16991  else
16992    # Not in mixed or Windows style, start by that.
16993    new_path=`cmd //c echo $new_path`
16994
16995  input_path="$new_path"
16996  # Check if we need to convert this using DOS-style short mode. If the path
16997  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16998  # take no chances and rewrite it.
16999  # Note: m4 eats our [], so we need to use [ and ] instead.
17000  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17001  if test "x$has_forbidden_chars" != x; then
17002    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17003    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17004  fi
17005
17006    # Output is in $new_path
17007
17008  windows_path="$new_path"
17009  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17010    unix_path=`$CYGPATH -u "$windows_path"`
17011    new_path="$unix_path"
17012  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17013    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17014    new_path="$unix_path"
17015  fi
17016
17017    # remove trailing .exe if any
17018    new_path="${new_path/%.exe/}"
17019
17020    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17021    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17022  fi
17023
17024    else
17025      # We're on a unix platform. Hooray! :)
17026      # First separate the path from the arguments. This will split at the first
17027      # space.
17028      complete="$FOUND_MAKE"
17029      path="${complete%% *}"
17030      tmp="$complete EOL"
17031      arguments="${tmp#* }"
17032
17033      # Cannot rely on the command "which" here since it doesn't always work.
17034      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17035      if test -z "$is_absolute_path"; then
17036        # Path to executable is not absolute. Find it.
17037        IFS_save="$IFS"
17038        IFS=:
17039        for p in $PATH; do
17040          if test -f "$p/$path" && test -x "$p/$path"; then
17041            new_path="$p/$path"
17042            break
17043          fi
17044        done
17045        IFS="$IFS_save"
17046      else
17047        # This is an absolute path, we can use it without further modifications.
17048        new_path="$path"
17049      fi
17050
17051      if test "x$new_path" = x; then
17052        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17053$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17054        has_space=`$ECHO "$complete" | $GREP " "`
17055        if test "x$has_space" != x; then
17056          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17057$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17058        fi
17059        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17060      fi
17061    fi
17062
17063    # Now join together the path and the arguments once again
17064    if test "x$arguments" != xEOL; then
17065      new_complete="$new_path ${arguments% *}"
17066    else
17067      new_complete="$new_path"
17068    fi
17069
17070    if test "x$complete" != "x$new_complete"; then
17071      FOUND_MAKE="$new_complete"
17072      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17073$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17074    fi
17075  fi
17076
17077        fi
17078      fi
17079    fi
17080  fi
17081
17082        if test "x$FOUND_MAKE" = x; then
17083          for ac_prog in make
17084do
17085  # Extract the first word of "$ac_prog", so it can be a program name with args.
17086set dummy $ac_prog; ac_word=$2
17087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17088$as_echo_n "checking for $ac_word... " >&6; }
17089if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
17090  $as_echo_n "(cached) " >&6
17091else
17092  case $CHECK_TOOLSDIR_MAKE in
17093  [\\/]* | ?:[\\/]*)
17094  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
17095  ;;
17096  *)
17097  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17098for as_dir in $PATH
17099do
17100  IFS=$as_save_IFS
17101  test -z "$as_dir" && as_dir=.
17102    for ac_exec_ext in '' $ac_executable_extensions; do
17103  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17104    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
17105    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17106    break 2
17107  fi
17108done
17109  done
17110IFS=$as_save_IFS
17111
17112  ;;
17113esac
17114fi
17115CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
17116if test -n "$CHECK_TOOLSDIR_MAKE"; then
17117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
17118$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
17119else
17120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17121$as_echo "no" >&6; }
17122fi
17123
17124
17125  test -n "$CHECK_TOOLSDIR_MAKE" && break
17126done
17127
17128
17129  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
17130  DESCRIPTION="make in tools-dir"
17131
17132  # On Cygwin, we require a newer version of make than on other platforms
17133  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17134    MAKE_VERSION_EXPR="-e 4\."
17135    MAKE_REQUIRED_VERSION="4.0"
17136   else
17137    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17138    MAKE_REQUIRED_VERSION="3.81"
17139  fi
17140
17141  if test "x$MAKE_CANDIDATE" != x; then
17142    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17143$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17144    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17145    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17146    if test "x$IS_GNU_MAKE" = x; then
17147      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17148$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17149    else
17150      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17151      if test "x$IS_MODERN_MAKE" = x; then
17152        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
17153$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
17154      else
17155        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17156          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17157            MAKE_EXPECTED_ENV='cygwin'
17158          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17159            MAKE_EXPECTED_ENV='msys'
17160          else
17161            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17162          fi
17163          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17164          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17165        else
17166          # Not relevant for non-Windows
17167          IS_MAKE_CORRECT_ENV=true
17168        fi
17169        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17170          { $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
17171$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;}
17172        else
17173          FOUND_MAKE=$MAKE_CANDIDATE
17174
17175  # Only process if variable expands to non-empty
17176
17177  if test "x$FOUND_MAKE" != x; then
17178    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17179
17180  # First separate the path from the arguments. This will split at the first
17181  # space.
17182  complete="$FOUND_MAKE"
17183  path="${complete%% *}"
17184  tmp="$complete EOL"
17185  arguments="${tmp#* }"
17186
17187  # Input might be given as Windows format, start by converting to
17188  # unix format.
17189  new_path=`$CYGPATH -u "$path"`
17190
17191  # Now try to locate executable using which
17192  new_path=`$WHICH "$new_path" 2> /dev/null`
17193  # bat and cmd files are not always considered executable in cygwin causing which
17194  # to not find them
17195  if test "x$new_path" = x \
17196      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17197      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17198    new_path=`$CYGPATH -u "$path"`
17199  fi
17200  if test "x$new_path" = x; then
17201    # Oops. Which didn't find the executable.
17202    # The splitting of arguments from the executable at a space might have been incorrect,
17203    # since paths with space are more likely in Windows. Give it another try with the whole
17204    # argument.
17205    path="$complete"
17206    arguments="EOL"
17207    new_path=`$CYGPATH -u "$path"`
17208    new_path=`$WHICH "$new_path" 2> /dev/null`
17209    # bat and cmd files are not always considered executable in cygwin causing which
17210    # to not find them
17211    if test "x$new_path" = x \
17212        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17213        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17214      new_path=`$CYGPATH -u "$path"`
17215    fi
17216    if test "x$new_path" = x; then
17217      # It's still not found. Now this is an unrecoverable error.
17218      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17219$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17220      has_space=`$ECHO "$complete" | $GREP " "`
17221      if test "x$has_space" != x; then
17222        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17223$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17224      fi
17225      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17226    fi
17227  fi
17228
17229  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17230  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17231  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17232  # "foo.exe" is OK but "foo" is an error.
17233  #
17234  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17235  # It is also a way to make sure we got the proper file name for the real test later on.
17236  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17237  if test "x$test_shortpath" = x; then
17238    # Short path failed, file does not exist as specified.
17239    # Try adding .exe or .cmd
17240    if test -f "${new_path}.exe"; then
17241      input_to_shortpath="${new_path}.exe"
17242    elif test -f "${new_path}.cmd"; then
17243      input_to_shortpath="${new_path}.cmd"
17244    else
17245      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17246$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17247      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17248$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17249      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17250    fi
17251  else
17252    input_to_shortpath="$new_path"
17253  fi
17254
17255  # Call helper function which possibly converts this using DOS-style short mode.
17256  # If so, the updated path is stored in $new_path.
17257  new_path="$input_to_shortpath"
17258
17259  input_path="$input_to_shortpath"
17260  # Check if we need to convert this using DOS-style short mode. If the path
17261  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17262  # take no chances and rewrite it.
17263  # Note: m4 eats our [], so we need to use [ and ] instead.
17264  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17265  if test "x$has_forbidden_chars" != x; then
17266    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17267    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17268    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17269    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17270      # Going to short mode and back again did indeed matter. Since short mode is
17271      # case insensitive, let's make it lowercase to improve readability.
17272      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17273      # Now convert it back to Unix-style (cygpath)
17274      input_path=`$CYGPATH -u "$shortmode_path"`
17275      new_path="$input_path"
17276    fi
17277  fi
17278
17279  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17280  if test "x$test_cygdrive_prefix" = x; then
17281    # As a simple fix, exclude /usr/bin since it's not a real path.
17282    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17283      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17284      # a path prefixed by /cygdrive for fixpath to work.
17285      new_path="$CYGWIN_ROOT_PATH$input_path"
17286    fi
17287  fi
17288
17289  # remove trailing .exe if any
17290  new_path="${new_path/%.exe/}"
17291
17292    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17293
17294  # First separate the path from the arguments. This will split at the first
17295  # space.
17296  complete="$FOUND_MAKE"
17297  path="${complete%% *}"
17298  tmp="$complete EOL"
17299  arguments="${tmp#* }"
17300
17301  # Input might be given as Windows format, start by converting to
17302  # unix format.
17303  new_path="$path"
17304
17305  windows_path="$new_path"
17306  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17307    unix_path=`$CYGPATH -u "$windows_path"`
17308    new_path="$unix_path"
17309  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17310    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17311    new_path="$unix_path"
17312  fi
17313
17314
17315  # Now try to locate executable using which
17316  new_path=`$WHICH "$new_path" 2> /dev/null`
17317
17318  if test "x$new_path" = x; then
17319    # Oops. Which didn't find the executable.
17320    # The splitting of arguments from the executable at a space might have been incorrect,
17321    # since paths with space are more likely in Windows. Give it another try with the whole
17322    # argument.
17323    path="$complete"
17324    arguments="EOL"
17325    new_path="$path"
17326
17327  windows_path="$new_path"
17328  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17329    unix_path=`$CYGPATH -u "$windows_path"`
17330    new_path="$unix_path"
17331  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17332    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17333    new_path="$unix_path"
17334  fi
17335
17336
17337    new_path=`$WHICH "$new_path" 2> /dev/null`
17338    # bat and cmd files are not always considered executable in MSYS causing which
17339    # to not find them
17340    if test "x$new_path" = x \
17341        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17342        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17343      new_path="$path"
17344
17345  windows_path="$new_path"
17346  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17347    unix_path=`$CYGPATH -u "$windows_path"`
17348    new_path="$unix_path"
17349  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17350    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17351    new_path="$unix_path"
17352  fi
17353
17354    fi
17355
17356    if test "x$new_path" = x; then
17357      # It's still not found. Now this is an unrecoverable error.
17358      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17359$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17360      has_space=`$ECHO "$complete" | $GREP " "`
17361      if test "x$has_space" != x; then
17362        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17363$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17364      fi
17365      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17366    fi
17367  fi
17368
17369  # Now new_path has a complete unix path to the binary
17370  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17371    # Keep paths in /bin as-is, but remove trailing .exe if any
17372    new_path="${new_path/%.exe/}"
17373    # Do not save /bin paths to all_fixpath_prefixes!
17374  else
17375    # Not in mixed or Windows style, start by that.
17376    new_path=`cmd //c echo $new_path`
17377
17378  input_path="$new_path"
17379  # Check if we need to convert this using DOS-style short mode. If the path
17380  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17381  # take no chances and rewrite it.
17382  # Note: m4 eats our [], so we need to use [ and ] instead.
17383  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17384  if test "x$has_forbidden_chars" != x; then
17385    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17386    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17387  fi
17388
17389    # Output is in $new_path
17390
17391  windows_path="$new_path"
17392  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17393    unix_path=`$CYGPATH -u "$windows_path"`
17394    new_path="$unix_path"
17395  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17396    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17397    new_path="$unix_path"
17398  fi
17399
17400    # remove trailing .exe if any
17401    new_path="${new_path/%.exe/}"
17402
17403    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17404    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17405  fi
17406
17407    else
17408      # We're on a unix platform. Hooray! :)
17409      # First separate the path from the arguments. This will split at the first
17410      # space.
17411      complete="$FOUND_MAKE"
17412      path="${complete%% *}"
17413      tmp="$complete EOL"
17414      arguments="${tmp#* }"
17415
17416      # Cannot rely on the command "which" here since it doesn't always work.
17417      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17418      if test -z "$is_absolute_path"; then
17419        # Path to executable is not absolute. Find it.
17420        IFS_save="$IFS"
17421        IFS=:
17422        for p in $PATH; do
17423          if test -f "$p/$path" && test -x "$p/$path"; then
17424            new_path="$p/$path"
17425            break
17426          fi
17427        done
17428        IFS="$IFS_save"
17429      else
17430        # This is an absolute path, we can use it without further modifications.
17431        new_path="$path"
17432      fi
17433
17434      if test "x$new_path" = x; then
17435        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17436$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17437        has_space=`$ECHO "$complete" | $GREP " "`
17438        if test "x$has_space" != x; then
17439          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17440$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17441        fi
17442        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17443      fi
17444    fi
17445
17446    # Now join together the path and the arguments once again
17447    if test "x$arguments" != xEOL; then
17448      new_complete="$new_path ${arguments% *}"
17449    else
17450      new_complete="$new_path"
17451    fi
17452
17453    if test "x$complete" != "x$new_complete"; then
17454      FOUND_MAKE="$new_complete"
17455      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17456$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17457    fi
17458  fi
17459
17460        fi
17461      fi
17462    fi
17463  fi
17464
17465        fi
17466        PATH=$OLD_PATH
17467      fi
17468    fi
17469
17470    if test "x$FOUND_MAKE" = x; then
17471      as_fn_error $? "Cannot find GNU make $MAKE_REQUIRED_VERSION or newer! Please put it in the path, or add e.g. MAKE=/opt/gmake3.81/make as argument to configure." "$LINENO" 5
17472    fi
17473  fi
17474
17475  MAKE=$FOUND_MAKE
17476
17477  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
17478$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
17479
17480
17481  # Check if make supports the output sync option and if so, setup using it.
17482  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
17483$as_echo_n "checking if make --output-sync is supported... " >&6; }
17484  if $MAKE --version -O > /dev/null 2>&1; then
17485    OUTPUT_SYNC_SUPPORTED=true
17486    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17487$as_echo "yes" >&6; }
17488    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
17489$as_echo_n "checking for output-sync value... " >&6; }
17490
17491# Check whether --with-output-sync was given.
17492if test "${with_output_sync+set}" = set; then :
17493  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
17494fi
17495
17496    if test "x$OUTPUT_SYNC" = "x"; then
17497      OUTPUT_SYNC=none
17498    fi
17499    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
17500$as_echo "$OUTPUT_SYNC" >&6; }
17501    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
17502      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
17503    fi
17504  else
17505    OUTPUT_SYNC_SUPPORTED=false
17506    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17507$as_echo "no" >&6; }
17508  fi
17509
17510
17511
17512
17513
17514
17515  # Test if find supports -delete
17516  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
17517$as_echo_n "checking if find supports -delete... " >&6; }
17518  FIND_DELETE="-delete"
17519
17520  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
17521
17522  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
17523
17524  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
17525  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
17526    # No, it does not.
17527    rm $DELETEDIR/TestIfFindSupportsDelete
17528    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
17529      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
17530      FIND_DELETE="-print | xargs rm"
17531    else
17532      FIND_DELETE="-exec rm \{\} \+"
17533    fi
17534    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17535$as_echo "no" >&6; }
17536  else
17537    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17538$as_echo "yes" >&6; }
17539  fi
17540  rmdir $DELETEDIR
17541
17542
17543
17544  # These tools might not be installed by default,
17545  # need hint on how to install them.
17546
17547
17548
17549  # Publish this variable in the help.
17550
17551
17552  if test "x$UNZIP" = x; then
17553    # The variable is not set by user, try to locate tool using the code snippet
17554    for ac_prog in unzip
17555do
17556  # Extract the first word of "$ac_prog", so it can be a program name with args.
17557set dummy $ac_prog; ac_word=$2
17558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17559$as_echo_n "checking for $ac_word... " >&6; }
17560if ${ac_cv_path_UNZIP+:} false; then :
17561  $as_echo_n "(cached) " >&6
17562else
17563  case $UNZIP in
17564  [\\/]* | ?:[\\/]*)
17565  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17566  ;;
17567  *)
17568  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17569for as_dir in $PATH
17570do
17571  IFS=$as_save_IFS
17572  test -z "$as_dir" && as_dir=.
17573    for ac_exec_ext in '' $ac_executable_extensions; do
17574  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17575    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17576    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17577    break 2
17578  fi
17579done
17580  done
17581IFS=$as_save_IFS
17582
17583  ;;
17584esac
17585fi
17586UNZIP=$ac_cv_path_UNZIP
17587if test -n "$UNZIP"; then
17588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17589$as_echo "$UNZIP" >&6; }
17590else
17591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17592$as_echo "no" >&6; }
17593fi
17594
17595
17596  test -n "$UNZIP" && break
17597done
17598
17599  else
17600    # The variable is set, but is it from the command line or the environment?
17601
17602    # Try to remove the string !UNZIP! from our list.
17603    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
17604    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17605      # If it failed, the variable was not from the command line. Ignore it,
17606      # but warn the user (except for BASH, which is always set by the calling BASH).
17607      if test "xUNZIP" != xBASH; then
17608        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
17609$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
17610      fi
17611      # Try to locate tool using the code snippet
17612      for ac_prog in unzip
17613do
17614  # Extract the first word of "$ac_prog", so it can be a program name with args.
17615set dummy $ac_prog; ac_word=$2
17616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17617$as_echo_n "checking for $ac_word... " >&6; }
17618if ${ac_cv_path_UNZIP+:} false; then :
17619  $as_echo_n "(cached) " >&6
17620else
17621  case $UNZIP in
17622  [\\/]* | ?:[\\/]*)
17623  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17624  ;;
17625  *)
17626  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17627for as_dir in $PATH
17628do
17629  IFS=$as_save_IFS
17630  test -z "$as_dir" && as_dir=.
17631    for ac_exec_ext in '' $ac_executable_extensions; do
17632  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17633    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17634    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17635    break 2
17636  fi
17637done
17638  done
17639IFS=$as_save_IFS
17640
17641  ;;
17642esac
17643fi
17644UNZIP=$ac_cv_path_UNZIP
17645if test -n "$UNZIP"; then
17646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17647$as_echo "$UNZIP" >&6; }
17648else
17649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17650$as_echo "no" >&6; }
17651fi
17652
17653
17654  test -n "$UNZIP" && break
17655done
17656
17657    else
17658      # If it succeeded, then it was overridden by the user. We will use it
17659      # for the tool.
17660
17661      # First remove it from the list of overridden variables, so we can test
17662      # for unknown variables in the end.
17663      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17664
17665      # Check if the provided tool contains a complete path.
17666      tool_specified="$UNZIP"
17667      tool_basename="${tool_specified##*/}"
17668      if test "x$tool_basename" = "x$tool_specified"; then
17669        # A command without a complete path is provided, search $PATH.
17670        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
17671$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
17672        # Extract the first word of "$tool_basename", so it can be a program name with args.
17673set dummy $tool_basename; ac_word=$2
17674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17675$as_echo_n "checking for $ac_word... " >&6; }
17676if ${ac_cv_path_UNZIP+:} false; then :
17677  $as_echo_n "(cached) " >&6
17678else
17679  case $UNZIP in
17680  [\\/]* | ?:[\\/]*)
17681  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17682  ;;
17683  *)
17684  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17685for as_dir in $PATH
17686do
17687  IFS=$as_save_IFS
17688  test -z "$as_dir" && as_dir=.
17689    for ac_exec_ext in '' $ac_executable_extensions; do
17690  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17691    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17692    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17693    break 2
17694  fi
17695done
17696  done
17697IFS=$as_save_IFS
17698
17699  ;;
17700esac
17701fi
17702UNZIP=$ac_cv_path_UNZIP
17703if test -n "$UNZIP"; then
17704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17705$as_echo "$UNZIP" >&6; }
17706else
17707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17708$as_echo "no" >&6; }
17709fi
17710
17711
17712        if test "x$UNZIP" = x; then
17713          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17714        fi
17715      else
17716        # Otherwise we believe it is a complete path. Use it as it is.
17717        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
17718$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
17719        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
17720$as_echo_n "checking for UNZIP... " >&6; }
17721        if test ! -x "$tool_specified"; then
17722          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17723$as_echo "not found" >&6; }
17724          as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17725        fi
17726        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17727$as_echo "$tool_specified" >&6; }
17728      fi
17729    fi
17730  fi
17731
17732
17733
17734  if test "x$UNZIP" = x; then
17735    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
17736  fi
17737
17738
17739
17740
17741
17742  # Publish this variable in the help.
17743
17744
17745  if test "x$ZIP" = x; then
17746    # The variable is not set by user, try to locate tool using the code snippet
17747    for ac_prog in zip
17748do
17749  # Extract the first word of "$ac_prog", so it can be a program name with args.
17750set dummy $ac_prog; ac_word=$2
17751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17752$as_echo_n "checking for $ac_word... " >&6; }
17753if ${ac_cv_path_ZIP+:} false; then :
17754  $as_echo_n "(cached) " >&6
17755else
17756  case $ZIP in
17757  [\\/]* | ?:[\\/]*)
17758  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17759  ;;
17760  *)
17761  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17762for as_dir in $PATH
17763do
17764  IFS=$as_save_IFS
17765  test -z "$as_dir" && as_dir=.
17766    for ac_exec_ext in '' $ac_executable_extensions; do
17767  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17768    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17769    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17770    break 2
17771  fi
17772done
17773  done
17774IFS=$as_save_IFS
17775
17776  ;;
17777esac
17778fi
17779ZIP=$ac_cv_path_ZIP
17780if test -n "$ZIP"; then
17781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17782$as_echo "$ZIP" >&6; }
17783else
17784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17785$as_echo "no" >&6; }
17786fi
17787
17788
17789  test -n "$ZIP" && break
17790done
17791
17792  else
17793    # The variable is set, but is it from the command line or the environment?
17794
17795    # Try to remove the string !ZIP! from our list.
17796    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
17797    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17798      # If it failed, the variable was not from the command line. Ignore it,
17799      # but warn the user (except for BASH, which is always set by the calling BASH).
17800      if test "xZIP" != xBASH; then
17801        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
17802$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
17803      fi
17804      # Try to locate tool using the code snippet
17805      for ac_prog in zip
17806do
17807  # Extract the first word of "$ac_prog", so it can be a program name with args.
17808set dummy $ac_prog; ac_word=$2
17809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17810$as_echo_n "checking for $ac_word... " >&6; }
17811if ${ac_cv_path_ZIP+:} false; then :
17812  $as_echo_n "(cached) " >&6
17813else
17814  case $ZIP in
17815  [\\/]* | ?:[\\/]*)
17816  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17817  ;;
17818  *)
17819  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17820for as_dir in $PATH
17821do
17822  IFS=$as_save_IFS
17823  test -z "$as_dir" && as_dir=.
17824    for ac_exec_ext in '' $ac_executable_extensions; do
17825  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17826    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17827    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17828    break 2
17829  fi
17830done
17831  done
17832IFS=$as_save_IFS
17833
17834  ;;
17835esac
17836fi
17837ZIP=$ac_cv_path_ZIP
17838if test -n "$ZIP"; then
17839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17840$as_echo "$ZIP" >&6; }
17841else
17842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17843$as_echo "no" >&6; }
17844fi
17845
17846
17847  test -n "$ZIP" && break
17848done
17849
17850    else
17851      # If it succeeded, then it was overridden by the user. We will use it
17852      # for the tool.
17853
17854      # First remove it from the list of overridden variables, so we can test
17855      # for unknown variables in the end.
17856      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17857
17858      # Check if the provided tool contains a complete path.
17859      tool_specified="$ZIP"
17860      tool_basename="${tool_specified##*/}"
17861      if test "x$tool_basename" = "x$tool_specified"; then
17862        # A command without a complete path is provided, search $PATH.
17863        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
17864$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
17865        # Extract the first word of "$tool_basename", so it can be a program name with args.
17866set dummy $tool_basename; ac_word=$2
17867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17868$as_echo_n "checking for $ac_word... " >&6; }
17869if ${ac_cv_path_ZIP+:} false; then :
17870  $as_echo_n "(cached) " >&6
17871else
17872  case $ZIP in
17873  [\\/]* | ?:[\\/]*)
17874  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17875  ;;
17876  *)
17877  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17878for as_dir in $PATH
17879do
17880  IFS=$as_save_IFS
17881  test -z "$as_dir" && as_dir=.
17882    for ac_exec_ext in '' $ac_executable_extensions; do
17883  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17884    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17885    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17886    break 2
17887  fi
17888done
17889  done
17890IFS=$as_save_IFS
17891
17892  ;;
17893esac
17894fi
17895ZIP=$ac_cv_path_ZIP
17896if test -n "$ZIP"; then
17897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17898$as_echo "$ZIP" >&6; }
17899else
17900  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17901$as_echo "no" >&6; }
17902fi
17903
17904
17905        if test "x$ZIP" = x; then
17906          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17907        fi
17908      else
17909        # Otherwise we believe it is a complete path. Use it as it is.
17910        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
17911$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
17912        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
17913$as_echo_n "checking for ZIP... " >&6; }
17914        if test ! -x "$tool_specified"; then
17915          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17916$as_echo "not found" >&6; }
17917          as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17918        fi
17919        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17920$as_echo "$tool_specified" >&6; }
17921      fi
17922    fi
17923  fi
17924
17925
17926
17927  if test "x$ZIP" = x; then
17928    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
17929  fi
17930
17931
17932
17933  # Non-required basic tools
17934
17935
17936
17937  # Publish this variable in the help.
17938
17939
17940  if test "x$LDD" = x; then
17941    # The variable is not set by user, try to locate tool using the code snippet
17942    for ac_prog in ldd
17943do
17944  # Extract the first word of "$ac_prog", so it can be a program name with args.
17945set dummy $ac_prog; ac_word=$2
17946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17947$as_echo_n "checking for $ac_word... " >&6; }
17948if ${ac_cv_path_LDD+:} false; then :
17949  $as_echo_n "(cached) " >&6
17950else
17951  case $LDD in
17952  [\\/]* | ?:[\\/]*)
17953  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17954  ;;
17955  *)
17956  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17957for as_dir in $PATH
17958do
17959  IFS=$as_save_IFS
17960  test -z "$as_dir" && as_dir=.
17961    for ac_exec_ext in '' $ac_executable_extensions; do
17962  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17963    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17964    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17965    break 2
17966  fi
17967done
17968  done
17969IFS=$as_save_IFS
17970
17971  ;;
17972esac
17973fi
17974LDD=$ac_cv_path_LDD
17975if test -n "$LDD"; then
17976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17977$as_echo "$LDD" >&6; }
17978else
17979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17980$as_echo "no" >&6; }
17981fi
17982
17983
17984  test -n "$LDD" && break
17985done
17986
17987  else
17988    # The variable is set, but is it from the command line or the environment?
17989
17990    # Try to remove the string !LDD! from our list.
17991    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
17992    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17993      # If it failed, the variable was not from the command line. Ignore it,
17994      # but warn the user (except for BASH, which is always set by the calling BASH).
17995      if test "xLDD" != xBASH; then
17996        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
17997$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
17998      fi
17999      # Try to locate tool using the code snippet
18000      for ac_prog in ldd
18001do
18002  # Extract the first word of "$ac_prog", so it can be a program name with args.
18003set dummy $ac_prog; ac_word=$2
18004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18005$as_echo_n "checking for $ac_word... " >&6; }
18006if ${ac_cv_path_LDD+:} false; then :
18007  $as_echo_n "(cached) " >&6
18008else
18009  case $LDD in
18010  [\\/]* | ?:[\\/]*)
18011  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
18012  ;;
18013  *)
18014  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18015for as_dir in $PATH
18016do
18017  IFS=$as_save_IFS
18018  test -z "$as_dir" && as_dir=.
18019    for ac_exec_ext in '' $ac_executable_extensions; do
18020  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18021    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
18022    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18023    break 2
18024  fi
18025done
18026  done
18027IFS=$as_save_IFS
18028
18029  ;;
18030esac
18031fi
18032LDD=$ac_cv_path_LDD
18033if test -n "$LDD"; then
18034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
18035$as_echo "$LDD" >&6; }
18036else
18037  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18038$as_echo "no" >&6; }
18039fi
18040
18041
18042  test -n "$LDD" && break
18043done
18044
18045    else
18046      # If it succeeded, then it was overridden by the user. We will use it
18047      # for the tool.
18048
18049      # First remove it from the list of overridden variables, so we can test
18050      # for unknown variables in the end.
18051      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18052
18053      # Check if the provided tool contains a complete path.
18054      tool_specified="$LDD"
18055      tool_basename="${tool_specified##*/}"
18056      if test "x$tool_basename" = "x$tool_specified"; then
18057        # A command without a complete path is provided, search $PATH.
18058        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
18059$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
18060        # Extract the first word of "$tool_basename", so it can be a program name with args.
18061set dummy $tool_basename; ac_word=$2
18062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18063$as_echo_n "checking for $ac_word... " >&6; }
18064if ${ac_cv_path_LDD+:} false; then :
18065  $as_echo_n "(cached) " >&6
18066else
18067  case $LDD in
18068  [\\/]* | ?:[\\/]*)
18069  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
18070  ;;
18071  *)
18072  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18073for as_dir in $PATH
18074do
18075  IFS=$as_save_IFS
18076  test -z "$as_dir" && as_dir=.
18077    for ac_exec_ext in '' $ac_executable_extensions; do
18078  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18079    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
18080    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18081    break 2
18082  fi
18083done
18084  done
18085IFS=$as_save_IFS
18086
18087  ;;
18088esac
18089fi
18090LDD=$ac_cv_path_LDD
18091if test -n "$LDD"; then
18092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
18093$as_echo "$LDD" >&6; }
18094else
18095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18096$as_echo "no" >&6; }
18097fi
18098
18099
18100        if test "x$LDD" = x; then
18101          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18102        fi
18103      else
18104        # Otherwise we believe it is a complete path. Use it as it is.
18105        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
18106$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
18107        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
18108$as_echo_n "checking for LDD... " >&6; }
18109        if test ! -x "$tool_specified"; then
18110          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18111$as_echo "not found" >&6; }
18112          as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
18113        fi
18114        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18115$as_echo "$tool_specified" >&6; }
18116      fi
18117    fi
18118  fi
18119
18120
18121  if test "x$LDD" = "x"; then
18122    # List shared lib dependencies is used for
18123    # debug output and checking for forbidden dependencies.
18124    # We can build without it.
18125    LDD="true"
18126  fi
18127
18128
18129  # Publish this variable in the help.
18130
18131
18132  if test "x$OTOOL" = x; then
18133    # The variable is not set by user, try to locate tool using the code snippet
18134    for ac_prog in otool
18135do
18136  # Extract the first word of "$ac_prog", so it can be a program name with args.
18137set dummy $ac_prog; ac_word=$2
18138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18139$as_echo_n "checking for $ac_word... " >&6; }
18140if ${ac_cv_path_OTOOL+:} false; then :
18141  $as_echo_n "(cached) " >&6
18142else
18143  case $OTOOL in
18144  [\\/]* | ?:[\\/]*)
18145  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
18146  ;;
18147  *)
18148  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18149for as_dir in $PATH
18150do
18151  IFS=$as_save_IFS
18152  test -z "$as_dir" && as_dir=.
18153    for ac_exec_ext in '' $ac_executable_extensions; do
18154  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18155    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18156    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18157    break 2
18158  fi
18159done
18160  done
18161IFS=$as_save_IFS
18162
18163  ;;
18164esac
18165fi
18166OTOOL=$ac_cv_path_OTOOL
18167if test -n "$OTOOL"; then
18168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18169$as_echo "$OTOOL" >&6; }
18170else
18171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18172$as_echo "no" >&6; }
18173fi
18174
18175
18176  test -n "$OTOOL" && break
18177done
18178
18179  else
18180    # The variable is set, but is it from the command line or the environment?
18181
18182    # Try to remove the string !OTOOL! from our list.
18183    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
18184    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18185      # If it failed, the variable was not from the command line. Ignore it,
18186      # but warn the user (except for BASH, which is always set by the calling BASH).
18187      if test "xOTOOL" != xBASH; then
18188        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
18189$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
18190      fi
18191      # Try to locate tool using the code snippet
18192      for ac_prog in otool
18193do
18194  # Extract the first word of "$ac_prog", so it can be a program name with args.
18195set dummy $ac_prog; ac_word=$2
18196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18197$as_echo_n "checking for $ac_word... " >&6; }
18198if ${ac_cv_path_OTOOL+:} false; then :
18199  $as_echo_n "(cached) " >&6
18200else
18201  case $OTOOL in
18202  [\\/]* | ?:[\\/]*)
18203  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
18204  ;;
18205  *)
18206  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18207for as_dir in $PATH
18208do
18209  IFS=$as_save_IFS
18210  test -z "$as_dir" && as_dir=.
18211    for ac_exec_ext in '' $ac_executable_extensions; do
18212  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18213    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18214    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18215    break 2
18216  fi
18217done
18218  done
18219IFS=$as_save_IFS
18220
18221  ;;
18222esac
18223fi
18224OTOOL=$ac_cv_path_OTOOL
18225if test -n "$OTOOL"; then
18226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18227$as_echo "$OTOOL" >&6; }
18228else
18229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18230$as_echo "no" >&6; }
18231fi
18232
18233
18234  test -n "$OTOOL" && break
18235done
18236
18237    else
18238      # If it succeeded, then it was overridden by the user. We will use it
18239      # for the tool.
18240
18241      # First remove it from the list of overridden variables, so we can test
18242      # for unknown variables in the end.
18243      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18244
18245      # Check if the provided tool contains a complete path.
18246      tool_specified="$OTOOL"
18247      tool_basename="${tool_specified##*/}"
18248      if test "x$tool_basename" = "x$tool_specified"; then
18249        # A command without a complete path is provided, search $PATH.
18250        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
18251$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
18252        # Extract the first word of "$tool_basename", so it can be a program name with args.
18253set dummy $tool_basename; ac_word=$2
18254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18255$as_echo_n "checking for $ac_word... " >&6; }
18256if ${ac_cv_path_OTOOL+:} false; then :
18257  $as_echo_n "(cached) " >&6
18258else
18259  case $OTOOL in
18260  [\\/]* | ?:[\\/]*)
18261  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
18262  ;;
18263  *)
18264  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18265for as_dir in $PATH
18266do
18267  IFS=$as_save_IFS
18268  test -z "$as_dir" && as_dir=.
18269    for ac_exec_ext in '' $ac_executable_extensions; do
18270  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18271    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18272    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18273    break 2
18274  fi
18275done
18276  done
18277IFS=$as_save_IFS
18278
18279  ;;
18280esac
18281fi
18282OTOOL=$ac_cv_path_OTOOL
18283if test -n "$OTOOL"; then
18284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18285$as_echo "$OTOOL" >&6; }
18286else
18287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18288$as_echo "no" >&6; }
18289fi
18290
18291
18292        if test "x$OTOOL" = x; then
18293          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18294        fi
18295      else
18296        # Otherwise we believe it is a complete path. Use it as it is.
18297        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
18298$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
18299        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
18300$as_echo_n "checking for OTOOL... " >&6; }
18301        if test ! -x "$tool_specified"; then
18302          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18303$as_echo "not found" >&6; }
18304          as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
18305        fi
18306        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18307$as_echo "$tool_specified" >&6; }
18308      fi
18309    fi
18310  fi
18311
18312
18313  if test "x$OTOOL" = "x"; then
18314    OTOOL="true"
18315  fi
18316
18317
18318  # Publish this variable in the help.
18319
18320
18321  if test "x$READELF" = x; then
18322    # The variable is not set by user, try to locate tool using the code snippet
18323    for ac_prog in greadelf readelf
18324do
18325  # Extract the first word of "$ac_prog", so it can be a program name with args.
18326set dummy $ac_prog; ac_word=$2
18327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18328$as_echo_n "checking for $ac_word... " >&6; }
18329if ${ac_cv_path_READELF+:} false; then :
18330  $as_echo_n "(cached) " >&6
18331else
18332  case $READELF in
18333  [\\/]* | ?:[\\/]*)
18334  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18335  ;;
18336  *)
18337  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18338for as_dir in $PATH
18339do
18340  IFS=$as_save_IFS
18341  test -z "$as_dir" && as_dir=.
18342    for ac_exec_ext in '' $ac_executable_extensions; do
18343  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18344    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18345    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18346    break 2
18347  fi
18348done
18349  done
18350IFS=$as_save_IFS
18351
18352  ;;
18353esac
18354fi
18355READELF=$ac_cv_path_READELF
18356if test -n "$READELF"; then
18357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18358$as_echo "$READELF" >&6; }
18359else
18360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18361$as_echo "no" >&6; }
18362fi
18363
18364
18365  test -n "$READELF" && break
18366done
18367
18368  else
18369    # The variable is set, but is it from the command line or the environment?
18370
18371    # Try to remove the string !READELF! from our list.
18372    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
18373    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18374      # If it failed, the variable was not from the command line. Ignore it,
18375      # but warn the user (except for BASH, which is always set by the calling BASH).
18376      if test "xREADELF" != xBASH; then
18377        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
18378$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
18379      fi
18380      # Try to locate tool using the code snippet
18381      for ac_prog in greadelf readelf
18382do
18383  # Extract the first word of "$ac_prog", so it can be a program name with args.
18384set dummy $ac_prog; ac_word=$2
18385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18386$as_echo_n "checking for $ac_word... " >&6; }
18387if ${ac_cv_path_READELF+:} false; then :
18388  $as_echo_n "(cached) " >&6
18389else
18390  case $READELF in
18391  [\\/]* | ?:[\\/]*)
18392  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18393  ;;
18394  *)
18395  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18396for as_dir in $PATH
18397do
18398  IFS=$as_save_IFS
18399  test -z "$as_dir" && as_dir=.
18400    for ac_exec_ext in '' $ac_executable_extensions; do
18401  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18402    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18403    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18404    break 2
18405  fi
18406done
18407  done
18408IFS=$as_save_IFS
18409
18410  ;;
18411esac
18412fi
18413READELF=$ac_cv_path_READELF
18414if test -n "$READELF"; then
18415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18416$as_echo "$READELF" >&6; }
18417else
18418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18419$as_echo "no" >&6; }
18420fi
18421
18422
18423  test -n "$READELF" && break
18424done
18425
18426    else
18427      # If it succeeded, then it was overridden by the user. We will use it
18428      # for the tool.
18429
18430      # First remove it from the list of overridden variables, so we can test
18431      # for unknown variables in the end.
18432      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18433
18434      # Check if the provided tool contains a complete path.
18435      tool_specified="$READELF"
18436      tool_basename="${tool_specified##*/}"
18437      if test "x$tool_basename" = "x$tool_specified"; then
18438        # A command without a complete path is provided, search $PATH.
18439        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
18440$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
18441        # Extract the first word of "$tool_basename", so it can be a program name with args.
18442set dummy $tool_basename; ac_word=$2
18443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18444$as_echo_n "checking for $ac_word... " >&6; }
18445if ${ac_cv_path_READELF+:} false; then :
18446  $as_echo_n "(cached) " >&6
18447else
18448  case $READELF in
18449  [\\/]* | ?:[\\/]*)
18450  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18451  ;;
18452  *)
18453  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18454for as_dir in $PATH
18455do
18456  IFS=$as_save_IFS
18457  test -z "$as_dir" && as_dir=.
18458    for ac_exec_ext in '' $ac_executable_extensions; do
18459  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18460    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18461    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18462    break 2
18463  fi
18464done
18465  done
18466IFS=$as_save_IFS
18467
18468  ;;
18469esac
18470fi
18471READELF=$ac_cv_path_READELF
18472if test -n "$READELF"; then
18473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18474$as_echo "$READELF" >&6; }
18475else
18476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18477$as_echo "no" >&6; }
18478fi
18479
18480
18481        if test "x$READELF" = x; then
18482          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18483        fi
18484      else
18485        # Otherwise we believe it is a complete path. Use it as it is.
18486        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
18487$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
18488        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
18489$as_echo_n "checking for READELF... " >&6; }
18490        if test ! -x "$tool_specified"; then
18491          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18492$as_echo "not found" >&6; }
18493          as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
18494        fi
18495        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18496$as_echo "$tool_specified" >&6; }
18497      fi
18498    fi
18499  fi
18500
18501
18502
18503
18504  # Publish this variable in the help.
18505
18506
18507  if test "x$HG" = x; then
18508    # The variable is not set by user, try to locate tool using the code snippet
18509    for ac_prog in hg
18510do
18511  # Extract the first word of "$ac_prog", so it can be a program name with args.
18512set dummy $ac_prog; ac_word=$2
18513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18514$as_echo_n "checking for $ac_word... " >&6; }
18515if ${ac_cv_path_HG+:} false; then :
18516  $as_echo_n "(cached) " >&6
18517else
18518  case $HG in
18519  [\\/]* | ?:[\\/]*)
18520  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18521  ;;
18522  *)
18523  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18524for as_dir in $PATH
18525do
18526  IFS=$as_save_IFS
18527  test -z "$as_dir" && as_dir=.
18528    for ac_exec_ext in '' $ac_executable_extensions; do
18529  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18530    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18531    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18532    break 2
18533  fi
18534done
18535  done
18536IFS=$as_save_IFS
18537
18538  ;;
18539esac
18540fi
18541HG=$ac_cv_path_HG
18542if test -n "$HG"; then
18543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18544$as_echo "$HG" >&6; }
18545else
18546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18547$as_echo "no" >&6; }
18548fi
18549
18550
18551  test -n "$HG" && break
18552done
18553
18554  else
18555    # The variable is set, but is it from the command line or the environment?
18556
18557    # Try to remove the string !HG! from our list.
18558    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
18559    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18560      # If it failed, the variable was not from the command line. Ignore it,
18561      # but warn the user (except for BASH, which is always set by the calling BASH).
18562      if test "xHG" != xBASH; then
18563        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
18564$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
18565      fi
18566      # Try to locate tool using the code snippet
18567      for ac_prog in hg
18568do
18569  # Extract the first word of "$ac_prog", so it can be a program name with args.
18570set dummy $ac_prog; ac_word=$2
18571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18572$as_echo_n "checking for $ac_word... " >&6; }
18573if ${ac_cv_path_HG+:} false; then :
18574  $as_echo_n "(cached) " >&6
18575else
18576  case $HG in
18577  [\\/]* | ?:[\\/]*)
18578  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18579  ;;
18580  *)
18581  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18582for as_dir in $PATH
18583do
18584  IFS=$as_save_IFS
18585  test -z "$as_dir" && as_dir=.
18586    for ac_exec_ext in '' $ac_executable_extensions; do
18587  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18588    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18589    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18590    break 2
18591  fi
18592done
18593  done
18594IFS=$as_save_IFS
18595
18596  ;;
18597esac
18598fi
18599HG=$ac_cv_path_HG
18600if test -n "$HG"; then
18601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18602$as_echo "$HG" >&6; }
18603else
18604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18605$as_echo "no" >&6; }
18606fi
18607
18608
18609  test -n "$HG" && break
18610done
18611
18612    else
18613      # If it succeeded, then it was overridden by the user. We will use it
18614      # for the tool.
18615
18616      # First remove it from the list of overridden variables, so we can test
18617      # for unknown variables in the end.
18618      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18619
18620      # Check if the provided tool contains a complete path.
18621      tool_specified="$HG"
18622      tool_basename="${tool_specified##*/}"
18623      if test "x$tool_basename" = "x$tool_specified"; then
18624        # A command without a complete path is provided, search $PATH.
18625        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
18626$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
18627        # Extract the first word of "$tool_basename", so it can be a program name with args.
18628set dummy $tool_basename; ac_word=$2
18629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18630$as_echo_n "checking for $ac_word... " >&6; }
18631if ${ac_cv_path_HG+:} false; then :
18632  $as_echo_n "(cached) " >&6
18633else
18634  case $HG in
18635  [\\/]* | ?:[\\/]*)
18636  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18637  ;;
18638  *)
18639  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18640for as_dir in $PATH
18641do
18642  IFS=$as_save_IFS
18643  test -z "$as_dir" && as_dir=.
18644    for ac_exec_ext in '' $ac_executable_extensions; do
18645  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18646    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18647    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18648    break 2
18649  fi
18650done
18651  done
18652IFS=$as_save_IFS
18653
18654  ;;
18655esac
18656fi
18657HG=$ac_cv_path_HG
18658if test -n "$HG"; then
18659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18660$as_echo "$HG" >&6; }
18661else
18662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18663$as_echo "no" >&6; }
18664fi
18665
18666
18667        if test "x$HG" = x; then
18668          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18669        fi
18670      else
18671        # Otherwise we believe it is a complete path. Use it as it is.
18672        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
18673$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
18674        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
18675$as_echo_n "checking for HG... " >&6; }
18676        if test ! -x "$tool_specified"; then
18677          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18678$as_echo "not found" >&6; }
18679          as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
18680        fi
18681        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18682$as_echo "$tool_specified" >&6; }
18683      fi
18684    fi
18685  fi
18686
18687
18688
18689
18690  # Publish this variable in the help.
18691
18692
18693  if test "x$STAT" = x; then
18694    # The variable is not set by user, try to locate tool using the code snippet
18695    for ac_prog in stat
18696do
18697  # Extract the first word of "$ac_prog", so it can be a program name with args.
18698set dummy $ac_prog; ac_word=$2
18699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18700$as_echo_n "checking for $ac_word... " >&6; }
18701if ${ac_cv_path_STAT+:} false; then :
18702  $as_echo_n "(cached) " >&6
18703else
18704  case $STAT in
18705  [\\/]* | ?:[\\/]*)
18706  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18707  ;;
18708  *)
18709  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18710for as_dir in $PATH
18711do
18712  IFS=$as_save_IFS
18713  test -z "$as_dir" && as_dir=.
18714    for ac_exec_ext in '' $ac_executable_extensions; do
18715  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18716    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18717    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18718    break 2
18719  fi
18720done
18721  done
18722IFS=$as_save_IFS
18723
18724  ;;
18725esac
18726fi
18727STAT=$ac_cv_path_STAT
18728if test -n "$STAT"; then
18729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18730$as_echo "$STAT" >&6; }
18731else
18732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18733$as_echo "no" >&6; }
18734fi
18735
18736
18737  test -n "$STAT" && break
18738done
18739
18740  else
18741    # The variable is set, but is it from the command line or the environment?
18742
18743    # Try to remove the string !STAT! from our list.
18744    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
18745    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18746      # If it failed, the variable was not from the command line. Ignore it,
18747      # but warn the user (except for BASH, which is always set by the calling BASH).
18748      if test "xSTAT" != xBASH; then
18749        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
18750$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
18751      fi
18752      # Try to locate tool using the code snippet
18753      for ac_prog in stat
18754do
18755  # Extract the first word of "$ac_prog", so it can be a program name with args.
18756set dummy $ac_prog; ac_word=$2
18757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18758$as_echo_n "checking for $ac_word... " >&6; }
18759if ${ac_cv_path_STAT+:} false; then :
18760  $as_echo_n "(cached) " >&6
18761else
18762  case $STAT in
18763  [\\/]* | ?:[\\/]*)
18764  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18765  ;;
18766  *)
18767  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18768for as_dir in $PATH
18769do
18770  IFS=$as_save_IFS
18771  test -z "$as_dir" && as_dir=.
18772    for ac_exec_ext in '' $ac_executable_extensions; do
18773  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18774    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18775    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18776    break 2
18777  fi
18778done
18779  done
18780IFS=$as_save_IFS
18781
18782  ;;
18783esac
18784fi
18785STAT=$ac_cv_path_STAT
18786if test -n "$STAT"; then
18787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18788$as_echo "$STAT" >&6; }
18789else
18790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18791$as_echo "no" >&6; }
18792fi
18793
18794
18795  test -n "$STAT" && break
18796done
18797
18798    else
18799      # If it succeeded, then it was overridden by the user. We will use it
18800      # for the tool.
18801
18802      # First remove it from the list of overridden variables, so we can test
18803      # for unknown variables in the end.
18804      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18805
18806      # Check if the provided tool contains a complete path.
18807      tool_specified="$STAT"
18808      tool_basename="${tool_specified##*/}"
18809      if test "x$tool_basename" = "x$tool_specified"; then
18810        # A command without a complete path is provided, search $PATH.
18811        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
18812$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
18813        # Extract the first word of "$tool_basename", so it can be a program name with args.
18814set dummy $tool_basename; ac_word=$2
18815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18816$as_echo_n "checking for $ac_word... " >&6; }
18817if ${ac_cv_path_STAT+:} false; then :
18818  $as_echo_n "(cached) " >&6
18819else
18820  case $STAT in
18821  [\\/]* | ?:[\\/]*)
18822  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18823  ;;
18824  *)
18825  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18826for as_dir in $PATH
18827do
18828  IFS=$as_save_IFS
18829  test -z "$as_dir" && as_dir=.
18830    for ac_exec_ext in '' $ac_executable_extensions; do
18831  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18832    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18833    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18834    break 2
18835  fi
18836done
18837  done
18838IFS=$as_save_IFS
18839
18840  ;;
18841esac
18842fi
18843STAT=$ac_cv_path_STAT
18844if test -n "$STAT"; then
18845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18846$as_echo "$STAT" >&6; }
18847else
18848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18849$as_echo "no" >&6; }
18850fi
18851
18852
18853        if test "x$STAT" = x; then
18854          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18855        fi
18856      else
18857        # Otherwise we believe it is a complete path. Use it as it is.
18858        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
18859$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
18860        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
18861$as_echo_n "checking for STAT... " >&6; }
18862        if test ! -x "$tool_specified"; then
18863          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18864$as_echo "not found" >&6; }
18865          as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
18866        fi
18867        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18868$as_echo "$tool_specified" >&6; }
18869      fi
18870    fi
18871  fi
18872
18873
18874
18875
18876  # Publish this variable in the help.
18877
18878
18879  if test "x$TIME" = x; then
18880    # The variable is not set by user, try to locate tool using the code snippet
18881    for ac_prog in time
18882do
18883  # Extract the first word of "$ac_prog", so it can be a program name with args.
18884set dummy $ac_prog; ac_word=$2
18885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18886$as_echo_n "checking for $ac_word... " >&6; }
18887if ${ac_cv_path_TIME+:} false; then :
18888  $as_echo_n "(cached) " >&6
18889else
18890  case $TIME in
18891  [\\/]* | ?:[\\/]*)
18892  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18893  ;;
18894  *)
18895  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18896for as_dir in $PATH
18897do
18898  IFS=$as_save_IFS
18899  test -z "$as_dir" && as_dir=.
18900    for ac_exec_ext in '' $ac_executable_extensions; do
18901  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18902    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18903    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18904    break 2
18905  fi
18906done
18907  done
18908IFS=$as_save_IFS
18909
18910  ;;
18911esac
18912fi
18913TIME=$ac_cv_path_TIME
18914if test -n "$TIME"; then
18915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18916$as_echo "$TIME" >&6; }
18917else
18918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18919$as_echo "no" >&6; }
18920fi
18921
18922
18923  test -n "$TIME" && break
18924done
18925
18926  else
18927    # The variable is set, but is it from the command line or the environment?
18928
18929    # Try to remove the string !TIME! from our list.
18930    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
18931    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18932      # If it failed, the variable was not from the command line. Ignore it,
18933      # but warn the user (except for BASH, which is always set by the calling BASH).
18934      if test "xTIME" != xBASH; then
18935        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
18936$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
18937      fi
18938      # Try to locate tool using the code snippet
18939      for ac_prog in time
18940do
18941  # Extract the first word of "$ac_prog", so it can be a program name with args.
18942set dummy $ac_prog; ac_word=$2
18943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18944$as_echo_n "checking for $ac_word... " >&6; }
18945if ${ac_cv_path_TIME+:} false; then :
18946  $as_echo_n "(cached) " >&6
18947else
18948  case $TIME in
18949  [\\/]* | ?:[\\/]*)
18950  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18951  ;;
18952  *)
18953  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18954for as_dir in $PATH
18955do
18956  IFS=$as_save_IFS
18957  test -z "$as_dir" && as_dir=.
18958    for ac_exec_ext in '' $ac_executable_extensions; do
18959  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18960    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18961    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18962    break 2
18963  fi
18964done
18965  done
18966IFS=$as_save_IFS
18967
18968  ;;
18969esac
18970fi
18971TIME=$ac_cv_path_TIME
18972if test -n "$TIME"; then
18973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18974$as_echo "$TIME" >&6; }
18975else
18976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18977$as_echo "no" >&6; }
18978fi
18979
18980
18981  test -n "$TIME" && break
18982done
18983
18984    else
18985      # If it succeeded, then it was overridden by the user. We will use it
18986      # for the tool.
18987
18988      # First remove it from the list of overridden variables, so we can test
18989      # for unknown variables in the end.
18990      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18991
18992      # Check if the provided tool contains a complete path.
18993      tool_specified="$TIME"
18994      tool_basename="${tool_specified##*/}"
18995      if test "x$tool_basename" = "x$tool_specified"; then
18996        # A command without a complete path is provided, search $PATH.
18997        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
18998$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
18999        # Extract the first word of "$tool_basename", so it can be a program name with args.
19000set dummy $tool_basename; ac_word=$2
19001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19002$as_echo_n "checking for $ac_word... " >&6; }
19003if ${ac_cv_path_TIME+:} false; then :
19004  $as_echo_n "(cached) " >&6
19005else
19006  case $TIME in
19007  [\\/]* | ?:[\\/]*)
19008  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
19009  ;;
19010  *)
19011  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19012for as_dir in $PATH
19013do
19014  IFS=$as_save_IFS
19015  test -z "$as_dir" && as_dir=.
19016    for ac_exec_ext in '' $ac_executable_extensions; do
19017  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19018    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
19019    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19020    break 2
19021  fi
19022done
19023  done
19024IFS=$as_save_IFS
19025
19026  ;;
19027esac
19028fi
19029TIME=$ac_cv_path_TIME
19030if test -n "$TIME"; then
19031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
19032$as_echo "$TIME" >&6; }
19033else
19034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19035$as_echo "no" >&6; }
19036fi
19037
19038
19039        if test "x$TIME" = x; then
19040          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19041        fi
19042      else
19043        # Otherwise we believe it is a complete path. Use it as it is.
19044        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
19045$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
19046        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
19047$as_echo_n "checking for TIME... " >&6; }
19048        if test ! -x "$tool_specified"; then
19049          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19050$as_echo "not found" >&6; }
19051          as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
19052        fi
19053        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19054$as_echo "$tool_specified" >&6; }
19055      fi
19056    fi
19057  fi
19058
19059
19060  # Check if it's GNU time
19061  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
19062  if test "x$IS_GNU_TIME" != x; then
19063    IS_GNU_TIME=yes
19064  else
19065    IS_GNU_TIME=no
19066  fi
19067
19068
19069  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
19070
19071
19072
19073  # Publish this variable in the help.
19074
19075
19076  if test "x$DSYMUTIL" = x; then
19077    # The variable is not set by user, try to locate tool using the code snippet
19078    for ac_prog in dsymutil
19079do
19080  # Extract the first word of "$ac_prog", so it can be a program name with args.
19081set dummy $ac_prog; ac_word=$2
19082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19083$as_echo_n "checking for $ac_word... " >&6; }
19084if ${ac_cv_path_DSYMUTIL+:} false; then :
19085  $as_echo_n "(cached) " >&6
19086else
19087  case $DSYMUTIL in
19088  [\\/]* | ?:[\\/]*)
19089  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19090  ;;
19091  *)
19092  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19093for as_dir in $PATH
19094do
19095  IFS=$as_save_IFS
19096  test -z "$as_dir" && as_dir=.
19097    for ac_exec_ext in '' $ac_executable_extensions; do
19098  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19099    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19100    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19101    break 2
19102  fi
19103done
19104  done
19105IFS=$as_save_IFS
19106
19107  ;;
19108esac
19109fi
19110DSYMUTIL=$ac_cv_path_DSYMUTIL
19111if test -n "$DSYMUTIL"; then
19112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19113$as_echo "$DSYMUTIL" >&6; }
19114else
19115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19116$as_echo "no" >&6; }
19117fi
19118
19119
19120  test -n "$DSYMUTIL" && break
19121done
19122
19123  else
19124    # The variable is set, but is it from the command line or the environment?
19125
19126    # Try to remove the string !DSYMUTIL! from our list.
19127    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
19128    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19129      # If it failed, the variable was not from the command line. Ignore it,
19130      # but warn the user (except for BASH, which is always set by the calling BASH).
19131      if test "xDSYMUTIL" != xBASH; then
19132        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
19133$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
19134      fi
19135      # Try to locate tool using the code snippet
19136      for ac_prog in dsymutil
19137do
19138  # Extract the first word of "$ac_prog", so it can be a program name with args.
19139set dummy $ac_prog; ac_word=$2
19140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19141$as_echo_n "checking for $ac_word... " >&6; }
19142if ${ac_cv_path_DSYMUTIL+:} false; then :
19143  $as_echo_n "(cached) " >&6
19144else
19145  case $DSYMUTIL in
19146  [\\/]* | ?:[\\/]*)
19147  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19148  ;;
19149  *)
19150  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19151for as_dir in $PATH
19152do
19153  IFS=$as_save_IFS
19154  test -z "$as_dir" && as_dir=.
19155    for ac_exec_ext in '' $ac_executable_extensions; do
19156  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19157    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19158    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19159    break 2
19160  fi
19161done
19162  done
19163IFS=$as_save_IFS
19164
19165  ;;
19166esac
19167fi
19168DSYMUTIL=$ac_cv_path_DSYMUTIL
19169if test -n "$DSYMUTIL"; then
19170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19171$as_echo "$DSYMUTIL" >&6; }
19172else
19173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19174$as_echo "no" >&6; }
19175fi
19176
19177
19178  test -n "$DSYMUTIL" && break
19179done
19180
19181    else
19182      # If it succeeded, then it was overridden by the user. We will use it
19183      # for the tool.
19184
19185      # First remove it from the list of overridden variables, so we can test
19186      # for unknown variables in the end.
19187      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19188
19189      # Check if the provided tool contains a complete path.
19190      tool_specified="$DSYMUTIL"
19191      tool_basename="${tool_specified##*/}"
19192      if test "x$tool_basename" = "x$tool_specified"; then
19193        # A command without a complete path is provided, search $PATH.
19194        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
19195$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
19196        # Extract the first word of "$tool_basename", so it can be a program name with args.
19197set dummy $tool_basename; ac_word=$2
19198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19199$as_echo_n "checking for $ac_word... " >&6; }
19200if ${ac_cv_path_DSYMUTIL+:} false; then :
19201  $as_echo_n "(cached) " >&6
19202else
19203  case $DSYMUTIL in
19204  [\\/]* | ?:[\\/]*)
19205  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19206  ;;
19207  *)
19208  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19209for as_dir in $PATH
19210do
19211  IFS=$as_save_IFS
19212  test -z "$as_dir" && as_dir=.
19213    for ac_exec_ext in '' $ac_executable_extensions; do
19214  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19215    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19216    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19217    break 2
19218  fi
19219done
19220  done
19221IFS=$as_save_IFS
19222
19223  ;;
19224esac
19225fi
19226DSYMUTIL=$ac_cv_path_DSYMUTIL
19227if test -n "$DSYMUTIL"; then
19228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19229$as_echo "$DSYMUTIL" >&6; }
19230else
19231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19232$as_echo "no" >&6; }
19233fi
19234
19235
19236        if test "x$DSYMUTIL" = x; then
19237          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19238        fi
19239      else
19240        # Otherwise we believe it is a complete path. Use it as it is.
19241        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
19242$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
19243        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
19244$as_echo_n "checking for DSYMUTIL... " >&6; }
19245        if test ! -x "$tool_specified"; then
19246          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19247$as_echo "not found" >&6; }
19248          as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
19249        fi
19250        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19251$as_echo "$tool_specified" >&6; }
19252      fi
19253    fi
19254  fi
19255
19256
19257
19258  if test "x$DSYMUTIL" = x; then
19259    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
19260  fi
19261
19262
19263
19264
19265
19266  # Publish this variable in the help.
19267
19268
19269  if test "x$XATTR" = x; then
19270    # The variable is not set by user, try to locate tool using the code snippet
19271    for ac_prog in xattr
19272do
19273  # Extract the first word of "$ac_prog", so it can be a program name with args.
19274set dummy $ac_prog; ac_word=$2
19275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19276$as_echo_n "checking for $ac_word... " >&6; }
19277if ${ac_cv_path_XATTR+:} false; then :
19278  $as_echo_n "(cached) " >&6
19279else
19280  case $XATTR in
19281  [\\/]* | ?:[\\/]*)
19282  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19283  ;;
19284  *)
19285  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19286for as_dir in $PATH
19287do
19288  IFS=$as_save_IFS
19289  test -z "$as_dir" && as_dir=.
19290    for ac_exec_ext in '' $ac_executable_extensions; do
19291  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19292    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19293    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19294    break 2
19295  fi
19296done
19297  done
19298IFS=$as_save_IFS
19299
19300  ;;
19301esac
19302fi
19303XATTR=$ac_cv_path_XATTR
19304if test -n "$XATTR"; then
19305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19306$as_echo "$XATTR" >&6; }
19307else
19308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19309$as_echo "no" >&6; }
19310fi
19311
19312
19313  test -n "$XATTR" && break
19314done
19315
19316  else
19317    # The variable is set, but is it from the command line or the environment?
19318
19319    # Try to remove the string !XATTR! from our list.
19320    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
19321    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19322      # If it failed, the variable was not from the command line. Ignore it,
19323      # but warn the user (except for BASH, which is always set by the calling BASH).
19324      if test "xXATTR" != xBASH; then
19325        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
19326$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
19327      fi
19328      # Try to locate tool using the code snippet
19329      for ac_prog in xattr
19330do
19331  # Extract the first word of "$ac_prog", so it can be a program name with args.
19332set dummy $ac_prog; ac_word=$2
19333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19334$as_echo_n "checking for $ac_word... " >&6; }
19335if ${ac_cv_path_XATTR+:} false; then :
19336  $as_echo_n "(cached) " >&6
19337else
19338  case $XATTR in
19339  [\\/]* | ?:[\\/]*)
19340  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19341  ;;
19342  *)
19343  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19344for as_dir in $PATH
19345do
19346  IFS=$as_save_IFS
19347  test -z "$as_dir" && as_dir=.
19348    for ac_exec_ext in '' $ac_executable_extensions; do
19349  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19350    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19351    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19352    break 2
19353  fi
19354done
19355  done
19356IFS=$as_save_IFS
19357
19358  ;;
19359esac
19360fi
19361XATTR=$ac_cv_path_XATTR
19362if test -n "$XATTR"; then
19363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19364$as_echo "$XATTR" >&6; }
19365else
19366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19367$as_echo "no" >&6; }
19368fi
19369
19370
19371  test -n "$XATTR" && break
19372done
19373
19374    else
19375      # If it succeeded, then it was overridden by the user. We will use it
19376      # for the tool.
19377
19378      # First remove it from the list of overridden variables, so we can test
19379      # for unknown variables in the end.
19380      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19381
19382      # Check if the provided tool contains a complete path.
19383      tool_specified="$XATTR"
19384      tool_basename="${tool_specified##*/}"
19385      if test "x$tool_basename" = "x$tool_specified"; then
19386        # A command without a complete path is provided, search $PATH.
19387        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
19388$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
19389        # Extract the first word of "$tool_basename", so it can be a program name with args.
19390set dummy $tool_basename; ac_word=$2
19391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19392$as_echo_n "checking for $ac_word... " >&6; }
19393if ${ac_cv_path_XATTR+:} false; then :
19394  $as_echo_n "(cached) " >&6
19395else
19396  case $XATTR in
19397  [\\/]* | ?:[\\/]*)
19398  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19399  ;;
19400  *)
19401  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19402for as_dir in $PATH
19403do
19404  IFS=$as_save_IFS
19405  test -z "$as_dir" && as_dir=.
19406    for ac_exec_ext in '' $ac_executable_extensions; do
19407  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19408    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19409    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19410    break 2
19411  fi
19412done
19413  done
19414IFS=$as_save_IFS
19415
19416  ;;
19417esac
19418fi
19419XATTR=$ac_cv_path_XATTR
19420if test -n "$XATTR"; then
19421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19422$as_echo "$XATTR" >&6; }
19423else
19424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19425$as_echo "no" >&6; }
19426fi
19427
19428
19429        if test "x$XATTR" = x; then
19430          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19431        fi
19432      else
19433        # Otherwise we believe it is a complete path. Use it as it is.
19434        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
19435$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
19436        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
19437$as_echo_n "checking for XATTR... " >&6; }
19438        if test ! -x "$tool_specified"; then
19439          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19440$as_echo "not found" >&6; }
19441          as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
19442        fi
19443        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19444$as_echo "$tool_specified" >&6; }
19445      fi
19446    fi
19447  fi
19448
19449
19450
19451  if test "x$XATTR" = x; then
19452    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
19453  fi
19454
19455
19456
19457
19458  # Publish this variable in the help.
19459
19460
19461  if test "x$CODESIGN" = x; then
19462    # The variable is not set by user, try to locate tool using the code snippet
19463    for ac_prog in codesign
19464do
19465  # Extract the first word of "$ac_prog", so it can be a program name with args.
19466set dummy $ac_prog; ac_word=$2
19467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19468$as_echo_n "checking for $ac_word... " >&6; }
19469if ${ac_cv_path_CODESIGN+:} false; then :
19470  $as_echo_n "(cached) " >&6
19471else
19472  case $CODESIGN in
19473  [\\/]* | ?:[\\/]*)
19474  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19475  ;;
19476  *)
19477  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19478for as_dir in $PATH
19479do
19480  IFS=$as_save_IFS
19481  test -z "$as_dir" && as_dir=.
19482    for ac_exec_ext in '' $ac_executable_extensions; do
19483  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19484    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19485    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19486    break 2
19487  fi
19488done
19489  done
19490IFS=$as_save_IFS
19491
19492  ;;
19493esac
19494fi
19495CODESIGN=$ac_cv_path_CODESIGN
19496if test -n "$CODESIGN"; then
19497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19498$as_echo "$CODESIGN" >&6; }
19499else
19500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19501$as_echo "no" >&6; }
19502fi
19503
19504
19505  test -n "$CODESIGN" && break
19506done
19507
19508  else
19509    # The variable is set, but is it from the command line or the environment?
19510
19511    # Try to remove the string !CODESIGN! from our list.
19512    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
19513    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19514      # If it failed, the variable was not from the command line. Ignore it,
19515      # but warn the user (except for BASH, which is always set by the calling BASH).
19516      if test "xCODESIGN" != xBASH; then
19517        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
19518$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
19519      fi
19520      # Try to locate tool using the code snippet
19521      for ac_prog in codesign
19522do
19523  # Extract the first word of "$ac_prog", so it can be a program name with args.
19524set dummy $ac_prog; ac_word=$2
19525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19526$as_echo_n "checking for $ac_word... " >&6; }
19527if ${ac_cv_path_CODESIGN+:} false; then :
19528  $as_echo_n "(cached) " >&6
19529else
19530  case $CODESIGN in
19531  [\\/]* | ?:[\\/]*)
19532  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19533  ;;
19534  *)
19535  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19536for as_dir in $PATH
19537do
19538  IFS=$as_save_IFS
19539  test -z "$as_dir" && as_dir=.
19540    for ac_exec_ext in '' $ac_executable_extensions; do
19541  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19542    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19543    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19544    break 2
19545  fi
19546done
19547  done
19548IFS=$as_save_IFS
19549
19550  ;;
19551esac
19552fi
19553CODESIGN=$ac_cv_path_CODESIGN
19554if test -n "$CODESIGN"; then
19555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19556$as_echo "$CODESIGN" >&6; }
19557else
19558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19559$as_echo "no" >&6; }
19560fi
19561
19562
19563  test -n "$CODESIGN" && break
19564done
19565
19566    else
19567      # If it succeeded, then it was overridden by the user. We will use it
19568      # for the tool.
19569
19570      # First remove it from the list of overridden variables, so we can test
19571      # for unknown variables in the end.
19572      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19573
19574      # Check if the provided tool contains a complete path.
19575      tool_specified="$CODESIGN"
19576      tool_basename="${tool_specified##*/}"
19577      if test "x$tool_basename" = "x$tool_specified"; then
19578        # A command without a complete path is provided, search $PATH.
19579        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
19580$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
19581        # Extract the first word of "$tool_basename", so it can be a program name with args.
19582set dummy $tool_basename; ac_word=$2
19583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19584$as_echo_n "checking for $ac_word... " >&6; }
19585if ${ac_cv_path_CODESIGN+:} false; then :
19586  $as_echo_n "(cached) " >&6
19587else
19588  case $CODESIGN in
19589  [\\/]* | ?:[\\/]*)
19590  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19591  ;;
19592  *)
19593  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19594for as_dir in $PATH
19595do
19596  IFS=$as_save_IFS
19597  test -z "$as_dir" && as_dir=.
19598    for ac_exec_ext in '' $ac_executable_extensions; do
19599  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19600    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19601    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19602    break 2
19603  fi
19604done
19605  done
19606IFS=$as_save_IFS
19607
19608  ;;
19609esac
19610fi
19611CODESIGN=$ac_cv_path_CODESIGN
19612if test -n "$CODESIGN"; then
19613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19614$as_echo "$CODESIGN" >&6; }
19615else
19616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19617$as_echo "no" >&6; }
19618fi
19619
19620
19621        if test "x$CODESIGN" = x; then
19622          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19623        fi
19624      else
19625        # Otherwise we believe it is a complete path. Use it as it is.
19626        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
19627$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
19628        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
19629$as_echo_n "checking for CODESIGN... " >&6; }
19630        if test ! -x "$tool_specified"; then
19631          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19632$as_echo "not found" >&6; }
19633          as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
19634        fi
19635        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19636$as_echo "$tool_specified" >&6; }
19637      fi
19638    fi
19639  fi
19640
19641
19642    if test "x$CODESIGN" != "x"; then
19643      # Verify that the openjdk_codesign certificate is present
19644      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
19645$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
19646      rm -f codesign-testfile
19647      touch codesign-testfile
19648      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
19649      rm -f codesign-testfile
19650      if test "x$CODESIGN" = x; then
19651        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19652$as_echo "no" >&6; }
19653      else
19654        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19655$as_echo "yes" >&6; }
19656      fi
19657    fi
19658  fi
19659
19660
19661  # Test if bash supports pipefail.
19662  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
19663$as_echo_n "checking if bash supports pipefail... " >&6; }
19664  if ${BASH} -c 'set -o pipefail'; then
19665    BASH_ARGS="$BASH_ARGS -o pipefail"
19666    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19667$as_echo "yes" >&6; }
19668  else
19669    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19670$as_echo "no" >&6; }
19671  fi
19672
19673  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
19674$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
19675  if ${BASH} -e -c 'true'; then
19676    BASH_ARGS="$BASH_ARGS -e"
19677    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19678$as_echo "yes" >&6; }
19679  else
19680    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19681$as_echo "no" >&6; }
19682  fi
19683
19684
19685
19686
19687# Check if pkg-config is available.
19688
19689
19690if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
19691	if test -n "$ac_tool_prefix"; then
19692  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
19693set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
19694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19695$as_echo_n "checking for $ac_word... " >&6; }
19696if ${ac_cv_path_PKG_CONFIG+:} false; then :
19697  $as_echo_n "(cached) " >&6
19698else
19699  case $PKG_CONFIG in
19700  [\\/]* | ?:[\\/]*)
19701  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
19702  ;;
19703  *)
19704  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19705for as_dir in $PATH
19706do
19707  IFS=$as_save_IFS
19708  test -z "$as_dir" && as_dir=.
19709    for ac_exec_ext in '' $ac_executable_extensions; do
19710  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19711    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19712    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19713    break 2
19714  fi
19715done
19716  done
19717IFS=$as_save_IFS
19718
19719  ;;
19720esac
19721fi
19722PKG_CONFIG=$ac_cv_path_PKG_CONFIG
19723if test -n "$PKG_CONFIG"; then
19724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
19725$as_echo "$PKG_CONFIG" >&6; }
19726else
19727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19728$as_echo "no" >&6; }
19729fi
19730
19731
19732fi
19733if test -z "$ac_cv_path_PKG_CONFIG"; then
19734  ac_pt_PKG_CONFIG=$PKG_CONFIG
19735  # Extract the first word of "pkg-config", so it can be a program name with args.
19736set dummy pkg-config; ac_word=$2
19737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19738$as_echo_n "checking for $ac_word... " >&6; }
19739if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
19740  $as_echo_n "(cached) " >&6
19741else
19742  case $ac_pt_PKG_CONFIG in
19743  [\\/]* | ?:[\\/]*)
19744  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
19745  ;;
19746  *)
19747  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19748for as_dir in $PATH
19749do
19750  IFS=$as_save_IFS
19751  test -z "$as_dir" && as_dir=.
19752    for ac_exec_ext in '' $ac_executable_extensions; do
19753  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19754    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19755    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19756    break 2
19757  fi
19758done
19759  done
19760IFS=$as_save_IFS
19761
19762  ;;
19763esac
19764fi
19765ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
19766if test -n "$ac_pt_PKG_CONFIG"; then
19767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
19768$as_echo "$ac_pt_PKG_CONFIG" >&6; }
19769else
19770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19771$as_echo "no" >&6; }
19772fi
19773
19774  if test "x$ac_pt_PKG_CONFIG" = x; then
19775    PKG_CONFIG=""
19776  else
19777    case $cross_compiling:$ac_tool_warned in
19778yes:)
19779{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19780$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19781ac_tool_warned=yes ;;
19782esac
19783    PKG_CONFIG=$ac_pt_PKG_CONFIG
19784  fi
19785else
19786  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
19787fi
19788
19789fi
19790if test -n "$PKG_CONFIG"; then
19791	_pkg_min_version=0.9.0
19792	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
19793$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
19794	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
19795		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19796$as_echo "yes" >&6; }
19797	else
19798		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19799$as_echo "no" >&6; }
19800		PKG_CONFIG=""
19801	fi
19802
19803fi
19804
19805# After basic tools have been setup, we can check build os specific details.
19806
19807  ###############################################################################
19808
19809  # Note that this is the build platform OS version!
19810
19811  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
19812  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
19813  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
19814  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
19815
19816
19817
19818
19819
19820# Setup builddeps, for automatic downloading of tools we need.
19821# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
19822# boot-jdk setup, but we need to have basic tools setup first.
19823
19824
19825# Check whether --with-builddeps-conf was given.
19826if test "${with_builddeps_conf+set}" = set; then :
19827  withval=$with_builddeps_conf;
19828fi
19829
19830
19831
19832# Check whether --with-builddeps-server was given.
19833if test "${with_builddeps_server+set}" = set; then :
19834  withval=$with_builddeps_server;
19835fi
19836
19837
19838
19839# Check whether --with-builddeps-dir was given.
19840if test "${with_builddeps_dir+set}" = set; then :
19841  withval=$with_builddeps_dir;
19842else
19843  with_builddeps_dir=/localhome/builddeps
19844fi
19845
19846
19847
19848# Check whether --with-builddeps-group was given.
19849if test "${with_builddeps_group+set}" = set; then :
19850  withval=$with_builddeps_group;
19851fi
19852
19853
19854
19855
19856  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
19857    if test "x$with_builddeps_conf" != x; then
19858      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
19859$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
19860      builddepsfile=$with_builddeps_conf
19861      if test -s $builddepsfile; then
19862        . $builddepsfile
19863        { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
19864$as_echo "loaded!" >&6; }
19865      else
19866        as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
19867      fi
19868    else
19869      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
19870$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
19871      builddepsfile=`mktemp`
19872      touch $builddepsfile
19873      # Put all found confs into a single file.
19874      find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
19875      # Source the file to acquire the variables
19876      if test -s $builddepsfile; then
19877        . $builddepsfile
19878        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
19879$as_echo "found at least one!" >&6; }
19880      else
19881        as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
19882      fi
19883    fi
19884    # Create build and target names that use _ instead of "-" and ".".
19885    # This is necessary to use them in variable names.
19886    build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19887    target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19888    # Extract rewrite information for build and target
19889    eval rewritten_build=\${REWRITE_${build_var}}
19890    if test "x$rewritten_build" = x; then
19891      rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
19892      echo Build stays the same $rewritten_build
19893    else
19894      echo Rewriting build for builddeps into $rewritten_build
19895    fi
19896    eval rewritten_target=\${REWRITE_${target_var}}
19897    if test "x$rewritten_target" = x; then
19898      rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
19899      echo Target stays the same $rewritten_target
19900    else
19901      echo Rewriting target for builddeps into $rewritten_target
19902    fi
19903    rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
19904    rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
19905  fi
19906  for ac_prog in 7z unzip
19907do
19908  # Extract the first word of "$ac_prog", so it can be a program name with args.
19909set dummy $ac_prog; ac_word=$2
19910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19911$as_echo_n "checking for $ac_word... " >&6; }
19912if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
19913  $as_echo_n "(cached) " >&6
19914else
19915  if test -n "$BDEPS_UNZIP"; then
19916  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
19917else
19918as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19919for as_dir in $PATH
19920do
19921  IFS=$as_save_IFS
19922  test -z "$as_dir" && as_dir=.
19923    for ac_exec_ext in '' $ac_executable_extensions; do
19924  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19925    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
19926    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19927    break 2
19928  fi
19929done
19930  done
19931IFS=$as_save_IFS
19932
19933fi
19934fi
19935BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
19936if test -n "$BDEPS_UNZIP"; then
19937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
19938$as_echo "$BDEPS_UNZIP" >&6; }
19939else
19940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19941$as_echo "no" >&6; }
19942fi
19943
19944
19945  test -n "$BDEPS_UNZIP" && break
19946done
19947
19948  if test "x$BDEPS_UNZIP" = x7z; then
19949    BDEPS_UNZIP="7z x"
19950  fi
19951
19952  for ac_prog in wget lftp ftp
19953do
19954  # Extract the first word of "$ac_prog", so it can be a program name with args.
19955set dummy $ac_prog; ac_word=$2
19956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19957$as_echo_n "checking for $ac_word... " >&6; }
19958if ${ac_cv_prog_BDEPS_FTP+:} false; then :
19959  $as_echo_n "(cached) " >&6
19960else
19961  if test -n "$BDEPS_FTP"; then
19962  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
19963else
19964as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19965for as_dir in $PATH
19966do
19967  IFS=$as_save_IFS
19968  test -z "$as_dir" && as_dir=.
19969    for ac_exec_ext in '' $ac_executable_extensions; do
19970  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19971    ac_cv_prog_BDEPS_FTP="$ac_prog"
19972    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19973    break 2
19974  fi
19975done
19976  done
19977IFS=$as_save_IFS
19978
19979fi
19980fi
19981BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
19982if test -n "$BDEPS_FTP"; then
19983  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
19984$as_echo "$BDEPS_FTP" >&6; }
19985else
19986  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19987$as_echo "no" >&6; }
19988fi
19989
19990
19991  test -n "$BDEPS_FTP" && break
19992done
19993
19994
19995
19996###############################################################################
19997#
19998# Determine OpenJDK variants, options and version numbers.
19999#
20000###############################################################################
20001
20002# We need build & target for this.
20003
20004
20005  ###############################################################################
20006  #
20007  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
20008  # We always build headless support.
20009  #
20010  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
20011$as_echo_n "checking headful support... " >&6; }
20012  # Check whether --enable-headful was given.
20013if test "${enable_headful+set}" = set; then :
20014  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
20015else
20016  SUPPORT_HEADFUL=yes
20017fi
20018
20019
20020  SUPPORT_HEADLESS=yes
20021  BUILD_HEADLESS="BUILD_HEADLESS:=true"
20022
20023  if test "x$SUPPORT_HEADFUL" = xyes; then
20024    # We are building both headful and headless.
20025    headful_msg="include support for both headful and headless"
20026  fi
20027
20028  if test "x$SUPPORT_HEADFUL" = xno; then
20029    # Thus we are building headless only.
20030    BUILD_HEADLESS="BUILD_HEADLESS:=true"
20031    headful_msg="headless only"
20032  fi
20033
20034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
20035$as_echo "$headful_msg" >&6; }
20036
20037
20038
20039
20040
20041  # Control wether Hotspot runs Queens test after build.
20042  # Check whether --enable-hotspot-test-in-build was given.
20043if test "${enable_hotspot_test_in_build+set}" = set; then :
20044  enableval=$enable_hotspot_test_in_build;
20045else
20046  enable_hotspot_test_in_build=no
20047fi
20048
20049  if test "x$enable_hotspot_test_in_build" = "xyes"; then
20050    TEST_IN_BUILD=true
20051  else
20052    TEST_IN_BUILD=false
20053  fi
20054
20055
20056  ###############################################################################
20057  #
20058  # Choose cacerts source file
20059  #
20060
20061# Check whether --with-cacerts-file was given.
20062if test "${with_cacerts_file+set}" = set; then :
20063  withval=$with_cacerts_file;
20064fi
20065
20066  if test "x$with_cacerts_file" != x; then
20067    CACERTS_FILE=$with_cacerts_file
20068  fi
20069
20070
20071  ###############################################################################
20072  #
20073  # Enable or disable unlimited crypto
20074  #
20075  # Check whether --enable-unlimited-crypto was given.
20076if test "${enable_unlimited_crypto+set}" = set; then :
20077  enableval=$enable_unlimited_crypto;
20078else
20079  enable_unlimited_crypto=no
20080fi
20081
20082  if test "x$enable_unlimited_crypto" = "xyes"; then
20083    UNLIMITED_CRYPTO=true
20084  else
20085    UNLIMITED_CRYPTO=false
20086  fi
20087
20088
20089  ###############################################################################
20090  #
20091  # Enable or disable the elliptic curve crypto implementation
20092  #
20093
20094
20095  ###############################################################################
20096  #
20097  # --enable-rmiconnector-iiop
20098  #
20099  # Check whether --enable-rmiconnector-iiop was given.
20100if test "${enable_rmiconnector_iiop+set}" = set; then :
20101  enableval=$enable_rmiconnector_iiop;
20102fi
20103
20104  if test "x$enable_rmiconnector_iiop" = "xyes"; then
20105    RMICONNECTOR_IIOP=true
20106  else
20107    RMICONNECTOR_IIOP=false
20108  fi
20109
20110
20111  ###############################################################################
20112  #
20113  # Compress jars
20114  #
20115  COMPRESS_JARS=false
20116
20117
20118
20119
20120  # Source the version numbers
20121  . $AUTOCONF_DIR/version-numbers
20122
20123  # Get the settings from parameters
20124
20125# Check whether --with-milestone was given.
20126if test "${with_milestone+set}" = set; then :
20127  withval=$with_milestone;
20128fi
20129
20130  if test "x$with_milestone" = xyes; then
20131    as_fn_error $? "Milestone must have a value" "$LINENO" 5
20132  elif test "x$with_milestone" != x; then
20133    MILESTONE="$with_milestone"
20134  fi
20135  if test "x$MILESTONE" = x; then
20136    MILESTONE=internal
20137  fi
20138
20139
20140# Check whether --with-update-version was given.
20141if test "${with_update_version+set}" = set; then :
20142  withval=$with_update_version;
20143fi
20144
20145  if test "x$with_update_version" = xyes; then
20146    as_fn_error $? "Update version must have a value" "$LINENO" 5
20147  elif test "x$with_update_version" != x; then
20148    JDK_UPDATE_VERSION="$with_update_version"
20149    # On macosx 10.7, it's not possible to set --with-update-version=0X due
20150    # to a bug in expr (which reduces it to just X). To work around this, we
20151    # always add a 0 to one digit update versions.
20152    if test "${#JDK_UPDATE_VERSION}" = "1"; then
20153      JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
20154    fi
20155  fi
20156
20157
20158# Check whether --with-user-release-suffix was given.
20159if test "${with_user_release_suffix+set}" = set; then :
20160  withval=$with_user_release_suffix;
20161fi
20162
20163  if test "x$with_user_release_suffix" = xyes; then
20164    as_fn_error $? "Release suffix must have a value" "$LINENO" 5
20165  elif test "x$with_user_release_suffix" != x; then
20166    USER_RELEASE_SUFFIX="$with_user_release_suffix"
20167  fi
20168
20169
20170# Check whether --with-build-number was given.
20171if test "${with_build_number+set}" = set; then :
20172  withval=$with_build_number;
20173fi
20174
20175  if test "x$with_build_number" = xyes; then
20176    as_fn_error $? "Build number must have a value" "$LINENO" 5
20177  elif test "x$with_build_number" != x; then
20178    JDK_BUILD_NUMBER="$with_build_number"
20179  fi
20180  # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
20181  if test "x$JDK_BUILD_NUMBER" = x; then
20182    JDK_BUILD_NUMBER=b00
20183    if test "x$USER_RELEASE_SUFFIX" = x; then
20184      BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
20185      # Avoid [:alnum:] since it depends on the locale.
20186      CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
20187      USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20188    fi
20189  fi
20190
20191  # Now set the JDK version, milestone, build number etc.
20192
20193
20194
20195
20196
20197
20198
20199
20200
20201
20202
20203
20204
20205
20206
20207
20208# Check whether --with-copyright-year was given.
20209if test "${with_copyright_year+set}" = set; then :
20210  withval=$with_copyright_year;
20211fi
20212
20213  if test "x$with_copyright_year" = xyes; then
20214    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
20215  elif test "x$with_copyright_year" != x; then
20216    COPYRIGHT_YEAR="$with_copyright_year"
20217  else
20218    COPYRIGHT_YEAR=`date +'%Y'`
20219  fi
20220
20221
20222  if test "x$JDK_UPDATE_VERSION" != x; then
20223    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
20224  else
20225    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
20226  fi
20227
20228
20229  COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
20230
20231
20232
20233###############################################################################
20234#
20235# Setup BootJDK, used to bootstrap the build.
20236#
20237###############################################################################
20238
20239
20240  BOOT_JDK_FOUND=no
20241
20242# Check whether --with-boot-jdk was given.
20243if test "${with_boot_jdk+set}" = set; then :
20244  withval=$with_boot_jdk;
20245fi
20246
20247
20248  # We look for the Boot JDK through various means, going from more certain to
20249  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
20250  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
20251  # must check if this is indeed valid; otherwise we'll continue looking.
20252
20253  # Test: Is bootjdk explicitely set by command line arguments?
20254
20255  if test "x$BOOT_JDK_FOUND" = xno; then
20256    # Now execute the test
20257
20258  if test "x$with_boot_jdk" != x; then
20259    BOOT_JDK=$with_boot_jdk
20260    BOOT_JDK_FOUND=maybe
20261    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
20262$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
20263  fi
20264
20265
20266    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20267    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20268      # Do we have a bin/java?
20269      if test ! -x "$BOOT_JDK/bin/java"; then
20270        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20271$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20272        BOOT_JDK_FOUND=no
20273      else
20274        # Do we have a bin/javac?
20275        if test ! -x "$BOOT_JDK/bin/javac"; then
20276          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20277$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20278          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20279$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20280          BOOT_JDK_FOUND=no
20281        else
20282          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20283          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20284
20285          # Extra M4 quote needed to protect [] in grep expression.
20286          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20287          if test "x$FOUND_CORRECT_VERSION" = x; then
20288            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20289$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20290            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20291$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20292            BOOT_JDK_FOUND=no
20293          else
20294            # We're done! :-)
20295            BOOT_JDK_FOUND=yes
20296
20297  # Only process if variable expands to non-empty
20298
20299  if test "x$BOOT_JDK" != x; then
20300    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20301
20302  # Input might be given as Windows format, start by converting to
20303  # unix format.
20304  path="$BOOT_JDK"
20305  new_path=`$CYGPATH -u "$path"`
20306
20307  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20308  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20309  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20310  # "foo.exe" is OK but "foo" is an error.
20311  #
20312  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20313  # It is also a way to make sure we got the proper file name for the real test later on.
20314  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20315  if test "x$test_shortpath" = x; then
20316    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20317$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20318    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20319  fi
20320
20321  # Call helper function which possibly converts this using DOS-style short mode.
20322  # If so, the updated path is stored in $new_path.
20323
20324  input_path="$new_path"
20325  # Check if we need to convert this using DOS-style short mode. If the path
20326  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20327  # take no chances and rewrite it.
20328  # Note: m4 eats our [], so we need to use [ and ] instead.
20329  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20330  if test "x$has_forbidden_chars" != x; then
20331    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20332    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20333    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20334    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20335      # Going to short mode and back again did indeed matter. Since short mode is
20336      # case insensitive, let's make it lowercase to improve readability.
20337      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20338      # Now convert it back to Unix-style (cygpath)
20339      input_path=`$CYGPATH -u "$shortmode_path"`
20340      new_path="$input_path"
20341    fi
20342  fi
20343
20344  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20345  if test "x$test_cygdrive_prefix" = x; then
20346    # As a simple fix, exclude /usr/bin since it's not a real path.
20347    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20348      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20349      # a path prefixed by /cygdrive for fixpath to work.
20350      new_path="$CYGWIN_ROOT_PATH$input_path"
20351    fi
20352  fi
20353
20354
20355  if test "x$path" != "x$new_path"; then
20356    BOOT_JDK="$new_path"
20357    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20358$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20359  fi
20360
20361    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20362
20363  path="$BOOT_JDK"
20364  has_colon=`$ECHO $path | $GREP ^.:`
20365  new_path="$path"
20366  if test "x$has_colon" = x; then
20367    # Not in mixed or Windows style, start by that.
20368    new_path=`cmd //c echo $path`
20369  fi
20370
20371
20372  input_path="$new_path"
20373  # Check if we need to convert this using DOS-style short mode. If the path
20374  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20375  # take no chances and rewrite it.
20376  # Note: m4 eats our [], so we need to use [ and ] instead.
20377  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20378  if test "x$has_forbidden_chars" != x; then
20379    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20380    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20381  fi
20382
20383
20384  windows_path="$new_path"
20385  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20386    unix_path=`$CYGPATH -u "$windows_path"`
20387    new_path="$unix_path"
20388  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20389    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20390    new_path="$unix_path"
20391  fi
20392
20393  if test "x$path" != "x$new_path"; then
20394    BOOT_JDK="$new_path"
20395    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20396$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20397  fi
20398
20399  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20400  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20401
20402    else
20403      # We're on a unix platform. Hooray! :)
20404      path="$BOOT_JDK"
20405      has_space=`$ECHO "$path" | $GREP " "`
20406      if test "x$has_space" != x; then
20407        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20408$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20409        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20410      fi
20411
20412      # Use eval to expand a potential ~
20413      eval path="$path"
20414      if test ! -f "$path" && test ! -d "$path"; then
20415        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20416      fi
20417
20418      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20419    fi
20420  fi
20421
20422            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20423$as_echo_n "checking for Boot JDK... " >&6; }
20424            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20425$as_echo "$BOOT_JDK" >&6; }
20426            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20427$as_echo_n "checking Boot JDK version... " >&6; }
20428            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20429            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20430$as_echo "$BOOT_JDK_VERSION" >&6; }
20431          fi # end check jdk version
20432        fi # end check javac
20433      fi # end check java
20434    fi # end check boot jdk found
20435  fi
20436
20437  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
20438    # Having specified an argument which is incorrect will produce an instant failure;
20439    # we should not go on looking
20440    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
20441  fi
20442
20443  # Test: Is bootjdk available from builddeps?
20444
20445  if test "x$BOOT_JDK_FOUND" = xno; then
20446    # Now execute the test
20447
20448
20449
20450  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
20451    # Source the builddeps file again, to make sure it uses the latest variables!
20452    . $builddepsfile
20453    # Look for a target and build machine specific resource!
20454    eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
20455    if test "x$resource" = x; then
20456      # Ok, lets instead look for a target specific resource
20457      eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
20458    fi
20459    if test "x$resource" = x; then
20460      # Ok, lets instead look for a build specific resource
20461      eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
20462    fi
20463    if test "x$resource" = x; then
20464      # Ok, lets instead look for a generic resource
20465      # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
20466      resource=${builddep_bootjdk}
20467    fi
20468    if test "x$resource" != x; then
20469      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
20470$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
20471      # If the resource in the builddeps.conf file is an existing directory,
20472      # for example /java/linux/cups
20473      if test -d ${resource}; then
20474        depdir=${resource}
20475      else
20476
20477  # bootjdk is for example mymodule
20478  # $resource is for example libs/general/libmymod_1_2_3.zip
20479  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
20480  # $with_builddeps_dir is for example /localhome/builddeps
20481  # depdir is the name of the variable into which we store the depdir, eg MYMOD
20482  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
20483  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
20484  filename=`basename $resource`
20485  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
20486  filebase=${filename%%.*}
20487  extension=${filename#*.}
20488  installdir=$with_builddeps_dir/$filebase
20489  if test ! -f $installdir/$filename.unpacked; then
20490    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
20491$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
20492    if test ! -d $installdir; then
20493      mkdir -p $installdir
20494    fi
20495    if test ! -d $installdir; then
20496      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
20497    fi
20498    tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
20499    touch $tmpfile
20500    if test ! -f $tmpfile; then
20501      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
20502    fi
20503
20504  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
20505  # $tmpfile is the local file name for the downloaded file.
20506  VALID_TOOL=no
20507  if test "x$BDEPS_FTP" = xwget; then
20508    VALID_TOOL=yes
20509    wget -O $tmpfile $with_builddeps_server/$resource
20510  fi
20511  if test "x$BDEPS_FTP" = xlftp; then
20512    VALID_TOOL=yes
20513    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
20514  fi
20515  if test "x$BDEPS_FTP" = xftp; then
20516    VALID_TOOL=yes
20517    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
20518    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
20519    FTPUSERPWD=${FTPSERVER%%@*}
20520    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
20521      FTPUSER=${userpwd%%:*}
20522      FTPPWD=${userpwd#*@}
20523      FTPSERVER=${FTPSERVER#*@}
20524    else
20525      FTPUSER=ftp
20526      FTPPWD=ftp
20527    fi
20528    # the "pass" command does not work on some
20529    # ftp clients (read ftp.exe) but if it works,
20530    # passive mode is better!
20531    ( \
20532        echo "user $FTPUSER $FTPPWD"        ; \
20533        echo "pass"                         ; \
20534        echo "bin"                          ; \
20535        echo "get $FTPPATH $tmpfile"              ; \
20536    ) | ftp -in $FTPSERVER
20537  fi
20538  if test "x$VALID_TOOL" != xyes; then
20539    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
20540  fi
20541
20542    mv $tmpfile $installdir/$filename
20543    if test ! -s $installdir/$filename; then
20544      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
20545    fi
20546    case "$extension" in
20547      zip)  echo "Unzipping $installdir/$filename..."
20548        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
20549        ;;
20550      tar.gz) echo "Untaring $installdir/$filename..."
20551        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20552        ;;
20553      tgz) echo "Untaring $installdir/$filename..."
20554        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20555        ;;
20556      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
20557        ;;
20558    esac
20559  fi
20560  if test -f $installdir/$filename.unpacked; then
20561    depdir=$installdir
20562  fi
20563
20564      fi
20565      # Source the builddeps file again, because in the previous command, the depdir
20566      # was updated to point at the current build dependency install directory.
20567      . $builddepsfile
20568      # Now extract variables from the builddeps.conf files.
20569      theroot=${builddep_bootjdk_ROOT}
20570      thecflags=${builddep_bootjdk_CFLAGS}
20571      thelibs=${builddep_bootjdk_LIBS}
20572      if test "x$depdir" = x; then
20573        as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
20574      fi
20575      BOOT_JDK=$depdir
20576      if test "x$theroot" != x; then
20577        BOOT_JDK="$theroot"
20578      fi
20579      if test "x$thecflags" != x; then
20580        BOOT_JDK_CFLAGS="$thecflags"
20581      fi
20582      if test "x$thelibs" != x; then
20583        BOOT_JDK_LIBS="$thelibs"
20584      fi
20585      BOOT_JDK_FOUND=maybe
20586      else BOOT_JDK_FOUND=no
20587
20588    fi
20589    else BOOT_JDK_FOUND=no
20590
20591  fi
20592
20593
20594
20595    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20596    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20597      # Do we have a bin/java?
20598      if test ! -x "$BOOT_JDK/bin/java"; then
20599        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20600$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20601        BOOT_JDK_FOUND=no
20602      else
20603        # Do we have a bin/javac?
20604        if test ! -x "$BOOT_JDK/bin/javac"; then
20605          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20606$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20607          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20608$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20609          BOOT_JDK_FOUND=no
20610        else
20611          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20612          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20613
20614          # Extra M4 quote needed to protect [] in grep expression.
20615          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20616          if test "x$FOUND_CORRECT_VERSION" = x; then
20617            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20618$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20619            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20620$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20621            BOOT_JDK_FOUND=no
20622          else
20623            # We're done! :-)
20624            BOOT_JDK_FOUND=yes
20625
20626  # Only process if variable expands to non-empty
20627
20628  if test "x$BOOT_JDK" != x; then
20629    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20630
20631  # Input might be given as Windows format, start by converting to
20632  # unix format.
20633  path="$BOOT_JDK"
20634  new_path=`$CYGPATH -u "$path"`
20635
20636  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20637  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20638  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20639  # "foo.exe" is OK but "foo" is an error.
20640  #
20641  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20642  # It is also a way to make sure we got the proper file name for the real test later on.
20643  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20644  if test "x$test_shortpath" = x; then
20645    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20646$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20647    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20648  fi
20649
20650  # Call helper function which possibly converts this using DOS-style short mode.
20651  # If so, the updated path is stored in $new_path.
20652
20653  input_path="$new_path"
20654  # Check if we need to convert this using DOS-style short mode. If the path
20655  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20656  # take no chances and rewrite it.
20657  # Note: m4 eats our [], so we need to use [ and ] instead.
20658  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20659  if test "x$has_forbidden_chars" != x; then
20660    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20661    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20662    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20663    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20664      # Going to short mode and back again did indeed matter. Since short mode is
20665      # case insensitive, let's make it lowercase to improve readability.
20666      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20667      # Now convert it back to Unix-style (cygpath)
20668      input_path=`$CYGPATH -u "$shortmode_path"`
20669      new_path="$input_path"
20670    fi
20671  fi
20672
20673  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20674  if test "x$test_cygdrive_prefix" = x; then
20675    # As a simple fix, exclude /usr/bin since it's not a real path.
20676    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20677      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20678      # a path prefixed by /cygdrive for fixpath to work.
20679      new_path="$CYGWIN_ROOT_PATH$input_path"
20680    fi
20681  fi
20682
20683
20684  if test "x$path" != "x$new_path"; then
20685    BOOT_JDK="$new_path"
20686    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20687$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20688  fi
20689
20690    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20691
20692  path="$BOOT_JDK"
20693  has_colon=`$ECHO $path | $GREP ^.:`
20694  new_path="$path"
20695  if test "x$has_colon" = x; then
20696    # Not in mixed or Windows style, start by that.
20697    new_path=`cmd //c echo $path`
20698  fi
20699
20700
20701  input_path="$new_path"
20702  # Check if we need to convert this using DOS-style short mode. If the path
20703  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20704  # take no chances and rewrite it.
20705  # Note: m4 eats our [], so we need to use [ and ] instead.
20706  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20707  if test "x$has_forbidden_chars" != x; then
20708    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20709    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20710  fi
20711
20712
20713  windows_path="$new_path"
20714  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20715    unix_path=`$CYGPATH -u "$windows_path"`
20716    new_path="$unix_path"
20717  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20718    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20719    new_path="$unix_path"
20720  fi
20721
20722  if test "x$path" != "x$new_path"; then
20723    BOOT_JDK="$new_path"
20724    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20725$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20726  fi
20727
20728  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20729  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20730
20731    else
20732      # We're on a unix platform. Hooray! :)
20733      path="$BOOT_JDK"
20734      has_space=`$ECHO "$path" | $GREP " "`
20735      if test "x$has_space" != x; then
20736        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20737$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20738        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20739      fi
20740
20741      # Use eval to expand a potential ~
20742      eval path="$path"
20743      if test ! -f "$path" && test ! -d "$path"; then
20744        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20745      fi
20746
20747      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20748    fi
20749  fi
20750
20751            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20752$as_echo_n "checking for Boot JDK... " >&6; }
20753            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20754$as_echo "$BOOT_JDK" >&6; }
20755            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20756$as_echo_n "checking Boot JDK version... " >&6; }
20757            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20758            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20759$as_echo "$BOOT_JDK_VERSION" >&6; }
20760          fi # end check jdk version
20761        fi # end check javac
20762      fi # end check java
20763    fi # end check boot jdk found
20764  fi
20765
20766
20767  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
20768
20769  if test "x$BOOT_JDK_FOUND" = xno; then
20770    # Now execute the test
20771
20772  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
20773    # First check at user selected default
20774
20775  if test "x$BOOT_JDK_FOUND" = xno; then
20776    # Now execute the test
20777
20778  if test -x /usr/libexec/java_home; then
20779    BOOT_JDK=`/usr/libexec/java_home `
20780    BOOT_JDK_FOUND=maybe
20781    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
20782$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
20783  fi
20784
20785
20786    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20787    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20788      # Do we have a bin/java?
20789      if test ! -x "$BOOT_JDK/bin/java"; then
20790        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20791$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20792        BOOT_JDK_FOUND=no
20793      else
20794        # Do we have a bin/javac?
20795        if test ! -x "$BOOT_JDK/bin/javac"; then
20796          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20797$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20798          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20799$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20800          BOOT_JDK_FOUND=no
20801        else
20802          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20803          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20804
20805          # Extra M4 quote needed to protect [] in grep expression.
20806          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20807          if test "x$FOUND_CORRECT_VERSION" = x; then
20808            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20809$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20810            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20811$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20812            BOOT_JDK_FOUND=no
20813          else
20814            # We're done! :-)
20815            BOOT_JDK_FOUND=yes
20816
20817  # Only process if variable expands to non-empty
20818
20819  if test "x$BOOT_JDK" != x; then
20820    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20821
20822  # Input might be given as Windows format, start by converting to
20823  # unix format.
20824  path="$BOOT_JDK"
20825  new_path=`$CYGPATH -u "$path"`
20826
20827  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20828  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20829  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20830  # "foo.exe" is OK but "foo" is an error.
20831  #
20832  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20833  # It is also a way to make sure we got the proper file name for the real test later on.
20834  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20835  if test "x$test_shortpath" = x; then
20836    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20837$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20838    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20839  fi
20840
20841  # Call helper function which possibly converts this using DOS-style short mode.
20842  # If so, the updated path is stored in $new_path.
20843
20844  input_path="$new_path"
20845  # Check if we need to convert this using DOS-style short mode. If the path
20846  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20847  # take no chances and rewrite it.
20848  # Note: m4 eats our [], so we need to use [ and ] instead.
20849  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20850  if test "x$has_forbidden_chars" != x; then
20851    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20852    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20853    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20854    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20855      # Going to short mode and back again did indeed matter. Since short mode is
20856      # case insensitive, let's make it lowercase to improve readability.
20857      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20858      # Now convert it back to Unix-style (cygpath)
20859      input_path=`$CYGPATH -u "$shortmode_path"`
20860      new_path="$input_path"
20861    fi
20862  fi
20863
20864  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20865  if test "x$test_cygdrive_prefix" = x; then
20866    # As a simple fix, exclude /usr/bin since it's not a real path.
20867    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20868      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20869      # a path prefixed by /cygdrive for fixpath to work.
20870      new_path="$CYGWIN_ROOT_PATH$input_path"
20871    fi
20872  fi
20873
20874
20875  if test "x$path" != "x$new_path"; then
20876    BOOT_JDK="$new_path"
20877    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20878$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20879  fi
20880
20881    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20882
20883  path="$BOOT_JDK"
20884  has_colon=`$ECHO $path | $GREP ^.:`
20885  new_path="$path"
20886  if test "x$has_colon" = x; then
20887    # Not in mixed or Windows style, start by that.
20888    new_path=`cmd //c echo $path`
20889  fi
20890
20891
20892  input_path="$new_path"
20893  # Check if we need to convert this using DOS-style short mode. If the path
20894  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20895  # take no chances and rewrite it.
20896  # Note: m4 eats our [], so we need to use [ and ] instead.
20897  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20898  if test "x$has_forbidden_chars" != x; then
20899    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20900    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20901  fi
20902
20903
20904  windows_path="$new_path"
20905  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20906    unix_path=`$CYGPATH -u "$windows_path"`
20907    new_path="$unix_path"
20908  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20909    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20910    new_path="$unix_path"
20911  fi
20912
20913  if test "x$path" != "x$new_path"; then
20914    BOOT_JDK="$new_path"
20915    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20916$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20917  fi
20918
20919  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20920  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20921
20922    else
20923      # We're on a unix platform. Hooray! :)
20924      path="$BOOT_JDK"
20925      has_space=`$ECHO "$path" | $GREP " "`
20926      if test "x$has_space" != x; then
20927        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20928$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20929        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20930      fi
20931
20932      # Use eval to expand a potential ~
20933      eval path="$path"
20934      if test ! -f "$path" && test ! -d "$path"; then
20935        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20936      fi
20937
20938      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20939    fi
20940  fi
20941
20942            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20943$as_echo_n "checking for Boot JDK... " >&6; }
20944            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20945$as_echo "$BOOT_JDK" >&6; }
20946            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20947$as_echo_n "checking Boot JDK version... " >&6; }
20948            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20949            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20950$as_echo "$BOOT_JDK_VERSION" >&6; }
20951          fi # end check jdk version
20952        fi # end check javac
20953      fi # end check java
20954    fi # end check boot jdk found
20955  fi
20956
20957    # If that did not work out (e.g. too old), try explicit versions instead
20958
20959  if test "x$BOOT_JDK_FOUND" = xno; then
20960    # Now execute the test
20961
20962  if test -x /usr/libexec/java_home; then
20963    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
20964    BOOT_JDK_FOUND=maybe
20965    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
20966$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
20967  fi
20968
20969
20970    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20971    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20972      # Do we have a bin/java?
20973      if test ! -x "$BOOT_JDK/bin/java"; then
20974        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20975$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20976        BOOT_JDK_FOUND=no
20977      else
20978        # Do we have a bin/javac?
20979        if test ! -x "$BOOT_JDK/bin/javac"; then
20980          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20981$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20982          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20983$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20984          BOOT_JDK_FOUND=no
20985        else
20986          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20987          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20988
20989          # Extra M4 quote needed to protect [] in grep expression.
20990          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20991          if test "x$FOUND_CORRECT_VERSION" = x; then
20992            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20993$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20994            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20995$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20996            BOOT_JDK_FOUND=no
20997          else
20998            # We're done! :-)
20999            BOOT_JDK_FOUND=yes
21000
21001  # Only process if variable expands to non-empty
21002
21003  if test "x$BOOT_JDK" != x; then
21004    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21005
21006  # Input might be given as Windows format, start by converting to
21007  # unix format.
21008  path="$BOOT_JDK"
21009  new_path=`$CYGPATH -u "$path"`
21010
21011  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21012  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21013  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21014  # "foo.exe" is OK but "foo" is an error.
21015  #
21016  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21017  # It is also a way to make sure we got the proper file name for the real test later on.
21018  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21019  if test "x$test_shortpath" = x; then
21020    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21021$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21022    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21023  fi
21024
21025  # Call helper function which possibly converts this using DOS-style short mode.
21026  # If so, the updated path is stored in $new_path.
21027
21028  input_path="$new_path"
21029  # Check if we need to convert this using DOS-style short mode. If the path
21030  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21031  # take no chances and rewrite it.
21032  # Note: m4 eats our [], so we need to use [ and ] instead.
21033  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21034  if test "x$has_forbidden_chars" != x; then
21035    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21036    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21037    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21038    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21039      # Going to short mode and back again did indeed matter. Since short mode is
21040      # case insensitive, let's make it lowercase to improve readability.
21041      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21042      # Now convert it back to Unix-style (cygpath)
21043      input_path=`$CYGPATH -u "$shortmode_path"`
21044      new_path="$input_path"
21045    fi
21046  fi
21047
21048  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21049  if test "x$test_cygdrive_prefix" = x; then
21050    # As a simple fix, exclude /usr/bin since it's not a real path.
21051    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21052      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21053      # a path prefixed by /cygdrive for fixpath to work.
21054      new_path="$CYGWIN_ROOT_PATH$input_path"
21055    fi
21056  fi
21057
21058
21059  if test "x$path" != "x$new_path"; then
21060    BOOT_JDK="$new_path"
21061    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21062$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21063  fi
21064
21065    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21066
21067  path="$BOOT_JDK"
21068  has_colon=`$ECHO $path | $GREP ^.:`
21069  new_path="$path"
21070  if test "x$has_colon" = x; then
21071    # Not in mixed or Windows style, start by that.
21072    new_path=`cmd //c echo $path`
21073  fi
21074
21075
21076  input_path="$new_path"
21077  # Check if we need to convert this using DOS-style short mode. If the path
21078  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21079  # take no chances and rewrite it.
21080  # Note: m4 eats our [], so we need to use [ and ] instead.
21081  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21082  if test "x$has_forbidden_chars" != x; then
21083    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21084    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21085  fi
21086
21087
21088  windows_path="$new_path"
21089  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21090    unix_path=`$CYGPATH -u "$windows_path"`
21091    new_path="$unix_path"
21092  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21093    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21094    new_path="$unix_path"
21095  fi
21096
21097  if test "x$path" != "x$new_path"; then
21098    BOOT_JDK="$new_path"
21099    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21100$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21101  fi
21102
21103  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21104  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21105
21106    else
21107      # We're on a unix platform. Hooray! :)
21108      path="$BOOT_JDK"
21109      has_space=`$ECHO "$path" | $GREP " "`
21110      if test "x$has_space" != x; then
21111        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21112$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21113        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21114      fi
21115
21116      # Use eval to expand a potential ~
21117      eval path="$path"
21118      if test ! -f "$path" && test ! -d "$path"; then
21119        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21120      fi
21121
21122      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21123    fi
21124  fi
21125
21126            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21127$as_echo_n "checking for Boot JDK... " >&6; }
21128            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21129$as_echo "$BOOT_JDK" >&6; }
21130            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21131$as_echo_n "checking Boot JDK version... " >&6; }
21132            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21133            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21134$as_echo "$BOOT_JDK_VERSION" >&6; }
21135          fi # end check jdk version
21136        fi # end check javac
21137      fi # end check java
21138    fi # end check boot jdk found
21139  fi
21140
21141
21142  if test "x$BOOT_JDK_FOUND" = xno; then
21143    # Now execute the test
21144
21145  if test -x /usr/libexec/java_home; then
21146    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
21147    BOOT_JDK_FOUND=maybe
21148    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
21149$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
21150  fi
21151
21152
21153    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21154    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21155      # Do we have a bin/java?
21156      if test ! -x "$BOOT_JDK/bin/java"; then
21157        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21158$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21159        BOOT_JDK_FOUND=no
21160      else
21161        # Do we have a bin/javac?
21162        if test ! -x "$BOOT_JDK/bin/javac"; then
21163          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21164$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21165          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21166$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21167          BOOT_JDK_FOUND=no
21168        else
21169          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21170          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21171
21172          # Extra M4 quote needed to protect [] in grep expression.
21173          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21174          if test "x$FOUND_CORRECT_VERSION" = x; then
21175            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21176$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21177            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21178$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21179            BOOT_JDK_FOUND=no
21180          else
21181            # We're done! :-)
21182            BOOT_JDK_FOUND=yes
21183
21184  # Only process if variable expands to non-empty
21185
21186  if test "x$BOOT_JDK" != x; then
21187    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21188
21189  # Input might be given as Windows format, start by converting to
21190  # unix format.
21191  path="$BOOT_JDK"
21192  new_path=`$CYGPATH -u "$path"`
21193
21194  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21195  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21196  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21197  # "foo.exe" is OK but "foo" is an error.
21198  #
21199  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21200  # It is also a way to make sure we got the proper file name for the real test later on.
21201  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21202  if test "x$test_shortpath" = x; then
21203    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21204$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21205    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21206  fi
21207
21208  # Call helper function which possibly converts this using DOS-style short mode.
21209  # If so, the updated path is stored in $new_path.
21210
21211  input_path="$new_path"
21212  # Check if we need to convert this using DOS-style short mode. If the path
21213  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21214  # take no chances and rewrite it.
21215  # Note: m4 eats our [], so we need to use [ and ] instead.
21216  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21217  if test "x$has_forbidden_chars" != x; then
21218    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21219    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21220    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21221    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21222      # Going to short mode and back again did indeed matter. Since short mode is
21223      # case insensitive, let's make it lowercase to improve readability.
21224      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21225      # Now convert it back to Unix-style (cygpath)
21226      input_path=`$CYGPATH -u "$shortmode_path"`
21227      new_path="$input_path"
21228    fi
21229  fi
21230
21231  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21232  if test "x$test_cygdrive_prefix" = x; then
21233    # As a simple fix, exclude /usr/bin since it's not a real path.
21234    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21235      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21236      # a path prefixed by /cygdrive for fixpath to work.
21237      new_path="$CYGWIN_ROOT_PATH$input_path"
21238    fi
21239  fi
21240
21241
21242  if test "x$path" != "x$new_path"; then
21243    BOOT_JDK="$new_path"
21244    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21245$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21246  fi
21247
21248    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21249
21250  path="$BOOT_JDK"
21251  has_colon=`$ECHO $path | $GREP ^.:`
21252  new_path="$path"
21253  if test "x$has_colon" = x; then
21254    # Not in mixed or Windows style, start by that.
21255    new_path=`cmd //c echo $path`
21256  fi
21257
21258
21259  input_path="$new_path"
21260  # Check if we need to convert this using DOS-style short mode. If the path
21261  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21262  # take no chances and rewrite it.
21263  # Note: m4 eats our [], so we need to use [ and ] instead.
21264  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21265  if test "x$has_forbidden_chars" != x; then
21266    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21267    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21268  fi
21269
21270
21271  windows_path="$new_path"
21272  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21273    unix_path=`$CYGPATH -u "$windows_path"`
21274    new_path="$unix_path"
21275  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21276    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21277    new_path="$unix_path"
21278  fi
21279
21280  if test "x$path" != "x$new_path"; then
21281    BOOT_JDK="$new_path"
21282    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21283$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21284  fi
21285
21286  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21287  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21288
21289    else
21290      # We're on a unix platform. Hooray! :)
21291      path="$BOOT_JDK"
21292      has_space=`$ECHO "$path" | $GREP " "`
21293      if test "x$has_space" != x; then
21294        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21295$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21296        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21297      fi
21298
21299      # Use eval to expand a potential ~
21300      eval path="$path"
21301      if test ! -f "$path" && test ! -d "$path"; then
21302        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21303      fi
21304
21305      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21306    fi
21307  fi
21308
21309            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21310$as_echo_n "checking for Boot JDK... " >&6; }
21311            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21312$as_echo "$BOOT_JDK" >&6; }
21313            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21314$as_echo_n "checking Boot JDK version... " >&6; }
21315            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21316            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21317$as_echo "$BOOT_JDK_VERSION" >&6; }
21318          fi # end check jdk version
21319        fi # end check javac
21320      fi # end check java
21321    fi # end check boot jdk found
21322  fi
21323
21324
21325  if test "x$BOOT_JDK_FOUND" = xno; then
21326    # Now execute the test
21327
21328  if test -x /usr/libexec/java_home; then
21329    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
21330    BOOT_JDK_FOUND=maybe
21331    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
21332$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
21333  fi
21334
21335
21336    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21337    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21338      # Do we have a bin/java?
21339      if test ! -x "$BOOT_JDK/bin/java"; then
21340        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21341$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21342        BOOT_JDK_FOUND=no
21343      else
21344        # Do we have a bin/javac?
21345        if test ! -x "$BOOT_JDK/bin/javac"; then
21346          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21347$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21348          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21349$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21350          BOOT_JDK_FOUND=no
21351        else
21352          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21353          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21354
21355          # Extra M4 quote needed to protect [] in grep expression.
21356          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21357          if test "x$FOUND_CORRECT_VERSION" = x; then
21358            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21359$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21360            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21361$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21362            BOOT_JDK_FOUND=no
21363          else
21364            # We're done! :-)
21365            BOOT_JDK_FOUND=yes
21366
21367  # Only process if variable expands to non-empty
21368
21369  if test "x$BOOT_JDK" != x; then
21370    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21371
21372  # Input might be given as Windows format, start by converting to
21373  # unix format.
21374  path="$BOOT_JDK"
21375  new_path=`$CYGPATH -u "$path"`
21376
21377  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21378  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21379  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21380  # "foo.exe" is OK but "foo" is an error.
21381  #
21382  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21383  # It is also a way to make sure we got the proper file name for the real test later on.
21384  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21385  if test "x$test_shortpath" = x; then
21386    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21387$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21388    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21389  fi
21390
21391  # Call helper function which possibly converts this using DOS-style short mode.
21392  # If so, the updated path is stored in $new_path.
21393
21394  input_path="$new_path"
21395  # Check if we need to convert this using DOS-style short mode. If the path
21396  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21397  # take no chances and rewrite it.
21398  # Note: m4 eats our [], so we need to use [ and ] instead.
21399  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21400  if test "x$has_forbidden_chars" != x; then
21401    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21402    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21403    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21404    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21405      # Going to short mode and back again did indeed matter. Since short mode is
21406      # case insensitive, let's make it lowercase to improve readability.
21407      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21408      # Now convert it back to Unix-style (cygpath)
21409      input_path=`$CYGPATH -u "$shortmode_path"`
21410      new_path="$input_path"
21411    fi
21412  fi
21413
21414  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21415  if test "x$test_cygdrive_prefix" = x; then
21416    # As a simple fix, exclude /usr/bin since it's not a real path.
21417    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21418      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21419      # a path prefixed by /cygdrive for fixpath to work.
21420      new_path="$CYGWIN_ROOT_PATH$input_path"
21421    fi
21422  fi
21423
21424
21425  if test "x$path" != "x$new_path"; then
21426    BOOT_JDK="$new_path"
21427    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21428$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21429  fi
21430
21431    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21432
21433  path="$BOOT_JDK"
21434  has_colon=`$ECHO $path | $GREP ^.:`
21435  new_path="$path"
21436  if test "x$has_colon" = x; then
21437    # Not in mixed or Windows style, start by that.
21438    new_path=`cmd //c echo $path`
21439  fi
21440
21441
21442  input_path="$new_path"
21443  # Check if we need to convert this using DOS-style short mode. If the path
21444  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21445  # take no chances and rewrite it.
21446  # Note: m4 eats our [], so we need to use [ and ] instead.
21447  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21448  if test "x$has_forbidden_chars" != x; then
21449    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21450    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21451  fi
21452
21453
21454  windows_path="$new_path"
21455  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21456    unix_path=`$CYGPATH -u "$windows_path"`
21457    new_path="$unix_path"
21458  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21459    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21460    new_path="$unix_path"
21461  fi
21462
21463  if test "x$path" != "x$new_path"; then
21464    BOOT_JDK="$new_path"
21465    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21466$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21467  fi
21468
21469  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21470  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21471
21472    else
21473      # We're on a unix platform. Hooray! :)
21474      path="$BOOT_JDK"
21475      has_space=`$ECHO "$path" | $GREP " "`
21476      if test "x$has_space" != x; then
21477        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21478$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21479        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21480      fi
21481
21482      # Use eval to expand a potential ~
21483      eval path="$path"
21484      if test ! -f "$path" && test ! -d "$path"; then
21485        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21486      fi
21487
21488      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21489    fi
21490  fi
21491
21492            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21493$as_echo_n "checking for Boot JDK... " >&6; }
21494            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21495$as_echo "$BOOT_JDK" >&6; }
21496            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21497$as_echo_n "checking Boot JDK version... " >&6; }
21498            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21499            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21500$as_echo "$BOOT_JDK_VERSION" >&6; }
21501          fi # end check jdk version
21502        fi # end check javac
21503      fi # end check java
21504    fi # end check boot jdk found
21505  fi
21506
21507  fi
21508
21509
21510    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21511    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21512      # Do we have a bin/java?
21513      if test ! -x "$BOOT_JDK/bin/java"; then
21514        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21515$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21516        BOOT_JDK_FOUND=no
21517      else
21518        # Do we have a bin/javac?
21519        if test ! -x "$BOOT_JDK/bin/javac"; then
21520          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21521$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21522          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21523$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21524          BOOT_JDK_FOUND=no
21525        else
21526          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21527          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21528
21529          # Extra M4 quote needed to protect [] in grep expression.
21530          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21531          if test "x$FOUND_CORRECT_VERSION" = x; then
21532            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21533$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21534            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21535$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21536            BOOT_JDK_FOUND=no
21537          else
21538            # We're done! :-)
21539            BOOT_JDK_FOUND=yes
21540
21541  # Only process if variable expands to non-empty
21542
21543  if test "x$BOOT_JDK" != x; then
21544    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21545
21546  # Input might be given as Windows format, start by converting to
21547  # unix format.
21548  path="$BOOT_JDK"
21549  new_path=`$CYGPATH -u "$path"`
21550
21551  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21552  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21553  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21554  # "foo.exe" is OK but "foo" is an error.
21555  #
21556  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21557  # It is also a way to make sure we got the proper file name for the real test later on.
21558  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21559  if test "x$test_shortpath" = x; then
21560    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21561$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21562    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21563  fi
21564
21565  # Call helper function which possibly converts this using DOS-style short mode.
21566  # If so, the updated path is stored in $new_path.
21567
21568  input_path="$new_path"
21569  # Check if we need to convert this using DOS-style short mode. If the path
21570  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21571  # take no chances and rewrite it.
21572  # Note: m4 eats our [], so we need to use [ and ] instead.
21573  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21574  if test "x$has_forbidden_chars" != x; then
21575    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21576    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21577    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21578    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21579      # Going to short mode and back again did indeed matter. Since short mode is
21580      # case insensitive, let's make it lowercase to improve readability.
21581      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21582      # Now convert it back to Unix-style (cygpath)
21583      input_path=`$CYGPATH -u "$shortmode_path"`
21584      new_path="$input_path"
21585    fi
21586  fi
21587
21588  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21589  if test "x$test_cygdrive_prefix" = x; then
21590    # As a simple fix, exclude /usr/bin since it's not a real path.
21591    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21592      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21593      # a path prefixed by /cygdrive for fixpath to work.
21594      new_path="$CYGWIN_ROOT_PATH$input_path"
21595    fi
21596  fi
21597
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    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21606
21607  path="$BOOT_JDK"
21608  has_colon=`$ECHO $path | $GREP ^.:`
21609  new_path="$path"
21610  if test "x$has_colon" = x; then
21611    # Not in mixed or Windows style, start by that.
21612    new_path=`cmd //c echo $path`
21613  fi
21614
21615
21616  input_path="$new_path"
21617  # Check if we need to convert this using DOS-style short mode. If the path
21618  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21619  # take no chances and rewrite it.
21620  # Note: m4 eats our [], so we need to use [ and ] instead.
21621  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21622  if test "x$has_forbidden_chars" != x; then
21623    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21624    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21625  fi
21626
21627
21628  windows_path="$new_path"
21629  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21630    unix_path=`$CYGPATH -u "$windows_path"`
21631    new_path="$unix_path"
21632  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21633    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21634    new_path="$unix_path"
21635  fi
21636
21637  if test "x$path" != "x$new_path"; then
21638    BOOT_JDK="$new_path"
21639    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21640$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21641  fi
21642
21643  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21644  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21645
21646    else
21647      # We're on a unix platform. Hooray! :)
21648      path="$BOOT_JDK"
21649      has_space=`$ECHO "$path" | $GREP " "`
21650      if test "x$has_space" != x; then
21651        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21652$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21653        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21654      fi
21655
21656      # Use eval to expand a potential ~
21657      eval path="$path"
21658      if test ! -f "$path" && test ! -d "$path"; then
21659        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21660      fi
21661
21662      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21663    fi
21664  fi
21665
21666            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21667$as_echo_n "checking for Boot JDK... " >&6; }
21668            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21669$as_echo "$BOOT_JDK" >&6; }
21670            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21671$as_echo_n "checking Boot JDK version... " >&6; }
21672            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21673            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21674$as_echo "$BOOT_JDK_VERSION" >&6; }
21675          fi # end check jdk version
21676        fi # end check javac
21677      fi # end check java
21678    fi # end check boot jdk found
21679  fi
21680
21681
21682  # Test: Is $JAVA_HOME set?
21683
21684  if test "x$BOOT_JDK_FOUND" = xno; then
21685    # Now execute the test
21686
21687  if test "x$JAVA_HOME" != x; then
21688    JAVA_HOME_PROCESSED="$JAVA_HOME"
21689
21690  # Only process if variable expands to non-empty
21691
21692  if test "x$JAVA_HOME_PROCESSED" != x; then
21693    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21694
21695  # Input might be given as Windows format, start by converting to
21696  # unix format.
21697  path="$JAVA_HOME_PROCESSED"
21698  new_path=`$CYGPATH -u "$path"`
21699
21700  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21701  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21702  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21703  # "foo.exe" is OK but "foo" is an error.
21704  #
21705  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21706  # It is also a way to make sure we got the proper file name for the real test later on.
21707  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21708  if test "x$test_shortpath" = x; then
21709    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21710$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21711    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
21712  fi
21713
21714  # Call helper function which possibly converts this using DOS-style short mode.
21715  # If so, the updated path is stored in $new_path.
21716
21717  input_path="$new_path"
21718  # Check if we need to convert this using DOS-style short mode. If the path
21719  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21720  # take no chances and rewrite it.
21721  # Note: m4 eats our [], so we need to use [ and ] instead.
21722  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21723  if test "x$has_forbidden_chars" != x; then
21724    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21725    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21726    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21727    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21728      # Going to short mode and back again did indeed matter. Since short mode is
21729      # case insensitive, let's make it lowercase to improve readability.
21730      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21731      # Now convert it back to Unix-style (cygpath)
21732      input_path=`$CYGPATH -u "$shortmode_path"`
21733      new_path="$input_path"
21734    fi
21735  fi
21736
21737  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21738  if test "x$test_cygdrive_prefix" = x; then
21739    # As a simple fix, exclude /usr/bin since it's not a real path.
21740    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21741      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21742      # a path prefixed by /cygdrive for fixpath to work.
21743      new_path="$CYGWIN_ROOT_PATH$input_path"
21744    fi
21745  fi
21746
21747
21748  if test "x$path" != "x$new_path"; then
21749    JAVA_HOME_PROCESSED="$new_path"
21750    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21751$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21752  fi
21753
21754    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21755
21756  path="$JAVA_HOME_PROCESSED"
21757  has_colon=`$ECHO $path | $GREP ^.:`
21758  new_path="$path"
21759  if test "x$has_colon" = x; then
21760    # Not in mixed or Windows style, start by that.
21761    new_path=`cmd //c echo $path`
21762  fi
21763
21764
21765  input_path="$new_path"
21766  # Check if we need to convert this using DOS-style short mode. If the path
21767  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21768  # take no chances and rewrite it.
21769  # Note: m4 eats our [], so we need to use [ and ] instead.
21770  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21771  if test "x$has_forbidden_chars" != x; then
21772    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21773    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21774  fi
21775
21776
21777  windows_path="$new_path"
21778  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21779    unix_path=`$CYGPATH -u "$windows_path"`
21780    new_path="$unix_path"
21781  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21782    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21783    new_path="$unix_path"
21784  fi
21785
21786  if test "x$path" != "x$new_path"; then
21787    JAVA_HOME_PROCESSED="$new_path"
21788    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21789$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21790  fi
21791
21792  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21793  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21794
21795    else
21796      # We're on a unix platform. Hooray! :)
21797      path="$JAVA_HOME_PROCESSED"
21798      has_space=`$ECHO "$path" | $GREP " "`
21799      if test "x$has_space" != x; then
21800        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21801$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21802        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21803      fi
21804
21805      # Use eval to expand a potential ~
21806      eval path="$path"
21807      if test ! -f "$path" && test ! -d "$path"; then
21808        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
21809      fi
21810
21811      JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
21812    fi
21813  fi
21814
21815    if test ! -d "$JAVA_HOME_PROCESSED"; then
21816      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
21817$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
21818    else
21819      # Aha, the user has set a JAVA_HOME
21820      # let us use that as the Boot JDK.
21821      BOOT_JDK="$JAVA_HOME_PROCESSED"
21822      BOOT_JDK_FOUND=maybe
21823      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
21824$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
21825    fi
21826  fi
21827
21828
21829    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21830    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21831      # Do we have a bin/java?
21832      if test ! -x "$BOOT_JDK/bin/java"; then
21833        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21834$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21835        BOOT_JDK_FOUND=no
21836      else
21837        # Do we have a bin/javac?
21838        if test ! -x "$BOOT_JDK/bin/javac"; then
21839          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21840$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21841          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21842$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21843          BOOT_JDK_FOUND=no
21844        else
21845          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21846          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21847
21848          # Extra M4 quote needed to protect [] in grep expression.
21849          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21850          if test "x$FOUND_CORRECT_VERSION" = x; then
21851            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21852$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21853            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21854$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21855            BOOT_JDK_FOUND=no
21856          else
21857            # We're done! :-)
21858            BOOT_JDK_FOUND=yes
21859
21860  # Only process if variable expands to non-empty
21861
21862  if test "x$BOOT_JDK" != x; then
21863    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21864
21865  # Input might be given as Windows format, start by converting to
21866  # unix format.
21867  path="$BOOT_JDK"
21868  new_path=`$CYGPATH -u "$path"`
21869
21870  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21871  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21872  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21873  # "foo.exe" is OK but "foo" is an error.
21874  #
21875  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21876  # It is also a way to make sure we got the proper file name for the real test later on.
21877  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21878  if test "x$test_shortpath" = x; then
21879    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21880$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21881    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21882  fi
21883
21884  # Call helper function which possibly converts this using DOS-style short mode.
21885  # If so, the updated path is stored in $new_path.
21886
21887  input_path="$new_path"
21888  # Check if we need to convert this using DOS-style short mode. If the path
21889  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21890  # take no chances and rewrite it.
21891  # Note: m4 eats our [], so we need to use [ and ] instead.
21892  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21893  if test "x$has_forbidden_chars" != x; then
21894    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21895    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21896    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21897    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21898      # Going to short mode and back again did indeed matter. Since short mode is
21899      # case insensitive, let's make it lowercase to improve readability.
21900      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21901      # Now convert it back to Unix-style (cygpath)
21902      input_path=`$CYGPATH -u "$shortmode_path"`
21903      new_path="$input_path"
21904    fi
21905  fi
21906
21907  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21908  if test "x$test_cygdrive_prefix" = x; then
21909    # As a simple fix, exclude /usr/bin since it's not a real path.
21910    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21911      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21912      # a path prefixed by /cygdrive for fixpath to work.
21913      new_path="$CYGWIN_ROOT_PATH$input_path"
21914    fi
21915  fi
21916
21917
21918  if test "x$path" != "x$new_path"; then
21919    BOOT_JDK="$new_path"
21920    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21921$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21922  fi
21923
21924    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21925
21926  path="$BOOT_JDK"
21927  has_colon=`$ECHO $path | $GREP ^.:`
21928  new_path="$path"
21929  if test "x$has_colon" = x; then
21930    # Not in mixed or Windows style, start by that.
21931    new_path=`cmd //c echo $path`
21932  fi
21933
21934
21935  input_path="$new_path"
21936  # Check if we need to convert this using DOS-style short mode. If the path
21937  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21938  # take no chances and rewrite it.
21939  # Note: m4 eats our [], so we need to use [ and ] instead.
21940  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21941  if test "x$has_forbidden_chars" != x; then
21942    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21943    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21944  fi
21945
21946
21947  windows_path="$new_path"
21948  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21949    unix_path=`$CYGPATH -u "$windows_path"`
21950    new_path="$unix_path"
21951  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21952    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21953    new_path="$unix_path"
21954  fi
21955
21956  if test "x$path" != "x$new_path"; then
21957    BOOT_JDK="$new_path"
21958    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21959$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21960  fi
21961
21962  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21963  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21964
21965    else
21966      # We're on a unix platform. Hooray! :)
21967      path="$BOOT_JDK"
21968      has_space=`$ECHO "$path" | $GREP " "`
21969      if test "x$has_space" != x; then
21970        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21971$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21972        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21973      fi
21974
21975      # Use eval to expand a potential ~
21976      eval path="$path"
21977      if test ! -f "$path" && test ! -d "$path"; then
21978        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21979      fi
21980
21981      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21982    fi
21983  fi
21984
21985            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21986$as_echo_n "checking for Boot JDK... " >&6; }
21987            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21988$as_echo "$BOOT_JDK" >&6; }
21989            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21990$as_echo_n "checking Boot JDK version... " >&6; }
21991            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21992            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21993$as_echo "$BOOT_JDK_VERSION" >&6; }
21994          fi # end check jdk version
21995        fi # end check javac
21996      fi # end check java
21997    fi # end check boot jdk found
21998  fi
21999
22000
22001  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
22002
22003  if test "x$BOOT_JDK_FOUND" = xno; then
22004    # Now execute the test
22005
22006  # Extract the first word of "javac", so it can be a program name with args.
22007set dummy javac; ac_word=$2
22008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22009$as_echo_n "checking for $ac_word... " >&6; }
22010if ${ac_cv_path_JAVAC_CHECK+:} false; then :
22011  $as_echo_n "(cached) " >&6
22012else
22013  case $JAVAC_CHECK in
22014  [\\/]* | ?:[\\/]*)
22015  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
22016  ;;
22017  *)
22018  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22019for as_dir in $PATH
22020do
22021  IFS=$as_save_IFS
22022  test -z "$as_dir" && as_dir=.
22023    for ac_exec_ext in '' $ac_executable_extensions; do
22024  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22025    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
22026    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22027    break 2
22028  fi
22029done
22030  done
22031IFS=$as_save_IFS
22032
22033  ;;
22034esac
22035fi
22036JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
22037if test -n "$JAVAC_CHECK"; then
22038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
22039$as_echo "$JAVAC_CHECK" >&6; }
22040else
22041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22042$as_echo "no" >&6; }
22043fi
22044
22045
22046  # Extract the first word of "java", so it can be a program name with args.
22047set dummy java; ac_word=$2
22048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22049$as_echo_n "checking for $ac_word... " >&6; }
22050if ${ac_cv_path_JAVA_CHECK+:} false; then :
22051  $as_echo_n "(cached) " >&6
22052else
22053  case $JAVA_CHECK in
22054  [\\/]* | ?:[\\/]*)
22055  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
22056  ;;
22057  *)
22058  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22059for as_dir in $PATH
22060do
22061  IFS=$as_save_IFS
22062  test -z "$as_dir" && as_dir=.
22063    for ac_exec_ext in '' $ac_executable_extensions; do
22064  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22065    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
22066    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22067    break 2
22068  fi
22069done
22070  done
22071IFS=$as_save_IFS
22072
22073  ;;
22074esac
22075fi
22076JAVA_CHECK=$ac_cv_path_JAVA_CHECK
22077if test -n "$JAVA_CHECK"; then
22078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
22079$as_echo "$JAVA_CHECK" >&6; }
22080else
22081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22082$as_echo "no" >&6; }
22083fi
22084
22085
22086  BINARY="$JAVAC_CHECK"
22087  if test "x$JAVAC_CHECK" = x; then
22088    BINARY="$JAVA_CHECK"
22089  fi
22090  if test "x$BINARY" != x; then
22091    # So there is a java(c) binary, it might be part of a JDK.
22092    # Lets find the JDK/JRE directory by following symbolic links.
22093    # Linux/GNU systems often have links from /usr/bin/java to
22094    # /etc/alternatives/java to the real JDK binary.
22095
22096  if test "x$OPENJDK_BUILD_OS" != xwindows; then
22097    # Follow a chain of symbolic links. Use readlink
22098    # where it exists, else fall back to horribly
22099    # complicated shell code.
22100    if test "x$READLINK_TESTED" != yes; then
22101      # On MacOSX there is a readlink tool with a different
22102      # purpose than the GNU readlink tool. Check the found readlink.
22103      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
22104      if test "x$ISGNU" = x; then
22105        # A readlink that we do not know how to use.
22106        # Are there other non-GNU readlinks out there?
22107        READLINK_TESTED=yes
22108        READLINK=
22109      fi
22110    fi
22111
22112    if test "x$READLINK" != x; then
22113      BINARY=`$READLINK -f $BINARY`
22114    else
22115      # Save the current directory for restoring afterwards
22116      STARTDIR=$PWD
22117      COUNTER=0
22118      sym_link_dir=`$DIRNAME $BINARY`
22119      sym_link_file=`$BASENAME $BINARY`
22120      cd $sym_link_dir
22121      # Use -P flag to resolve symlinks in directories.
22122      cd `$THEPWDCMD -P`
22123      sym_link_dir=`$THEPWDCMD -P`
22124      # Resolve file symlinks
22125      while test $COUNTER -lt 20; do
22126        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
22127        if test "x$ISLINK" == x; then
22128          # This is not a symbolic link! We are done!
22129          break
22130        fi
22131        # Again resolve directory symlinks since the target of the just found
22132        # link could be in a different directory
22133        cd `$DIRNAME $ISLINK`
22134        sym_link_dir=`$THEPWDCMD -P`
22135        sym_link_file=`$BASENAME $ISLINK`
22136        let COUNTER=COUNTER+1
22137      done
22138      cd $STARTDIR
22139      BINARY=$sym_link_dir/$sym_link_file
22140    fi
22141  fi
22142
22143    BOOT_JDK=`dirname "$BINARY"`
22144    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
22145    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
22146      # Looks like we found ourselves an JDK
22147      BOOT_JDK_FOUND=maybe
22148      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
22149$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
22150    fi
22151  fi
22152
22153
22154    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22155    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22156      # Do we have a bin/java?
22157      if test ! -x "$BOOT_JDK/bin/java"; then
22158        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22159$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22160        BOOT_JDK_FOUND=no
22161      else
22162        # Do we have a bin/javac?
22163        if test ! -x "$BOOT_JDK/bin/javac"; then
22164          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22165$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22166          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22167$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22168          BOOT_JDK_FOUND=no
22169        else
22170          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22171          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22172
22173          # Extra M4 quote needed to protect [] in grep expression.
22174          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22175          if test "x$FOUND_CORRECT_VERSION" = x; then
22176            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22177$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22178            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22179$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22180            BOOT_JDK_FOUND=no
22181          else
22182            # We're done! :-)
22183            BOOT_JDK_FOUND=yes
22184
22185  # Only process if variable expands to non-empty
22186
22187  if test "x$BOOT_JDK" != x; then
22188    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22189
22190  # Input might be given as Windows format, start by converting to
22191  # unix format.
22192  path="$BOOT_JDK"
22193  new_path=`$CYGPATH -u "$path"`
22194
22195  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22196  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22197  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22198  # "foo.exe" is OK but "foo" is an error.
22199  #
22200  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22201  # It is also a way to make sure we got the proper file name for the real test later on.
22202  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22203  if test "x$test_shortpath" = x; then
22204    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22205$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22206    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22207  fi
22208
22209  # Call helper function which possibly converts this using DOS-style short mode.
22210  # If so, the updated path is stored in $new_path.
22211
22212  input_path="$new_path"
22213  # Check if we need to convert this using DOS-style short mode. If the path
22214  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22215  # take no chances and rewrite it.
22216  # Note: m4 eats our [], so we need to use [ and ] instead.
22217  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22218  if test "x$has_forbidden_chars" != x; then
22219    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22220    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22221    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22222    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22223      # Going to short mode and back again did indeed matter. Since short mode is
22224      # case insensitive, let's make it lowercase to improve readability.
22225      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22226      # Now convert it back to Unix-style (cygpath)
22227      input_path=`$CYGPATH -u "$shortmode_path"`
22228      new_path="$input_path"
22229    fi
22230  fi
22231
22232  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22233  if test "x$test_cygdrive_prefix" = x; then
22234    # As a simple fix, exclude /usr/bin since it's not a real path.
22235    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22236      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22237      # a path prefixed by /cygdrive for fixpath to work.
22238      new_path="$CYGWIN_ROOT_PATH$input_path"
22239    fi
22240  fi
22241
22242
22243  if test "x$path" != "x$new_path"; then
22244    BOOT_JDK="$new_path"
22245    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22246$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22247  fi
22248
22249    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22250
22251  path="$BOOT_JDK"
22252  has_colon=`$ECHO $path | $GREP ^.:`
22253  new_path="$path"
22254  if test "x$has_colon" = x; then
22255    # Not in mixed or Windows style, start by that.
22256    new_path=`cmd //c echo $path`
22257  fi
22258
22259
22260  input_path="$new_path"
22261  # Check if we need to convert this using DOS-style short mode. If the path
22262  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22263  # take no chances and rewrite it.
22264  # Note: m4 eats our [], so we need to use [ and ] instead.
22265  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22266  if test "x$has_forbidden_chars" != x; then
22267    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22268    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22269  fi
22270
22271
22272  windows_path="$new_path"
22273  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22274    unix_path=`$CYGPATH -u "$windows_path"`
22275    new_path="$unix_path"
22276  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22277    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22278    new_path="$unix_path"
22279  fi
22280
22281  if test "x$path" != "x$new_path"; then
22282    BOOT_JDK="$new_path"
22283    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22284$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22285  fi
22286
22287  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22288  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22289
22290    else
22291      # We're on a unix platform. Hooray! :)
22292      path="$BOOT_JDK"
22293      has_space=`$ECHO "$path" | $GREP " "`
22294      if test "x$has_space" != x; then
22295        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22296$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22297        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22298      fi
22299
22300      # Use eval to expand a potential ~
22301      eval path="$path"
22302      if test ! -f "$path" && test ! -d "$path"; then
22303        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22304      fi
22305
22306      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22307    fi
22308  fi
22309
22310            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22311$as_echo_n "checking for Boot JDK... " >&6; }
22312            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22313$as_echo "$BOOT_JDK" >&6; }
22314            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22315$as_echo_n "checking Boot JDK version... " >&6; }
22316            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22317            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22318$as_echo "$BOOT_JDK_VERSION" >&6; }
22319          fi # end check jdk version
22320        fi # end check javac
22321      fi # end check java
22322    fi # end check boot jdk found
22323  fi
22324
22325
22326  # Test: Is there a JDK installed in default, well-known locations?
22327
22328  if test "x$BOOT_JDK_FOUND" = xno; then
22329    # Now execute the test
22330
22331  if test "x$OPENJDK_TARGET_OS" = xwindows; then
22332
22333  if test "x$BOOT_JDK_FOUND" = xno; then
22334    # Now execute the test
22335
22336  if test "x$ProgramW6432" != x; then
22337    VIRTUAL_DIR="$ProgramW6432/Java"
22338
22339  windows_path="$VIRTUAL_DIR"
22340  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22341    unix_path=`$CYGPATH -u "$windows_path"`
22342    VIRTUAL_DIR="$unix_path"
22343  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22344    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22345    VIRTUAL_DIR="$unix_path"
22346  fi
22347
22348
22349  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22350  BOOT_JDK_SUFFIX=""
22351  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22352  if test "x$ALL_JDKS_FOUND" != x; then
22353    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22354
22355  if test "x$BOOT_JDK_FOUND" = xno; then
22356    # Now execute the test
22357
22358        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22359        if test -d "$BOOT_JDK"; then
22360          BOOT_JDK_FOUND=maybe
22361          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22362$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22363        fi
22364
22365
22366    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22367    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22368      # Do we have a bin/java?
22369      if test ! -x "$BOOT_JDK/bin/java"; then
22370        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22371$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22372        BOOT_JDK_FOUND=no
22373      else
22374        # Do we have a bin/javac?
22375        if test ! -x "$BOOT_JDK/bin/javac"; then
22376          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22377$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22378          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22379$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22380          BOOT_JDK_FOUND=no
22381        else
22382          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22383          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22384
22385          # Extra M4 quote needed to protect [] in grep expression.
22386          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22387          if test "x$FOUND_CORRECT_VERSION" = x; then
22388            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22389$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22390            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22391$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22392            BOOT_JDK_FOUND=no
22393          else
22394            # We're done! :-)
22395            BOOT_JDK_FOUND=yes
22396
22397  # Only process if variable expands to non-empty
22398
22399  if test "x$BOOT_JDK" != x; then
22400    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22401
22402  # Input might be given as Windows format, start by converting to
22403  # unix format.
22404  path="$BOOT_JDK"
22405  new_path=`$CYGPATH -u "$path"`
22406
22407  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22408  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22409  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22410  # "foo.exe" is OK but "foo" is an error.
22411  #
22412  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22413  # It is also a way to make sure we got the proper file name for the real test later on.
22414  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22415  if test "x$test_shortpath" = x; then
22416    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22417$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22418    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22419  fi
22420
22421  # Call helper function which possibly converts this using DOS-style short mode.
22422  # If so, the updated path is stored in $new_path.
22423
22424  input_path="$new_path"
22425  # Check if we need to convert this using DOS-style short mode. If the path
22426  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22427  # take no chances and rewrite it.
22428  # Note: m4 eats our [], so we need to use [ and ] instead.
22429  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22430  if test "x$has_forbidden_chars" != x; then
22431    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22432    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22433    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22434    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22435      # Going to short mode and back again did indeed matter. Since short mode is
22436      # case insensitive, let's make it lowercase to improve readability.
22437      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22438      # Now convert it back to Unix-style (cygpath)
22439      input_path=`$CYGPATH -u "$shortmode_path"`
22440      new_path="$input_path"
22441    fi
22442  fi
22443
22444  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22445  if test "x$test_cygdrive_prefix" = x; then
22446    # As a simple fix, exclude /usr/bin since it's not a real path.
22447    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22448      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22449      # a path prefixed by /cygdrive for fixpath to work.
22450      new_path="$CYGWIN_ROOT_PATH$input_path"
22451    fi
22452  fi
22453
22454
22455  if test "x$path" != "x$new_path"; then
22456    BOOT_JDK="$new_path"
22457    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22458$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22459  fi
22460
22461    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22462
22463  path="$BOOT_JDK"
22464  has_colon=`$ECHO $path | $GREP ^.:`
22465  new_path="$path"
22466  if test "x$has_colon" = x; then
22467    # Not in mixed or Windows style, start by that.
22468    new_path=`cmd //c echo $path`
22469  fi
22470
22471
22472  input_path="$new_path"
22473  # Check if we need to convert this using DOS-style short mode. If the path
22474  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22475  # take no chances and rewrite it.
22476  # Note: m4 eats our [], so we need to use [ and ] instead.
22477  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22478  if test "x$has_forbidden_chars" != x; then
22479    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22480    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22481  fi
22482
22483
22484  windows_path="$new_path"
22485  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22486    unix_path=`$CYGPATH -u "$windows_path"`
22487    new_path="$unix_path"
22488  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22489    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22490    new_path="$unix_path"
22491  fi
22492
22493  if test "x$path" != "x$new_path"; then
22494    BOOT_JDK="$new_path"
22495    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22496$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22497  fi
22498
22499  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22500  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22501
22502    else
22503      # We're on a unix platform. Hooray! :)
22504      path="$BOOT_JDK"
22505      has_space=`$ECHO "$path" | $GREP " "`
22506      if test "x$has_space" != x; then
22507        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22508$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22509        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22510      fi
22511
22512      # Use eval to expand a potential ~
22513      eval path="$path"
22514      if test ! -f "$path" && test ! -d "$path"; then
22515        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22516      fi
22517
22518      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22519    fi
22520  fi
22521
22522            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22523$as_echo_n "checking for Boot JDK... " >&6; }
22524            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22525$as_echo "$BOOT_JDK" >&6; }
22526            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22527$as_echo_n "checking Boot JDK version... " >&6; }
22528            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22529            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22530$as_echo "$BOOT_JDK_VERSION" >&6; }
22531          fi # end check jdk version
22532        fi # end check javac
22533      fi # end check java
22534    fi # end check boot jdk found
22535  fi
22536
22537    done
22538  fi
22539
22540  fi
22541
22542
22543    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22544    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22545      # Do we have a bin/java?
22546      if test ! -x "$BOOT_JDK/bin/java"; then
22547        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22548$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22549        BOOT_JDK_FOUND=no
22550      else
22551        # Do we have a bin/javac?
22552        if test ! -x "$BOOT_JDK/bin/javac"; then
22553          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22554$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22555          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22556$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22557          BOOT_JDK_FOUND=no
22558        else
22559          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22560          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22561
22562          # Extra M4 quote needed to protect [] in grep expression.
22563          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22564          if test "x$FOUND_CORRECT_VERSION" = x; then
22565            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22566$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22567            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22568$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22569            BOOT_JDK_FOUND=no
22570          else
22571            # We're done! :-)
22572            BOOT_JDK_FOUND=yes
22573
22574  # Only process if variable expands to non-empty
22575
22576  if test "x$BOOT_JDK" != x; then
22577    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22578
22579  # Input might be given as Windows format, start by converting to
22580  # unix format.
22581  path="$BOOT_JDK"
22582  new_path=`$CYGPATH -u "$path"`
22583
22584  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22585  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22586  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22587  # "foo.exe" is OK but "foo" is an error.
22588  #
22589  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22590  # It is also a way to make sure we got the proper file name for the real test later on.
22591  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22592  if test "x$test_shortpath" = x; then
22593    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22594$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22595    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22596  fi
22597
22598  # Call helper function which possibly converts this using DOS-style short mode.
22599  # If so, the updated path is stored in $new_path.
22600
22601  input_path="$new_path"
22602  # Check if we need to convert this using DOS-style short mode. If the path
22603  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22604  # take no chances and rewrite it.
22605  # Note: m4 eats our [], so we need to use [ and ] instead.
22606  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22607  if test "x$has_forbidden_chars" != x; then
22608    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22609    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22610    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22611    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22612      # Going to short mode and back again did indeed matter. Since short mode is
22613      # case insensitive, let's make it lowercase to improve readability.
22614      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22615      # Now convert it back to Unix-style (cygpath)
22616      input_path=`$CYGPATH -u "$shortmode_path"`
22617      new_path="$input_path"
22618    fi
22619  fi
22620
22621  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22622  if test "x$test_cygdrive_prefix" = x; then
22623    # As a simple fix, exclude /usr/bin since it's not a real path.
22624    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22625      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22626      # a path prefixed by /cygdrive for fixpath to work.
22627      new_path="$CYGWIN_ROOT_PATH$input_path"
22628    fi
22629  fi
22630
22631
22632  if test "x$path" != "x$new_path"; then
22633    BOOT_JDK="$new_path"
22634    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22635$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22636  fi
22637
22638    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22639
22640  path="$BOOT_JDK"
22641  has_colon=`$ECHO $path | $GREP ^.:`
22642  new_path="$path"
22643  if test "x$has_colon" = x; then
22644    # Not in mixed or Windows style, start by that.
22645    new_path=`cmd //c echo $path`
22646  fi
22647
22648
22649  input_path="$new_path"
22650  # Check if we need to convert this using DOS-style short mode. If the path
22651  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22652  # take no chances and rewrite it.
22653  # Note: m4 eats our [], so we need to use [ and ] instead.
22654  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22655  if test "x$has_forbidden_chars" != x; then
22656    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22657    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22658  fi
22659
22660
22661  windows_path="$new_path"
22662  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22663    unix_path=`$CYGPATH -u "$windows_path"`
22664    new_path="$unix_path"
22665  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22666    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22667    new_path="$unix_path"
22668  fi
22669
22670  if test "x$path" != "x$new_path"; then
22671    BOOT_JDK="$new_path"
22672    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22673$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22674  fi
22675
22676  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22677  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22678
22679    else
22680      # We're on a unix platform. Hooray! :)
22681      path="$BOOT_JDK"
22682      has_space=`$ECHO "$path" | $GREP " "`
22683      if test "x$has_space" != x; then
22684        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22685$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22686        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22687      fi
22688
22689      # Use eval to expand a potential ~
22690      eval path="$path"
22691      if test ! -f "$path" && test ! -d "$path"; then
22692        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22693      fi
22694
22695      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22696    fi
22697  fi
22698
22699            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22700$as_echo_n "checking for Boot JDK... " >&6; }
22701            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22702$as_echo "$BOOT_JDK" >&6; }
22703            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22704$as_echo_n "checking Boot JDK version... " >&6; }
22705            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22706            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22707$as_echo "$BOOT_JDK_VERSION" >&6; }
22708          fi # end check jdk version
22709        fi # end check javac
22710      fi # end check java
22711    fi # end check boot jdk found
22712  fi
22713
22714
22715  if test "x$BOOT_JDK_FOUND" = xno; then
22716    # Now execute the test
22717
22718  if test "x$PROGRAMW6432" != x; then
22719    VIRTUAL_DIR="$PROGRAMW6432/Java"
22720
22721  windows_path="$VIRTUAL_DIR"
22722  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22723    unix_path=`$CYGPATH -u "$windows_path"`
22724    VIRTUAL_DIR="$unix_path"
22725  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22726    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22727    VIRTUAL_DIR="$unix_path"
22728  fi
22729
22730
22731  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22732  BOOT_JDK_SUFFIX=""
22733  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22734  if test "x$ALL_JDKS_FOUND" != x; then
22735    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22736
22737  if test "x$BOOT_JDK_FOUND" = xno; then
22738    # Now execute the test
22739
22740        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22741        if test -d "$BOOT_JDK"; then
22742          BOOT_JDK_FOUND=maybe
22743          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22744$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22745        fi
22746
22747
22748    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22749    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22750      # Do we have a bin/java?
22751      if test ! -x "$BOOT_JDK/bin/java"; then
22752        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22753$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22754        BOOT_JDK_FOUND=no
22755      else
22756        # Do we have a bin/javac?
22757        if test ! -x "$BOOT_JDK/bin/javac"; then
22758          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22759$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22760          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22761$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22762          BOOT_JDK_FOUND=no
22763        else
22764          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22765          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22766
22767          # Extra M4 quote needed to protect [] in grep expression.
22768          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22769          if test "x$FOUND_CORRECT_VERSION" = x; then
22770            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22771$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22772            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22773$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22774            BOOT_JDK_FOUND=no
22775          else
22776            # We're done! :-)
22777            BOOT_JDK_FOUND=yes
22778
22779  # Only process if variable expands to non-empty
22780
22781  if test "x$BOOT_JDK" != x; then
22782    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22783
22784  # Input might be given as Windows format, start by converting to
22785  # unix format.
22786  path="$BOOT_JDK"
22787  new_path=`$CYGPATH -u "$path"`
22788
22789  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22790  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22791  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22792  # "foo.exe" is OK but "foo" is an error.
22793  #
22794  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22795  # It is also a way to make sure we got the proper file name for the real test later on.
22796  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22797  if test "x$test_shortpath" = x; then
22798    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22799$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22800    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22801  fi
22802
22803  # Call helper function which possibly converts this using DOS-style short mode.
22804  # If so, the updated path is stored in $new_path.
22805
22806  input_path="$new_path"
22807  # Check if we need to convert this using DOS-style short mode. If the path
22808  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22809  # take no chances and rewrite it.
22810  # Note: m4 eats our [], so we need to use [ and ] instead.
22811  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22812  if test "x$has_forbidden_chars" != x; then
22813    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22814    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22815    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22816    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22817      # Going to short mode and back again did indeed matter. Since short mode is
22818      # case insensitive, let's make it lowercase to improve readability.
22819      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22820      # Now convert it back to Unix-style (cygpath)
22821      input_path=`$CYGPATH -u "$shortmode_path"`
22822      new_path="$input_path"
22823    fi
22824  fi
22825
22826  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22827  if test "x$test_cygdrive_prefix" = x; then
22828    # As a simple fix, exclude /usr/bin since it's not a real path.
22829    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22830      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22831      # a path prefixed by /cygdrive for fixpath to work.
22832      new_path="$CYGWIN_ROOT_PATH$input_path"
22833    fi
22834  fi
22835
22836
22837  if test "x$path" != "x$new_path"; then
22838    BOOT_JDK="$new_path"
22839    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22840$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22841  fi
22842
22843    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22844
22845  path="$BOOT_JDK"
22846  has_colon=`$ECHO $path | $GREP ^.:`
22847  new_path="$path"
22848  if test "x$has_colon" = x; then
22849    # Not in mixed or Windows style, start by that.
22850    new_path=`cmd //c echo $path`
22851  fi
22852
22853
22854  input_path="$new_path"
22855  # Check if we need to convert this using DOS-style short mode. If the path
22856  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22857  # take no chances and rewrite it.
22858  # Note: m4 eats our [], so we need to use [ and ] instead.
22859  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22860  if test "x$has_forbidden_chars" != x; then
22861    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22862    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22863  fi
22864
22865
22866  windows_path="$new_path"
22867  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22868    unix_path=`$CYGPATH -u "$windows_path"`
22869    new_path="$unix_path"
22870  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22871    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22872    new_path="$unix_path"
22873  fi
22874
22875  if test "x$path" != "x$new_path"; then
22876    BOOT_JDK="$new_path"
22877    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22878$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22879  fi
22880
22881  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22882  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22883
22884    else
22885      # We're on a unix platform. Hooray! :)
22886      path="$BOOT_JDK"
22887      has_space=`$ECHO "$path" | $GREP " "`
22888      if test "x$has_space" != x; then
22889        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22890$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22891        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22892      fi
22893
22894      # Use eval to expand a potential ~
22895      eval path="$path"
22896      if test ! -f "$path" && test ! -d "$path"; then
22897        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22898      fi
22899
22900      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22901    fi
22902  fi
22903
22904            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22905$as_echo_n "checking for Boot JDK... " >&6; }
22906            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22907$as_echo "$BOOT_JDK" >&6; }
22908            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22909$as_echo_n "checking Boot JDK version... " >&6; }
22910            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22911            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22912$as_echo "$BOOT_JDK_VERSION" >&6; }
22913          fi # end check jdk version
22914        fi # end check javac
22915      fi # end check java
22916    fi # end check boot jdk found
22917  fi
22918
22919    done
22920  fi
22921
22922  fi
22923
22924
22925    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22926    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22927      # Do we have a bin/java?
22928      if test ! -x "$BOOT_JDK/bin/java"; then
22929        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22930$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22931        BOOT_JDK_FOUND=no
22932      else
22933        # Do we have a bin/javac?
22934        if test ! -x "$BOOT_JDK/bin/javac"; then
22935          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22936$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22937          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22938$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22939          BOOT_JDK_FOUND=no
22940        else
22941          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22942          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22943
22944          # Extra M4 quote needed to protect [] in grep expression.
22945          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22946          if test "x$FOUND_CORRECT_VERSION" = x; then
22947            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22948$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22949            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22950$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22951            BOOT_JDK_FOUND=no
22952          else
22953            # We're done! :-)
22954            BOOT_JDK_FOUND=yes
22955
22956  # Only process if variable expands to non-empty
22957
22958  if test "x$BOOT_JDK" != x; then
22959    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22960
22961  # Input might be given as Windows format, start by converting to
22962  # unix format.
22963  path="$BOOT_JDK"
22964  new_path=`$CYGPATH -u "$path"`
22965
22966  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22967  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22968  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22969  # "foo.exe" is OK but "foo" is an error.
22970  #
22971  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22972  # It is also a way to make sure we got the proper file name for the real test later on.
22973  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22974  if test "x$test_shortpath" = x; then
22975    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22976$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22977    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22978  fi
22979
22980  # Call helper function which possibly converts this using DOS-style short mode.
22981  # If so, the updated path is stored in $new_path.
22982
22983  input_path="$new_path"
22984  # Check if we need to convert this using DOS-style short mode. If the path
22985  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22986  # take no chances and rewrite it.
22987  # Note: m4 eats our [], so we need to use [ and ] instead.
22988  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22989  if test "x$has_forbidden_chars" != x; then
22990    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22991    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22992    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22993    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22994      # Going to short mode and back again did indeed matter. Since short mode is
22995      # case insensitive, let's make it lowercase to improve readability.
22996      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22997      # Now convert it back to Unix-style (cygpath)
22998      input_path=`$CYGPATH -u "$shortmode_path"`
22999      new_path="$input_path"
23000    fi
23001  fi
23002
23003  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23004  if test "x$test_cygdrive_prefix" = x; then
23005    # As a simple fix, exclude /usr/bin since it's not a real path.
23006    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23007      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23008      # a path prefixed by /cygdrive for fixpath to work.
23009      new_path="$CYGWIN_ROOT_PATH$input_path"
23010    fi
23011  fi
23012
23013
23014  if test "x$path" != "x$new_path"; then
23015    BOOT_JDK="$new_path"
23016    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23017$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23018  fi
23019
23020    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23021
23022  path="$BOOT_JDK"
23023  has_colon=`$ECHO $path | $GREP ^.:`
23024  new_path="$path"
23025  if test "x$has_colon" = x; then
23026    # Not in mixed or Windows style, start by that.
23027    new_path=`cmd //c echo $path`
23028  fi
23029
23030
23031  input_path="$new_path"
23032  # Check if we need to convert this using DOS-style short mode. If the path
23033  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23034  # take no chances and rewrite it.
23035  # Note: m4 eats our [], so we need to use [ and ] instead.
23036  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23037  if test "x$has_forbidden_chars" != x; then
23038    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23039    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23040  fi
23041
23042
23043  windows_path="$new_path"
23044  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23045    unix_path=`$CYGPATH -u "$windows_path"`
23046    new_path="$unix_path"
23047  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23048    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23049    new_path="$unix_path"
23050  fi
23051
23052  if test "x$path" != "x$new_path"; then
23053    BOOT_JDK="$new_path"
23054    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23055$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23056  fi
23057
23058  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23059  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23060
23061    else
23062      # We're on a unix platform. Hooray! :)
23063      path="$BOOT_JDK"
23064      has_space=`$ECHO "$path" | $GREP " "`
23065      if test "x$has_space" != x; then
23066        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23067$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23068        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23069      fi
23070
23071      # Use eval to expand a potential ~
23072      eval path="$path"
23073      if test ! -f "$path" && test ! -d "$path"; then
23074        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23075      fi
23076
23077      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23078    fi
23079  fi
23080
23081            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23082$as_echo_n "checking for Boot JDK... " >&6; }
23083            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23084$as_echo "$BOOT_JDK" >&6; }
23085            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23086$as_echo_n "checking Boot JDK version... " >&6; }
23087            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23088            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23089$as_echo "$BOOT_JDK_VERSION" >&6; }
23090          fi # end check jdk version
23091        fi # end check javac
23092      fi # end check java
23093    fi # end check boot jdk found
23094  fi
23095
23096
23097  if test "x$BOOT_JDK_FOUND" = xno; then
23098    # Now execute the test
23099
23100  if test "x$PROGRAMFILES" != x; then
23101    VIRTUAL_DIR="$PROGRAMFILES/Java"
23102
23103  windows_path="$VIRTUAL_DIR"
23104  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23105    unix_path=`$CYGPATH -u "$windows_path"`
23106    VIRTUAL_DIR="$unix_path"
23107  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23108    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23109    VIRTUAL_DIR="$unix_path"
23110  fi
23111
23112
23113  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23114  BOOT_JDK_SUFFIX=""
23115  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23116  if test "x$ALL_JDKS_FOUND" != x; then
23117    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23118
23119  if test "x$BOOT_JDK_FOUND" = xno; then
23120    # Now execute the test
23121
23122        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23123        if test -d "$BOOT_JDK"; then
23124          BOOT_JDK_FOUND=maybe
23125          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23126$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23127        fi
23128
23129
23130    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23131    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23132      # Do we have a bin/java?
23133      if test ! -x "$BOOT_JDK/bin/java"; then
23134        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23135$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23136        BOOT_JDK_FOUND=no
23137      else
23138        # Do we have a bin/javac?
23139        if test ! -x "$BOOT_JDK/bin/javac"; then
23140          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23141$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23142          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23143$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23144          BOOT_JDK_FOUND=no
23145        else
23146          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23147          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23148
23149          # Extra M4 quote needed to protect [] in grep expression.
23150          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23151          if test "x$FOUND_CORRECT_VERSION" = x; then
23152            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23153$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23154            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23155$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23156            BOOT_JDK_FOUND=no
23157          else
23158            # We're done! :-)
23159            BOOT_JDK_FOUND=yes
23160
23161  # Only process if variable expands to non-empty
23162
23163  if test "x$BOOT_JDK" != x; then
23164    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23165
23166  # Input might be given as Windows format, start by converting to
23167  # unix format.
23168  path="$BOOT_JDK"
23169  new_path=`$CYGPATH -u "$path"`
23170
23171  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23172  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23173  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23174  # "foo.exe" is OK but "foo" is an error.
23175  #
23176  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23177  # It is also a way to make sure we got the proper file name for the real test later on.
23178  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23179  if test "x$test_shortpath" = x; then
23180    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23181$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23182    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23183  fi
23184
23185  # Call helper function which possibly converts this using DOS-style short mode.
23186  # If so, the updated path is stored in $new_path.
23187
23188  input_path="$new_path"
23189  # Check if we need to convert this using DOS-style short mode. If the path
23190  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23191  # take no chances and rewrite it.
23192  # Note: m4 eats our [], so we need to use [ and ] instead.
23193  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23194  if test "x$has_forbidden_chars" != x; then
23195    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23196    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23197    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23198    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23199      # Going to short mode and back again did indeed matter. Since short mode is
23200      # case insensitive, let's make it lowercase to improve readability.
23201      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23202      # Now convert it back to Unix-style (cygpath)
23203      input_path=`$CYGPATH -u "$shortmode_path"`
23204      new_path="$input_path"
23205    fi
23206  fi
23207
23208  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23209  if test "x$test_cygdrive_prefix" = x; then
23210    # As a simple fix, exclude /usr/bin since it's not a real path.
23211    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23212      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23213      # a path prefixed by /cygdrive for fixpath to work.
23214      new_path="$CYGWIN_ROOT_PATH$input_path"
23215    fi
23216  fi
23217
23218
23219  if test "x$path" != "x$new_path"; then
23220    BOOT_JDK="$new_path"
23221    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23222$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23223  fi
23224
23225    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23226
23227  path="$BOOT_JDK"
23228  has_colon=`$ECHO $path | $GREP ^.:`
23229  new_path="$path"
23230  if test "x$has_colon" = x; then
23231    # Not in mixed or Windows style, start by that.
23232    new_path=`cmd //c echo $path`
23233  fi
23234
23235
23236  input_path="$new_path"
23237  # Check if we need to convert this using DOS-style short mode. If the path
23238  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23239  # take no chances and rewrite it.
23240  # Note: m4 eats our [], so we need to use [ and ] instead.
23241  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23242  if test "x$has_forbidden_chars" != x; then
23243    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23244    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23245  fi
23246
23247
23248  windows_path="$new_path"
23249  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23250    unix_path=`$CYGPATH -u "$windows_path"`
23251    new_path="$unix_path"
23252  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23253    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23254    new_path="$unix_path"
23255  fi
23256
23257  if test "x$path" != "x$new_path"; then
23258    BOOT_JDK="$new_path"
23259    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23260$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23261  fi
23262
23263  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23264  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23265
23266    else
23267      # We're on a unix platform. Hooray! :)
23268      path="$BOOT_JDK"
23269      has_space=`$ECHO "$path" | $GREP " "`
23270      if test "x$has_space" != x; then
23271        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23272$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23273        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23274      fi
23275
23276      # Use eval to expand a potential ~
23277      eval path="$path"
23278      if test ! -f "$path" && test ! -d "$path"; then
23279        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23280      fi
23281
23282      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23283    fi
23284  fi
23285
23286            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23287$as_echo_n "checking for Boot JDK... " >&6; }
23288            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23289$as_echo "$BOOT_JDK" >&6; }
23290            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23291$as_echo_n "checking Boot JDK version... " >&6; }
23292            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23293            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23294$as_echo "$BOOT_JDK_VERSION" >&6; }
23295          fi # end check jdk version
23296        fi # end check javac
23297      fi # end check java
23298    fi # end check boot jdk found
23299  fi
23300
23301    done
23302  fi
23303
23304  fi
23305
23306
23307    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23308    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23309      # Do we have a bin/java?
23310      if test ! -x "$BOOT_JDK/bin/java"; then
23311        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23312$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23313        BOOT_JDK_FOUND=no
23314      else
23315        # Do we have a bin/javac?
23316        if test ! -x "$BOOT_JDK/bin/javac"; then
23317          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23318$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23319          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23320$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23321          BOOT_JDK_FOUND=no
23322        else
23323          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23324          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23325
23326          # Extra M4 quote needed to protect [] in grep expression.
23327          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23328          if test "x$FOUND_CORRECT_VERSION" = x; then
23329            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23330$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23331            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23332$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23333            BOOT_JDK_FOUND=no
23334          else
23335            # We're done! :-)
23336            BOOT_JDK_FOUND=yes
23337
23338  # Only process if variable expands to non-empty
23339
23340  if test "x$BOOT_JDK" != x; then
23341    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23342
23343  # Input might be given as Windows format, start by converting to
23344  # unix format.
23345  path="$BOOT_JDK"
23346  new_path=`$CYGPATH -u "$path"`
23347
23348  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23349  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23350  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23351  # "foo.exe" is OK but "foo" is an error.
23352  #
23353  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23354  # It is also a way to make sure we got the proper file name for the real test later on.
23355  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23356  if test "x$test_shortpath" = x; then
23357    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23358$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23359    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23360  fi
23361
23362  # Call helper function which possibly converts this using DOS-style short mode.
23363  # If so, the updated path is stored in $new_path.
23364
23365  input_path="$new_path"
23366  # Check if we need to convert this using DOS-style short mode. If the path
23367  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23368  # take no chances and rewrite it.
23369  # Note: m4 eats our [], so we need to use [ and ] instead.
23370  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23371  if test "x$has_forbidden_chars" != x; then
23372    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23373    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23374    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23375    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23376      # Going to short mode and back again did indeed matter. Since short mode is
23377      # case insensitive, let's make it lowercase to improve readability.
23378      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23379      # Now convert it back to Unix-style (cygpath)
23380      input_path=`$CYGPATH -u "$shortmode_path"`
23381      new_path="$input_path"
23382    fi
23383  fi
23384
23385  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23386  if test "x$test_cygdrive_prefix" = x; then
23387    # As a simple fix, exclude /usr/bin since it's not a real path.
23388    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23389      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23390      # a path prefixed by /cygdrive for fixpath to work.
23391      new_path="$CYGWIN_ROOT_PATH$input_path"
23392    fi
23393  fi
23394
23395
23396  if test "x$path" != "x$new_path"; then
23397    BOOT_JDK="$new_path"
23398    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23399$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23400  fi
23401
23402    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23403
23404  path="$BOOT_JDK"
23405  has_colon=`$ECHO $path | $GREP ^.:`
23406  new_path="$path"
23407  if test "x$has_colon" = x; then
23408    # Not in mixed or Windows style, start by that.
23409    new_path=`cmd //c echo $path`
23410  fi
23411
23412
23413  input_path="$new_path"
23414  # Check if we need to convert this using DOS-style short mode. If the path
23415  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23416  # take no chances and rewrite it.
23417  # Note: m4 eats our [], so we need to use [ and ] instead.
23418  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23419  if test "x$has_forbidden_chars" != x; then
23420    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23421    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23422  fi
23423
23424
23425  windows_path="$new_path"
23426  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23427    unix_path=`$CYGPATH -u "$windows_path"`
23428    new_path="$unix_path"
23429  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23430    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23431    new_path="$unix_path"
23432  fi
23433
23434  if test "x$path" != "x$new_path"; then
23435    BOOT_JDK="$new_path"
23436    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23437$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23438  fi
23439
23440  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23441  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23442
23443    else
23444      # We're on a unix platform. Hooray! :)
23445      path="$BOOT_JDK"
23446      has_space=`$ECHO "$path" | $GREP " "`
23447      if test "x$has_space" != x; then
23448        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23449$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23450        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23451      fi
23452
23453      # Use eval to expand a potential ~
23454      eval path="$path"
23455      if test ! -f "$path" && test ! -d "$path"; then
23456        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23457      fi
23458
23459      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23460    fi
23461  fi
23462
23463            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23464$as_echo_n "checking for Boot JDK... " >&6; }
23465            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23466$as_echo "$BOOT_JDK" >&6; }
23467            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23468$as_echo_n "checking Boot JDK version... " >&6; }
23469            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23470            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23471$as_echo "$BOOT_JDK_VERSION" >&6; }
23472          fi # end check jdk version
23473        fi # end check javac
23474      fi # end check java
23475    fi # end check boot jdk found
23476  fi
23477
23478
23479  if test "x$BOOT_JDK_FOUND" = xno; then
23480    # Now execute the test
23481
23482  if test "x$ProgramFiles" != x; then
23483    VIRTUAL_DIR="$ProgramFiles/Java"
23484
23485  windows_path="$VIRTUAL_DIR"
23486  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23487    unix_path=`$CYGPATH -u "$windows_path"`
23488    VIRTUAL_DIR="$unix_path"
23489  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23490    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23491    VIRTUAL_DIR="$unix_path"
23492  fi
23493
23494
23495  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23496  BOOT_JDK_SUFFIX=""
23497  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23498  if test "x$ALL_JDKS_FOUND" != x; then
23499    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23500
23501  if test "x$BOOT_JDK_FOUND" = xno; then
23502    # Now execute the test
23503
23504        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23505        if test -d "$BOOT_JDK"; then
23506          BOOT_JDK_FOUND=maybe
23507          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23508$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23509        fi
23510
23511
23512    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23513    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23514      # Do we have a bin/java?
23515      if test ! -x "$BOOT_JDK/bin/java"; then
23516        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23517$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23518        BOOT_JDK_FOUND=no
23519      else
23520        # Do we have a bin/javac?
23521        if test ! -x "$BOOT_JDK/bin/javac"; then
23522          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23523$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23524          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23525$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23526          BOOT_JDK_FOUND=no
23527        else
23528          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23529          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23530
23531          # Extra M4 quote needed to protect [] in grep expression.
23532          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23533          if test "x$FOUND_CORRECT_VERSION" = x; then
23534            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23535$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23536            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23537$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23538            BOOT_JDK_FOUND=no
23539          else
23540            # We're done! :-)
23541            BOOT_JDK_FOUND=yes
23542
23543  # Only process if variable expands to non-empty
23544
23545  if test "x$BOOT_JDK" != x; then
23546    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23547
23548  # Input might be given as Windows format, start by converting to
23549  # unix format.
23550  path="$BOOT_JDK"
23551  new_path=`$CYGPATH -u "$path"`
23552
23553  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23554  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23555  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23556  # "foo.exe" is OK but "foo" is an error.
23557  #
23558  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23559  # It is also a way to make sure we got the proper file name for the real test later on.
23560  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23561  if test "x$test_shortpath" = x; then
23562    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23563$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23564    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23565  fi
23566
23567  # Call helper function which possibly converts this using DOS-style short mode.
23568  # If so, the updated path is stored in $new_path.
23569
23570  input_path="$new_path"
23571  # Check if we need to convert this using DOS-style short mode. If the path
23572  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23573  # take no chances and rewrite it.
23574  # Note: m4 eats our [], so we need to use [ and ] instead.
23575  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23576  if test "x$has_forbidden_chars" != x; then
23577    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23578    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23579    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23580    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23581      # Going to short mode and back again did indeed matter. Since short mode is
23582      # case insensitive, let's make it lowercase to improve readability.
23583      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23584      # Now convert it back to Unix-style (cygpath)
23585      input_path=`$CYGPATH -u "$shortmode_path"`
23586      new_path="$input_path"
23587    fi
23588  fi
23589
23590  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23591  if test "x$test_cygdrive_prefix" = x; then
23592    # As a simple fix, exclude /usr/bin since it's not a real path.
23593    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23594      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23595      # a path prefixed by /cygdrive for fixpath to work.
23596      new_path="$CYGWIN_ROOT_PATH$input_path"
23597    fi
23598  fi
23599
23600
23601  if test "x$path" != "x$new_path"; then
23602    BOOT_JDK="$new_path"
23603    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23604$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23605  fi
23606
23607    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23608
23609  path="$BOOT_JDK"
23610  has_colon=`$ECHO $path | $GREP ^.:`
23611  new_path="$path"
23612  if test "x$has_colon" = x; then
23613    # Not in mixed or Windows style, start by that.
23614    new_path=`cmd //c echo $path`
23615  fi
23616
23617
23618  input_path="$new_path"
23619  # Check if we need to convert this using DOS-style short mode. If the path
23620  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23621  # take no chances and rewrite it.
23622  # Note: m4 eats our [], so we need to use [ and ] instead.
23623  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23624  if test "x$has_forbidden_chars" != x; then
23625    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23626    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23627  fi
23628
23629
23630  windows_path="$new_path"
23631  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23632    unix_path=`$CYGPATH -u "$windows_path"`
23633    new_path="$unix_path"
23634  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23635    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23636    new_path="$unix_path"
23637  fi
23638
23639  if test "x$path" != "x$new_path"; then
23640    BOOT_JDK="$new_path"
23641    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23642$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23643  fi
23644
23645  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23646  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23647
23648    else
23649      # We're on a unix platform. Hooray! :)
23650      path="$BOOT_JDK"
23651      has_space=`$ECHO "$path" | $GREP " "`
23652      if test "x$has_space" != x; then
23653        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23654$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23655        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23656      fi
23657
23658      # Use eval to expand a potential ~
23659      eval path="$path"
23660      if test ! -f "$path" && test ! -d "$path"; then
23661        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23662      fi
23663
23664      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23665    fi
23666  fi
23667
23668            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23669$as_echo_n "checking for Boot JDK... " >&6; }
23670            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23671$as_echo "$BOOT_JDK" >&6; }
23672            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23673$as_echo_n "checking Boot JDK version... " >&6; }
23674            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23675            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23676$as_echo "$BOOT_JDK_VERSION" >&6; }
23677          fi # end check jdk version
23678        fi # end check javac
23679      fi # end check java
23680    fi # end check boot jdk found
23681  fi
23682
23683    done
23684  fi
23685
23686  fi
23687
23688
23689    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23690    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23691      # Do we have a bin/java?
23692      if test ! -x "$BOOT_JDK/bin/java"; then
23693        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23694$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23695        BOOT_JDK_FOUND=no
23696      else
23697        # Do we have a bin/javac?
23698        if test ! -x "$BOOT_JDK/bin/javac"; then
23699          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23700$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23701          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23702$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23703          BOOT_JDK_FOUND=no
23704        else
23705          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23706          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23707
23708          # Extra M4 quote needed to protect [] in grep expression.
23709          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23710          if test "x$FOUND_CORRECT_VERSION" = x; then
23711            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23712$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23713            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23714$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23715            BOOT_JDK_FOUND=no
23716          else
23717            # We're done! :-)
23718            BOOT_JDK_FOUND=yes
23719
23720  # Only process if variable expands to non-empty
23721
23722  if test "x$BOOT_JDK" != x; then
23723    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23724
23725  # Input might be given as Windows format, start by converting to
23726  # unix format.
23727  path="$BOOT_JDK"
23728  new_path=`$CYGPATH -u "$path"`
23729
23730  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23731  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23732  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23733  # "foo.exe" is OK but "foo" is an error.
23734  #
23735  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23736  # It is also a way to make sure we got the proper file name for the real test later on.
23737  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23738  if test "x$test_shortpath" = x; then
23739    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23740$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23741    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23742  fi
23743
23744  # Call helper function which possibly converts this using DOS-style short mode.
23745  # If so, the updated path is stored in $new_path.
23746
23747  input_path="$new_path"
23748  # Check if we need to convert this using DOS-style short mode. If the path
23749  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23750  # take no chances and rewrite it.
23751  # Note: m4 eats our [], so we need to use [ and ] instead.
23752  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23753  if test "x$has_forbidden_chars" != x; then
23754    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23755    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23756    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23757    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23758      # Going to short mode and back again did indeed matter. Since short mode is
23759      # case insensitive, let's make it lowercase to improve readability.
23760      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23761      # Now convert it back to Unix-style (cygpath)
23762      input_path=`$CYGPATH -u "$shortmode_path"`
23763      new_path="$input_path"
23764    fi
23765  fi
23766
23767  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23768  if test "x$test_cygdrive_prefix" = x; then
23769    # As a simple fix, exclude /usr/bin since it's not a real path.
23770    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23771      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23772      # a path prefixed by /cygdrive for fixpath to work.
23773      new_path="$CYGWIN_ROOT_PATH$input_path"
23774    fi
23775  fi
23776
23777
23778  if test "x$path" != "x$new_path"; then
23779    BOOT_JDK="$new_path"
23780    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23781$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23782  fi
23783
23784    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23785
23786  path="$BOOT_JDK"
23787  has_colon=`$ECHO $path | $GREP ^.:`
23788  new_path="$path"
23789  if test "x$has_colon" = x; then
23790    # Not in mixed or Windows style, start by that.
23791    new_path=`cmd //c echo $path`
23792  fi
23793
23794
23795  input_path="$new_path"
23796  # Check if we need to convert this using DOS-style short mode. If the path
23797  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23798  # take no chances and rewrite it.
23799  # Note: m4 eats our [], so we need to use [ and ] instead.
23800  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23801  if test "x$has_forbidden_chars" != x; then
23802    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23803    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23804  fi
23805
23806
23807  windows_path="$new_path"
23808  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23809    unix_path=`$CYGPATH -u "$windows_path"`
23810    new_path="$unix_path"
23811  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23812    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23813    new_path="$unix_path"
23814  fi
23815
23816  if test "x$path" != "x$new_path"; then
23817    BOOT_JDK="$new_path"
23818    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23819$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23820  fi
23821
23822  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23823  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23824
23825    else
23826      # We're on a unix platform. Hooray! :)
23827      path="$BOOT_JDK"
23828      has_space=`$ECHO "$path" | $GREP " "`
23829      if test "x$has_space" != x; then
23830        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23831$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23832        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23833      fi
23834
23835      # Use eval to expand a potential ~
23836      eval path="$path"
23837      if test ! -f "$path" && test ! -d "$path"; then
23838        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23839      fi
23840
23841      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23842    fi
23843  fi
23844
23845            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23846$as_echo_n "checking for Boot JDK... " >&6; }
23847            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23848$as_echo "$BOOT_JDK" >&6; }
23849            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23850$as_echo_n "checking Boot JDK version... " >&6; }
23851            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23852            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23853$as_echo "$BOOT_JDK_VERSION" >&6; }
23854          fi # end check jdk version
23855        fi # end check javac
23856      fi # end check java
23857    fi # end check boot jdk found
23858  fi
23859
23860
23861  if test "x$BOOT_JDK_FOUND" = xno; then
23862    # Now execute the test
23863
23864  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
23865  BOOT_JDK_SUFFIX=""
23866  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23867  if test "x$ALL_JDKS_FOUND" != x; then
23868    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23869
23870  if test "x$BOOT_JDK_FOUND" = xno; then
23871    # Now execute the test
23872
23873        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23874        if test -d "$BOOT_JDK"; then
23875          BOOT_JDK_FOUND=maybe
23876          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23877$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23878        fi
23879
23880
23881    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23882    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23883      # Do we have a bin/java?
23884      if test ! -x "$BOOT_JDK/bin/java"; then
23885        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23886$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23887        BOOT_JDK_FOUND=no
23888      else
23889        # Do we have a bin/javac?
23890        if test ! -x "$BOOT_JDK/bin/javac"; then
23891          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23892$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23893          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23894$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23895          BOOT_JDK_FOUND=no
23896        else
23897          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23898          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23899
23900          # Extra M4 quote needed to protect [] in grep expression.
23901          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23902          if test "x$FOUND_CORRECT_VERSION" = x; then
23903            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23904$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23905            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23906$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23907            BOOT_JDK_FOUND=no
23908          else
23909            # We're done! :-)
23910            BOOT_JDK_FOUND=yes
23911
23912  # Only process if variable expands to non-empty
23913
23914  if test "x$BOOT_JDK" != x; then
23915    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23916
23917  # Input might be given as Windows format, start by converting to
23918  # unix format.
23919  path="$BOOT_JDK"
23920  new_path=`$CYGPATH -u "$path"`
23921
23922  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23923  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23924  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23925  # "foo.exe" is OK but "foo" is an error.
23926  #
23927  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23928  # It is also a way to make sure we got the proper file name for the real test later on.
23929  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23930  if test "x$test_shortpath" = x; then
23931    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23932$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23933    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23934  fi
23935
23936  # Call helper function which possibly converts this using DOS-style short mode.
23937  # If so, the updated path is stored in $new_path.
23938
23939  input_path="$new_path"
23940  # Check if we need to convert this using DOS-style short mode. If the path
23941  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23942  # take no chances and rewrite it.
23943  # Note: m4 eats our [], so we need to use [ and ] instead.
23944  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23945  if test "x$has_forbidden_chars" != x; then
23946    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23947    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23948    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23949    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23950      # Going to short mode and back again did indeed matter. Since short mode is
23951      # case insensitive, let's make it lowercase to improve readability.
23952      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23953      # Now convert it back to Unix-style (cygpath)
23954      input_path=`$CYGPATH -u "$shortmode_path"`
23955      new_path="$input_path"
23956    fi
23957  fi
23958
23959  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23960  if test "x$test_cygdrive_prefix" = x; then
23961    # As a simple fix, exclude /usr/bin since it's not a real path.
23962    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23963      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23964      # a path prefixed by /cygdrive for fixpath to work.
23965      new_path="$CYGWIN_ROOT_PATH$input_path"
23966    fi
23967  fi
23968
23969
23970  if test "x$path" != "x$new_path"; then
23971    BOOT_JDK="$new_path"
23972    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23973$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23974  fi
23975
23976    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23977
23978  path="$BOOT_JDK"
23979  has_colon=`$ECHO $path | $GREP ^.:`
23980  new_path="$path"
23981  if test "x$has_colon" = x; then
23982    # Not in mixed or Windows style, start by that.
23983    new_path=`cmd //c echo $path`
23984  fi
23985
23986
23987  input_path="$new_path"
23988  # Check if we need to convert this using DOS-style short mode. If the path
23989  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23990  # take no chances and rewrite it.
23991  # Note: m4 eats our [], so we need to use [ and ] instead.
23992  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23993  if test "x$has_forbidden_chars" != x; then
23994    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23995    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23996  fi
23997
23998
23999  windows_path="$new_path"
24000  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24001    unix_path=`$CYGPATH -u "$windows_path"`
24002    new_path="$unix_path"
24003  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24004    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24005    new_path="$unix_path"
24006  fi
24007
24008  if test "x$path" != "x$new_path"; then
24009    BOOT_JDK="$new_path"
24010    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24011$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24012  fi
24013
24014  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24015  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24016
24017    else
24018      # We're on a unix platform. Hooray! :)
24019      path="$BOOT_JDK"
24020      has_space=`$ECHO "$path" | $GREP " "`
24021      if test "x$has_space" != x; then
24022        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24023$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24024        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24025      fi
24026
24027      # Use eval to expand a potential ~
24028      eval path="$path"
24029      if test ! -f "$path" && test ! -d "$path"; then
24030        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24031      fi
24032
24033      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24034    fi
24035  fi
24036
24037            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24038$as_echo_n "checking for Boot JDK... " >&6; }
24039            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24040$as_echo "$BOOT_JDK" >&6; }
24041            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24042$as_echo_n "checking Boot JDK version... " >&6; }
24043            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24044            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24045$as_echo "$BOOT_JDK_VERSION" >&6; }
24046          fi # end check jdk version
24047        fi # end check javac
24048      fi # end check java
24049    fi # end check boot jdk found
24050  fi
24051
24052    done
24053  fi
24054
24055
24056    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24057    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24058      # Do we have a bin/java?
24059      if test ! -x "$BOOT_JDK/bin/java"; then
24060        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24061$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24062        BOOT_JDK_FOUND=no
24063      else
24064        # Do we have a bin/javac?
24065        if test ! -x "$BOOT_JDK/bin/javac"; then
24066          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24067$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24068          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24069$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24070          BOOT_JDK_FOUND=no
24071        else
24072          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24073          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24074
24075          # Extra M4 quote needed to protect [] in grep expression.
24076          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24077          if test "x$FOUND_CORRECT_VERSION" = x; then
24078            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24079$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24080            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24081$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24082            BOOT_JDK_FOUND=no
24083          else
24084            # We're done! :-)
24085            BOOT_JDK_FOUND=yes
24086
24087  # Only process if variable expands to non-empty
24088
24089  if test "x$BOOT_JDK" != x; then
24090    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24091
24092  # Input might be given as Windows format, start by converting to
24093  # unix format.
24094  path="$BOOT_JDK"
24095  new_path=`$CYGPATH -u "$path"`
24096
24097  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24098  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24099  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24100  # "foo.exe" is OK but "foo" is an error.
24101  #
24102  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24103  # It is also a way to make sure we got the proper file name for the real test later on.
24104  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24105  if test "x$test_shortpath" = x; then
24106    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24107$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24108    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24109  fi
24110
24111  # Call helper function which possibly converts this using DOS-style short mode.
24112  # If so, the updated path is stored in $new_path.
24113
24114  input_path="$new_path"
24115  # Check if we need to convert this using DOS-style short mode. If the path
24116  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24117  # take no chances and rewrite it.
24118  # Note: m4 eats our [], so we need to use [ and ] instead.
24119  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24120  if test "x$has_forbidden_chars" != x; then
24121    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24122    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24123    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24124    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24125      # Going to short mode and back again did indeed matter. Since short mode is
24126      # case insensitive, let's make it lowercase to improve readability.
24127      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24128      # Now convert it back to Unix-style (cygpath)
24129      input_path=`$CYGPATH -u "$shortmode_path"`
24130      new_path="$input_path"
24131    fi
24132  fi
24133
24134  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24135  if test "x$test_cygdrive_prefix" = x; then
24136    # As a simple fix, exclude /usr/bin since it's not a real path.
24137    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24138      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24139      # a path prefixed by /cygdrive for fixpath to work.
24140      new_path="$CYGWIN_ROOT_PATH$input_path"
24141    fi
24142  fi
24143
24144
24145  if test "x$path" != "x$new_path"; then
24146    BOOT_JDK="$new_path"
24147    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24148$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24149  fi
24150
24151    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24152
24153  path="$BOOT_JDK"
24154  has_colon=`$ECHO $path | $GREP ^.:`
24155  new_path="$path"
24156  if test "x$has_colon" = x; then
24157    # Not in mixed or Windows style, start by that.
24158    new_path=`cmd //c echo $path`
24159  fi
24160
24161
24162  input_path="$new_path"
24163  # Check if we need to convert this using DOS-style short mode. If the path
24164  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24165  # take no chances and rewrite it.
24166  # Note: m4 eats our [], so we need to use [ and ] instead.
24167  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24168  if test "x$has_forbidden_chars" != x; then
24169    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24170    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24171  fi
24172
24173
24174  windows_path="$new_path"
24175  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24176    unix_path=`$CYGPATH -u "$windows_path"`
24177    new_path="$unix_path"
24178  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24179    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24180    new_path="$unix_path"
24181  fi
24182
24183  if test "x$path" != "x$new_path"; then
24184    BOOT_JDK="$new_path"
24185    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24186$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24187  fi
24188
24189  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24190  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24191
24192    else
24193      # We're on a unix platform. Hooray! :)
24194      path="$BOOT_JDK"
24195      has_space=`$ECHO "$path" | $GREP " "`
24196      if test "x$has_space" != x; then
24197        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24198$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24199        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24200      fi
24201
24202      # Use eval to expand a potential ~
24203      eval path="$path"
24204      if test ! -f "$path" && test ! -d "$path"; then
24205        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24206      fi
24207
24208      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24209    fi
24210  fi
24211
24212            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24213$as_echo_n "checking for Boot JDK... " >&6; }
24214            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24215$as_echo "$BOOT_JDK" >&6; }
24216            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24217$as_echo_n "checking Boot JDK version... " >&6; }
24218            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24219            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24220$as_echo "$BOOT_JDK_VERSION" >&6; }
24221          fi # end check jdk version
24222        fi # end check javac
24223      fi # end check java
24224    fi # end check boot jdk found
24225  fi
24226
24227  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
24228
24229  if test "x$BOOT_JDK_FOUND" = xno; then
24230    # Now execute the test
24231
24232  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
24233  BOOT_JDK_SUFFIX="/Contents/Home"
24234  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24235  if test "x$ALL_JDKS_FOUND" != x; then
24236    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24237
24238  if test "x$BOOT_JDK_FOUND" = xno; then
24239    # Now execute the test
24240
24241        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24242        if test -d "$BOOT_JDK"; then
24243          BOOT_JDK_FOUND=maybe
24244          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24245$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24246        fi
24247
24248
24249    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24250    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24251      # Do we have a bin/java?
24252      if test ! -x "$BOOT_JDK/bin/java"; then
24253        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24254$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24255        BOOT_JDK_FOUND=no
24256      else
24257        # Do we have a bin/javac?
24258        if test ! -x "$BOOT_JDK/bin/javac"; then
24259          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24260$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24261          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24262$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&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  # Only process if variable expands to non-empty
24281
24282  if test "x$BOOT_JDK" != x; then
24283    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24284
24285  # Input might be given as Windows format, start by converting to
24286  # unix format.
24287  path="$BOOT_JDK"
24288  new_path=`$CYGPATH -u "$path"`
24289
24290  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24291  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24292  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24293  # "foo.exe" is OK but "foo" is an error.
24294  #
24295  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24296  # It is also a way to make sure we got the proper file name for the real test later on.
24297  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24298  if test "x$test_shortpath" = x; then
24299    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24300$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24301    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24302  fi
24303
24304  # Call helper function which possibly converts this using DOS-style short mode.
24305  # If so, the updated path is stored in $new_path.
24306
24307  input_path="$new_path"
24308  # Check if we need to convert this using DOS-style short mode. If the path
24309  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24310  # take no chances and rewrite it.
24311  # Note: m4 eats our [], so we need to use [ and ] instead.
24312  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24313  if test "x$has_forbidden_chars" != x; then
24314    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24315    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24316    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24317    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24318      # Going to short mode and back again did indeed matter. Since short mode is
24319      # case insensitive, let's make it lowercase to improve readability.
24320      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24321      # Now convert it back to Unix-style (cygpath)
24322      input_path=`$CYGPATH -u "$shortmode_path"`
24323      new_path="$input_path"
24324    fi
24325  fi
24326
24327  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24328  if test "x$test_cygdrive_prefix" = x; then
24329    # As a simple fix, exclude /usr/bin since it's not a real path.
24330    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24331      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24332      # a path prefixed by /cygdrive for fixpath to work.
24333      new_path="$CYGWIN_ROOT_PATH$input_path"
24334    fi
24335  fi
24336
24337
24338  if test "x$path" != "x$new_path"; then
24339    BOOT_JDK="$new_path"
24340    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24341$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24342  fi
24343
24344    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24345
24346  path="$BOOT_JDK"
24347  has_colon=`$ECHO $path | $GREP ^.:`
24348  new_path="$path"
24349  if test "x$has_colon" = x; then
24350    # Not in mixed or Windows style, start by that.
24351    new_path=`cmd //c echo $path`
24352  fi
24353
24354
24355  input_path="$new_path"
24356  # Check if we need to convert this using DOS-style short mode. If the path
24357  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24358  # take no chances and rewrite it.
24359  # Note: m4 eats our [], so we need to use [ and ] instead.
24360  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24361  if test "x$has_forbidden_chars" != x; then
24362    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24363    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24364  fi
24365
24366
24367  windows_path="$new_path"
24368  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24369    unix_path=`$CYGPATH -u "$windows_path"`
24370    new_path="$unix_path"
24371  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24372    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24373    new_path="$unix_path"
24374  fi
24375
24376  if test "x$path" != "x$new_path"; then
24377    BOOT_JDK="$new_path"
24378    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24379$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24380  fi
24381
24382  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24383  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24384
24385    else
24386      # We're on a unix platform. Hooray! :)
24387      path="$BOOT_JDK"
24388      has_space=`$ECHO "$path" | $GREP " "`
24389      if test "x$has_space" != x; then
24390        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24391$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24392        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24393      fi
24394
24395      # Use eval to expand a potential ~
24396      eval path="$path"
24397      if test ! -f "$path" && test ! -d "$path"; then
24398        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24399      fi
24400
24401      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24402    fi
24403  fi
24404
24405            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24406$as_echo_n "checking for Boot JDK... " >&6; }
24407            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24408$as_echo "$BOOT_JDK" >&6; }
24409            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24410$as_echo_n "checking Boot JDK version... " >&6; }
24411            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24412            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24413$as_echo "$BOOT_JDK_VERSION" >&6; }
24414          fi # end check jdk version
24415        fi # end check javac
24416      fi # end check java
24417    fi # end check boot jdk found
24418  fi
24419
24420    done
24421  fi
24422
24423
24424    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24425    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24426      # Do we have a bin/java?
24427      if test ! -x "$BOOT_JDK/bin/java"; then
24428        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24429$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24430        BOOT_JDK_FOUND=no
24431      else
24432        # Do we have a bin/javac?
24433        if test ! -x "$BOOT_JDK/bin/javac"; then
24434          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24435$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24436          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24437$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24438          BOOT_JDK_FOUND=no
24439        else
24440          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24441          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24442
24443          # Extra M4 quote needed to protect [] in grep expression.
24444          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24445          if test "x$FOUND_CORRECT_VERSION" = x; then
24446            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24447$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24448            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24449$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24450            BOOT_JDK_FOUND=no
24451          else
24452            # We're done! :-)
24453            BOOT_JDK_FOUND=yes
24454
24455  # Only process if variable expands to non-empty
24456
24457  if test "x$BOOT_JDK" != x; then
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-style (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  fi
24579
24580            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24581$as_echo_n "checking for Boot JDK... " >&6; }
24582            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24583$as_echo "$BOOT_JDK" >&6; }
24584            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24585$as_echo_n "checking Boot JDK version... " >&6; }
24586            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24587            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24588$as_echo "$BOOT_JDK_VERSION" >&6; }
24589          fi # end check jdk version
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          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24633          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24634
24635          # Extra M4 quote needed to protect [] in grep expression.
24636          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24637          if test "x$FOUND_CORRECT_VERSION" = x; then
24638            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24639$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24640            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24641$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24642            BOOT_JDK_FOUND=no
24643          else
24644            # We're done! :-)
24645            BOOT_JDK_FOUND=yes
24646
24647  # Only process if variable expands to non-empty
24648
24649  if test "x$BOOT_JDK" != x; then
24650    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24651
24652  # Input might be given as Windows format, start by converting to
24653  # unix format.
24654  path="$BOOT_JDK"
24655  new_path=`$CYGPATH -u "$path"`
24656
24657  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24658  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24659  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24660  # "foo.exe" is OK but "foo" is an error.
24661  #
24662  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24663  # It is also a way to make sure we got the proper file name for the real test later on.
24664  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24665  if test "x$test_shortpath" = x; then
24666    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24667$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24668    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24669  fi
24670
24671  # Call helper function which possibly converts this using DOS-style short mode.
24672  # If so, the updated path is stored in $new_path.
24673
24674  input_path="$new_path"
24675  # Check if we need to convert this using DOS-style short mode. If the path
24676  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24677  # take no chances and rewrite it.
24678  # Note: m4 eats our [], so we need to use [ and ] instead.
24679  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24680  if test "x$has_forbidden_chars" != x; then
24681    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24682    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24683    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24684    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24685      # Going to short mode and back again did indeed matter. Since short mode is
24686      # case insensitive, let's make it lowercase to improve readability.
24687      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24688      # Now convert it back to Unix-style (cygpath)
24689      input_path=`$CYGPATH -u "$shortmode_path"`
24690      new_path="$input_path"
24691    fi
24692  fi
24693
24694  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24695  if test "x$test_cygdrive_prefix" = x; then
24696    # As a simple fix, exclude /usr/bin since it's not a real path.
24697    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24698      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24699      # a path prefixed by /cygdrive for fixpath to work.
24700      new_path="$CYGWIN_ROOT_PATH$input_path"
24701    fi
24702  fi
24703
24704
24705  if test "x$path" != "x$new_path"; then
24706    BOOT_JDK="$new_path"
24707    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24708$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24709  fi
24710
24711    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24712
24713  path="$BOOT_JDK"
24714  has_colon=`$ECHO $path | $GREP ^.:`
24715  new_path="$path"
24716  if test "x$has_colon" = x; then
24717    # Not in mixed or Windows style, start by that.
24718    new_path=`cmd //c echo $path`
24719  fi
24720
24721
24722  input_path="$new_path"
24723  # Check if we need to convert this using DOS-style short mode. If the path
24724  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24725  # take no chances and rewrite it.
24726  # Note: m4 eats our [], so we need to use [ and ] instead.
24727  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24728  if test "x$has_forbidden_chars" != x; then
24729    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24730    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24731  fi
24732
24733
24734  windows_path="$new_path"
24735  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24736    unix_path=`$CYGPATH -u "$windows_path"`
24737    new_path="$unix_path"
24738  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24739    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24740    new_path="$unix_path"
24741  fi
24742
24743  if test "x$path" != "x$new_path"; then
24744    BOOT_JDK="$new_path"
24745    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24746$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24747  fi
24748
24749  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24750  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24751
24752    else
24753      # We're on a unix platform. Hooray! :)
24754      path="$BOOT_JDK"
24755      has_space=`$ECHO "$path" | $GREP " "`
24756      if test "x$has_space" != x; then
24757        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24758$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24759        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24760      fi
24761
24762      # Use eval to expand a potential ~
24763      eval path="$path"
24764      if test ! -f "$path" && test ! -d "$path"; then
24765        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24766      fi
24767
24768      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24769    fi
24770  fi
24771
24772            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24773$as_echo_n "checking for Boot JDK... " >&6; }
24774            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24775$as_echo "$BOOT_JDK" >&6; }
24776            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24777$as_echo_n "checking Boot JDK version... " >&6; }
24778            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24779            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24780$as_echo "$BOOT_JDK_VERSION" >&6; }
24781          fi # end check jdk version
24782        fi # end check javac
24783      fi # end check java
24784    fi # end check boot jdk found
24785  fi
24786
24787    done
24788  fi
24789
24790
24791    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24792    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24793      # Do we have a bin/java?
24794      if test ! -x "$BOOT_JDK/bin/java"; then
24795        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24796$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24797        BOOT_JDK_FOUND=no
24798      else
24799        # Do we have a bin/javac?
24800        if test ! -x "$BOOT_JDK/bin/javac"; then
24801          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24802$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24803          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24804$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24805          BOOT_JDK_FOUND=no
24806        else
24807          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24808          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24809
24810          # Extra M4 quote needed to protect [] in grep expression.
24811          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24812          if test "x$FOUND_CORRECT_VERSION" = x; then
24813            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24814$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24815            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24816$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24817            BOOT_JDK_FOUND=no
24818          else
24819            # We're done! :-)
24820            BOOT_JDK_FOUND=yes
24821
24822  # Only process if variable expands to non-empty
24823
24824  if test "x$BOOT_JDK" != x; then
24825    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24826
24827  # Input might be given as Windows format, start by converting to
24828  # unix format.
24829  path="$BOOT_JDK"
24830  new_path=`$CYGPATH -u "$path"`
24831
24832  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24833  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24834  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24835  # "foo.exe" is OK but "foo" is an error.
24836  #
24837  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24838  # It is also a way to make sure we got the proper file name for the real test later on.
24839  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24840  if test "x$test_shortpath" = x; then
24841    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24842$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24843    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24844  fi
24845
24846  # Call helper function which possibly converts this using DOS-style short mode.
24847  # If so, the updated path is stored in $new_path.
24848
24849  input_path="$new_path"
24850  # Check if we need to convert this using DOS-style short mode. If the path
24851  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24852  # take no chances and rewrite it.
24853  # Note: m4 eats our [], so we need to use [ and ] instead.
24854  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24855  if test "x$has_forbidden_chars" != x; then
24856    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24857    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24858    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24859    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24860      # Going to short mode and back again did indeed matter. Since short mode is
24861      # case insensitive, let's make it lowercase to improve readability.
24862      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24863      # Now convert it back to Unix-style (cygpath)
24864      input_path=`$CYGPATH -u "$shortmode_path"`
24865      new_path="$input_path"
24866    fi
24867  fi
24868
24869  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24870  if test "x$test_cygdrive_prefix" = x; then
24871    # As a simple fix, exclude /usr/bin since it's not a real path.
24872    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24873      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24874      # a path prefixed by /cygdrive for fixpath to work.
24875      new_path="$CYGWIN_ROOT_PATH$input_path"
24876    fi
24877  fi
24878
24879
24880  if test "x$path" != "x$new_path"; then
24881    BOOT_JDK="$new_path"
24882    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24883$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24884  fi
24885
24886    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24887
24888  path="$BOOT_JDK"
24889  has_colon=`$ECHO $path | $GREP ^.:`
24890  new_path="$path"
24891  if test "x$has_colon" = x; then
24892    # Not in mixed or Windows style, start by that.
24893    new_path=`cmd //c echo $path`
24894  fi
24895
24896
24897  input_path="$new_path"
24898  # Check if we need to convert this using DOS-style short mode. If the path
24899  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24900  # take no chances and rewrite it.
24901  # Note: m4 eats our [], so we need to use [ and ] instead.
24902  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24903  if test "x$has_forbidden_chars" != x; then
24904    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24905    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24906  fi
24907
24908
24909  windows_path="$new_path"
24910  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24911    unix_path=`$CYGPATH -u "$windows_path"`
24912    new_path="$unix_path"
24913  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24914    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24915    new_path="$unix_path"
24916  fi
24917
24918  if test "x$path" != "x$new_path"; then
24919    BOOT_JDK="$new_path"
24920    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24921$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24922  fi
24923
24924  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24925  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24926
24927    else
24928      # We're on a unix platform. Hooray! :)
24929      path="$BOOT_JDK"
24930      has_space=`$ECHO "$path" | $GREP " "`
24931      if test "x$has_space" != x; then
24932        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24933$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24934        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24935      fi
24936
24937      # Use eval to expand a potential ~
24938      eval path="$path"
24939      if test ! -f "$path" && test ! -d "$path"; then
24940        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24941      fi
24942
24943      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24944    fi
24945  fi
24946
24947            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24948$as_echo_n "checking for Boot JDK... " >&6; }
24949            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24950$as_echo "$BOOT_JDK" >&6; }
24951            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24952$as_echo_n "checking Boot JDK version... " >&6; }
24953            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24954            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24955$as_echo "$BOOT_JDK_VERSION" >&6; }
24956          fi # end check jdk version
24957        fi # end check javac
24958      fi # end check java
24959    fi # end check boot jdk found
24960  fi
24961
24962  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
24963
24964  if test "x$BOOT_JDK_FOUND" = xno; then
24965    # Now execute the test
24966
24967  BOOT_JDK_PREFIX="/usr/lib/jvm"
24968  BOOT_JDK_SUFFIX=""
24969  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24970  if test "x$ALL_JDKS_FOUND" != x; then
24971    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24972
24973  if test "x$BOOT_JDK_FOUND" = xno; then
24974    # Now execute the test
24975
24976        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24977        if test -d "$BOOT_JDK"; then
24978          BOOT_JDK_FOUND=maybe
24979          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24980$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24981        fi
24982
24983
24984    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24985    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24986      # Do we have a bin/java?
24987      if test ! -x "$BOOT_JDK/bin/java"; then
24988        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24989$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24990        BOOT_JDK_FOUND=no
24991      else
24992        # Do we have a bin/javac?
24993        if test ! -x "$BOOT_JDK/bin/javac"; then
24994          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24995$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24996          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24997$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24998          BOOT_JDK_FOUND=no
24999        else
25000          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25001          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25002
25003          # Extra M4 quote needed to protect [] in grep expression.
25004          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25005          if test "x$FOUND_CORRECT_VERSION" = x; then
25006            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25007$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25008            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25009$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25010            BOOT_JDK_FOUND=no
25011          else
25012            # We're done! :-)
25013            BOOT_JDK_FOUND=yes
25014
25015  # Only process if variable expands to non-empty
25016
25017  if test "x$BOOT_JDK" != x; then
25018    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25019
25020  # Input might be given as Windows format, start by converting to
25021  # unix format.
25022  path="$BOOT_JDK"
25023  new_path=`$CYGPATH -u "$path"`
25024
25025  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25026  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25027  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25028  # "foo.exe" is OK but "foo" is an error.
25029  #
25030  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25031  # It is also a way to make sure we got the proper file name for the real test later on.
25032  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25033  if test "x$test_shortpath" = x; then
25034    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25035$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25036    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25037  fi
25038
25039  # Call helper function which possibly converts this using DOS-style short mode.
25040  # If so, the updated path is stored in $new_path.
25041
25042  input_path="$new_path"
25043  # Check if we need to convert this using DOS-style short mode. If the path
25044  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25045  # take no chances and rewrite it.
25046  # Note: m4 eats our [], so we need to use [ and ] instead.
25047  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25048  if test "x$has_forbidden_chars" != x; then
25049    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25050    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25051    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25052    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25053      # Going to short mode and back again did indeed matter. Since short mode is
25054      # case insensitive, let's make it lowercase to improve readability.
25055      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25056      # Now convert it back to Unix-style (cygpath)
25057      input_path=`$CYGPATH -u "$shortmode_path"`
25058      new_path="$input_path"
25059    fi
25060  fi
25061
25062  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25063  if test "x$test_cygdrive_prefix" = x; then
25064    # As a simple fix, exclude /usr/bin since it's not a real path.
25065    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25066      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25067      # a path prefixed by /cygdrive for fixpath to work.
25068      new_path="$CYGWIN_ROOT_PATH$input_path"
25069    fi
25070  fi
25071
25072
25073  if test "x$path" != "x$new_path"; then
25074    BOOT_JDK="$new_path"
25075    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25076$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25077  fi
25078
25079    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25080
25081  path="$BOOT_JDK"
25082  has_colon=`$ECHO $path | $GREP ^.:`
25083  new_path="$path"
25084  if test "x$has_colon" = x; then
25085    # Not in mixed or Windows style, start by that.
25086    new_path=`cmd //c echo $path`
25087  fi
25088
25089
25090  input_path="$new_path"
25091  # Check if we need to convert this using DOS-style short mode. If the path
25092  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25093  # take no chances and rewrite it.
25094  # Note: m4 eats our [], so we need to use [ and ] instead.
25095  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25096  if test "x$has_forbidden_chars" != x; then
25097    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25098    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25099  fi
25100
25101
25102  windows_path="$new_path"
25103  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25104    unix_path=`$CYGPATH -u "$windows_path"`
25105    new_path="$unix_path"
25106  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25107    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25108    new_path="$unix_path"
25109  fi
25110
25111  if test "x$path" != "x$new_path"; then
25112    BOOT_JDK="$new_path"
25113    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25114$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25115  fi
25116
25117  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25118  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25119
25120    else
25121      # We're on a unix platform. Hooray! :)
25122      path="$BOOT_JDK"
25123      has_space=`$ECHO "$path" | $GREP " "`
25124      if test "x$has_space" != x; then
25125        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25126$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25127        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25128      fi
25129
25130      # Use eval to expand a potential ~
25131      eval path="$path"
25132      if test ! -f "$path" && test ! -d "$path"; then
25133        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25134      fi
25135
25136      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25137    fi
25138  fi
25139
25140            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25141$as_echo_n "checking for Boot JDK... " >&6; }
25142            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25143$as_echo "$BOOT_JDK" >&6; }
25144            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25145$as_echo_n "checking Boot JDK version... " >&6; }
25146            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25147            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25148$as_echo "$BOOT_JDK_VERSION" >&6; }
25149          fi # end check jdk version
25150        fi # end check javac
25151      fi # end check java
25152    fi # end check boot jdk found
25153  fi
25154
25155    done
25156  fi
25157
25158
25159    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25160    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25161      # Do we have a bin/java?
25162      if test ! -x "$BOOT_JDK/bin/java"; then
25163        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25164$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25165        BOOT_JDK_FOUND=no
25166      else
25167        # Do we have a bin/javac?
25168        if test ! -x "$BOOT_JDK/bin/javac"; then
25169          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25170$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25171          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25172$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25173          BOOT_JDK_FOUND=no
25174        else
25175          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25176          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25177
25178          # Extra M4 quote needed to protect [] in grep expression.
25179          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25180          if test "x$FOUND_CORRECT_VERSION" = x; then
25181            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25182$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25183            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25184$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25185            BOOT_JDK_FOUND=no
25186          else
25187            # We're done! :-)
25188            BOOT_JDK_FOUND=yes
25189
25190  # Only process if variable expands to non-empty
25191
25192  if test "x$BOOT_JDK" != x; then
25193    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25194
25195  # Input might be given as Windows format, start by converting to
25196  # unix format.
25197  path="$BOOT_JDK"
25198  new_path=`$CYGPATH -u "$path"`
25199
25200  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25201  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25202  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25203  # "foo.exe" is OK but "foo" is an error.
25204  #
25205  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25206  # It is also a way to make sure we got the proper file name for the real test later on.
25207  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25208  if test "x$test_shortpath" = x; then
25209    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25210$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25211    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25212  fi
25213
25214  # Call helper function which possibly converts this using DOS-style short mode.
25215  # If so, the updated path is stored in $new_path.
25216
25217  input_path="$new_path"
25218  # Check if we need to convert this using DOS-style short mode. If the path
25219  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25220  # take no chances and rewrite it.
25221  # Note: m4 eats our [], so we need to use [ and ] instead.
25222  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25223  if test "x$has_forbidden_chars" != x; then
25224    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25225    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25226    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25227    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25228      # Going to short mode and back again did indeed matter. Since short mode is
25229      # case insensitive, let's make it lowercase to improve readability.
25230      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25231      # Now convert it back to Unix-style (cygpath)
25232      input_path=`$CYGPATH -u "$shortmode_path"`
25233      new_path="$input_path"
25234    fi
25235  fi
25236
25237  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25238  if test "x$test_cygdrive_prefix" = x; then
25239    # As a simple fix, exclude /usr/bin since it's not a real path.
25240    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25241      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25242      # a path prefixed by /cygdrive for fixpath to work.
25243      new_path="$CYGWIN_ROOT_PATH$input_path"
25244    fi
25245  fi
25246
25247
25248  if test "x$path" != "x$new_path"; then
25249    BOOT_JDK="$new_path"
25250    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25251$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25252  fi
25253
25254    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25255
25256  path="$BOOT_JDK"
25257  has_colon=`$ECHO $path | $GREP ^.:`
25258  new_path="$path"
25259  if test "x$has_colon" = x; then
25260    # Not in mixed or Windows style, start by that.
25261    new_path=`cmd //c echo $path`
25262  fi
25263
25264
25265  input_path="$new_path"
25266  # Check if we need to convert this using DOS-style short mode. If the path
25267  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25268  # take no chances and rewrite it.
25269  # Note: m4 eats our [], so we need to use [ and ] instead.
25270  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25271  if test "x$has_forbidden_chars" != x; then
25272    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25273    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25274  fi
25275
25276
25277  windows_path="$new_path"
25278  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25279    unix_path=`$CYGPATH -u "$windows_path"`
25280    new_path="$unix_path"
25281  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25282    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25283    new_path="$unix_path"
25284  fi
25285
25286  if test "x$path" != "x$new_path"; then
25287    BOOT_JDK="$new_path"
25288    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25289$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25290  fi
25291
25292  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25293  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25294
25295    else
25296      # We're on a unix platform. Hooray! :)
25297      path="$BOOT_JDK"
25298      has_space=`$ECHO "$path" | $GREP " "`
25299      if test "x$has_space" != x; then
25300        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25301$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25302        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25303      fi
25304
25305      # Use eval to expand a potential ~
25306      eval path="$path"
25307      if test ! -f "$path" && test ! -d "$path"; then
25308        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25309      fi
25310
25311      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25312    fi
25313  fi
25314
25315            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25316$as_echo_n "checking for Boot JDK... " >&6; }
25317            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25318$as_echo "$BOOT_JDK" >&6; }
25319            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25320$as_echo_n "checking Boot JDK version... " >&6; }
25321            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25322            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25323$as_echo "$BOOT_JDK_VERSION" >&6; }
25324          fi # end check jdk version
25325        fi # end check javac
25326      fi # end check java
25327    fi # end check boot jdk found
25328  fi
25329
25330  fi
25331
25332
25333    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25334    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25335      # Do we have a bin/java?
25336      if test ! -x "$BOOT_JDK/bin/java"; then
25337        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25338$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25339        BOOT_JDK_FOUND=no
25340      else
25341        # Do we have a bin/javac?
25342        if test ! -x "$BOOT_JDK/bin/javac"; then
25343          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25344$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25345          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25346$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25347          BOOT_JDK_FOUND=no
25348        else
25349          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25350          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25351
25352          # Extra M4 quote needed to protect [] in grep expression.
25353          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25354          if test "x$FOUND_CORRECT_VERSION" = x; then
25355            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25356$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25357            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25358$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25359            BOOT_JDK_FOUND=no
25360          else
25361            # We're done! :-)
25362            BOOT_JDK_FOUND=yes
25363
25364  # Only process if variable expands to non-empty
25365
25366  if test "x$BOOT_JDK" != x; then
25367    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25368
25369  # Input might be given as Windows format, start by converting to
25370  # unix format.
25371  path="$BOOT_JDK"
25372  new_path=`$CYGPATH -u "$path"`
25373
25374  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25375  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25376  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25377  # "foo.exe" is OK but "foo" is an error.
25378  #
25379  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25380  # It is also a way to make sure we got the proper file name for the real test later on.
25381  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25382  if test "x$test_shortpath" = x; then
25383    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25384$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25385    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25386  fi
25387
25388  # Call helper function which possibly converts this using DOS-style short mode.
25389  # If so, the updated path is stored in $new_path.
25390
25391  input_path="$new_path"
25392  # Check if we need to convert this using DOS-style short mode. If the path
25393  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25394  # take no chances and rewrite it.
25395  # Note: m4 eats our [], so we need to use [ and ] instead.
25396  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25397  if test "x$has_forbidden_chars" != x; then
25398    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25399    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25400    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25401    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25402      # Going to short mode and back again did indeed matter. Since short mode is
25403      # case insensitive, let's make it lowercase to improve readability.
25404      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25405      # Now convert it back to Unix-style (cygpath)
25406      input_path=`$CYGPATH -u "$shortmode_path"`
25407      new_path="$input_path"
25408    fi
25409  fi
25410
25411  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25412  if test "x$test_cygdrive_prefix" = x; then
25413    # As a simple fix, exclude /usr/bin since it's not a real path.
25414    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25415      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25416      # a path prefixed by /cygdrive for fixpath to work.
25417      new_path="$CYGWIN_ROOT_PATH$input_path"
25418    fi
25419  fi
25420
25421
25422  if test "x$path" != "x$new_path"; then
25423    BOOT_JDK="$new_path"
25424    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25425$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25426  fi
25427
25428    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25429
25430  path="$BOOT_JDK"
25431  has_colon=`$ECHO $path | $GREP ^.:`
25432  new_path="$path"
25433  if test "x$has_colon" = x; then
25434    # Not in mixed or Windows style, start by that.
25435    new_path=`cmd //c echo $path`
25436  fi
25437
25438
25439  input_path="$new_path"
25440  # Check if we need to convert this using DOS-style short mode. If the path
25441  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25442  # take no chances and rewrite it.
25443  # Note: m4 eats our [], so we need to use [ and ] instead.
25444  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25445  if test "x$has_forbidden_chars" != x; then
25446    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25447    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25448  fi
25449
25450
25451  windows_path="$new_path"
25452  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25453    unix_path=`$CYGPATH -u "$windows_path"`
25454    new_path="$unix_path"
25455  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25456    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25457    new_path="$unix_path"
25458  fi
25459
25460  if test "x$path" != "x$new_path"; then
25461    BOOT_JDK="$new_path"
25462    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25463$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25464  fi
25465
25466  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25467  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25468
25469    else
25470      # We're on a unix platform. Hooray! :)
25471      path="$BOOT_JDK"
25472      has_space=`$ECHO "$path" | $GREP " "`
25473      if test "x$has_space" != x; then
25474        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25475$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25476        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25477      fi
25478
25479      # Use eval to expand a potential ~
25480      eval path="$path"
25481      if test ! -f "$path" && test ! -d "$path"; then
25482        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25483      fi
25484
25485      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25486    fi
25487  fi
25488
25489            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25490$as_echo_n "checking for Boot JDK... " >&6; }
25491            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25492$as_echo "$BOOT_JDK" >&6; }
25493            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25494$as_echo_n "checking Boot JDK version... " >&6; }
25495            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25496            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25497$as_echo "$BOOT_JDK_VERSION" >&6; }
25498          fi # end check jdk version
25499        fi # end check javac
25500      fi # end check java
25501    fi # end check boot jdk found
25502  fi
25503
25504
25505  # If we haven't found anything yet, we've truly lost. Give up.
25506  if test "x$BOOT_JDK_FOUND" = xno; then
25507
25508  # Print a helpful message on how to acquire the necessary build dependency.
25509  # openjdk is the help tag: freetype, cups, pulse, alsa etc
25510  MISSING_DEPENDENCY=openjdk
25511
25512  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25513    cygwin_help $MISSING_DEPENDENCY
25514  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25515    msys_help $MISSING_DEPENDENCY
25516  else
25517    PKGHANDLER_COMMAND=
25518
25519    case $PKGHANDLER in
25520      apt-get)
25521        apt_help     $MISSING_DEPENDENCY ;;
25522      yum)
25523        yum_help     $MISSING_DEPENDENCY ;;
25524      port)
25525        port_help    $MISSING_DEPENDENCY ;;
25526      pkgutil)
25527        pkgutil_help $MISSING_DEPENDENCY ;;
25528      pkgadd)
25529        pkgadd_help  $MISSING_DEPENDENCY ;;
25530    esac
25531
25532    if test "x$PKGHANDLER_COMMAND" != x; then
25533      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
25534    fi
25535  fi
25536
25537    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
25538$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
25539    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
25540$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25541    as_fn_error $? "Cannot continue" "$LINENO" 5
25542  fi
25543
25544
25545
25546  # Setup tools from the Boot JDK.
25547
25548  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25549
25550  # Publish this variable in the help.
25551
25552
25553  if test "x$JAVA" = x; then
25554    # The variable is not set by user, try to locate tool using the code snippet
25555
25556      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25557$as_echo_n "checking for java in Boot JDK... " >&6; }
25558      JAVA=$BOOT_JDK/bin/java
25559      if test ! -x $JAVA; then
25560        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25561$as_echo "not found" >&6; }
25562        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25563$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25564        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25565      fi
25566      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25567$as_echo "ok" >&6; }
25568
25569
25570  else
25571    # The variable is set, but is it from the command line or the environment?
25572
25573    # Try to remove the string !JAVA! from our list.
25574    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
25575    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25576      # If it failed, the variable was not from the command line. Ignore it,
25577      # but warn the user (except for BASH, which is always set by the calling BASH).
25578      if test "xJAVA" != xBASH; then
25579        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
25580$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
25581      fi
25582      # Try to locate tool using the code snippet
25583
25584      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25585$as_echo_n "checking for java in Boot JDK... " >&6; }
25586      JAVA=$BOOT_JDK/bin/java
25587      if test ! -x $JAVA; then
25588        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25589$as_echo "not found" >&6; }
25590        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25591$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25592        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25593      fi
25594      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25595$as_echo "ok" >&6; }
25596
25597
25598    else
25599      # If it succeeded, then it was overridden by the user. We will use it
25600      # for the tool.
25601
25602      # First remove it from the list of overridden variables, so we can test
25603      # for unknown variables in the end.
25604      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25605
25606      # Check if the provided tool contains a complete path.
25607      tool_specified="$JAVA"
25608      tool_basename="${tool_specified##*/}"
25609      if test "x$tool_basename" = "x$tool_specified"; then
25610        # A command without a complete path is provided, search $PATH.
25611        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
25612$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
25613        # Extract the first word of "$tool_basename", so it can be a program name with args.
25614set dummy $tool_basename; ac_word=$2
25615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25616$as_echo_n "checking for $ac_word... " >&6; }
25617if ${ac_cv_path_JAVA+:} false; then :
25618  $as_echo_n "(cached) " >&6
25619else
25620  case $JAVA in
25621  [\\/]* | ?:[\\/]*)
25622  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
25623  ;;
25624  *)
25625  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25626for as_dir in $PATH
25627do
25628  IFS=$as_save_IFS
25629  test -z "$as_dir" && as_dir=.
25630    for ac_exec_ext in '' $ac_executable_extensions; do
25631  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25632    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
25633    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25634    break 2
25635  fi
25636done
25637  done
25638IFS=$as_save_IFS
25639
25640  ;;
25641esac
25642fi
25643JAVA=$ac_cv_path_JAVA
25644if test -n "$JAVA"; then
25645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
25646$as_echo "$JAVA" >&6; }
25647else
25648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25649$as_echo "no" >&6; }
25650fi
25651
25652
25653        if test "x$JAVA" = x; then
25654          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25655        fi
25656      else
25657        # Otherwise we believe it is a complete path. Use it as it is.
25658        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
25659$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
25660        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
25661$as_echo_n "checking for JAVA... " >&6; }
25662        if test ! -x "$tool_specified"; then
25663          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25664$as_echo "not found" >&6; }
25665          as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
25666        fi
25667        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25668$as_echo "$tool_specified" >&6; }
25669      fi
25670    fi
25671  fi
25672
25673
25674
25675  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25676
25677  # Publish this variable in the help.
25678
25679
25680  if test "x$JAVAC" = x; then
25681    # The variable is not set by user, try to locate tool using the code snippet
25682
25683      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25684$as_echo_n "checking for javac in Boot JDK... " >&6; }
25685      JAVAC=$BOOT_JDK/bin/javac
25686      if test ! -x $JAVAC; then
25687        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25688$as_echo "not found" >&6; }
25689        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25690$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25691        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25692      fi
25693      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25694$as_echo "ok" >&6; }
25695
25696
25697  else
25698    # The variable is set, but is it from the command line or the environment?
25699
25700    # Try to remove the string !JAVAC! from our list.
25701    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
25702    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25703      # If it failed, the variable was not from the command line. Ignore it,
25704      # but warn the user (except for BASH, which is always set by the calling BASH).
25705      if test "xJAVAC" != xBASH; then
25706        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
25707$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
25708      fi
25709      # Try to locate tool using the code snippet
25710
25711      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25712$as_echo_n "checking for javac in Boot JDK... " >&6; }
25713      JAVAC=$BOOT_JDK/bin/javac
25714      if test ! -x $JAVAC; then
25715        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25716$as_echo "not found" >&6; }
25717        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25718$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25719        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25720      fi
25721      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25722$as_echo "ok" >&6; }
25723
25724
25725    else
25726      # If it succeeded, then it was overridden by the user. We will use it
25727      # for the tool.
25728
25729      # First remove it from the list of overridden variables, so we can test
25730      # for unknown variables in the end.
25731      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25732
25733      # Check if the provided tool contains a complete path.
25734      tool_specified="$JAVAC"
25735      tool_basename="${tool_specified##*/}"
25736      if test "x$tool_basename" = "x$tool_specified"; then
25737        # A command without a complete path is provided, search $PATH.
25738        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
25739$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
25740        # Extract the first word of "$tool_basename", so it can be a program name with args.
25741set dummy $tool_basename; ac_word=$2
25742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25743$as_echo_n "checking for $ac_word... " >&6; }
25744if ${ac_cv_path_JAVAC+:} false; then :
25745  $as_echo_n "(cached) " >&6
25746else
25747  case $JAVAC in
25748  [\\/]* | ?:[\\/]*)
25749  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
25750  ;;
25751  *)
25752  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25753for as_dir in $PATH
25754do
25755  IFS=$as_save_IFS
25756  test -z "$as_dir" && as_dir=.
25757    for ac_exec_ext in '' $ac_executable_extensions; do
25758  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25759    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
25760    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25761    break 2
25762  fi
25763done
25764  done
25765IFS=$as_save_IFS
25766
25767  ;;
25768esac
25769fi
25770JAVAC=$ac_cv_path_JAVAC
25771if test -n "$JAVAC"; then
25772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
25773$as_echo "$JAVAC" >&6; }
25774else
25775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25776$as_echo "no" >&6; }
25777fi
25778
25779
25780        if test "x$JAVAC" = x; then
25781          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25782        fi
25783      else
25784        # Otherwise we believe it is a complete path. Use it as it is.
25785        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
25786$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
25787        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
25788$as_echo_n "checking for JAVAC... " >&6; }
25789        if test ! -x "$tool_specified"; then
25790          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25791$as_echo "not found" >&6; }
25792          as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
25793        fi
25794        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25795$as_echo "$tool_specified" >&6; }
25796      fi
25797    fi
25798  fi
25799
25800
25801
25802  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25803
25804  # Publish this variable in the help.
25805
25806
25807  if test "x$JAVAH" = x; then
25808    # The variable is not set by user, try to locate tool using the code snippet
25809
25810      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25811$as_echo_n "checking for javah in Boot JDK... " >&6; }
25812      JAVAH=$BOOT_JDK/bin/javah
25813      if test ! -x $JAVAH; then
25814        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25815$as_echo "not found" >&6; }
25816        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25817$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25818        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25819      fi
25820      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25821$as_echo "ok" >&6; }
25822
25823
25824  else
25825    # The variable is set, but is it from the command line or the environment?
25826
25827    # Try to remove the string !JAVAH! from our list.
25828    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
25829    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25830      # If it failed, the variable was not from the command line. Ignore it,
25831      # but warn the user (except for BASH, which is always set by the calling BASH).
25832      if test "xJAVAH" != xBASH; then
25833        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
25834$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
25835      fi
25836      # Try to locate tool using the code snippet
25837
25838      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25839$as_echo_n "checking for javah in Boot JDK... " >&6; }
25840      JAVAH=$BOOT_JDK/bin/javah
25841      if test ! -x $JAVAH; then
25842        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25843$as_echo "not found" >&6; }
25844        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25845$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25846        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25847      fi
25848      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25849$as_echo "ok" >&6; }
25850
25851
25852    else
25853      # If it succeeded, then it was overridden by the user. We will use it
25854      # for the tool.
25855
25856      # First remove it from the list of overridden variables, so we can test
25857      # for unknown variables in the end.
25858      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25859
25860      # Check if the provided tool contains a complete path.
25861      tool_specified="$JAVAH"
25862      tool_basename="${tool_specified##*/}"
25863      if test "x$tool_basename" = "x$tool_specified"; then
25864        # A command without a complete path is provided, search $PATH.
25865        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
25866$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
25867        # Extract the first word of "$tool_basename", so it can be a program name with args.
25868set dummy $tool_basename; ac_word=$2
25869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25870$as_echo_n "checking for $ac_word... " >&6; }
25871if ${ac_cv_path_JAVAH+:} false; then :
25872  $as_echo_n "(cached) " >&6
25873else
25874  case $JAVAH in
25875  [\\/]* | ?:[\\/]*)
25876  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
25877  ;;
25878  *)
25879  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25880for as_dir in $PATH
25881do
25882  IFS=$as_save_IFS
25883  test -z "$as_dir" && as_dir=.
25884    for ac_exec_ext in '' $ac_executable_extensions; do
25885  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25886    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
25887    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25888    break 2
25889  fi
25890done
25891  done
25892IFS=$as_save_IFS
25893
25894  ;;
25895esac
25896fi
25897JAVAH=$ac_cv_path_JAVAH
25898if test -n "$JAVAH"; then
25899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
25900$as_echo "$JAVAH" >&6; }
25901else
25902  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25903$as_echo "no" >&6; }
25904fi
25905
25906
25907        if test "x$JAVAH" = x; then
25908          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25909        fi
25910      else
25911        # Otherwise we believe it is a complete path. Use it as it is.
25912        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
25913$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
25914        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
25915$as_echo_n "checking for JAVAH... " >&6; }
25916        if test ! -x "$tool_specified"; then
25917          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25918$as_echo "not found" >&6; }
25919          as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
25920        fi
25921        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25922$as_echo "$tool_specified" >&6; }
25923      fi
25924    fi
25925  fi
25926
25927
25928
25929  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25930
25931  # Publish this variable in the help.
25932
25933
25934  if test "x$JAR" = x; then
25935    # The variable is not set by user, try to locate tool using the code snippet
25936
25937      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25938$as_echo_n "checking for jar in Boot JDK... " >&6; }
25939      JAR=$BOOT_JDK/bin/jar
25940      if test ! -x $JAR; then
25941        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25942$as_echo "not found" >&6; }
25943        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25944$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25945        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25946      fi
25947      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25948$as_echo "ok" >&6; }
25949
25950
25951  else
25952    # The variable is set, but is it from the command line or the environment?
25953
25954    # Try to remove the string !JAR! from our list.
25955    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
25956    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25957      # If it failed, the variable was not from the command line. Ignore it,
25958      # but warn the user (except for BASH, which is always set by the calling BASH).
25959      if test "xJAR" != xBASH; then
25960        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
25961$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
25962      fi
25963      # Try to locate tool using the code snippet
25964
25965      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25966$as_echo_n "checking for jar in Boot JDK... " >&6; }
25967      JAR=$BOOT_JDK/bin/jar
25968      if test ! -x $JAR; then
25969        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25970$as_echo "not found" >&6; }
25971        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25972$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25973        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25974      fi
25975      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25976$as_echo "ok" >&6; }
25977
25978
25979    else
25980      # If it succeeded, then it was overridden by the user. We will use it
25981      # for the tool.
25982
25983      # First remove it from the list of overridden variables, so we can test
25984      # for unknown variables in the end.
25985      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25986
25987      # Check if the provided tool contains a complete path.
25988      tool_specified="$JAR"
25989      tool_basename="${tool_specified##*/}"
25990      if test "x$tool_basename" = "x$tool_specified"; then
25991        # A command without a complete path is provided, search $PATH.
25992        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
25993$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
25994        # Extract the first word of "$tool_basename", so it can be a program name with args.
25995set dummy $tool_basename; ac_word=$2
25996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25997$as_echo_n "checking for $ac_word... " >&6; }
25998if ${ac_cv_path_JAR+:} false; then :
25999  $as_echo_n "(cached) " >&6
26000else
26001  case $JAR in
26002  [\\/]* | ?:[\\/]*)
26003  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
26004  ;;
26005  *)
26006  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26007for as_dir in $PATH
26008do
26009  IFS=$as_save_IFS
26010  test -z "$as_dir" && as_dir=.
26011    for ac_exec_ext in '' $ac_executable_extensions; do
26012  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26013    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
26014    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26015    break 2
26016  fi
26017done
26018  done
26019IFS=$as_save_IFS
26020
26021  ;;
26022esac
26023fi
26024JAR=$ac_cv_path_JAR
26025if test -n "$JAR"; then
26026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
26027$as_echo "$JAR" >&6; }
26028else
26029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26030$as_echo "no" >&6; }
26031fi
26032
26033
26034        if test "x$JAR" = x; then
26035          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26036        fi
26037      else
26038        # Otherwise we believe it is a complete path. Use it as it is.
26039        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
26040$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
26041        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
26042$as_echo_n "checking for JAR... " >&6; }
26043        if test ! -x "$tool_specified"; then
26044          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26045$as_echo "not found" >&6; }
26046          as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
26047        fi
26048        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26049$as_echo "$tool_specified" >&6; }
26050      fi
26051    fi
26052  fi
26053
26054
26055
26056  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26057
26058  # Publish this variable in the help.
26059
26060
26061  if test "x$JARSIGNER" = x; then
26062    # The variable is not set by user, try to locate tool using the code snippet
26063
26064      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
26065$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
26066      JARSIGNER=$BOOT_JDK/bin/jarsigner
26067      if test ! -x $JARSIGNER; then
26068        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26069$as_echo "not found" >&6; }
26070        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26071$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26072        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
26073      fi
26074      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26075$as_echo "ok" >&6; }
26076
26077
26078  else
26079    # The variable is set, but is it from the command line or the environment?
26080
26081    # Try to remove the string !JARSIGNER! from our list.
26082    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
26083    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26084      # If it failed, the variable was not from the command line. Ignore it,
26085      # but warn the user (except for BASH, which is always set by the calling BASH).
26086      if test "xJARSIGNER" != xBASH; then
26087        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
26088$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
26089      fi
26090      # Try to locate tool using the code snippet
26091
26092      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
26093$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
26094      JARSIGNER=$BOOT_JDK/bin/jarsigner
26095      if test ! -x $JARSIGNER; then
26096        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26097$as_echo "not found" >&6; }
26098        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26099$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26100        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
26101      fi
26102      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26103$as_echo "ok" >&6; }
26104
26105
26106    else
26107      # If it succeeded, then it was overridden by the user. We will use it
26108      # for the tool.
26109
26110      # First remove it from the list of overridden variables, so we can test
26111      # for unknown variables in the end.
26112      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26113
26114      # Check if the provided tool contains a complete path.
26115      tool_specified="$JARSIGNER"
26116      tool_basename="${tool_specified##*/}"
26117      if test "x$tool_basename" = "x$tool_specified"; then
26118        # A command without a complete path is provided, search $PATH.
26119        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
26120$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
26121        # Extract the first word of "$tool_basename", so it can be a program name with args.
26122set dummy $tool_basename; ac_word=$2
26123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26124$as_echo_n "checking for $ac_word... " >&6; }
26125if ${ac_cv_path_JARSIGNER+:} false; then :
26126  $as_echo_n "(cached) " >&6
26127else
26128  case $JARSIGNER in
26129  [\\/]* | ?:[\\/]*)
26130  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
26131  ;;
26132  *)
26133  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26134for as_dir in $PATH
26135do
26136  IFS=$as_save_IFS
26137  test -z "$as_dir" && as_dir=.
26138    for ac_exec_ext in '' $ac_executable_extensions; do
26139  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26140    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
26141    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26142    break 2
26143  fi
26144done
26145  done
26146IFS=$as_save_IFS
26147
26148  ;;
26149esac
26150fi
26151JARSIGNER=$ac_cv_path_JARSIGNER
26152if test -n "$JARSIGNER"; then
26153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
26154$as_echo "$JARSIGNER" >&6; }
26155else
26156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26157$as_echo "no" >&6; }
26158fi
26159
26160
26161        if test "x$JARSIGNER" = x; then
26162          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26163        fi
26164      else
26165        # Otherwise we believe it is a complete path. Use it as it is.
26166        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
26167$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
26168        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
26169$as_echo_n "checking for JARSIGNER... " >&6; }
26170        if test ! -x "$tool_specified"; then
26171          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26172$as_echo "not found" >&6; }
26173          as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
26174        fi
26175        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26176$as_echo "$tool_specified" >&6; }
26177      fi
26178    fi
26179  fi
26180
26181
26182
26183  # Finally, set some other options...
26184
26185  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
26186  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
26187
26188
26189
26190
26191###############################################################################
26192#
26193# Configure the sources to use. We can add or override individual directories.
26194#
26195###############################################################################
26196
26197
26198  # Where are the sources. Any of these can be overridden
26199  # using --with-override-corba and the likes.
26200  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
26201  CORBA_TOPDIR="$SRC_ROOT/corba"
26202  JAXP_TOPDIR="$SRC_ROOT/jaxp"
26203  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
26204  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
26205  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
26206  JDK_TOPDIR="$SRC_ROOT/jdk"
26207
26208
26209
26210
26211
26212
26213
26214
26215
26216
26217  ###############################################################################
26218  #
26219  # Pickup additional source for a component from outside of the source root
26220  # or override source for a component.
26221  #
26222
26223# Check whether --with-add-source-root was given.
26224if test "${with_add_source_root+set}" = set; then :
26225  withval=$with_add_source_root;
26226fi
26227
26228
26229
26230# Check whether --with-override-source-root was given.
26231if test "${with_override_source_root+set}" = set; then :
26232  withval=$with_override_source_root;
26233fi
26234
26235
26236
26237# Check whether --with-adds-and-overrides was given.
26238if test "${with_adds_and_overrides+set}" = set; then :
26239  withval=$with_adds_and_overrides;
26240fi
26241
26242
26243  if test "x$with_adds_and_overrides" != x; then
26244    with_add_source_root="$with_adds_and_overrides/adds"
26245    with_override_source_root="$with_adds_and_overrides/overrides"
26246  fi
26247
26248  if test "x$with_add_source_root" != x; then
26249    if ! test -d $with_add_source_root; then
26250      as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
26251    fi
26252    CURDIR="$PWD"
26253    cd "$with_add_source_root"
26254    ADD_SRC_ROOT="`pwd`"
26255    cd "$CURDIR"
26256    # Verify that the addon source root does not have any root makefiles.
26257    # If it does, then it is usually an error, prevent this.
26258    if test -f $with_add_source_root/langtools/make/Makefile; then
26259      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
26260    fi
26261    if test -f $with_add_source_root/corba/make/Makefile; then
26262      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
26263    fi
26264    if test -f $with_add_source_root/jaxp/make/Makefile; then
26265      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
26266    fi
26267    if test -f $with_add_source_root/jaxws/make/Makefile; then
26268      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
26269    fi
26270    if test -f $with_add_source_root/hotspot/make/Makefile; then
26271      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
26272    fi
26273    if test -f $with_add_source_root/nashorn/make/Makefile; then
26274      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
26275    fi
26276    if test -f $with_add_source_root/jdk/make/Makefile; then
26277      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
26278    fi
26279  fi
26280
26281
26282  if test "x$with_override_source_root" != x; then
26283    if ! test -d $with_override_source_root; then
26284      as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
26285    fi
26286    CURDIR="$PWD"
26287    cd "$with_override_source_root"
26288    OVERRIDE_SRC_ROOT="`pwd`"
26289    cd "$CURDIR"
26290    if test -f $with_override_source_root/langtools/make/Makefile; then
26291      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
26292    fi
26293    if test -f $with_override_source_root/corba/make/Makefile; then
26294      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
26295    fi
26296    if test -f $with_override_source_root/jaxp/make/Makefile; then
26297      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
26298    fi
26299    if test -f $with_override_source_root/jaxws/make/Makefile; then
26300      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
26301    fi
26302    if test -f $with_override_source_root/hotspot/make/Makefile; then
26303      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
26304    fi
26305    if test -f $with_override_source_root/nashorn/make/Makefile; then
26306      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
26307    fi
26308    if test -f $with_override_source_root/jdk/make/Makefile; then
26309      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
26310    fi
26311  fi
26312
26313
26314  ###############################################################################
26315  #
26316  # Override a repo completely, this is used for example when you have 3 small
26317  # development sandboxes of the langtools sources and want to avoid having 3 full
26318  # OpenJDK sources checked out on disk.
26319  #
26320  # Assuming that the 3 langtools sandboxes are located here:
26321  # /home/fredrik/sandbox1/langtools
26322  # /home/fredrik/sandbox2/langtools
26323  # /home/fredrik/sandbox3/langtools
26324  #
26325  # From the source root you create build subdirs manually:
26326  #     mkdir -p build1 build2 build3
26327  # in each build directory run:
26328  #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
26329  #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
26330  #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
26331  #
26332
26333
26334# Check whether --with-override-langtools was given.
26335if test "${with_override_langtools+set}" = set; then :
26336  withval=$with_override_langtools;
26337fi
26338
26339
26340
26341# Check whether --with-override-corba was given.
26342if test "${with_override_corba+set}" = set; then :
26343  withval=$with_override_corba;
26344fi
26345
26346
26347
26348# Check whether --with-override-jaxp was given.
26349if test "${with_override_jaxp+set}" = set; then :
26350  withval=$with_override_jaxp;
26351fi
26352
26353
26354
26355# Check whether --with-override-jaxws was given.
26356if test "${with_override_jaxws+set}" = set; then :
26357  withval=$with_override_jaxws;
26358fi
26359
26360
26361
26362# Check whether --with-override-hotspot was given.
26363if test "${with_override_hotspot+set}" = set; then :
26364  withval=$with_override_hotspot;
26365fi
26366
26367
26368
26369# Check whether --with-override-nashorn was given.
26370if test "${with_override_nashorn+set}" = set; then :
26371  withval=$with_override_nashorn;
26372fi
26373
26374
26375
26376# Check whether --with-override-jdk was given.
26377if test "${with_override_jdk+set}" = set; then :
26378  withval=$with_override_jdk;
26379fi
26380
26381
26382  if test "x$with_override_langtools" != x; then
26383    CURDIR="$PWD"
26384    cd "$with_override_langtools"
26385    LANGTOOLS_TOPDIR="`pwd`"
26386    cd "$CURDIR"
26387    if ! test -f $LANGTOOLS_TOPDIR/make/Makefile; then
26388      as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
26389    fi
26390    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
26391$as_echo_n "checking if langtools should be overridden... " >&6; }
26392    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
26393$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
26394  fi
26395  if test "x$with_override_corba" != x; then
26396    CURDIR="$PWD"
26397    cd "$with_override_corba"
26398    CORBA_TOPDIR="`pwd`"
26399    cd "$CURDIR"
26400    if ! test -f $CORBA_TOPDIR/make/Makefile; then
26401      as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
26402    fi
26403    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
26404$as_echo_n "checking if corba should be overridden... " >&6; }
26405    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
26406$as_echo "yes with $CORBA_TOPDIR" >&6; }
26407  fi
26408  if test "x$with_override_jaxp" != x; then
26409    CURDIR="$PWD"
26410    cd "$with_override_jaxp"
26411    JAXP_TOPDIR="`pwd`"
26412    cd "$CURDIR"
26413    if ! test -f $JAXP_TOPDIR/make/Makefile; then
26414      as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
26415    fi
26416    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
26417$as_echo_n "checking if jaxp should be overridden... " >&6; }
26418    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
26419$as_echo "yes with $JAXP_TOPDIR" >&6; }
26420  fi
26421  if test "x$with_override_jaxws" != x; then
26422    CURDIR="$PWD"
26423    cd "$with_override_jaxws"
26424    JAXWS_TOPDIR="`pwd`"
26425    cd "$CURDIR"
26426    if ! test -f $JAXWS_TOPDIR/make/Makefile; then
26427      as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
26428    fi
26429    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
26430$as_echo_n "checking if jaxws should be overridden... " >&6; }
26431    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
26432$as_echo "yes with $JAXWS_TOPDIR" >&6; }
26433  fi
26434  if test "x$with_override_hotspot" != x; then
26435    CURDIR="$PWD"
26436    cd "$with_override_hotspot"
26437    HOTSPOT_TOPDIR="`pwd`"
26438    cd "$CURDIR"
26439    if ! test -f $HOTSPOT_TOPDIR/make/Makefile; then
26440      as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
26441    fi
26442    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
26443$as_echo_n "checking if hotspot should be overridden... " >&6; }
26444    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
26445$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
26446  fi
26447  if test "x$with_override_nashorn" != x; then
26448    CURDIR="$PWD"
26449    cd "$with_override_nashorn"
26450    NASHORN_TOPDIR="`pwd`"
26451    cd "$CURDIR"
26452    if ! test -f $NASHORN_TOPDIR/make/Makefile; then
26453      as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
26454    fi
26455    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
26456$as_echo_n "checking if nashorn should be overridden... " >&6; }
26457    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
26458$as_echo "yes with $NASHORN_TOPDIR" >&6; }
26459  fi
26460  if test "x$with_override_jdk" != x; then
26461    CURDIR="$PWD"
26462    cd "$with_override_jdk"
26463    JDK_TOPDIR="`pwd`"
26464    cd "$CURDIR"
26465    if ! test -f $JDK_TOPDIR/make/Makefile; then
26466      as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
26467    fi
26468    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
26469$as_echo_n "checking if JDK should be overridden... " >&6; }
26470    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
26471$as_echo "yes with $JDK_TOPDIR" >&6; }
26472  fi
26473
26474
26475  BUILD_OUTPUT="$OUTPUT_ROOT"
26476
26477
26478  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
26479  BUILD_HOTSPOT=true
26480
26481
26482
26483# Check whether --with-import-hotspot was given.
26484if test "${with_import_hotspot+set}" = set; then :
26485  withval=$with_import_hotspot;
26486fi
26487
26488  if test "x$with_import_hotspot" != x; then
26489    CURDIR="$PWD"
26490    cd "$with_import_hotspot"
26491    HOTSPOT_DIST="`pwd`"
26492    cd "$CURDIR"
26493    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
26494      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
26495    fi
26496    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
26497$as_echo_n "checking if hotspot should be imported... " >&6; }
26498    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
26499$as_echo "yes from $HOTSPOT_DIST" >&6; }
26500    BUILD_HOTSPOT=false
26501  fi
26502
26503  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
26504
26505
26506###############################################################################
26507#
26508# Setup the toolchain (compilers etc), i.e. tools used to compile and process
26509# native code.
26510#
26511###############################################################################
26512
26513# First determine the toolchain type (compiler family)
26514
26515
26516# Check whether --with-toolchain-type was given.
26517if test "${with_toolchain_type+set}" = set; then :
26518  withval=$with_toolchain_type;
26519fi
26520
26521
26522  # Use indirect variable referencing
26523  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
26524  VALID_TOOLCHAINS=${!toolchain_var_name}
26525
26526  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26527    if test -n "$XCODEBUILD"; then
26528      # On Mac OS X, default toolchain to clang after Xcode 5
26529      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
26530      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
26531      if test $? -ne 0; then
26532        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
26533      fi
26534      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
26535          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
26536          $CUT -f 1 -d .`
26537      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
26538$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
26539      if test $XCODE_MAJOR_VERSION -ge 5; then
26540          DEFAULT_TOOLCHAIN="clang"
26541      else
26542          DEFAULT_TOOLCHAIN="gcc"
26543      fi
26544    else
26545      # If Xcode is not installed, but the command line tools are
26546      # then we can't run xcodebuild. On these systems we should
26547      # default to clang
26548      DEFAULT_TOOLCHAIN="clang"
26549    fi
26550  else
26551    # First toolchain type in the list is the default
26552    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
26553  fi
26554
26555  if test "x$with_toolchain_type" = xlist; then
26556    # List all toolchains
26557    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
26558$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
26559    for toolchain in $VALID_TOOLCHAINS; do
26560      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
26561      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26562      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
26563    done
26564
26565    exit 0
26566  elif test "x$with_toolchain_type" != x; then
26567    # User override; check that it is valid
26568    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
26569      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
26570$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
26571      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
26572$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
26573      as_fn_error $? "Cannot continue." "$LINENO" 5
26574    fi
26575    TOOLCHAIN_TYPE=$with_toolchain_type
26576  else
26577    # No flag given, use default
26578    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
26579  fi
26580
26581
26582  TOOLCHAIN_CC_BINARY_clang="clang"
26583  TOOLCHAIN_CC_BINARY_gcc="gcc"
26584  TOOLCHAIN_CC_BINARY_microsoft="cl"
26585  TOOLCHAIN_CC_BINARY_solstudio="cc"
26586  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
26587
26588  TOOLCHAIN_CXX_BINARY_clang="clang++"
26589  TOOLCHAIN_CXX_BINARY_gcc="g++"
26590  TOOLCHAIN_CXX_BINARY_microsoft="cl"
26591  TOOLCHAIN_CXX_BINARY_solstudio="CC"
26592  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
26593
26594  # Use indirect variable referencing
26595  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
26596  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26597  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
26598  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
26599  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
26600  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
26601
26602
26603  # Define filename patterns
26604  if test "x$OPENJDK_TARGET_OS" = xwindows; then
26605    LIBRARY_PREFIX=
26606    SHARED_LIBRARY_SUFFIX='.dll'
26607    STATIC_LIBRARY_SUFFIX='.lib'
26608    SHARED_LIBRARY='$1.dll'
26609    STATIC_LIBRARY='$1.lib'
26610    OBJ_SUFFIX='.obj'
26611    EXE_SUFFIX='.exe'
26612  else
26613    LIBRARY_PREFIX=lib
26614    SHARED_LIBRARY_SUFFIX='.so'
26615    STATIC_LIBRARY_SUFFIX='.a'
26616    SHARED_LIBRARY='lib$1.so'
26617    STATIC_LIBRARY='lib$1.a'
26618    OBJ_SUFFIX='.o'
26619    EXE_SUFFIX=''
26620    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26621      SHARED_LIBRARY='lib$1.dylib'
26622      SHARED_LIBRARY_SUFFIX='.dylib'
26623    fi
26624  fi
26625
26626
26627
26628
26629
26630
26631
26632
26633
26634
26635  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
26636    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
26637$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
26638  else
26639    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
26640$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
26641  fi
26642
26643
26644# Then detect the actual binaries needed
26645
26646  # FIXME: Is this needed?
26647  ac_ext=cpp
26648ac_cpp='$CXXCPP $CPPFLAGS'
26649ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
26650ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
26651ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26652
26653
26654  # Store the CFLAGS etc passed to the configure script.
26655  ORG_CFLAGS="$CFLAGS"
26656  ORG_CXXFLAGS="$CXXFLAGS"
26657
26658  # autoconf magic only relies on PATH, so update it if tools dir is specified
26659  OLD_PATH="$PATH"
26660
26661  # On Windows, we need to detect the visual studio installation first.
26662  # This will change the PATH, but we need to keep that new PATH even
26663  # after toolchain detection is done, since the compiler (on x86) uses
26664  # it for DLL resolution in runtime.
26665  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
26666      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
26667
26668  # Store path to cygwin link.exe to help excluding it when searching for
26669  # VS linker. This must be done before changing the PATH when looking for VS.
26670  # Extract the first word of "link", so it can be a program name with args.
26671set dummy link; ac_word=$2
26672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26673$as_echo_n "checking for $ac_word... " >&6; }
26674if ${ac_cv_path_CYGWIN_LINK+:} false; then :
26675  $as_echo_n "(cached) " >&6
26676else
26677  case $CYGWIN_LINK in
26678  [\\/]* | ?:[\\/]*)
26679  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
26680  ;;
26681  *)
26682  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26683for as_dir in $PATH
26684do
26685  IFS=$as_save_IFS
26686  test -z "$as_dir" && as_dir=.
26687    for ac_exec_ext in '' $ac_executable_extensions; do
26688  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26689    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
26690    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26691    break 2
26692  fi
26693done
26694  done
26695IFS=$as_save_IFS
26696
26697  ;;
26698esac
26699fi
26700CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
26701if test -n "$CYGWIN_LINK"; then
26702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
26703$as_echo "$CYGWIN_LINK" >&6; }
26704else
26705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26706$as_echo "no" >&6; }
26707fi
26708
26709
26710  if test "x$CYGWIN_LINK" != x; then
26711    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
26712$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
26713    "$CYGWIN_LINK" --version > /dev/null
26714    if test $? -eq 0 ; then
26715      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
26716$as_echo "yes" >&6; }
26717    else
26718      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26719$as_echo "no" >&6; }
26720      # This might be the VS linker. Don't exclude it later on.
26721      CYGWIN_LINK=""
26722    fi
26723  fi
26724
26725  # First-hand choice is to locate and run the vsvars bat file.
26726
26727
26728# Check whether --with-toolchain-version was given.
26729if test "${with_toolchain_version+set}" = set; then :
26730  withval=$with_toolchain_version;
26731fi
26732
26733
26734  if test "x$with_toolchain_version" = xlist; then
26735    # List all toolchains
26736    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
26737$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
26738    for version in $VALID_VS_VERSIONS; do
26739      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
26740      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
26741    done
26742
26743    exit 0
26744  elif test "x$DEVKIT_VS_VERSION" != x; then
26745    VS_VERSION=$DEVKIT_VS_VERSION
26746    TOOLCHAIN_VERSION=$VS_VERSION
26747    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
26748    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
26749    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
26750    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
26751    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26752    VS_PATH="$TOOLCHAIN_PATH:$PATH"
26753
26754    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
26755    # can still be exported as INCLUDE for compiler invocations without
26756    # SYSROOT_CFLAGS
26757    OLDIFS="$IFS"
26758    IFS=";"
26759    for i in $DEVKIT_VS_INCLUDE; do
26760      ipath=$i
26761
26762  unix_path="$ipath"
26763  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26764    windows_path=`$CYGPATH -m "$unix_path"`
26765    ipath="$windows_path"
26766  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26767    windows_path=`cmd //c echo $unix_path`
26768    ipath="$windows_path"
26769  fi
26770
26771      VS_INCLUDE="$VS_INCLUDE;$ipath"
26772    done
26773    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
26774    # as LIB for compiler invocations without SYSROOT_LDFLAGS
26775    for i in $DEVKIT_VS_LIB; do
26776      libpath=$i
26777
26778  unix_path="$libpath"
26779  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26780    windows_path=`$CYGPATH -m "$unix_path"`
26781    libpath="$windows_path"
26782  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26783    windows_path=`cmd //c echo $unix_path`
26784    libpath="$windows_path"
26785  fi
26786
26787      VS_LIB="$VS_LIB;$libpath"
26788    done
26789    IFS="$OLDIFS"
26790
26791    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
26792$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
26793
26794  elif test "x$with_toolchain_version" != x; then
26795    # User override; check that it is valid
26796    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
26797      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
26798$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
26799      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
26800$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
26801      as_fn_error $? "Cannot continue." "$LINENO" 5
26802    fi
26803    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
26804  else
26805    # No flag given, use default
26806    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
26807  fi
26808
26809  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
26810
26811  VS_VERSION="$VS_VERSION"
26812  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
26813  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
26814  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
26815  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
26816
26817  # When using --with-tools-dir, assume it points to the correct and default
26818  # version of Visual Studio or that --with-toolchain-version was also set.
26819  if test "x$with_tools_dir" != x; then
26820
26821  if test "x$VS_ENV_CMD" = x; then
26822    VS_VERSION="${VS_VERSION}"
26823    VS_BASE="$with_tools_dir/../.."
26824    METHOD="--with-tools-dir"
26825
26826    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26827      VCVARSFILE="vc/bin/vcvars32.bat"
26828    else
26829      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26830    fi
26831
26832
26833  windows_path="$VS_BASE"
26834  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26835    unix_path=`$CYGPATH -u "$windows_path"`
26836    VS_BASE="$unix_path"
26837  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26838    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26839    VS_BASE="$unix_path"
26840  fi
26841
26842    if test -d "$VS_BASE"; then
26843      if test -f "$VS_BASE/$VCVARSFILE"; then
26844        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26845$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26846        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26847        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26848        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26849        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26850      else
26851        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26852$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26853        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26854$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26855      fi
26856    fi
26857  fi
26858
26859
26860  if test "x$VS_ENV_CMD" = x; then
26861    VS_VERSION="${VS_VERSION}"
26862    VS_BASE="$with_tools_dir/../../.."
26863    METHOD="--with-tools-dir"
26864
26865    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26866      VCVARSFILE="vc/bin/vcvars32.bat"
26867    else
26868      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26869    fi
26870
26871
26872  windows_path="$VS_BASE"
26873  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26874    unix_path=`$CYGPATH -u "$windows_path"`
26875    VS_BASE="$unix_path"
26876  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26877    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26878    VS_BASE="$unix_path"
26879  fi
26880
26881    if test -d "$VS_BASE"; then
26882      if test -f "$VS_BASE/$VCVARSFILE"; then
26883        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26884$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26885        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26886        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26887        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26888        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26889      else
26890        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26891$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26892        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26893$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26894      fi
26895    fi
26896  fi
26897
26898    if test "x$VS_ENV_CMD" = x; then
26899      # Having specified an argument which is incorrect will produce an instant failure;
26900      # we should not go on looking
26901      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
26902$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
26903      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
26904$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
26905      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
26906$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
26907      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
26908    fi
26909  fi
26910
26911  VS_ENV_CMD=""
26912  VS_ENV_ARGS=""
26913
26914  if test "x$VS_COMNTOOLS" != x; then
26915
26916  if test "x$VS_ENV_CMD" = x; then
26917    VS_VERSION="${VS_VERSION}"
26918    VS_BASE="$VS_COMNTOOLS/../.."
26919    METHOD="$VS_COMNTOOLS_VAR variable"
26920
26921    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26922      VCVARSFILE="vc/bin/vcvars32.bat"
26923    else
26924      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26925    fi
26926
26927
26928  windows_path="$VS_BASE"
26929  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26930    unix_path=`$CYGPATH -u "$windows_path"`
26931    VS_BASE="$unix_path"
26932  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26933    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26934    VS_BASE="$unix_path"
26935  fi
26936
26937    if test -d "$VS_BASE"; then
26938      if test -f "$VS_BASE/$VCVARSFILE"; then
26939        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26940$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26941        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26942        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26943        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26944        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26945      else
26946        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26947$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26948        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26949$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26950      fi
26951    fi
26952  fi
26953
26954  fi
26955  if test "x$PROGRAMFILES" != x; then
26956
26957  if test "x$VS_ENV_CMD" = x; then
26958    VS_VERSION="${VS_VERSION}"
26959    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
26960    METHOD="well-known name"
26961
26962    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26963      VCVARSFILE="vc/bin/vcvars32.bat"
26964    else
26965      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26966    fi
26967
26968
26969  windows_path="$VS_BASE"
26970  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26971    unix_path=`$CYGPATH -u "$windows_path"`
26972    VS_BASE="$unix_path"
26973  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26974    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26975    VS_BASE="$unix_path"
26976  fi
26977
26978    if test -d "$VS_BASE"; then
26979      if test -f "$VS_BASE/$VCVARSFILE"; then
26980        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26981$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26982        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26983        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26984        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26985        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26986      else
26987        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26988$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26989        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26990$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26991      fi
26992    fi
26993  fi
26994
26995  fi
26996  # Work around the insanely named ProgramFiles(x86) env variable
26997  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
26998  if test "x$PROGRAMFILES_X86" != x; then
26999
27000  if test "x$VS_ENV_CMD" = x; then
27001    VS_VERSION="${VS_VERSION}"
27002    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
27003    METHOD="well-known name"
27004
27005    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27006      VCVARSFILE="vc/bin/vcvars32.bat"
27007    else
27008      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27009    fi
27010
27011
27012  windows_path="$VS_BASE"
27013  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27014    unix_path=`$CYGPATH -u "$windows_path"`
27015    VS_BASE="$unix_path"
27016  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27017    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27018    VS_BASE="$unix_path"
27019  fi
27020
27021    if test -d "$VS_BASE"; then
27022      if test -f "$VS_BASE/$VCVARSFILE"; then
27023        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27024$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27025        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27026        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27027        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27028        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27029      else
27030        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27031$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27032        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27033$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27034      fi
27035    fi
27036  fi
27037
27038  fi
27039
27040  if test "x$VS_ENV_CMD" = x; then
27041    VS_VERSION="${VS_VERSION}"
27042    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
27043    METHOD="well-known name"
27044
27045    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27046      VCVARSFILE="vc/bin/vcvars32.bat"
27047    else
27048      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27049    fi
27050
27051
27052  windows_path="$VS_BASE"
27053  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27054    unix_path=`$CYGPATH -u "$windows_path"`
27055    VS_BASE="$unix_path"
27056  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27057    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27058    VS_BASE="$unix_path"
27059  fi
27060
27061    if test -d "$VS_BASE"; then
27062      if test -f "$VS_BASE/$VCVARSFILE"; then
27063        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27064$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27065        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27066        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27067        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27068        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27069      else
27070        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27071$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27072        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27073$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27074      fi
27075    fi
27076  fi
27077
27078
27079  if test "x$VS_ENV_CMD" = x; then
27080    VS_VERSION="${VS_VERSION}"
27081    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
27082    METHOD="well-known name"
27083
27084    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27085      VCVARSFILE="vc/bin/vcvars32.bat"
27086    else
27087      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27088    fi
27089
27090
27091  windows_path="$VS_BASE"
27092  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27093    unix_path=`$CYGPATH -u "$windows_path"`
27094    VS_BASE="$unix_path"
27095  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27096    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27097    VS_BASE="$unix_path"
27098  fi
27099
27100    if test -d "$VS_BASE"; then
27101      if test -f "$VS_BASE/$VCVARSFILE"; then
27102        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27103$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27104        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27105        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27106        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27107        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27108      else
27109        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27110$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27111        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27112$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27113      fi
27114    fi
27115  fi
27116
27117
27118  if test "x$SDK_INSTALL_DIR" != x; then
27119    if test "x$ProgramW6432" != x; then
27120
27121  if test "x$VS_ENV_CMD" = x; then
27122    VS_VERSION="${VS_VERSION}"
27123    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
27124    METHOD="well-known name"
27125
27126  windows_path="$WIN_SDK_BASE"
27127  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27128    unix_path=`$CYGPATH -u "$windows_path"`
27129    WIN_SDK_BASE="$unix_path"
27130  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27131    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27132    WIN_SDK_BASE="$unix_path"
27133  fi
27134
27135    if test -d "$WIN_SDK_BASE"; then
27136      # There have been cases of partial or broken SDK installations. A missing
27137      # lib dir is not going to work.
27138      if test ! -d "$WIN_SDK_BASE/lib"; then
27139        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27140$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27141        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27142$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27143      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27144        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27145$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27146        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27147        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27148          VS_ENV_ARGS="/x86"
27149        else
27150          VS_ENV_ARGS="/x64"
27151        fi
27152        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27153        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27154        # TODO: improve detection for other versions of SDK
27155        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27156      else
27157        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27158$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27159        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27160$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27161      fi
27162    fi
27163  fi
27164
27165    fi
27166    if test "x$PROGRAMW6432" != x; then
27167
27168  if test "x$VS_ENV_CMD" = x; then
27169    VS_VERSION="${VS_VERSION}"
27170    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
27171    METHOD="well-known name"
27172
27173  windows_path="$WIN_SDK_BASE"
27174  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27175    unix_path=`$CYGPATH -u "$windows_path"`
27176    WIN_SDK_BASE="$unix_path"
27177  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27178    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27179    WIN_SDK_BASE="$unix_path"
27180  fi
27181
27182    if test -d "$WIN_SDK_BASE"; then
27183      # There have been cases of partial or broken SDK installations. A missing
27184      # lib dir is not going to work.
27185      if test ! -d "$WIN_SDK_BASE/lib"; then
27186        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27187$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27188        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27189$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27190      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27191        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27192$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27193        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27194        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27195          VS_ENV_ARGS="/x86"
27196        else
27197          VS_ENV_ARGS="/x64"
27198        fi
27199        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27200        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27201        # TODO: improve detection for other versions of SDK
27202        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27203      else
27204        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27205$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27206        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27207$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27208      fi
27209    fi
27210  fi
27211
27212    fi
27213    if test "x$PROGRAMFILES" != x; then
27214
27215  if test "x$VS_ENV_CMD" = x; then
27216    VS_VERSION="${VS_VERSION}"
27217    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
27218    METHOD="well-known name"
27219
27220  windows_path="$WIN_SDK_BASE"
27221  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27222    unix_path=`$CYGPATH -u "$windows_path"`
27223    WIN_SDK_BASE="$unix_path"
27224  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27225    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27226    WIN_SDK_BASE="$unix_path"
27227  fi
27228
27229    if test -d "$WIN_SDK_BASE"; then
27230      # There have been cases of partial or broken SDK installations. A missing
27231      # lib dir is not going to work.
27232      if test ! -d "$WIN_SDK_BASE/lib"; then
27233        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27234$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27235        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27236$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27237      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27238        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27239$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27240        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27241        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27242          VS_ENV_ARGS="/x86"
27243        else
27244          VS_ENV_ARGS="/x64"
27245        fi
27246        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27247        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27248        # TODO: improve detection for other versions of SDK
27249        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27250      else
27251        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27252$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27253        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27254$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27255      fi
27256    fi
27257  fi
27258
27259    fi
27260
27261  if test "x$VS_ENV_CMD" = x; then
27262    VS_VERSION="${VS_VERSION}"
27263    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
27264    METHOD="well-known name"
27265
27266  windows_path="$WIN_SDK_BASE"
27267  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27268    unix_path=`$CYGPATH -u "$windows_path"`
27269    WIN_SDK_BASE="$unix_path"
27270  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27271    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27272    WIN_SDK_BASE="$unix_path"
27273  fi
27274
27275    if test -d "$WIN_SDK_BASE"; then
27276      # There have been cases of partial or broken SDK installations. A missing
27277      # lib dir is not going to work.
27278      if test ! -d "$WIN_SDK_BASE/lib"; then
27279        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27280$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27281        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27282$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27283      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
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        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27287        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27288          VS_ENV_ARGS="/x86"
27289        else
27290          VS_ENV_ARGS="/x64"
27291        fi
27292        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27293        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27294        # TODO: improve detection for other versions of SDK
27295        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27296      else
27297        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27298$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27299        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27300$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27301      fi
27302    fi
27303  fi
27304
27305
27306  if test "x$VS_ENV_CMD" = x; then
27307    VS_VERSION="${VS_VERSION}"
27308    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
27309    METHOD="well-known name"
27310
27311  windows_path="$WIN_SDK_BASE"
27312  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27313    unix_path=`$CYGPATH -u "$windows_path"`
27314    WIN_SDK_BASE="$unix_path"
27315  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27316    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27317    WIN_SDK_BASE="$unix_path"
27318  fi
27319
27320    if test -d "$WIN_SDK_BASE"; then
27321      # There have been cases of partial or broken SDK installations. A missing
27322      # lib dir is not going to work.
27323      if test ! -d "$WIN_SDK_BASE/lib"; then
27324        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27325$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27326        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27327$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27328      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27329        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27330$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27331        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27332        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27333          VS_ENV_ARGS="/x86"
27334        else
27335          VS_ENV_ARGS="/x64"
27336        fi
27337        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27338        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27339        # TODO: improve detection for other versions of SDK
27340        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27341      else
27342        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27343$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27344        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27345$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27346      fi
27347    fi
27348  fi
27349
27350  fi
27351
27352    if test "x$VS_ENV_CMD" != x; then
27353      TOOLCHAIN_VERSION=$VS_VERSION
27354      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
27355      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
27356      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
27357      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
27358      # The rest of the variables are already evaled while probing
27359      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
27360$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
27361      break
27362    fi
27363  done
27364
27365
27366  # If we have a devkit, skip all of the below.
27367  if test "x$DEVKIT_VS_VERSION" = x; then
27368    if test "x$VS_ENV_CMD" != x; then
27369      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
27370
27371  # Only process if variable expands to non-empty
27372
27373  if test "x$VS_ENV_CMD" != x; then
27374    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27375
27376  # First separate the path from the arguments. This will split at the first
27377  # space.
27378  complete="$VS_ENV_CMD"
27379  path="${complete%% *}"
27380  tmp="$complete EOL"
27381  arguments="${tmp#* }"
27382
27383  # Input might be given as Windows format, start by converting to
27384  # unix format.
27385  new_path=`$CYGPATH -u "$path"`
27386
27387  # Now try to locate executable using which
27388  new_path=`$WHICH "$new_path" 2> /dev/null`
27389  # bat and cmd files are not always considered executable in cygwin causing which
27390  # to not find them
27391  if test "x$new_path" = x \
27392      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27393      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27394    new_path=`$CYGPATH -u "$path"`
27395  fi
27396  if test "x$new_path" = x; then
27397    # Oops. Which didn't find the executable.
27398    # The splitting of arguments from the executable at a space might have been incorrect,
27399    # since paths with space are more likely in Windows. Give it another try with the whole
27400    # argument.
27401    path="$complete"
27402    arguments="EOL"
27403    new_path=`$CYGPATH -u "$path"`
27404    new_path=`$WHICH "$new_path" 2> /dev/null`
27405    # bat and cmd files are not always considered executable in cygwin causing which
27406    # to not find them
27407    if test "x$new_path" = x \
27408        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27409        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27410      new_path=`$CYGPATH -u "$path"`
27411    fi
27412    if test "x$new_path" = x; then
27413      # It's still not found. Now this is an unrecoverable error.
27414      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27415$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27416      has_space=`$ECHO "$complete" | $GREP " "`
27417      if test "x$has_space" != x; then
27418        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27419$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27420      fi
27421      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27422    fi
27423  fi
27424
27425  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27426  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27427  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27428  # "foo.exe" is OK but "foo" is an error.
27429  #
27430  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27431  # It is also a way to make sure we got the proper file name for the real test later on.
27432  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27433  if test "x$test_shortpath" = x; then
27434    # Short path failed, file does not exist as specified.
27435    # Try adding .exe or .cmd
27436    if test -f "${new_path}.exe"; then
27437      input_to_shortpath="${new_path}.exe"
27438    elif test -f "${new_path}.cmd"; then
27439      input_to_shortpath="${new_path}.cmd"
27440    else
27441      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
27442$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
27443      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27444$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27445      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27446    fi
27447  else
27448    input_to_shortpath="$new_path"
27449  fi
27450
27451  # Call helper function which possibly converts this using DOS-style short mode.
27452  # If so, the updated path is stored in $new_path.
27453  new_path="$input_to_shortpath"
27454
27455  input_path="$input_to_shortpath"
27456  # Check if we need to convert this using DOS-style short mode. If the path
27457  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27458  # take no chances and rewrite it.
27459  # Note: m4 eats our [], so we need to use [ and ] instead.
27460  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27461  if test "x$has_forbidden_chars" != x; then
27462    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27463    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27464    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27465    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27466      # Going to short mode and back again did indeed matter. Since short mode is
27467      # case insensitive, let's make it lowercase to improve readability.
27468      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27469      # Now convert it back to Unix-style (cygpath)
27470      input_path=`$CYGPATH -u "$shortmode_path"`
27471      new_path="$input_path"
27472    fi
27473  fi
27474
27475  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27476  if test "x$test_cygdrive_prefix" = x; then
27477    # As a simple fix, exclude /usr/bin since it's not a real path.
27478    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27479      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27480      # a path prefixed by /cygdrive for fixpath to work.
27481      new_path="$CYGWIN_ROOT_PATH$input_path"
27482    fi
27483  fi
27484
27485  # remove trailing .exe if any
27486  new_path="${new_path/%.exe/}"
27487
27488    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27489
27490  # First separate the path from the arguments. This will split at the first
27491  # space.
27492  complete="$VS_ENV_CMD"
27493  path="${complete%% *}"
27494  tmp="$complete EOL"
27495  arguments="${tmp#* }"
27496
27497  # Input might be given as Windows format, start by converting to
27498  # unix format.
27499  new_path="$path"
27500
27501  windows_path="$new_path"
27502  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27503    unix_path=`$CYGPATH -u "$windows_path"`
27504    new_path="$unix_path"
27505  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27506    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27507    new_path="$unix_path"
27508  fi
27509
27510
27511  # Now try to locate executable using which
27512  new_path=`$WHICH "$new_path" 2> /dev/null`
27513
27514  if test "x$new_path" = x; then
27515    # Oops. Which didn't find the executable.
27516    # The splitting of arguments from the executable at a space might have been incorrect,
27517    # since paths with space are more likely in Windows. Give it another try with the whole
27518    # argument.
27519    path="$complete"
27520    arguments="EOL"
27521    new_path="$path"
27522
27523  windows_path="$new_path"
27524  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27525    unix_path=`$CYGPATH -u "$windows_path"`
27526    new_path="$unix_path"
27527  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27528    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27529    new_path="$unix_path"
27530  fi
27531
27532
27533    new_path=`$WHICH "$new_path" 2> /dev/null`
27534    # bat and cmd files are not always considered executable in MSYS causing which
27535    # to not find them
27536    if test "x$new_path" = x \
27537        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27538        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27539      new_path="$path"
27540
27541  windows_path="$new_path"
27542  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27543    unix_path=`$CYGPATH -u "$windows_path"`
27544    new_path="$unix_path"
27545  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27546    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27547    new_path="$unix_path"
27548  fi
27549
27550    fi
27551
27552    if test "x$new_path" = x; then
27553      # It's still not found. Now this is an unrecoverable error.
27554      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27555$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27556      has_space=`$ECHO "$complete" | $GREP " "`
27557      if test "x$has_space" != x; then
27558        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27559$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27560      fi
27561      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27562    fi
27563  fi
27564
27565  # Now new_path has a complete unix path to the binary
27566  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27567    # Keep paths in /bin as-is, but remove trailing .exe if any
27568    new_path="${new_path/%.exe/}"
27569    # Do not save /bin paths to all_fixpath_prefixes!
27570  else
27571    # Not in mixed or Windows style, start by that.
27572    new_path=`cmd //c echo $new_path`
27573
27574  input_path="$new_path"
27575  # Check if we need to convert this using DOS-style short mode. If the path
27576  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27577  # take no chances and rewrite it.
27578  # Note: m4 eats our [], so we need to use [ and ] instead.
27579  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27580  if test "x$has_forbidden_chars" != x; then
27581    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27582    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27583  fi
27584
27585    # Output is in $new_path
27586
27587  windows_path="$new_path"
27588  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27589    unix_path=`$CYGPATH -u "$windows_path"`
27590    new_path="$unix_path"
27591  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27592    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27593    new_path="$unix_path"
27594  fi
27595
27596    # remove trailing .exe if any
27597    new_path="${new_path/%.exe/}"
27598
27599    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27600    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27601  fi
27602
27603    else
27604      # We're on a unix platform. Hooray! :)
27605      # First separate the path from the arguments. This will split at the first
27606      # space.
27607      complete="$VS_ENV_CMD"
27608      path="${complete%% *}"
27609      tmp="$complete EOL"
27610      arguments="${tmp#* }"
27611
27612      # Cannot rely on the command "which" here since it doesn't always work.
27613      is_absolute_path=`$ECHO "$path" | $GREP ^/`
27614      if test -z "$is_absolute_path"; then
27615        # Path to executable is not absolute. Find it.
27616        IFS_save="$IFS"
27617        IFS=:
27618        for p in $PATH; do
27619          if test -f "$p/$path" && test -x "$p/$path"; then
27620            new_path="$p/$path"
27621            break
27622          fi
27623        done
27624        IFS="$IFS_save"
27625      else
27626        # This is an absolute path, we can use it without further modifications.
27627        new_path="$path"
27628      fi
27629
27630      if test "x$new_path" = x; then
27631        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27632$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27633        has_space=`$ECHO "$complete" | $GREP " "`
27634        if test "x$has_space" != x; then
27635          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27636$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27637        fi
27638        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27639      fi
27640    fi
27641
27642    # Now join together the path and the arguments once again
27643    if test "x$arguments" != xEOL; then
27644      new_complete="$new_path ${arguments% *}"
27645    else
27646      new_complete="$new_path"
27647    fi
27648
27649    if test "x$complete" != "x$new_complete"; then
27650      VS_ENV_CMD="$new_complete"
27651      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
27652$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
27653    fi
27654  fi
27655
27656
27657      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
27658      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
27659$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
27660
27661      # We need to create a couple of temporary files.
27662      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
27663      $MKDIR -p $VS_ENV_TMP_DIR
27664
27665      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
27666      # Instead create a shell script which will set the relevant variables when run.
27667      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
27668
27669  unix_path="$WINPATH_VS_ENV_CMD"
27670  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27671    windows_path=`$CYGPATH -m "$unix_path"`
27672    WINPATH_VS_ENV_CMD="$windows_path"
27673  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27674    windows_path=`cmd //c echo $unix_path`
27675    WINPATH_VS_ENV_CMD="$windows_path"
27676  fi
27677
27678      WINPATH_BASH="$BASH"
27679
27680  unix_path="$WINPATH_BASH"
27681  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27682    windows_path=`$CYGPATH -m "$unix_path"`
27683    WINPATH_BASH="$windows_path"
27684  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27685    windows_path=`cmd //c echo $unix_path`
27686    WINPATH_BASH="$windows_path"
27687  fi
27688
27689
27690      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
27691      # script (executable by bash) that will setup the important variables.
27692      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
27693      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
27694      # This will end up something like:
27695      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
27696      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
27697      # These will end up something like:
27698      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
27699      # The trailing space for everyone except PATH is no typo, but is needed due
27700      # to trailing \ in the Windows paths. These will be stripped later.
27701      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
27702          >> $EXTRACT_VC_ENV_BAT_FILE
27703      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
27704          >> $EXTRACT_VC_ENV_BAT_FILE
27705      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
27706          >> $EXTRACT_VC_ENV_BAT_FILE
27707      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
27708          >> $EXTRACT_VC_ENV_BAT_FILE
27709      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
27710          >> $EXTRACT_VC_ENV_BAT_FILE
27711      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
27712          >> $EXTRACT_VC_ENV_BAT_FILE
27713
27714      # Now execute the newly created bat file.
27715      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
27716      # Change directory so we don't need to mess with Windows paths in redirects.
27717      cd $VS_ENV_TMP_DIR
27718      cmd /c extract-vs-env.bat | $CAT
27719      cd $CURDIR
27720
27721      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
27722        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
27723$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
27724        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27725$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27726        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27727$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27728        as_fn_error $? "Cannot continue" "$LINENO" 5
27729      fi
27730
27731      # Now set all paths and other env variables. This will allow the rest of
27732      # the configure script to find and run the compiler in the proper way.
27733      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
27734$as_echo "$as_me: Setting extracted environment variables" >&6;}
27735      . $VS_ENV_TMP_DIR/set-vs-env.sh
27736      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
27737      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
27738    else
27739      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
27740      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
27741$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
27742    fi
27743  fi
27744
27745  # At this point, we should have correct variables in the environment, or we can't continue.
27746  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
27747$as_echo_n "checking for Visual Studio variables... " >&6; }
27748
27749  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
27750      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
27751    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
27752      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
27753$as_echo "present but broken" >&6; }
27754      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
27755    else
27756      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
27757$as_echo "ok" >&6; }
27758      # Remove any trailing "\" ";" and " " from the variables.
27759      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
27760      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
27761      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
27762      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
27763      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
27764      # Remove any paths containing # (typically F#) as that messes up make. This
27765      # is needed if visual studio was installed with F# support.
27766      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
27767
27768
27769
27770
27771
27772      # Convert VS_INCLUDE into SYSROOT_CFLAGS
27773      OLDIFS="$IFS"
27774      IFS=";"
27775      for i in $VS_INCLUDE; do
27776        ipath=$i
27777        # Only process non-empty elements
27778        if test "x$ipath" != x; then
27779          IFS="$OLDIFS"
27780          # Check that directory exists before calling fixup_path
27781          testpath=$ipath
27782
27783  windows_path="$testpath"
27784  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27785    unix_path=`$CYGPATH -u "$windows_path"`
27786    testpath="$unix_path"
27787  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27788    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27789    testpath="$unix_path"
27790  fi
27791
27792          if test -d "$testpath"; then
27793
27794  # Only process if variable expands to non-empty
27795
27796  if test "x$ipath" != x; then
27797    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27798
27799  # Input might be given as Windows format, start by converting to
27800  # unix format.
27801  path="$ipath"
27802  new_path=`$CYGPATH -u "$path"`
27803
27804  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27805  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27806  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27807  # "foo.exe" is OK but "foo" is an error.
27808  #
27809  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27810  # It is also a way to make sure we got the proper file name for the real test later on.
27811  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27812  if test "x$test_shortpath" = x; then
27813    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
27814$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
27815    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
27816  fi
27817
27818  # Call helper function which possibly converts this using DOS-style short mode.
27819  # If so, the updated path is stored in $new_path.
27820
27821  input_path="$new_path"
27822  # Check if we need to convert this using DOS-style short mode. If the path
27823  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27824  # take no chances and rewrite it.
27825  # Note: m4 eats our [], so we need to use [ and ] instead.
27826  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27827  if test "x$has_forbidden_chars" != x; then
27828    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27829    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27830    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27831    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27832      # Going to short mode and back again did indeed matter. Since short mode is
27833      # case insensitive, let's make it lowercase to improve readability.
27834      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27835      # Now convert it back to Unix-style (cygpath)
27836      input_path=`$CYGPATH -u "$shortmode_path"`
27837      new_path="$input_path"
27838    fi
27839  fi
27840
27841  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27842  if test "x$test_cygdrive_prefix" = x; then
27843    # As a simple fix, exclude /usr/bin since it's not a real path.
27844    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27845      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27846      # a path prefixed by /cygdrive for fixpath to work.
27847      new_path="$CYGWIN_ROOT_PATH$input_path"
27848    fi
27849  fi
27850
27851
27852  if test "x$path" != "x$new_path"; then
27853    ipath="$new_path"
27854    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
27855$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
27856  fi
27857
27858    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27859
27860  path="$ipath"
27861  has_colon=`$ECHO $path | $GREP ^.:`
27862  new_path="$path"
27863  if test "x$has_colon" = x; then
27864    # Not in mixed or Windows style, start by that.
27865    new_path=`cmd //c echo $path`
27866  fi
27867
27868
27869  input_path="$new_path"
27870  # Check if we need to convert this using DOS-style short mode. If the path
27871  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27872  # take no chances and rewrite it.
27873  # Note: m4 eats our [], so we need to use [ and ] instead.
27874  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27875  if test "x$has_forbidden_chars" != x; then
27876    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27877    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27878  fi
27879
27880
27881  windows_path="$new_path"
27882  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27883    unix_path=`$CYGPATH -u "$windows_path"`
27884    new_path="$unix_path"
27885  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27886    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27887    new_path="$unix_path"
27888  fi
27889
27890  if test "x$path" != "x$new_path"; then
27891    ipath="$new_path"
27892    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
27893$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
27894  fi
27895
27896  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27897  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27898
27899    else
27900      # We're on a unix platform. Hooray! :)
27901      path="$ipath"
27902      has_space=`$ECHO "$path" | $GREP " "`
27903      if test "x$has_space" != x; then
27904        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
27905$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
27906        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27907      fi
27908
27909      # Use eval to expand a potential ~
27910      eval path="$path"
27911      if test ! -f "$path" && test ! -d "$path"; then
27912        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
27913      fi
27914
27915      ipath="`cd "$path"; $THEPWDCMD -L`"
27916    fi
27917  fi
27918
27919            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
27920          fi
27921          IFS=";"
27922        fi
27923      done
27924      # Convert VS_LIB into SYSROOT_LDFLAGS
27925      for i in $VS_LIB; do
27926        libpath=$i
27927        # Only process non-empty elements
27928        if test "x$libpath" != x; then
27929          IFS="$OLDIFS"
27930          # Check that directory exists before calling fixup_path
27931          testpath=$libpath
27932
27933  windows_path="$testpath"
27934  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27935    unix_path=`$CYGPATH -u "$windows_path"`
27936    testpath="$unix_path"
27937  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27938    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27939    testpath="$unix_path"
27940  fi
27941
27942          if test -d "$testpath"; then
27943
27944  # Only process if variable expands to non-empty
27945
27946  if test "x$libpath" != x; then
27947    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27948
27949  # Input might be given as Windows format, start by converting to
27950  # unix format.
27951  path="$libpath"
27952  new_path=`$CYGPATH -u "$path"`
27953
27954  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27955  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27956  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27957  # "foo.exe" is OK but "foo" is an error.
27958  #
27959  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27960  # It is also a way to make sure we got the proper file name for the real test later on.
27961  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27962  if test "x$test_shortpath" = x; then
27963    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
27964$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
27965    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
27966  fi
27967
27968  # Call helper function which possibly converts this using DOS-style short mode.
27969  # If so, the updated path is stored in $new_path.
27970
27971  input_path="$new_path"
27972  # Check if we need to convert this using DOS-style short mode. If the path
27973  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27974  # take no chances and rewrite it.
27975  # Note: m4 eats our [], so we need to use [ and ] instead.
27976  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27977  if test "x$has_forbidden_chars" != x; then
27978    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27979    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27980    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27981    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27982      # Going to short mode and back again did indeed matter. Since short mode is
27983      # case insensitive, let's make it lowercase to improve readability.
27984      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27985      # Now convert it back to Unix-style (cygpath)
27986      input_path=`$CYGPATH -u "$shortmode_path"`
27987      new_path="$input_path"
27988    fi
27989  fi
27990
27991  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27992  if test "x$test_cygdrive_prefix" = x; then
27993    # As a simple fix, exclude /usr/bin since it's not a real path.
27994    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27995      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27996      # a path prefixed by /cygdrive for fixpath to work.
27997      new_path="$CYGWIN_ROOT_PATH$input_path"
27998    fi
27999  fi
28000
28001
28002  if test "x$path" != "x$new_path"; then
28003    libpath="$new_path"
28004    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
28005$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
28006  fi
28007
28008    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28009
28010  path="$libpath"
28011  has_colon=`$ECHO $path | $GREP ^.:`
28012  new_path="$path"
28013  if test "x$has_colon" = x; then
28014    # Not in mixed or Windows style, start by that.
28015    new_path=`cmd //c echo $path`
28016  fi
28017
28018
28019  input_path="$new_path"
28020  # Check if we need to convert this using DOS-style short mode. If the path
28021  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28022  # take no chances and rewrite it.
28023  # Note: m4 eats our [], so we need to use [ and ] instead.
28024  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28025  if test "x$has_forbidden_chars" != x; then
28026    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28027    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28028  fi
28029
28030
28031  windows_path="$new_path"
28032  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28033    unix_path=`$CYGPATH -u "$windows_path"`
28034    new_path="$unix_path"
28035  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28036    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28037    new_path="$unix_path"
28038  fi
28039
28040  if test "x$path" != "x$new_path"; then
28041    libpath="$new_path"
28042    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
28043$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
28044  fi
28045
28046  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28047  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28048
28049    else
28050      # We're on a unix platform. Hooray! :)
28051      path="$libpath"
28052      has_space=`$ECHO "$path" | $GREP " "`
28053      if test "x$has_space" != x; then
28054        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
28055$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
28056        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28057      fi
28058
28059      # Use eval to expand a potential ~
28060      eval path="$path"
28061      if test ! -f "$path" && test ! -d "$path"; then
28062        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
28063      fi
28064
28065      libpath="`cd "$path"; $THEPWDCMD -L`"
28066    fi
28067  fi
28068
28069            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
28070          fi
28071          IFS=";"
28072        fi
28073      done
28074      IFS="$OLDIFS"
28075    fi
28076  else
28077    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28078$as_echo "not found" >&6; }
28079
28080    if test "x$VS_ENV_CMD" = x; then
28081      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
28082$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
28083      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
28084$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
28085    else
28086      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
28087$as_echo "$as_me: Running the extraction script failed." >&6;}
28088    fi
28089    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
28090$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
28091    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
28092$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
28093    as_fn_error $? "Cannot continue" "$LINENO" 5
28094  fi
28095
28096    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
28097    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
28098    PATH="$VS_PATH"
28099    # The microsoft toolchain also requires INCLUDE and LIB to be set.
28100    export INCLUDE="$VS_INCLUDE"
28101    export LIB="$VS_LIB"
28102  fi
28103
28104  # For solaris we really need solaris tools, and not the GNU equivalent.
28105  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
28106  # so add that to path before starting to probe.
28107  # FIXME: This was originally only done for AS,NM,GNM,STRIP,OBJCOPY,OBJDUMP.
28108  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
28109    PATH="/usr/ccs/bin:$PATH"
28110  fi
28111
28112  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
28113  # override all other locations.
28114  if test "x$TOOLCHAIN_PATH" != x; then
28115    PATH=$TOOLCHAIN_PATH:$PATH
28116  fi
28117
28118
28119  #
28120  # Setup the compilers (CC and CXX)
28121  #
28122
28123  COMPILER_NAME=C
28124  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
28125
28126  if test "x$CC" != x; then
28127    # User has supplied compiler name already, always let that override.
28128    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
28129$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
28130    if test "x`basename $CC`" = "x$CC"; then
28131      # A command without a complete path is provided, search $PATH.
28132
28133      for ac_prog in $CC
28134do
28135  # Extract the first word of "$ac_prog", so it can be a program name with args.
28136set dummy $ac_prog; ac_word=$2
28137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28138$as_echo_n "checking for $ac_word... " >&6; }
28139if ${ac_cv_path_POTENTIAL_CC+:} false; then :
28140  $as_echo_n "(cached) " >&6
28141else
28142  case $POTENTIAL_CC in
28143  [\\/]* | ?:[\\/]*)
28144  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
28145  ;;
28146  *)
28147  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28148for as_dir in $PATH
28149do
28150  IFS=$as_save_IFS
28151  test -z "$as_dir" && as_dir=.
28152    for ac_exec_ext in '' $ac_executable_extensions; do
28153  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28154    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
28155    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28156    break 2
28157  fi
28158done
28159  done
28160IFS=$as_save_IFS
28161
28162  ;;
28163esac
28164fi
28165POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
28166if test -n "$POTENTIAL_CC"; then
28167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
28168$as_echo "$POTENTIAL_CC" >&6; }
28169else
28170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28171$as_echo "no" >&6; }
28172fi
28173
28174
28175  test -n "$POTENTIAL_CC" && break
28176done
28177
28178      if test "x$POTENTIAL_CC" != x; then
28179        CC=$POTENTIAL_CC
28180      else
28181        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
28182      fi
28183    else
28184      # Otherwise it might already be a complete path
28185      if test ! -x "$CC"; then
28186        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
28187      fi
28188    fi
28189  else
28190    # No user supplied value. Locate compiler ourselves.
28191
28192    # If we are cross compiling, assume cross compilation tools follows the
28193    # cross compilation standard where they are prefixed with the autoconf
28194    # standard name for the target. For example the binary
28195    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
28196    # If we are not cross compiling, then the default compiler name will be
28197    # used.
28198
28199    CC=
28200    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
28201    # before checking the rest of the PATH.
28202    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
28203    # step, this should not be necessary.
28204    if test -n "$TOOLCHAIN_PATH"; then
28205      PATH_save="$PATH"
28206      PATH="$TOOLCHAIN_PATH"
28207      for ac_prog in $SEARCH_LIST
28208do
28209  # Extract the first word of "$ac_prog", so it can be a program name with args.
28210set dummy $ac_prog; ac_word=$2
28211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28212$as_echo_n "checking for $ac_word... " >&6; }
28213if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
28214  $as_echo_n "(cached) " >&6
28215else
28216  case $TOOLCHAIN_PATH_CC in
28217  [\\/]* | ?:[\\/]*)
28218  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
28219  ;;
28220  *)
28221  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28222for as_dir in $PATH
28223do
28224  IFS=$as_save_IFS
28225  test -z "$as_dir" && as_dir=.
28226    for ac_exec_ext in '' $ac_executable_extensions; do
28227  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28228    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
28229    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28230    break 2
28231  fi
28232done
28233  done
28234IFS=$as_save_IFS
28235
28236  ;;
28237esac
28238fi
28239TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
28240if test -n "$TOOLCHAIN_PATH_CC"; then
28241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
28242$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
28243else
28244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28245$as_echo "no" >&6; }
28246fi
28247
28248
28249  test -n "$TOOLCHAIN_PATH_CC" && break
28250done
28251
28252      CC=$TOOLCHAIN_PATH_CC
28253      PATH="$PATH_save"
28254    fi
28255
28256    # AC_PATH_PROGS can't be run multiple times with the same variable,
28257    # so create a new name for this run.
28258    if test "x$CC" = x; then
28259      for ac_prog in $SEARCH_LIST
28260do
28261  # Extract the first word of "$ac_prog", so it can be a program name with args.
28262set dummy $ac_prog; ac_word=$2
28263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28264$as_echo_n "checking for $ac_word... " >&6; }
28265if ${ac_cv_path_POTENTIAL_CC+:} false; then :
28266  $as_echo_n "(cached) " >&6
28267else
28268  case $POTENTIAL_CC in
28269  [\\/]* | ?:[\\/]*)
28270  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
28271  ;;
28272  *)
28273  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28274for as_dir in $PATH
28275do
28276  IFS=$as_save_IFS
28277  test -z "$as_dir" && as_dir=.
28278    for ac_exec_ext in '' $ac_executable_extensions; do
28279  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28280    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
28281    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28282    break 2
28283  fi
28284done
28285  done
28286IFS=$as_save_IFS
28287
28288  ;;
28289esac
28290fi
28291POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
28292if test -n "$POTENTIAL_CC"; then
28293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
28294$as_echo "$POTENTIAL_CC" >&6; }
28295else
28296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28297$as_echo "no" >&6; }
28298fi
28299
28300
28301  test -n "$POTENTIAL_CC" && break
28302done
28303
28304      CC=$POTENTIAL_CC
28305    fi
28306
28307    if test "x$CC" = x; then
28308
28309  # Print a helpful message on how to acquire the necessary build dependency.
28310  # devkit is the help tag: freetype, cups, pulse, alsa etc
28311  MISSING_DEPENDENCY=devkit
28312
28313  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28314    cygwin_help $MISSING_DEPENDENCY
28315  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28316    msys_help $MISSING_DEPENDENCY
28317  else
28318    PKGHANDLER_COMMAND=
28319
28320    case $PKGHANDLER in
28321      apt-get)
28322        apt_help     $MISSING_DEPENDENCY ;;
28323      yum)
28324        yum_help     $MISSING_DEPENDENCY ;;
28325      port)
28326        port_help    $MISSING_DEPENDENCY ;;
28327      pkgutil)
28328        pkgutil_help $MISSING_DEPENDENCY ;;
28329      pkgadd)
28330        pkgadd_help  $MISSING_DEPENDENCY ;;
28331    esac
28332
28333    if test "x$PKGHANDLER_COMMAND" != x; then
28334      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
28335    fi
28336  fi
28337
28338      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
28339    fi
28340  fi
28341
28342  # Now we have a compiler binary in CC. Make sure it's okay.
28343
28344  # Only process if variable expands to non-empty
28345
28346  if test "x$CC" != x; then
28347    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28348
28349  # First separate the path from the arguments. This will split at the first
28350  # space.
28351  complete="$CC"
28352  path="${complete%% *}"
28353  tmp="$complete EOL"
28354  arguments="${tmp#* }"
28355
28356  # Input might be given as Windows format, start by converting to
28357  # unix format.
28358  new_path=`$CYGPATH -u "$path"`
28359
28360  # Now try to locate executable using which
28361  new_path=`$WHICH "$new_path" 2> /dev/null`
28362  # bat and cmd files are not always considered executable in cygwin causing which
28363  # to not find them
28364  if test "x$new_path" = x \
28365      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28366      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28367    new_path=`$CYGPATH -u "$path"`
28368  fi
28369  if test "x$new_path" = x; then
28370    # Oops. Which didn't find the executable.
28371    # The splitting of arguments from the executable at a space might have been incorrect,
28372    # since paths with space are more likely in Windows. Give it another try with the whole
28373    # argument.
28374    path="$complete"
28375    arguments="EOL"
28376    new_path=`$CYGPATH -u "$path"`
28377    new_path=`$WHICH "$new_path" 2> /dev/null`
28378    # bat and cmd files are not always considered executable in cygwin causing which
28379    # to not find them
28380    if test "x$new_path" = x \
28381        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28382        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28383      new_path=`$CYGPATH -u "$path"`
28384    fi
28385    if test "x$new_path" = x; then
28386      # It's still not found. Now this is an unrecoverable error.
28387      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28388$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28389      has_space=`$ECHO "$complete" | $GREP " "`
28390      if test "x$has_space" != x; then
28391        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28392$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28393      fi
28394      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28395    fi
28396  fi
28397
28398  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28399  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28400  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28401  # "foo.exe" is OK but "foo" is an error.
28402  #
28403  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28404  # It is also a way to make sure we got the proper file name for the real test later on.
28405  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28406  if test "x$test_shortpath" = x; then
28407    # Short path failed, file does not exist as specified.
28408    # Try adding .exe or .cmd
28409    if test -f "${new_path}.exe"; then
28410      input_to_shortpath="${new_path}.exe"
28411    elif test -f "${new_path}.cmd"; then
28412      input_to_shortpath="${new_path}.cmd"
28413    else
28414      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
28415$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
28416      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28417$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28418      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28419    fi
28420  else
28421    input_to_shortpath="$new_path"
28422  fi
28423
28424  # Call helper function which possibly converts this using DOS-style short mode.
28425  # If so, the updated path is stored in $new_path.
28426  new_path="$input_to_shortpath"
28427
28428  input_path="$input_to_shortpath"
28429  # Check if we need to convert this using DOS-style short mode. If the path
28430  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28431  # take no chances and rewrite it.
28432  # Note: m4 eats our [], so we need to use [ and ] instead.
28433  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28434  if test "x$has_forbidden_chars" != x; then
28435    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28436    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28437    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28438    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28439      # Going to short mode and back again did indeed matter. Since short mode is
28440      # case insensitive, let's make it lowercase to improve readability.
28441      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28442      # Now convert it back to Unix-style (cygpath)
28443      input_path=`$CYGPATH -u "$shortmode_path"`
28444      new_path="$input_path"
28445    fi
28446  fi
28447
28448  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28449  if test "x$test_cygdrive_prefix" = x; then
28450    # As a simple fix, exclude /usr/bin since it's not a real path.
28451    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28452      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28453      # a path prefixed by /cygdrive for fixpath to work.
28454      new_path="$CYGWIN_ROOT_PATH$input_path"
28455    fi
28456  fi
28457
28458  # remove trailing .exe if any
28459  new_path="${new_path/%.exe/}"
28460
28461    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28462
28463  # First separate the path from the arguments. This will split at the first
28464  # space.
28465  complete="$CC"
28466  path="${complete%% *}"
28467  tmp="$complete EOL"
28468  arguments="${tmp#* }"
28469
28470  # Input might be given as Windows format, start by converting to
28471  # unix format.
28472  new_path="$path"
28473
28474  windows_path="$new_path"
28475  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28476    unix_path=`$CYGPATH -u "$windows_path"`
28477    new_path="$unix_path"
28478  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28479    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28480    new_path="$unix_path"
28481  fi
28482
28483
28484  # Now try to locate executable using which
28485  new_path=`$WHICH "$new_path" 2> /dev/null`
28486
28487  if test "x$new_path" = x; then
28488    # Oops. Which didn't find the executable.
28489    # The splitting of arguments from the executable at a space might have been incorrect,
28490    # since paths with space are more likely in Windows. Give it another try with the whole
28491    # argument.
28492    path="$complete"
28493    arguments="EOL"
28494    new_path="$path"
28495
28496  windows_path="$new_path"
28497  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28498    unix_path=`$CYGPATH -u "$windows_path"`
28499    new_path="$unix_path"
28500  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28501    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28502    new_path="$unix_path"
28503  fi
28504
28505
28506    new_path=`$WHICH "$new_path" 2> /dev/null`
28507    # bat and cmd files are not always considered executable in MSYS causing which
28508    # to not find them
28509    if test "x$new_path" = x \
28510        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28511        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28512      new_path="$path"
28513
28514  windows_path="$new_path"
28515  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28516    unix_path=`$CYGPATH -u "$windows_path"`
28517    new_path="$unix_path"
28518  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28519    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28520    new_path="$unix_path"
28521  fi
28522
28523    fi
28524
28525    if test "x$new_path" = x; then
28526      # It's still not found. Now this is an unrecoverable error.
28527      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28528$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28529      has_space=`$ECHO "$complete" | $GREP " "`
28530      if test "x$has_space" != x; then
28531        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28532$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28533      fi
28534      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28535    fi
28536  fi
28537
28538  # Now new_path has a complete unix path to the binary
28539  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28540    # Keep paths in /bin as-is, but remove trailing .exe if any
28541    new_path="${new_path/%.exe/}"
28542    # Do not save /bin paths to all_fixpath_prefixes!
28543  else
28544    # Not in mixed or Windows style, start by that.
28545    new_path=`cmd //c echo $new_path`
28546
28547  input_path="$new_path"
28548  # Check if we need to convert this using DOS-style short mode. If the path
28549  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28550  # take no chances and rewrite it.
28551  # Note: m4 eats our [], so we need to use [ and ] instead.
28552  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28553  if test "x$has_forbidden_chars" != x; then
28554    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28555    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28556  fi
28557
28558    # Output is in $new_path
28559
28560  windows_path="$new_path"
28561  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28562    unix_path=`$CYGPATH -u "$windows_path"`
28563    new_path="$unix_path"
28564  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28565    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28566    new_path="$unix_path"
28567  fi
28568
28569    # remove trailing .exe if any
28570    new_path="${new_path/%.exe/}"
28571
28572    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28573    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28574  fi
28575
28576    else
28577      # We're on a unix platform. Hooray! :)
28578      # First separate the path from the arguments. This will split at the first
28579      # space.
28580      complete="$CC"
28581      path="${complete%% *}"
28582      tmp="$complete EOL"
28583      arguments="${tmp#* }"
28584
28585      # Cannot rely on the command "which" here since it doesn't always work.
28586      is_absolute_path=`$ECHO "$path" | $GREP ^/`
28587      if test -z "$is_absolute_path"; then
28588        # Path to executable is not absolute. Find it.
28589        IFS_save="$IFS"
28590        IFS=:
28591        for p in $PATH; do
28592          if test -f "$p/$path" && test -x "$p/$path"; then
28593            new_path="$p/$path"
28594            break
28595          fi
28596        done
28597        IFS="$IFS_save"
28598      else
28599        # This is an absolute path, we can use it without further modifications.
28600        new_path="$path"
28601      fi
28602
28603      if test "x$new_path" = x; then
28604        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28605$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28606        has_space=`$ECHO "$complete" | $GREP " "`
28607        if test "x$has_space" != x; then
28608          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28609$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28610        fi
28611        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28612      fi
28613    fi
28614
28615    # Now join together the path and the arguments once again
28616    if test "x$arguments" != xEOL; then
28617      new_complete="$new_path ${arguments% *}"
28618    else
28619      new_complete="$new_path"
28620    fi
28621
28622    if test "x$complete" != "x$new_complete"; then
28623      CC="$new_complete"
28624      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
28625$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
28626    fi
28627  fi
28628
28629  TEST_COMPILER="$CC"
28630  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
28631  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
28632  if test "x$OPENJDK_BUILD_OS" != xaix; then
28633    # FIXME: This test should not be needed anymore; we don't do that for any platform.
28634    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
28635$as_echo_n "checking resolved symbolic links for CC... " >&6; }
28636
28637  if test "x$OPENJDK_BUILD_OS" != xwindows; then
28638    # Follow a chain of symbolic links. Use readlink
28639    # where it exists, else fall back to horribly
28640    # complicated shell code.
28641    if test "x$READLINK_TESTED" != yes; then
28642      # On MacOSX there is a readlink tool with a different
28643      # purpose than the GNU readlink tool. Check the found readlink.
28644      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
28645      if test "x$ISGNU" = x; then
28646        # A readlink that we do not know how to use.
28647        # Are there other non-GNU readlinks out there?
28648        READLINK_TESTED=yes
28649        READLINK=
28650      fi
28651    fi
28652
28653    if test "x$READLINK" != x; then
28654      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
28655    else
28656      # Save the current directory for restoring afterwards
28657      STARTDIR=$PWD
28658      COUNTER=0
28659      sym_link_dir=`$DIRNAME $TEST_COMPILER`
28660      sym_link_file=`$BASENAME $TEST_COMPILER`
28661      cd $sym_link_dir
28662      # Use -P flag to resolve symlinks in directories.
28663      cd `$THEPWDCMD -P`
28664      sym_link_dir=`$THEPWDCMD -P`
28665      # Resolve file symlinks
28666      while test $COUNTER -lt 20; do
28667        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
28668        if test "x$ISLINK" == x; then
28669          # This is not a symbolic link! We are done!
28670          break
28671        fi
28672        # Again resolve directory symlinks since the target of the just found
28673        # link could be in a different directory
28674        cd `$DIRNAME $ISLINK`
28675        sym_link_dir=`$THEPWDCMD -P`
28676        sym_link_file=`$BASENAME $ISLINK`
28677        let COUNTER=COUNTER+1
28678      done
28679      cd $STARTDIR
28680      TEST_COMPILER=$sym_link_dir/$sym_link_file
28681    fi
28682  fi
28683
28684    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
28685$as_echo "$TEST_COMPILER" >&6; }
28686  fi
28687  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
28688$as_echo_n "checking if CC is disguised ccache... " >&6; }
28689
28690  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
28691  if test "x$COMPILER_BASENAME" = "xccache"; then
28692    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
28693$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
28694    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
28695    # We want to control ccache invocation ourselves, so ignore this cc and try
28696    # searching again.
28697
28698    # Remove the path to the fake ccache cc from the PATH
28699    RETRY_COMPILER_SAVED_PATH="$PATH"
28700    COMPILER_DIRNAME=`$DIRNAME $CC`
28701    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
28702
28703    # Try again looking for our compiler
28704    if test -n "$ac_tool_prefix"; then
28705  for ac_prog in $TOOLCHAIN_CC_BINARY
28706  do
28707    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28708set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28710$as_echo_n "checking for $ac_word... " >&6; }
28711if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
28712  $as_echo_n "(cached) " >&6
28713else
28714  if test -n "$PROPER_COMPILER_CC"; then
28715  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
28716else
28717as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28718for as_dir in $PATH
28719do
28720  IFS=$as_save_IFS
28721  test -z "$as_dir" && as_dir=.
28722    for ac_exec_ext in '' $ac_executable_extensions; do
28723  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28724    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
28725    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28726    break 2
28727  fi
28728done
28729  done
28730IFS=$as_save_IFS
28731
28732fi
28733fi
28734PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
28735if test -n "$PROPER_COMPILER_CC"; then
28736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
28737$as_echo "$PROPER_COMPILER_CC" >&6; }
28738else
28739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28740$as_echo "no" >&6; }
28741fi
28742
28743
28744    test -n "$PROPER_COMPILER_CC" && break
28745  done
28746fi
28747if test -z "$PROPER_COMPILER_CC"; then
28748  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
28749  for ac_prog in $TOOLCHAIN_CC_BINARY
28750do
28751  # Extract the first word of "$ac_prog", so it can be a program name with args.
28752set dummy $ac_prog; ac_word=$2
28753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28754$as_echo_n "checking for $ac_word... " >&6; }
28755if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
28756  $as_echo_n "(cached) " >&6
28757else
28758  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28759  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
28760else
28761as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28762for as_dir in $PATH
28763do
28764  IFS=$as_save_IFS
28765  test -z "$as_dir" && as_dir=.
28766    for ac_exec_ext in '' $ac_executable_extensions; do
28767  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28768    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
28769    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28770    break 2
28771  fi
28772done
28773  done
28774IFS=$as_save_IFS
28775
28776fi
28777fi
28778ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
28779if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28780  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
28781$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
28782else
28783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28784$as_echo "no" >&6; }
28785fi
28786
28787
28788  test -n "$ac_ct_PROPER_COMPILER_CC" && break
28789done
28790
28791  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
28792    PROPER_COMPILER_CC=""
28793  else
28794    case $cross_compiling:$ac_tool_warned in
28795yes:)
28796{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28797$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28798ac_tool_warned=yes ;;
28799esac
28800    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
28801  fi
28802fi
28803
28804
28805  # Only process if variable expands to non-empty
28806
28807  if test "x$PROPER_COMPILER_CC" != x; then
28808    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28809
28810  # First separate the path from the arguments. This will split at the first
28811  # space.
28812  complete="$PROPER_COMPILER_CC"
28813  path="${complete%% *}"
28814  tmp="$complete EOL"
28815  arguments="${tmp#* }"
28816
28817  # Input might be given as Windows format, start by converting to
28818  # unix format.
28819  new_path=`$CYGPATH -u "$path"`
28820
28821  # Now try to locate executable using which
28822  new_path=`$WHICH "$new_path" 2> /dev/null`
28823  # bat and cmd files are not always considered executable in cygwin causing which
28824  # to not find them
28825  if test "x$new_path" = x \
28826      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28827      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28828    new_path=`$CYGPATH -u "$path"`
28829  fi
28830  if test "x$new_path" = x; then
28831    # Oops. Which didn't find the executable.
28832    # The splitting of arguments from the executable at a space might have been incorrect,
28833    # since paths with space are more likely in Windows. Give it another try with the whole
28834    # argument.
28835    path="$complete"
28836    arguments="EOL"
28837    new_path=`$CYGPATH -u "$path"`
28838    new_path=`$WHICH "$new_path" 2> /dev/null`
28839    # bat and cmd files are not always considered executable in cygwin causing which
28840    # to not find them
28841    if test "x$new_path" = x \
28842        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28843        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28844      new_path=`$CYGPATH -u "$path"`
28845    fi
28846    if test "x$new_path" = x; then
28847      # It's still not found. Now this is an unrecoverable error.
28848      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28849$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28850      has_space=`$ECHO "$complete" | $GREP " "`
28851      if test "x$has_space" != x; then
28852        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28853$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28854      fi
28855      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28856    fi
28857  fi
28858
28859  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28860  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28861  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28862  # "foo.exe" is OK but "foo" is an error.
28863  #
28864  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28865  # It is also a way to make sure we got the proper file name for the real test later on.
28866  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28867  if test "x$test_shortpath" = x; then
28868    # Short path failed, file does not exist as specified.
28869    # Try adding .exe or .cmd
28870    if test -f "${new_path}.exe"; then
28871      input_to_shortpath="${new_path}.exe"
28872    elif test -f "${new_path}.cmd"; then
28873      input_to_shortpath="${new_path}.cmd"
28874    else
28875      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
28876$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
28877      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28878$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28879      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28880    fi
28881  else
28882    input_to_shortpath="$new_path"
28883  fi
28884
28885  # Call helper function which possibly converts this using DOS-style short mode.
28886  # If so, the updated path is stored in $new_path.
28887  new_path="$input_to_shortpath"
28888
28889  input_path="$input_to_shortpath"
28890  # Check if we need to convert this using DOS-style short mode. If the path
28891  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28892  # take no chances and rewrite it.
28893  # Note: m4 eats our [], so we need to use [ and ] instead.
28894  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28895  if test "x$has_forbidden_chars" != x; then
28896    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28897    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28898    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28899    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28900      # Going to short mode and back again did indeed matter. Since short mode is
28901      # case insensitive, let's make it lowercase to improve readability.
28902      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28903      # Now convert it back to Unix-style (cygpath)
28904      input_path=`$CYGPATH -u "$shortmode_path"`
28905      new_path="$input_path"
28906    fi
28907  fi
28908
28909  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28910  if test "x$test_cygdrive_prefix" = x; then
28911    # As a simple fix, exclude /usr/bin since it's not a real path.
28912    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28913      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28914      # a path prefixed by /cygdrive for fixpath to work.
28915      new_path="$CYGWIN_ROOT_PATH$input_path"
28916    fi
28917  fi
28918
28919  # remove trailing .exe if any
28920  new_path="${new_path/%.exe/}"
28921
28922    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28923
28924  # First separate the path from the arguments. This will split at the first
28925  # space.
28926  complete="$PROPER_COMPILER_CC"
28927  path="${complete%% *}"
28928  tmp="$complete EOL"
28929  arguments="${tmp#* }"
28930
28931  # Input might be given as Windows format, start by converting to
28932  # unix format.
28933  new_path="$path"
28934
28935  windows_path="$new_path"
28936  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28937    unix_path=`$CYGPATH -u "$windows_path"`
28938    new_path="$unix_path"
28939  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28940    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28941    new_path="$unix_path"
28942  fi
28943
28944
28945  # Now try to locate executable using which
28946  new_path=`$WHICH "$new_path" 2> /dev/null`
28947
28948  if test "x$new_path" = x; then
28949    # Oops. Which didn't find the executable.
28950    # The splitting of arguments from the executable at a space might have been incorrect,
28951    # since paths with space are more likely in Windows. Give it another try with the whole
28952    # argument.
28953    path="$complete"
28954    arguments="EOL"
28955    new_path="$path"
28956
28957  windows_path="$new_path"
28958  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28959    unix_path=`$CYGPATH -u "$windows_path"`
28960    new_path="$unix_path"
28961  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28962    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28963    new_path="$unix_path"
28964  fi
28965
28966
28967    new_path=`$WHICH "$new_path" 2> /dev/null`
28968    # bat and cmd files are not always considered executable in MSYS causing which
28969    # to not find them
28970    if test "x$new_path" = x \
28971        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28972        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28973      new_path="$path"
28974
28975  windows_path="$new_path"
28976  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28977    unix_path=`$CYGPATH -u "$windows_path"`
28978    new_path="$unix_path"
28979  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28980    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28981    new_path="$unix_path"
28982  fi
28983
28984    fi
28985
28986    if test "x$new_path" = x; then
28987      # It's still not found. Now this is an unrecoverable error.
28988      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28989$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28990      has_space=`$ECHO "$complete" | $GREP " "`
28991      if test "x$has_space" != x; then
28992        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28993$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28994      fi
28995      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28996    fi
28997  fi
28998
28999  # Now new_path has a complete unix path to the binary
29000  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
29001    # Keep paths in /bin as-is, but remove trailing .exe if any
29002    new_path="${new_path/%.exe/}"
29003    # Do not save /bin paths to all_fixpath_prefixes!
29004  else
29005    # Not in mixed or Windows style, start by that.
29006    new_path=`cmd //c echo $new_path`
29007
29008  input_path="$new_path"
29009  # Check if we need to convert this using DOS-style short mode. If the path
29010  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29011  # take no chances and rewrite it.
29012  # Note: m4 eats our [], so we need to use [ and ] instead.
29013  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29014  if test "x$has_forbidden_chars" != x; then
29015    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29016    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29017  fi
29018
29019    # Output is in $new_path
29020
29021  windows_path="$new_path"
29022  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29023    unix_path=`$CYGPATH -u "$windows_path"`
29024    new_path="$unix_path"
29025  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29026    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29027    new_path="$unix_path"
29028  fi
29029
29030    # remove trailing .exe if any
29031    new_path="${new_path/%.exe/}"
29032
29033    # Save the first 10 bytes of this path to the storage, so fixpath can work.
29034    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29035  fi
29036
29037    else
29038      # We're on a unix platform. Hooray! :)
29039      # First separate the path from the arguments. This will split at the first
29040      # space.
29041      complete="$PROPER_COMPILER_CC"
29042      path="${complete%% *}"
29043      tmp="$complete EOL"
29044      arguments="${tmp#* }"
29045
29046      # Cannot rely on the command "which" here since it doesn't always work.
29047      is_absolute_path=`$ECHO "$path" | $GREP ^/`
29048      if test -z "$is_absolute_path"; then
29049        # Path to executable is not absolute. Find it.
29050        IFS_save="$IFS"
29051        IFS=:
29052        for p in $PATH; do
29053          if test -f "$p/$path" && test -x "$p/$path"; then
29054            new_path="$p/$path"
29055            break
29056          fi
29057        done
29058        IFS="$IFS_save"
29059      else
29060        # This is an absolute path, we can use it without further modifications.
29061        new_path="$path"
29062      fi
29063
29064      if test "x$new_path" = x; then
29065        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
29066$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
29067        has_space=`$ECHO "$complete" | $GREP " "`
29068        if test "x$has_space" != x; then
29069          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
29070$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
29071        fi
29072        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
29073      fi
29074    fi
29075
29076    # Now join together the path and the arguments once again
29077    if test "x$arguments" != xEOL; then
29078      new_complete="$new_path ${arguments% *}"
29079    else
29080      new_complete="$new_path"
29081    fi
29082
29083    if test "x$complete" != "x$new_complete"; then
29084      PROPER_COMPILER_CC="$new_complete"
29085      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
29086$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
29087    fi
29088  fi
29089
29090    PATH="$RETRY_COMPILER_SAVED_PATH"
29091
29092    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
29093$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
29094
29095  if test "x$OPENJDK_BUILD_OS" != xwindows; then
29096    # Follow a chain of symbolic links. Use readlink
29097    # where it exists, else fall back to horribly
29098    # complicated shell code.
29099    if test "x$READLINK_TESTED" != yes; then
29100      # On MacOSX there is a readlink tool with a different
29101      # purpose than the GNU readlink tool. Check the found readlink.
29102      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
29103      if test "x$ISGNU" = x; then
29104        # A readlink that we do not know how to use.
29105        # Are there other non-GNU readlinks out there?
29106        READLINK_TESTED=yes
29107        READLINK=
29108      fi
29109    fi
29110
29111    if test "x$READLINK" != x; then
29112      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
29113    else
29114      # Save the current directory for restoring afterwards
29115      STARTDIR=$PWD
29116      COUNTER=0
29117      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
29118      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
29119      cd $sym_link_dir
29120      # Use -P flag to resolve symlinks in directories.
29121      cd `$THEPWDCMD -P`
29122      sym_link_dir=`$THEPWDCMD -P`
29123      # Resolve file symlinks
29124      while test $COUNTER -lt 20; do
29125        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
29126        if test "x$ISLINK" == x; then
29127          # This is not a symbolic link! We are done!
29128          break
29129        fi
29130        # Again resolve directory symlinks since the target of the just found
29131        # link could be in a different directory
29132        cd `$DIRNAME $ISLINK`
29133        sym_link_dir=`$THEPWDCMD -P`
29134        sym_link_file=`$BASENAME $ISLINK`
29135        let COUNTER=COUNTER+1
29136      done
29137      cd $STARTDIR
29138      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
29139    fi
29140  fi
29141
29142    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
29143$as_echo "$PROPER_COMPILER_CC" >&6; }
29144    CC="$PROPER_COMPILER_CC"
29145  else
29146    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
29147$as_echo "no, keeping CC" >&6; }
29148  fi
29149
29150
29151  COMPILER=$CC
29152  COMPILER_NAME=$COMPILER_NAME
29153
29154  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
29155    # cc -V output typically looks like
29156    #     cc: Sun C 5.12 Linux_i386 2011/11/16
29157    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
29158    # Check that this is likely to be the Solaris Studio cc.
29159    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
29160    if test $? -ne 0; then
29161      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29162      { $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
29163$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29164      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29165$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29166      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
29167$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
29168      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29169    fi
29170    # Remove usage instructions (if present), and
29171    # collapse compiler output into a single line
29172    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
29173        $SED -e 's/ *[Uu]sage:.*//'`
29174    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29175        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
29176  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
29177    # xlc -qversion output typically looks like
29178    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
29179    #     Version: 11.01.0000.0015
29180    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
29181    # Check that this is likely to be the IBM XL C compiler.
29182    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
29183    if test $? -ne 0; then
29184      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29185      { $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
29186$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29187      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29188$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29189      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
29190$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
29191      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29192    fi
29193    # Collapse compiler output into a single line
29194    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
29195    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29196        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
29197  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
29198    # There is no specific version flag, but all output starts with a version string.
29199    # First line typically looks something like:
29200    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
29201    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
29202    # Check that this is likely to be Microsoft CL.EXE.
29203    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
29204    if test $? -ne 0; then
29205      { $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
29206$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29207      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29208$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29209      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29210    fi
29211    # Collapse compiler output into a single line
29212    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
29213    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29214        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
29215  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
29216    # gcc --version output typically looks like
29217    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
29218    #     Copyright (C) 2013 Free Software Foundation, Inc.
29219    #     This is free software; see the source for copying conditions.  There is NO
29220    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
29221    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29222    # Check that this is likely to be GCC.
29223    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
29224    if test $? -ne 0; then
29225      { $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
29226$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29227      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
29228$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
29229      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29230    fi
29231    # Remove Copyright and legalese from version string, and
29232    # collapse into a single line
29233    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
29234        $SED -e 's/ *Copyright .*//'`
29235    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29236        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
29237  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
29238    # clang --version output typically looks like
29239    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
29240    #    clang version 3.3 (tags/RELEASE_33/final)
29241    # or
29242    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
29243    #    Target: x86_64-pc-linux-gnu
29244    #    Thread model: posix
29245    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29246    # Check that this is likely to be clang
29247    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
29248    if test $? -ne 0; then
29249      { $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
29250$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29251      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29252$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29253      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29254    fi
29255    # Collapse compiler output into a single line
29256    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
29257    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29258        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
29259  else
29260      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
29261  fi
29262  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
29263  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
29264  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
29265  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
29266
29267  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
29268$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
29269
29270
29271  # Now that we have resolved CC ourself, let autoconf have its go at it
29272  ac_ext=c
29273ac_cpp='$CPP $CPPFLAGS'
29274ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29275ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29276ac_compiler_gnu=$ac_cv_c_compiler_gnu
29277if test -n "$ac_tool_prefix"; then
29278  for ac_prog in $CC
29279  do
29280    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
29281set dummy $ac_tool_prefix$ac_prog; ac_word=$2
29282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29283$as_echo_n "checking for $ac_word... " >&6; }
29284if ${ac_cv_prog_CC+:} false; then :
29285  $as_echo_n "(cached) " >&6
29286else
29287  if test -n "$CC"; then
29288  ac_cv_prog_CC="$CC" # Let the user override the test.
29289else
29290as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29291for as_dir in $PATH
29292do
29293  IFS=$as_save_IFS
29294  test -z "$as_dir" && as_dir=.
29295    for ac_exec_ext in '' $ac_executable_extensions; do
29296  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29297    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
29298    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29299    break 2
29300  fi
29301done
29302  done
29303IFS=$as_save_IFS
29304
29305fi
29306fi
29307CC=$ac_cv_prog_CC
29308if test -n "$CC"; then
29309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
29310$as_echo "$CC" >&6; }
29311else
29312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29313$as_echo "no" >&6; }
29314fi
29315
29316
29317    test -n "$CC" && break
29318  done
29319fi
29320if test -z "$CC"; then
29321  ac_ct_CC=$CC
29322  for ac_prog in $CC
29323do
29324  # Extract the first word of "$ac_prog", so it can be a program name with args.
29325set dummy $ac_prog; ac_word=$2
29326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29327$as_echo_n "checking for $ac_word... " >&6; }
29328if ${ac_cv_prog_ac_ct_CC+:} false; then :
29329  $as_echo_n "(cached) " >&6
29330else
29331  if test -n "$ac_ct_CC"; then
29332  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
29333else
29334as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29335for as_dir in $PATH
29336do
29337  IFS=$as_save_IFS
29338  test -z "$as_dir" && as_dir=.
29339    for ac_exec_ext in '' $ac_executable_extensions; do
29340  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29341    ac_cv_prog_ac_ct_CC="$ac_prog"
29342    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29343    break 2
29344  fi
29345done
29346  done
29347IFS=$as_save_IFS
29348
29349fi
29350fi
29351ac_ct_CC=$ac_cv_prog_ac_ct_CC
29352if test -n "$ac_ct_CC"; then
29353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
29354$as_echo "$ac_ct_CC" >&6; }
29355else
29356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29357$as_echo "no" >&6; }
29358fi
29359
29360
29361  test -n "$ac_ct_CC" && break
29362done
29363
29364  if test "x$ac_ct_CC" = x; then
29365    CC=""
29366  else
29367    case $cross_compiling:$ac_tool_warned in
29368yes:)
29369{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
29370$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
29371ac_tool_warned=yes ;;
29372esac
29373    CC=$ac_ct_CC
29374  fi
29375fi
29376
29377
29378test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29379$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29380as_fn_error $? "no acceptable C compiler found in \$PATH
29381See \`config.log' for more details" "$LINENO" 5; }
29382
29383# Provide some information about the compiler.
29384$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
29385set X $ac_compile
29386ac_compiler=$2
29387for ac_option in --version -v -V -qversion; do
29388  { { ac_try="$ac_compiler $ac_option >&5"
29389case "(($ac_try" in
29390  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29391  *) ac_try_echo=$ac_try;;
29392esac
29393eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29394$as_echo "$ac_try_echo"; } >&5
29395  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
29396  ac_status=$?
29397  if test -s conftest.err; then
29398    sed '10a\
29399... rest of stderr output deleted ...
29400         10q' conftest.err >conftest.er1
29401    cat conftest.er1 >&5
29402  fi
29403  rm -f conftest.er1 conftest.err
29404  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29405  test $ac_status = 0; }
29406done
29407
29408cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29409/* end confdefs.h.  */
29410
29411int
29412main ()
29413{
29414
29415  ;
29416  return 0;
29417}
29418_ACEOF
29419ac_clean_files_save=$ac_clean_files
29420ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
29421# Try to create an executable without -o first, disregard a.out.
29422# It will help us diagnose broken compilers, and finding out an intuition
29423# of exeext.
29424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
29425$as_echo_n "checking whether the C compiler works... " >&6; }
29426ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
29427
29428# The possible output files:
29429ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
29430
29431ac_rmfiles=
29432for ac_file in $ac_files
29433do
29434  case $ac_file in
29435    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
29436    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
29437  esac
29438done
29439rm -f $ac_rmfiles
29440
29441if { { ac_try="$ac_link_default"
29442case "(($ac_try" in
29443  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29444  *) ac_try_echo=$ac_try;;
29445esac
29446eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29447$as_echo "$ac_try_echo"; } >&5
29448  (eval "$ac_link_default") 2>&5
29449  ac_status=$?
29450  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29451  test $ac_status = 0; }; then :
29452  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
29453# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
29454# in a Makefile.  We should not override ac_cv_exeext if it was cached,
29455# so that the user can short-circuit this test for compilers unknown to
29456# Autoconf.
29457for ac_file in $ac_files ''
29458do
29459  test -f "$ac_file" || continue
29460  case $ac_file in
29461    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
29462	;;
29463    [ab].out )
29464	# We found the default executable, but exeext='' is most
29465	# certainly right.
29466	break;;
29467    *.* )
29468	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
29469	then :; else
29470	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
29471	fi
29472	# We set ac_cv_exeext here because the later test for it is not
29473	# safe: cross compilers may not add the suffix if given an `-o'
29474	# argument, so we may need to know it at that point already.
29475	# Even if this section looks crufty: it has the advantage of
29476	# actually working.
29477	break;;
29478    * )
29479	break;;
29480  esac
29481done
29482test "$ac_cv_exeext" = no && ac_cv_exeext=
29483
29484else
29485  ac_file=''
29486fi
29487if test -z "$ac_file"; then :
29488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29489$as_echo "no" >&6; }
29490$as_echo "$as_me: failed program was:" >&5
29491sed 's/^/| /' conftest.$ac_ext >&5
29492
29493{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29494$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29495as_fn_error 77 "C compiler cannot create executables
29496See \`config.log' for more details" "$LINENO" 5; }
29497else
29498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29499$as_echo "yes" >&6; }
29500fi
29501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
29502$as_echo_n "checking for C compiler default output file name... " >&6; }
29503{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
29504$as_echo "$ac_file" >&6; }
29505ac_exeext=$ac_cv_exeext
29506
29507rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
29508ac_clean_files=$ac_clean_files_save
29509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
29510$as_echo_n "checking for suffix of executables... " >&6; }
29511if { { ac_try="$ac_link"
29512case "(($ac_try" in
29513  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29514  *) ac_try_echo=$ac_try;;
29515esac
29516eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29517$as_echo "$ac_try_echo"; } >&5
29518  (eval "$ac_link") 2>&5
29519  ac_status=$?
29520  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29521  test $ac_status = 0; }; then :
29522  # If both `conftest.exe' and `conftest' are `present' (well, observable)
29523# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
29524# work properly (i.e., refer to `conftest.exe'), while it won't with
29525# `rm'.
29526for ac_file in conftest.exe conftest conftest.*; do
29527  test -f "$ac_file" || continue
29528  case $ac_file in
29529    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
29530    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
29531	  break;;
29532    * ) break;;
29533  esac
29534done
29535else
29536  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29537$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29538as_fn_error $? "cannot compute suffix of executables: cannot compile and link
29539See \`config.log' for more details" "$LINENO" 5; }
29540fi
29541rm -f conftest conftest$ac_cv_exeext
29542{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
29543$as_echo "$ac_cv_exeext" >&6; }
29544
29545rm -f conftest.$ac_ext
29546EXEEXT=$ac_cv_exeext
29547ac_exeext=$EXEEXT
29548cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29549/* end confdefs.h.  */
29550#include <stdio.h>
29551int
29552main ()
29553{
29554FILE *f = fopen ("conftest.out", "w");
29555 return ferror (f) || fclose (f) != 0;
29556
29557  ;
29558  return 0;
29559}
29560_ACEOF
29561ac_clean_files="$ac_clean_files conftest.out"
29562# Check that the compiler produces executables we can run.  If not, either
29563# the compiler is broken, or we cross compile.
29564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
29565$as_echo_n "checking whether we are cross compiling... " >&6; }
29566if test "$cross_compiling" != yes; then
29567  { { ac_try="$ac_link"
29568case "(($ac_try" in
29569  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29570  *) ac_try_echo=$ac_try;;
29571esac
29572eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29573$as_echo "$ac_try_echo"; } >&5
29574  (eval "$ac_link") 2>&5
29575  ac_status=$?
29576  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29577  test $ac_status = 0; }
29578  if { ac_try='./conftest$ac_cv_exeext'
29579  { { case "(($ac_try" in
29580  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29581  *) ac_try_echo=$ac_try;;
29582esac
29583eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29584$as_echo "$ac_try_echo"; } >&5
29585  (eval "$ac_try") 2>&5
29586  ac_status=$?
29587  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29588  test $ac_status = 0; }; }; then
29589    cross_compiling=no
29590  else
29591    if test "$cross_compiling" = maybe; then
29592	cross_compiling=yes
29593    else
29594	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29595$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29596as_fn_error $? "cannot run C compiled programs.
29597If you meant to cross compile, use \`--host'.
29598See \`config.log' for more details" "$LINENO" 5; }
29599    fi
29600  fi
29601fi
29602{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
29603$as_echo "$cross_compiling" >&6; }
29604
29605rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
29606ac_clean_files=$ac_clean_files_save
29607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
29608$as_echo_n "checking for suffix of object files... " >&6; }
29609if ${ac_cv_objext+:} false; then :
29610  $as_echo_n "(cached) " >&6
29611else
29612  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29613/* end confdefs.h.  */
29614
29615int
29616main ()
29617{
29618
29619  ;
29620  return 0;
29621}
29622_ACEOF
29623rm -f conftest.o conftest.obj
29624if { { ac_try="$ac_compile"
29625case "(($ac_try" in
29626  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29627  *) ac_try_echo=$ac_try;;
29628esac
29629eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29630$as_echo "$ac_try_echo"; } >&5
29631  (eval "$ac_compile") 2>&5
29632  ac_status=$?
29633  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29634  test $ac_status = 0; }; then :
29635  for ac_file in conftest.o conftest.obj conftest.*; do
29636  test -f "$ac_file" || continue;
29637  case $ac_file in
29638    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
29639    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
29640       break;;
29641  esac
29642done
29643else
29644  $as_echo "$as_me: failed program was:" >&5
29645sed 's/^/| /' conftest.$ac_ext >&5
29646
29647{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29648$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29649as_fn_error $? "cannot compute suffix of object files: cannot compile
29650See \`config.log' for more details" "$LINENO" 5; }
29651fi
29652rm -f conftest.$ac_cv_objext conftest.$ac_ext
29653fi
29654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
29655$as_echo "$ac_cv_objext" >&6; }
29656OBJEXT=$ac_cv_objext
29657ac_objext=$OBJEXT
29658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
29659$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
29660if ${ac_cv_c_compiler_gnu+:} false; then :
29661  $as_echo_n "(cached) " >&6
29662else
29663  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29664/* end confdefs.h.  */
29665
29666int
29667main ()
29668{
29669#ifndef __GNUC__
29670       choke me
29671#endif
29672
29673  ;
29674  return 0;
29675}
29676_ACEOF
29677if ac_fn_c_try_compile "$LINENO"; then :
29678  ac_compiler_gnu=yes
29679else
29680  ac_compiler_gnu=no
29681fi
29682rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29683ac_cv_c_compiler_gnu=$ac_compiler_gnu
29684
29685fi
29686{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
29687$as_echo "$ac_cv_c_compiler_gnu" >&6; }
29688if test $ac_compiler_gnu = yes; then
29689  GCC=yes
29690else
29691  GCC=
29692fi
29693ac_test_CFLAGS=${CFLAGS+set}
29694ac_save_CFLAGS=$CFLAGS
29695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
29696$as_echo_n "checking whether $CC accepts -g... " >&6; }
29697if ${ac_cv_prog_cc_g+:} false; then :
29698  $as_echo_n "(cached) " >&6
29699else
29700  ac_save_c_werror_flag=$ac_c_werror_flag
29701   ac_c_werror_flag=yes
29702   ac_cv_prog_cc_g=no
29703   CFLAGS="-g"
29704   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29705/* end confdefs.h.  */
29706
29707int
29708main ()
29709{
29710
29711  ;
29712  return 0;
29713}
29714_ACEOF
29715if ac_fn_c_try_compile "$LINENO"; then :
29716  ac_cv_prog_cc_g=yes
29717else
29718  CFLAGS=""
29719      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29720/* end confdefs.h.  */
29721
29722int
29723main ()
29724{
29725
29726  ;
29727  return 0;
29728}
29729_ACEOF
29730if ac_fn_c_try_compile "$LINENO"; then :
29731
29732else
29733  ac_c_werror_flag=$ac_save_c_werror_flag
29734	 CFLAGS="-g"
29735	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29736/* end confdefs.h.  */
29737
29738int
29739main ()
29740{
29741
29742  ;
29743  return 0;
29744}
29745_ACEOF
29746if ac_fn_c_try_compile "$LINENO"; then :
29747  ac_cv_prog_cc_g=yes
29748fi
29749rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29750fi
29751rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29752fi
29753rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29754   ac_c_werror_flag=$ac_save_c_werror_flag
29755fi
29756{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
29757$as_echo "$ac_cv_prog_cc_g" >&6; }
29758if test "$ac_test_CFLAGS" = set; then
29759  CFLAGS=$ac_save_CFLAGS
29760elif test $ac_cv_prog_cc_g = yes; then
29761  if test "$GCC" = yes; then
29762    CFLAGS="-g -O2"
29763  else
29764    CFLAGS="-g"
29765  fi
29766else
29767  if test "$GCC" = yes; then
29768    CFLAGS="-O2"
29769  else
29770    CFLAGS=
29771  fi
29772fi
29773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
29774$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
29775if ${ac_cv_prog_cc_c89+:} false; then :
29776  $as_echo_n "(cached) " >&6
29777else
29778  ac_cv_prog_cc_c89=no
29779ac_save_CC=$CC
29780cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29781/* end confdefs.h.  */
29782#include <stdarg.h>
29783#include <stdio.h>
29784struct stat;
29785/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
29786struct buf { int x; };
29787FILE * (*rcsopen) (struct buf *, struct stat *, int);
29788static char *e (p, i)
29789     char **p;
29790     int i;
29791{
29792  return p[i];
29793}
29794static char *f (char * (*g) (char **, int), char **p, ...)
29795{
29796  char *s;
29797  va_list v;
29798  va_start (v,p);
29799  s = g (p, va_arg (v,int));
29800  va_end (v);
29801  return s;
29802}
29803
29804/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
29805   function prototypes and stuff, but not '\xHH' hex character constants.
29806   These don't provoke an error unfortunately, instead are silently treated
29807   as 'x'.  The following induces an error, until -std is added to get
29808   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
29809   array size at least.  It's necessary to write '\x00'==0 to get something
29810   that's true only with -std.  */
29811int osf4_cc_array ['\x00' == 0 ? 1 : -1];
29812
29813/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
29814   inside strings and character constants.  */
29815#define FOO(x) 'x'
29816int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
29817
29818int test (int i, double x);
29819struct s1 {int (*f) (int a);};
29820struct s2 {int (*f) (double a);};
29821int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
29822int argc;
29823char **argv;
29824int
29825main ()
29826{
29827return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
29828  ;
29829  return 0;
29830}
29831_ACEOF
29832for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
29833	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
29834do
29835  CC="$ac_save_CC $ac_arg"
29836  if ac_fn_c_try_compile "$LINENO"; then :
29837  ac_cv_prog_cc_c89=$ac_arg
29838fi
29839rm -f core conftest.err conftest.$ac_objext
29840  test "x$ac_cv_prog_cc_c89" != "xno" && break
29841done
29842rm -f conftest.$ac_ext
29843CC=$ac_save_CC
29844
29845fi
29846# AC_CACHE_VAL
29847case "x$ac_cv_prog_cc_c89" in
29848  x)
29849    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
29850$as_echo "none needed" >&6; } ;;
29851  xno)
29852    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
29853$as_echo "unsupported" >&6; } ;;
29854  *)
29855    CC="$CC $ac_cv_prog_cc_c89"
29856    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
29857$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
29858esac
29859if test "x$ac_cv_prog_cc_c89" != xno; then :
29860
29861fi
29862
29863ac_ext=cpp
29864ac_cpp='$CXXCPP $CPPFLAGS'
29865ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29866ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29867ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29868
29869
29870
29871  COMPILER_NAME=C++
29872  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
29873
29874  if test "x$CXX" != x; then
29875    # User has supplied compiler name already, always let that override.
29876    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
29877$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
29878    if test "x`basename $CXX`" = "x$CXX"; then
29879      # A command without a complete path is provided, search $PATH.
29880
29881      for ac_prog in $CXX
29882do
29883  # Extract the first word of "$ac_prog", so it can be a program name with args.
29884set dummy $ac_prog; ac_word=$2
29885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29886$as_echo_n "checking for $ac_word... " >&6; }
29887if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29888  $as_echo_n "(cached) " >&6
29889else
29890  case $POTENTIAL_CXX in
29891  [\\/]* | ?:[\\/]*)
29892  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29893  ;;
29894  *)
29895  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29896for as_dir in $PATH
29897do
29898  IFS=$as_save_IFS
29899  test -z "$as_dir" && as_dir=.
29900    for ac_exec_ext in '' $ac_executable_extensions; do
29901  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29902    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29903    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29904    break 2
29905  fi
29906done
29907  done
29908IFS=$as_save_IFS
29909
29910  ;;
29911esac
29912fi
29913POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29914if test -n "$POTENTIAL_CXX"; then
29915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
29916$as_echo "$POTENTIAL_CXX" >&6; }
29917else
29918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29919$as_echo "no" >&6; }
29920fi
29921
29922
29923  test -n "$POTENTIAL_CXX" && break
29924done
29925
29926      if test "x$POTENTIAL_CXX" != x; then
29927        CXX=$POTENTIAL_CXX
29928      else
29929        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
29930      fi
29931    else
29932      # Otherwise it might already be a complete path
29933      if test ! -x "$CXX"; then
29934        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
29935      fi
29936    fi
29937  else
29938    # No user supplied value. Locate compiler ourselves.
29939
29940    # If we are cross compiling, assume cross compilation tools follows the
29941    # cross compilation standard where they are prefixed with the autoconf
29942    # standard name for the target. For example the binary
29943    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
29944    # If we are not cross compiling, then the default compiler name will be
29945    # used.
29946
29947    CXX=
29948    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
29949    # before checking the rest of the PATH.
29950    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
29951    # step, this should not be necessary.
29952    if test -n "$TOOLCHAIN_PATH"; then
29953      PATH_save="$PATH"
29954      PATH="$TOOLCHAIN_PATH"
29955      for ac_prog in $SEARCH_LIST
29956do
29957  # Extract the first word of "$ac_prog", so it can be a program name with args.
29958set dummy $ac_prog; ac_word=$2
29959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29960$as_echo_n "checking for $ac_word... " >&6; }
29961if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
29962  $as_echo_n "(cached) " >&6
29963else
29964  case $TOOLCHAIN_PATH_CXX in
29965  [\\/]* | ?:[\\/]*)
29966  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
29967  ;;
29968  *)
29969  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29970for as_dir in $PATH
29971do
29972  IFS=$as_save_IFS
29973  test -z "$as_dir" && as_dir=.
29974    for ac_exec_ext in '' $ac_executable_extensions; do
29975  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29976    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
29977    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29978    break 2
29979  fi
29980done
29981  done
29982IFS=$as_save_IFS
29983
29984  ;;
29985esac
29986fi
29987TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
29988if test -n "$TOOLCHAIN_PATH_CXX"; then
29989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
29990$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
29991else
29992  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29993$as_echo "no" >&6; }
29994fi
29995
29996
29997  test -n "$TOOLCHAIN_PATH_CXX" && break
29998done
29999
30000      CXX=$TOOLCHAIN_PATH_CXX
30001      PATH="$PATH_save"
30002    fi
30003
30004    # AC_PATH_PROGS can't be run multiple times with the same variable,
30005    # so create a new name for this run.
30006    if test "x$CXX" = x; then
30007      for ac_prog in $SEARCH_LIST
30008do
30009  # Extract the first word of "$ac_prog", so it can be a program name with args.
30010set dummy $ac_prog; ac_word=$2
30011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30012$as_echo_n "checking for $ac_word... " >&6; }
30013if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
30014  $as_echo_n "(cached) " >&6
30015else
30016  case $POTENTIAL_CXX in
30017  [\\/]* | ?:[\\/]*)
30018  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
30019  ;;
30020  *)
30021  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30022for as_dir in $PATH
30023do
30024  IFS=$as_save_IFS
30025  test -z "$as_dir" && as_dir=.
30026    for ac_exec_ext in '' $ac_executable_extensions; do
30027  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30028    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
30029    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30030    break 2
30031  fi
30032done
30033  done
30034IFS=$as_save_IFS
30035
30036  ;;
30037esac
30038fi
30039POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
30040if test -n "$POTENTIAL_CXX"; then
30041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
30042$as_echo "$POTENTIAL_CXX" >&6; }
30043else
30044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30045$as_echo "no" >&6; }
30046fi
30047
30048
30049  test -n "$POTENTIAL_CXX" && break
30050done
30051
30052      CXX=$POTENTIAL_CXX
30053    fi
30054
30055    if test "x$CXX" = x; then
30056
30057  # Print a helpful message on how to acquire the necessary build dependency.
30058  # devkit is the help tag: freetype, cups, pulse, alsa etc
30059  MISSING_DEPENDENCY=devkit
30060
30061  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30062    cygwin_help $MISSING_DEPENDENCY
30063  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30064    msys_help $MISSING_DEPENDENCY
30065  else
30066    PKGHANDLER_COMMAND=
30067
30068    case $PKGHANDLER in
30069      apt-get)
30070        apt_help     $MISSING_DEPENDENCY ;;
30071      yum)
30072        yum_help     $MISSING_DEPENDENCY ;;
30073      port)
30074        port_help    $MISSING_DEPENDENCY ;;
30075      pkgutil)
30076        pkgutil_help $MISSING_DEPENDENCY ;;
30077      pkgadd)
30078        pkgadd_help  $MISSING_DEPENDENCY ;;
30079    esac
30080
30081    if test "x$PKGHANDLER_COMMAND" != x; then
30082      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30083    fi
30084  fi
30085
30086      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
30087    fi
30088  fi
30089
30090  # Now we have a compiler binary in CXX. Make sure it's okay.
30091
30092  # Only process if variable expands to non-empty
30093
30094  if test "x$CXX" != x; then
30095    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30096
30097  # First separate the path from the arguments. This will split at the first
30098  # space.
30099  complete="$CXX"
30100  path="${complete%% *}"
30101  tmp="$complete EOL"
30102  arguments="${tmp#* }"
30103
30104  # Input might be given as Windows format, start by converting to
30105  # unix format.
30106  new_path=`$CYGPATH -u "$path"`
30107
30108  # Now try to locate executable using which
30109  new_path=`$WHICH "$new_path" 2> /dev/null`
30110  # bat and cmd files are not always considered executable in cygwin causing which
30111  # to not find them
30112  if test "x$new_path" = x \
30113      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30114      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30115    new_path=`$CYGPATH -u "$path"`
30116  fi
30117  if test "x$new_path" = x; then
30118    # Oops. Which didn't find the executable.
30119    # The splitting of arguments from the executable at a space might have been incorrect,
30120    # since paths with space are more likely in Windows. Give it another try with the whole
30121    # argument.
30122    path="$complete"
30123    arguments="EOL"
30124    new_path=`$CYGPATH -u "$path"`
30125    new_path=`$WHICH "$new_path" 2> /dev/null`
30126    # bat and cmd files are not always considered executable in cygwin causing which
30127    # to not find them
30128    if test "x$new_path" = x \
30129        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30130        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30131      new_path=`$CYGPATH -u "$path"`
30132    fi
30133    if test "x$new_path" = x; then
30134      # It's still not found. Now this is an unrecoverable error.
30135      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
30136$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
30137      has_space=`$ECHO "$complete" | $GREP " "`
30138      if test "x$has_space" != x; then
30139        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30140$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30141      fi
30142      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30143    fi
30144  fi
30145
30146  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30147  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30148  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30149  # "foo.exe" is OK but "foo" is an error.
30150  #
30151  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30152  # It is also a way to make sure we got the proper file name for the real test later on.
30153  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30154  if test "x$test_shortpath" = x; then
30155    # Short path failed, file does not exist as specified.
30156    # Try adding .exe or .cmd
30157    if test -f "${new_path}.exe"; then
30158      input_to_shortpath="${new_path}.exe"
30159    elif test -f "${new_path}.cmd"; then
30160      input_to_shortpath="${new_path}.cmd"
30161    else
30162      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
30163$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
30164      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30165$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30166      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30167    fi
30168  else
30169    input_to_shortpath="$new_path"
30170  fi
30171
30172  # Call helper function which possibly converts this using DOS-style short mode.
30173  # If so, the updated path is stored in $new_path.
30174  new_path="$input_to_shortpath"
30175
30176  input_path="$input_to_shortpath"
30177  # Check if we need to convert this using DOS-style short mode. If the path
30178  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30179  # take no chances and rewrite it.
30180  # Note: m4 eats our [], so we need to use [ and ] instead.
30181  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30182  if test "x$has_forbidden_chars" != x; then
30183    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30184    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30185    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30186    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30187      # Going to short mode and back again did indeed matter. Since short mode is
30188      # case insensitive, let's make it lowercase to improve readability.
30189      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30190      # Now convert it back to Unix-style (cygpath)
30191      input_path=`$CYGPATH -u "$shortmode_path"`
30192      new_path="$input_path"
30193    fi
30194  fi
30195
30196  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30197  if test "x$test_cygdrive_prefix" = x; then
30198    # As a simple fix, exclude /usr/bin since it's not a real path.
30199    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30200      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30201      # a path prefixed by /cygdrive for fixpath to work.
30202      new_path="$CYGWIN_ROOT_PATH$input_path"
30203    fi
30204  fi
30205
30206  # remove trailing .exe if any
30207  new_path="${new_path/%.exe/}"
30208
30209    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30210
30211  # First separate the path from the arguments. This will split at the first
30212  # space.
30213  complete="$CXX"
30214  path="${complete%% *}"
30215  tmp="$complete EOL"
30216  arguments="${tmp#* }"
30217
30218  # Input might be given as Windows format, start by converting to
30219  # unix format.
30220  new_path="$path"
30221
30222  windows_path="$new_path"
30223  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30224    unix_path=`$CYGPATH -u "$windows_path"`
30225    new_path="$unix_path"
30226  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30227    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30228    new_path="$unix_path"
30229  fi
30230
30231
30232  # Now try to locate executable using which
30233  new_path=`$WHICH "$new_path" 2> /dev/null`
30234
30235  if test "x$new_path" = x; then
30236    # Oops. Which didn't find the executable.
30237    # The splitting of arguments from the executable at a space might have been incorrect,
30238    # since paths with space are more likely in Windows. Give it another try with the whole
30239    # argument.
30240    path="$complete"
30241    arguments="EOL"
30242    new_path="$path"
30243
30244  windows_path="$new_path"
30245  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30246    unix_path=`$CYGPATH -u "$windows_path"`
30247    new_path="$unix_path"
30248  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30249    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30250    new_path="$unix_path"
30251  fi
30252
30253
30254    new_path=`$WHICH "$new_path" 2> /dev/null`
30255    # bat and cmd files are not always considered executable in MSYS causing which
30256    # to not find them
30257    if test "x$new_path" = x \
30258        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30259        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30260      new_path="$path"
30261
30262  windows_path="$new_path"
30263  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30264    unix_path=`$CYGPATH -u "$windows_path"`
30265    new_path="$unix_path"
30266  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30267    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30268    new_path="$unix_path"
30269  fi
30270
30271    fi
30272
30273    if test "x$new_path" = x; then
30274      # It's still not found. Now this is an unrecoverable error.
30275      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
30276$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
30277      has_space=`$ECHO "$complete" | $GREP " "`
30278      if test "x$has_space" != x; then
30279        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30280$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30281      fi
30282      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30283    fi
30284  fi
30285
30286  # Now new_path has a complete unix path to the binary
30287  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30288    # Keep paths in /bin as-is, but remove trailing .exe if any
30289    new_path="${new_path/%.exe/}"
30290    # Do not save /bin paths to all_fixpath_prefixes!
30291  else
30292    # Not in mixed or Windows style, start by that.
30293    new_path=`cmd //c echo $new_path`
30294
30295  input_path="$new_path"
30296  # Check if we need to convert this using DOS-style short mode. If the path
30297  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30298  # take no chances and rewrite it.
30299  # Note: m4 eats our [], so we need to use [ and ] instead.
30300  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30301  if test "x$has_forbidden_chars" != x; then
30302    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30303    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30304  fi
30305
30306    # Output is in $new_path
30307
30308  windows_path="$new_path"
30309  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30310    unix_path=`$CYGPATH -u "$windows_path"`
30311    new_path="$unix_path"
30312  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30313    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30314    new_path="$unix_path"
30315  fi
30316
30317    # remove trailing .exe if any
30318    new_path="${new_path/%.exe/}"
30319
30320    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30321    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30322  fi
30323
30324    else
30325      # We're on a unix platform. Hooray! :)
30326      # First separate the path from the arguments. This will split at the first
30327      # space.
30328      complete="$CXX"
30329      path="${complete%% *}"
30330      tmp="$complete EOL"
30331      arguments="${tmp#* }"
30332
30333      # Cannot rely on the command "which" here since it doesn't always work.
30334      is_absolute_path=`$ECHO "$path" | $GREP ^/`
30335      if test -z "$is_absolute_path"; then
30336        # Path to executable is not absolute. Find it.
30337        IFS_save="$IFS"
30338        IFS=:
30339        for p in $PATH; do
30340          if test -f "$p/$path" && test -x "$p/$path"; then
30341            new_path="$p/$path"
30342            break
30343          fi
30344        done
30345        IFS="$IFS_save"
30346      else
30347        # This is an absolute path, we can use it without further modifications.
30348        new_path="$path"
30349      fi
30350
30351      if test "x$new_path" = x; then
30352        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
30353$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
30354        has_space=`$ECHO "$complete" | $GREP " "`
30355        if test "x$has_space" != x; then
30356          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30357$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30358        fi
30359        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30360      fi
30361    fi
30362
30363    # Now join together the path and the arguments once again
30364    if test "x$arguments" != xEOL; then
30365      new_complete="$new_path ${arguments% *}"
30366    else
30367      new_complete="$new_path"
30368    fi
30369
30370    if test "x$complete" != "x$new_complete"; then
30371      CXX="$new_complete"
30372      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
30373$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
30374    fi
30375  fi
30376
30377  TEST_COMPILER="$CXX"
30378  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
30379  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
30380  if test "x$OPENJDK_BUILD_OS" != xaix; then
30381    # FIXME: This test should not be needed anymore; we don't do that for any platform.
30382    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
30383$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
30384
30385  if test "x$OPENJDK_BUILD_OS" != xwindows; then
30386    # Follow a chain of symbolic links. Use readlink
30387    # where it exists, else fall back to horribly
30388    # complicated shell code.
30389    if test "x$READLINK_TESTED" != yes; then
30390      # On MacOSX there is a readlink tool with a different
30391      # purpose than the GNU readlink tool. Check the found readlink.
30392      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
30393      if test "x$ISGNU" = x; then
30394        # A readlink that we do not know how to use.
30395        # Are there other non-GNU readlinks out there?
30396        READLINK_TESTED=yes
30397        READLINK=
30398      fi
30399    fi
30400
30401    if test "x$READLINK" != x; then
30402      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
30403    else
30404      # Save the current directory for restoring afterwards
30405      STARTDIR=$PWD
30406      COUNTER=0
30407      sym_link_dir=`$DIRNAME $TEST_COMPILER`
30408      sym_link_file=`$BASENAME $TEST_COMPILER`
30409      cd $sym_link_dir
30410      # Use -P flag to resolve symlinks in directories.
30411      cd `$THEPWDCMD -P`
30412      sym_link_dir=`$THEPWDCMD -P`
30413      # Resolve file symlinks
30414      while test $COUNTER -lt 20; do
30415        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
30416        if test "x$ISLINK" == x; then
30417          # This is not a symbolic link! We are done!
30418          break
30419        fi
30420        # Again resolve directory symlinks since the target of the just found
30421        # link could be in a different directory
30422        cd `$DIRNAME $ISLINK`
30423        sym_link_dir=`$THEPWDCMD -P`
30424        sym_link_file=`$BASENAME $ISLINK`
30425        let COUNTER=COUNTER+1
30426      done
30427      cd $STARTDIR
30428      TEST_COMPILER=$sym_link_dir/$sym_link_file
30429    fi
30430  fi
30431
30432    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
30433$as_echo "$TEST_COMPILER" >&6; }
30434  fi
30435  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
30436$as_echo_n "checking if CXX is disguised ccache... " >&6; }
30437
30438  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
30439  if test "x$COMPILER_BASENAME" = "xccache"; then
30440    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
30441$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
30442    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
30443    # We want to control ccache invocation ourselves, so ignore this cc and try
30444    # searching again.
30445
30446    # Remove the path to the fake ccache cc from the PATH
30447    RETRY_COMPILER_SAVED_PATH="$PATH"
30448    COMPILER_DIRNAME=`$DIRNAME $CXX`
30449    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
30450
30451    # Try again looking for our compiler
30452    if test -n "$ac_tool_prefix"; then
30453  for ac_prog in $TOOLCHAIN_CXX_BINARY
30454  do
30455    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
30456set dummy $ac_tool_prefix$ac_prog; ac_word=$2
30457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30458$as_echo_n "checking for $ac_word... " >&6; }
30459if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
30460  $as_echo_n "(cached) " >&6
30461else
30462  if test -n "$PROPER_COMPILER_CXX"; then
30463  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
30464else
30465as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30466for as_dir in $PATH
30467do
30468  IFS=$as_save_IFS
30469  test -z "$as_dir" && as_dir=.
30470    for ac_exec_ext in '' $ac_executable_extensions; do
30471  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30472    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
30473    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30474    break 2
30475  fi
30476done
30477  done
30478IFS=$as_save_IFS
30479
30480fi
30481fi
30482PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
30483if test -n "$PROPER_COMPILER_CXX"; then
30484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
30485$as_echo "$PROPER_COMPILER_CXX" >&6; }
30486else
30487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30488$as_echo "no" >&6; }
30489fi
30490
30491
30492    test -n "$PROPER_COMPILER_CXX" && break
30493  done
30494fi
30495if test -z "$PROPER_COMPILER_CXX"; then
30496  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
30497  for ac_prog in $TOOLCHAIN_CXX_BINARY
30498do
30499  # Extract the first word of "$ac_prog", so it can be a program name with args.
30500set dummy $ac_prog; ac_word=$2
30501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30502$as_echo_n "checking for $ac_word... " >&6; }
30503if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
30504  $as_echo_n "(cached) " >&6
30505else
30506  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
30507  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
30508else
30509as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30510for as_dir in $PATH
30511do
30512  IFS=$as_save_IFS
30513  test -z "$as_dir" && as_dir=.
30514    for ac_exec_ext in '' $ac_executable_extensions; do
30515  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30516    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
30517    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30518    break 2
30519  fi
30520done
30521  done
30522IFS=$as_save_IFS
30523
30524fi
30525fi
30526ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
30527if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
30528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
30529$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
30530else
30531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30532$as_echo "no" >&6; }
30533fi
30534
30535
30536  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
30537done
30538
30539  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
30540    PROPER_COMPILER_CXX=""
30541  else
30542    case $cross_compiling:$ac_tool_warned in
30543yes:)
30544{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30545$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30546ac_tool_warned=yes ;;
30547esac
30548    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
30549  fi
30550fi
30551
30552
30553  # Only process if variable expands to non-empty
30554
30555  if test "x$PROPER_COMPILER_CXX" != x; then
30556    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30557
30558  # First separate the path from the arguments. This will split at the first
30559  # space.
30560  complete="$PROPER_COMPILER_CXX"
30561  path="${complete%% *}"
30562  tmp="$complete EOL"
30563  arguments="${tmp#* }"
30564
30565  # Input might be given as Windows format, start by converting to
30566  # unix format.
30567  new_path=`$CYGPATH -u "$path"`
30568
30569  # Now try to locate executable using which
30570  new_path=`$WHICH "$new_path" 2> /dev/null`
30571  # bat and cmd files are not always considered executable in cygwin causing which
30572  # to not find them
30573  if test "x$new_path" = x \
30574      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30575      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30576    new_path=`$CYGPATH -u "$path"`
30577  fi
30578  if test "x$new_path" = x; then
30579    # Oops. Which didn't find the executable.
30580    # The splitting of arguments from the executable at a space might have been incorrect,
30581    # since paths with space are more likely in Windows. Give it another try with the whole
30582    # argument.
30583    path="$complete"
30584    arguments="EOL"
30585    new_path=`$CYGPATH -u "$path"`
30586    new_path=`$WHICH "$new_path" 2> /dev/null`
30587    # bat and cmd files are not always considered executable in cygwin causing which
30588    # to not find them
30589    if test "x$new_path" = x \
30590        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30591        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30592      new_path=`$CYGPATH -u "$path"`
30593    fi
30594    if test "x$new_path" = x; then
30595      # It's still not found. Now this is an unrecoverable error.
30596      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30597$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30598      has_space=`$ECHO "$complete" | $GREP " "`
30599      if test "x$has_space" != x; then
30600        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30601$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30602      fi
30603      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30604    fi
30605  fi
30606
30607  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30608  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30609  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30610  # "foo.exe" is OK but "foo" is an error.
30611  #
30612  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30613  # It is also a way to make sure we got the proper file name for the real test later on.
30614  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30615  if test "x$test_shortpath" = x; then
30616    # Short path failed, file does not exist as specified.
30617    # Try adding .exe or .cmd
30618    if test -f "${new_path}.exe"; then
30619      input_to_shortpath="${new_path}.exe"
30620    elif test -f "${new_path}.cmd"; then
30621      input_to_shortpath="${new_path}.cmd"
30622    else
30623      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
30624$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
30625      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30626$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30627      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30628    fi
30629  else
30630    input_to_shortpath="$new_path"
30631  fi
30632
30633  # Call helper function which possibly converts this using DOS-style short mode.
30634  # If so, the updated path is stored in $new_path.
30635  new_path="$input_to_shortpath"
30636
30637  input_path="$input_to_shortpath"
30638  # Check if we need to convert this using DOS-style short mode. If the path
30639  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30640  # take no chances and rewrite it.
30641  # Note: m4 eats our [], so we need to use [ and ] instead.
30642  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30643  if test "x$has_forbidden_chars" != x; then
30644    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30645    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30646    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30647    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30648      # Going to short mode and back again did indeed matter. Since short mode is
30649      # case insensitive, let's make it lowercase to improve readability.
30650      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30651      # Now convert it back to Unix-style (cygpath)
30652      input_path=`$CYGPATH -u "$shortmode_path"`
30653      new_path="$input_path"
30654    fi
30655  fi
30656
30657  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30658  if test "x$test_cygdrive_prefix" = x; then
30659    # As a simple fix, exclude /usr/bin since it's not a real path.
30660    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30661      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30662      # a path prefixed by /cygdrive for fixpath to work.
30663      new_path="$CYGWIN_ROOT_PATH$input_path"
30664    fi
30665  fi
30666
30667  # remove trailing .exe if any
30668  new_path="${new_path/%.exe/}"
30669
30670    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30671
30672  # First separate the path from the arguments. This will split at the first
30673  # space.
30674  complete="$PROPER_COMPILER_CXX"
30675  path="${complete%% *}"
30676  tmp="$complete EOL"
30677  arguments="${tmp#* }"
30678
30679  # Input might be given as Windows format, start by converting to
30680  # unix format.
30681  new_path="$path"
30682
30683  windows_path="$new_path"
30684  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30685    unix_path=`$CYGPATH -u "$windows_path"`
30686    new_path="$unix_path"
30687  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30688    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30689    new_path="$unix_path"
30690  fi
30691
30692
30693  # Now try to locate executable using which
30694  new_path=`$WHICH "$new_path" 2> /dev/null`
30695
30696  if test "x$new_path" = x; then
30697    # Oops. Which didn't find the executable.
30698    # The splitting of arguments from the executable at a space might have been incorrect,
30699    # since paths with space are more likely in Windows. Give it another try with the whole
30700    # argument.
30701    path="$complete"
30702    arguments="EOL"
30703    new_path="$path"
30704
30705  windows_path="$new_path"
30706  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30707    unix_path=`$CYGPATH -u "$windows_path"`
30708    new_path="$unix_path"
30709  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30710    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30711    new_path="$unix_path"
30712  fi
30713
30714
30715    new_path=`$WHICH "$new_path" 2> /dev/null`
30716    # bat and cmd files are not always considered executable in MSYS causing which
30717    # to not find them
30718    if test "x$new_path" = x \
30719        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30720        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30721      new_path="$path"
30722
30723  windows_path="$new_path"
30724  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30725    unix_path=`$CYGPATH -u "$windows_path"`
30726    new_path="$unix_path"
30727  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30728    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30729    new_path="$unix_path"
30730  fi
30731
30732    fi
30733
30734    if test "x$new_path" = x; then
30735      # It's still not found. Now this is an unrecoverable error.
30736      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30737$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30738      has_space=`$ECHO "$complete" | $GREP " "`
30739      if test "x$has_space" != x; then
30740        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30741$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30742      fi
30743      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30744    fi
30745  fi
30746
30747  # Now new_path has a complete unix path to the binary
30748  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30749    # Keep paths in /bin as-is, but remove trailing .exe if any
30750    new_path="${new_path/%.exe/}"
30751    # Do not save /bin paths to all_fixpath_prefixes!
30752  else
30753    # Not in mixed or Windows style, start by that.
30754    new_path=`cmd //c echo $new_path`
30755
30756  input_path="$new_path"
30757  # Check if we need to convert this using DOS-style short mode. If the path
30758  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30759  # take no chances and rewrite it.
30760  # Note: m4 eats our [], so we need to use [ and ] instead.
30761  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30762  if test "x$has_forbidden_chars" != x; then
30763    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30764    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30765  fi
30766
30767    # Output is in $new_path
30768
30769  windows_path="$new_path"
30770  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30771    unix_path=`$CYGPATH -u "$windows_path"`
30772    new_path="$unix_path"
30773  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30774    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30775    new_path="$unix_path"
30776  fi
30777
30778    # remove trailing .exe if any
30779    new_path="${new_path/%.exe/}"
30780
30781    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30782    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30783  fi
30784
30785    else
30786      # We're on a unix platform. Hooray! :)
30787      # First separate the path from the arguments. This will split at the first
30788      # space.
30789      complete="$PROPER_COMPILER_CXX"
30790      path="${complete%% *}"
30791      tmp="$complete EOL"
30792      arguments="${tmp#* }"
30793
30794      # Cannot rely on the command "which" here since it doesn't always work.
30795      is_absolute_path=`$ECHO "$path" | $GREP ^/`
30796      if test -z "$is_absolute_path"; then
30797        # Path to executable is not absolute. Find it.
30798        IFS_save="$IFS"
30799        IFS=:
30800        for p in $PATH; do
30801          if test -f "$p/$path" && test -x "$p/$path"; then
30802            new_path="$p/$path"
30803            break
30804          fi
30805        done
30806        IFS="$IFS_save"
30807      else
30808        # This is an absolute path, we can use it without further modifications.
30809        new_path="$path"
30810      fi
30811
30812      if test "x$new_path" = x; then
30813        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30814$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30815        has_space=`$ECHO "$complete" | $GREP " "`
30816        if test "x$has_space" != x; then
30817          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30818$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30819        fi
30820        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30821      fi
30822    fi
30823
30824    # Now join together the path and the arguments once again
30825    if test "x$arguments" != xEOL; then
30826      new_complete="$new_path ${arguments% *}"
30827    else
30828      new_complete="$new_path"
30829    fi
30830
30831    if test "x$complete" != "x$new_complete"; then
30832      PROPER_COMPILER_CXX="$new_complete"
30833      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
30834$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
30835    fi
30836  fi
30837
30838    PATH="$RETRY_COMPILER_SAVED_PATH"
30839
30840    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
30841$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
30842
30843  if test "x$OPENJDK_BUILD_OS" != xwindows; then
30844    # Follow a chain of symbolic links. Use readlink
30845    # where it exists, else fall back to horribly
30846    # complicated shell code.
30847    if test "x$READLINK_TESTED" != yes; then
30848      # On MacOSX there is a readlink tool with a different
30849      # purpose than the GNU readlink tool. Check the found readlink.
30850      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
30851      if test "x$ISGNU" = x; then
30852        # A readlink that we do not know how to use.
30853        # Are there other non-GNU readlinks out there?
30854        READLINK_TESTED=yes
30855        READLINK=
30856      fi
30857    fi
30858
30859    if test "x$READLINK" != x; then
30860      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
30861    else
30862      # Save the current directory for restoring afterwards
30863      STARTDIR=$PWD
30864      COUNTER=0
30865      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
30866      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
30867      cd $sym_link_dir
30868      # Use -P flag to resolve symlinks in directories.
30869      cd `$THEPWDCMD -P`
30870      sym_link_dir=`$THEPWDCMD -P`
30871      # Resolve file symlinks
30872      while test $COUNTER -lt 20; do
30873        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
30874        if test "x$ISLINK" == x; then
30875          # This is not a symbolic link! We are done!
30876          break
30877        fi
30878        # Again resolve directory symlinks since the target of the just found
30879        # link could be in a different directory
30880        cd `$DIRNAME $ISLINK`
30881        sym_link_dir=`$THEPWDCMD -P`
30882        sym_link_file=`$BASENAME $ISLINK`
30883        let COUNTER=COUNTER+1
30884      done
30885      cd $STARTDIR
30886      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
30887    fi
30888  fi
30889
30890    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
30891$as_echo "$PROPER_COMPILER_CXX" >&6; }
30892    CXX="$PROPER_COMPILER_CXX"
30893  else
30894    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
30895$as_echo "no, keeping CXX" >&6; }
30896  fi
30897
30898
30899  COMPILER=$CXX
30900  COMPILER_NAME=$COMPILER_NAME
30901
30902  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
30903    # cc -V output typically looks like
30904    #     cc: Sun C 5.12 Linux_i386 2011/11/16
30905    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
30906    # Check that this is likely to be the Solaris Studio cc.
30907    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
30908    if test $? -ne 0; then
30909      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30910      { $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
30911$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30912      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30913$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30914      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30915$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30916      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30917    fi
30918    # Remove usage instructions (if present), and
30919    # collapse compiler output into a single line
30920    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30921        $SED -e 's/ *[Uu]sage:.*//'`
30922    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30923        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
30924  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
30925    # xlc -qversion output typically looks like
30926    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
30927    #     Version: 11.01.0000.0015
30928    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
30929    # Check that this is likely to be the IBM XL C compiler.
30930    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
30931    if test $? -ne 0; then
30932      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30933      { $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
30934$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30935      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30936$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30937      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30938$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30939      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30940    fi
30941    # Collapse compiler output into a single line
30942    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30943    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30944        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
30945  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
30946    # There is no specific version flag, but all output starts with a version string.
30947    # First line typically looks something like:
30948    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
30949    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
30950    # Check that this is likely to be Microsoft CL.EXE.
30951    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
30952    if test $? -ne 0; then
30953      { $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
30954$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30955      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30956$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30957      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30958    fi
30959    # Collapse compiler output into a single line
30960    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30961    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30962        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
30963  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
30964    # gcc --version output typically looks like
30965    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
30966    #     Copyright (C) 2013 Free Software Foundation, Inc.
30967    #     This is free software; see the source for copying conditions.  There is NO
30968    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
30969    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30970    # Check that this is likely to be GCC.
30971    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
30972    if test $? -ne 0; then
30973      { $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
30974$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30975      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
30976$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
30977      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30978    fi
30979    # Remove Copyright and legalese from version string, and
30980    # collapse into a single line
30981    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30982        $SED -e 's/ *Copyright .*//'`
30983    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30984        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
30985  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
30986    # clang --version output typically looks like
30987    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
30988    #    clang version 3.3 (tags/RELEASE_33/final)
30989    # or
30990    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
30991    #    Target: x86_64-pc-linux-gnu
30992    #    Thread model: posix
30993    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30994    # Check that this is likely to be clang
30995    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
30996    if test $? -ne 0; then
30997      { $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
30998$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30999      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31000$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31001      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31002    fi
31003    # Collapse compiler output into a single line
31004    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
31005    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31006        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
31007  else
31008      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
31009  fi
31010  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
31011  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
31012  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
31013  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
31014
31015  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
31016$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
31017
31018
31019  # Now that we have resolved CXX ourself, let autoconf have its go at it
31020  ac_ext=cpp
31021ac_cpp='$CXXCPP $CPPFLAGS'
31022ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31023ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31024ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31025if test -z "$CXX"; then
31026  if test -n "$CCC"; then
31027    CXX=$CCC
31028  else
31029    if test -n "$ac_tool_prefix"; then
31030  for ac_prog in $CXX
31031  do
31032    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
31033set dummy $ac_tool_prefix$ac_prog; ac_word=$2
31034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31035$as_echo_n "checking for $ac_word... " >&6; }
31036if ${ac_cv_prog_CXX+:} false; then :
31037  $as_echo_n "(cached) " >&6
31038else
31039  if test -n "$CXX"; then
31040  ac_cv_prog_CXX="$CXX" # Let the user override the test.
31041else
31042as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31043for as_dir in $PATH
31044do
31045  IFS=$as_save_IFS
31046  test -z "$as_dir" && as_dir=.
31047    for ac_exec_ext in '' $ac_executable_extensions; do
31048  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31049    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
31050    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31051    break 2
31052  fi
31053done
31054  done
31055IFS=$as_save_IFS
31056
31057fi
31058fi
31059CXX=$ac_cv_prog_CXX
31060if test -n "$CXX"; then
31061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
31062$as_echo "$CXX" >&6; }
31063else
31064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31065$as_echo "no" >&6; }
31066fi
31067
31068
31069    test -n "$CXX" && break
31070  done
31071fi
31072if test -z "$CXX"; then
31073  ac_ct_CXX=$CXX
31074  for ac_prog in $CXX
31075do
31076  # Extract the first word of "$ac_prog", so it can be a program name with args.
31077set dummy $ac_prog; ac_word=$2
31078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31079$as_echo_n "checking for $ac_word... " >&6; }
31080if ${ac_cv_prog_ac_ct_CXX+:} false; then :
31081  $as_echo_n "(cached) " >&6
31082else
31083  if test -n "$ac_ct_CXX"; then
31084  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
31085else
31086as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31087for as_dir in $PATH
31088do
31089  IFS=$as_save_IFS
31090  test -z "$as_dir" && as_dir=.
31091    for ac_exec_ext in '' $ac_executable_extensions; do
31092  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31093    ac_cv_prog_ac_ct_CXX="$ac_prog"
31094    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31095    break 2
31096  fi
31097done
31098  done
31099IFS=$as_save_IFS
31100
31101fi
31102fi
31103ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
31104if test -n "$ac_ct_CXX"; then
31105  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
31106$as_echo "$ac_ct_CXX" >&6; }
31107else
31108  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31109$as_echo "no" >&6; }
31110fi
31111
31112
31113  test -n "$ac_ct_CXX" && break
31114done
31115
31116  if test "x$ac_ct_CXX" = x; then
31117    CXX="g++"
31118  else
31119    case $cross_compiling:$ac_tool_warned in
31120yes:)
31121{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
31122$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
31123ac_tool_warned=yes ;;
31124esac
31125    CXX=$ac_ct_CXX
31126  fi
31127fi
31128
31129  fi
31130fi
31131# Provide some information about the compiler.
31132$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
31133set X $ac_compile
31134ac_compiler=$2
31135for ac_option in --version -v -V -qversion; do
31136  { { ac_try="$ac_compiler $ac_option >&5"
31137case "(($ac_try" in
31138  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
31139  *) ac_try_echo=$ac_try;;
31140esac
31141eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
31142$as_echo "$ac_try_echo"; } >&5
31143  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
31144  ac_status=$?
31145  if test -s conftest.err; then
31146    sed '10a\
31147... rest of stderr output deleted ...
31148         10q' conftest.err >conftest.er1
31149    cat conftest.er1 >&5
31150  fi
31151  rm -f conftest.er1 conftest.err
31152  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31153  test $ac_status = 0; }
31154done
31155
31156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
31157$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
31158if ${ac_cv_cxx_compiler_gnu+:} false; then :
31159  $as_echo_n "(cached) " >&6
31160else
31161  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31162/* end confdefs.h.  */
31163
31164int
31165main ()
31166{
31167#ifndef __GNUC__
31168       choke me
31169#endif
31170
31171  ;
31172  return 0;
31173}
31174_ACEOF
31175if ac_fn_cxx_try_compile "$LINENO"; then :
31176  ac_compiler_gnu=yes
31177else
31178  ac_compiler_gnu=no
31179fi
31180rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31181ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
31182
31183fi
31184{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
31185$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
31186if test $ac_compiler_gnu = yes; then
31187  GXX=yes
31188else
31189  GXX=
31190fi
31191ac_test_CXXFLAGS=${CXXFLAGS+set}
31192ac_save_CXXFLAGS=$CXXFLAGS
31193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
31194$as_echo_n "checking whether $CXX accepts -g... " >&6; }
31195if ${ac_cv_prog_cxx_g+:} false; then :
31196  $as_echo_n "(cached) " >&6
31197else
31198  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
31199   ac_cxx_werror_flag=yes
31200   ac_cv_prog_cxx_g=no
31201   CXXFLAGS="-g"
31202   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31203/* end confdefs.h.  */
31204
31205int
31206main ()
31207{
31208
31209  ;
31210  return 0;
31211}
31212_ACEOF
31213if ac_fn_cxx_try_compile "$LINENO"; then :
31214  ac_cv_prog_cxx_g=yes
31215else
31216  CXXFLAGS=""
31217      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31218/* end confdefs.h.  */
31219
31220int
31221main ()
31222{
31223
31224  ;
31225  return 0;
31226}
31227_ACEOF
31228if ac_fn_cxx_try_compile "$LINENO"; then :
31229
31230else
31231  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
31232	 CXXFLAGS="-g"
31233	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31234/* end confdefs.h.  */
31235
31236int
31237main ()
31238{
31239
31240  ;
31241  return 0;
31242}
31243_ACEOF
31244if ac_fn_cxx_try_compile "$LINENO"; then :
31245  ac_cv_prog_cxx_g=yes
31246fi
31247rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31248fi
31249rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31250fi
31251rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31252   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
31253fi
31254{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
31255$as_echo "$ac_cv_prog_cxx_g" >&6; }
31256if test "$ac_test_CXXFLAGS" = set; then
31257  CXXFLAGS=$ac_save_CXXFLAGS
31258elif test $ac_cv_prog_cxx_g = yes; then
31259  if test "$GXX" = yes; then
31260    CXXFLAGS="-g -O2"
31261  else
31262    CXXFLAGS="-g"
31263  fi
31264else
31265  if test "$GXX" = yes; then
31266    CXXFLAGS="-O2"
31267  else
31268    CXXFLAGS=
31269  fi
31270fi
31271ac_ext=cpp
31272ac_cpp='$CXXCPP $CPPFLAGS'
31273ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31274ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31275ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31276
31277
31278  #
31279  # Setup the preprocessor (CPP and CXXCPP)
31280  #
31281  ac_ext=c
31282ac_cpp='$CPP $CPPFLAGS'
31283ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31284ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31285ac_compiler_gnu=$ac_cv_c_compiler_gnu
31286{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
31287$as_echo_n "checking how to run the C preprocessor... " >&6; }
31288# On Suns, sometimes $CPP names a directory.
31289if test -n "$CPP" && test -d "$CPP"; then
31290  CPP=
31291fi
31292if test -z "$CPP"; then
31293  if ${ac_cv_prog_CPP+:} false; then :
31294  $as_echo_n "(cached) " >&6
31295else
31296      # Double quotes because CPP needs to be expanded
31297    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
31298    do
31299      ac_preproc_ok=false
31300for ac_c_preproc_warn_flag in '' yes
31301do
31302  # Use a header file that comes with gcc, so configuring glibc
31303  # with a fresh cross-compiler works.
31304  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31305  # <limits.h> exists even on freestanding compilers.
31306  # On the NeXT, cc -E runs the code through the compiler's parser,
31307  # not just through cpp. "Syntax error" is here to catch this case.
31308  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31309/* end confdefs.h.  */
31310#ifdef __STDC__
31311# include <limits.h>
31312#else
31313# include <assert.h>
31314#endif
31315		     Syntax error
31316_ACEOF
31317if ac_fn_c_try_cpp "$LINENO"; then :
31318
31319else
31320  # Broken: fails on valid input.
31321continue
31322fi
31323rm -f conftest.err conftest.i conftest.$ac_ext
31324
31325  # OK, works on sane cases.  Now check whether nonexistent headers
31326  # can be detected and how.
31327  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31328/* end confdefs.h.  */
31329#include <ac_nonexistent.h>
31330_ACEOF
31331if ac_fn_c_try_cpp "$LINENO"; then :
31332  # Broken: success on invalid input.
31333continue
31334else
31335  # Passes both tests.
31336ac_preproc_ok=:
31337break
31338fi
31339rm -f conftest.err conftest.i conftest.$ac_ext
31340
31341done
31342# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31343rm -f conftest.i conftest.err conftest.$ac_ext
31344if $ac_preproc_ok; then :
31345  break
31346fi
31347
31348    done
31349    ac_cv_prog_CPP=$CPP
31350
31351fi
31352  CPP=$ac_cv_prog_CPP
31353else
31354  ac_cv_prog_CPP=$CPP
31355fi
31356{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
31357$as_echo "$CPP" >&6; }
31358ac_preproc_ok=false
31359for ac_c_preproc_warn_flag in '' yes
31360do
31361  # Use a header file that comes with gcc, so configuring glibc
31362  # with a fresh cross-compiler works.
31363  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31364  # <limits.h> exists even on freestanding compilers.
31365  # On the NeXT, cc -E runs the code through the compiler's parser,
31366  # not just through cpp. "Syntax error" is here to catch this case.
31367  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31368/* end confdefs.h.  */
31369#ifdef __STDC__
31370# include <limits.h>
31371#else
31372# include <assert.h>
31373#endif
31374		     Syntax error
31375_ACEOF
31376if ac_fn_c_try_cpp "$LINENO"; then :
31377
31378else
31379  # Broken: fails on valid input.
31380continue
31381fi
31382rm -f conftest.err conftest.i conftest.$ac_ext
31383
31384  # OK, works on sane cases.  Now check whether nonexistent headers
31385  # can be detected and how.
31386  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31387/* end confdefs.h.  */
31388#include <ac_nonexistent.h>
31389_ACEOF
31390if ac_fn_c_try_cpp "$LINENO"; then :
31391  # Broken: success on invalid input.
31392continue
31393else
31394  # Passes both tests.
31395ac_preproc_ok=:
31396break
31397fi
31398rm -f conftest.err conftest.i conftest.$ac_ext
31399
31400done
31401# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31402rm -f conftest.i conftest.err conftest.$ac_ext
31403if $ac_preproc_ok; then :
31404
31405else
31406  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
31407$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
31408as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
31409See \`config.log' for more details" "$LINENO" 5; }
31410fi
31411
31412ac_ext=cpp
31413ac_cpp='$CXXCPP $CPPFLAGS'
31414ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31415ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31416ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31417
31418
31419  # Only process if variable expands to non-empty
31420
31421  if test "x$CPP" != x; then
31422    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31423
31424  # First separate the path from the arguments. This will split at the first
31425  # space.
31426  complete="$CPP"
31427  path="${complete%% *}"
31428  tmp="$complete EOL"
31429  arguments="${tmp#* }"
31430
31431  # Input might be given as Windows format, start by converting to
31432  # unix format.
31433  new_path=`$CYGPATH -u "$path"`
31434
31435  # Now try to locate executable using which
31436  new_path=`$WHICH "$new_path" 2> /dev/null`
31437  # bat and cmd files are not always considered executable in cygwin causing which
31438  # to not find them
31439  if test "x$new_path" = x \
31440      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31441      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31442    new_path=`$CYGPATH -u "$path"`
31443  fi
31444  if test "x$new_path" = x; then
31445    # Oops. Which didn't find the executable.
31446    # The splitting of arguments from the executable at a space might have been incorrect,
31447    # since paths with space are more likely in Windows. Give it another try with the whole
31448    # argument.
31449    path="$complete"
31450    arguments="EOL"
31451    new_path=`$CYGPATH -u "$path"`
31452    new_path=`$WHICH "$new_path" 2> /dev/null`
31453    # bat and cmd files are not always considered executable in cygwin causing which
31454    # to not find them
31455    if test "x$new_path" = x \
31456        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31457        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31458      new_path=`$CYGPATH -u "$path"`
31459    fi
31460    if test "x$new_path" = x; then
31461      # It's still not found. Now this is an unrecoverable error.
31462      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31463$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31464      has_space=`$ECHO "$complete" | $GREP " "`
31465      if test "x$has_space" != x; then
31466        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31467$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31468      fi
31469      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31470    fi
31471  fi
31472
31473  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31474  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31475  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31476  # "foo.exe" is OK but "foo" is an error.
31477  #
31478  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31479  # It is also a way to make sure we got the proper file name for the real test later on.
31480  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31481  if test "x$test_shortpath" = x; then
31482    # Short path failed, file does not exist as specified.
31483    # Try adding .exe or .cmd
31484    if test -f "${new_path}.exe"; then
31485      input_to_shortpath="${new_path}.exe"
31486    elif test -f "${new_path}.cmd"; then
31487      input_to_shortpath="${new_path}.cmd"
31488    else
31489      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
31490$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
31491      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31492$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31493      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31494    fi
31495  else
31496    input_to_shortpath="$new_path"
31497  fi
31498
31499  # Call helper function which possibly converts this using DOS-style short mode.
31500  # If so, the updated path is stored in $new_path.
31501  new_path="$input_to_shortpath"
31502
31503  input_path="$input_to_shortpath"
31504  # Check if we need to convert this using DOS-style short mode. If the path
31505  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31506  # take no chances and rewrite it.
31507  # Note: m4 eats our [], so we need to use [ and ] instead.
31508  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31509  if test "x$has_forbidden_chars" != x; then
31510    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31511    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31512    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31513    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31514      # Going to short mode and back again did indeed matter. Since short mode is
31515      # case insensitive, let's make it lowercase to improve readability.
31516      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31517      # Now convert it back to Unix-style (cygpath)
31518      input_path=`$CYGPATH -u "$shortmode_path"`
31519      new_path="$input_path"
31520    fi
31521  fi
31522
31523  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31524  if test "x$test_cygdrive_prefix" = x; then
31525    # As a simple fix, exclude /usr/bin since it's not a real path.
31526    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31527      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31528      # a path prefixed by /cygdrive for fixpath to work.
31529      new_path="$CYGWIN_ROOT_PATH$input_path"
31530    fi
31531  fi
31532
31533  # remove trailing .exe if any
31534  new_path="${new_path/%.exe/}"
31535
31536    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31537
31538  # First separate the path from the arguments. This will split at the first
31539  # space.
31540  complete="$CPP"
31541  path="${complete%% *}"
31542  tmp="$complete EOL"
31543  arguments="${tmp#* }"
31544
31545  # Input might be given as Windows format, start by converting to
31546  # unix format.
31547  new_path="$path"
31548
31549  windows_path="$new_path"
31550  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31551    unix_path=`$CYGPATH -u "$windows_path"`
31552    new_path="$unix_path"
31553  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31554    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31555    new_path="$unix_path"
31556  fi
31557
31558
31559  # Now try to locate executable using which
31560  new_path=`$WHICH "$new_path" 2> /dev/null`
31561
31562  if test "x$new_path" = x; then
31563    # Oops. Which didn't find the executable.
31564    # The splitting of arguments from the executable at a space might have been incorrect,
31565    # since paths with space are more likely in Windows. Give it another try with the whole
31566    # argument.
31567    path="$complete"
31568    arguments="EOL"
31569    new_path="$path"
31570
31571  windows_path="$new_path"
31572  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31573    unix_path=`$CYGPATH -u "$windows_path"`
31574    new_path="$unix_path"
31575  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31576    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31577    new_path="$unix_path"
31578  fi
31579
31580
31581    new_path=`$WHICH "$new_path" 2> /dev/null`
31582    # bat and cmd files are not always considered executable in MSYS causing which
31583    # to not find them
31584    if test "x$new_path" = x \
31585        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31586        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31587      new_path="$path"
31588
31589  windows_path="$new_path"
31590  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31591    unix_path=`$CYGPATH -u "$windows_path"`
31592    new_path="$unix_path"
31593  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31594    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31595    new_path="$unix_path"
31596  fi
31597
31598    fi
31599
31600    if test "x$new_path" = x; then
31601      # It's still not found. Now this is an unrecoverable error.
31602      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31603$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31604      has_space=`$ECHO "$complete" | $GREP " "`
31605      if test "x$has_space" != x; then
31606        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31607$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31608      fi
31609      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31610    fi
31611  fi
31612
31613  # Now new_path has a complete unix path to the binary
31614  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31615    # Keep paths in /bin as-is, but remove trailing .exe if any
31616    new_path="${new_path/%.exe/}"
31617    # Do not save /bin paths to all_fixpath_prefixes!
31618  else
31619    # Not in mixed or Windows style, start by that.
31620    new_path=`cmd //c echo $new_path`
31621
31622  input_path="$new_path"
31623  # Check if we need to convert this using DOS-style short mode. If the path
31624  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31625  # take no chances and rewrite it.
31626  # Note: m4 eats our [], so we need to use [ and ] instead.
31627  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31628  if test "x$has_forbidden_chars" != x; then
31629    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31630    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31631  fi
31632
31633    # Output is in $new_path
31634
31635  windows_path="$new_path"
31636  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31637    unix_path=`$CYGPATH -u "$windows_path"`
31638    new_path="$unix_path"
31639  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31640    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31641    new_path="$unix_path"
31642  fi
31643
31644    # remove trailing .exe if any
31645    new_path="${new_path/%.exe/}"
31646
31647    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31648    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31649  fi
31650
31651    else
31652      # We're on a unix platform. Hooray! :)
31653      # First separate the path from the arguments. This will split at the first
31654      # space.
31655      complete="$CPP"
31656      path="${complete%% *}"
31657      tmp="$complete EOL"
31658      arguments="${tmp#* }"
31659
31660      # Cannot rely on the command "which" here since it doesn't always work.
31661      is_absolute_path=`$ECHO "$path" | $GREP ^/`
31662      if test -z "$is_absolute_path"; then
31663        # Path to executable is not absolute. Find it.
31664        IFS_save="$IFS"
31665        IFS=:
31666        for p in $PATH; do
31667          if test -f "$p/$path" && test -x "$p/$path"; then
31668            new_path="$p/$path"
31669            break
31670          fi
31671        done
31672        IFS="$IFS_save"
31673      else
31674        # This is an absolute path, we can use it without further modifications.
31675        new_path="$path"
31676      fi
31677
31678      if test "x$new_path" = x; then
31679        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31680$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31681        has_space=`$ECHO "$complete" | $GREP " "`
31682        if test "x$has_space" != x; then
31683          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31684$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31685        fi
31686        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31687      fi
31688    fi
31689
31690    # Now join together the path and the arguments once again
31691    if test "x$arguments" != xEOL; then
31692      new_complete="$new_path ${arguments% *}"
31693    else
31694      new_complete="$new_path"
31695    fi
31696
31697    if test "x$complete" != "x$new_complete"; then
31698      CPP="$new_complete"
31699      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
31700$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
31701    fi
31702  fi
31703
31704  ac_ext=cpp
31705ac_cpp='$CXXCPP $CPPFLAGS'
31706ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31707ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31708ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
31710$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
31711if test -z "$CXXCPP"; then
31712  if ${ac_cv_prog_CXXCPP+:} false; then :
31713  $as_echo_n "(cached) " >&6
31714else
31715      # Double quotes because CXXCPP needs to be expanded
31716    for CXXCPP in "$CXX -E" "/lib/cpp"
31717    do
31718      ac_preproc_ok=false
31719for ac_cxx_preproc_warn_flag in '' yes
31720do
31721  # Use a header file that comes with gcc, so configuring glibc
31722  # with a fresh cross-compiler works.
31723  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31724  # <limits.h> exists even on freestanding compilers.
31725  # On the NeXT, cc -E runs the code through the compiler's parser,
31726  # not just through cpp. "Syntax error" is here to catch this case.
31727  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31728/* end confdefs.h.  */
31729#ifdef __STDC__
31730# include <limits.h>
31731#else
31732# include <assert.h>
31733#endif
31734		     Syntax error
31735_ACEOF
31736if ac_fn_cxx_try_cpp "$LINENO"; then :
31737
31738else
31739  # Broken: fails on valid input.
31740continue
31741fi
31742rm -f conftest.err conftest.i conftest.$ac_ext
31743
31744  # OK, works on sane cases.  Now check whether nonexistent headers
31745  # can be detected and how.
31746  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31747/* end confdefs.h.  */
31748#include <ac_nonexistent.h>
31749_ACEOF
31750if ac_fn_cxx_try_cpp "$LINENO"; then :
31751  # Broken: success on invalid input.
31752continue
31753else
31754  # Passes both tests.
31755ac_preproc_ok=:
31756break
31757fi
31758rm -f conftest.err conftest.i conftest.$ac_ext
31759
31760done
31761# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31762rm -f conftest.i conftest.err conftest.$ac_ext
31763if $ac_preproc_ok; then :
31764  break
31765fi
31766
31767    done
31768    ac_cv_prog_CXXCPP=$CXXCPP
31769
31770fi
31771  CXXCPP=$ac_cv_prog_CXXCPP
31772else
31773  ac_cv_prog_CXXCPP=$CXXCPP
31774fi
31775{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
31776$as_echo "$CXXCPP" >&6; }
31777ac_preproc_ok=false
31778for ac_cxx_preproc_warn_flag in '' yes
31779do
31780  # Use a header file that comes with gcc, so configuring glibc
31781  # with a fresh cross-compiler works.
31782  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31783  # <limits.h> exists even on freestanding compilers.
31784  # On the NeXT, cc -E runs the code through the compiler's parser,
31785  # not just through cpp. "Syntax error" is here to catch this case.
31786  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31787/* end confdefs.h.  */
31788#ifdef __STDC__
31789# include <limits.h>
31790#else
31791# include <assert.h>
31792#endif
31793		     Syntax error
31794_ACEOF
31795if ac_fn_cxx_try_cpp "$LINENO"; then :
31796
31797else
31798  # Broken: fails on valid input.
31799continue
31800fi
31801rm -f conftest.err conftest.i conftest.$ac_ext
31802
31803  # OK, works on sane cases.  Now check whether nonexistent headers
31804  # can be detected and how.
31805  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31806/* end confdefs.h.  */
31807#include <ac_nonexistent.h>
31808_ACEOF
31809if ac_fn_cxx_try_cpp "$LINENO"; then :
31810  # Broken: success on invalid input.
31811continue
31812else
31813  # Passes both tests.
31814ac_preproc_ok=:
31815break
31816fi
31817rm -f conftest.err conftest.i conftest.$ac_ext
31818
31819done
31820# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31821rm -f conftest.i conftest.err conftest.$ac_ext
31822if $ac_preproc_ok; then :
31823
31824else
31825  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
31826$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
31827as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
31828See \`config.log' for more details" "$LINENO" 5; }
31829fi
31830
31831ac_ext=cpp
31832ac_cpp='$CXXCPP $CPPFLAGS'
31833ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31834ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31835ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31836
31837
31838  # Only process if variable expands to non-empty
31839
31840  if test "x$CXXCPP" != x; then
31841    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31842
31843  # First separate the path from the arguments. This will split at the first
31844  # space.
31845  complete="$CXXCPP"
31846  path="${complete%% *}"
31847  tmp="$complete EOL"
31848  arguments="${tmp#* }"
31849
31850  # Input might be given as Windows format, start by converting to
31851  # unix format.
31852  new_path=`$CYGPATH -u "$path"`
31853
31854  # Now try to locate executable using which
31855  new_path=`$WHICH "$new_path" 2> /dev/null`
31856  # bat and cmd files are not always considered executable in cygwin causing which
31857  # to not find them
31858  if test "x$new_path" = x \
31859      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31860      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31861    new_path=`$CYGPATH -u "$path"`
31862  fi
31863  if test "x$new_path" = x; then
31864    # Oops. Which didn't find the executable.
31865    # The splitting of arguments from the executable at a space might have been incorrect,
31866    # since paths with space are more likely in Windows. Give it another try with the whole
31867    # argument.
31868    path="$complete"
31869    arguments="EOL"
31870    new_path=`$CYGPATH -u "$path"`
31871    new_path=`$WHICH "$new_path" 2> /dev/null`
31872    # bat and cmd files are not always considered executable in cygwin causing which
31873    # to not find them
31874    if test "x$new_path" = x \
31875        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31876        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31877      new_path=`$CYGPATH -u "$path"`
31878    fi
31879    if test "x$new_path" = x; then
31880      # It's still not found. Now this is an unrecoverable error.
31881      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31882$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31883      has_space=`$ECHO "$complete" | $GREP " "`
31884      if test "x$has_space" != x; then
31885        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31886$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31887      fi
31888      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31889    fi
31890  fi
31891
31892  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31893  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31894  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31895  # "foo.exe" is OK but "foo" is an error.
31896  #
31897  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31898  # It is also a way to make sure we got the proper file name for the real test later on.
31899  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31900  if test "x$test_shortpath" = x; then
31901    # Short path failed, file does not exist as specified.
31902    # Try adding .exe or .cmd
31903    if test -f "${new_path}.exe"; then
31904      input_to_shortpath="${new_path}.exe"
31905    elif test -f "${new_path}.cmd"; then
31906      input_to_shortpath="${new_path}.cmd"
31907    else
31908      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
31909$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
31910      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31911$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31912      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31913    fi
31914  else
31915    input_to_shortpath="$new_path"
31916  fi
31917
31918  # Call helper function which possibly converts this using DOS-style short mode.
31919  # If so, the updated path is stored in $new_path.
31920  new_path="$input_to_shortpath"
31921
31922  input_path="$input_to_shortpath"
31923  # Check if we need to convert this using DOS-style short mode. If the path
31924  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31925  # take no chances and rewrite it.
31926  # Note: m4 eats our [], so we need to use [ and ] instead.
31927  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31928  if test "x$has_forbidden_chars" != x; then
31929    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31930    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31931    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31932    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31933      # Going to short mode and back again did indeed matter. Since short mode is
31934      # case insensitive, let's make it lowercase to improve readability.
31935      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31936      # Now convert it back to Unix-style (cygpath)
31937      input_path=`$CYGPATH -u "$shortmode_path"`
31938      new_path="$input_path"
31939    fi
31940  fi
31941
31942  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31943  if test "x$test_cygdrive_prefix" = x; then
31944    # As a simple fix, exclude /usr/bin since it's not a real path.
31945    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31946      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31947      # a path prefixed by /cygdrive for fixpath to work.
31948      new_path="$CYGWIN_ROOT_PATH$input_path"
31949    fi
31950  fi
31951
31952  # remove trailing .exe if any
31953  new_path="${new_path/%.exe/}"
31954
31955    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31956
31957  # First separate the path from the arguments. This will split at the first
31958  # space.
31959  complete="$CXXCPP"
31960  path="${complete%% *}"
31961  tmp="$complete EOL"
31962  arguments="${tmp#* }"
31963
31964  # Input might be given as Windows format, start by converting to
31965  # unix format.
31966  new_path="$path"
31967
31968  windows_path="$new_path"
31969  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31970    unix_path=`$CYGPATH -u "$windows_path"`
31971    new_path="$unix_path"
31972  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31973    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31974    new_path="$unix_path"
31975  fi
31976
31977
31978  # Now try to locate executable using which
31979  new_path=`$WHICH "$new_path" 2> /dev/null`
31980
31981  if test "x$new_path" = x; then
31982    # Oops. Which didn't find the executable.
31983    # The splitting of arguments from the executable at a space might have been incorrect,
31984    # since paths with space are more likely in Windows. Give it another try with the whole
31985    # argument.
31986    path="$complete"
31987    arguments="EOL"
31988    new_path="$path"
31989
31990  windows_path="$new_path"
31991  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31992    unix_path=`$CYGPATH -u "$windows_path"`
31993    new_path="$unix_path"
31994  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31995    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31996    new_path="$unix_path"
31997  fi
31998
31999
32000    new_path=`$WHICH "$new_path" 2> /dev/null`
32001    # bat and cmd files are not always considered executable in MSYS causing which
32002    # to not find them
32003    if test "x$new_path" = x \
32004        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32005        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32006      new_path="$path"
32007
32008  windows_path="$new_path"
32009  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32010    unix_path=`$CYGPATH -u "$windows_path"`
32011    new_path="$unix_path"
32012  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32013    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32014    new_path="$unix_path"
32015  fi
32016
32017    fi
32018
32019    if test "x$new_path" = x; then
32020      # It's still not found. Now this is an unrecoverable error.
32021      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
32022$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
32023      has_space=`$ECHO "$complete" | $GREP " "`
32024      if test "x$has_space" != x; then
32025        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32026$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32027      fi
32028      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
32029    fi
32030  fi
32031
32032  # Now new_path has a complete unix path to the binary
32033  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32034    # Keep paths in /bin as-is, but remove trailing .exe if any
32035    new_path="${new_path/%.exe/}"
32036    # Do not save /bin paths to all_fixpath_prefixes!
32037  else
32038    # Not in mixed or Windows style, start by that.
32039    new_path=`cmd //c echo $new_path`
32040
32041  input_path="$new_path"
32042  # Check if we need to convert this using DOS-style short mode. If the path
32043  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32044  # take no chances and rewrite it.
32045  # Note: m4 eats our [], so we need to use [ and ] instead.
32046  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32047  if test "x$has_forbidden_chars" != x; then
32048    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32049    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32050  fi
32051
32052    # Output is in $new_path
32053
32054  windows_path="$new_path"
32055  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32056    unix_path=`$CYGPATH -u "$windows_path"`
32057    new_path="$unix_path"
32058  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32059    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32060    new_path="$unix_path"
32061  fi
32062
32063    # remove trailing .exe if any
32064    new_path="${new_path/%.exe/}"
32065
32066    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32067    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32068  fi
32069
32070    else
32071      # We're on a unix platform. Hooray! :)
32072      # First separate the path from the arguments. This will split at the first
32073      # space.
32074      complete="$CXXCPP"
32075      path="${complete%% *}"
32076      tmp="$complete EOL"
32077      arguments="${tmp#* }"
32078
32079      # Cannot rely on the command "which" here since it doesn't always work.
32080      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32081      if test -z "$is_absolute_path"; then
32082        # Path to executable is not absolute. Find it.
32083        IFS_save="$IFS"
32084        IFS=:
32085        for p in $PATH; do
32086          if test -f "$p/$path" && test -x "$p/$path"; then
32087            new_path="$p/$path"
32088            break
32089          fi
32090        done
32091        IFS="$IFS_save"
32092      else
32093        # This is an absolute path, we can use it without further modifications.
32094        new_path="$path"
32095      fi
32096
32097      if test "x$new_path" = x; then
32098        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
32099$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
32100        has_space=`$ECHO "$complete" | $GREP " "`
32101        if test "x$has_space" != x; then
32102          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32103$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32104        fi
32105        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
32106      fi
32107    fi
32108
32109    # Now join together the path and the arguments once again
32110    if test "x$arguments" != xEOL; then
32111      new_complete="$new_path ${arguments% *}"
32112    else
32113      new_complete="$new_path"
32114    fi
32115
32116    if test "x$complete" != "x$new_complete"; then
32117      CXXCPP="$new_complete"
32118      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
32119$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
32120    fi
32121  fi
32122
32123
32124  #
32125  # Setup the linker (LD)
32126  #
32127  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32128    # In the Microsoft toolchain we have a separate LD command "link".
32129    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
32130    # a cygwin program for something completely different.
32131    # Extract the first word of "link", so it can be a program name with args.
32132set dummy link; ac_word=$2
32133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32134$as_echo_n "checking for $ac_word... " >&6; }
32135if ${ac_cv_prog_LD+:} false; then :
32136  $as_echo_n "(cached) " >&6
32137else
32138  if test -n "$LD"; then
32139  ac_cv_prog_LD="$LD" # Let the user override the test.
32140else
32141  ac_prog_rejected=no
32142as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32143for as_dir in $PATH
32144do
32145  IFS=$as_save_IFS
32146  test -z "$as_dir" && as_dir=.
32147    for ac_exec_ext in '' $ac_executable_extensions; do
32148  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32149    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
32150       ac_prog_rejected=yes
32151       continue
32152     fi
32153    ac_cv_prog_LD="link"
32154    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32155    break 2
32156  fi
32157done
32158  done
32159IFS=$as_save_IFS
32160
32161if test $ac_prog_rejected = yes; then
32162  # We found a bogon in the path, so make sure we never use it.
32163  set dummy $ac_cv_prog_LD
32164  shift
32165  if test $# != 0; then
32166    # We chose a different compiler from the bogus one.
32167    # However, it has the same basename, so the bogon will be chosen
32168    # first if we set LD to just the basename; use the full file name.
32169    shift
32170    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
32171  fi
32172fi
32173fi
32174fi
32175LD=$ac_cv_prog_LD
32176if test -n "$LD"; then
32177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
32178$as_echo "$LD" >&6; }
32179else
32180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32181$as_echo "no" >&6; }
32182fi
32183
32184
32185
32186  # Only process if variable expands to non-empty
32187
32188  if test "x$LD" != x; then
32189    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32190
32191  # First separate the path from the arguments. This will split at the first
32192  # space.
32193  complete="$LD"
32194  path="${complete%% *}"
32195  tmp="$complete EOL"
32196  arguments="${tmp#* }"
32197
32198  # Input might be given as Windows format, start by converting to
32199  # unix format.
32200  new_path=`$CYGPATH -u "$path"`
32201
32202  # Now try to locate executable using which
32203  new_path=`$WHICH "$new_path" 2> /dev/null`
32204  # bat and cmd files are not always considered executable in cygwin causing which
32205  # to not find them
32206  if test "x$new_path" = x \
32207      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32208      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32209    new_path=`$CYGPATH -u "$path"`
32210  fi
32211  if test "x$new_path" = x; then
32212    # Oops. Which didn't find the executable.
32213    # The splitting of arguments from the executable at a space might have been incorrect,
32214    # since paths with space are more likely in Windows. Give it another try with the whole
32215    # argument.
32216    path="$complete"
32217    arguments="EOL"
32218    new_path=`$CYGPATH -u "$path"`
32219    new_path=`$WHICH "$new_path" 2> /dev/null`
32220    # bat and cmd files are not always considered executable in cygwin causing which
32221    # to not find them
32222    if test "x$new_path" = x \
32223        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32224        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32225      new_path=`$CYGPATH -u "$path"`
32226    fi
32227    if test "x$new_path" = x; then
32228      # It's still not found. Now this is an unrecoverable error.
32229      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
32230$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
32231      has_space=`$ECHO "$complete" | $GREP " "`
32232      if test "x$has_space" != x; then
32233        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32234$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32235      fi
32236      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32237    fi
32238  fi
32239
32240  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32241  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32242  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32243  # "foo.exe" is OK but "foo" is an error.
32244  #
32245  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32246  # It is also a way to make sure we got the proper file name for the real test later on.
32247  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32248  if test "x$test_shortpath" = x; then
32249    # Short path failed, file does not exist as specified.
32250    # Try adding .exe or .cmd
32251    if test -f "${new_path}.exe"; then
32252      input_to_shortpath="${new_path}.exe"
32253    elif test -f "${new_path}.cmd"; then
32254      input_to_shortpath="${new_path}.cmd"
32255    else
32256      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
32257$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
32258      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32259$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32260      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32261    fi
32262  else
32263    input_to_shortpath="$new_path"
32264  fi
32265
32266  # Call helper function which possibly converts this using DOS-style short mode.
32267  # If so, the updated path is stored in $new_path.
32268  new_path="$input_to_shortpath"
32269
32270  input_path="$input_to_shortpath"
32271  # Check if we need to convert this using DOS-style short mode. If the path
32272  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32273  # take no chances and rewrite it.
32274  # Note: m4 eats our [], so we need to use [ and ] instead.
32275  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32276  if test "x$has_forbidden_chars" != x; then
32277    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32278    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32279    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32280    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32281      # Going to short mode and back again did indeed matter. Since short mode is
32282      # case insensitive, let's make it lowercase to improve readability.
32283      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32284      # Now convert it back to Unix-style (cygpath)
32285      input_path=`$CYGPATH -u "$shortmode_path"`
32286      new_path="$input_path"
32287    fi
32288  fi
32289
32290  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32291  if test "x$test_cygdrive_prefix" = x; then
32292    # As a simple fix, exclude /usr/bin since it's not a real path.
32293    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32294      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32295      # a path prefixed by /cygdrive for fixpath to work.
32296      new_path="$CYGWIN_ROOT_PATH$input_path"
32297    fi
32298  fi
32299
32300  # remove trailing .exe if any
32301  new_path="${new_path/%.exe/}"
32302
32303    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32304
32305  # First separate the path from the arguments. This will split at the first
32306  # space.
32307  complete="$LD"
32308  path="${complete%% *}"
32309  tmp="$complete EOL"
32310  arguments="${tmp#* }"
32311
32312  # Input might be given as Windows format, start by converting to
32313  # unix format.
32314  new_path="$path"
32315
32316  windows_path="$new_path"
32317  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32318    unix_path=`$CYGPATH -u "$windows_path"`
32319    new_path="$unix_path"
32320  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32321    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32322    new_path="$unix_path"
32323  fi
32324
32325
32326  # Now try to locate executable using which
32327  new_path=`$WHICH "$new_path" 2> /dev/null`
32328
32329  if test "x$new_path" = x; then
32330    # Oops. Which didn't find the executable.
32331    # The splitting of arguments from the executable at a space might have been incorrect,
32332    # since paths with space are more likely in Windows. Give it another try with the whole
32333    # argument.
32334    path="$complete"
32335    arguments="EOL"
32336    new_path="$path"
32337
32338  windows_path="$new_path"
32339  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32340    unix_path=`$CYGPATH -u "$windows_path"`
32341    new_path="$unix_path"
32342  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32343    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32344    new_path="$unix_path"
32345  fi
32346
32347
32348    new_path=`$WHICH "$new_path" 2> /dev/null`
32349    # bat and cmd files are not always considered executable in MSYS causing which
32350    # to not find them
32351    if test "x$new_path" = x \
32352        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32353        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32354      new_path="$path"
32355
32356  windows_path="$new_path"
32357  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32358    unix_path=`$CYGPATH -u "$windows_path"`
32359    new_path="$unix_path"
32360  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32361    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32362    new_path="$unix_path"
32363  fi
32364
32365    fi
32366
32367    if test "x$new_path" = x; then
32368      # It's still not found. Now this is an unrecoverable error.
32369      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
32370$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
32371      has_space=`$ECHO "$complete" | $GREP " "`
32372      if test "x$has_space" != x; then
32373        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32374$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32375      fi
32376      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32377    fi
32378  fi
32379
32380  # Now new_path has a complete unix path to the binary
32381  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32382    # Keep paths in /bin as-is, but remove trailing .exe if any
32383    new_path="${new_path/%.exe/}"
32384    # Do not save /bin paths to all_fixpath_prefixes!
32385  else
32386    # Not in mixed or Windows style, start by that.
32387    new_path=`cmd //c echo $new_path`
32388
32389  input_path="$new_path"
32390  # Check if we need to convert this using DOS-style short mode. If the path
32391  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32392  # take no chances and rewrite it.
32393  # Note: m4 eats our [], so we need to use [ and ] instead.
32394  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32395  if test "x$has_forbidden_chars" != x; then
32396    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32397    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32398  fi
32399
32400    # Output is in $new_path
32401
32402  windows_path="$new_path"
32403  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32404    unix_path=`$CYGPATH -u "$windows_path"`
32405    new_path="$unix_path"
32406  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32407    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32408    new_path="$unix_path"
32409  fi
32410
32411    # remove trailing .exe if any
32412    new_path="${new_path/%.exe/}"
32413
32414    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32415    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32416  fi
32417
32418    else
32419      # We're on a unix platform. Hooray! :)
32420      # First separate the path from the arguments. This will split at the first
32421      # space.
32422      complete="$LD"
32423      path="${complete%% *}"
32424      tmp="$complete EOL"
32425      arguments="${tmp#* }"
32426
32427      # Cannot rely on the command "which" here since it doesn't always work.
32428      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32429      if test -z "$is_absolute_path"; then
32430        # Path to executable is not absolute. Find it.
32431        IFS_save="$IFS"
32432        IFS=:
32433        for p in $PATH; do
32434          if test -f "$p/$path" && test -x "$p/$path"; then
32435            new_path="$p/$path"
32436            break
32437          fi
32438        done
32439        IFS="$IFS_save"
32440      else
32441        # This is an absolute path, we can use it without further modifications.
32442        new_path="$path"
32443      fi
32444
32445      if test "x$new_path" = x; then
32446        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
32447$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
32448        has_space=`$ECHO "$complete" | $GREP " "`
32449        if test "x$has_space" != x; then
32450          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32451$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32452        fi
32453        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32454      fi
32455    fi
32456
32457    # Now join together the path and the arguments once again
32458    if test "x$arguments" != xEOL; then
32459      new_complete="$new_path ${arguments% *}"
32460    else
32461      new_complete="$new_path"
32462    fi
32463
32464    if test "x$complete" != "x$new_complete"; then
32465      LD="$new_complete"
32466      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
32467$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
32468    fi
32469  fi
32470
32471    # Verify that we indeed succeeded with this trick.
32472    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
32473$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
32474    "$LD" --version > /dev/null
32475    if test $? -eq 0 ; then
32476      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32477$as_echo "no" >&6; }
32478      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
32479    else
32480      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32481$as_echo "yes" >&6; }
32482    fi
32483    LDCXX="$LD"
32484  else
32485    # All other toolchains use the compiler to link.
32486    LD="$CC"
32487    LDCXX="$CXX"
32488  fi
32489
32490  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
32491
32492
32493  #
32494  # Setup the assembler (AS)
32495  #
32496  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
32497    # FIXME: should this really be solaris, or solstudio?
32498
32499
32500  # Publish this variable in the help.
32501
32502
32503  if test "x$AS" = x; then
32504    # The variable is not set by user, try to locate tool using the code snippet
32505    for ac_prog in as
32506do
32507  # Extract the first word of "$ac_prog", so it can be a program name with args.
32508set dummy $ac_prog; ac_word=$2
32509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32510$as_echo_n "checking for $ac_word... " >&6; }
32511if ${ac_cv_path_AS+:} false; then :
32512  $as_echo_n "(cached) " >&6
32513else
32514  case $AS in
32515  [\\/]* | ?:[\\/]*)
32516  ac_cv_path_AS="$AS" # Let the user override the test with a path.
32517  ;;
32518  *)
32519  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32520for as_dir in $PATH
32521do
32522  IFS=$as_save_IFS
32523  test -z "$as_dir" && as_dir=.
32524    for ac_exec_ext in '' $ac_executable_extensions; do
32525  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32526    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32527    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32528    break 2
32529  fi
32530done
32531  done
32532IFS=$as_save_IFS
32533
32534  ;;
32535esac
32536fi
32537AS=$ac_cv_path_AS
32538if test -n "$AS"; then
32539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32540$as_echo "$AS" >&6; }
32541else
32542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32543$as_echo "no" >&6; }
32544fi
32545
32546
32547  test -n "$AS" && break
32548done
32549
32550  else
32551    # The variable is set, but is it from the command line or the environment?
32552
32553    # Try to remove the string !AS! from our list.
32554    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
32555    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
32556      # If it failed, the variable was not from the command line. Ignore it,
32557      # but warn the user (except for BASH, which is always set by the calling BASH).
32558      if test "xAS" != xBASH; then
32559        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
32560$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
32561      fi
32562      # Try to locate tool using the code snippet
32563      for ac_prog in as
32564do
32565  # Extract the first word of "$ac_prog", so it can be a program name with args.
32566set dummy $ac_prog; ac_word=$2
32567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32568$as_echo_n "checking for $ac_word... " >&6; }
32569if ${ac_cv_path_AS+:} false; then :
32570  $as_echo_n "(cached) " >&6
32571else
32572  case $AS in
32573  [\\/]* | ?:[\\/]*)
32574  ac_cv_path_AS="$AS" # Let the user override the test with a path.
32575  ;;
32576  *)
32577  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32578for as_dir in $PATH
32579do
32580  IFS=$as_save_IFS
32581  test -z "$as_dir" && as_dir=.
32582    for ac_exec_ext in '' $ac_executable_extensions; do
32583  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32584    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32585    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32586    break 2
32587  fi
32588done
32589  done
32590IFS=$as_save_IFS
32591
32592  ;;
32593esac
32594fi
32595AS=$ac_cv_path_AS
32596if test -n "$AS"; then
32597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32598$as_echo "$AS" >&6; }
32599else
32600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32601$as_echo "no" >&6; }
32602fi
32603
32604
32605  test -n "$AS" && break
32606done
32607
32608    else
32609      # If it succeeded, then it was overridden by the user. We will use it
32610      # for the tool.
32611
32612      # First remove it from the list of overridden variables, so we can test
32613      # for unknown variables in the end.
32614      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
32615
32616      # Check if the provided tool contains a complete path.
32617      tool_specified="$AS"
32618      tool_basename="${tool_specified##*/}"
32619      if test "x$tool_basename" = "x$tool_specified"; then
32620        # A command without a complete path is provided, search $PATH.
32621        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
32622$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
32623        # Extract the first word of "$tool_basename", so it can be a program name with args.
32624set dummy $tool_basename; ac_word=$2
32625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32626$as_echo_n "checking for $ac_word... " >&6; }
32627if ${ac_cv_path_AS+:} false; then :
32628  $as_echo_n "(cached) " >&6
32629else
32630  case $AS in
32631  [\\/]* | ?:[\\/]*)
32632  ac_cv_path_AS="$AS" # Let the user override the test with a path.
32633  ;;
32634  *)
32635  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32636for as_dir in $PATH
32637do
32638  IFS=$as_save_IFS
32639  test -z "$as_dir" && as_dir=.
32640    for ac_exec_ext in '' $ac_executable_extensions; do
32641  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32642    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32643    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32644    break 2
32645  fi
32646done
32647  done
32648IFS=$as_save_IFS
32649
32650  ;;
32651esac
32652fi
32653AS=$ac_cv_path_AS
32654if test -n "$AS"; then
32655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32656$as_echo "$AS" >&6; }
32657else
32658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32659$as_echo "no" >&6; }
32660fi
32661
32662
32663        if test "x$AS" = x; then
32664          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
32665        fi
32666      else
32667        # Otherwise we believe it is a complete path. Use it as it is.
32668        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
32669$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
32670        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
32671$as_echo_n "checking for AS... " >&6; }
32672        if test ! -x "$tool_specified"; then
32673          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32674$as_echo "not found" >&6; }
32675          as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
32676        fi
32677        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
32678$as_echo "$tool_specified" >&6; }
32679      fi
32680    fi
32681  fi
32682
32683
32684
32685  # Only process if variable expands to non-empty
32686
32687  if test "x$AS" != x; then
32688    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32689
32690  # First separate the path from the arguments. This will split at the first
32691  # space.
32692  complete="$AS"
32693  path="${complete%% *}"
32694  tmp="$complete EOL"
32695  arguments="${tmp#* }"
32696
32697  # Input might be given as Windows format, start by converting to
32698  # unix format.
32699  new_path=`$CYGPATH -u "$path"`
32700
32701  # Now try to locate executable using which
32702  new_path=`$WHICH "$new_path" 2> /dev/null`
32703  # bat and cmd files are not always considered executable in cygwin causing which
32704  # to not find them
32705  if test "x$new_path" = x \
32706      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32707      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32708    new_path=`$CYGPATH -u "$path"`
32709  fi
32710  if test "x$new_path" = x; then
32711    # Oops. Which didn't find the executable.
32712    # The splitting of arguments from the executable at a space might have been incorrect,
32713    # since paths with space are more likely in Windows. Give it another try with the whole
32714    # argument.
32715    path="$complete"
32716    arguments="EOL"
32717    new_path=`$CYGPATH -u "$path"`
32718    new_path=`$WHICH "$new_path" 2> /dev/null`
32719    # bat and cmd files are not always considered executable in cygwin causing which
32720    # to not find them
32721    if test "x$new_path" = x \
32722        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32723        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32724      new_path=`$CYGPATH -u "$path"`
32725    fi
32726    if test "x$new_path" = x; then
32727      # It's still not found. Now this is an unrecoverable error.
32728      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32729$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32730      has_space=`$ECHO "$complete" | $GREP " "`
32731      if test "x$has_space" != x; then
32732        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32733$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32734      fi
32735      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32736    fi
32737  fi
32738
32739  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32740  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32741  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32742  # "foo.exe" is OK but "foo" is an error.
32743  #
32744  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32745  # It is also a way to make sure we got the proper file name for the real test later on.
32746  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32747  if test "x$test_shortpath" = x; then
32748    # Short path failed, file does not exist as specified.
32749    # Try adding .exe or .cmd
32750    if test -f "${new_path}.exe"; then
32751      input_to_shortpath="${new_path}.exe"
32752    elif test -f "${new_path}.cmd"; then
32753      input_to_shortpath="${new_path}.cmd"
32754    else
32755      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
32756$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
32757      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32758$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32759      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32760    fi
32761  else
32762    input_to_shortpath="$new_path"
32763  fi
32764
32765  # Call helper function which possibly converts this using DOS-style short mode.
32766  # If so, the updated path is stored in $new_path.
32767  new_path="$input_to_shortpath"
32768
32769  input_path="$input_to_shortpath"
32770  # Check if we need to convert this using DOS-style short mode. If the path
32771  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32772  # take no chances and rewrite it.
32773  # Note: m4 eats our [], so we need to use [ and ] instead.
32774  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32775  if test "x$has_forbidden_chars" != x; then
32776    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32777    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32778    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32779    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32780      # Going to short mode and back again did indeed matter. Since short mode is
32781      # case insensitive, let's make it lowercase to improve readability.
32782      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32783      # Now convert it back to Unix-style (cygpath)
32784      input_path=`$CYGPATH -u "$shortmode_path"`
32785      new_path="$input_path"
32786    fi
32787  fi
32788
32789  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32790  if test "x$test_cygdrive_prefix" = x; then
32791    # As a simple fix, exclude /usr/bin since it's not a real path.
32792    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32793      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32794      # a path prefixed by /cygdrive for fixpath to work.
32795      new_path="$CYGWIN_ROOT_PATH$input_path"
32796    fi
32797  fi
32798
32799  # remove trailing .exe if any
32800  new_path="${new_path/%.exe/}"
32801
32802    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32803
32804  # First separate the path from the arguments. This will split at the first
32805  # space.
32806  complete="$AS"
32807  path="${complete%% *}"
32808  tmp="$complete EOL"
32809  arguments="${tmp#* }"
32810
32811  # Input might be given as Windows format, start by converting to
32812  # unix format.
32813  new_path="$path"
32814
32815  windows_path="$new_path"
32816  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32817    unix_path=`$CYGPATH -u "$windows_path"`
32818    new_path="$unix_path"
32819  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32820    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32821    new_path="$unix_path"
32822  fi
32823
32824
32825  # Now try to locate executable using which
32826  new_path=`$WHICH "$new_path" 2> /dev/null`
32827
32828  if test "x$new_path" = x; then
32829    # Oops. Which didn't find the executable.
32830    # The splitting of arguments from the executable at a space might have been incorrect,
32831    # since paths with space are more likely in Windows. Give it another try with the whole
32832    # argument.
32833    path="$complete"
32834    arguments="EOL"
32835    new_path="$path"
32836
32837  windows_path="$new_path"
32838  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32839    unix_path=`$CYGPATH -u "$windows_path"`
32840    new_path="$unix_path"
32841  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32842    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32843    new_path="$unix_path"
32844  fi
32845
32846
32847    new_path=`$WHICH "$new_path" 2> /dev/null`
32848    # bat and cmd files are not always considered executable in MSYS causing which
32849    # to not find them
32850    if test "x$new_path" = x \
32851        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32852        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32853      new_path="$path"
32854
32855  windows_path="$new_path"
32856  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32857    unix_path=`$CYGPATH -u "$windows_path"`
32858    new_path="$unix_path"
32859  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32860    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32861    new_path="$unix_path"
32862  fi
32863
32864    fi
32865
32866    if test "x$new_path" = x; then
32867      # It's still not found. Now this is an unrecoverable error.
32868      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32869$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32870      has_space=`$ECHO "$complete" | $GREP " "`
32871      if test "x$has_space" != x; then
32872        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32873$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32874      fi
32875      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32876    fi
32877  fi
32878
32879  # Now new_path has a complete unix path to the binary
32880  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32881    # Keep paths in /bin as-is, but remove trailing .exe if any
32882    new_path="${new_path/%.exe/}"
32883    # Do not save /bin paths to all_fixpath_prefixes!
32884  else
32885    # Not in mixed or Windows style, start by that.
32886    new_path=`cmd //c echo $new_path`
32887
32888  input_path="$new_path"
32889  # Check if we need to convert this using DOS-style short mode. If the path
32890  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32891  # take no chances and rewrite it.
32892  # Note: m4 eats our [], so we need to use [ and ] instead.
32893  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32894  if test "x$has_forbidden_chars" != x; then
32895    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32896    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32897  fi
32898
32899    # Output is in $new_path
32900
32901  windows_path="$new_path"
32902  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32903    unix_path=`$CYGPATH -u "$windows_path"`
32904    new_path="$unix_path"
32905  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32906    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32907    new_path="$unix_path"
32908  fi
32909
32910    # remove trailing .exe if any
32911    new_path="${new_path/%.exe/}"
32912
32913    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32914    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32915  fi
32916
32917    else
32918      # We're on a unix platform. Hooray! :)
32919      # First separate the path from the arguments. This will split at the first
32920      # space.
32921      complete="$AS"
32922      path="${complete%% *}"
32923      tmp="$complete EOL"
32924      arguments="${tmp#* }"
32925
32926      # Cannot rely on the command "which" here since it doesn't always work.
32927      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32928      if test -z "$is_absolute_path"; then
32929        # Path to executable is not absolute. Find it.
32930        IFS_save="$IFS"
32931        IFS=:
32932        for p in $PATH; do
32933          if test -f "$p/$path" && test -x "$p/$path"; then
32934            new_path="$p/$path"
32935            break
32936          fi
32937        done
32938        IFS="$IFS_save"
32939      else
32940        # This is an absolute path, we can use it without further modifications.
32941        new_path="$path"
32942      fi
32943
32944      if test "x$new_path" = x; then
32945        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32946$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32947        has_space=`$ECHO "$complete" | $GREP " "`
32948        if test "x$has_space" != x; then
32949          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32950$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32951        fi
32952        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32953      fi
32954    fi
32955
32956    # Now join together the path and the arguments once again
32957    if test "x$arguments" != xEOL; then
32958      new_complete="$new_path ${arguments% *}"
32959    else
32960      new_complete="$new_path"
32961    fi
32962
32963    if test "x$complete" != "x$new_complete"; then
32964      AS="$new_complete"
32965      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
32966$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
32967    fi
32968  fi
32969
32970  else
32971    # FIXME: is this correct for microsoft?
32972    AS="$CC -c"
32973  fi
32974
32975
32976  #
32977  # Setup the archiver (AR)
32978  #
32979  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32980    # The corresponding ar tool is lib.exe (used to create static libraries)
32981    # Extract the first word of "lib", so it can be a program name with args.
32982set dummy lib; ac_word=$2
32983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32984$as_echo_n "checking for $ac_word... " >&6; }
32985if ${ac_cv_prog_AR+:} false; then :
32986  $as_echo_n "(cached) " >&6
32987else
32988  if test -n "$AR"; then
32989  ac_cv_prog_AR="$AR" # Let the user override the test.
32990else
32991as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32992for as_dir in $PATH
32993do
32994  IFS=$as_save_IFS
32995  test -z "$as_dir" && as_dir=.
32996    for ac_exec_ext in '' $ac_executable_extensions; do
32997  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32998    ac_cv_prog_AR="lib"
32999    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33000    break 2
33001  fi
33002done
33003  done
33004IFS=$as_save_IFS
33005
33006fi
33007fi
33008AR=$ac_cv_prog_AR
33009if test -n "$AR"; then
33010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33011$as_echo "$AR" >&6; }
33012else
33013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33014$as_echo "no" >&6; }
33015fi
33016
33017
33018  else
33019
33020
33021  # Publish this variable in the help.
33022
33023
33024  if test "x$AR" = x; then
33025    # The variable is not set by user, try to locate tool using the code snippet
33026    if test -n "$ac_tool_prefix"; then
33027  for ac_prog in ar
33028  do
33029    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33030set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33032$as_echo_n "checking for $ac_word... " >&6; }
33033if ${ac_cv_prog_AR+:} false; then :
33034  $as_echo_n "(cached) " >&6
33035else
33036  if test -n "$AR"; then
33037  ac_cv_prog_AR="$AR" # Let the user override the test.
33038else
33039as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33040for as_dir in $PATH
33041do
33042  IFS=$as_save_IFS
33043  test -z "$as_dir" && as_dir=.
33044    for ac_exec_ext in '' $ac_executable_extensions; do
33045  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33046    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
33047    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33048    break 2
33049  fi
33050done
33051  done
33052IFS=$as_save_IFS
33053
33054fi
33055fi
33056AR=$ac_cv_prog_AR
33057if test -n "$AR"; then
33058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33059$as_echo "$AR" >&6; }
33060else
33061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33062$as_echo "no" >&6; }
33063fi
33064
33065
33066    test -n "$AR" && break
33067  done
33068fi
33069if test -z "$AR"; then
33070  ac_ct_AR=$AR
33071  for ac_prog in ar
33072do
33073  # Extract the first word of "$ac_prog", so it can be a program name with args.
33074set dummy $ac_prog; ac_word=$2
33075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33076$as_echo_n "checking for $ac_word... " >&6; }
33077if ${ac_cv_prog_ac_ct_AR+:} false; then :
33078  $as_echo_n "(cached) " >&6
33079else
33080  if test -n "$ac_ct_AR"; then
33081  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
33082else
33083as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33084for as_dir in $PATH
33085do
33086  IFS=$as_save_IFS
33087  test -z "$as_dir" && as_dir=.
33088    for ac_exec_ext in '' $ac_executable_extensions; do
33089  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33090    ac_cv_prog_ac_ct_AR="$ac_prog"
33091    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33092    break 2
33093  fi
33094done
33095  done
33096IFS=$as_save_IFS
33097
33098fi
33099fi
33100ac_ct_AR=$ac_cv_prog_ac_ct_AR
33101if test -n "$ac_ct_AR"; then
33102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
33103$as_echo "$ac_ct_AR" >&6; }
33104else
33105  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33106$as_echo "no" >&6; }
33107fi
33108
33109
33110  test -n "$ac_ct_AR" && break
33111done
33112
33113  if test "x$ac_ct_AR" = x; then
33114    AR=""
33115  else
33116    case $cross_compiling:$ac_tool_warned in
33117yes:)
33118{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33119$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33120ac_tool_warned=yes ;;
33121esac
33122    AR=$ac_ct_AR
33123  fi
33124fi
33125
33126  else
33127    # The variable is set, but is it from the command line or the environment?
33128
33129    # Try to remove the string !AR! from our list.
33130    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
33131    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
33132      # If it failed, the variable was not from the command line. Ignore it,
33133      # but warn the user (except for BASH, which is always set by the calling BASH).
33134      if test "xAR" != xBASH; then
33135        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
33136$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
33137      fi
33138      # Try to locate tool using the code snippet
33139      if test -n "$ac_tool_prefix"; then
33140  for ac_prog in ar
33141  do
33142    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33143set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33145$as_echo_n "checking for $ac_word... " >&6; }
33146if ${ac_cv_prog_AR+:} false; then :
33147  $as_echo_n "(cached) " >&6
33148else
33149  if test -n "$AR"; then
33150  ac_cv_prog_AR="$AR" # Let the user override the test.
33151else
33152as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33153for as_dir in $PATH
33154do
33155  IFS=$as_save_IFS
33156  test -z "$as_dir" && as_dir=.
33157    for ac_exec_ext in '' $ac_executable_extensions; do
33158  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33159    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
33160    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33161    break 2
33162  fi
33163done
33164  done
33165IFS=$as_save_IFS
33166
33167fi
33168fi
33169AR=$ac_cv_prog_AR
33170if test -n "$AR"; then
33171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33172$as_echo "$AR" >&6; }
33173else
33174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33175$as_echo "no" >&6; }
33176fi
33177
33178
33179    test -n "$AR" && break
33180  done
33181fi
33182if test -z "$AR"; then
33183  ac_ct_AR=$AR
33184  for ac_prog in ar
33185do
33186  # Extract the first word of "$ac_prog", so it can be a program name with args.
33187set dummy $ac_prog; ac_word=$2
33188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33189$as_echo_n "checking for $ac_word... " >&6; }
33190if ${ac_cv_prog_ac_ct_AR+:} false; then :
33191  $as_echo_n "(cached) " >&6
33192else
33193  if test -n "$ac_ct_AR"; then
33194  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
33195else
33196as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33197for as_dir in $PATH
33198do
33199  IFS=$as_save_IFS
33200  test -z "$as_dir" && as_dir=.
33201    for ac_exec_ext in '' $ac_executable_extensions; do
33202  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33203    ac_cv_prog_ac_ct_AR="$ac_prog"
33204    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33205    break 2
33206  fi
33207done
33208  done
33209IFS=$as_save_IFS
33210
33211fi
33212fi
33213ac_ct_AR=$ac_cv_prog_ac_ct_AR
33214if test -n "$ac_ct_AR"; then
33215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
33216$as_echo "$ac_ct_AR" >&6; }
33217else
33218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33219$as_echo "no" >&6; }
33220fi
33221
33222
33223  test -n "$ac_ct_AR" && break
33224done
33225
33226  if test "x$ac_ct_AR" = x; then
33227    AR=""
33228  else
33229    case $cross_compiling:$ac_tool_warned in
33230yes:)
33231{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33232$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33233ac_tool_warned=yes ;;
33234esac
33235    AR=$ac_ct_AR
33236  fi
33237fi
33238
33239    else
33240      # If it succeeded, then it was overridden by the user. We will use it
33241      # for the tool.
33242
33243      # First remove it from the list of overridden variables, so we can test
33244      # for unknown variables in the end.
33245      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33246
33247      # Check if the provided tool contains a complete path.
33248      tool_specified="$AR"
33249      tool_basename="${tool_specified##*/}"
33250      if test "x$tool_basename" = "x$tool_specified"; then
33251        # A command without a complete path is provided, search $PATH.
33252        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
33253$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
33254        # Extract the first word of "$tool_basename", so it can be a program name with args.
33255set dummy $tool_basename; ac_word=$2
33256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33257$as_echo_n "checking for $ac_word... " >&6; }
33258if ${ac_cv_path_AR+:} false; then :
33259  $as_echo_n "(cached) " >&6
33260else
33261  case $AR in
33262  [\\/]* | ?:[\\/]*)
33263  ac_cv_path_AR="$AR" # Let the user override the test with a path.
33264  ;;
33265  *)
33266  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33267for as_dir in $PATH
33268do
33269  IFS=$as_save_IFS
33270  test -z "$as_dir" && as_dir=.
33271    for ac_exec_ext in '' $ac_executable_extensions; do
33272  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33273    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
33274    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33275    break 2
33276  fi
33277done
33278  done
33279IFS=$as_save_IFS
33280
33281  ;;
33282esac
33283fi
33284AR=$ac_cv_path_AR
33285if test -n "$AR"; then
33286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33287$as_echo "$AR" >&6; }
33288else
33289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33290$as_echo "no" >&6; }
33291fi
33292
33293
33294        if test "x$AR" = x; then
33295          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
33296        fi
33297      else
33298        # Otherwise we believe it is a complete path. Use it as it is.
33299        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
33300$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
33301        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
33302$as_echo_n "checking for AR... " >&6; }
33303        if test ! -x "$tool_specified"; then
33304          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33305$as_echo "not found" >&6; }
33306          as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
33307        fi
33308        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33309$as_echo "$tool_specified" >&6; }
33310      fi
33311    fi
33312  fi
33313
33314
33315  fi
33316
33317  # Only process if variable expands to non-empty
33318
33319  if test "x$AR" != x; then
33320    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33321
33322  # First separate the path from the arguments. This will split at the first
33323  # space.
33324  complete="$AR"
33325  path="${complete%% *}"
33326  tmp="$complete EOL"
33327  arguments="${tmp#* }"
33328
33329  # Input might be given as Windows format, start by converting to
33330  # unix format.
33331  new_path=`$CYGPATH -u "$path"`
33332
33333  # Now try to locate executable using which
33334  new_path=`$WHICH "$new_path" 2> /dev/null`
33335  # bat and cmd files are not always considered executable in cygwin causing which
33336  # to not find them
33337  if test "x$new_path" = x \
33338      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33339      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33340    new_path=`$CYGPATH -u "$path"`
33341  fi
33342  if test "x$new_path" = x; then
33343    # Oops. Which didn't find the executable.
33344    # The splitting of arguments from the executable at a space might have been incorrect,
33345    # since paths with space are more likely in Windows. Give it another try with the whole
33346    # argument.
33347    path="$complete"
33348    arguments="EOL"
33349    new_path=`$CYGPATH -u "$path"`
33350    new_path=`$WHICH "$new_path" 2> /dev/null`
33351    # bat and cmd files are not always considered executable in cygwin causing which
33352    # to not find them
33353    if test "x$new_path" = x \
33354        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33355        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33356      new_path=`$CYGPATH -u "$path"`
33357    fi
33358    if test "x$new_path" = x; then
33359      # It's still not found. Now this is an unrecoverable error.
33360      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33361$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33362      has_space=`$ECHO "$complete" | $GREP " "`
33363      if test "x$has_space" != x; then
33364        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33365$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33366      fi
33367      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33368    fi
33369  fi
33370
33371  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33372  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33373  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33374  # "foo.exe" is OK but "foo" is an error.
33375  #
33376  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33377  # It is also a way to make sure we got the proper file name for the real test later on.
33378  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33379  if test "x$test_shortpath" = x; then
33380    # Short path failed, file does not exist as specified.
33381    # Try adding .exe or .cmd
33382    if test -f "${new_path}.exe"; then
33383      input_to_shortpath="${new_path}.exe"
33384    elif test -f "${new_path}.cmd"; then
33385      input_to_shortpath="${new_path}.cmd"
33386    else
33387      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
33388$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
33389      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33390$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33391      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33392    fi
33393  else
33394    input_to_shortpath="$new_path"
33395  fi
33396
33397  # Call helper function which possibly converts this using DOS-style short mode.
33398  # If so, the updated path is stored in $new_path.
33399  new_path="$input_to_shortpath"
33400
33401  input_path="$input_to_shortpath"
33402  # Check if we need to convert this using DOS-style short mode. If the path
33403  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33404  # take no chances and rewrite it.
33405  # Note: m4 eats our [], so we need to use [ and ] instead.
33406  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33407  if test "x$has_forbidden_chars" != x; then
33408    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33409    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33410    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33411    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33412      # Going to short mode and back again did indeed matter. Since short mode is
33413      # case insensitive, let's make it lowercase to improve readability.
33414      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33415      # Now convert it back to Unix-style (cygpath)
33416      input_path=`$CYGPATH -u "$shortmode_path"`
33417      new_path="$input_path"
33418    fi
33419  fi
33420
33421  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33422  if test "x$test_cygdrive_prefix" = x; then
33423    # As a simple fix, exclude /usr/bin since it's not a real path.
33424    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33425      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33426      # a path prefixed by /cygdrive for fixpath to work.
33427      new_path="$CYGWIN_ROOT_PATH$input_path"
33428    fi
33429  fi
33430
33431  # remove trailing .exe if any
33432  new_path="${new_path/%.exe/}"
33433
33434    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33435
33436  # First separate the path from the arguments. This will split at the first
33437  # space.
33438  complete="$AR"
33439  path="${complete%% *}"
33440  tmp="$complete EOL"
33441  arguments="${tmp#* }"
33442
33443  # Input might be given as Windows format, start by converting to
33444  # unix format.
33445  new_path="$path"
33446
33447  windows_path="$new_path"
33448  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33449    unix_path=`$CYGPATH -u "$windows_path"`
33450    new_path="$unix_path"
33451  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33452    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33453    new_path="$unix_path"
33454  fi
33455
33456
33457  # Now try to locate executable using which
33458  new_path=`$WHICH "$new_path" 2> /dev/null`
33459
33460  if test "x$new_path" = x; then
33461    # Oops. Which didn't find the executable.
33462    # The splitting of arguments from the executable at a space might have been incorrect,
33463    # since paths with space are more likely in Windows. Give it another try with the whole
33464    # argument.
33465    path="$complete"
33466    arguments="EOL"
33467    new_path="$path"
33468
33469  windows_path="$new_path"
33470  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33471    unix_path=`$CYGPATH -u "$windows_path"`
33472    new_path="$unix_path"
33473  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33474    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33475    new_path="$unix_path"
33476  fi
33477
33478
33479    new_path=`$WHICH "$new_path" 2> /dev/null`
33480    # bat and cmd files are not always considered executable in MSYS causing which
33481    # to not find them
33482    if test "x$new_path" = x \
33483        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33484        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33485      new_path="$path"
33486
33487  windows_path="$new_path"
33488  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33489    unix_path=`$CYGPATH -u "$windows_path"`
33490    new_path="$unix_path"
33491  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33492    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33493    new_path="$unix_path"
33494  fi
33495
33496    fi
33497
33498    if test "x$new_path" = x; then
33499      # It's still not found. Now this is an unrecoverable error.
33500      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33501$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33502      has_space=`$ECHO "$complete" | $GREP " "`
33503      if test "x$has_space" != x; then
33504        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33505$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33506      fi
33507      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33508    fi
33509  fi
33510
33511  # Now new_path has a complete unix path to the binary
33512  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33513    # Keep paths in /bin as-is, but remove trailing .exe if any
33514    new_path="${new_path/%.exe/}"
33515    # Do not save /bin paths to all_fixpath_prefixes!
33516  else
33517    # Not in mixed or Windows style, start by that.
33518    new_path=`cmd //c echo $new_path`
33519
33520  input_path="$new_path"
33521  # Check if we need to convert this using DOS-style short mode. If the path
33522  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33523  # take no chances and rewrite it.
33524  # Note: m4 eats our [], so we need to use [ and ] instead.
33525  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33526  if test "x$has_forbidden_chars" != x; then
33527    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33528    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33529  fi
33530
33531    # Output is in $new_path
33532
33533  windows_path="$new_path"
33534  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33535    unix_path=`$CYGPATH -u "$windows_path"`
33536    new_path="$unix_path"
33537  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33538    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33539    new_path="$unix_path"
33540  fi
33541
33542    # remove trailing .exe if any
33543    new_path="${new_path/%.exe/}"
33544
33545    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33546    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33547  fi
33548
33549    else
33550      # We're on a unix platform. Hooray! :)
33551      # First separate the path from the arguments. This will split at the first
33552      # space.
33553      complete="$AR"
33554      path="${complete%% *}"
33555      tmp="$complete EOL"
33556      arguments="${tmp#* }"
33557
33558      # Cannot rely on the command "which" here since it doesn't always work.
33559      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33560      if test -z "$is_absolute_path"; then
33561        # Path to executable is not absolute. Find it.
33562        IFS_save="$IFS"
33563        IFS=:
33564        for p in $PATH; do
33565          if test -f "$p/$path" && test -x "$p/$path"; then
33566            new_path="$p/$path"
33567            break
33568          fi
33569        done
33570        IFS="$IFS_save"
33571      else
33572        # This is an absolute path, we can use it without further modifications.
33573        new_path="$path"
33574      fi
33575
33576      if test "x$new_path" = x; then
33577        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33578$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33579        has_space=`$ECHO "$complete" | $GREP " "`
33580        if test "x$has_space" != x; then
33581          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33582$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33583        fi
33584        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33585      fi
33586    fi
33587
33588    # Now join together the path and the arguments once again
33589    if test "x$arguments" != xEOL; then
33590      new_complete="$new_path ${arguments% *}"
33591    else
33592      new_complete="$new_path"
33593    fi
33594
33595    if test "x$complete" != "x$new_complete"; then
33596      AR="$new_complete"
33597      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
33598$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
33599    fi
33600  fi
33601
33602
33603
33604  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
33605
33606
33607  # Publish this variable in the help.
33608
33609
33610  if test "x$LIPO" = x; then
33611    # The variable is not set by user, try to locate tool using the code snippet
33612    for ac_prog in lipo
33613do
33614  # Extract the first word of "$ac_prog", so it can be a program name with args.
33615set dummy $ac_prog; ac_word=$2
33616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33617$as_echo_n "checking for $ac_word... " >&6; }
33618if ${ac_cv_path_LIPO+:} false; then :
33619  $as_echo_n "(cached) " >&6
33620else
33621  case $LIPO in
33622  [\\/]* | ?:[\\/]*)
33623  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33624  ;;
33625  *)
33626  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33627for as_dir in $PATH
33628do
33629  IFS=$as_save_IFS
33630  test -z "$as_dir" && as_dir=.
33631    for ac_exec_ext in '' $ac_executable_extensions; do
33632  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33633    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33634    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33635    break 2
33636  fi
33637done
33638  done
33639IFS=$as_save_IFS
33640
33641  ;;
33642esac
33643fi
33644LIPO=$ac_cv_path_LIPO
33645if test -n "$LIPO"; then
33646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33647$as_echo "$LIPO" >&6; }
33648else
33649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33650$as_echo "no" >&6; }
33651fi
33652
33653
33654  test -n "$LIPO" && break
33655done
33656
33657  else
33658    # The variable is set, but is it from the command line or the environment?
33659
33660    # Try to remove the string !LIPO! from our list.
33661    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
33662    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
33663      # If it failed, the variable was not from the command line. Ignore it,
33664      # but warn the user (except for BASH, which is always set by the calling BASH).
33665      if test "xLIPO" != xBASH; then
33666        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
33667$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
33668      fi
33669      # Try to locate tool using the code snippet
33670      for ac_prog in lipo
33671do
33672  # Extract the first word of "$ac_prog", so it can be a program name with args.
33673set dummy $ac_prog; ac_word=$2
33674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33675$as_echo_n "checking for $ac_word... " >&6; }
33676if ${ac_cv_path_LIPO+:} false; then :
33677  $as_echo_n "(cached) " >&6
33678else
33679  case $LIPO in
33680  [\\/]* | ?:[\\/]*)
33681  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33682  ;;
33683  *)
33684  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33685for as_dir in $PATH
33686do
33687  IFS=$as_save_IFS
33688  test -z "$as_dir" && as_dir=.
33689    for ac_exec_ext in '' $ac_executable_extensions; do
33690  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33691    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33692    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33693    break 2
33694  fi
33695done
33696  done
33697IFS=$as_save_IFS
33698
33699  ;;
33700esac
33701fi
33702LIPO=$ac_cv_path_LIPO
33703if test -n "$LIPO"; then
33704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33705$as_echo "$LIPO" >&6; }
33706else
33707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33708$as_echo "no" >&6; }
33709fi
33710
33711
33712  test -n "$LIPO" && break
33713done
33714
33715    else
33716      # If it succeeded, then it was overridden by the user. We will use it
33717      # for the tool.
33718
33719      # First remove it from the list of overridden variables, so we can test
33720      # for unknown variables in the end.
33721      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33722
33723      # Check if the provided tool contains a complete path.
33724      tool_specified="$LIPO"
33725      tool_basename="${tool_specified##*/}"
33726      if test "x$tool_basename" = "x$tool_specified"; then
33727        # A command without a complete path is provided, search $PATH.
33728        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
33729$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
33730        # Extract the first word of "$tool_basename", so it can be a program name with args.
33731set dummy $tool_basename; ac_word=$2
33732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33733$as_echo_n "checking for $ac_word... " >&6; }
33734if ${ac_cv_path_LIPO+:} false; then :
33735  $as_echo_n "(cached) " >&6
33736else
33737  case $LIPO in
33738  [\\/]* | ?:[\\/]*)
33739  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33740  ;;
33741  *)
33742  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33743for as_dir in $PATH
33744do
33745  IFS=$as_save_IFS
33746  test -z "$as_dir" && as_dir=.
33747    for ac_exec_ext in '' $ac_executable_extensions; do
33748  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33749    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33750    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33751    break 2
33752  fi
33753done
33754  done
33755IFS=$as_save_IFS
33756
33757  ;;
33758esac
33759fi
33760LIPO=$ac_cv_path_LIPO
33761if test -n "$LIPO"; then
33762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33763$as_echo "$LIPO" >&6; }
33764else
33765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33766$as_echo "no" >&6; }
33767fi
33768
33769
33770        if test "x$LIPO" = x; then
33771          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
33772        fi
33773      else
33774        # Otherwise we believe it is a complete path. Use it as it is.
33775        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
33776$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
33777        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
33778$as_echo_n "checking for LIPO... " >&6; }
33779        if test ! -x "$tool_specified"; then
33780          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33781$as_echo "not found" >&6; }
33782          as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
33783        fi
33784        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33785$as_echo "$tool_specified" >&6; }
33786      fi
33787    fi
33788  fi
33789
33790
33791
33792  # Only process if variable expands to non-empty
33793
33794  if test "x$LIPO" != x; then
33795    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33796
33797  # First separate the path from the arguments. This will split at the first
33798  # space.
33799  complete="$LIPO"
33800  path="${complete%% *}"
33801  tmp="$complete EOL"
33802  arguments="${tmp#* }"
33803
33804  # Input might be given as Windows format, start by converting to
33805  # unix format.
33806  new_path=`$CYGPATH -u "$path"`
33807
33808  # Now try to locate executable using which
33809  new_path=`$WHICH "$new_path" 2> /dev/null`
33810  # bat and cmd files are not always considered executable in cygwin causing which
33811  # to not find them
33812  if test "x$new_path" = x \
33813      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33814      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33815    new_path=`$CYGPATH -u "$path"`
33816  fi
33817  if test "x$new_path" = x; then
33818    # Oops. Which didn't find the executable.
33819    # The splitting of arguments from the executable at a space might have been incorrect,
33820    # since paths with space are more likely in Windows. Give it another try with the whole
33821    # argument.
33822    path="$complete"
33823    arguments="EOL"
33824    new_path=`$CYGPATH -u "$path"`
33825    new_path=`$WHICH "$new_path" 2> /dev/null`
33826    # bat and cmd files are not always considered executable in cygwin causing which
33827    # to not find them
33828    if test "x$new_path" = x \
33829        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33830        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33831      new_path=`$CYGPATH -u "$path"`
33832    fi
33833    if test "x$new_path" = x; then
33834      # It's still not found. Now this is an unrecoverable error.
33835      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33836$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33837      has_space=`$ECHO "$complete" | $GREP " "`
33838      if test "x$has_space" != x; then
33839        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33840$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33841      fi
33842      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33843    fi
33844  fi
33845
33846  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33847  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33848  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33849  # "foo.exe" is OK but "foo" is an error.
33850  #
33851  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33852  # It is also a way to make sure we got the proper file name for the real test later on.
33853  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33854  if test "x$test_shortpath" = x; then
33855    # Short path failed, file does not exist as specified.
33856    # Try adding .exe or .cmd
33857    if test -f "${new_path}.exe"; then
33858      input_to_shortpath="${new_path}.exe"
33859    elif test -f "${new_path}.cmd"; then
33860      input_to_shortpath="${new_path}.cmd"
33861    else
33862      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
33863$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
33864      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33865$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33866      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33867    fi
33868  else
33869    input_to_shortpath="$new_path"
33870  fi
33871
33872  # Call helper function which possibly converts this using DOS-style short mode.
33873  # If so, the updated path is stored in $new_path.
33874  new_path="$input_to_shortpath"
33875
33876  input_path="$input_to_shortpath"
33877  # Check if we need to convert this using DOS-style short mode. If the path
33878  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33879  # take no chances and rewrite it.
33880  # Note: m4 eats our [], so we need to use [ and ] instead.
33881  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33882  if test "x$has_forbidden_chars" != x; then
33883    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33884    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33885    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33886    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33887      # Going to short mode and back again did indeed matter. Since short mode is
33888      # case insensitive, let's make it lowercase to improve readability.
33889      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33890      # Now convert it back to Unix-style (cygpath)
33891      input_path=`$CYGPATH -u "$shortmode_path"`
33892      new_path="$input_path"
33893    fi
33894  fi
33895
33896  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33897  if test "x$test_cygdrive_prefix" = x; then
33898    # As a simple fix, exclude /usr/bin since it's not a real path.
33899    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33900      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33901      # a path prefixed by /cygdrive for fixpath to work.
33902      new_path="$CYGWIN_ROOT_PATH$input_path"
33903    fi
33904  fi
33905
33906  # remove trailing .exe if any
33907  new_path="${new_path/%.exe/}"
33908
33909    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33910
33911  # First separate the path from the arguments. This will split at the first
33912  # space.
33913  complete="$LIPO"
33914  path="${complete%% *}"
33915  tmp="$complete EOL"
33916  arguments="${tmp#* }"
33917
33918  # Input might be given as Windows format, start by converting to
33919  # unix format.
33920  new_path="$path"
33921
33922  windows_path="$new_path"
33923  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33924    unix_path=`$CYGPATH -u "$windows_path"`
33925    new_path="$unix_path"
33926  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33927    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33928    new_path="$unix_path"
33929  fi
33930
33931
33932  # Now try to locate executable using which
33933  new_path=`$WHICH "$new_path" 2> /dev/null`
33934
33935  if test "x$new_path" = x; then
33936    # Oops. Which didn't find the executable.
33937    # The splitting of arguments from the executable at a space might have been incorrect,
33938    # since paths with space are more likely in Windows. Give it another try with the whole
33939    # argument.
33940    path="$complete"
33941    arguments="EOL"
33942    new_path="$path"
33943
33944  windows_path="$new_path"
33945  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33946    unix_path=`$CYGPATH -u "$windows_path"`
33947    new_path="$unix_path"
33948  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33949    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33950    new_path="$unix_path"
33951  fi
33952
33953
33954    new_path=`$WHICH "$new_path" 2> /dev/null`
33955    # bat and cmd files are not always considered executable in MSYS causing which
33956    # to not find them
33957    if test "x$new_path" = x \
33958        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33959        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33960      new_path="$path"
33961
33962  windows_path="$new_path"
33963  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33964    unix_path=`$CYGPATH -u "$windows_path"`
33965    new_path="$unix_path"
33966  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33967    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33968    new_path="$unix_path"
33969  fi
33970
33971    fi
33972
33973    if test "x$new_path" = x; then
33974      # It's still not found. Now this is an unrecoverable error.
33975      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33976$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33977      has_space=`$ECHO "$complete" | $GREP " "`
33978      if test "x$has_space" != x; then
33979        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33980$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33981      fi
33982      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33983    fi
33984  fi
33985
33986  # Now new_path has a complete unix path to the binary
33987  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33988    # Keep paths in /bin as-is, but remove trailing .exe if any
33989    new_path="${new_path/%.exe/}"
33990    # Do not save /bin paths to all_fixpath_prefixes!
33991  else
33992    # Not in mixed or Windows style, start by that.
33993    new_path=`cmd //c echo $new_path`
33994
33995  input_path="$new_path"
33996  # Check if we need to convert this using DOS-style short mode. If the path
33997  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33998  # take no chances and rewrite it.
33999  # Note: m4 eats our [], so we need to use [ and ] instead.
34000  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34001  if test "x$has_forbidden_chars" != x; then
34002    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34003    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34004  fi
34005
34006    # Output is in $new_path
34007
34008  windows_path="$new_path"
34009  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34010    unix_path=`$CYGPATH -u "$windows_path"`
34011    new_path="$unix_path"
34012  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34013    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34014    new_path="$unix_path"
34015  fi
34016
34017    # remove trailing .exe if any
34018    new_path="${new_path/%.exe/}"
34019
34020    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34021    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34022  fi
34023
34024    else
34025      # We're on a unix platform. Hooray! :)
34026      # First separate the path from the arguments. This will split at the first
34027      # space.
34028      complete="$LIPO"
34029      path="${complete%% *}"
34030      tmp="$complete EOL"
34031      arguments="${tmp#* }"
34032
34033      # Cannot rely on the command "which" here since it doesn't always work.
34034      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34035      if test -z "$is_absolute_path"; then
34036        # Path to executable is not absolute. Find it.
34037        IFS_save="$IFS"
34038        IFS=:
34039        for p in $PATH; do
34040          if test -f "$p/$path" && test -x "$p/$path"; then
34041            new_path="$p/$path"
34042            break
34043          fi
34044        done
34045        IFS="$IFS_save"
34046      else
34047        # This is an absolute path, we can use it without further modifications.
34048        new_path="$path"
34049      fi
34050
34051      if test "x$new_path" = x; then
34052        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
34053$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
34054        has_space=`$ECHO "$complete" | $GREP " "`
34055        if test "x$has_space" != x; then
34056          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34057$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34058        fi
34059        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34060      fi
34061    fi
34062
34063    # Now join together the path and the arguments once again
34064    if test "x$arguments" != xEOL; then
34065      new_complete="$new_path ${arguments% *}"
34066    else
34067      new_complete="$new_path"
34068    fi
34069
34070    if test "x$complete" != "x$new_complete"; then
34071      LIPO="$new_complete"
34072      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
34073$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
34074    fi
34075  fi
34076
34077  fi
34078
34079  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34080    # Extract the first word of "mt", so it can be a program name with args.
34081set dummy mt; ac_word=$2
34082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34083$as_echo_n "checking for $ac_word... " >&6; }
34084if ${ac_cv_prog_MT+:} false; then :
34085  $as_echo_n "(cached) " >&6
34086else
34087  if test -n "$MT"; then
34088  ac_cv_prog_MT="$MT" # Let the user override the test.
34089else
34090  ac_prog_rejected=no
34091as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34092for as_dir in $PATH
34093do
34094  IFS=$as_save_IFS
34095  test -z "$as_dir" && as_dir=.
34096    for ac_exec_ext in '' $ac_executable_extensions; do
34097  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34098    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
34099       ac_prog_rejected=yes
34100       continue
34101     fi
34102    ac_cv_prog_MT="mt"
34103    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34104    break 2
34105  fi
34106done
34107  done
34108IFS=$as_save_IFS
34109
34110if test $ac_prog_rejected = yes; then
34111  # We found a bogon in the path, so make sure we never use it.
34112  set dummy $ac_cv_prog_MT
34113  shift
34114  if test $# != 0; then
34115    # We chose a different compiler from the bogus one.
34116    # However, it has the same basename, so the bogon will be chosen
34117    # first if we set MT to just the basename; use the full file name.
34118    shift
34119    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
34120  fi
34121fi
34122fi
34123fi
34124MT=$ac_cv_prog_MT
34125if test -n "$MT"; then
34126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
34127$as_echo "$MT" >&6; }
34128else
34129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34130$as_echo "no" >&6; }
34131fi
34132
34133
34134
34135  # Only process if variable expands to non-empty
34136
34137  if test "x$MT" != x; then
34138    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34139
34140  # First separate the path from the arguments. This will split at the first
34141  # space.
34142  complete="$MT"
34143  path="${complete%% *}"
34144  tmp="$complete EOL"
34145  arguments="${tmp#* }"
34146
34147  # Input might be given as Windows format, start by converting to
34148  # unix format.
34149  new_path=`$CYGPATH -u "$path"`
34150
34151  # Now try to locate executable using which
34152  new_path=`$WHICH "$new_path" 2> /dev/null`
34153  # bat and cmd files are not always considered executable in cygwin causing which
34154  # to not find them
34155  if test "x$new_path" = x \
34156      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34157      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34158    new_path=`$CYGPATH -u "$path"`
34159  fi
34160  if test "x$new_path" = x; then
34161    # Oops. Which didn't find the executable.
34162    # The splitting of arguments from the executable at a space might have been incorrect,
34163    # since paths with space are more likely in Windows. Give it another try with the whole
34164    # argument.
34165    path="$complete"
34166    arguments="EOL"
34167    new_path=`$CYGPATH -u "$path"`
34168    new_path=`$WHICH "$new_path" 2> /dev/null`
34169    # bat and cmd files are not always considered executable in cygwin causing which
34170    # to not find them
34171    if test "x$new_path" = x \
34172        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34173        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34174      new_path=`$CYGPATH -u "$path"`
34175    fi
34176    if test "x$new_path" = x; then
34177      # It's still not found. Now this is an unrecoverable error.
34178      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34179$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34180      has_space=`$ECHO "$complete" | $GREP " "`
34181      if test "x$has_space" != x; then
34182        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34183$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34184      fi
34185      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34186    fi
34187  fi
34188
34189  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34190  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34191  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34192  # "foo.exe" is OK but "foo" is an error.
34193  #
34194  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34195  # It is also a way to make sure we got the proper file name for the real test later on.
34196  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34197  if test "x$test_shortpath" = x; then
34198    # Short path failed, file does not exist as specified.
34199    # Try adding .exe or .cmd
34200    if test -f "${new_path}.exe"; then
34201      input_to_shortpath="${new_path}.exe"
34202    elif test -f "${new_path}.cmd"; then
34203      input_to_shortpath="${new_path}.cmd"
34204    else
34205      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
34206$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
34207      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34208$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34209      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34210    fi
34211  else
34212    input_to_shortpath="$new_path"
34213  fi
34214
34215  # Call helper function which possibly converts this using DOS-style short mode.
34216  # If so, the updated path is stored in $new_path.
34217  new_path="$input_to_shortpath"
34218
34219  input_path="$input_to_shortpath"
34220  # Check if we need to convert this using DOS-style short mode. If the path
34221  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34222  # take no chances and rewrite it.
34223  # Note: m4 eats our [], so we need to use [ and ] instead.
34224  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34225  if test "x$has_forbidden_chars" != x; then
34226    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34227    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34228    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34229    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34230      # Going to short mode and back again did indeed matter. Since short mode is
34231      # case insensitive, let's make it lowercase to improve readability.
34232      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34233      # Now convert it back to Unix-style (cygpath)
34234      input_path=`$CYGPATH -u "$shortmode_path"`
34235      new_path="$input_path"
34236    fi
34237  fi
34238
34239  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34240  if test "x$test_cygdrive_prefix" = x; then
34241    # As a simple fix, exclude /usr/bin since it's not a real path.
34242    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34243      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34244      # a path prefixed by /cygdrive for fixpath to work.
34245      new_path="$CYGWIN_ROOT_PATH$input_path"
34246    fi
34247  fi
34248
34249  # remove trailing .exe if any
34250  new_path="${new_path/%.exe/}"
34251
34252    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34253
34254  # First separate the path from the arguments. This will split at the first
34255  # space.
34256  complete="$MT"
34257  path="${complete%% *}"
34258  tmp="$complete EOL"
34259  arguments="${tmp#* }"
34260
34261  # Input might be given as Windows format, start by converting to
34262  # unix format.
34263  new_path="$path"
34264
34265  windows_path="$new_path"
34266  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34267    unix_path=`$CYGPATH -u "$windows_path"`
34268    new_path="$unix_path"
34269  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34270    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34271    new_path="$unix_path"
34272  fi
34273
34274
34275  # Now try to locate executable using which
34276  new_path=`$WHICH "$new_path" 2> /dev/null`
34277
34278  if test "x$new_path" = x; then
34279    # Oops. Which didn't find the executable.
34280    # The splitting of arguments from the executable at a space might have been incorrect,
34281    # since paths with space are more likely in Windows. Give it another try with the whole
34282    # argument.
34283    path="$complete"
34284    arguments="EOL"
34285    new_path="$path"
34286
34287  windows_path="$new_path"
34288  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34289    unix_path=`$CYGPATH -u "$windows_path"`
34290    new_path="$unix_path"
34291  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34292    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34293    new_path="$unix_path"
34294  fi
34295
34296
34297    new_path=`$WHICH "$new_path" 2> /dev/null`
34298    # bat and cmd files are not always considered executable in MSYS causing which
34299    # to not find them
34300    if test "x$new_path" = x \
34301        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34302        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34303      new_path="$path"
34304
34305  windows_path="$new_path"
34306  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34307    unix_path=`$CYGPATH -u "$windows_path"`
34308    new_path="$unix_path"
34309  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34310    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34311    new_path="$unix_path"
34312  fi
34313
34314    fi
34315
34316    if test "x$new_path" = x; then
34317      # It's still not found. Now this is an unrecoverable error.
34318      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34319$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34320      has_space=`$ECHO "$complete" | $GREP " "`
34321      if test "x$has_space" != x; then
34322        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34323$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34324      fi
34325      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34326    fi
34327  fi
34328
34329  # Now new_path has a complete unix path to the binary
34330  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34331    # Keep paths in /bin as-is, but remove trailing .exe if any
34332    new_path="${new_path/%.exe/}"
34333    # Do not save /bin paths to all_fixpath_prefixes!
34334  else
34335    # Not in mixed or Windows style, start by that.
34336    new_path=`cmd //c echo $new_path`
34337
34338  input_path="$new_path"
34339  # Check if we need to convert this using DOS-style short mode. If the path
34340  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34341  # take no chances and rewrite it.
34342  # Note: m4 eats our [], so we need to use [ and ] instead.
34343  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34344  if test "x$has_forbidden_chars" != x; then
34345    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34346    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34347  fi
34348
34349    # Output is in $new_path
34350
34351  windows_path="$new_path"
34352  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34353    unix_path=`$CYGPATH -u "$windows_path"`
34354    new_path="$unix_path"
34355  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34356    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34357    new_path="$unix_path"
34358  fi
34359
34360    # remove trailing .exe if any
34361    new_path="${new_path/%.exe/}"
34362
34363    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34364    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34365  fi
34366
34367    else
34368      # We're on a unix platform. Hooray! :)
34369      # First separate the path from the arguments. This will split at the first
34370      # space.
34371      complete="$MT"
34372      path="${complete%% *}"
34373      tmp="$complete EOL"
34374      arguments="${tmp#* }"
34375
34376      # Cannot rely on the command "which" here since it doesn't always work.
34377      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34378      if test -z "$is_absolute_path"; then
34379        # Path to executable is not absolute. Find it.
34380        IFS_save="$IFS"
34381        IFS=:
34382        for p in $PATH; do
34383          if test -f "$p/$path" && test -x "$p/$path"; then
34384            new_path="$p/$path"
34385            break
34386          fi
34387        done
34388        IFS="$IFS_save"
34389      else
34390        # This is an absolute path, we can use it without further modifications.
34391        new_path="$path"
34392      fi
34393
34394      if test "x$new_path" = x; then
34395        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34396$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34397        has_space=`$ECHO "$complete" | $GREP " "`
34398        if test "x$has_space" != x; then
34399          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34400$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34401        fi
34402        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34403      fi
34404    fi
34405
34406    # Now join together the path and the arguments once again
34407    if test "x$arguments" != xEOL; then
34408      new_complete="$new_path ${arguments% *}"
34409    else
34410      new_complete="$new_path"
34411    fi
34412
34413    if test "x$complete" != "x$new_complete"; then
34414      MT="$new_complete"
34415      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
34416$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
34417    fi
34418  fi
34419
34420    # Setup the resource compiler (RC)
34421    # Extract the first word of "rc", so it can be a program name with args.
34422set dummy rc; ac_word=$2
34423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34424$as_echo_n "checking for $ac_word... " >&6; }
34425if ${ac_cv_prog_RC+:} false; then :
34426  $as_echo_n "(cached) " >&6
34427else
34428  if test -n "$RC"; then
34429  ac_cv_prog_RC="$RC" # Let the user override the test.
34430else
34431  ac_prog_rejected=no
34432as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34433for as_dir in $PATH
34434do
34435  IFS=$as_save_IFS
34436  test -z "$as_dir" && as_dir=.
34437    for ac_exec_ext in '' $ac_executable_extensions; do
34438  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34439    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
34440       ac_prog_rejected=yes
34441       continue
34442     fi
34443    ac_cv_prog_RC="rc"
34444    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34445    break 2
34446  fi
34447done
34448  done
34449IFS=$as_save_IFS
34450
34451if test $ac_prog_rejected = yes; then
34452  # We found a bogon in the path, so make sure we never use it.
34453  set dummy $ac_cv_prog_RC
34454  shift
34455  if test $# != 0; then
34456    # We chose a different compiler from the bogus one.
34457    # However, it has the same basename, so the bogon will be chosen
34458    # first if we set RC to just the basename; use the full file name.
34459    shift
34460    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
34461  fi
34462fi
34463fi
34464fi
34465RC=$ac_cv_prog_RC
34466if test -n "$RC"; then
34467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
34468$as_echo "$RC" >&6; }
34469else
34470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34471$as_echo "no" >&6; }
34472fi
34473
34474
34475
34476  # Only process if variable expands to non-empty
34477
34478  if test "x$RC" != x; then
34479    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34480
34481  # First separate the path from the arguments. This will split at the first
34482  # space.
34483  complete="$RC"
34484  path="${complete%% *}"
34485  tmp="$complete EOL"
34486  arguments="${tmp#* }"
34487
34488  # Input might be given as Windows format, start by converting to
34489  # unix format.
34490  new_path=`$CYGPATH -u "$path"`
34491
34492  # Now try to locate executable using which
34493  new_path=`$WHICH "$new_path" 2> /dev/null`
34494  # bat and cmd files are not always considered executable in cygwin causing which
34495  # to not find them
34496  if test "x$new_path" = x \
34497      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34498      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34499    new_path=`$CYGPATH -u "$path"`
34500  fi
34501  if test "x$new_path" = x; then
34502    # Oops. Which didn't find the executable.
34503    # The splitting of arguments from the executable at a space might have been incorrect,
34504    # since paths with space are more likely in Windows. Give it another try with the whole
34505    # argument.
34506    path="$complete"
34507    arguments="EOL"
34508    new_path=`$CYGPATH -u "$path"`
34509    new_path=`$WHICH "$new_path" 2> /dev/null`
34510    # bat and cmd files are not always considered executable in cygwin causing which
34511    # to not find them
34512    if test "x$new_path" = x \
34513        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34514        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34515      new_path=`$CYGPATH -u "$path"`
34516    fi
34517    if test "x$new_path" = x; then
34518      # It's still not found. Now this is an unrecoverable error.
34519      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34520$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34521      has_space=`$ECHO "$complete" | $GREP " "`
34522      if test "x$has_space" != x; then
34523        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34524$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34525      fi
34526      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34527    fi
34528  fi
34529
34530  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34531  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34532  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34533  # "foo.exe" is OK but "foo" is an error.
34534  #
34535  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34536  # It is also a way to make sure we got the proper file name for the real test later on.
34537  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34538  if test "x$test_shortpath" = x; then
34539    # Short path failed, file does not exist as specified.
34540    # Try adding .exe or .cmd
34541    if test -f "${new_path}.exe"; then
34542      input_to_shortpath="${new_path}.exe"
34543    elif test -f "${new_path}.cmd"; then
34544      input_to_shortpath="${new_path}.cmd"
34545    else
34546      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
34547$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
34548      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34549$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34550      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34551    fi
34552  else
34553    input_to_shortpath="$new_path"
34554  fi
34555
34556  # Call helper function which possibly converts this using DOS-style short mode.
34557  # If so, the updated path is stored in $new_path.
34558  new_path="$input_to_shortpath"
34559
34560  input_path="$input_to_shortpath"
34561  # Check if we need to convert this using DOS-style short mode. If the path
34562  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34563  # take no chances and rewrite it.
34564  # Note: m4 eats our [], so we need to use [ and ] instead.
34565  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34566  if test "x$has_forbidden_chars" != x; then
34567    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34568    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34569    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34570    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34571      # Going to short mode and back again did indeed matter. Since short mode is
34572      # case insensitive, let's make it lowercase to improve readability.
34573      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34574      # Now convert it back to Unix-style (cygpath)
34575      input_path=`$CYGPATH -u "$shortmode_path"`
34576      new_path="$input_path"
34577    fi
34578  fi
34579
34580  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34581  if test "x$test_cygdrive_prefix" = x; then
34582    # As a simple fix, exclude /usr/bin since it's not a real path.
34583    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34584      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34585      # a path prefixed by /cygdrive for fixpath to work.
34586      new_path="$CYGWIN_ROOT_PATH$input_path"
34587    fi
34588  fi
34589
34590  # remove trailing .exe if any
34591  new_path="${new_path/%.exe/}"
34592
34593    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34594
34595  # First separate the path from the arguments. This will split at the first
34596  # space.
34597  complete="$RC"
34598  path="${complete%% *}"
34599  tmp="$complete EOL"
34600  arguments="${tmp#* }"
34601
34602  # Input might be given as Windows format, start by converting to
34603  # unix format.
34604  new_path="$path"
34605
34606  windows_path="$new_path"
34607  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34608    unix_path=`$CYGPATH -u "$windows_path"`
34609    new_path="$unix_path"
34610  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34611    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34612    new_path="$unix_path"
34613  fi
34614
34615
34616  # Now try to locate executable using which
34617  new_path=`$WHICH "$new_path" 2> /dev/null`
34618
34619  if test "x$new_path" = x; then
34620    # Oops. Which didn't find the executable.
34621    # The splitting of arguments from the executable at a space might have been incorrect,
34622    # since paths with space are more likely in Windows. Give it another try with the whole
34623    # argument.
34624    path="$complete"
34625    arguments="EOL"
34626    new_path="$path"
34627
34628  windows_path="$new_path"
34629  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34630    unix_path=`$CYGPATH -u "$windows_path"`
34631    new_path="$unix_path"
34632  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34633    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34634    new_path="$unix_path"
34635  fi
34636
34637
34638    new_path=`$WHICH "$new_path" 2> /dev/null`
34639    # bat and cmd files are not always considered executable in MSYS causing which
34640    # to not find them
34641    if test "x$new_path" = x \
34642        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34643        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34644      new_path="$path"
34645
34646  windows_path="$new_path"
34647  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34648    unix_path=`$CYGPATH -u "$windows_path"`
34649    new_path="$unix_path"
34650  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34651    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34652    new_path="$unix_path"
34653  fi
34654
34655    fi
34656
34657    if test "x$new_path" = x; then
34658      # It's still not found. Now this is an unrecoverable error.
34659      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34660$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34661      has_space=`$ECHO "$complete" | $GREP " "`
34662      if test "x$has_space" != x; then
34663        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34664$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34665      fi
34666      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34667    fi
34668  fi
34669
34670  # Now new_path has a complete unix path to the binary
34671  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34672    # Keep paths in /bin as-is, but remove trailing .exe if any
34673    new_path="${new_path/%.exe/}"
34674    # Do not save /bin paths to all_fixpath_prefixes!
34675  else
34676    # Not in mixed or Windows style, start by that.
34677    new_path=`cmd //c echo $new_path`
34678
34679  input_path="$new_path"
34680  # Check if we need to convert this using DOS-style short mode. If the path
34681  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34682  # take no chances and rewrite it.
34683  # Note: m4 eats our [], so we need to use [ and ] instead.
34684  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34685  if test "x$has_forbidden_chars" != x; then
34686    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34687    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34688  fi
34689
34690    # Output is in $new_path
34691
34692  windows_path="$new_path"
34693  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34694    unix_path=`$CYGPATH -u "$windows_path"`
34695    new_path="$unix_path"
34696  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34697    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34698    new_path="$unix_path"
34699  fi
34700
34701    # remove trailing .exe if any
34702    new_path="${new_path/%.exe/}"
34703
34704    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34705    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34706  fi
34707
34708    else
34709      # We're on a unix platform. Hooray! :)
34710      # First separate the path from the arguments. This will split at the first
34711      # space.
34712      complete="$RC"
34713      path="${complete%% *}"
34714      tmp="$complete EOL"
34715      arguments="${tmp#* }"
34716
34717      # Cannot rely on the command "which" here since it doesn't always work.
34718      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34719      if test -z "$is_absolute_path"; then
34720        # Path to executable is not absolute. Find it.
34721        IFS_save="$IFS"
34722        IFS=:
34723        for p in $PATH; do
34724          if test -f "$p/$path" && test -x "$p/$path"; then
34725            new_path="$p/$path"
34726            break
34727          fi
34728        done
34729        IFS="$IFS_save"
34730      else
34731        # This is an absolute path, we can use it without further modifications.
34732        new_path="$path"
34733      fi
34734
34735      if test "x$new_path" = x; then
34736        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34737$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34738        has_space=`$ECHO "$complete" | $GREP " "`
34739        if test "x$has_space" != x; then
34740          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34741$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34742        fi
34743        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34744      fi
34745    fi
34746
34747    # Now join together the path and the arguments once again
34748    if test "x$arguments" != xEOL; then
34749      new_complete="$new_path ${arguments% *}"
34750    else
34751      new_complete="$new_path"
34752    fi
34753
34754    if test "x$complete" != "x$new_complete"; then
34755      RC="$new_complete"
34756      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
34757$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
34758    fi
34759  fi
34760
34761    # Extract the first word of "dumpbin", so it can be a program name with args.
34762set dummy dumpbin; ac_word=$2
34763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34764$as_echo_n "checking for $ac_word... " >&6; }
34765if ${ac_cv_prog_DUMPBIN+:} false; then :
34766  $as_echo_n "(cached) " >&6
34767else
34768  if test -n "$DUMPBIN"; then
34769  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
34770else
34771as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34772for as_dir in $PATH
34773do
34774  IFS=$as_save_IFS
34775  test -z "$as_dir" && as_dir=.
34776    for ac_exec_ext in '' $ac_executable_extensions; do
34777  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34778    ac_cv_prog_DUMPBIN="dumpbin"
34779    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34780    break 2
34781  fi
34782done
34783  done
34784IFS=$as_save_IFS
34785
34786fi
34787fi
34788DUMPBIN=$ac_cv_prog_DUMPBIN
34789if test -n "$DUMPBIN"; then
34790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
34791$as_echo "$DUMPBIN" >&6; }
34792else
34793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34794$as_echo "no" >&6; }
34795fi
34796
34797
34798
34799  # Only process if variable expands to non-empty
34800
34801  if test "x$DUMPBIN" != x; then
34802    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34803
34804  # First separate the path from the arguments. This will split at the first
34805  # space.
34806  complete="$DUMPBIN"
34807  path="${complete%% *}"
34808  tmp="$complete EOL"
34809  arguments="${tmp#* }"
34810
34811  # Input might be given as Windows format, start by converting to
34812  # unix format.
34813  new_path=`$CYGPATH -u "$path"`
34814
34815  # Now try to locate executable using which
34816  new_path=`$WHICH "$new_path" 2> /dev/null`
34817  # bat and cmd files are not always considered executable in cygwin causing which
34818  # to not find them
34819  if test "x$new_path" = x \
34820      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34821      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34822    new_path=`$CYGPATH -u "$path"`
34823  fi
34824  if test "x$new_path" = x; then
34825    # Oops. Which didn't find the executable.
34826    # The splitting of arguments from the executable at a space might have been incorrect,
34827    # since paths with space are more likely in Windows. Give it another try with the whole
34828    # argument.
34829    path="$complete"
34830    arguments="EOL"
34831    new_path=`$CYGPATH -u "$path"`
34832    new_path=`$WHICH "$new_path" 2> /dev/null`
34833    # bat and cmd files are not always considered executable in cygwin causing which
34834    # to not find them
34835    if test "x$new_path" = x \
34836        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34837        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34838      new_path=`$CYGPATH -u "$path"`
34839    fi
34840    if test "x$new_path" = x; then
34841      # It's still not found. Now this is an unrecoverable error.
34842      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34843$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34844      has_space=`$ECHO "$complete" | $GREP " "`
34845      if test "x$has_space" != x; then
34846        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34847$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34848      fi
34849      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34850    fi
34851  fi
34852
34853  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34854  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34855  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34856  # "foo.exe" is OK but "foo" is an error.
34857  #
34858  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34859  # It is also a way to make sure we got the proper file name for the real test later on.
34860  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34861  if test "x$test_shortpath" = x; then
34862    # Short path failed, file does not exist as specified.
34863    # Try adding .exe or .cmd
34864    if test -f "${new_path}.exe"; then
34865      input_to_shortpath="${new_path}.exe"
34866    elif test -f "${new_path}.cmd"; then
34867      input_to_shortpath="${new_path}.cmd"
34868    else
34869      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
34870$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
34871      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34872$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34873      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34874    fi
34875  else
34876    input_to_shortpath="$new_path"
34877  fi
34878
34879  # Call helper function which possibly converts this using DOS-style short mode.
34880  # If so, the updated path is stored in $new_path.
34881  new_path="$input_to_shortpath"
34882
34883  input_path="$input_to_shortpath"
34884  # Check if we need to convert this using DOS-style short mode. If the path
34885  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34886  # take no chances and rewrite it.
34887  # Note: m4 eats our [], so we need to use [ and ] instead.
34888  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34889  if test "x$has_forbidden_chars" != x; then
34890    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34891    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34892    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34893    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34894      # Going to short mode and back again did indeed matter. Since short mode is
34895      # case insensitive, let's make it lowercase to improve readability.
34896      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34897      # Now convert it back to Unix-style (cygpath)
34898      input_path=`$CYGPATH -u "$shortmode_path"`
34899      new_path="$input_path"
34900    fi
34901  fi
34902
34903  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34904  if test "x$test_cygdrive_prefix" = x; then
34905    # As a simple fix, exclude /usr/bin since it's not a real path.
34906    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34907      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34908      # a path prefixed by /cygdrive for fixpath to work.
34909      new_path="$CYGWIN_ROOT_PATH$input_path"
34910    fi
34911  fi
34912
34913  # remove trailing .exe if any
34914  new_path="${new_path/%.exe/}"
34915
34916    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34917
34918  # First separate the path from the arguments. This will split at the first
34919  # space.
34920  complete="$DUMPBIN"
34921  path="${complete%% *}"
34922  tmp="$complete EOL"
34923  arguments="${tmp#* }"
34924
34925  # Input might be given as Windows format, start by converting to
34926  # unix format.
34927  new_path="$path"
34928
34929  windows_path="$new_path"
34930  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34931    unix_path=`$CYGPATH -u "$windows_path"`
34932    new_path="$unix_path"
34933  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34934    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34935    new_path="$unix_path"
34936  fi
34937
34938
34939  # Now try to locate executable using which
34940  new_path=`$WHICH "$new_path" 2> /dev/null`
34941
34942  if test "x$new_path" = x; then
34943    # Oops. Which didn't find the executable.
34944    # The splitting of arguments from the executable at a space might have been incorrect,
34945    # since paths with space are more likely in Windows. Give it another try with the whole
34946    # argument.
34947    path="$complete"
34948    arguments="EOL"
34949    new_path="$path"
34950
34951  windows_path="$new_path"
34952  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34953    unix_path=`$CYGPATH -u "$windows_path"`
34954    new_path="$unix_path"
34955  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34956    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34957    new_path="$unix_path"
34958  fi
34959
34960
34961    new_path=`$WHICH "$new_path" 2> /dev/null`
34962    # bat and cmd files are not always considered executable in MSYS causing which
34963    # to not find them
34964    if test "x$new_path" = x \
34965        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34966        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34967      new_path="$path"
34968
34969  windows_path="$new_path"
34970  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34971    unix_path=`$CYGPATH -u "$windows_path"`
34972    new_path="$unix_path"
34973  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34974    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34975    new_path="$unix_path"
34976  fi
34977
34978    fi
34979
34980    if test "x$new_path" = x; then
34981      # It's still not found. Now this is an unrecoverable error.
34982      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34983$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34984      has_space=`$ECHO "$complete" | $GREP " "`
34985      if test "x$has_space" != x; then
34986        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34987$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34988      fi
34989      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34990    fi
34991  fi
34992
34993  # Now new_path has a complete unix path to the binary
34994  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34995    # Keep paths in /bin as-is, but remove trailing .exe if any
34996    new_path="${new_path/%.exe/}"
34997    # Do not save /bin paths to all_fixpath_prefixes!
34998  else
34999    # Not in mixed or Windows style, start by that.
35000    new_path=`cmd //c echo $new_path`
35001
35002  input_path="$new_path"
35003  # Check if we need to convert this using DOS-style short mode. If the path
35004  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35005  # take no chances and rewrite it.
35006  # Note: m4 eats our [], so we need to use [ and ] instead.
35007  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35008  if test "x$has_forbidden_chars" != x; then
35009    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35010    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35011  fi
35012
35013    # Output is in $new_path
35014
35015  windows_path="$new_path"
35016  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35017    unix_path=`$CYGPATH -u "$windows_path"`
35018    new_path="$unix_path"
35019  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35020    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35021    new_path="$unix_path"
35022  fi
35023
35024    # remove trailing .exe if any
35025    new_path="${new_path/%.exe/}"
35026
35027    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35028    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35029  fi
35030
35031    else
35032      # We're on a unix platform. Hooray! :)
35033      # First separate the path from the arguments. This will split at the first
35034      # space.
35035      complete="$DUMPBIN"
35036      path="${complete%% *}"
35037      tmp="$complete EOL"
35038      arguments="${tmp#* }"
35039
35040      # Cannot rely on the command "which" here since it doesn't always work.
35041      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35042      if test -z "$is_absolute_path"; then
35043        # Path to executable is not absolute. Find it.
35044        IFS_save="$IFS"
35045        IFS=:
35046        for p in $PATH; do
35047          if test -f "$p/$path" && test -x "$p/$path"; then
35048            new_path="$p/$path"
35049            break
35050          fi
35051        done
35052        IFS="$IFS_save"
35053      else
35054        # This is an absolute path, we can use it without further modifications.
35055        new_path="$path"
35056      fi
35057
35058      if test "x$new_path" = x; then
35059        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35060$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35061        has_space=`$ECHO "$complete" | $GREP " "`
35062        if test "x$has_space" != x; then
35063          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35064$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35065        fi
35066        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35067      fi
35068    fi
35069
35070    # Now join together the path and the arguments once again
35071    if test "x$arguments" != xEOL; then
35072      new_complete="$new_path ${arguments% *}"
35073    else
35074      new_complete="$new_path"
35075    fi
35076
35077    if test "x$complete" != "x$new_complete"; then
35078      DUMPBIN="$new_complete"
35079      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
35080$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
35081    fi
35082  fi
35083
35084    # We need to check for 'msbuild.exe' because at the place where we expect to
35085    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
35086    # won't find the 'msbuild.exe' executable in that case (and the
35087    # 'ac_executable_extensions' is unusable due to performance reasons).
35088    # Notice that we intentionally don't fix up the path to MSBUILD because we
35089    # will call it in a DOS shell during freetype detection on Windows (see
35090    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
35091    # Extract the first word of "msbuild.exe", so it can be a program name with args.
35092set dummy msbuild.exe; ac_word=$2
35093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35094$as_echo_n "checking for $ac_word... " >&6; }
35095if ${ac_cv_prog_MSBUILD+:} false; then :
35096  $as_echo_n "(cached) " >&6
35097else
35098  if test -n "$MSBUILD"; then
35099  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
35100else
35101as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35102for as_dir in $PATH
35103do
35104  IFS=$as_save_IFS
35105  test -z "$as_dir" && as_dir=.
35106    for ac_exec_ext in '' $ac_executable_extensions; do
35107  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35108    ac_cv_prog_MSBUILD="msbuild.exe"
35109    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35110    break 2
35111  fi
35112done
35113  done
35114IFS=$as_save_IFS
35115
35116fi
35117fi
35118MSBUILD=$ac_cv_prog_MSBUILD
35119if test -n "$MSBUILD"; then
35120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
35121$as_echo "$MSBUILD" >&6; }
35122else
35123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35124$as_echo "no" >&6; }
35125fi
35126
35127
35128  fi
35129
35130  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
35131
35132
35133  # Publish this variable in the help.
35134
35135
35136  if test "x$STRIP" = x; then
35137    # The variable is not set by user, try to locate tool using the code snippet
35138    for ac_prog in strip
35139do
35140  # Extract the first word of "$ac_prog", so it can be a program name with args.
35141set dummy $ac_prog; ac_word=$2
35142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35143$as_echo_n "checking for $ac_word... " >&6; }
35144if ${ac_cv_path_STRIP+:} false; then :
35145  $as_echo_n "(cached) " >&6
35146else
35147  case $STRIP in
35148  [\\/]* | ?:[\\/]*)
35149  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35150  ;;
35151  *)
35152  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35153for as_dir in $PATH
35154do
35155  IFS=$as_save_IFS
35156  test -z "$as_dir" && as_dir=.
35157    for ac_exec_ext in '' $ac_executable_extensions; do
35158  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35159    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35160    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35161    break 2
35162  fi
35163done
35164  done
35165IFS=$as_save_IFS
35166
35167  ;;
35168esac
35169fi
35170STRIP=$ac_cv_path_STRIP
35171if test -n "$STRIP"; then
35172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35173$as_echo "$STRIP" >&6; }
35174else
35175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35176$as_echo "no" >&6; }
35177fi
35178
35179
35180  test -n "$STRIP" && break
35181done
35182
35183  else
35184    # The variable is set, but is it from the command line or the environment?
35185
35186    # Try to remove the string !STRIP! from our list.
35187    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
35188    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35189      # If it failed, the variable was not from the command line. Ignore it,
35190      # but warn the user (except for BASH, which is always set by the calling BASH).
35191      if test "xSTRIP" != xBASH; then
35192        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
35193$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
35194      fi
35195      # Try to locate tool using the code snippet
35196      for ac_prog in strip
35197do
35198  # Extract the first word of "$ac_prog", so it can be a program name with args.
35199set dummy $ac_prog; ac_word=$2
35200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35201$as_echo_n "checking for $ac_word... " >&6; }
35202if ${ac_cv_path_STRIP+:} false; then :
35203  $as_echo_n "(cached) " >&6
35204else
35205  case $STRIP in
35206  [\\/]* | ?:[\\/]*)
35207  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35208  ;;
35209  *)
35210  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35211for as_dir in $PATH
35212do
35213  IFS=$as_save_IFS
35214  test -z "$as_dir" && as_dir=.
35215    for ac_exec_ext in '' $ac_executable_extensions; do
35216  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35217    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35218    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35219    break 2
35220  fi
35221done
35222  done
35223IFS=$as_save_IFS
35224
35225  ;;
35226esac
35227fi
35228STRIP=$ac_cv_path_STRIP
35229if test -n "$STRIP"; then
35230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35231$as_echo "$STRIP" >&6; }
35232else
35233  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35234$as_echo "no" >&6; }
35235fi
35236
35237
35238  test -n "$STRIP" && break
35239done
35240
35241    else
35242      # If it succeeded, then it was overridden by the user. We will use it
35243      # for the tool.
35244
35245      # First remove it from the list of overridden variables, so we can test
35246      # for unknown variables in the end.
35247      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35248
35249      # Check if the provided tool contains a complete path.
35250      tool_specified="$STRIP"
35251      tool_basename="${tool_specified##*/}"
35252      if test "x$tool_basename" = "x$tool_specified"; then
35253        # A command without a complete path is provided, search $PATH.
35254        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
35255$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
35256        # Extract the first word of "$tool_basename", so it can be a program name with args.
35257set dummy $tool_basename; ac_word=$2
35258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35259$as_echo_n "checking for $ac_word... " >&6; }
35260if ${ac_cv_path_STRIP+:} false; then :
35261  $as_echo_n "(cached) " >&6
35262else
35263  case $STRIP in
35264  [\\/]* | ?:[\\/]*)
35265  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35266  ;;
35267  *)
35268  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35269for as_dir in $PATH
35270do
35271  IFS=$as_save_IFS
35272  test -z "$as_dir" && as_dir=.
35273    for ac_exec_ext in '' $ac_executable_extensions; do
35274  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35275    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35276    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35277    break 2
35278  fi
35279done
35280  done
35281IFS=$as_save_IFS
35282
35283  ;;
35284esac
35285fi
35286STRIP=$ac_cv_path_STRIP
35287if test -n "$STRIP"; then
35288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35289$as_echo "$STRIP" >&6; }
35290else
35291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35292$as_echo "no" >&6; }
35293fi
35294
35295
35296        if test "x$STRIP" = x; then
35297          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35298        fi
35299      else
35300        # Otherwise we believe it is a complete path. Use it as it is.
35301        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
35302$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
35303        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
35304$as_echo_n "checking for STRIP... " >&6; }
35305        if test ! -x "$tool_specified"; then
35306          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35307$as_echo "not found" >&6; }
35308          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
35309        fi
35310        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35311$as_echo "$tool_specified" >&6; }
35312      fi
35313    fi
35314  fi
35315
35316
35317
35318  # Only process if variable expands to non-empty
35319
35320  if test "x$STRIP" != x; then
35321    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35322
35323  # First separate the path from the arguments. This will split at the first
35324  # space.
35325  complete="$STRIP"
35326  path="${complete%% *}"
35327  tmp="$complete EOL"
35328  arguments="${tmp#* }"
35329
35330  # Input might be given as Windows format, start by converting to
35331  # unix format.
35332  new_path=`$CYGPATH -u "$path"`
35333
35334  # Now try to locate executable using which
35335  new_path=`$WHICH "$new_path" 2> /dev/null`
35336  # bat and cmd files are not always considered executable in cygwin causing which
35337  # to not find them
35338  if test "x$new_path" = x \
35339      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35340      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35341    new_path=`$CYGPATH -u "$path"`
35342  fi
35343  if test "x$new_path" = x; then
35344    # Oops. Which didn't find the executable.
35345    # The splitting of arguments from the executable at a space might have been incorrect,
35346    # since paths with space are more likely in Windows. Give it another try with the whole
35347    # argument.
35348    path="$complete"
35349    arguments="EOL"
35350    new_path=`$CYGPATH -u "$path"`
35351    new_path=`$WHICH "$new_path" 2> /dev/null`
35352    # bat and cmd files are not always considered executable in cygwin causing which
35353    # to not find them
35354    if test "x$new_path" = x \
35355        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35356        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35357      new_path=`$CYGPATH -u "$path"`
35358    fi
35359    if test "x$new_path" = x; then
35360      # It's still not found. Now this is an unrecoverable error.
35361      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35362$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35363      has_space=`$ECHO "$complete" | $GREP " "`
35364      if test "x$has_space" != x; then
35365        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35366$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35367      fi
35368      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35369    fi
35370  fi
35371
35372  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35373  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35374  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35375  # "foo.exe" is OK but "foo" is an error.
35376  #
35377  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35378  # It is also a way to make sure we got the proper file name for the real test later on.
35379  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35380  if test "x$test_shortpath" = x; then
35381    # Short path failed, file does not exist as specified.
35382    # Try adding .exe or .cmd
35383    if test -f "${new_path}.exe"; then
35384      input_to_shortpath="${new_path}.exe"
35385    elif test -f "${new_path}.cmd"; then
35386      input_to_shortpath="${new_path}.cmd"
35387    else
35388      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
35389$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
35390      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35391$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35392      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35393    fi
35394  else
35395    input_to_shortpath="$new_path"
35396  fi
35397
35398  # Call helper function which possibly converts this using DOS-style short mode.
35399  # If so, the updated path is stored in $new_path.
35400  new_path="$input_to_shortpath"
35401
35402  input_path="$input_to_shortpath"
35403  # Check if we need to convert this using DOS-style short mode. If the path
35404  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35405  # take no chances and rewrite it.
35406  # Note: m4 eats our [], so we need to use [ and ] instead.
35407  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35408  if test "x$has_forbidden_chars" != x; then
35409    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35410    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35411    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35412    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35413      # Going to short mode and back again did indeed matter. Since short mode is
35414      # case insensitive, let's make it lowercase to improve readability.
35415      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35416      # Now convert it back to Unix-style (cygpath)
35417      input_path=`$CYGPATH -u "$shortmode_path"`
35418      new_path="$input_path"
35419    fi
35420  fi
35421
35422  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35423  if test "x$test_cygdrive_prefix" = x; then
35424    # As a simple fix, exclude /usr/bin since it's not a real path.
35425    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35426      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35427      # a path prefixed by /cygdrive for fixpath to work.
35428      new_path="$CYGWIN_ROOT_PATH$input_path"
35429    fi
35430  fi
35431
35432  # remove trailing .exe if any
35433  new_path="${new_path/%.exe/}"
35434
35435    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35436
35437  # First separate the path from the arguments. This will split at the first
35438  # space.
35439  complete="$STRIP"
35440  path="${complete%% *}"
35441  tmp="$complete EOL"
35442  arguments="${tmp#* }"
35443
35444  # Input might be given as Windows format, start by converting to
35445  # unix format.
35446  new_path="$path"
35447
35448  windows_path="$new_path"
35449  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35450    unix_path=`$CYGPATH -u "$windows_path"`
35451    new_path="$unix_path"
35452  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35453    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35454    new_path="$unix_path"
35455  fi
35456
35457
35458  # Now try to locate executable using which
35459  new_path=`$WHICH "$new_path" 2> /dev/null`
35460
35461  if test "x$new_path" = x; then
35462    # Oops. Which didn't find the executable.
35463    # The splitting of arguments from the executable at a space might have been incorrect,
35464    # since paths with space are more likely in Windows. Give it another try with the whole
35465    # argument.
35466    path="$complete"
35467    arguments="EOL"
35468    new_path="$path"
35469
35470  windows_path="$new_path"
35471  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35472    unix_path=`$CYGPATH -u "$windows_path"`
35473    new_path="$unix_path"
35474  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35475    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35476    new_path="$unix_path"
35477  fi
35478
35479
35480    new_path=`$WHICH "$new_path" 2> /dev/null`
35481    # bat and cmd files are not always considered executable in MSYS causing which
35482    # to not find them
35483    if test "x$new_path" = x \
35484        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35485        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35486      new_path="$path"
35487
35488  windows_path="$new_path"
35489  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35490    unix_path=`$CYGPATH -u "$windows_path"`
35491    new_path="$unix_path"
35492  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35493    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35494    new_path="$unix_path"
35495  fi
35496
35497    fi
35498
35499    if test "x$new_path" = x; then
35500      # It's still not found. Now this is an unrecoverable error.
35501      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35502$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35503      has_space=`$ECHO "$complete" | $GREP " "`
35504      if test "x$has_space" != x; then
35505        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35506$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35507      fi
35508      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35509    fi
35510  fi
35511
35512  # Now new_path has a complete unix path to the binary
35513  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35514    # Keep paths in /bin as-is, but remove trailing .exe if any
35515    new_path="${new_path/%.exe/}"
35516    # Do not save /bin paths to all_fixpath_prefixes!
35517  else
35518    # Not in mixed or Windows style, start by that.
35519    new_path=`cmd //c echo $new_path`
35520
35521  input_path="$new_path"
35522  # Check if we need to convert this using DOS-style short mode. If the path
35523  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35524  # take no chances and rewrite it.
35525  # Note: m4 eats our [], so we need to use [ and ] instead.
35526  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35527  if test "x$has_forbidden_chars" != x; then
35528    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35529    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35530  fi
35531
35532    # Output is in $new_path
35533
35534  windows_path="$new_path"
35535  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35536    unix_path=`$CYGPATH -u "$windows_path"`
35537    new_path="$unix_path"
35538  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35539    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35540    new_path="$unix_path"
35541  fi
35542
35543    # remove trailing .exe if any
35544    new_path="${new_path/%.exe/}"
35545
35546    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35547    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35548  fi
35549
35550    else
35551      # We're on a unix platform. Hooray! :)
35552      # First separate the path from the arguments. This will split at the first
35553      # space.
35554      complete="$STRIP"
35555      path="${complete%% *}"
35556      tmp="$complete EOL"
35557      arguments="${tmp#* }"
35558
35559      # Cannot rely on the command "which" here since it doesn't always work.
35560      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35561      if test -z "$is_absolute_path"; then
35562        # Path to executable is not absolute. Find it.
35563        IFS_save="$IFS"
35564        IFS=:
35565        for p in $PATH; do
35566          if test -f "$p/$path" && test -x "$p/$path"; then
35567            new_path="$p/$path"
35568            break
35569          fi
35570        done
35571        IFS="$IFS_save"
35572      else
35573        # This is an absolute path, we can use it without further modifications.
35574        new_path="$path"
35575      fi
35576
35577      if test "x$new_path" = x; then
35578        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35579$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35580        has_space=`$ECHO "$complete" | $GREP " "`
35581        if test "x$has_space" != x; then
35582          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35583$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35584        fi
35585        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35586      fi
35587    fi
35588
35589    # Now join together the path and the arguments once again
35590    if test "x$arguments" != xEOL; then
35591      new_complete="$new_path ${arguments% *}"
35592    else
35593      new_complete="$new_path"
35594    fi
35595
35596    if test "x$complete" != "x$new_complete"; then
35597      STRIP="$new_complete"
35598      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
35599$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
35600    fi
35601  fi
35602
35603
35604
35605  # Publish this variable in the help.
35606
35607
35608  if test "x$NM" = x; then
35609    # The variable is not set by user, try to locate tool using the code snippet
35610    for ac_prog in nm
35611do
35612  # Extract the first word of "$ac_prog", so it can be a program name with args.
35613set dummy $ac_prog; ac_word=$2
35614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35615$as_echo_n "checking for $ac_word... " >&6; }
35616if ${ac_cv_path_NM+:} false; then :
35617  $as_echo_n "(cached) " >&6
35618else
35619  case $NM in
35620  [\\/]* | ?:[\\/]*)
35621  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35622  ;;
35623  *)
35624  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35625for as_dir in $PATH
35626do
35627  IFS=$as_save_IFS
35628  test -z "$as_dir" && as_dir=.
35629    for ac_exec_ext in '' $ac_executable_extensions; do
35630  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35631    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35632    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35633    break 2
35634  fi
35635done
35636  done
35637IFS=$as_save_IFS
35638
35639  ;;
35640esac
35641fi
35642NM=$ac_cv_path_NM
35643if test -n "$NM"; then
35644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35645$as_echo "$NM" >&6; }
35646else
35647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35648$as_echo "no" >&6; }
35649fi
35650
35651
35652  test -n "$NM" && break
35653done
35654
35655  else
35656    # The variable is set, but is it from the command line or the environment?
35657
35658    # Try to remove the string !NM! from our list.
35659    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
35660    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35661      # If it failed, the variable was not from the command line. Ignore it,
35662      # but warn the user (except for BASH, which is always set by the calling BASH).
35663      if test "xNM" != xBASH; then
35664        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
35665$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
35666      fi
35667      # Try to locate tool using the code snippet
35668      for ac_prog in nm
35669do
35670  # Extract the first word of "$ac_prog", so it can be a program name with args.
35671set dummy $ac_prog; ac_word=$2
35672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35673$as_echo_n "checking for $ac_word... " >&6; }
35674if ${ac_cv_path_NM+:} false; then :
35675  $as_echo_n "(cached) " >&6
35676else
35677  case $NM in
35678  [\\/]* | ?:[\\/]*)
35679  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35680  ;;
35681  *)
35682  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35683for as_dir in $PATH
35684do
35685  IFS=$as_save_IFS
35686  test -z "$as_dir" && as_dir=.
35687    for ac_exec_ext in '' $ac_executable_extensions; do
35688  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35689    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35690    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35691    break 2
35692  fi
35693done
35694  done
35695IFS=$as_save_IFS
35696
35697  ;;
35698esac
35699fi
35700NM=$ac_cv_path_NM
35701if test -n "$NM"; then
35702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35703$as_echo "$NM" >&6; }
35704else
35705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35706$as_echo "no" >&6; }
35707fi
35708
35709
35710  test -n "$NM" && break
35711done
35712
35713    else
35714      # If it succeeded, then it was overridden by the user. We will use it
35715      # for the tool.
35716
35717      # First remove it from the list of overridden variables, so we can test
35718      # for unknown variables in the end.
35719      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35720
35721      # Check if the provided tool contains a complete path.
35722      tool_specified="$NM"
35723      tool_basename="${tool_specified##*/}"
35724      if test "x$tool_basename" = "x$tool_specified"; then
35725        # A command without a complete path is provided, search $PATH.
35726        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
35727$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
35728        # Extract the first word of "$tool_basename", so it can be a program name with args.
35729set dummy $tool_basename; ac_word=$2
35730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35731$as_echo_n "checking for $ac_word... " >&6; }
35732if ${ac_cv_path_NM+:} false; then :
35733  $as_echo_n "(cached) " >&6
35734else
35735  case $NM in
35736  [\\/]* | ?:[\\/]*)
35737  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35738  ;;
35739  *)
35740  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35741for as_dir in $PATH
35742do
35743  IFS=$as_save_IFS
35744  test -z "$as_dir" && as_dir=.
35745    for ac_exec_ext in '' $ac_executable_extensions; do
35746  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35747    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35748    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35749    break 2
35750  fi
35751done
35752  done
35753IFS=$as_save_IFS
35754
35755  ;;
35756esac
35757fi
35758NM=$ac_cv_path_NM
35759if test -n "$NM"; then
35760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35761$as_echo "$NM" >&6; }
35762else
35763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35764$as_echo "no" >&6; }
35765fi
35766
35767
35768        if test "x$NM" = x; then
35769          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35770        fi
35771      else
35772        # Otherwise we believe it is a complete path. Use it as it is.
35773        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
35774$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
35775        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
35776$as_echo_n "checking for NM... " >&6; }
35777        if test ! -x "$tool_specified"; then
35778          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35779$as_echo "not found" >&6; }
35780          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
35781        fi
35782        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35783$as_echo "$tool_specified" >&6; }
35784      fi
35785    fi
35786  fi
35787
35788
35789
35790  # Only process if variable expands to non-empty
35791
35792  if test "x$NM" != x; then
35793    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35794
35795  # First separate the path from the arguments. This will split at the first
35796  # space.
35797  complete="$NM"
35798  path="${complete%% *}"
35799  tmp="$complete EOL"
35800  arguments="${tmp#* }"
35801
35802  # Input might be given as Windows format, start by converting to
35803  # unix format.
35804  new_path=`$CYGPATH -u "$path"`
35805
35806  # Now try to locate executable using which
35807  new_path=`$WHICH "$new_path" 2> /dev/null`
35808  # bat and cmd files are not always considered executable in cygwin causing which
35809  # to not find them
35810  if test "x$new_path" = x \
35811      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35812      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35813    new_path=`$CYGPATH -u "$path"`
35814  fi
35815  if test "x$new_path" = x; then
35816    # Oops. Which didn't find the executable.
35817    # The splitting of arguments from the executable at a space might have been incorrect,
35818    # since paths with space are more likely in Windows. Give it another try with the whole
35819    # argument.
35820    path="$complete"
35821    arguments="EOL"
35822    new_path=`$CYGPATH -u "$path"`
35823    new_path=`$WHICH "$new_path" 2> /dev/null`
35824    # bat and cmd files are not always considered executable in cygwin causing which
35825    # to not find them
35826    if test "x$new_path" = x \
35827        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35828        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35829      new_path=`$CYGPATH -u "$path"`
35830    fi
35831    if test "x$new_path" = x; then
35832      # It's still not found. Now this is an unrecoverable error.
35833      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35834$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35835      has_space=`$ECHO "$complete" | $GREP " "`
35836      if test "x$has_space" != x; then
35837        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35838$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35839      fi
35840      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35841    fi
35842  fi
35843
35844  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35845  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35846  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35847  # "foo.exe" is OK but "foo" is an error.
35848  #
35849  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35850  # It is also a way to make sure we got the proper file name for the real test later on.
35851  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35852  if test "x$test_shortpath" = x; then
35853    # Short path failed, file does not exist as specified.
35854    # Try adding .exe or .cmd
35855    if test -f "${new_path}.exe"; then
35856      input_to_shortpath="${new_path}.exe"
35857    elif test -f "${new_path}.cmd"; then
35858      input_to_shortpath="${new_path}.cmd"
35859    else
35860      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
35861$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
35862      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35863$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35864      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35865    fi
35866  else
35867    input_to_shortpath="$new_path"
35868  fi
35869
35870  # Call helper function which possibly converts this using DOS-style short mode.
35871  # If so, the updated path is stored in $new_path.
35872  new_path="$input_to_shortpath"
35873
35874  input_path="$input_to_shortpath"
35875  # Check if we need to convert this using DOS-style short mode. If the path
35876  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35877  # take no chances and rewrite it.
35878  # Note: m4 eats our [], so we need to use [ and ] instead.
35879  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35880  if test "x$has_forbidden_chars" != x; then
35881    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35882    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35883    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35884    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35885      # Going to short mode and back again did indeed matter. Since short mode is
35886      # case insensitive, let's make it lowercase to improve readability.
35887      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35888      # Now convert it back to Unix-style (cygpath)
35889      input_path=`$CYGPATH -u "$shortmode_path"`
35890      new_path="$input_path"
35891    fi
35892  fi
35893
35894  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35895  if test "x$test_cygdrive_prefix" = x; then
35896    # As a simple fix, exclude /usr/bin since it's not a real path.
35897    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35898      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35899      # a path prefixed by /cygdrive for fixpath to work.
35900      new_path="$CYGWIN_ROOT_PATH$input_path"
35901    fi
35902  fi
35903
35904  # remove trailing .exe if any
35905  new_path="${new_path/%.exe/}"
35906
35907    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35908
35909  # First separate the path from the arguments. This will split at the first
35910  # space.
35911  complete="$NM"
35912  path="${complete%% *}"
35913  tmp="$complete EOL"
35914  arguments="${tmp#* }"
35915
35916  # Input might be given as Windows format, start by converting to
35917  # unix format.
35918  new_path="$path"
35919
35920  windows_path="$new_path"
35921  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35922    unix_path=`$CYGPATH -u "$windows_path"`
35923    new_path="$unix_path"
35924  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35925    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35926    new_path="$unix_path"
35927  fi
35928
35929
35930  # Now try to locate executable using which
35931  new_path=`$WHICH "$new_path" 2> /dev/null`
35932
35933  if test "x$new_path" = x; then
35934    # Oops. Which didn't find the executable.
35935    # The splitting of arguments from the executable at a space might have been incorrect,
35936    # since paths with space are more likely in Windows. Give it another try with the whole
35937    # argument.
35938    path="$complete"
35939    arguments="EOL"
35940    new_path="$path"
35941
35942  windows_path="$new_path"
35943  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35944    unix_path=`$CYGPATH -u "$windows_path"`
35945    new_path="$unix_path"
35946  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35947    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35948    new_path="$unix_path"
35949  fi
35950
35951
35952    new_path=`$WHICH "$new_path" 2> /dev/null`
35953    # bat and cmd files are not always considered executable in MSYS causing which
35954    # to not find them
35955    if test "x$new_path" = x \
35956        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35957        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35958      new_path="$path"
35959
35960  windows_path="$new_path"
35961  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35962    unix_path=`$CYGPATH -u "$windows_path"`
35963    new_path="$unix_path"
35964  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35965    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35966    new_path="$unix_path"
35967  fi
35968
35969    fi
35970
35971    if test "x$new_path" = x; then
35972      # It's still not found. Now this is an unrecoverable error.
35973      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35974$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35975      has_space=`$ECHO "$complete" | $GREP " "`
35976      if test "x$has_space" != x; then
35977        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35978$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35979      fi
35980      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35981    fi
35982  fi
35983
35984  # Now new_path has a complete unix path to the binary
35985  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35986    # Keep paths in /bin as-is, but remove trailing .exe if any
35987    new_path="${new_path/%.exe/}"
35988    # Do not save /bin paths to all_fixpath_prefixes!
35989  else
35990    # Not in mixed or Windows style, start by that.
35991    new_path=`cmd //c echo $new_path`
35992
35993  input_path="$new_path"
35994  # Check if we need to convert this using DOS-style short mode. If the path
35995  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35996  # take no chances and rewrite it.
35997  # Note: m4 eats our [], so we need to use [ and ] instead.
35998  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35999  if test "x$has_forbidden_chars" != x; then
36000    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36001    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36002  fi
36003
36004    # Output is in $new_path
36005
36006  windows_path="$new_path"
36007  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36008    unix_path=`$CYGPATH -u "$windows_path"`
36009    new_path="$unix_path"
36010  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36011    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36012    new_path="$unix_path"
36013  fi
36014
36015    # remove trailing .exe if any
36016    new_path="${new_path/%.exe/}"
36017
36018    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36019    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36020  fi
36021
36022    else
36023      # We're on a unix platform. Hooray! :)
36024      # First separate the path from the arguments. This will split at the first
36025      # space.
36026      complete="$NM"
36027      path="${complete%% *}"
36028      tmp="$complete EOL"
36029      arguments="${tmp#* }"
36030
36031      # Cannot rely on the command "which" here since it doesn't always work.
36032      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36033      if test -z "$is_absolute_path"; then
36034        # Path to executable is not absolute. Find it.
36035        IFS_save="$IFS"
36036        IFS=:
36037        for p in $PATH; do
36038          if test -f "$p/$path" && test -x "$p/$path"; then
36039            new_path="$p/$path"
36040            break
36041          fi
36042        done
36043        IFS="$IFS_save"
36044      else
36045        # This is an absolute path, we can use it without further modifications.
36046        new_path="$path"
36047      fi
36048
36049      if test "x$new_path" = x; then
36050        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36051$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36052        has_space=`$ECHO "$complete" | $GREP " "`
36053        if test "x$has_space" != x; then
36054          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36055$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36056        fi
36057        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36058      fi
36059    fi
36060
36061    # Now join together the path and the arguments once again
36062    if test "x$arguments" != xEOL; then
36063      new_complete="$new_path ${arguments% *}"
36064    else
36065      new_complete="$new_path"
36066    fi
36067
36068    if test "x$complete" != "x$new_complete"; then
36069      NM="$new_complete"
36070      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
36071$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
36072    fi
36073  fi
36074
36075
36076
36077  # Publish this variable in the help.
36078
36079
36080  if test "x$GNM" = x; then
36081    # The variable is not set by user, try to locate tool using the code snippet
36082    for ac_prog in gnm
36083do
36084  # Extract the first word of "$ac_prog", so it can be a program name with args.
36085set dummy $ac_prog; ac_word=$2
36086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36087$as_echo_n "checking for $ac_word... " >&6; }
36088if ${ac_cv_path_GNM+:} false; then :
36089  $as_echo_n "(cached) " >&6
36090else
36091  case $GNM in
36092  [\\/]* | ?:[\\/]*)
36093  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36094  ;;
36095  *)
36096  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36097for as_dir in $PATH
36098do
36099  IFS=$as_save_IFS
36100  test -z "$as_dir" && as_dir=.
36101    for ac_exec_ext in '' $ac_executable_extensions; do
36102  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36103    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36104    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36105    break 2
36106  fi
36107done
36108  done
36109IFS=$as_save_IFS
36110
36111  ;;
36112esac
36113fi
36114GNM=$ac_cv_path_GNM
36115if test -n "$GNM"; then
36116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36117$as_echo "$GNM" >&6; }
36118else
36119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36120$as_echo "no" >&6; }
36121fi
36122
36123
36124  test -n "$GNM" && break
36125done
36126
36127  else
36128    # The variable is set, but is it from the command line or the environment?
36129
36130    # Try to remove the string !GNM! from our list.
36131    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
36132    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36133      # If it failed, the variable was not from the command line. Ignore it,
36134      # but warn the user (except for BASH, which is always set by the calling BASH).
36135      if test "xGNM" != xBASH; then
36136        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
36137$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
36138      fi
36139      # Try to locate tool using the code snippet
36140      for ac_prog in gnm
36141do
36142  # Extract the first word of "$ac_prog", so it can be a program name with args.
36143set dummy $ac_prog; ac_word=$2
36144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36145$as_echo_n "checking for $ac_word... " >&6; }
36146if ${ac_cv_path_GNM+:} false; then :
36147  $as_echo_n "(cached) " >&6
36148else
36149  case $GNM in
36150  [\\/]* | ?:[\\/]*)
36151  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36152  ;;
36153  *)
36154  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36155for as_dir in $PATH
36156do
36157  IFS=$as_save_IFS
36158  test -z "$as_dir" && as_dir=.
36159    for ac_exec_ext in '' $ac_executable_extensions; do
36160  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36161    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36162    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36163    break 2
36164  fi
36165done
36166  done
36167IFS=$as_save_IFS
36168
36169  ;;
36170esac
36171fi
36172GNM=$ac_cv_path_GNM
36173if test -n "$GNM"; then
36174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36175$as_echo "$GNM" >&6; }
36176else
36177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36178$as_echo "no" >&6; }
36179fi
36180
36181
36182  test -n "$GNM" && break
36183done
36184
36185    else
36186      # If it succeeded, then it was overridden by the user. We will use it
36187      # for the tool.
36188
36189      # First remove it from the list of overridden variables, so we can test
36190      # for unknown variables in the end.
36191      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36192
36193      # Check if the provided tool contains a complete path.
36194      tool_specified="$GNM"
36195      tool_basename="${tool_specified##*/}"
36196      if test "x$tool_basename" = "x$tool_specified"; then
36197        # A command without a complete path is provided, search $PATH.
36198        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
36199$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
36200        # Extract the first word of "$tool_basename", so it can be a program name with args.
36201set dummy $tool_basename; ac_word=$2
36202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36203$as_echo_n "checking for $ac_word... " >&6; }
36204if ${ac_cv_path_GNM+:} false; then :
36205  $as_echo_n "(cached) " >&6
36206else
36207  case $GNM in
36208  [\\/]* | ?:[\\/]*)
36209  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36210  ;;
36211  *)
36212  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36213for as_dir in $PATH
36214do
36215  IFS=$as_save_IFS
36216  test -z "$as_dir" && as_dir=.
36217    for ac_exec_ext in '' $ac_executable_extensions; do
36218  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36219    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36220    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36221    break 2
36222  fi
36223done
36224  done
36225IFS=$as_save_IFS
36226
36227  ;;
36228esac
36229fi
36230GNM=$ac_cv_path_GNM
36231if test -n "$GNM"; then
36232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36233$as_echo "$GNM" >&6; }
36234else
36235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36236$as_echo "no" >&6; }
36237fi
36238
36239
36240        if test "x$GNM" = x; then
36241          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36242        fi
36243      else
36244        # Otherwise we believe it is a complete path. Use it as it is.
36245        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
36246$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
36247        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
36248$as_echo_n "checking for GNM... " >&6; }
36249        if test ! -x "$tool_specified"; then
36250          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36251$as_echo "not found" >&6; }
36252          as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
36253        fi
36254        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36255$as_echo "$tool_specified" >&6; }
36256      fi
36257    fi
36258  fi
36259
36260
36261
36262  # Only process if variable expands to non-empty
36263
36264  if test "x$GNM" != x; then
36265    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36266
36267  # First separate the path from the arguments. This will split at the first
36268  # space.
36269  complete="$GNM"
36270  path="${complete%% *}"
36271  tmp="$complete EOL"
36272  arguments="${tmp#* }"
36273
36274  # Input might be given as Windows format, start by converting to
36275  # unix format.
36276  new_path=`$CYGPATH -u "$path"`
36277
36278  # Now try to locate executable using which
36279  new_path=`$WHICH "$new_path" 2> /dev/null`
36280  # bat and cmd files are not always considered executable in cygwin causing which
36281  # to not find them
36282  if test "x$new_path" = x \
36283      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36284      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36285    new_path=`$CYGPATH -u "$path"`
36286  fi
36287  if test "x$new_path" = x; then
36288    # Oops. Which didn't find the executable.
36289    # The splitting of arguments from the executable at a space might have been incorrect,
36290    # since paths with space are more likely in Windows. Give it another try with the whole
36291    # argument.
36292    path="$complete"
36293    arguments="EOL"
36294    new_path=`$CYGPATH -u "$path"`
36295    new_path=`$WHICH "$new_path" 2> /dev/null`
36296    # bat and cmd files are not always considered executable in cygwin causing which
36297    # to not find them
36298    if test "x$new_path" = x \
36299        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36300        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36301      new_path=`$CYGPATH -u "$path"`
36302    fi
36303    if test "x$new_path" = x; then
36304      # It's still not found. Now this is an unrecoverable error.
36305      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36306$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36307      has_space=`$ECHO "$complete" | $GREP " "`
36308      if test "x$has_space" != x; then
36309        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36310$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36311      fi
36312      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36313    fi
36314  fi
36315
36316  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36317  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36318  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36319  # "foo.exe" is OK but "foo" is an error.
36320  #
36321  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36322  # It is also a way to make sure we got the proper file name for the real test later on.
36323  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36324  if test "x$test_shortpath" = x; then
36325    # Short path failed, file does not exist as specified.
36326    # Try adding .exe or .cmd
36327    if test -f "${new_path}.exe"; then
36328      input_to_shortpath="${new_path}.exe"
36329    elif test -f "${new_path}.cmd"; then
36330      input_to_shortpath="${new_path}.cmd"
36331    else
36332      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
36333$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
36334      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36335$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36336      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36337    fi
36338  else
36339    input_to_shortpath="$new_path"
36340  fi
36341
36342  # Call helper function which possibly converts this using DOS-style short mode.
36343  # If so, the updated path is stored in $new_path.
36344  new_path="$input_to_shortpath"
36345
36346  input_path="$input_to_shortpath"
36347  # Check if we need to convert this using DOS-style short mode. If the path
36348  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36349  # take no chances and rewrite it.
36350  # Note: m4 eats our [], so we need to use [ and ] instead.
36351  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36352  if test "x$has_forbidden_chars" != x; then
36353    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36354    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36355    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36356    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36357      # Going to short mode and back again did indeed matter. Since short mode is
36358      # case insensitive, let's make it lowercase to improve readability.
36359      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36360      # Now convert it back to Unix-style (cygpath)
36361      input_path=`$CYGPATH -u "$shortmode_path"`
36362      new_path="$input_path"
36363    fi
36364  fi
36365
36366  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36367  if test "x$test_cygdrive_prefix" = x; then
36368    # As a simple fix, exclude /usr/bin since it's not a real path.
36369    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36370      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36371      # a path prefixed by /cygdrive for fixpath to work.
36372      new_path="$CYGWIN_ROOT_PATH$input_path"
36373    fi
36374  fi
36375
36376  # remove trailing .exe if any
36377  new_path="${new_path/%.exe/}"
36378
36379    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36380
36381  # First separate the path from the arguments. This will split at the first
36382  # space.
36383  complete="$GNM"
36384  path="${complete%% *}"
36385  tmp="$complete EOL"
36386  arguments="${tmp#* }"
36387
36388  # Input might be given as Windows format, start by converting to
36389  # unix format.
36390  new_path="$path"
36391
36392  windows_path="$new_path"
36393  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36394    unix_path=`$CYGPATH -u "$windows_path"`
36395    new_path="$unix_path"
36396  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36397    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36398    new_path="$unix_path"
36399  fi
36400
36401
36402  # Now try to locate executable using which
36403  new_path=`$WHICH "$new_path" 2> /dev/null`
36404
36405  if test "x$new_path" = x; then
36406    # Oops. Which didn't find the executable.
36407    # The splitting of arguments from the executable at a space might have been incorrect,
36408    # since paths with space are more likely in Windows. Give it another try with the whole
36409    # argument.
36410    path="$complete"
36411    arguments="EOL"
36412    new_path="$path"
36413
36414  windows_path="$new_path"
36415  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36416    unix_path=`$CYGPATH -u "$windows_path"`
36417    new_path="$unix_path"
36418  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36419    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36420    new_path="$unix_path"
36421  fi
36422
36423
36424    new_path=`$WHICH "$new_path" 2> /dev/null`
36425    # bat and cmd files are not always considered executable in MSYS causing which
36426    # to not find them
36427    if test "x$new_path" = x \
36428        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36429        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36430      new_path="$path"
36431
36432  windows_path="$new_path"
36433  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36434    unix_path=`$CYGPATH -u "$windows_path"`
36435    new_path="$unix_path"
36436  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36437    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36438    new_path="$unix_path"
36439  fi
36440
36441    fi
36442
36443    if test "x$new_path" = x; then
36444      # It's still not found. Now this is an unrecoverable error.
36445      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36446$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36447      has_space=`$ECHO "$complete" | $GREP " "`
36448      if test "x$has_space" != x; then
36449        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36450$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36451      fi
36452      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36453    fi
36454  fi
36455
36456  # Now new_path has a complete unix path to the binary
36457  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36458    # Keep paths in /bin as-is, but remove trailing .exe if any
36459    new_path="${new_path/%.exe/}"
36460    # Do not save /bin paths to all_fixpath_prefixes!
36461  else
36462    # Not in mixed or Windows style, start by that.
36463    new_path=`cmd //c echo $new_path`
36464
36465  input_path="$new_path"
36466  # Check if we need to convert this using DOS-style short mode. If the path
36467  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36468  # take no chances and rewrite it.
36469  # Note: m4 eats our [], so we need to use [ and ] instead.
36470  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36471  if test "x$has_forbidden_chars" != x; then
36472    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36473    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36474  fi
36475
36476    # Output is in $new_path
36477
36478  windows_path="$new_path"
36479  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36480    unix_path=`$CYGPATH -u "$windows_path"`
36481    new_path="$unix_path"
36482  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36483    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36484    new_path="$unix_path"
36485  fi
36486
36487    # remove trailing .exe if any
36488    new_path="${new_path/%.exe/}"
36489
36490    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36491    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36492  fi
36493
36494    else
36495      # We're on a unix platform. Hooray! :)
36496      # First separate the path from the arguments. This will split at the first
36497      # space.
36498      complete="$GNM"
36499      path="${complete%% *}"
36500      tmp="$complete EOL"
36501      arguments="${tmp#* }"
36502
36503      # Cannot rely on the command "which" here since it doesn't always work.
36504      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36505      if test -z "$is_absolute_path"; then
36506        # Path to executable is not absolute. Find it.
36507        IFS_save="$IFS"
36508        IFS=:
36509        for p in $PATH; do
36510          if test -f "$p/$path" && test -x "$p/$path"; then
36511            new_path="$p/$path"
36512            break
36513          fi
36514        done
36515        IFS="$IFS_save"
36516      else
36517        # This is an absolute path, we can use it without further modifications.
36518        new_path="$path"
36519      fi
36520
36521      if test "x$new_path" = x; then
36522        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36523$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36524        has_space=`$ECHO "$complete" | $GREP " "`
36525        if test "x$has_space" != x; then
36526          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36527$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36528        fi
36529        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36530      fi
36531    fi
36532
36533    # Now join together the path and the arguments once again
36534    if test "x$arguments" != xEOL; then
36535      new_complete="$new_path ${arguments% *}"
36536    else
36537      new_complete="$new_path"
36538    fi
36539
36540    if test "x$complete" != "x$new_complete"; then
36541      GNM="$new_complete"
36542      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
36543$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
36544    fi
36545  fi
36546
36547  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
36548    # FIXME: we should unify this with the solaris case above.
36549
36550
36551  # Publish this variable in the help.
36552
36553
36554  if test "x$STRIP" = x; then
36555    # The variable is not set by user, try to locate tool using the code snippet
36556    if test -n "$ac_tool_prefix"; then
36557  for ac_prog in strip
36558  do
36559    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36560set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36562$as_echo_n "checking for $ac_word... " >&6; }
36563if ${ac_cv_prog_STRIP+:} false; then :
36564  $as_echo_n "(cached) " >&6
36565else
36566  if test -n "$STRIP"; then
36567  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
36568else
36569as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36570for as_dir in $PATH
36571do
36572  IFS=$as_save_IFS
36573  test -z "$as_dir" && as_dir=.
36574    for ac_exec_ext in '' $ac_executable_extensions; do
36575  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36576    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
36577    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36578    break 2
36579  fi
36580done
36581  done
36582IFS=$as_save_IFS
36583
36584fi
36585fi
36586STRIP=$ac_cv_prog_STRIP
36587if test -n "$STRIP"; then
36588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36589$as_echo "$STRIP" >&6; }
36590else
36591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36592$as_echo "no" >&6; }
36593fi
36594
36595
36596    test -n "$STRIP" && break
36597  done
36598fi
36599if test -z "$STRIP"; then
36600  ac_ct_STRIP=$STRIP
36601  for ac_prog in strip
36602do
36603  # Extract the first word of "$ac_prog", so it can be a program name with args.
36604set dummy $ac_prog; ac_word=$2
36605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36606$as_echo_n "checking for $ac_word... " >&6; }
36607if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
36608  $as_echo_n "(cached) " >&6
36609else
36610  if test -n "$ac_ct_STRIP"; then
36611  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
36612else
36613as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36614for as_dir in $PATH
36615do
36616  IFS=$as_save_IFS
36617  test -z "$as_dir" && as_dir=.
36618    for ac_exec_ext in '' $ac_executable_extensions; do
36619  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36620    ac_cv_prog_ac_ct_STRIP="$ac_prog"
36621    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36622    break 2
36623  fi
36624done
36625  done
36626IFS=$as_save_IFS
36627
36628fi
36629fi
36630ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
36631if test -n "$ac_ct_STRIP"; then
36632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
36633$as_echo "$ac_ct_STRIP" >&6; }
36634else
36635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36636$as_echo "no" >&6; }
36637fi
36638
36639
36640  test -n "$ac_ct_STRIP" && break
36641done
36642
36643  if test "x$ac_ct_STRIP" = x; then
36644    STRIP=""
36645  else
36646    case $cross_compiling:$ac_tool_warned in
36647yes:)
36648{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36649$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36650ac_tool_warned=yes ;;
36651esac
36652    STRIP=$ac_ct_STRIP
36653  fi
36654fi
36655
36656  else
36657    # The variable is set, but is it from the command line or the environment?
36658
36659    # Try to remove the string !STRIP! from our list.
36660    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
36661    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36662      # If it failed, the variable was not from the command line. Ignore it,
36663      # but warn the user (except for BASH, which is always set by the calling BASH).
36664      if test "xSTRIP" != xBASH; then
36665        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
36666$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
36667      fi
36668      # Try to locate tool using the code snippet
36669      if test -n "$ac_tool_prefix"; then
36670  for ac_prog in strip
36671  do
36672    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36673set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36675$as_echo_n "checking for $ac_word... " >&6; }
36676if ${ac_cv_prog_STRIP+:} false; then :
36677  $as_echo_n "(cached) " >&6
36678else
36679  if test -n "$STRIP"; then
36680  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
36681else
36682as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36683for as_dir in $PATH
36684do
36685  IFS=$as_save_IFS
36686  test -z "$as_dir" && as_dir=.
36687    for ac_exec_ext in '' $ac_executable_extensions; do
36688  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36689    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
36690    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36691    break 2
36692  fi
36693done
36694  done
36695IFS=$as_save_IFS
36696
36697fi
36698fi
36699STRIP=$ac_cv_prog_STRIP
36700if test -n "$STRIP"; then
36701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36702$as_echo "$STRIP" >&6; }
36703else
36704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36705$as_echo "no" >&6; }
36706fi
36707
36708
36709    test -n "$STRIP" && break
36710  done
36711fi
36712if test -z "$STRIP"; then
36713  ac_ct_STRIP=$STRIP
36714  for ac_prog in strip
36715do
36716  # Extract the first word of "$ac_prog", so it can be a program name with args.
36717set dummy $ac_prog; ac_word=$2
36718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36719$as_echo_n "checking for $ac_word... " >&6; }
36720if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
36721  $as_echo_n "(cached) " >&6
36722else
36723  if test -n "$ac_ct_STRIP"; then
36724  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
36725else
36726as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36727for as_dir in $PATH
36728do
36729  IFS=$as_save_IFS
36730  test -z "$as_dir" && as_dir=.
36731    for ac_exec_ext in '' $ac_executable_extensions; do
36732  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36733    ac_cv_prog_ac_ct_STRIP="$ac_prog"
36734    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36735    break 2
36736  fi
36737done
36738  done
36739IFS=$as_save_IFS
36740
36741fi
36742fi
36743ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
36744if test -n "$ac_ct_STRIP"; then
36745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
36746$as_echo "$ac_ct_STRIP" >&6; }
36747else
36748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36749$as_echo "no" >&6; }
36750fi
36751
36752
36753  test -n "$ac_ct_STRIP" && break
36754done
36755
36756  if test "x$ac_ct_STRIP" = x; then
36757    STRIP=""
36758  else
36759    case $cross_compiling:$ac_tool_warned in
36760yes:)
36761{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36762$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36763ac_tool_warned=yes ;;
36764esac
36765    STRIP=$ac_ct_STRIP
36766  fi
36767fi
36768
36769    else
36770      # If it succeeded, then it was overridden by the user. We will use it
36771      # for the tool.
36772
36773      # First remove it from the list of overridden variables, so we can test
36774      # for unknown variables in the end.
36775      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36776
36777      # Check if the provided tool contains a complete path.
36778      tool_specified="$STRIP"
36779      tool_basename="${tool_specified##*/}"
36780      if test "x$tool_basename" = "x$tool_specified"; then
36781        # A command without a complete path is provided, search $PATH.
36782        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
36783$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
36784        # Extract the first word of "$tool_basename", so it can be a program name with args.
36785set dummy $tool_basename; ac_word=$2
36786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36787$as_echo_n "checking for $ac_word... " >&6; }
36788if ${ac_cv_path_STRIP+:} false; then :
36789  $as_echo_n "(cached) " >&6
36790else
36791  case $STRIP in
36792  [\\/]* | ?:[\\/]*)
36793  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
36794  ;;
36795  *)
36796  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36797for as_dir in $PATH
36798do
36799  IFS=$as_save_IFS
36800  test -z "$as_dir" && as_dir=.
36801    for ac_exec_ext in '' $ac_executable_extensions; do
36802  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36803    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
36804    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36805    break 2
36806  fi
36807done
36808  done
36809IFS=$as_save_IFS
36810
36811  ;;
36812esac
36813fi
36814STRIP=$ac_cv_path_STRIP
36815if test -n "$STRIP"; then
36816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36817$as_echo "$STRIP" >&6; }
36818else
36819  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36820$as_echo "no" >&6; }
36821fi
36822
36823
36824        if test "x$STRIP" = x; then
36825          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36826        fi
36827      else
36828        # Otherwise we believe it is a complete path. Use it as it is.
36829        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
36830$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
36831        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
36832$as_echo_n "checking for STRIP... " >&6; }
36833        if test ! -x "$tool_specified"; then
36834          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36835$as_echo "not found" >&6; }
36836          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
36837        fi
36838        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36839$as_echo "$tool_specified" >&6; }
36840      fi
36841    fi
36842  fi
36843
36844
36845
36846  # Only process if variable expands to non-empty
36847
36848  if test "x$STRIP" != x; then
36849    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36850
36851  # First separate the path from the arguments. This will split at the first
36852  # space.
36853  complete="$STRIP"
36854  path="${complete%% *}"
36855  tmp="$complete EOL"
36856  arguments="${tmp#* }"
36857
36858  # Input might be given as Windows format, start by converting to
36859  # unix format.
36860  new_path=`$CYGPATH -u "$path"`
36861
36862  # Now try to locate executable using which
36863  new_path=`$WHICH "$new_path" 2> /dev/null`
36864  # bat and cmd files are not always considered executable in cygwin causing which
36865  # to not find them
36866  if test "x$new_path" = x \
36867      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36868      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36869    new_path=`$CYGPATH -u "$path"`
36870  fi
36871  if test "x$new_path" = x; then
36872    # Oops. Which didn't find the executable.
36873    # The splitting of arguments from the executable at a space might have been incorrect,
36874    # since paths with space are more likely in Windows. Give it another try with the whole
36875    # argument.
36876    path="$complete"
36877    arguments="EOL"
36878    new_path=`$CYGPATH -u "$path"`
36879    new_path=`$WHICH "$new_path" 2> /dev/null`
36880    # bat and cmd files are not always considered executable in cygwin causing which
36881    # to not find them
36882    if test "x$new_path" = x \
36883        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36884        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36885      new_path=`$CYGPATH -u "$path"`
36886    fi
36887    if test "x$new_path" = x; then
36888      # It's still not found. Now this is an unrecoverable error.
36889      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
36890$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
36891      has_space=`$ECHO "$complete" | $GREP " "`
36892      if test "x$has_space" != x; then
36893        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36894$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36895      fi
36896      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36897    fi
36898  fi
36899
36900  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36901  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36902  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36903  # "foo.exe" is OK but "foo" is an error.
36904  #
36905  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36906  # It is also a way to make sure we got the proper file name for the real test later on.
36907  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36908  if test "x$test_shortpath" = x; then
36909    # Short path failed, file does not exist as specified.
36910    # Try adding .exe or .cmd
36911    if test -f "${new_path}.exe"; then
36912      input_to_shortpath="${new_path}.exe"
36913    elif test -f "${new_path}.cmd"; then
36914      input_to_shortpath="${new_path}.cmd"
36915    else
36916      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
36917$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
36918      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36919$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36920      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36921    fi
36922  else
36923    input_to_shortpath="$new_path"
36924  fi
36925
36926  # Call helper function which possibly converts this using DOS-style short mode.
36927  # If so, the updated path is stored in $new_path.
36928  new_path="$input_to_shortpath"
36929
36930  input_path="$input_to_shortpath"
36931  # Check if we need to convert this using DOS-style short mode. If the path
36932  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36933  # take no chances and rewrite it.
36934  # Note: m4 eats our [], so we need to use [ and ] instead.
36935  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36936  if test "x$has_forbidden_chars" != x; then
36937    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36938    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36939    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36940    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36941      # Going to short mode and back again did indeed matter. Since short mode is
36942      # case insensitive, let's make it lowercase to improve readability.
36943      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36944      # Now convert it back to Unix-style (cygpath)
36945      input_path=`$CYGPATH -u "$shortmode_path"`
36946      new_path="$input_path"
36947    fi
36948  fi
36949
36950  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36951  if test "x$test_cygdrive_prefix" = x; then
36952    # As a simple fix, exclude /usr/bin since it's not a real path.
36953    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36954      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36955      # a path prefixed by /cygdrive for fixpath to work.
36956      new_path="$CYGWIN_ROOT_PATH$input_path"
36957    fi
36958  fi
36959
36960  # remove trailing .exe if any
36961  new_path="${new_path/%.exe/}"
36962
36963    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36964
36965  # First separate the path from the arguments. This will split at the first
36966  # space.
36967  complete="$STRIP"
36968  path="${complete%% *}"
36969  tmp="$complete EOL"
36970  arguments="${tmp#* }"
36971
36972  # Input might be given as Windows format, start by converting to
36973  # unix format.
36974  new_path="$path"
36975
36976  windows_path="$new_path"
36977  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36978    unix_path=`$CYGPATH -u "$windows_path"`
36979    new_path="$unix_path"
36980  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36981    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36982    new_path="$unix_path"
36983  fi
36984
36985
36986  # Now try to locate executable using which
36987  new_path=`$WHICH "$new_path" 2> /dev/null`
36988
36989  if test "x$new_path" = x; then
36990    # Oops. Which didn't find the executable.
36991    # The splitting of arguments from the executable at a space might have been incorrect,
36992    # since paths with space are more likely in Windows. Give it another try with the whole
36993    # argument.
36994    path="$complete"
36995    arguments="EOL"
36996    new_path="$path"
36997
36998  windows_path="$new_path"
36999  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37000    unix_path=`$CYGPATH -u "$windows_path"`
37001    new_path="$unix_path"
37002  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37003    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37004    new_path="$unix_path"
37005  fi
37006
37007
37008    new_path=`$WHICH "$new_path" 2> /dev/null`
37009    # bat and cmd files are not always considered executable in MSYS causing which
37010    # to not find them
37011    if test "x$new_path" = x \
37012        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37013        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37014      new_path="$path"
37015
37016  windows_path="$new_path"
37017  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37018    unix_path=`$CYGPATH -u "$windows_path"`
37019    new_path="$unix_path"
37020  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37021    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37022    new_path="$unix_path"
37023  fi
37024
37025    fi
37026
37027    if test "x$new_path" = x; then
37028      # It's still not found. Now this is an unrecoverable error.
37029      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37030$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37031      has_space=`$ECHO "$complete" | $GREP " "`
37032      if test "x$has_space" != x; then
37033        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37034$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37035      fi
37036      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37037    fi
37038  fi
37039
37040  # Now new_path has a complete unix path to the binary
37041  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37042    # Keep paths in /bin as-is, but remove trailing .exe if any
37043    new_path="${new_path/%.exe/}"
37044    # Do not save /bin paths to all_fixpath_prefixes!
37045  else
37046    # Not in mixed or Windows style, start by that.
37047    new_path=`cmd //c echo $new_path`
37048
37049  input_path="$new_path"
37050  # Check if we need to convert this using DOS-style short mode. If the path
37051  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37052  # take no chances and rewrite it.
37053  # Note: m4 eats our [], so we need to use [ and ] instead.
37054  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37055  if test "x$has_forbidden_chars" != x; then
37056    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37057    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37058  fi
37059
37060    # Output is in $new_path
37061
37062  windows_path="$new_path"
37063  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37064    unix_path=`$CYGPATH -u "$windows_path"`
37065    new_path="$unix_path"
37066  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37067    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37068    new_path="$unix_path"
37069  fi
37070
37071    # remove trailing .exe if any
37072    new_path="${new_path/%.exe/}"
37073
37074    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37075    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37076  fi
37077
37078    else
37079      # We're on a unix platform. Hooray! :)
37080      # First separate the path from the arguments. This will split at the first
37081      # space.
37082      complete="$STRIP"
37083      path="${complete%% *}"
37084      tmp="$complete EOL"
37085      arguments="${tmp#* }"
37086
37087      # Cannot rely on the command "which" here since it doesn't always work.
37088      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37089      if test -z "$is_absolute_path"; then
37090        # Path to executable is not absolute. Find it.
37091        IFS_save="$IFS"
37092        IFS=:
37093        for p in $PATH; do
37094          if test -f "$p/$path" && test -x "$p/$path"; then
37095            new_path="$p/$path"
37096            break
37097          fi
37098        done
37099        IFS="$IFS_save"
37100      else
37101        # This is an absolute path, we can use it without further modifications.
37102        new_path="$path"
37103      fi
37104
37105      if test "x$new_path" = x; then
37106        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37107$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37108        has_space=`$ECHO "$complete" | $GREP " "`
37109        if test "x$has_space" != x; then
37110          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37111$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37112        fi
37113        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37114      fi
37115    fi
37116
37117    # Now join together the path and the arguments once again
37118    if test "x$arguments" != xEOL; then
37119      new_complete="$new_path ${arguments% *}"
37120    else
37121      new_complete="$new_path"
37122    fi
37123
37124    if test "x$complete" != "x$new_complete"; then
37125      STRIP="$new_complete"
37126      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
37127$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
37128    fi
37129  fi
37130
37131
37132
37133  # Publish this variable in the help.
37134
37135
37136  if test "x$NM" = x; then
37137    # The variable is not set by user, try to locate tool using the code snippet
37138    if test -n "$ac_tool_prefix"; then
37139  for ac_prog in nm
37140  do
37141    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37142set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37144$as_echo_n "checking for $ac_word... " >&6; }
37145if ${ac_cv_prog_NM+:} false; then :
37146  $as_echo_n "(cached) " >&6
37147else
37148  if test -n "$NM"; then
37149  ac_cv_prog_NM="$NM" # Let the user override the test.
37150else
37151as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37152for as_dir in $PATH
37153do
37154  IFS=$as_save_IFS
37155  test -z "$as_dir" && as_dir=.
37156    for ac_exec_ext in '' $ac_executable_extensions; do
37157  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37158    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37159    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37160    break 2
37161  fi
37162done
37163  done
37164IFS=$as_save_IFS
37165
37166fi
37167fi
37168NM=$ac_cv_prog_NM
37169if test -n "$NM"; then
37170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37171$as_echo "$NM" >&6; }
37172else
37173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37174$as_echo "no" >&6; }
37175fi
37176
37177
37178    test -n "$NM" && break
37179  done
37180fi
37181if test -z "$NM"; then
37182  ac_ct_NM=$NM
37183  for ac_prog in nm
37184do
37185  # Extract the first word of "$ac_prog", so it can be a program name with args.
37186set dummy $ac_prog; ac_word=$2
37187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37188$as_echo_n "checking for $ac_word... " >&6; }
37189if ${ac_cv_prog_ac_ct_NM+:} false; then :
37190  $as_echo_n "(cached) " >&6
37191else
37192  if test -n "$ac_ct_NM"; then
37193  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37194else
37195as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37196for as_dir in $PATH
37197do
37198  IFS=$as_save_IFS
37199  test -z "$as_dir" && as_dir=.
37200    for ac_exec_ext in '' $ac_executable_extensions; do
37201  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37202    ac_cv_prog_ac_ct_NM="$ac_prog"
37203    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37204    break 2
37205  fi
37206done
37207  done
37208IFS=$as_save_IFS
37209
37210fi
37211fi
37212ac_ct_NM=$ac_cv_prog_ac_ct_NM
37213if test -n "$ac_ct_NM"; then
37214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37215$as_echo "$ac_ct_NM" >&6; }
37216else
37217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37218$as_echo "no" >&6; }
37219fi
37220
37221
37222  test -n "$ac_ct_NM" && break
37223done
37224
37225  if test "x$ac_ct_NM" = x; then
37226    NM=""
37227  else
37228    case $cross_compiling:$ac_tool_warned in
37229yes:)
37230{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37231$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37232ac_tool_warned=yes ;;
37233esac
37234    NM=$ac_ct_NM
37235  fi
37236fi
37237
37238  else
37239    # The variable is set, but is it from the command line or the environment?
37240
37241    # Try to remove the string !NM! from our list.
37242    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
37243    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37244      # If it failed, the variable was not from the command line. Ignore it,
37245      # but warn the user (except for BASH, which is always set by the calling BASH).
37246      if test "xNM" != xBASH; then
37247        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
37248$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
37249      fi
37250      # Try to locate tool using the code snippet
37251      if test -n "$ac_tool_prefix"; then
37252  for ac_prog in nm
37253  do
37254    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37255set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37257$as_echo_n "checking for $ac_word... " >&6; }
37258if ${ac_cv_prog_NM+:} false; then :
37259  $as_echo_n "(cached) " >&6
37260else
37261  if test -n "$NM"; then
37262  ac_cv_prog_NM="$NM" # Let the user override the test.
37263else
37264as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37265for as_dir in $PATH
37266do
37267  IFS=$as_save_IFS
37268  test -z "$as_dir" && as_dir=.
37269    for ac_exec_ext in '' $ac_executable_extensions; do
37270  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37271    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37272    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37273    break 2
37274  fi
37275done
37276  done
37277IFS=$as_save_IFS
37278
37279fi
37280fi
37281NM=$ac_cv_prog_NM
37282if test -n "$NM"; then
37283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37284$as_echo "$NM" >&6; }
37285else
37286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37287$as_echo "no" >&6; }
37288fi
37289
37290
37291    test -n "$NM" && break
37292  done
37293fi
37294if test -z "$NM"; then
37295  ac_ct_NM=$NM
37296  for ac_prog in nm
37297do
37298  # Extract the first word of "$ac_prog", so it can be a program name with args.
37299set dummy $ac_prog; ac_word=$2
37300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37301$as_echo_n "checking for $ac_word... " >&6; }
37302if ${ac_cv_prog_ac_ct_NM+:} false; then :
37303  $as_echo_n "(cached) " >&6
37304else
37305  if test -n "$ac_ct_NM"; then
37306  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37307else
37308as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37309for as_dir in $PATH
37310do
37311  IFS=$as_save_IFS
37312  test -z "$as_dir" && as_dir=.
37313    for ac_exec_ext in '' $ac_executable_extensions; do
37314  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37315    ac_cv_prog_ac_ct_NM="$ac_prog"
37316    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37317    break 2
37318  fi
37319done
37320  done
37321IFS=$as_save_IFS
37322
37323fi
37324fi
37325ac_ct_NM=$ac_cv_prog_ac_ct_NM
37326if test -n "$ac_ct_NM"; then
37327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37328$as_echo "$ac_ct_NM" >&6; }
37329else
37330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37331$as_echo "no" >&6; }
37332fi
37333
37334
37335  test -n "$ac_ct_NM" && break
37336done
37337
37338  if test "x$ac_ct_NM" = x; then
37339    NM=""
37340  else
37341    case $cross_compiling:$ac_tool_warned in
37342yes:)
37343{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37344$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37345ac_tool_warned=yes ;;
37346esac
37347    NM=$ac_ct_NM
37348  fi
37349fi
37350
37351    else
37352      # If it succeeded, then it was overridden by the user. We will use it
37353      # for the tool.
37354
37355      # First remove it from the list of overridden variables, so we can test
37356      # for unknown variables in the end.
37357      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37358
37359      # Check if the provided tool contains a complete path.
37360      tool_specified="$NM"
37361      tool_basename="${tool_specified##*/}"
37362      if test "x$tool_basename" = "x$tool_specified"; then
37363        # A command without a complete path is provided, search $PATH.
37364        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
37365$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
37366        # Extract the first word of "$tool_basename", so it can be a program name with args.
37367set dummy $tool_basename; ac_word=$2
37368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37369$as_echo_n "checking for $ac_word... " >&6; }
37370if ${ac_cv_path_NM+:} false; then :
37371  $as_echo_n "(cached) " >&6
37372else
37373  case $NM in
37374  [\\/]* | ?:[\\/]*)
37375  ac_cv_path_NM="$NM" # Let the user override the test with a path.
37376  ;;
37377  *)
37378  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37379for as_dir in $PATH
37380do
37381  IFS=$as_save_IFS
37382  test -z "$as_dir" && as_dir=.
37383    for ac_exec_ext in '' $ac_executable_extensions; do
37384  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37385    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
37386    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37387    break 2
37388  fi
37389done
37390  done
37391IFS=$as_save_IFS
37392
37393  ;;
37394esac
37395fi
37396NM=$ac_cv_path_NM
37397if test -n "$NM"; then
37398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37399$as_echo "$NM" >&6; }
37400else
37401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37402$as_echo "no" >&6; }
37403fi
37404
37405
37406        if test "x$NM" = x; then
37407          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37408        fi
37409      else
37410        # Otherwise we believe it is a complete path. Use it as it is.
37411        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
37412$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
37413        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
37414$as_echo_n "checking for NM... " >&6; }
37415        if test ! -x "$tool_specified"; then
37416          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37417$as_echo "not found" >&6; }
37418          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
37419        fi
37420        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37421$as_echo "$tool_specified" >&6; }
37422      fi
37423    fi
37424  fi
37425
37426
37427
37428  # Only process if variable expands to non-empty
37429
37430  if test "x$NM" != x; then
37431    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37432
37433  # First separate the path from the arguments. This will split at the first
37434  # space.
37435  complete="$NM"
37436  path="${complete%% *}"
37437  tmp="$complete EOL"
37438  arguments="${tmp#* }"
37439
37440  # Input might be given as Windows format, start by converting to
37441  # unix format.
37442  new_path=`$CYGPATH -u "$path"`
37443
37444  # Now try to locate executable using which
37445  new_path=`$WHICH "$new_path" 2> /dev/null`
37446  # bat and cmd files are not always considered executable in cygwin causing which
37447  # to not find them
37448  if test "x$new_path" = x \
37449      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37450      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37451    new_path=`$CYGPATH -u "$path"`
37452  fi
37453  if test "x$new_path" = x; then
37454    # Oops. Which didn't find the executable.
37455    # The splitting of arguments from the executable at a space might have been incorrect,
37456    # since paths with space are more likely in Windows. Give it another try with the whole
37457    # argument.
37458    path="$complete"
37459    arguments="EOL"
37460    new_path=`$CYGPATH -u "$path"`
37461    new_path=`$WHICH "$new_path" 2> /dev/null`
37462    # bat and cmd files are not always considered executable in cygwin causing which
37463    # to not find them
37464    if test "x$new_path" = x \
37465        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37466        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37467      new_path=`$CYGPATH -u "$path"`
37468    fi
37469    if test "x$new_path" = x; then
37470      # It's still not found. Now this is an unrecoverable error.
37471      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37472$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37473      has_space=`$ECHO "$complete" | $GREP " "`
37474      if test "x$has_space" != x; then
37475        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37476$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37477      fi
37478      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37479    fi
37480  fi
37481
37482  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37483  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37484  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37485  # "foo.exe" is OK but "foo" is an error.
37486  #
37487  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37488  # It is also a way to make sure we got the proper file name for the real test later on.
37489  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37490  if test "x$test_shortpath" = x; then
37491    # Short path failed, file does not exist as specified.
37492    # Try adding .exe or .cmd
37493    if test -f "${new_path}.exe"; then
37494      input_to_shortpath="${new_path}.exe"
37495    elif test -f "${new_path}.cmd"; then
37496      input_to_shortpath="${new_path}.cmd"
37497    else
37498      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
37499$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
37500      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37501$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37502      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37503    fi
37504  else
37505    input_to_shortpath="$new_path"
37506  fi
37507
37508  # Call helper function which possibly converts this using DOS-style short mode.
37509  # If so, the updated path is stored in $new_path.
37510  new_path="$input_to_shortpath"
37511
37512  input_path="$input_to_shortpath"
37513  # Check if we need to convert this using DOS-style short mode. If the path
37514  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37515  # take no chances and rewrite it.
37516  # Note: m4 eats our [], so we need to use [ and ] instead.
37517  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37518  if test "x$has_forbidden_chars" != x; then
37519    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37520    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37521    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37522    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37523      # Going to short mode and back again did indeed matter. Since short mode is
37524      # case insensitive, let's make it lowercase to improve readability.
37525      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37526      # Now convert it back to Unix-style (cygpath)
37527      input_path=`$CYGPATH -u "$shortmode_path"`
37528      new_path="$input_path"
37529    fi
37530  fi
37531
37532  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37533  if test "x$test_cygdrive_prefix" = x; then
37534    # As a simple fix, exclude /usr/bin since it's not a real path.
37535    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37536      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37537      # a path prefixed by /cygdrive for fixpath to work.
37538      new_path="$CYGWIN_ROOT_PATH$input_path"
37539    fi
37540  fi
37541
37542  # remove trailing .exe if any
37543  new_path="${new_path/%.exe/}"
37544
37545    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37546
37547  # First separate the path from the arguments. This will split at the first
37548  # space.
37549  complete="$NM"
37550  path="${complete%% *}"
37551  tmp="$complete EOL"
37552  arguments="${tmp#* }"
37553
37554  # Input might be given as Windows format, start by converting to
37555  # unix format.
37556  new_path="$path"
37557
37558  windows_path="$new_path"
37559  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37560    unix_path=`$CYGPATH -u "$windows_path"`
37561    new_path="$unix_path"
37562  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37563    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37564    new_path="$unix_path"
37565  fi
37566
37567
37568  # Now try to locate executable using which
37569  new_path=`$WHICH "$new_path" 2> /dev/null`
37570
37571  if test "x$new_path" = x; then
37572    # Oops. Which didn't find the executable.
37573    # The splitting of arguments from the executable at a space might have been incorrect,
37574    # since paths with space are more likely in Windows. Give it another try with the whole
37575    # argument.
37576    path="$complete"
37577    arguments="EOL"
37578    new_path="$path"
37579
37580  windows_path="$new_path"
37581  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37582    unix_path=`$CYGPATH -u "$windows_path"`
37583    new_path="$unix_path"
37584  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37585    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37586    new_path="$unix_path"
37587  fi
37588
37589
37590    new_path=`$WHICH "$new_path" 2> /dev/null`
37591    # bat and cmd files are not always considered executable in MSYS causing which
37592    # to not find them
37593    if test "x$new_path" = x \
37594        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37595        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37596      new_path="$path"
37597
37598  windows_path="$new_path"
37599  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37600    unix_path=`$CYGPATH -u "$windows_path"`
37601    new_path="$unix_path"
37602  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37603    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37604    new_path="$unix_path"
37605  fi
37606
37607    fi
37608
37609    if test "x$new_path" = x; then
37610      # It's still not found. Now this is an unrecoverable error.
37611      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37612$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37613      has_space=`$ECHO "$complete" | $GREP " "`
37614      if test "x$has_space" != x; then
37615        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37616$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37617      fi
37618      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37619    fi
37620  fi
37621
37622  # Now new_path has a complete unix path to the binary
37623  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37624    # Keep paths in /bin as-is, but remove trailing .exe if any
37625    new_path="${new_path/%.exe/}"
37626    # Do not save /bin paths to all_fixpath_prefixes!
37627  else
37628    # Not in mixed or Windows style, start by that.
37629    new_path=`cmd //c echo $new_path`
37630
37631  input_path="$new_path"
37632  # Check if we need to convert this using DOS-style short mode. If the path
37633  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37634  # take no chances and rewrite it.
37635  # Note: m4 eats our [], so we need to use [ and ] instead.
37636  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37637  if test "x$has_forbidden_chars" != x; then
37638    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37639    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37640  fi
37641
37642    # Output is in $new_path
37643
37644  windows_path="$new_path"
37645  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37646    unix_path=`$CYGPATH -u "$windows_path"`
37647    new_path="$unix_path"
37648  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37649    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37650    new_path="$unix_path"
37651  fi
37652
37653    # remove trailing .exe if any
37654    new_path="${new_path/%.exe/}"
37655
37656    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37657    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37658  fi
37659
37660    else
37661      # We're on a unix platform. Hooray! :)
37662      # First separate the path from the arguments. This will split at the first
37663      # space.
37664      complete="$NM"
37665      path="${complete%% *}"
37666      tmp="$complete EOL"
37667      arguments="${tmp#* }"
37668
37669      # Cannot rely on the command "which" here since it doesn't always work.
37670      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37671      if test -z "$is_absolute_path"; then
37672        # Path to executable is not absolute. Find it.
37673        IFS_save="$IFS"
37674        IFS=:
37675        for p in $PATH; do
37676          if test -f "$p/$path" && test -x "$p/$path"; then
37677            new_path="$p/$path"
37678            break
37679          fi
37680        done
37681        IFS="$IFS_save"
37682      else
37683        # This is an absolute path, we can use it without further modifications.
37684        new_path="$path"
37685      fi
37686
37687      if test "x$new_path" = x; then
37688        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37689$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37690        has_space=`$ECHO "$complete" | $GREP " "`
37691        if test "x$has_space" != x; then
37692          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37693$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37694        fi
37695        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37696      fi
37697    fi
37698
37699    # Now join together the path and the arguments once again
37700    if test "x$arguments" != xEOL; then
37701      new_complete="$new_path ${arguments% *}"
37702    else
37703      new_complete="$new_path"
37704    fi
37705
37706    if test "x$complete" != "x$new_complete"; then
37707      NM="$new_complete"
37708      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
37709$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
37710    fi
37711  fi
37712
37713    GNM="$NM"
37714
37715  fi
37716
37717  # objcopy is used for moving debug symbols to separate files when
37718  # full debug symbols are enabled.
37719  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
37720
37721
37722  # Publish this variable in the help.
37723
37724
37725  if test "x$OBJCOPY" = x; then
37726    # The variable is not set by user, try to locate tool using the code snippet
37727    if test -n "$ac_tool_prefix"; then
37728  for ac_prog in gobjcopy objcopy
37729  do
37730    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37731set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37733$as_echo_n "checking for $ac_word... " >&6; }
37734if ${ac_cv_prog_OBJCOPY+:} false; then :
37735  $as_echo_n "(cached) " >&6
37736else
37737  if test -n "$OBJCOPY"; then
37738  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
37739else
37740as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37741for as_dir in $PATH
37742do
37743  IFS=$as_save_IFS
37744  test -z "$as_dir" && as_dir=.
37745    for ac_exec_ext in '' $ac_executable_extensions; do
37746  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37747    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
37748    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37749    break 2
37750  fi
37751done
37752  done
37753IFS=$as_save_IFS
37754
37755fi
37756fi
37757OBJCOPY=$ac_cv_prog_OBJCOPY
37758if test -n "$OBJCOPY"; then
37759  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
37760$as_echo "$OBJCOPY" >&6; }
37761else
37762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37763$as_echo "no" >&6; }
37764fi
37765
37766
37767    test -n "$OBJCOPY" && break
37768  done
37769fi
37770if test -z "$OBJCOPY"; then
37771  ac_ct_OBJCOPY=$OBJCOPY
37772  for ac_prog in gobjcopy objcopy
37773do
37774  # Extract the first word of "$ac_prog", so it can be a program name with args.
37775set dummy $ac_prog; ac_word=$2
37776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37777$as_echo_n "checking for $ac_word... " >&6; }
37778if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
37779  $as_echo_n "(cached) " >&6
37780else
37781  if test -n "$ac_ct_OBJCOPY"; then
37782  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
37783else
37784as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37785for as_dir in $PATH
37786do
37787  IFS=$as_save_IFS
37788  test -z "$as_dir" && as_dir=.
37789    for ac_exec_ext in '' $ac_executable_extensions; do
37790  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37791    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
37792    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37793    break 2
37794  fi
37795done
37796  done
37797IFS=$as_save_IFS
37798
37799fi
37800fi
37801ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
37802if test -n "$ac_ct_OBJCOPY"; then
37803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
37804$as_echo "$ac_ct_OBJCOPY" >&6; }
37805else
37806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37807$as_echo "no" >&6; }
37808fi
37809
37810
37811  test -n "$ac_ct_OBJCOPY" && break
37812done
37813
37814  if test "x$ac_ct_OBJCOPY" = x; then
37815    OBJCOPY=""
37816  else
37817    case $cross_compiling:$ac_tool_warned in
37818yes:)
37819{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37820$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37821ac_tool_warned=yes ;;
37822esac
37823    OBJCOPY=$ac_ct_OBJCOPY
37824  fi
37825fi
37826
37827  else
37828    # The variable is set, but is it from the command line or the environment?
37829
37830    # Try to remove the string !OBJCOPY! from our list.
37831    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
37832    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37833      # If it failed, the variable was not from the command line. Ignore it,
37834      # but warn the user (except for BASH, which is always set by the calling BASH).
37835      if test "xOBJCOPY" != xBASH; then
37836        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
37837$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
37838      fi
37839      # Try to locate tool using the code snippet
37840      if test -n "$ac_tool_prefix"; then
37841  for ac_prog in gobjcopy objcopy
37842  do
37843    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37844set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37846$as_echo_n "checking for $ac_word... " >&6; }
37847if ${ac_cv_prog_OBJCOPY+:} false; then :
37848  $as_echo_n "(cached) " >&6
37849else
37850  if test -n "$OBJCOPY"; then
37851  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
37852else
37853as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37854for as_dir in $PATH
37855do
37856  IFS=$as_save_IFS
37857  test -z "$as_dir" && as_dir=.
37858    for ac_exec_ext in '' $ac_executable_extensions; do
37859  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37860    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
37861    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37862    break 2
37863  fi
37864done
37865  done
37866IFS=$as_save_IFS
37867
37868fi
37869fi
37870OBJCOPY=$ac_cv_prog_OBJCOPY
37871if test -n "$OBJCOPY"; then
37872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
37873$as_echo "$OBJCOPY" >&6; }
37874else
37875  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37876$as_echo "no" >&6; }
37877fi
37878
37879
37880    test -n "$OBJCOPY" && break
37881  done
37882fi
37883if test -z "$OBJCOPY"; then
37884  ac_ct_OBJCOPY=$OBJCOPY
37885  for ac_prog in gobjcopy objcopy
37886do
37887  # Extract the first word of "$ac_prog", so it can be a program name with args.
37888set dummy $ac_prog; ac_word=$2
37889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37890$as_echo_n "checking for $ac_word... " >&6; }
37891if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
37892  $as_echo_n "(cached) " >&6
37893else
37894  if test -n "$ac_ct_OBJCOPY"; then
37895  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
37896else
37897as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37898for as_dir in $PATH
37899do
37900  IFS=$as_save_IFS
37901  test -z "$as_dir" && as_dir=.
37902    for ac_exec_ext in '' $ac_executable_extensions; do
37903  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37904    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
37905    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37906    break 2
37907  fi
37908done
37909  done
37910IFS=$as_save_IFS
37911
37912fi
37913fi
37914ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
37915if test -n "$ac_ct_OBJCOPY"; then
37916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
37917$as_echo "$ac_ct_OBJCOPY" >&6; }
37918else
37919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37920$as_echo "no" >&6; }
37921fi
37922
37923
37924  test -n "$ac_ct_OBJCOPY" && break
37925done
37926
37927  if test "x$ac_ct_OBJCOPY" = x; then
37928    OBJCOPY=""
37929  else
37930    case $cross_compiling:$ac_tool_warned in
37931yes:)
37932{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37933$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37934ac_tool_warned=yes ;;
37935esac
37936    OBJCOPY=$ac_ct_OBJCOPY
37937  fi
37938fi
37939
37940    else
37941      # If it succeeded, then it was overridden by the user. We will use it
37942      # for the tool.
37943
37944      # First remove it from the list of overridden variables, so we can test
37945      # for unknown variables in the end.
37946      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37947
37948      # Check if the provided tool contains a complete path.
37949      tool_specified="$OBJCOPY"
37950      tool_basename="${tool_specified##*/}"
37951      if test "x$tool_basename" = "x$tool_specified"; then
37952        # A command without a complete path is provided, search $PATH.
37953        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
37954$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
37955        # Extract the first word of "$tool_basename", so it can be a program name with args.
37956set dummy $tool_basename; ac_word=$2
37957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37958$as_echo_n "checking for $ac_word... " >&6; }
37959if ${ac_cv_path_OBJCOPY+:} false; then :
37960  $as_echo_n "(cached) " >&6
37961else
37962  case $OBJCOPY in
37963  [\\/]* | ?:[\\/]*)
37964  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
37965  ;;
37966  *)
37967  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37968for as_dir in $PATH
37969do
37970  IFS=$as_save_IFS
37971  test -z "$as_dir" && as_dir=.
37972    for ac_exec_ext in '' $ac_executable_extensions; do
37973  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37974    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
37975    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37976    break 2
37977  fi
37978done
37979  done
37980IFS=$as_save_IFS
37981
37982  ;;
37983esac
37984fi
37985OBJCOPY=$ac_cv_path_OBJCOPY
37986if test -n "$OBJCOPY"; then
37987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
37988$as_echo "$OBJCOPY" >&6; }
37989else
37990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37991$as_echo "no" >&6; }
37992fi
37993
37994
37995        if test "x$OBJCOPY" = x; then
37996          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37997        fi
37998      else
37999        # Otherwise we believe it is a complete path. Use it as it is.
38000        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
38001$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
38002        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
38003$as_echo_n "checking for OBJCOPY... " >&6; }
38004        if test ! -x "$tool_specified"; then
38005          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38006$as_echo "not found" >&6; }
38007          as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
38008        fi
38009        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38010$as_echo "$tool_specified" >&6; }
38011      fi
38012    fi
38013  fi
38014
38015
38016    # Only call fixup if objcopy was found.
38017    if test -n "$OBJCOPY"; then
38018
38019  # Only process if variable expands to non-empty
38020
38021  if test "x$OBJCOPY" != x; then
38022    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38023
38024  # First separate the path from the arguments. This will split at the first
38025  # space.
38026  complete="$OBJCOPY"
38027  path="${complete%% *}"
38028  tmp="$complete EOL"
38029  arguments="${tmp#* }"
38030
38031  # Input might be given as Windows format, start by converting to
38032  # unix format.
38033  new_path=`$CYGPATH -u "$path"`
38034
38035  # Now try to locate executable using which
38036  new_path=`$WHICH "$new_path" 2> /dev/null`
38037  # bat and cmd files are not always considered executable in cygwin causing which
38038  # to not find them
38039  if test "x$new_path" = x \
38040      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38041      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38042    new_path=`$CYGPATH -u "$path"`
38043  fi
38044  if test "x$new_path" = x; then
38045    # Oops. Which didn't find the executable.
38046    # The splitting of arguments from the executable at a space might have been incorrect,
38047    # since paths with space are more likely in Windows. Give it another try with the whole
38048    # argument.
38049    path="$complete"
38050    arguments="EOL"
38051    new_path=`$CYGPATH -u "$path"`
38052    new_path=`$WHICH "$new_path" 2> /dev/null`
38053    # bat and cmd files are not always considered executable in cygwin causing which
38054    # to not find them
38055    if test "x$new_path" = x \
38056        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38057        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38058      new_path=`$CYGPATH -u "$path"`
38059    fi
38060    if test "x$new_path" = x; then
38061      # It's still not found. Now this is an unrecoverable error.
38062      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38063$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38064      has_space=`$ECHO "$complete" | $GREP " "`
38065      if test "x$has_space" != x; then
38066        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38067$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38068      fi
38069      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38070    fi
38071  fi
38072
38073  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38074  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38075  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38076  # "foo.exe" is OK but "foo" is an error.
38077  #
38078  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38079  # It is also a way to make sure we got the proper file name for the real test later on.
38080  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38081  if test "x$test_shortpath" = x; then
38082    # Short path failed, file does not exist as specified.
38083    # Try adding .exe or .cmd
38084    if test -f "${new_path}.exe"; then
38085      input_to_shortpath="${new_path}.exe"
38086    elif test -f "${new_path}.cmd"; then
38087      input_to_shortpath="${new_path}.cmd"
38088    else
38089      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
38090$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
38091      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38092$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38093      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38094    fi
38095  else
38096    input_to_shortpath="$new_path"
38097  fi
38098
38099  # Call helper function which possibly converts this using DOS-style short mode.
38100  # If so, the updated path is stored in $new_path.
38101  new_path="$input_to_shortpath"
38102
38103  input_path="$input_to_shortpath"
38104  # Check if we need to convert this using DOS-style short mode. If the path
38105  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38106  # take no chances and rewrite it.
38107  # Note: m4 eats our [], so we need to use [ and ] instead.
38108  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38109  if test "x$has_forbidden_chars" != x; then
38110    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38111    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38112    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38113    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38114      # Going to short mode and back again did indeed matter. Since short mode is
38115      # case insensitive, let's make it lowercase to improve readability.
38116      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38117      # Now convert it back to Unix-style (cygpath)
38118      input_path=`$CYGPATH -u "$shortmode_path"`
38119      new_path="$input_path"
38120    fi
38121  fi
38122
38123  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38124  if test "x$test_cygdrive_prefix" = x; then
38125    # As a simple fix, exclude /usr/bin since it's not a real path.
38126    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38127      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38128      # a path prefixed by /cygdrive for fixpath to work.
38129      new_path="$CYGWIN_ROOT_PATH$input_path"
38130    fi
38131  fi
38132
38133  # remove trailing .exe if any
38134  new_path="${new_path/%.exe/}"
38135
38136    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38137
38138  # First separate the path from the arguments. This will split at the first
38139  # space.
38140  complete="$OBJCOPY"
38141  path="${complete%% *}"
38142  tmp="$complete EOL"
38143  arguments="${tmp#* }"
38144
38145  # Input might be given as Windows format, start by converting to
38146  # unix format.
38147  new_path="$path"
38148
38149  windows_path="$new_path"
38150  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38151    unix_path=`$CYGPATH -u "$windows_path"`
38152    new_path="$unix_path"
38153  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38154    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38155    new_path="$unix_path"
38156  fi
38157
38158
38159  # Now try to locate executable using which
38160  new_path=`$WHICH "$new_path" 2> /dev/null`
38161
38162  if test "x$new_path" = x; then
38163    # Oops. Which didn't find the executable.
38164    # The splitting of arguments from the executable at a space might have been incorrect,
38165    # since paths with space are more likely in Windows. Give it another try with the whole
38166    # argument.
38167    path="$complete"
38168    arguments="EOL"
38169    new_path="$path"
38170
38171  windows_path="$new_path"
38172  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38173    unix_path=`$CYGPATH -u "$windows_path"`
38174    new_path="$unix_path"
38175  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38176    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38177    new_path="$unix_path"
38178  fi
38179
38180
38181    new_path=`$WHICH "$new_path" 2> /dev/null`
38182    # bat and cmd files are not always considered executable in MSYS causing which
38183    # to not find them
38184    if test "x$new_path" = x \
38185        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38186        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38187      new_path="$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    fi
38199
38200    if test "x$new_path" = x; then
38201      # It's still not found. Now this is an unrecoverable error.
38202      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38203$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38204      has_space=`$ECHO "$complete" | $GREP " "`
38205      if test "x$has_space" != x; then
38206        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38207$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38208      fi
38209      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38210    fi
38211  fi
38212
38213  # Now new_path has a complete unix path to the binary
38214  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38215    # Keep paths in /bin as-is, but remove trailing .exe if any
38216    new_path="${new_path/%.exe/}"
38217    # Do not save /bin paths to all_fixpath_prefixes!
38218  else
38219    # Not in mixed or Windows style, start by that.
38220    new_path=`cmd //c echo $new_path`
38221
38222  input_path="$new_path"
38223  # Check if we need to convert this using DOS-style short mode. If the path
38224  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38225  # take no chances and rewrite it.
38226  # Note: m4 eats our [], so we need to use [ and ] instead.
38227  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38228  if test "x$has_forbidden_chars" != x; then
38229    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38230    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38231  fi
38232
38233    # Output is in $new_path
38234
38235  windows_path="$new_path"
38236  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38237    unix_path=`$CYGPATH -u "$windows_path"`
38238    new_path="$unix_path"
38239  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38240    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38241    new_path="$unix_path"
38242  fi
38243
38244    # remove trailing .exe if any
38245    new_path="${new_path/%.exe/}"
38246
38247    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38248    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38249  fi
38250
38251    else
38252      # We're on a unix platform. Hooray! :)
38253      # First separate the path from the arguments. This will split at the first
38254      # space.
38255      complete="$OBJCOPY"
38256      path="${complete%% *}"
38257      tmp="$complete EOL"
38258      arguments="${tmp#* }"
38259
38260      # Cannot rely on the command "which" here since it doesn't always work.
38261      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38262      if test -z "$is_absolute_path"; then
38263        # Path to executable is not absolute. Find it.
38264        IFS_save="$IFS"
38265        IFS=:
38266        for p in $PATH; do
38267          if test -f "$p/$path" && test -x "$p/$path"; then
38268            new_path="$p/$path"
38269            break
38270          fi
38271        done
38272        IFS="$IFS_save"
38273      else
38274        # This is an absolute path, we can use it without further modifications.
38275        new_path="$path"
38276      fi
38277
38278      if test "x$new_path" = x; then
38279        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38280$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38281        has_space=`$ECHO "$complete" | $GREP " "`
38282        if test "x$has_space" != x; then
38283          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38284$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38285        fi
38286        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38287      fi
38288    fi
38289
38290    # Now join together the path and the arguments once again
38291    if test "x$arguments" != xEOL; then
38292      new_complete="$new_path ${arguments% *}"
38293    else
38294      new_complete="$new_path"
38295    fi
38296
38297    if test "x$complete" != "x$new_complete"; then
38298      OBJCOPY="$new_complete"
38299      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
38300$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
38301    fi
38302  fi
38303
38304    fi
38305  fi
38306
38307
38308
38309  # Publish this variable in the help.
38310
38311
38312  if test "x$OBJDUMP" = x; then
38313    # The variable is not set by user, try to locate tool using the code snippet
38314    if test -n "$ac_tool_prefix"; then
38315  for ac_prog in gobjdump objdump
38316  do
38317    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38318set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38320$as_echo_n "checking for $ac_word... " >&6; }
38321if ${ac_cv_prog_OBJDUMP+:} false; then :
38322  $as_echo_n "(cached) " >&6
38323else
38324  if test -n "$OBJDUMP"; then
38325  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38326else
38327as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38328for as_dir in $PATH
38329do
38330  IFS=$as_save_IFS
38331  test -z "$as_dir" && as_dir=.
38332    for ac_exec_ext in '' $ac_executable_extensions; do
38333  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38334    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38335    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38336    break 2
38337  fi
38338done
38339  done
38340IFS=$as_save_IFS
38341
38342fi
38343fi
38344OBJDUMP=$ac_cv_prog_OBJDUMP
38345if test -n "$OBJDUMP"; then
38346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38347$as_echo "$OBJDUMP" >&6; }
38348else
38349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38350$as_echo "no" >&6; }
38351fi
38352
38353
38354    test -n "$OBJDUMP" && break
38355  done
38356fi
38357if test -z "$OBJDUMP"; then
38358  ac_ct_OBJDUMP=$OBJDUMP
38359  for ac_prog in gobjdump objdump
38360do
38361  # Extract the first word of "$ac_prog", so it can be a program name with args.
38362set dummy $ac_prog; ac_word=$2
38363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38364$as_echo_n "checking for $ac_word... " >&6; }
38365if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38366  $as_echo_n "(cached) " >&6
38367else
38368  if test -n "$ac_ct_OBJDUMP"; then
38369  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38370else
38371as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38372for as_dir in $PATH
38373do
38374  IFS=$as_save_IFS
38375  test -z "$as_dir" && as_dir=.
38376    for ac_exec_ext in '' $ac_executable_extensions; do
38377  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38378    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38379    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38380    break 2
38381  fi
38382done
38383  done
38384IFS=$as_save_IFS
38385
38386fi
38387fi
38388ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38389if test -n "$ac_ct_OBJDUMP"; then
38390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38391$as_echo "$ac_ct_OBJDUMP" >&6; }
38392else
38393  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38394$as_echo "no" >&6; }
38395fi
38396
38397
38398  test -n "$ac_ct_OBJDUMP" && break
38399done
38400
38401  if test "x$ac_ct_OBJDUMP" = x; then
38402    OBJDUMP=""
38403  else
38404    case $cross_compiling:$ac_tool_warned in
38405yes:)
38406{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38407$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38408ac_tool_warned=yes ;;
38409esac
38410    OBJDUMP=$ac_ct_OBJDUMP
38411  fi
38412fi
38413
38414  else
38415    # The variable is set, but is it from the command line or the environment?
38416
38417    # Try to remove the string !OBJDUMP! from our list.
38418    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
38419    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38420      # If it failed, the variable was not from the command line. Ignore it,
38421      # but warn the user (except for BASH, which is always set by the calling BASH).
38422      if test "xOBJDUMP" != xBASH; then
38423        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
38424$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
38425      fi
38426      # Try to locate tool using the code snippet
38427      if test -n "$ac_tool_prefix"; then
38428  for ac_prog in gobjdump objdump
38429  do
38430    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38431set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38433$as_echo_n "checking for $ac_word... " >&6; }
38434if ${ac_cv_prog_OBJDUMP+:} false; then :
38435  $as_echo_n "(cached) " >&6
38436else
38437  if test -n "$OBJDUMP"; then
38438  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38439else
38440as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38441for as_dir in $PATH
38442do
38443  IFS=$as_save_IFS
38444  test -z "$as_dir" && as_dir=.
38445    for ac_exec_ext in '' $ac_executable_extensions; do
38446  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38447    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38448    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38449    break 2
38450  fi
38451done
38452  done
38453IFS=$as_save_IFS
38454
38455fi
38456fi
38457OBJDUMP=$ac_cv_prog_OBJDUMP
38458if test -n "$OBJDUMP"; then
38459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38460$as_echo "$OBJDUMP" >&6; }
38461else
38462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38463$as_echo "no" >&6; }
38464fi
38465
38466
38467    test -n "$OBJDUMP" && break
38468  done
38469fi
38470if test -z "$OBJDUMP"; then
38471  ac_ct_OBJDUMP=$OBJDUMP
38472  for ac_prog in gobjdump objdump
38473do
38474  # Extract the first word of "$ac_prog", so it can be a program name with args.
38475set dummy $ac_prog; ac_word=$2
38476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38477$as_echo_n "checking for $ac_word... " >&6; }
38478if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38479  $as_echo_n "(cached) " >&6
38480else
38481  if test -n "$ac_ct_OBJDUMP"; then
38482  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38483else
38484as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38485for as_dir in $PATH
38486do
38487  IFS=$as_save_IFS
38488  test -z "$as_dir" && as_dir=.
38489    for ac_exec_ext in '' $ac_executable_extensions; do
38490  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38491    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38492    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38493    break 2
38494  fi
38495done
38496  done
38497IFS=$as_save_IFS
38498
38499fi
38500fi
38501ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38502if test -n "$ac_ct_OBJDUMP"; then
38503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38504$as_echo "$ac_ct_OBJDUMP" >&6; }
38505else
38506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38507$as_echo "no" >&6; }
38508fi
38509
38510
38511  test -n "$ac_ct_OBJDUMP" && break
38512done
38513
38514  if test "x$ac_ct_OBJDUMP" = x; then
38515    OBJDUMP=""
38516  else
38517    case $cross_compiling:$ac_tool_warned in
38518yes:)
38519{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38520$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38521ac_tool_warned=yes ;;
38522esac
38523    OBJDUMP=$ac_ct_OBJDUMP
38524  fi
38525fi
38526
38527    else
38528      # If it succeeded, then it was overridden by the user. We will use it
38529      # for the tool.
38530
38531      # First remove it from the list of overridden variables, so we can test
38532      # for unknown variables in the end.
38533      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38534
38535      # Check if the provided tool contains a complete path.
38536      tool_specified="$OBJDUMP"
38537      tool_basename="${tool_specified##*/}"
38538      if test "x$tool_basename" = "x$tool_specified"; then
38539        # A command without a complete path is provided, search $PATH.
38540        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
38541$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
38542        # Extract the first word of "$tool_basename", so it can be a program name with args.
38543set dummy $tool_basename; ac_word=$2
38544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38545$as_echo_n "checking for $ac_word... " >&6; }
38546if ${ac_cv_path_OBJDUMP+:} false; then :
38547  $as_echo_n "(cached) " >&6
38548else
38549  case $OBJDUMP in
38550  [\\/]* | ?:[\\/]*)
38551  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
38552  ;;
38553  *)
38554  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38555for as_dir in $PATH
38556do
38557  IFS=$as_save_IFS
38558  test -z "$as_dir" && as_dir=.
38559    for ac_exec_ext in '' $ac_executable_extensions; do
38560  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38561    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
38562    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38563    break 2
38564  fi
38565done
38566  done
38567IFS=$as_save_IFS
38568
38569  ;;
38570esac
38571fi
38572OBJDUMP=$ac_cv_path_OBJDUMP
38573if test -n "$OBJDUMP"; then
38574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38575$as_echo "$OBJDUMP" >&6; }
38576else
38577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38578$as_echo "no" >&6; }
38579fi
38580
38581
38582        if test "x$OBJDUMP" = x; then
38583          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38584        fi
38585      else
38586        # Otherwise we believe it is a complete path. Use it as it is.
38587        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
38588$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
38589        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
38590$as_echo_n "checking for OBJDUMP... " >&6; }
38591        if test ! -x "$tool_specified"; then
38592          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38593$as_echo "not found" >&6; }
38594          as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
38595        fi
38596        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38597$as_echo "$tool_specified" >&6; }
38598      fi
38599    fi
38600  fi
38601
38602
38603  if test "x$OBJDUMP" != x; then
38604    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
38605    # bails if argument is missing.
38606
38607  # Only process if variable expands to non-empty
38608
38609  if test "x$OBJDUMP" != x; then
38610    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38611
38612  # First separate the path from the arguments. This will split at the first
38613  # space.
38614  complete="$OBJDUMP"
38615  path="${complete%% *}"
38616  tmp="$complete EOL"
38617  arguments="${tmp#* }"
38618
38619  # Input might be given as Windows format, start by converting to
38620  # unix format.
38621  new_path=`$CYGPATH -u "$path"`
38622
38623  # Now try to locate executable using which
38624  new_path=`$WHICH "$new_path" 2> /dev/null`
38625  # bat and cmd files are not always considered executable in cygwin causing which
38626  # to not find them
38627  if test "x$new_path" = x \
38628      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38629      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38630    new_path=`$CYGPATH -u "$path"`
38631  fi
38632  if test "x$new_path" = x; then
38633    # Oops. Which didn't find the executable.
38634    # The splitting of arguments from the executable at a space might have been incorrect,
38635    # since paths with space are more likely in Windows. Give it another try with the whole
38636    # argument.
38637    path="$complete"
38638    arguments="EOL"
38639    new_path=`$CYGPATH -u "$path"`
38640    new_path=`$WHICH "$new_path" 2> /dev/null`
38641    # bat and cmd files are not always considered executable in cygwin causing which
38642    # to not find them
38643    if test "x$new_path" = x \
38644        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38645        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38646      new_path=`$CYGPATH -u "$path"`
38647    fi
38648    if test "x$new_path" = x; then
38649      # It's still not found. Now this is an unrecoverable error.
38650      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38651$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38652      has_space=`$ECHO "$complete" | $GREP " "`
38653      if test "x$has_space" != x; then
38654        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38655$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38656      fi
38657      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38658    fi
38659  fi
38660
38661  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38662  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38663  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38664  # "foo.exe" is OK but "foo" is an error.
38665  #
38666  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38667  # It is also a way to make sure we got the proper file name for the real test later on.
38668  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38669  if test "x$test_shortpath" = x; then
38670    # Short path failed, file does not exist as specified.
38671    # Try adding .exe or .cmd
38672    if test -f "${new_path}.exe"; then
38673      input_to_shortpath="${new_path}.exe"
38674    elif test -f "${new_path}.cmd"; then
38675      input_to_shortpath="${new_path}.cmd"
38676    else
38677      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
38678$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
38679      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38680$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38681      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38682    fi
38683  else
38684    input_to_shortpath="$new_path"
38685  fi
38686
38687  # Call helper function which possibly converts this using DOS-style short mode.
38688  # If so, the updated path is stored in $new_path.
38689  new_path="$input_to_shortpath"
38690
38691  input_path="$input_to_shortpath"
38692  # Check if we need to convert this using DOS-style short mode. If the path
38693  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38694  # take no chances and rewrite it.
38695  # Note: m4 eats our [], so we need to use [ and ] instead.
38696  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38697  if test "x$has_forbidden_chars" != x; then
38698    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38699    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38700    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38701    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38702      # Going to short mode and back again did indeed matter. Since short mode is
38703      # case insensitive, let's make it lowercase to improve readability.
38704      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38705      # Now convert it back to Unix-style (cygpath)
38706      input_path=`$CYGPATH -u "$shortmode_path"`
38707      new_path="$input_path"
38708    fi
38709  fi
38710
38711  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38712  if test "x$test_cygdrive_prefix" = x; then
38713    # As a simple fix, exclude /usr/bin since it's not a real path.
38714    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38715      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38716      # a path prefixed by /cygdrive for fixpath to work.
38717      new_path="$CYGWIN_ROOT_PATH$input_path"
38718    fi
38719  fi
38720
38721  # remove trailing .exe if any
38722  new_path="${new_path/%.exe/}"
38723
38724    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38725
38726  # First separate the path from the arguments. This will split at the first
38727  # space.
38728  complete="$OBJDUMP"
38729  path="${complete%% *}"
38730  tmp="$complete EOL"
38731  arguments="${tmp#* }"
38732
38733  # Input might be given as Windows format, start by converting to
38734  # unix format.
38735  new_path="$path"
38736
38737  windows_path="$new_path"
38738  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38739    unix_path=`$CYGPATH -u "$windows_path"`
38740    new_path="$unix_path"
38741  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38742    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38743    new_path="$unix_path"
38744  fi
38745
38746
38747  # Now try to locate executable using which
38748  new_path=`$WHICH "$new_path" 2> /dev/null`
38749
38750  if test "x$new_path" = x; then
38751    # Oops. Which didn't find the executable.
38752    # The splitting of arguments from the executable at a space might have been incorrect,
38753    # since paths with space are more likely in Windows. Give it another try with the whole
38754    # argument.
38755    path="$complete"
38756    arguments="EOL"
38757    new_path="$path"
38758
38759  windows_path="$new_path"
38760  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38761    unix_path=`$CYGPATH -u "$windows_path"`
38762    new_path="$unix_path"
38763  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38764    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38765    new_path="$unix_path"
38766  fi
38767
38768
38769    new_path=`$WHICH "$new_path" 2> /dev/null`
38770    # bat and cmd files are not always considered executable in MSYS causing which
38771    # to not find them
38772    if test "x$new_path" = x \
38773        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38774        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38775      new_path="$path"
38776
38777  windows_path="$new_path"
38778  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38779    unix_path=`$CYGPATH -u "$windows_path"`
38780    new_path="$unix_path"
38781  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38782    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38783    new_path="$unix_path"
38784  fi
38785
38786    fi
38787
38788    if test "x$new_path" = x; then
38789      # It's still not found. Now this is an unrecoverable error.
38790      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38791$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38792      has_space=`$ECHO "$complete" | $GREP " "`
38793      if test "x$has_space" != x; then
38794        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38795$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38796      fi
38797      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38798    fi
38799  fi
38800
38801  # Now new_path has a complete unix path to the binary
38802  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38803    # Keep paths in /bin as-is, but remove trailing .exe if any
38804    new_path="${new_path/%.exe/}"
38805    # Do not save /bin paths to all_fixpath_prefixes!
38806  else
38807    # Not in mixed or Windows style, start by that.
38808    new_path=`cmd //c echo $new_path`
38809
38810  input_path="$new_path"
38811  # Check if we need to convert this using DOS-style short mode. If the path
38812  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38813  # take no chances and rewrite it.
38814  # Note: m4 eats our [], so we need to use [ and ] instead.
38815  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38816  if test "x$has_forbidden_chars" != x; then
38817    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38818    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38819  fi
38820
38821    # Output is in $new_path
38822
38823  windows_path="$new_path"
38824  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38825    unix_path=`$CYGPATH -u "$windows_path"`
38826    new_path="$unix_path"
38827  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38828    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38829    new_path="$unix_path"
38830  fi
38831
38832    # remove trailing .exe if any
38833    new_path="${new_path/%.exe/}"
38834
38835    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38836    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38837  fi
38838
38839    else
38840      # We're on a unix platform. Hooray! :)
38841      # First separate the path from the arguments. This will split at the first
38842      # space.
38843      complete="$OBJDUMP"
38844      path="${complete%% *}"
38845      tmp="$complete EOL"
38846      arguments="${tmp#* }"
38847
38848      # Cannot rely on the command "which" here since it doesn't always work.
38849      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38850      if test -z "$is_absolute_path"; then
38851        # Path to executable is not absolute. Find it.
38852        IFS_save="$IFS"
38853        IFS=:
38854        for p in $PATH; do
38855          if test -f "$p/$path" && test -x "$p/$path"; then
38856            new_path="$p/$path"
38857            break
38858          fi
38859        done
38860        IFS="$IFS_save"
38861      else
38862        # This is an absolute path, we can use it without further modifications.
38863        new_path="$path"
38864      fi
38865
38866      if test "x$new_path" = x; then
38867        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38868$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38869        has_space=`$ECHO "$complete" | $GREP " "`
38870        if test "x$has_space" != x; then
38871          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38872$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38873        fi
38874        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38875      fi
38876    fi
38877
38878    # Now join together the path and the arguments once again
38879    if test "x$arguments" != xEOL; then
38880      new_complete="$new_path ${arguments% *}"
38881    else
38882      new_complete="$new_path"
38883    fi
38884
38885    if test "x$complete" != "x$new_complete"; then
38886      OBJDUMP="$new_complete"
38887      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
38888$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
38889    fi
38890  fi
38891
38892  fi
38893
38894
38895  # Restore old path.
38896  PATH="$OLD_PATH"
38897
38898  # Restore the flags to the user specified values.
38899  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
38900  CFLAGS="$ORG_CFLAGS"
38901  CXXFLAGS="$ORG_CXXFLAGS"
38902
38903
38904# Finally do some processing after the detection phase
38905
38906  if test "x$COMPILE_TYPE" = "xcross"; then
38907    # Now we need to find a C/C++ compiler that can build executables for the
38908    # build platform. We can't use the AC_PROG_CC macro, since it can only be
38909    # used once. Also, we need to do this without adding a tools dir to the
38910    # path, otherwise we might pick up cross-compilers which don't use standard
38911    # naming.
38912
38913    # FIXME: we should list the discovered compilers as an exclude pattern!
38914    # If we do that, we can do this detection before POST_DETECTION, and still
38915    # find the build compilers in the tools dir, if needed.
38916
38917
38918  # Publish this variable in the help.
38919
38920
38921  if test "x$BUILD_CC" = x; then
38922    # The variable is not set by user, try to locate tool using the code snippet
38923    for ac_prog in cl cc gcc
38924do
38925  # Extract the first word of "$ac_prog", so it can be a program name with args.
38926set dummy $ac_prog; ac_word=$2
38927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38928$as_echo_n "checking for $ac_word... " >&6; }
38929if ${ac_cv_path_BUILD_CC+:} false; then :
38930  $as_echo_n "(cached) " >&6
38931else
38932  case $BUILD_CC in
38933  [\\/]* | ?:[\\/]*)
38934  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
38935  ;;
38936  *)
38937  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38938for as_dir in $PATH
38939do
38940  IFS=$as_save_IFS
38941  test -z "$as_dir" && as_dir=.
38942    for ac_exec_ext in '' $ac_executable_extensions; do
38943  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38944    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
38945    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38946    break 2
38947  fi
38948done
38949  done
38950IFS=$as_save_IFS
38951
38952  ;;
38953esac
38954fi
38955BUILD_CC=$ac_cv_path_BUILD_CC
38956if test -n "$BUILD_CC"; then
38957  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
38958$as_echo "$BUILD_CC" >&6; }
38959else
38960  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38961$as_echo "no" >&6; }
38962fi
38963
38964
38965  test -n "$BUILD_CC" && break
38966done
38967
38968  else
38969    # The variable is set, but is it from the command line or the environment?
38970
38971    # Try to remove the string !BUILD_CC! from our list.
38972    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
38973    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38974      # If it failed, the variable was not from the command line. Ignore it,
38975      # but warn the user (except for BASH, which is always set by the calling BASH).
38976      if test "xBUILD_CC" != xBASH; then
38977        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
38978$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
38979      fi
38980      # Try to locate tool using the code snippet
38981      for ac_prog in cl cc gcc
38982do
38983  # Extract the first word of "$ac_prog", so it can be a program name with args.
38984set dummy $ac_prog; ac_word=$2
38985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38986$as_echo_n "checking for $ac_word... " >&6; }
38987if ${ac_cv_path_BUILD_CC+:} false; then :
38988  $as_echo_n "(cached) " >&6
38989else
38990  case $BUILD_CC in
38991  [\\/]* | ?:[\\/]*)
38992  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
38993  ;;
38994  *)
38995  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38996for as_dir in $PATH
38997do
38998  IFS=$as_save_IFS
38999  test -z "$as_dir" && as_dir=.
39000    for ac_exec_ext in '' $ac_executable_extensions; do
39001  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39002    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39003    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39004    break 2
39005  fi
39006done
39007  done
39008IFS=$as_save_IFS
39009
39010  ;;
39011esac
39012fi
39013BUILD_CC=$ac_cv_path_BUILD_CC
39014if test -n "$BUILD_CC"; then
39015  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39016$as_echo "$BUILD_CC" >&6; }
39017else
39018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39019$as_echo "no" >&6; }
39020fi
39021
39022
39023  test -n "$BUILD_CC" && break
39024done
39025
39026    else
39027      # If it succeeded, then it was overridden by the user. We will use it
39028      # for the tool.
39029
39030      # First remove it from the list of overridden variables, so we can test
39031      # for unknown variables in the end.
39032      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39033
39034      # Check if the provided tool contains a complete path.
39035      tool_specified="$BUILD_CC"
39036      tool_basename="${tool_specified##*/}"
39037      if test "x$tool_basename" = "x$tool_specified"; then
39038        # A command without a complete path is provided, search $PATH.
39039        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
39040$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
39041        # Extract the first word of "$tool_basename", so it can be a program name with args.
39042set dummy $tool_basename; ac_word=$2
39043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39044$as_echo_n "checking for $ac_word... " >&6; }
39045if ${ac_cv_path_BUILD_CC+:} false; then :
39046  $as_echo_n "(cached) " >&6
39047else
39048  case $BUILD_CC in
39049  [\\/]* | ?:[\\/]*)
39050  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39051  ;;
39052  *)
39053  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39054for as_dir in $PATH
39055do
39056  IFS=$as_save_IFS
39057  test -z "$as_dir" && as_dir=.
39058    for ac_exec_ext in '' $ac_executable_extensions; do
39059  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39060    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39061    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39062    break 2
39063  fi
39064done
39065  done
39066IFS=$as_save_IFS
39067
39068  ;;
39069esac
39070fi
39071BUILD_CC=$ac_cv_path_BUILD_CC
39072if test -n "$BUILD_CC"; then
39073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39074$as_echo "$BUILD_CC" >&6; }
39075else
39076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39077$as_echo "no" >&6; }
39078fi
39079
39080
39081        if test "x$BUILD_CC" = x; then
39082          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39083        fi
39084      else
39085        # Otherwise we believe it is a complete path. Use it as it is.
39086        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
39087$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
39088        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
39089$as_echo_n "checking for BUILD_CC... " >&6; }
39090        if test ! -x "$tool_specified"; then
39091          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39092$as_echo "not found" >&6; }
39093          as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
39094        fi
39095        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39096$as_echo "$tool_specified" >&6; }
39097      fi
39098    fi
39099  fi
39100
39101
39102
39103  # Only process if variable expands to non-empty
39104
39105  if test "x$BUILD_CC" != x; then
39106    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39107
39108  # First separate the path from the arguments. This will split at the first
39109  # space.
39110  complete="$BUILD_CC"
39111  path="${complete%% *}"
39112  tmp="$complete EOL"
39113  arguments="${tmp#* }"
39114
39115  # Input might be given as Windows format, start by converting to
39116  # unix format.
39117  new_path=`$CYGPATH -u "$path"`
39118
39119  # Now try to locate executable using which
39120  new_path=`$WHICH "$new_path" 2> /dev/null`
39121  # bat and cmd files are not always considered executable in cygwin causing which
39122  # to not find them
39123  if test "x$new_path" = x \
39124      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39125      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39126    new_path=`$CYGPATH -u "$path"`
39127  fi
39128  if test "x$new_path" = x; then
39129    # Oops. Which didn't find the executable.
39130    # The splitting of arguments from the executable at a space might have been incorrect,
39131    # since paths with space are more likely in Windows. Give it another try with the whole
39132    # argument.
39133    path="$complete"
39134    arguments="EOL"
39135    new_path=`$CYGPATH -u "$path"`
39136    new_path=`$WHICH "$new_path" 2> /dev/null`
39137    # bat and cmd files are not always considered executable in cygwin causing which
39138    # to not find them
39139    if test "x$new_path" = x \
39140        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39141        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39142      new_path=`$CYGPATH -u "$path"`
39143    fi
39144    if test "x$new_path" = x; then
39145      # It's still not found. Now this is an unrecoverable error.
39146      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39147$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39148      has_space=`$ECHO "$complete" | $GREP " "`
39149      if test "x$has_space" != x; then
39150        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39151$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39152      fi
39153      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39154    fi
39155  fi
39156
39157  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39158  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39159  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39160  # "foo.exe" is OK but "foo" is an error.
39161  #
39162  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39163  # It is also a way to make sure we got the proper file name for the real test later on.
39164  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39165  if test "x$test_shortpath" = x; then
39166    # Short path failed, file does not exist as specified.
39167    # Try adding .exe or .cmd
39168    if test -f "${new_path}.exe"; then
39169      input_to_shortpath="${new_path}.exe"
39170    elif test -f "${new_path}.cmd"; then
39171      input_to_shortpath="${new_path}.cmd"
39172    else
39173      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
39174$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
39175      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39176$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39177      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39178    fi
39179  else
39180    input_to_shortpath="$new_path"
39181  fi
39182
39183  # Call helper function which possibly converts this using DOS-style short mode.
39184  # If so, the updated path is stored in $new_path.
39185  new_path="$input_to_shortpath"
39186
39187  input_path="$input_to_shortpath"
39188  # Check if we need to convert this using DOS-style short mode. If the path
39189  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39190  # take no chances and rewrite it.
39191  # Note: m4 eats our [], so we need to use [ and ] instead.
39192  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39193  if test "x$has_forbidden_chars" != x; then
39194    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39195    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39196    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39197    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39198      # Going to short mode and back again did indeed matter. Since short mode is
39199      # case insensitive, let's make it lowercase to improve readability.
39200      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39201      # Now convert it back to Unix-style (cygpath)
39202      input_path=`$CYGPATH -u "$shortmode_path"`
39203      new_path="$input_path"
39204    fi
39205  fi
39206
39207  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39208  if test "x$test_cygdrive_prefix" = x; then
39209    # As a simple fix, exclude /usr/bin since it's not a real path.
39210    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39211      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39212      # a path prefixed by /cygdrive for fixpath to work.
39213      new_path="$CYGWIN_ROOT_PATH$input_path"
39214    fi
39215  fi
39216
39217  # remove trailing .exe if any
39218  new_path="${new_path/%.exe/}"
39219
39220    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39221
39222  # First separate the path from the arguments. This will split at the first
39223  # space.
39224  complete="$BUILD_CC"
39225  path="${complete%% *}"
39226  tmp="$complete EOL"
39227  arguments="${tmp#* }"
39228
39229  # Input might be given as Windows format, start by converting to
39230  # unix format.
39231  new_path="$path"
39232
39233  windows_path="$new_path"
39234  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39235    unix_path=`$CYGPATH -u "$windows_path"`
39236    new_path="$unix_path"
39237  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39238    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39239    new_path="$unix_path"
39240  fi
39241
39242
39243  # Now try to locate executable using which
39244  new_path=`$WHICH "$new_path" 2> /dev/null`
39245
39246  if test "x$new_path" = x; then
39247    # Oops. Which didn't find the executable.
39248    # The splitting of arguments from the executable at a space might have been incorrect,
39249    # since paths with space are more likely in Windows. Give it another try with the whole
39250    # argument.
39251    path="$complete"
39252    arguments="EOL"
39253    new_path="$path"
39254
39255  windows_path="$new_path"
39256  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39257    unix_path=`$CYGPATH -u "$windows_path"`
39258    new_path="$unix_path"
39259  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39260    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39261    new_path="$unix_path"
39262  fi
39263
39264
39265    new_path=`$WHICH "$new_path" 2> /dev/null`
39266    # bat and cmd files are not always considered executable in MSYS causing which
39267    # to not find them
39268    if test "x$new_path" = x \
39269        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39270        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39271      new_path="$path"
39272
39273  windows_path="$new_path"
39274  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39275    unix_path=`$CYGPATH -u "$windows_path"`
39276    new_path="$unix_path"
39277  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39278    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39279    new_path="$unix_path"
39280  fi
39281
39282    fi
39283
39284    if test "x$new_path" = x; then
39285      # It's still not found. Now this is an unrecoverable error.
39286      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39287$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39288      has_space=`$ECHO "$complete" | $GREP " "`
39289      if test "x$has_space" != x; then
39290        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39291$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39292      fi
39293      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39294    fi
39295  fi
39296
39297  # Now new_path has a complete unix path to the binary
39298  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39299    # Keep paths in /bin as-is, but remove trailing .exe if any
39300    new_path="${new_path/%.exe/}"
39301    # Do not save /bin paths to all_fixpath_prefixes!
39302  else
39303    # Not in mixed or Windows style, start by that.
39304    new_path=`cmd //c echo $new_path`
39305
39306  input_path="$new_path"
39307  # Check if we need to convert this using DOS-style short mode. If the path
39308  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39309  # take no chances and rewrite it.
39310  # Note: m4 eats our [], so we need to use [ and ] instead.
39311  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39312  if test "x$has_forbidden_chars" != x; then
39313    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39314    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39315  fi
39316
39317    # Output is in $new_path
39318
39319  windows_path="$new_path"
39320  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39321    unix_path=`$CYGPATH -u "$windows_path"`
39322    new_path="$unix_path"
39323  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39324    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39325    new_path="$unix_path"
39326  fi
39327
39328    # remove trailing .exe if any
39329    new_path="${new_path/%.exe/}"
39330
39331    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39332    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39333  fi
39334
39335    else
39336      # We're on a unix platform. Hooray! :)
39337      # First separate the path from the arguments. This will split at the first
39338      # space.
39339      complete="$BUILD_CC"
39340      path="${complete%% *}"
39341      tmp="$complete EOL"
39342      arguments="${tmp#* }"
39343
39344      # Cannot rely on the command "which" here since it doesn't always work.
39345      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39346      if test -z "$is_absolute_path"; then
39347        # Path to executable is not absolute. Find it.
39348        IFS_save="$IFS"
39349        IFS=:
39350        for p in $PATH; do
39351          if test -f "$p/$path" && test -x "$p/$path"; then
39352            new_path="$p/$path"
39353            break
39354          fi
39355        done
39356        IFS="$IFS_save"
39357      else
39358        # This is an absolute path, we can use it without further modifications.
39359        new_path="$path"
39360      fi
39361
39362      if test "x$new_path" = x; then
39363        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39364$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39365        has_space=`$ECHO "$complete" | $GREP " "`
39366        if test "x$has_space" != x; then
39367          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39368$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39369        fi
39370        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39371      fi
39372    fi
39373
39374    # Now join together the path and the arguments once again
39375    if test "x$arguments" != xEOL; then
39376      new_complete="$new_path ${arguments% *}"
39377    else
39378      new_complete="$new_path"
39379    fi
39380
39381    if test "x$complete" != "x$new_complete"; then
39382      BUILD_CC="$new_complete"
39383      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
39384$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
39385    fi
39386  fi
39387
39388
39389
39390  # Publish this variable in the help.
39391
39392
39393  if test "x$BUILD_CXX" = x; then
39394    # The variable is not set by user, try to locate tool using the code snippet
39395    for ac_prog in cl CC g++
39396do
39397  # Extract the first word of "$ac_prog", so it can be a program name with args.
39398set dummy $ac_prog; ac_word=$2
39399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39400$as_echo_n "checking for $ac_word... " >&6; }
39401if ${ac_cv_path_BUILD_CXX+:} false; then :
39402  $as_echo_n "(cached) " >&6
39403else
39404  case $BUILD_CXX in
39405  [\\/]* | ?:[\\/]*)
39406  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39407  ;;
39408  *)
39409  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39410for as_dir in $PATH
39411do
39412  IFS=$as_save_IFS
39413  test -z "$as_dir" && as_dir=.
39414    for ac_exec_ext in '' $ac_executable_extensions; do
39415  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39416    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39417    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39418    break 2
39419  fi
39420done
39421  done
39422IFS=$as_save_IFS
39423
39424  ;;
39425esac
39426fi
39427BUILD_CXX=$ac_cv_path_BUILD_CXX
39428if test -n "$BUILD_CXX"; then
39429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39430$as_echo "$BUILD_CXX" >&6; }
39431else
39432  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39433$as_echo "no" >&6; }
39434fi
39435
39436
39437  test -n "$BUILD_CXX" && break
39438done
39439
39440  else
39441    # The variable is set, but is it from the command line or the environment?
39442
39443    # Try to remove the string !BUILD_CXX! from our list.
39444    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
39445    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39446      # If it failed, the variable was not from the command line. Ignore it,
39447      # but warn the user (except for BASH, which is always set by the calling BASH).
39448      if test "xBUILD_CXX" != xBASH; then
39449        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
39450$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
39451      fi
39452      # Try to locate tool using the code snippet
39453      for ac_prog in cl CC g++
39454do
39455  # Extract the first word of "$ac_prog", so it can be a program name with args.
39456set dummy $ac_prog; ac_word=$2
39457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39458$as_echo_n "checking for $ac_word... " >&6; }
39459if ${ac_cv_path_BUILD_CXX+:} false; then :
39460  $as_echo_n "(cached) " >&6
39461else
39462  case $BUILD_CXX in
39463  [\\/]* | ?:[\\/]*)
39464  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39465  ;;
39466  *)
39467  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39468for as_dir in $PATH
39469do
39470  IFS=$as_save_IFS
39471  test -z "$as_dir" && as_dir=.
39472    for ac_exec_ext in '' $ac_executable_extensions; do
39473  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39474    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39475    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39476    break 2
39477  fi
39478done
39479  done
39480IFS=$as_save_IFS
39481
39482  ;;
39483esac
39484fi
39485BUILD_CXX=$ac_cv_path_BUILD_CXX
39486if test -n "$BUILD_CXX"; then
39487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39488$as_echo "$BUILD_CXX" >&6; }
39489else
39490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39491$as_echo "no" >&6; }
39492fi
39493
39494
39495  test -n "$BUILD_CXX" && break
39496done
39497
39498    else
39499      # If it succeeded, then it was overridden by the user. We will use it
39500      # for the tool.
39501
39502      # First remove it from the list of overridden variables, so we can test
39503      # for unknown variables in the end.
39504      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39505
39506      # Check if the provided tool contains a complete path.
39507      tool_specified="$BUILD_CXX"
39508      tool_basename="${tool_specified##*/}"
39509      if test "x$tool_basename" = "x$tool_specified"; then
39510        # A command without a complete path is provided, search $PATH.
39511        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
39512$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
39513        # Extract the first word of "$tool_basename", so it can be a program name with args.
39514set dummy $tool_basename; ac_word=$2
39515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39516$as_echo_n "checking for $ac_word... " >&6; }
39517if ${ac_cv_path_BUILD_CXX+:} false; then :
39518  $as_echo_n "(cached) " >&6
39519else
39520  case $BUILD_CXX in
39521  [\\/]* | ?:[\\/]*)
39522  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39523  ;;
39524  *)
39525  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39526for as_dir in $PATH
39527do
39528  IFS=$as_save_IFS
39529  test -z "$as_dir" && as_dir=.
39530    for ac_exec_ext in '' $ac_executable_extensions; do
39531  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39532    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39533    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39534    break 2
39535  fi
39536done
39537  done
39538IFS=$as_save_IFS
39539
39540  ;;
39541esac
39542fi
39543BUILD_CXX=$ac_cv_path_BUILD_CXX
39544if test -n "$BUILD_CXX"; then
39545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39546$as_echo "$BUILD_CXX" >&6; }
39547else
39548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39549$as_echo "no" >&6; }
39550fi
39551
39552
39553        if test "x$BUILD_CXX" = x; then
39554          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39555        fi
39556      else
39557        # Otherwise we believe it is a complete path. Use it as it is.
39558        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
39559$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
39560        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
39561$as_echo_n "checking for BUILD_CXX... " >&6; }
39562        if test ! -x "$tool_specified"; then
39563          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39564$as_echo "not found" >&6; }
39565          as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
39566        fi
39567        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39568$as_echo "$tool_specified" >&6; }
39569      fi
39570    fi
39571  fi
39572
39573
39574
39575  # Only process if variable expands to non-empty
39576
39577  if test "x$BUILD_CXX" != x; then
39578    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39579
39580  # First separate the path from the arguments. This will split at the first
39581  # space.
39582  complete="$BUILD_CXX"
39583  path="${complete%% *}"
39584  tmp="$complete EOL"
39585  arguments="${tmp#* }"
39586
39587  # Input might be given as Windows format, start by converting to
39588  # unix format.
39589  new_path=`$CYGPATH -u "$path"`
39590
39591  # Now try to locate executable using which
39592  new_path=`$WHICH "$new_path" 2> /dev/null`
39593  # bat and cmd files are not always considered executable in cygwin causing which
39594  # to not find them
39595  if test "x$new_path" = x \
39596      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39597      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39598    new_path=`$CYGPATH -u "$path"`
39599  fi
39600  if test "x$new_path" = x; then
39601    # Oops. Which didn't find the executable.
39602    # The splitting of arguments from the executable at a space might have been incorrect,
39603    # since paths with space are more likely in Windows. Give it another try with the whole
39604    # argument.
39605    path="$complete"
39606    arguments="EOL"
39607    new_path=`$CYGPATH -u "$path"`
39608    new_path=`$WHICH "$new_path" 2> /dev/null`
39609    # bat and cmd files are not always considered executable in cygwin causing which
39610    # to not find them
39611    if test "x$new_path" = x \
39612        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39613        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39614      new_path=`$CYGPATH -u "$path"`
39615    fi
39616    if test "x$new_path" = x; then
39617      # It's still not found. Now this is an unrecoverable error.
39618      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39619$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39620      has_space=`$ECHO "$complete" | $GREP " "`
39621      if test "x$has_space" != x; then
39622        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39623$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39624      fi
39625      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39626    fi
39627  fi
39628
39629  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39630  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39631  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39632  # "foo.exe" is OK but "foo" is an error.
39633  #
39634  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39635  # It is also a way to make sure we got the proper file name for the real test later on.
39636  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39637  if test "x$test_shortpath" = x; then
39638    # Short path failed, file does not exist as specified.
39639    # Try adding .exe or .cmd
39640    if test -f "${new_path}.exe"; then
39641      input_to_shortpath="${new_path}.exe"
39642    elif test -f "${new_path}.cmd"; then
39643      input_to_shortpath="${new_path}.cmd"
39644    else
39645      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
39646$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
39647      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39648$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39649      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39650    fi
39651  else
39652    input_to_shortpath="$new_path"
39653  fi
39654
39655  # Call helper function which possibly converts this using DOS-style short mode.
39656  # If so, the updated path is stored in $new_path.
39657  new_path="$input_to_shortpath"
39658
39659  input_path="$input_to_shortpath"
39660  # Check if we need to convert this using DOS-style short mode. If the path
39661  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39662  # take no chances and rewrite it.
39663  # Note: m4 eats our [], so we need to use [ and ] instead.
39664  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39665  if test "x$has_forbidden_chars" != x; then
39666    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39667    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39668    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39669    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39670      # Going to short mode and back again did indeed matter. Since short mode is
39671      # case insensitive, let's make it lowercase to improve readability.
39672      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39673      # Now convert it back to Unix-style (cygpath)
39674      input_path=`$CYGPATH -u "$shortmode_path"`
39675      new_path="$input_path"
39676    fi
39677  fi
39678
39679  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39680  if test "x$test_cygdrive_prefix" = x; then
39681    # As a simple fix, exclude /usr/bin since it's not a real path.
39682    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39683      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39684      # a path prefixed by /cygdrive for fixpath to work.
39685      new_path="$CYGWIN_ROOT_PATH$input_path"
39686    fi
39687  fi
39688
39689  # remove trailing .exe if any
39690  new_path="${new_path/%.exe/}"
39691
39692    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39693
39694  # First separate the path from the arguments. This will split at the first
39695  # space.
39696  complete="$BUILD_CXX"
39697  path="${complete%% *}"
39698  tmp="$complete EOL"
39699  arguments="${tmp#* }"
39700
39701  # Input might be given as Windows format, start by converting to
39702  # unix format.
39703  new_path="$path"
39704
39705  windows_path="$new_path"
39706  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39707    unix_path=`$CYGPATH -u "$windows_path"`
39708    new_path="$unix_path"
39709  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39710    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39711    new_path="$unix_path"
39712  fi
39713
39714
39715  # Now try to locate executable using which
39716  new_path=`$WHICH "$new_path" 2> /dev/null`
39717
39718  if test "x$new_path" = x; then
39719    # Oops. Which didn't find the executable.
39720    # The splitting of arguments from the executable at a space might have been incorrect,
39721    # since paths with space are more likely in Windows. Give it another try with the whole
39722    # argument.
39723    path="$complete"
39724    arguments="EOL"
39725    new_path="$path"
39726
39727  windows_path="$new_path"
39728  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39729    unix_path=`$CYGPATH -u "$windows_path"`
39730    new_path="$unix_path"
39731  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39732    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39733    new_path="$unix_path"
39734  fi
39735
39736
39737    new_path=`$WHICH "$new_path" 2> /dev/null`
39738    # bat and cmd files are not always considered executable in MSYS causing which
39739    # to not find them
39740    if test "x$new_path" = x \
39741        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39742        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39743      new_path="$path"
39744
39745  windows_path="$new_path"
39746  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39747    unix_path=`$CYGPATH -u "$windows_path"`
39748    new_path="$unix_path"
39749  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39750    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39751    new_path="$unix_path"
39752  fi
39753
39754    fi
39755
39756    if test "x$new_path" = x; then
39757      # It's still not found. Now this is an unrecoverable error.
39758      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39759$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39760      has_space=`$ECHO "$complete" | $GREP " "`
39761      if test "x$has_space" != x; then
39762        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39763$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39764      fi
39765      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39766    fi
39767  fi
39768
39769  # Now new_path has a complete unix path to the binary
39770  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39771    # Keep paths in /bin as-is, but remove trailing .exe if any
39772    new_path="${new_path/%.exe/}"
39773    # Do not save /bin paths to all_fixpath_prefixes!
39774  else
39775    # Not in mixed or Windows style, start by that.
39776    new_path=`cmd //c echo $new_path`
39777
39778  input_path="$new_path"
39779  # Check if we need to convert this using DOS-style short mode. If the path
39780  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39781  # take no chances and rewrite it.
39782  # Note: m4 eats our [], so we need to use [ and ] instead.
39783  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39784  if test "x$has_forbidden_chars" != x; then
39785    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39786    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39787  fi
39788
39789    # Output is in $new_path
39790
39791  windows_path="$new_path"
39792  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39793    unix_path=`$CYGPATH -u "$windows_path"`
39794    new_path="$unix_path"
39795  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39796    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39797    new_path="$unix_path"
39798  fi
39799
39800    # remove trailing .exe if any
39801    new_path="${new_path/%.exe/}"
39802
39803    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39804    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39805  fi
39806
39807    else
39808      # We're on a unix platform. Hooray! :)
39809      # First separate the path from the arguments. This will split at the first
39810      # space.
39811      complete="$BUILD_CXX"
39812      path="${complete%% *}"
39813      tmp="$complete EOL"
39814      arguments="${tmp#* }"
39815
39816      # Cannot rely on the command "which" here since it doesn't always work.
39817      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39818      if test -z "$is_absolute_path"; then
39819        # Path to executable is not absolute. Find it.
39820        IFS_save="$IFS"
39821        IFS=:
39822        for p in $PATH; do
39823          if test -f "$p/$path" && test -x "$p/$path"; then
39824            new_path="$p/$path"
39825            break
39826          fi
39827        done
39828        IFS="$IFS_save"
39829      else
39830        # This is an absolute path, we can use it without further modifications.
39831        new_path="$path"
39832      fi
39833
39834      if test "x$new_path" = x; then
39835        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39836$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39837        has_space=`$ECHO "$complete" | $GREP " "`
39838        if test "x$has_space" != x; then
39839          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39840$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39841        fi
39842        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39843      fi
39844    fi
39845
39846    # Now join together the path and the arguments once again
39847    if test "x$arguments" != xEOL; then
39848      new_complete="$new_path ${arguments% *}"
39849    else
39850      new_complete="$new_path"
39851    fi
39852
39853    if test "x$complete" != "x$new_complete"; then
39854      BUILD_CXX="$new_complete"
39855      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
39856$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
39857    fi
39858  fi
39859
39860
39861
39862  # Publish this variable in the help.
39863
39864
39865  if test "x$BUILD_LD" = x; then
39866    # The variable is not set by user, try to locate tool using the code snippet
39867    for ac_prog in ld
39868do
39869  # Extract the first word of "$ac_prog", so it can be a program name with args.
39870set dummy $ac_prog; ac_word=$2
39871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39872$as_echo_n "checking for $ac_word... " >&6; }
39873if ${ac_cv_path_BUILD_LD+:} false; then :
39874  $as_echo_n "(cached) " >&6
39875else
39876  case $BUILD_LD in
39877  [\\/]* | ?:[\\/]*)
39878  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
39879  ;;
39880  *)
39881  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39882for as_dir in $PATH
39883do
39884  IFS=$as_save_IFS
39885  test -z "$as_dir" && as_dir=.
39886    for ac_exec_ext in '' $ac_executable_extensions; do
39887  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39888    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
39889    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39890    break 2
39891  fi
39892done
39893  done
39894IFS=$as_save_IFS
39895
39896  ;;
39897esac
39898fi
39899BUILD_LD=$ac_cv_path_BUILD_LD
39900if test -n "$BUILD_LD"; then
39901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
39902$as_echo "$BUILD_LD" >&6; }
39903else
39904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39905$as_echo "no" >&6; }
39906fi
39907
39908
39909  test -n "$BUILD_LD" && break
39910done
39911
39912  else
39913    # The variable is set, but is it from the command line or the environment?
39914
39915    # Try to remove the string !BUILD_LD! from our list.
39916    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_LD!/}
39917    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39918      # If it failed, the variable was not from the command line. Ignore it,
39919      # but warn the user (except for BASH, which is always set by the calling BASH).
39920      if test "xBUILD_LD" != xBASH; then
39921        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&5
39922$as_echo "$as_me: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&2;}
39923      fi
39924      # Try to locate tool using the code snippet
39925      for ac_prog in ld
39926do
39927  # Extract the first word of "$ac_prog", so it can be a program name with args.
39928set dummy $ac_prog; ac_word=$2
39929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39930$as_echo_n "checking for $ac_word... " >&6; }
39931if ${ac_cv_path_BUILD_LD+:} false; then :
39932  $as_echo_n "(cached) " >&6
39933else
39934  case $BUILD_LD in
39935  [\\/]* | ?:[\\/]*)
39936  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
39937  ;;
39938  *)
39939  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39940for as_dir in $PATH
39941do
39942  IFS=$as_save_IFS
39943  test -z "$as_dir" && as_dir=.
39944    for ac_exec_ext in '' $ac_executable_extensions; do
39945  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39946    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
39947    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39948    break 2
39949  fi
39950done
39951  done
39952IFS=$as_save_IFS
39953
39954  ;;
39955esac
39956fi
39957BUILD_LD=$ac_cv_path_BUILD_LD
39958if test -n "$BUILD_LD"; then
39959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
39960$as_echo "$BUILD_LD" >&6; }
39961else
39962  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39963$as_echo "no" >&6; }
39964fi
39965
39966
39967  test -n "$BUILD_LD" && break
39968done
39969
39970    else
39971      # If it succeeded, then it was overridden by the user. We will use it
39972      # for the tool.
39973
39974      # First remove it from the list of overridden variables, so we can test
39975      # for unknown variables in the end.
39976      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39977
39978      # Check if the provided tool contains a complete path.
39979      tool_specified="$BUILD_LD"
39980      tool_basename="${tool_specified##*/}"
39981      if test "x$tool_basename" = "x$tool_specified"; then
39982        # A command without a complete path is provided, search $PATH.
39983        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_LD=$tool_basename" >&5
39984$as_echo "$as_me: Will search for user supplied tool BUILD_LD=$tool_basename" >&6;}
39985        # Extract the first word of "$tool_basename", so it can be a program name with args.
39986set dummy $tool_basename; ac_word=$2
39987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39988$as_echo_n "checking for $ac_word... " >&6; }
39989if ${ac_cv_path_BUILD_LD+:} false; then :
39990  $as_echo_n "(cached) " >&6
39991else
39992  case $BUILD_LD in
39993  [\\/]* | ?:[\\/]*)
39994  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
39995  ;;
39996  *)
39997  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39998for as_dir in $PATH
39999do
40000  IFS=$as_save_IFS
40001  test -z "$as_dir" && as_dir=.
40002    for ac_exec_ext in '' $ac_executable_extensions; do
40003  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40004    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40005    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40006    break 2
40007  fi
40008done
40009  done
40010IFS=$as_save_IFS
40011
40012  ;;
40013esac
40014fi
40015BUILD_LD=$ac_cv_path_BUILD_LD
40016if test -n "$BUILD_LD"; then
40017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40018$as_echo "$BUILD_LD" >&6; }
40019else
40020  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40021$as_echo "no" >&6; }
40022fi
40023
40024
40025        if test "x$BUILD_LD" = x; then
40026          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40027        fi
40028      else
40029        # Otherwise we believe it is a complete path. Use it as it is.
40030        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_LD=$tool_specified" >&5
40031$as_echo "$as_me: Will use user supplied tool BUILD_LD=$tool_specified" >&6;}
40032        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_LD" >&5
40033$as_echo_n "checking for BUILD_LD... " >&6; }
40034        if test ! -x "$tool_specified"; then
40035          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40036$as_echo "not found" >&6; }
40037          as_fn_error $? "User supplied tool BUILD_LD=$tool_specified does not exist or is not executable" "$LINENO" 5
40038        fi
40039        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40040$as_echo "$tool_specified" >&6; }
40041      fi
40042    fi
40043  fi
40044
40045
40046
40047  # Only process if variable expands to non-empty
40048
40049  if test "x$BUILD_LD" != x; then
40050    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40051
40052  # First separate the path from the arguments. This will split at the first
40053  # space.
40054  complete="$BUILD_LD"
40055  path="${complete%% *}"
40056  tmp="$complete EOL"
40057  arguments="${tmp#* }"
40058
40059  # Input might be given as Windows format, start by converting to
40060  # unix format.
40061  new_path=`$CYGPATH -u "$path"`
40062
40063  # Now try to locate executable using which
40064  new_path=`$WHICH "$new_path" 2> /dev/null`
40065  # bat and cmd files are not always considered executable in cygwin causing which
40066  # to not find them
40067  if test "x$new_path" = x \
40068      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40069      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40070    new_path=`$CYGPATH -u "$path"`
40071  fi
40072  if test "x$new_path" = x; then
40073    # Oops. Which didn't find the executable.
40074    # The splitting of arguments from the executable at a space might have been incorrect,
40075    # since paths with space are more likely in Windows. Give it another try with the whole
40076    # argument.
40077    path="$complete"
40078    arguments="EOL"
40079    new_path=`$CYGPATH -u "$path"`
40080    new_path=`$WHICH "$new_path" 2> /dev/null`
40081    # bat and cmd files are not always considered executable in cygwin causing which
40082    # to not find them
40083    if test "x$new_path" = x \
40084        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40085        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40086      new_path=`$CYGPATH -u "$path"`
40087    fi
40088    if test "x$new_path" = x; then
40089      # It's still not found. Now this is an unrecoverable error.
40090      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40091$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40092      has_space=`$ECHO "$complete" | $GREP " "`
40093      if test "x$has_space" != x; then
40094        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40095$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40096      fi
40097      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40098    fi
40099  fi
40100
40101  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40102  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40103  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40104  # "foo.exe" is OK but "foo" is an error.
40105  #
40106  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40107  # It is also a way to make sure we got the proper file name for the real test later on.
40108  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40109  if test "x$test_shortpath" = x; then
40110    # Short path failed, file does not exist as specified.
40111    # Try adding .exe or .cmd
40112    if test -f "${new_path}.exe"; then
40113      input_to_shortpath="${new_path}.exe"
40114    elif test -f "${new_path}.cmd"; then
40115      input_to_shortpath="${new_path}.cmd"
40116    else
40117      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
40118$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
40119      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40120$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40121      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40122    fi
40123  else
40124    input_to_shortpath="$new_path"
40125  fi
40126
40127  # Call helper function which possibly converts this using DOS-style short mode.
40128  # If so, the updated path is stored in $new_path.
40129  new_path="$input_to_shortpath"
40130
40131  input_path="$input_to_shortpath"
40132  # Check if we need to convert this using DOS-style short mode. If the path
40133  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40134  # take no chances and rewrite it.
40135  # Note: m4 eats our [], so we need to use [ and ] instead.
40136  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40137  if test "x$has_forbidden_chars" != x; then
40138    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40139    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40140    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40141    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40142      # Going to short mode and back again did indeed matter. Since short mode is
40143      # case insensitive, let's make it lowercase to improve readability.
40144      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40145      # Now convert it back to Unix-style (cygpath)
40146      input_path=`$CYGPATH -u "$shortmode_path"`
40147      new_path="$input_path"
40148    fi
40149  fi
40150
40151  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40152  if test "x$test_cygdrive_prefix" = x; then
40153    # As a simple fix, exclude /usr/bin since it's not a real path.
40154    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40155      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40156      # a path prefixed by /cygdrive for fixpath to work.
40157      new_path="$CYGWIN_ROOT_PATH$input_path"
40158    fi
40159  fi
40160
40161  # remove trailing .exe if any
40162  new_path="${new_path/%.exe/}"
40163
40164    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40165
40166  # First separate the path from the arguments. This will split at the first
40167  # space.
40168  complete="$BUILD_LD"
40169  path="${complete%% *}"
40170  tmp="$complete EOL"
40171  arguments="${tmp#* }"
40172
40173  # Input might be given as Windows format, start by converting to
40174  # unix format.
40175  new_path="$path"
40176
40177  windows_path="$new_path"
40178  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40179    unix_path=`$CYGPATH -u "$windows_path"`
40180    new_path="$unix_path"
40181  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40182    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40183    new_path="$unix_path"
40184  fi
40185
40186
40187  # Now try to locate executable using which
40188  new_path=`$WHICH "$new_path" 2> /dev/null`
40189
40190  if test "x$new_path" = x; then
40191    # Oops. Which didn't find the executable.
40192    # The splitting of arguments from the executable at a space might have been incorrect,
40193    # since paths with space are more likely in Windows. Give it another try with the whole
40194    # argument.
40195    path="$complete"
40196    arguments="EOL"
40197    new_path="$path"
40198
40199  windows_path="$new_path"
40200  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40201    unix_path=`$CYGPATH -u "$windows_path"`
40202    new_path="$unix_path"
40203  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40204    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40205    new_path="$unix_path"
40206  fi
40207
40208
40209    new_path=`$WHICH "$new_path" 2> /dev/null`
40210    # bat and cmd files are not always considered executable in MSYS causing which
40211    # to not find them
40212    if test "x$new_path" = x \
40213        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40214        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40215      new_path="$path"
40216
40217  windows_path="$new_path"
40218  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40219    unix_path=`$CYGPATH -u "$windows_path"`
40220    new_path="$unix_path"
40221  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40222    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40223    new_path="$unix_path"
40224  fi
40225
40226    fi
40227
40228    if test "x$new_path" = x; then
40229      # It's still not found. Now this is an unrecoverable error.
40230      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40231$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40232      has_space=`$ECHO "$complete" | $GREP " "`
40233      if test "x$has_space" != x; then
40234        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40235$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40236      fi
40237      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40238    fi
40239  fi
40240
40241  # Now new_path has a complete unix path to the binary
40242  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40243    # Keep paths in /bin as-is, but remove trailing .exe if any
40244    new_path="${new_path/%.exe/}"
40245    # Do not save /bin paths to all_fixpath_prefixes!
40246  else
40247    # Not in mixed or Windows style, start by that.
40248    new_path=`cmd //c echo $new_path`
40249
40250  input_path="$new_path"
40251  # Check if we need to convert this using DOS-style short mode. If the path
40252  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40253  # take no chances and rewrite it.
40254  # Note: m4 eats our [], so we need to use [ and ] instead.
40255  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40256  if test "x$has_forbidden_chars" != x; then
40257    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40258    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40259  fi
40260
40261    # Output is in $new_path
40262
40263  windows_path="$new_path"
40264  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40265    unix_path=`$CYGPATH -u "$windows_path"`
40266    new_path="$unix_path"
40267  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40268    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40269    new_path="$unix_path"
40270  fi
40271
40272    # remove trailing .exe if any
40273    new_path="${new_path/%.exe/}"
40274
40275    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40276    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40277  fi
40278
40279    else
40280      # We're on a unix platform. Hooray! :)
40281      # First separate the path from the arguments. This will split at the first
40282      # space.
40283      complete="$BUILD_LD"
40284      path="${complete%% *}"
40285      tmp="$complete EOL"
40286      arguments="${tmp#* }"
40287
40288      # Cannot rely on the command "which" here since it doesn't always work.
40289      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40290      if test -z "$is_absolute_path"; then
40291        # Path to executable is not absolute. Find it.
40292        IFS_save="$IFS"
40293        IFS=:
40294        for p in $PATH; do
40295          if test -f "$p/$path" && test -x "$p/$path"; then
40296            new_path="$p/$path"
40297            break
40298          fi
40299        done
40300        IFS="$IFS_save"
40301      else
40302        # This is an absolute path, we can use it without further modifications.
40303        new_path="$path"
40304      fi
40305
40306      if test "x$new_path" = x; then
40307        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40308$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40309        has_space=`$ECHO "$complete" | $GREP " "`
40310        if test "x$has_space" != x; then
40311          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40312$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40313        fi
40314        as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40315      fi
40316    fi
40317
40318    # Now join together the path and the arguments once again
40319    if test "x$arguments" != xEOL; then
40320      new_complete="$new_path ${arguments% *}"
40321    else
40322      new_complete="$new_path"
40323    fi
40324
40325    if test "x$complete" != "x$new_complete"; then
40326      BUILD_LD="$new_complete"
40327      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
40328$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
40329    fi
40330  fi
40331
40332  else
40333    # If we are not cross compiling, use the normal target compilers for
40334    # building the build platform executables.
40335    BUILD_CC="$CC"
40336    BUILD_CXX="$CXX"
40337    BUILD_LD="$LD"
40338  fi
40339
40340
40341
40342
40343
40344
40345  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40346    # For hotspot, we need these in Windows mixed path,
40347    # so rewrite them all. Need added .exe suffix.
40348    HOTSPOT_CXX="$CXX.exe"
40349    HOTSPOT_LD="$LD.exe"
40350    HOTSPOT_MT="$MT.exe"
40351    HOTSPOT_RC="$RC.exe"
40352
40353  unix_path="$HOTSPOT_CXX"
40354  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40355    windows_path=`$CYGPATH -m "$unix_path"`
40356    HOTSPOT_CXX="$windows_path"
40357  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40358    windows_path=`cmd //c echo $unix_path`
40359    HOTSPOT_CXX="$windows_path"
40360  fi
40361
40362
40363  unix_path="$HOTSPOT_LD"
40364  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40365    windows_path=`$CYGPATH -m "$unix_path"`
40366    HOTSPOT_LD="$windows_path"
40367  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40368    windows_path=`cmd //c echo $unix_path`
40369    HOTSPOT_LD="$windows_path"
40370  fi
40371
40372
40373  unix_path="$HOTSPOT_MT"
40374  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40375    windows_path=`$CYGPATH -m "$unix_path"`
40376    HOTSPOT_MT="$windows_path"
40377  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40378    windows_path=`cmd //c echo $unix_path`
40379    HOTSPOT_MT="$windows_path"
40380  fi
40381
40382
40383  unix_path="$HOTSPOT_RC"
40384  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40385    windows_path=`$CYGPATH -m "$unix_path"`
40386    HOTSPOT_RC="$windows_path"
40387  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40388    windows_path=`cmd //c echo $unix_path`
40389    HOTSPOT_RC="$windows_path"
40390  fi
40391
40392
40393
40394  else
40395    HOTSPOT_CXX="$CXX"
40396    HOTSPOT_LD="$LD"
40397  fi
40398
40399
40400
40401  if test  "x$TOOLCHAIN_TYPE" = xclang; then
40402    USE_CLANG=true
40403  fi
40404
40405
40406
40407
40408
40409  # The package path is used only on macosx?
40410  # FIXME: clean this up, and/or move it elsewhere.
40411  PACKAGE_PATH=/opt/local
40412
40413
40414  # Check for extra potential brokenness.
40415  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40416    # On Windows, double-check that we got the right compiler.
40417    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
40418    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
40419    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
40420      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
40421        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\" or \"x86\"." "$LINENO" 5
40422      fi
40423    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
40424      if test "x$COMPILER_CPU_TEST" != "xx64"; then
40425        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
40426      fi
40427    fi
40428  fi
40429
40430  if test "x$TOOLCHAIN_TYPE" = xgcc; then
40431    # If this is a --hash-style=gnu system, use --hash-style=both, why?
40432    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
40433    # This is later checked when setting flags.
40434
40435    # "-Og" suppported for GCC 4.8 and later
40436    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
40437
40438  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
40439$as_echo_n "checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
40440  supports=yes
40441
40442  saved_cflags="$CFLAGS"
40443  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
40444  ac_ext=c
40445ac_cpp='$CPP $CPPFLAGS'
40446ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40447ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40448ac_compiler_gnu=$ac_cv_c_compiler_gnu
40449
40450  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40451/* end confdefs.h.  */
40452int i;
40453_ACEOF
40454if ac_fn_c_try_compile "$LINENO"; then :
40455
40456else
40457  supports=no
40458fi
40459rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40460  ac_ext=cpp
40461ac_cpp='$CXXCPP $CPPFLAGS'
40462ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40463ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40464ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40465
40466  CFLAGS="$saved_cflags"
40467
40468  saved_cxxflags="$CXXFLAGS"
40469  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
40470  ac_ext=cpp
40471ac_cpp='$CXXCPP $CPPFLAGS'
40472ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40473ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40474ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40475
40476  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40477/* end confdefs.h.  */
40478int i;
40479_ACEOF
40480if ac_fn_cxx_try_compile "$LINENO"; then :
40481
40482else
40483  supports=no
40484fi
40485rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40486  ac_ext=cpp
40487ac_cpp='$CXXCPP $CPPFLAGS'
40488ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40489ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40490ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40491
40492  CXXFLAGS="$saved_cxxflags"
40493
40494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40495$as_echo "$supports" >&6; }
40496  if test "x$supports" = "xyes" ; then
40497    HAS_CFLAG_OPTIMIZE_DEBUG=true
40498  else
40499    HAS_CFLAG_OPTIMIZE_DEBUG=false
40500  fi
40501
40502
40503    # "-z relro" supported in GNU binutils 2.17 and later
40504    LINKER_RELRO_FLAG="-Xlinker -z -Xlinker relro"
40505
40506  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
40507$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
40508  supports=yes
40509
40510  saved_ldflags="$LDFLAGS"
40511  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
40512  ac_ext=c
40513ac_cpp='$CPP $CPPFLAGS'
40514ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40515ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40516ac_compiler_gnu=$ac_cv_c_compiler_gnu
40517
40518  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40519/* end confdefs.h.  */
40520
40521int
40522main ()
40523{
40524
40525  ;
40526  return 0;
40527}
40528_ACEOF
40529if ac_fn_c_try_link "$LINENO"; then :
40530
40531else
40532  supports=no
40533fi
40534rm -f core conftest.err conftest.$ac_objext \
40535    conftest$ac_exeext conftest.$ac_ext
40536  ac_ext=cpp
40537ac_cpp='$CXXCPP $CPPFLAGS'
40538ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40539ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40540ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40541
40542  LDFLAGS="$saved_ldflags"
40543
40544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40545$as_echo "$supports" >&6; }
40546  if test "x$supports" = "xyes" ; then
40547    HAS_LINKER_RELRO=true
40548  else
40549    HAS_LINKER_RELRO=false
40550  fi
40551
40552
40553    # "-z now" supported in GNU binutils 2.11 and later
40554    LINKER_NOW_FLAG="-Xlinker -z -Xlinker now"
40555
40556  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
40557$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
40558  supports=yes
40559
40560  saved_ldflags="$LDFLAGS"
40561  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
40562  ac_ext=c
40563ac_cpp='$CPP $CPPFLAGS'
40564ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40565ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40566ac_compiler_gnu=$ac_cv_c_compiler_gnu
40567
40568  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40569/* end confdefs.h.  */
40570
40571int
40572main ()
40573{
40574
40575  ;
40576  return 0;
40577}
40578_ACEOF
40579if ac_fn_c_try_link "$LINENO"; then :
40580
40581else
40582  supports=no
40583fi
40584rm -f core conftest.err conftest.$ac_objext \
40585    conftest$ac_exeext conftest.$ac_ext
40586  ac_ext=cpp
40587ac_cpp='$CXXCPP $CPPFLAGS'
40588ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40589ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40590ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40591
40592  LDFLAGS="$saved_ldflags"
40593
40594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40595$as_echo "$supports" >&6; }
40596  if test "x$supports" = "xyes" ; then
40597    HAS_LINKER_NOW=true
40598  else
40599    HAS_LINKER_NOW=false
40600  fi
40601
40602  fi
40603
40604  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
40605  # in executable.'
40606  USING_BROKEN_SUSE_LD=no
40607  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
40608    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
40609$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
40610    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
40611    $ECHO "int main() { }" > main.c
40612    if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
40613      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40614$as_echo "no" >&6; }
40615      USING_BROKEN_SUSE_LD=no
40616    else
40617      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40618$as_echo "yes" >&6; }
40619      USING_BROKEN_SUSE_LD=yes
40620    fi
40621    rm -rf version-script.map main.c a.out
40622  fi
40623
40624
40625
40626# Setup the JTReg Regression Test Harness.
40627
40628
40629# Check whether --with-jtreg was given.
40630if test "${with_jtreg+set}" = set; then :
40631  withval=$with_jtreg;
40632else
40633  with_jtreg=no
40634fi
40635
40636
40637  if test "x$with_jtreg" = xno; then
40638    # jtreg disabled
40639    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
40640$as_echo_n "checking for jtreg... " >&6; }
40641    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40642$as_echo "no" >&6; }
40643  else
40644    if test "x$with_jtreg" != xyes; then
40645      # with path specified.
40646      JT_HOME="$with_jtreg"
40647    fi
40648
40649    if test "x$JT_HOME" != x; then
40650      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
40651$as_echo_n "checking for jtreg... " >&6; }
40652
40653      # use JT_HOME enviroment var.
40654
40655  # Only process if variable expands to non-empty
40656
40657  if test "x$JT_HOME" != x; then
40658    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40659
40660  # Input might be given as Windows format, start by converting to
40661  # unix format.
40662  path="$JT_HOME"
40663  new_path=`$CYGPATH -u "$path"`
40664
40665  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40666  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40667  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40668  # "foo.exe" is OK but "foo" is an error.
40669  #
40670  # This test is therefore slightly more accurate than "test -f" to check for file precense.
40671  # It is also a way to make sure we got the proper file name for the real test later on.
40672  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40673  if test "x$test_shortpath" = x; then
40674    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
40675$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
40676    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
40677  fi
40678
40679  # Call helper function which possibly converts this using DOS-style short mode.
40680  # If so, the updated path is stored in $new_path.
40681
40682  input_path="$new_path"
40683  # Check if we need to convert this using DOS-style short mode. If the path
40684  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40685  # take no chances and rewrite it.
40686  # Note: m4 eats our [], so we need to use [ and ] instead.
40687  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40688  if test "x$has_forbidden_chars" != x; then
40689    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40690    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40691    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40692    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40693      # Going to short mode and back again did indeed matter. Since short mode is
40694      # case insensitive, let's make it lowercase to improve readability.
40695      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40696      # Now convert it back to Unix-style (cygpath)
40697      input_path=`$CYGPATH -u "$shortmode_path"`
40698      new_path="$input_path"
40699    fi
40700  fi
40701
40702  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40703  if test "x$test_cygdrive_prefix" = x; then
40704    # As a simple fix, exclude /usr/bin since it's not a real path.
40705    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
40706      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40707      # a path prefixed by /cygdrive for fixpath to work.
40708      new_path="$CYGWIN_ROOT_PATH$input_path"
40709    fi
40710  fi
40711
40712
40713  if test "x$path" != "x$new_path"; then
40714    JT_HOME="$new_path"
40715    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
40716$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
40717  fi
40718
40719    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40720
40721  path="$JT_HOME"
40722  has_colon=`$ECHO $path | $GREP ^.:`
40723  new_path="$path"
40724  if test "x$has_colon" = x; then
40725    # Not in mixed or Windows style, start by that.
40726    new_path=`cmd //c echo $path`
40727  fi
40728
40729
40730  input_path="$new_path"
40731  # Check if we need to convert this using DOS-style short mode. If the path
40732  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40733  # take no chances and rewrite it.
40734  # Note: m4 eats our [], so we need to use [ and ] instead.
40735  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40736  if test "x$has_forbidden_chars" != x; then
40737    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40738    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40739  fi
40740
40741
40742  windows_path="$new_path"
40743  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40744    unix_path=`$CYGPATH -u "$windows_path"`
40745    new_path="$unix_path"
40746  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40747    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40748    new_path="$unix_path"
40749  fi
40750
40751  if test "x$path" != "x$new_path"; then
40752    JT_HOME="$new_path"
40753    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
40754$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
40755  fi
40756
40757  # Save the first 10 bytes of this path to the storage, so fixpath can work.
40758  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40759
40760    else
40761      # We're on a unix platform. Hooray! :)
40762      path="$JT_HOME"
40763      has_space=`$ECHO "$path" | $GREP " "`
40764      if test "x$has_space" != x; then
40765        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
40766$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
40767        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
40768      fi
40769
40770      # Use eval to expand a potential ~
40771      eval path="$path"
40772      if test ! -f "$path" && test ! -d "$path"; then
40773        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
40774      fi
40775
40776      JT_HOME="`cd "$path"; $THEPWDCMD -L`"
40777    fi
40778  fi
40779
40780
40781      # jtreg win32 script works for everybody
40782      JTREGEXE="$JT_HOME/bin/jtreg"
40783
40784      if test ! -f "$JTREGEXE"; then
40785        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
40786      fi
40787
40788      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40789$as_echo "$JTREGEXE" >&6; }
40790    else
40791      # try to find jtreg on path
40792
40793
40794
40795  # Publish this variable in the help.
40796
40797
40798  if test "x$JTREGEXE" = x; then
40799    # The variable is not set by user, try to locate tool using the code snippet
40800    for ac_prog in jtreg
40801do
40802  # Extract the first word of "$ac_prog", so it can be a program name with args.
40803set dummy $ac_prog; ac_word=$2
40804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40805$as_echo_n "checking for $ac_word... " >&6; }
40806if ${ac_cv_path_JTREGEXE+:} false; then :
40807  $as_echo_n "(cached) " >&6
40808else
40809  case $JTREGEXE in
40810  [\\/]* | ?:[\\/]*)
40811  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
40812  ;;
40813  *)
40814  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40815for as_dir in $PATH
40816do
40817  IFS=$as_save_IFS
40818  test -z "$as_dir" && as_dir=.
40819    for ac_exec_ext in '' $ac_executable_extensions; do
40820  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40821    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
40822    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40823    break 2
40824  fi
40825done
40826  done
40827IFS=$as_save_IFS
40828
40829  ;;
40830esac
40831fi
40832JTREGEXE=$ac_cv_path_JTREGEXE
40833if test -n "$JTREGEXE"; then
40834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40835$as_echo "$JTREGEXE" >&6; }
40836else
40837  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40838$as_echo "no" >&6; }
40839fi
40840
40841
40842  test -n "$JTREGEXE" && break
40843done
40844
40845  else
40846    # The variable is set, but is it from the command line or the environment?
40847
40848    # Try to remove the string !JTREGEXE! from our list.
40849    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
40850    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40851      # If it failed, the variable was not from the command line. Ignore it,
40852      # but warn the user (except for BASH, which is always set by the calling BASH).
40853      if test "xJTREGEXE" != xBASH; then
40854        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
40855$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
40856      fi
40857      # Try to locate tool using the code snippet
40858      for ac_prog in jtreg
40859do
40860  # Extract the first word of "$ac_prog", so it can be a program name with args.
40861set dummy $ac_prog; ac_word=$2
40862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40863$as_echo_n "checking for $ac_word... " >&6; }
40864if ${ac_cv_path_JTREGEXE+:} false; then :
40865  $as_echo_n "(cached) " >&6
40866else
40867  case $JTREGEXE in
40868  [\\/]* | ?:[\\/]*)
40869  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
40870  ;;
40871  *)
40872  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40873for as_dir in $PATH
40874do
40875  IFS=$as_save_IFS
40876  test -z "$as_dir" && as_dir=.
40877    for ac_exec_ext in '' $ac_executable_extensions; do
40878  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40879    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
40880    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40881    break 2
40882  fi
40883done
40884  done
40885IFS=$as_save_IFS
40886
40887  ;;
40888esac
40889fi
40890JTREGEXE=$ac_cv_path_JTREGEXE
40891if test -n "$JTREGEXE"; then
40892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40893$as_echo "$JTREGEXE" >&6; }
40894else
40895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40896$as_echo "no" >&6; }
40897fi
40898
40899
40900  test -n "$JTREGEXE" && break
40901done
40902
40903    else
40904      # If it succeeded, then it was overridden by the user. We will use it
40905      # for the tool.
40906
40907      # First remove it from the list of overridden variables, so we can test
40908      # for unknown variables in the end.
40909      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40910
40911      # Check if the provided tool contains a complete path.
40912      tool_specified="$JTREGEXE"
40913      tool_basename="${tool_specified##*/}"
40914      if test "x$tool_basename" = "x$tool_specified"; then
40915        # A command without a complete path is provided, search $PATH.
40916        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
40917$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
40918        # Extract the first word of "$tool_basename", so it can be a program name with args.
40919set dummy $tool_basename; ac_word=$2
40920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40921$as_echo_n "checking for $ac_word... " >&6; }
40922if ${ac_cv_path_JTREGEXE+:} false; then :
40923  $as_echo_n "(cached) " >&6
40924else
40925  case $JTREGEXE in
40926  [\\/]* | ?:[\\/]*)
40927  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
40928  ;;
40929  *)
40930  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40931for as_dir in $PATH
40932do
40933  IFS=$as_save_IFS
40934  test -z "$as_dir" && as_dir=.
40935    for ac_exec_ext in '' $ac_executable_extensions; do
40936  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40937    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
40938    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40939    break 2
40940  fi
40941done
40942  done
40943IFS=$as_save_IFS
40944
40945  ;;
40946esac
40947fi
40948JTREGEXE=$ac_cv_path_JTREGEXE
40949if test -n "$JTREGEXE"; then
40950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40951$as_echo "$JTREGEXE" >&6; }
40952else
40953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40954$as_echo "no" >&6; }
40955fi
40956
40957
40958        if test "x$JTREGEXE" = x; then
40959          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40960        fi
40961      else
40962        # Otherwise we believe it is a complete path. Use it as it is.
40963        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
40964$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
40965        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
40966$as_echo_n "checking for JTREGEXE... " >&6; }
40967        if test ! -x "$tool_specified"; then
40968          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40969$as_echo "not found" >&6; }
40970          as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
40971        fi
40972        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40973$as_echo "$tool_specified" >&6; }
40974      fi
40975    fi
40976  fi
40977
40978
40979
40980  if test "x$JTREGEXE" = x; then
40981    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
40982  fi
40983
40984
40985      JT_HOME="`$DIRNAME $JTREGEXE`"
40986    fi
40987  fi
40988
40989
40990
40991
40992
40993
40994  # Option used to tell the compiler whether to create 32- or 64-bit executables
40995  if test "x$TOOLCHAIN_TYPE" = xxlc; then
40996    COMPILER_TARGET_BITS_FLAG="-q"
40997  else
40998    COMPILER_TARGET_BITS_FLAG="-m"
40999  fi
41000
41001
41002  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
41003  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41004    ARFLAGS="-r"
41005  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41006    ARFLAGS="-X64"
41007  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
41008    # lib.exe is used as AR to create static libraries.
41009    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
41010  else
41011    ARFLAGS=""
41012  fi
41013
41014
41015  ## Setup strip.
41016  # FIXME: should this really be per platform, or should it be per toolchain type?
41017  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
41018  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
41019  if test "x$OPENJDK_TARGET_OS" = xlinux; then
41020    STRIPFLAGS="-g"
41021  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
41022    STRIPFLAGS="-x"
41023  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41024    STRIPFLAGS="-S"
41025  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41026    STRIPFLAGS="-X32_64"
41027  fi
41028
41029  if test "x$OPENJDK_TARGET_OS" != xwindows; then
41030    POST_STRIP_CMD="$STRIP $STRIPFLAGS"
41031  fi
41032
41033
41034  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41035    CC_OUT_OPTION=-Fo
41036    EXE_OUT_OPTION=-out:
41037    LD_OUT_OPTION=-out:
41038    AR_OUT_OPTION=-out:
41039  else
41040    # The option used to specify the target .o,.a or .so file.
41041    # When compiling, how to specify the to be created object file.
41042    CC_OUT_OPTION='-o$(SPACE)'
41043    # When linking, how to specify the to be created executable.
41044    EXE_OUT_OPTION='-o$(SPACE)'
41045    # When linking, how to specify the to be created dynamically linkable library.
41046    LD_OUT_OPTION='-o$(SPACE)'
41047    # When archiving, how to specify the to be create static archive for object files.
41048    AR_OUT_OPTION='rcs$(SPACE)'
41049  fi
41050
41051
41052
41053
41054
41055  # On Windows, we need to set RC flags.
41056  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41057    RC_FLAGS="-nologo -l0x409"
41058    if test "x$VARIANT" = xOPT; then
41059      RC_FLAGS="$RC_FLAGS -DNDEBUG"
41060    fi
41061
41062    # The version variables used to create RC_FLAGS may be overridden
41063    # in a custom configure script, or possibly the command line.
41064    # Let those variables be expanded at make time in spec.gmk.
41065    # The \$ are escaped to the shell, and the $(...) variables
41066    # are evaluated by make.
41067    RC_FLAGS="$RC_FLAGS \
41068        -D\"JDK_BUILD_ID=\$(FULL_VERSION)\" \
41069        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
41070        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
41071        -D\"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
41072        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
41073        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
41074        -D\"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
41075  fi
41076
41077
41078  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41079    # silence copyright notice and other headers.
41080    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
41081  fi
41082
41083  if test "x$SYSROOT" != "x"; then
41084    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41085      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41086        # Solaris Studio does not have a concept of sysroot. Instead we must
41087        # make sure the default include and lib dirs are appended to each
41088        # compile and link command line.
41089        SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
41090        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
41091            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
41092            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
41093      fi
41094    elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41095      # Apple only wants -isysroot <path>, but we also need -iframework<path>/System/Library/Frameworks
41096      SYSROOT_CFLAGS="-isysroot \"$SYSROOT\" -iframework\"$SYSROOT/System/Library/Frameworks\""
41097      SYSROOT_LDFLAGS=$SYSROOT_CFLAGS
41098    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
41099      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
41100      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
41101    elif test "x$TOOLCHAIN_TYPE" = xclang; then
41102      SYSROOT_CFLAGS="-isysroot \"$SYSROOT\""
41103      SYSROOT_LDFLAGS="-isysroot \"$SYSROOT\""
41104    fi
41105    # Propagate the sysroot args to hotspot
41106    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
41107    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
41108    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
41109  fi
41110
41111  # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
41112  # set this here so it doesn't have to be peppered throughout the forest
41113  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41114    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
41115    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
41116  fi
41117
41118
41119
41120
41121
41122# FIXME: Currently we must test this after toolchain but before flags. Fix!
41123
41124# Now we can test some aspects on the target using configure macros.
41125
41126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
41127$as_echo_n "checking for ANSI C header files... " >&6; }
41128if ${ac_cv_header_stdc+:} false; then :
41129  $as_echo_n "(cached) " >&6
41130else
41131  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41132/* end confdefs.h.  */
41133#include <stdlib.h>
41134#include <stdarg.h>
41135#include <string.h>
41136#include <float.h>
41137
41138int
41139main ()
41140{
41141
41142  ;
41143  return 0;
41144}
41145_ACEOF
41146if ac_fn_cxx_try_compile "$LINENO"; then :
41147  ac_cv_header_stdc=yes
41148else
41149  ac_cv_header_stdc=no
41150fi
41151rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41152
41153if test $ac_cv_header_stdc = yes; then
41154  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
41155  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41156/* end confdefs.h.  */
41157#include <string.h>
41158
41159_ACEOF
41160if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41161  $EGREP "memchr" >/dev/null 2>&1; then :
41162
41163else
41164  ac_cv_header_stdc=no
41165fi
41166rm -f conftest*
41167
41168fi
41169
41170if test $ac_cv_header_stdc = yes; then
41171  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
41172  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41173/* end confdefs.h.  */
41174#include <stdlib.h>
41175
41176_ACEOF
41177if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41178  $EGREP "free" >/dev/null 2>&1; then :
41179
41180else
41181  ac_cv_header_stdc=no
41182fi
41183rm -f conftest*
41184
41185fi
41186
41187if test $ac_cv_header_stdc = yes; then
41188  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
41189  if test "$cross_compiling" = yes; then :
41190  :
41191else
41192  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41193/* end confdefs.h.  */
41194#include <ctype.h>
41195#include <stdlib.h>
41196#if ((' ' & 0x0FF) == 0x020)
41197# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
41198# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
41199#else
41200# define ISLOWER(c) \
41201		   (('a' <= (c) && (c) <= 'i') \
41202		     || ('j' <= (c) && (c) <= 'r') \
41203		     || ('s' <= (c) && (c) <= 'z'))
41204# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
41205#endif
41206
41207#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
41208int
41209main ()
41210{
41211  int i;
41212  for (i = 0; i < 256; i++)
41213    if (XOR (islower (i), ISLOWER (i))
41214	|| toupper (i) != TOUPPER (i))
41215      return 2;
41216  return 0;
41217}
41218_ACEOF
41219if ac_fn_cxx_try_run "$LINENO"; then :
41220
41221else
41222  ac_cv_header_stdc=no
41223fi
41224rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41225  conftest.$ac_objext conftest.beam conftest.$ac_ext
41226fi
41227
41228fi
41229fi
41230{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
41231$as_echo "$ac_cv_header_stdc" >&6; }
41232if test $ac_cv_header_stdc = yes; then
41233
41234$as_echo "#define STDC_HEADERS 1" >>confdefs.h
41235
41236fi
41237
41238# On IRIX 5.3, sys/types and inttypes.h are conflicting.
41239for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
41240		  inttypes.h stdint.h unistd.h
41241do :
41242  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
41243ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
41244"
41245if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
41246  cat >>confdefs.h <<_ACEOF
41247#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
41248_ACEOF
41249
41250fi
41251
41252done
41253
41254
41255
41256  ###############################################################################
41257  #
41258  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
41259  # (The JVM can use 32 or 64 bit Java pointers but that decision
41260  # is made at runtime.)
41261  #
41262
41263  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
41264    # Always specify -m flag on Solaris
41265    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
41266
41267  # When we add flags to the "official" CFLAGS etc, we need to
41268  # keep track of these additions in ADDED_CFLAGS etc. These
41269  # will later be checked to make sure only controlled additions
41270  # have been made to CFLAGS etc.
41271  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41272  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41273  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41274
41275  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41276  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41277  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41278
41279  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41280  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41281  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41282
41283  elif test "x$COMPILE_TYPE" = xreduced; then
41284    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
41285      # Specify -m if running reduced on unix platforms
41286
41287  # When we add flags to the "official" CFLAGS etc, we need to
41288  # keep track of these additions in ADDED_CFLAGS etc. These
41289  # will later be checked to make sure only controlled additions
41290  # have been made to CFLAGS etc.
41291  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41292  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41293  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41294
41295  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41296  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41297  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41298
41299  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41300  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41301  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41302
41303    fi
41304  fi
41305
41306  # Make compilation sanity check
41307  for ac_header in stdio.h
41308do :
41309  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
41310if test "x$ac_cv_header_stdio_h" = xyes; then :
41311  cat >>confdefs.h <<_ACEOF
41312#define HAVE_STDIO_H 1
41313_ACEOF
41314
41315else
41316
41317    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
41318$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
41319    if test "x$COMPILE_TYPE" = xreduced; then
41320      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
41321$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
41322    elif test "x$COMPILE_TYPE" = xcross; then
41323      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
41324$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
41325    fi
41326    as_fn_error $? "Cannot continue." "$LINENO" 5
41327
41328fi
41329
41330done
41331
41332
41333  # The cast to long int works around a bug in the HP C Compiler
41334# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41335# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41336# This bug is HP SR number 8606223364.
41337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41338$as_echo_n "checking size of int *... " >&6; }
41339if ${ac_cv_sizeof_int_p+:} false; then :
41340  $as_echo_n "(cached) " >&6
41341else
41342  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41343
41344else
41345  if test "$ac_cv_type_int_p" = yes; then
41346     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41347$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41348as_fn_error 77 "cannot compute sizeof (int *)
41349See \`config.log' for more details" "$LINENO" 5; }
41350   else
41351     ac_cv_sizeof_int_p=0
41352   fi
41353fi
41354
41355fi
41356{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41357$as_echo "$ac_cv_sizeof_int_p" >&6; }
41358
41359
41360
41361cat >>confdefs.h <<_ACEOF
41362#define SIZEOF_INT_P $ac_cv_sizeof_int_p
41363_ACEOF
41364
41365
41366
41367  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
41368  if test "x$ac_cv_sizeof_int_p" = x; then
41369    # The test failed, lets stick to the assumed value.
41370    { $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
41371$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
41372  else
41373    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41374
41375    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41376      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
41377      # Let's try to implicitely set the compilers target architecture and retry the test
41378      { $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
41379$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;}
41380      { $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
41381$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;}
41382
41383  # When we add flags to the "official" CFLAGS etc, we need to
41384  # keep track of these additions in ADDED_CFLAGS etc. These
41385  # will later be checked to make sure only controlled additions
41386  # have been made to CFLAGS etc.
41387  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41388  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41389  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41390
41391  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41392  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41393  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41394
41395  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41396  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41397  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41398
41399
41400      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
41401      unset ac_cv_sizeof_int_p
41402      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
41403      cat >>confdefs.h <<_ACEOF
41404#undef SIZEOF_INT_P
41405_ACEOF
41406
41407      # The cast to long int works around a bug in the HP C Compiler
41408# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41409# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41410# This bug is HP SR number 8606223364.
41411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41412$as_echo_n "checking size of int *... " >&6; }
41413if ${ac_cv_sizeof_int_p+:} false; then :
41414  $as_echo_n "(cached) " >&6
41415else
41416  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41417
41418else
41419  if test "$ac_cv_type_int_p" = yes; then
41420     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41421$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41422as_fn_error 77 "cannot compute sizeof (int *)
41423See \`config.log' for more details" "$LINENO" 5; }
41424   else
41425     ac_cv_sizeof_int_p=0
41426   fi
41427fi
41428
41429fi
41430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41431$as_echo "$ac_cv_sizeof_int_p" >&6; }
41432
41433
41434
41435cat >>confdefs.h <<_ACEOF
41436#define SIZEOF_INT_P $ac_cv_sizeof_int_p
41437_ACEOF
41438
41439
41440
41441      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41442
41443      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41444        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
41445      fi
41446    fi
41447  fi
41448
41449  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
41450$as_echo_n "checking for target address size... " >&6; }
41451  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
41452$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
41453
41454
41455  ###############################################################################
41456  #
41457  # Is the target little of big endian?
41458  #
41459   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
41460$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
41461if ${ac_cv_c_bigendian+:} false; then :
41462  $as_echo_n "(cached) " >&6
41463else
41464  ac_cv_c_bigendian=unknown
41465    # See if we're dealing with a universal compiler.
41466    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41467/* end confdefs.h.  */
41468#ifndef __APPLE_CC__
41469	       not a universal capable compiler
41470	     #endif
41471	     typedef int dummy;
41472
41473_ACEOF
41474if ac_fn_cxx_try_compile "$LINENO"; then :
41475
41476	# Check for potential -arch flags.  It is not universal unless
41477	# there are at least two -arch flags with different values.
41478	ac_arch=
41479	ac_prev=
41480	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
41481	 if test -n "$ac_prev"; then
41482	   case $ac_word in
41483	     i?86 | x86_64 | ppc | ppc64)
41484	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
41485		 ac_arch=$ac_word
41486	       else
41487		 ac_cv_c_bigendian=universal
41488		 break
41489	       fi
41490	       ;;
41491	   esac
41492	   ac_prev=
41493	 elif test "x$ac_word" = "x-arch"; then
41494	   ac_prev=arch
41495	 fi
41496       done
41497fi
41498rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41499    if test $ac_cv_c_bigendian = unknown; then
41500      # See if sys/param.h defines the BYTE_ORDER macro.
41501      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41502/* end confdefs.h.  */
41503#include <sys/types.h>
41504	     #include <sys/param.h>
41505
41506int
41507main ()
41508{
41509#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
41510		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
41511		     && LITTLE_ENDIAN)
41512	      bogus endian macros
41513	     #endif
41514
41515  ;
41516  return 0;
41517}
41518_ACEOF
41519if ac_fn_cxx_try_compile "$LINENO"; then :
41520  # It does; now see whether it defined to BIG_ENDIAN or not.
41521	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41522/* end confdefs.h.  */
41523#include <sys/types.h>
41524		#include <sys/param.h>
41525
41526int
41527main ()
41528{
41529#if BYTE_ORDER != BIG_ENDIAN
41530		 not big endian
41531		#endif
41532
41533  ;
41534  return 0;
41535}
41536_ACEOF
41537if ac_fn_cxx_try_compile "$LINENO"; then :
41538  ac_cv_c_bigendian=yes
41539else
41540  ac_cv_c_bigendian=no
41541fi
41542rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41543fi
41544rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41545    fi
41546    if test $ac_cv_c_bigendian = unknown; then
41547      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
41548      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41549/* end confdefs.h.  */
41550#include <limits.h>
41551
41552int
41553main ()
41554{
41555#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
41556	      bogus endian macros
41557	     #endif
41558
41559  ;
41560  return 0;
41561}
41562_ACEOF
41563if ac_fn_cxx_try_compile "$LINENO"; then :
41564  # It does; now see whether it defined to _BIG_ENDIAN or not.
41565	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41566/* end confdefs.h.  */
41567#include <limits.h>
41568
41569int
41570main ()
41571{
41572#ifndef _BIG_ENDIAN
41573		 not big endian
41574		#endif
41575
41576  ;
41577  return 0;
41578}
41579_ACEOF
41580if ac_fn_cxx_try_compile "$LINENO"; then :
41581  ac_cv_c_bigendian=yes
41582else
41583  ac_cv_c_bigendian=no
41584fi
41585rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41586fi
41587rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41588    fi
41589    if test $ac_cv_c_bigendian = unknown; then
41590      # Compile a test program.
41591      if test "$cross_compiling" = yes; then :
41592  # Try to guess by grepping values from an object file.
41593	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41594/* end confdefs.h.  */
41595short int ascii_mm[] =
41596		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
41597		short int ascii_ii[] =
41598		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
41599		int use_ascii (int i) {
41600		  return ascii_mm[i] + ascii_ii[i];
41601		}
41602		short int ebcdic_ii[] =
41603		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
41604		short int ebcdic_mm[] =
41605		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
41606		int use_ebcdic (int i) {
41607		  return ebcdic_mm[i] + ebcdic_ii[i];
41608		}
41609		extern int foo;
41610
41611int
41612main ()
41613{
41614return use_ascii (foo) == use_ebcdic (foo);
41615  ;
41616  return 0;
41617}
41618_ACEOF
41619if ac_fn_cxx_try_compile "$LINENO"; then :
41620  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
41621	      ac_cv_c_bigendian=yes
41622	    fi
41623	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
41624	      if test "$ac_cv_c_bigendian" = unknown; then
41625		ac_cv_c_bigendian=no
41626	      else
41627		# finding both strings is unlikely to happen, but who knows?
41628		ac_cv_c_bigendian=unknown
41629	      fi
41630	    fi
41631fi
41632rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41633else
41634  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41635/* end confdefs.h.  */
41636$ac_includes_default
41637int
41638main ()
41639{
41640
41641	     /* Are we little or big endian?  From Harbison&Steele.  */
41642	     union
41643	     {
41644	       long int l;
41645	       char c[sizeof (long int)];
41646	     } u;
41647	     u.l = 1;
41648	     return u.c[sizeof (long int) - 1] == 1;
41649
41650  ;
41651  return 0;
41652}
41653_ACEOF
41654if ac_fn_cxx_try_run "$LINENO"; then :
41655  ac_cv_c_bigendian=no
41656else
41657  ac_cv_c_bigendian=yes
41658fi
41659rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41660  conftest.$ac_objext conftest.beam conftest.$ac_ext
41661fi
41662
41663    fi
41664fi
41665{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
41666$as_echo "$ac_cv_c_bigendian" >&6; }
41667 case $ac_cv_c_bigendian in #(
41668   yes)
41669     ENDIAN="big";; #(
41670   no)
41671     ENDIAN="little" ;; #(
41672   universal)
41673     ENDIAN="universal_endianness"
41674     ;; #(
41675   *)
41676     ENDIAN="unknown" ;;
41677 esac
41678
41679
41680  if test "x$ENDIAN" = xuniversal_endianness; then
41681    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
41682  fi
41683  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
41684    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
41685  fi
41686
41687
41688# Configure flags for the tools
41689
41690  ###############################################################################
41691  #
41692  # How to compile shared libraries.
41693  #
41694
41695  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41696    PICFLAG="-fPIC"
41697    C_FLAG_REORDER=''
41698    CXX_FLAG_REORDER=''
41699
41700    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41701      # Linking is different on MacOSX
41702      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
41703      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
41704      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
41705      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
41706      SET_SHARED_LIBRARY_MAPFILE=''
41707    else
41708      # Default works for linux, might work on other platforms as well.
41709      SHARED_LIBRARY_FLAGS='-shared'
41710      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
41711      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
41712      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
41713      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
41714    fi
41715  elif test "x$TOOLCHAIN_TYPE" = xclang; then
41716    PICFLAG=''
41717    C_FLAG_REORDER=''
41718    CXX_FLAG_REORDER=''
41719
41720    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41721      # Linking is different on MacOSX
41722      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
41723      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
41724      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
41725      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
41726      SET_SHARED_LIBRARY_MAPFILE=''
41727    else
41728      # Default works for linux, might work on other platforms as well.
41729      SHARED_LIBRARY_FLAGS='-shared'
41730      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
41731      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
41732      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
41733      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
41734    fi
41735  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41736    PICFLAG="-KPIC"
41737    C_FLAG_REORDER='-xF'
41738    CXX_FLAG_REORDER='-xF'
41739    SHARED_LIBRARY_FLAGS="-G"
41740    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
41741    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
41742    SET_SHARED_LIBRARY_NAME=''
41743    SET_SHARED_LIBRARY_MAPFILE='-M$1'
41744  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41745    PICFLAG="-qpic=large"
41746    C_FLAG_REORDER=''
41747    CXX_FLAG_REORDER=''
41748    SHARED_LIBRARY_FLAGS="-qmkshrobj"
41749    SET_EXECUTABLE_ORIGIN=""
41750    SET_SHARED_LIBRARY_ORIGIN=''
41751    SET_SHARED_LIBRARY_NAME=''
41752    SET_SHARED_LIBRARY_MAPFILE=''
41753  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41754    PICFLAG=""
41755    C_FLAG_REORDER=''
41756    CXX_FLAG_REORDER=''
41757    SHARED_LIBRARY_FLAGS="-LD"
41758    SET_EXECUTABLE_ORIGIN=''
41759    SET_SHARED_LIBRARY_ORIGIN=''
41760    SET_SHARED_LIBRARY_NAME=''
41761    SET_SHARED_LIBRARY_MAPFILE=''
41762  fi
41763
41764
41765
41766
41767
41768
41769
41770
41771  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41772    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
41773    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
41774    CFLAGS_JDKLIB_EXTRA='-xstrconst'
41775  fi
41776  # The (cross) compiler is now configured, we can now test capabilities
41777  # of the target platform.
41778
41779
41780
41781  ###############################################################################
41782  #
41783  # Setup the opt flags for different compilers
41784  # and different operating systems.
41785  #
41786
41787  # FIXME: this was indirectly the old default, but just inherited.
41788  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41789  #   C_FLAG_DEPS="-MMD -MF"
41790  # fi
41791
41792  # Generate make dependency files
41793  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41794    C_FLAG_DEPS="-MMD -MF"
41795  elif test "x$TOOLCHAIN_TYPE" = xclang; then
41796    C_FLAG_DEPS="-MMD -MF"
41797  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41798    C_FLAG_DEPS="-xMMD -xMF"
41799  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41800    C_FLAG_DEPS="-qmakedep=gcc -MF"
41801  fi
41802  CXX_FLAG_DEPS="$C_FLAG_DEPS"
41803
41804
41805
41806  # Debug symbols
41807  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41808    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
41809      # reduce from default "-g2" option to save space
41810      CFLAGS_DEBUG_SYMBOLS="-g1"
41811      CXXFLAGS_DEBUG_SYMBOLS="-g1"
41812    else
41813      CFLAGS_DEBUG_SYMBOLS="-g"
41814      CXXFLAGS_DEBUG_SYMBOLS="-g"
41815    fi
41816  elif test "x$TOOLCHAIN_TYPE" = xclang; then
41817    CFLAGS_DEBUG_SYMBOLS="-g"
41818    CXXFLAGS_DEBUG_SYMBOLS="-g"
41819  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41820    CFLAGS_DEBUG_SYMBOLS="-g -xs"
41821    # FIXME: likely a bug, this disables debug symbols rather than enables them
41822    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
41823  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41824    CFLAGS_DEBUG_SYMBOLS="-g"
41825    CXXFLAGS_DEBUG_SYMBOLS="-g"
41826  fi
41827
41828
41829
41830  # bounds, memory and behavior checking options
41831  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41832    case $DEBUG_LEVEL in
41833    release )
41834      # no adjustment
41835      ;;
41836    fastdebug )
41837      # no adjustment
41838      ;;
41839    slowdebug )
41840      # Add runtime stack smashing and undefined behavior checks
41841      CFLAGS_DEBUG_OPTIONS="-fstack-protector-all --param ssp-buffer-size=1"
41842      CXXFLAGS_DEBUG_OPTIONS="-fstack-protector-all --param ssp-buffer-size=1"
41843      ;;
41844    esac
41845  fi
41846
41847
41848
41849  # Optimization levels
41850  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41851    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
41852
41853    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
41854      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
41855      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
41856      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
41857      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
41858      C_O_FLAG_DEBUG="-xregs=no%frameptr"
41859      C_O_FLAG_NONE="-xregs=no%frameptr"
41860      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
41861      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
41862      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
41863      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
41864      CXX_O_FLAG_NONE="-xregs=no%frameptr"
41865      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
41866        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
41867        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
41868      fi
41869    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
41870      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
41871      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
41872      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
41873      C_O_FLAG_DEBUG=""
41874      C_O_FLAG_NONE=""
41875      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
41876      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
41877      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
41878      C_O_FLAG_DEBUG=""
41879      CXX_O_FLAG_NONE=""
41880    fi
41881  else
41882    # The remaining toolchains share opt flags between CC and CXX;
41883    # setup for C and duplicate afterwards.
41884    if test "x$TOOLCHAIN_TYPE" = xgcc; then
41885      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41886        # On MacOSX we optimize for size, something
41887        # we should do for all platforms?
41888        C_O_FLAG_HIGHEST="-Os"
41889        C_O_FLAG_HI="-Os"
41890        C_O_FLAG_NORM="-Os"
41891      else
41892        C_O_FLAG_HIGHEST="-O3"
41893        C_O_FLAG_HI="-O3"
41894        C_O_FLAG_NORM="-O2"
41895      fi
41896      C_O_FLAG_DEBUG="-O0"
41897      C_O_FLAG_NONE="-O0"
41898    elif test "x$TOOLCHAIN_TYPE" = xclang; then
41899      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41900        # On MacOSX we optimize for size, something
41901        # we should do for all platforms?
41902        C_O_FLAG_HIGHEST="-Os"
41903        C_O_FLAG_HI="-Os"
41904        C_O_FLAG_NORM="-Os"
41905      else
41906        C_O_FLAG_HIGHEST="-O3"
41907        C_O_FLAG_HI="-O3"
41908        C_O_FLAG_NORM="-O2"
41909      fi
41910      C_O_FLAG_DEBUG="-O0"
41911      C_O_FLAG_NONE="-O0"
41912    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41913      C_O_FLAG_HIGHEST="-O3"
41914      C_O_FLAG_HI="-O3 -qstrict"
41915      C_O_FLAG_NORM="-O2"
41916      C_O_FLAG_DEBUG="-qnoopt"
41917      C_O_FLAG_NONE="-qnoop"
41918    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41919      C_O_FLAG_HIGHEST="-O2"
41920      C_O_FLAG_HI="-O1"
41921      C_O_FLAG_NORM="-O1"
41922      C_O_FLAG_DEBUG="-Od"
41923      C_O_FLAG_NONE="-Od"
41924    fi
41925    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
41926    CXX_O_FLAG_HI="$C_O_FLAG_HI"
41927    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
41928    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
41929    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
41930  fi
41931
41932  # Adjust optimization flags according to debug level.
41933  case $DEBUG_LEVEL in
41934    release )
41935      # no adjustment
41936      ;;
41937    fastdebug )
41938      # Not quite so much optimization
41939      C_O_FLAG_HI="$C_O_FLAG_NORM"
41940      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
41941      ;;
41942    slowdebug )
41943      # Disable optimization
41944      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
41945      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
41946      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
41947      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
41948      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
41949      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
41950      ;;
41951  esac
41952
41953
41954
41955
41956
41957
41958
41959
41960
41961
41962
41963
41964
41965  # Special extras...
41966  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41967    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
41968      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
41969      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
41970    fi
41971    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
41972    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
41973  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41974    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
41975    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
41976  fi
41977
41978  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
41979    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
41980$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
41981  fi
41982
41983  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
41984    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
41985$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
41986  fi
41987
41988  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
41989    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
41990$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
41991  fi
41992
41993
41994# Check whether --with-extra-cflags was given.
41995if test "${with_extra_cflags+set}" = set; then :
41996  withval=$with_extra_cflags;
41997fi
41998
41999
42000
42001# Check whether --with-extra-cxxflags was given.
42002if test "${with_extra_cxxflags+set}" = set; then :
42003  withval=$with_extra_cxxflags;
42004fi
42005
42006
42007
42008# Check whether --with-extra-ldflags was given.
42009if test "${with_extra_ldflags+set}" = set; then :
42010  withval=$with_extra_ldflags;
42011fi
42012
42013
42014  CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
42015  CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
42016  LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
42017
42018  # Hotspot needs these set in their legacy form
42019  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $with_extra_cflags"
42020  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $with_extra_cxxflags"
42021  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $with_extra_ldflags"
42022
42023
42024
42025
42026
42027  ###############################################################################
42028  #
42029  # Now setup the CFLAGS and LDFLAGS for the JDK build.
42030  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
42031  #
42032
42033  # Setup compiler/platform specific flags into
42034  #    CFLAGS_JDK    - C Compiler flags
42035  #    CXXFLAGS_JDK  - C++ Compiler flags
42036  #    COMMON_CCXXFLAGS_JDK - common to C and C++
42037  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42038    if test "x$OPENJDK_TARGET_CPU" = xx86; then
42039      # Force compatibility with i586 on 32 bit intel platforms.
42040      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
42041    fi
42042    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
42043        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
42044    case $OPENJDK_TARGET_CPU_ARCH in
42045      arm )
42046        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42047        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42048        ;;
42049      ppc )
42050        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42051        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42052        ;;
42053      * )
42054        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
42055        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42056        ;;
42057    esac
42058  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42059    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
42060    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
42061      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
42062    fi
42063
42064    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
42065    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
42066  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42067    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42068    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42069  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42070    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
42071        -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
42072        -DWIN32_LEAN_AND_MEAN \
42073        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
42074        -DWIN32 -DIAL"
42075    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
42076      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
42077    else
42078      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
42079    fi
42080    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
42081    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
42082    # studio.
42083    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
42084      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
42085          -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
42086    fi
42087  fi
42088
42089  ###############################################################################
42090
42091  # Adjust flags according to debug level.
42092  case $DEBUG_LEVEL in
42093    fastdebug | slowdebug )
42094      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
42095      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
42096      JAVAC_FLAGS="$JAVAC_FLAGS -g"
42097      ;;
42098    release )
42099      ;;
42100    * )
42101      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42102      ;;
42103  esac
42104
42105  # Setup LP64
42106  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $ADD_LP64"
42107
42108  # Set some common defines. These works for all compilers, but assume
42109  # -D is universally accepted.
42110
42111  # Setup endianness
42112  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
42113    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
42114    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
42115    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
42116    #   Note: -Dmacro         is the same as    #define macro 1
42117    #         -Dmacro=        is the same as    #define macro
42118    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42119      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
42120    else
42121      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
42122    fi
42123  else
42124    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
42125    # are defined in the system?
42126    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42127      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
42128    else
42129      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
42130    fi
42131  fi
42132
42133  # Setup target OS define. Use OS target name but in upper case.
42134  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
42135  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
42136
42137  # Setup target CPU
42138  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
42139
42140  # Setup debug/release defines
42141  if test "x$DEBUG_LEVEL" = xrelease; then
42142    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
42143    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42144      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
42145    fi
42146  else
42147    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
42148  fi
42149
42150  # Setup release name
42151  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
42152
42153
42154  # Set some additional per-OS defines.
42155  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42156    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
42157  elif test "x$OPENJDK_TARGET_OS" = xaix; then
42158    # FIXME: PPC64 should not be here.
42159    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DPPC64"
42160  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
42161    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
42162  fi
42163
42164  # Additional macosx handling
42165  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42166    # Setting these parameters makes it an error to link to macosx APIs that are
42167    # newer than the given OS version and makes the linked binaries compatible
42168    # even if built on a newer version of the OS.
42169    # The expected format is X.Y.Z
42170    MACOSX_VERSION_MIN=10.7.0
42171
42172
42173    # The macro takes the version with no dots, ex: 1070
42174    # Let the flags variables get resolved in make for easier override on make
42175    # command line.
42176    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42177    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42178  fi
42179
42180  # Setup some hard coded includes
42181  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
42182      -I${JDK_TOPDIR}/src/java.base/share/native/include \
42183      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
42184      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include"
42185
42186  # The shared libraries are compiled using the picflag.
42187  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
42188  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
42189
42190  # Executable flags
42191  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
42192  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
42193
42194
42195
42196
42197
42198
42199  # Flags for compiling test libraries
42200  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
42201  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
42202
42203  # Flags for compiling test executables
42204  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
42205  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
42206
42207
42208
42209
42210
42211
42212  # Setup LDFLAGS et al.
42213  #
42214
42215  # Now this is odd. The JDK native libraries have to link against libjvm.so
42216  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
42217  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
42218  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
42219  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
42220  # libraries will link to whatever is in memory. Yuck.
42221  #
42222  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
42223  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42224    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
42225    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
42226      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
42227    fi
42228    # TODO: make -debug optional "--disable-full-debug-symbols"
42229    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
42230  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
42231    # If this is a --hash-style=gnu system, use --hash-style=both, why?
42232    # We have previously set HAS_GNU_HASH if this is the case
42233    if test -n "$HAS_GNU_HASH"; then
42234      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both"
42235    fi
42236    if test "x$OPENJDK_TARGET_OS" = xlinux; then
42237      # And since we now know that the linker is gnu, then add -z defs, to forbid
42238      # undefined symbols in object files.
42239      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
42240      case $DEBUG_LEVEL in
42241        release )
42242          # tell linker to optimize libraries.
42243          # Should this be supplied to the OSS linker as well?
42244          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
42245          ;;
42246        slowdebug )
42247          if test "x$HAS_LINKER_NOW" = "xtrue"; then
42248            # do relocations at load
42249            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
42250            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
42251          fi
42252          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42253            # mark relocations read only
42254            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42255            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42256          fi
42257          ;;
42258        fastdebug )
42259          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42260            # mark relocations read only
42261            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42262            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42263          fi
42264          ;;
42265        * )
42266          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42267          ;;
42268        esac
42269    fi
42270  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42271    LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
42272    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
42273  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42274    LDFLAGS_JDK="${LDFLAGS_JDK} -brtl -bnolibpath -liconv -bexpall -bernotok"
42275  fi
42276
42277  # Customize LDFLAGS for executables
42278
42279  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
42280
42281  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42282    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
42283      LDFLAGS_STACK_SIZE=1048576
42284    else
42285      LDFLAGS_STACK_SIZE=327680
42286    fi
42287    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
42288  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
42289    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
42290  fi
42291
42292  # Customize LDFLAGS for libs
42293  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
42294
42295  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42296    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -dll -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
42297    LDFLAGS_JDKLIB_SUFFIX=""
42298  else
42299    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB}  ${SHARED_LIBRARY_FLAGS} \
42300        -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}"
42301
42302    # On some platforms (mac) the linker warns about non existing -L dirs.
42303    # Add server first if available. Linking aginst client does not always produce the same results.
42304    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
42305    # Default to server for other variants.
42306    if test "x$JVM_VARIANT_SERVER" = xtrue; then
42307      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
42308    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
42309      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/client"
42310    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
42311      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
42312    else
42313      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
42314    fi
42315
42316    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
42317    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42318      LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
42319    fi
42320  fi
42321
42322
42323
42324
42325
42326
42327
42328  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
42329  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE"
42330  LDFLAGS_TESTLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX"
42331  LDFLAGS_TESTEXE_SUFFIX="$LDFLAGS_JDKEXE_SUFFIX"
42332
42333
42334
42335
42336
42337
42338
42339  # Some Zero and Shark settings.
42340  # ZERO_ARCHFLAG tells the compiler which mode to build for
42341  case "${OPENJDK_TARGET_CPU}" in
42342    s390)
42343      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
42344      ;;
42345    *)
42346      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42347  esac
42348
42349  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
42350$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
42351  supports=yes
42352
42353  saved_cflags="$CFLAGS"
42354  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
42355  ac_ext=c
42356ac_cpp='$CPP $CPPFLAGS'
42357ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42358ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42359ac_compiler_gnu=$ac_cv_c_compiler_gnu
42360
42361  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42362/* end confdefs.h.  */
42363int i;
42364_ACEOF
42365if ac_fn_c_try_compile "$LINENO"; then :
42366
42367else
42368  supports=no
42369fi
42370rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42371  ac_ext=cpp
42372ac_cpp='$CXXCPP $CPPFLAGS'
42373ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42374ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42375ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42376
42377  CFLAGS="$saved_cflags"
42378
42379  saved_cxxflags="$CXXFLAGS"
42380  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
42381  ac_ext=cpp
42382ac_cpp='$CXXCPP $CPPFLAGS'
42383ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42384ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42385ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42386
42387  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42388/* end confdefs.h.  */
42389int i;
42390_ACEOF
42391if ac_fn_cxx_try_compile "$LINENO"; then :
42392
42393else
42394  supports=no
42395fi
42396rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42397  ac_ext=cpp
42398ac_cpp='$CXXCPP $CPPFLAGS'
42399ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42400ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42401ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42402
42403  CXXFLAGS="$saved_cxxflags"
42404
42405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42406$as_echo "$supports" >&6; }
42407  if test "x$supports" = "xyes" ; then
42408    :
42409  else
42410    ZERO_ARCHFLAG=""
42411  fi
42412
42413
42414
42415  # Check that the compiler supports -mX (or -qX on AIX) flags
42416  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
42417
42418  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
42419$as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
42420  supports=yes
42421
42422  saved_cflags="$CFLAGS"
42423  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42424  ac_ext=c
42425ac_cpp='$CPP $CPPFLAGS'
42426ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42427ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42428ac_compiler_gnu=$ac_cv_c_compiler_gnu
42429
42430  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42431/* end confdefs.h.  */
42432int i;
42433_ACEOF
42434if ac_fn_c_try_compile "$LINENO"; then :
42435
42436else
42437  supports=no
42438fi
42439rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42440  ac_ext=cpp
42441ac_cpp='$CXXCPP $CPPFLAGS'
42442ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42443ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42444ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42445
42446  CFLAGS="$saved_cflags"
42447
42448  saved_cxxflags="$CXXFLAGS"
42449  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42450  ac_ext=cpp
42451ac_cpp='$CXXCPP $CPPFLAGS'
42452ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42453ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42454ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42455
42456  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42457/* end confdefs.h.  */
42458int i;
42459_ACEOF
42460if ac_fn_cxx_try_compile "$LINENO"; then :
42461
42462else
42463  supports=no
42464fi
42465rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42466  ac_ext=cpp
42467ac_cpp='$CXXCPP $CPPFLAGS'
42468ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42469ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42470ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42471
42472  CXXFLAGS="$saved_cxxflags"
42473
42474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42475$as_echo "$supports" >&6; }
42476  if test "x$supports" = "xyes" ; then
42477    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
42478  else
42479    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
42480  fi
42481
42482
42483
42484  # Check whether --enable-warnings-as-errors was given.
42485if test "${enable_warnings_as_errors+set}" = set; then :
42486  enableval=$enable_warnings_as_errors;
42487fi
42488
42489
42490  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
42491$as_echo_n "checking if native warnings are errors... " >&6; }
42492  if test "x$enable_warnings_as_errors" = "xyes"; then
42493    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitely set)" >&5
42494$as_echo "yes (explicitely set)" >&6; }
42495    WARNINGS_AS_ERRORS=true
42496  elif test "x$enable_warnings_as_errors" = "xno"; then
42497    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42498$as_echo "no" >&6; }
42499    WARNINGS_AS_ERRORS=false
42500  elif test "x$enable_warnings_as_errors" = "x"; then
42501    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
42502$as_echo "yes (default)" >&6; }
42503    WARNINGS_AS_ERRORS=true
42504  else
42505    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
42506  fi
42507
42508
42509  case "${TOOLCHAIN_TYPE}" in
42510    microsoft)
42511      DISABLE_WARNING_PREFIX="-wd"
42512      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
42513      ;;
42514    solstudio)
42515      DISABLE_WARNING_PREFIX="-erroff="
42516      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
42517      ;;
42518    gcc)
42519      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
42520
42521  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
42522$as_echo_n "checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
42523  supports=yes
42524
42525  saved_cflags="$CFLAGS"
42526  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
42527  ac_ext=c
42528ac_cpp='$CPP $CPPFLAGS'
42529ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42530ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42531ac_compiler_gnu=$ac_cv_c_compiler_gnu
42532
42533  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42534/* end confdefs.h.  */
42535int i;
42536_ACEOF
42537if ac_fn_c_try_compile "$LINENO"; then :
42538
42539else
42540  supports=no
42541fi
42542rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42543  ac_ext=cpp
42544ac_cpp='$CXXCPP $CPPFLAGS'
42545ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42546ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42547ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42548
42549  CFLAGS="$saved_cflags"
42550
42551  saved_cxxflags="$CXXFLAGS"
42552  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
42553  ac_ext=cpp
42554ac_cpp='$CXXCPP $CPPFLAGS'
42555ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42556ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42557ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42558
42559  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42560/* end confdefs.h.  */
42561int i;
42562_ACEOF
42563if ac_fn_cxx_try_compile "$LINENO"; then :
42564
42565else
42566  supports=no
42567fi
42568rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42569  ac_ext=cpp
42570ac_cpp='$CXXCPP $CPPFLAGS'
42571ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42572ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42573ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42574
42575  CXXFLAGS="$saved_cxxflags"
42576
42577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42578$as_echo "$supports" >&6; }
42579  if test "x$supports" = "xyes" ; then
42580    GCC_CAN_DISABLE_WARNINGS=true
42581  else
42582    GCC_CAN_DISABLE_WARNINGS=false
42583
42584  fi
42585
42586      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
42587        DISABLE_WARNING_PREFIX="-Wno-"
42588      else
42589        DISABLE_WARNING_PREFIX=
42590      fi
42591      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
42592      ;;
42593    clang)
42594      DISABLE_WARNING_PREFIX="-Wno-"
42595      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
42596      ;;
42597  esac
42598
42599
42600
42601
42602# Setup debug symbols (need objcopy from the toolchain for that)
42603
42604  #
42605  # ENABLE_DEBUG_SYMBOLS
42606  # This must be done after the toolchain is setup, since we're looking at objcopy.
42607  #
42608  # Check whether --enable-debug-symbols was given.
42609if test "${enable_debug_symbols+set}" = set; then :
42610  enableval=$enable_debug_symbols;
42611fi
42612
42613
42614  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
42615$as_echo_n "checking if we should generate debug symbols... " >&6; }
42616
42617  if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
42618    # explicit enabling of enable-debug-symbols and can't find objcopy
42619    #   this is an error
42620    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
42621  fi
42622
42623  if test "x$enable_debug_symbols" = "xyes"; then
42624    ENABLE_DEBUG_SYMBOLS=true
42625  elif test "x$enable_debug_symbols" = "xno"; then
42626    ENABLE_DEBUG_SYMBOLS=false
42627  else
42628    # Default is on if objcopy is found
42629    if test "x$OBJCOPY" != x; then
42630      ENABLE_DEBUG_SYMBOLS=true
42631    # MacOS X and Windows don't use objcopy but default is on for those OSes
42632    elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
42633      ENABLE_DEBUG_SYMBOLS=true
42634    else
42635      ENABLE_DEBUG_SYMBOLS=false
42636    fi
42637  fi
42638
42639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
42640$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
42641
42642  #
42643  # ZIP_DEBUGINFO_FILES
42644  #
42645  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
42646$as_echo_n "checking if we should zip debug-info files... " >&6; }
42647  # Check whether --enable-zip-debug-info was given.
42648if test "${enable_zip_debug_info+set}" = set; then :
42649  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
42650else
42651  enable_zip_debug_info="yes"
42652fi
42653
42654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
42655$as_echo "${enable_zip_debug_info}" >&6; }
42656
42657  if test "x${enable_zip_debug_info}" = "xno"; then
42658    ZIP_DEBUGINFO_FILES=false
42659  else
42660    ZIP_DEBUGINFO_FILES=true
42661  fi
42662
42663
42664
42665
42666
42667  # Check whether --enable-native-coverage was given.
42668if test "${enable_native_coverage+set}" = set; then :
42669  enableval=$enable_native_coverage;
42670fi
42671
42672  GCOV_ENABLED="false"
42673  if test "x$enable_native_coverage" = "xyes"; then
42674    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
42675      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
42676$as_echo_n "checking if native coverage is enabled... " >&6; }
42677      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42678$as_echo "yes" >&6; }
42679      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
42680      GCOV_LDFLAGS="-fprofile-arcs"
42681      LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
42682      LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
42683      LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
42684      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
42685      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
42686      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
42687      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
42688      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
42689      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
42690      GCOV_ENABLED="true"
42691    else
42692      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
42693    fi
42694  elif test "x$enable_native_coverage" = "xno"; then
42695    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
42696$as_echo_n "checking if native coverage is enabled... " >&6; }
42697    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42698$as_echo "no" >&6; }
42699  elif test "x$enable_native_coverage" != "x"; then
42700    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
42701  fi
42702
42703
42704
42705
42706###############################################################################
42707#
42708# Check dependencies for external and internal libraries.
42709#
42710###############################################################################
42711
42712# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
42713
42714  # When using cygwin or msys, we need a wrapper binary that renames
42715  # /cygdrive/c/ arguments into c:/ arguments and peeks into
42716  # @files and rewrites these too! This wrapper binary is
42717  # called fixpath.
42718  FIXPATH=
42719  if test "x$OPENJDK_BUILD_OS" = xwindows; then
42720    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
42721$as_echo_n "checking if fixpath can be created... " >&6; }
42722    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
42723    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
42724    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
42725    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
42726      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
42727      FIXPATH="$FIXPATH_BIN -c"
42728    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
42729      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
42730      # @ was chosen as separator to minimize risk of other tools messing around with it
42731      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
42732          | tr ' ' '\n' | grep '^/./' | sort | uniq`
42733      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
42734      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
42735    fi
42736    FIXPATH_SRC_W="$FIXPATH_SRC"
42737    FIXPATH_BIN_W="$FIXPATH_BIN"
42738
42739  unix_path="$FIXPATH_SRC_W"
42740  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42741    windows_path=`$CYGPATH -m "$unix_path"`
42742    FIXPATH_SRC_W="$windows_path"
42743  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42744    windows_path=`cmd //c echo $unix_path`
42745    FIXPATH_SRC_W="$windows_path"
42746  fi
42747
42748
42749  unix_path="$FIXPATH_BIN_W"
42750  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42751    windows_path=`$CYGPATH -m "$unix_path"`
42752    FIXPATH_BIN_W="$windows_path"
42753  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42754    windows_path=`cmd //c echo $unix_path`
42755    FIXPATH_BIN_W="$windows_path"
42756  fi
42757
42758    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
42759    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
42760    cd $FIXPATH_DIR
42761    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
42762    cd $CURDIR
42763
42764    if test ! -x $FIXPATH_BIN; then
42765      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42766$as_echo "no" >&6; }
42767      cat $FIXPATH_DIR/fixpath1.log
42768      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
42769    fi
42770    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42771$as_echo "yes" >&6; }
42772    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
42773$as_echo_n "checking if fixpath.exe works... " >&6; }
42774    cd $FIXPATH_DIR
42775    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
42776        > $FIXPATH_DIR/fixpath2.log 2>&1
42777    cd $CURDIR
42778    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
42779      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42780$as_echo "no" >&6; }
42781      cat $FIXPATH_DIR/fixpath2.log
42782      as_fn_error $? "fixpath did not work!" "$LINENO" 5
42783    fi
42784    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42785$as_echo "yes" >&6; }
42786  fi
42787
42788
42789
42790
42791
42792
42793  ###############################################################################
42794  #
42795  # OS specific settings that we never will need to probe.
42796  #
42797  if test "x$OPENJDK_TARGET_OS" = xlinux; then
42798    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
42799$as_echo_n "checking what is not needed on Linux?... " >&6; }
42800    PULSE_NOT_NEEDED=yes
42801    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
42802$as_echo "pulse" >&6; }
42803  fi
42804
42805  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42806    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
42807$as_echo_n "checking what is not needed on Solaris?... " >&6; }
42808    ALSA_NOT_NEEDED=yes
42809    PULSE_NOT_NEEDED=yes
42810    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
42811$as_echo "alsa pulse" >&6; }
42812  fi
42813
42814  if test "x$OPENJDK_TARGET_OS" = xaix; then
42815    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on AIX?" >&5
42816$as_echo_n "checking what is not needed on AIX?... " >&6; }
42817    ALSA_NOT_NEEDED=yes
42818    PULSE_NOT_NEEDED=yes
42819    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
42820$as_echo "alsa pulse" >&6; }
42821  fi
42822
42823
42824  if test "x$OPENJDK_TARGET_OS" = xwindows; then
42825    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
42826$as_echo_n "checking what is not needed on Windows?... " >&6; }
42827    CUPS_NOT_NEEDED=yes
42828    ALSA_NOT_NEEDED=yes
42829    PULSE_NOT_NEEDED=yes
42830    X11_NOT_NEEDED=yes
42831    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
42832$as_echo "alsa cups pulse x11" >&6; }
42833  fi
42834
42835  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42836    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
42837$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
42838    ALSA_NOT_NEEDED=yes
42839    PULSE_NOT_NEEDED=yes
42840    X11_NOT_NEEDED=yes
42841    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
42842$as_echo "alsa pulse x11" >&6; }
42843  fi
42844
42845  if test "x$OPENJDK_TARGET_OS" = xbsd; then
42846    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
42847$as_echo_n "checking what is not needed on bsd?... " >&6; }
42848    ALSA_NOT_NEEDED=yes
42849    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
42850$as_echo "alsa" >&6; }
42851  fi
42852
42853  if test "x$OPENJDK" = "xfalse"; then
42854    FREETYPE_NOT_NEEDED=yes
42855  fi
42856
42857  if test "x$SUPPORT_HEADFUL" = xno; then
42858    X11_NOT_NEEDED=yes
42859  fi
42860
42861
42862
42863  ###############################################################################
42864  #
42865  # Check for X Windows
42866  #
42867
42868  if test "x$X11_NOT_NEEDED" = xyes; then
42869    if test "x${with_x}" != x; then
42870      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
42871$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
42872    fi
42873    X_CFLAGS=
42874    X_LIBS=
42875  else
42876    # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
42877    # Make a simple check for the libraries at the sysroot, and setup --x-includes and
42878    # --x-libraries for the sysroot, if that seems to be correct.
42879    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
42880      if test "x$SYSROOT" != "x"; then
42881        if test "x$x_includes" = xNONE; then
42882          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
42883            x_includes="$SYSROOT/usr/X11R6/include"
42884          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
42885            x_includes="$SYSROOT/usr/include"
42886          fi
42887        fi
42888        if test "x$x_libraries" = xNONE; then
42889          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
42890            x_libraries="$SYSROOT/usr/X11R6/lib"
42891          elif test "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
42892            x_libraries="$SYSROOT/usr/lib64"
42893          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
42894            x_libraries="$SYSROOT/usr/lib"
42895          fi
42896        fi
42897      fi
42898    fi
42899
42900    # Now let autoconf do it's magic
42901    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
42902$as_echo_n "checking for X... " >&6; }
42903
42904
42905# Check whether --with-x was given.
42906if test "${with_x+set}" = set; then :
42907  withval=$with_x;
42908fi
42909
42910# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
42911if test "x$with_x" = xno; then
42912  # The user explicitly disabled X.
42913  have_x=disabled
42914else
42915  case $x_includes,$x_libraries in #(
42916    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
42917    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
42918  $as_echo_n "(cached) " >&6
42919else
42920  # One or both of the vars are not set, and there is no cached value.
42921ac_x_includes=no ac_x_libraries=no
42922rm -f -r conftest.dir
42923if mkdir conftest.dir; then
42924  cd conftest.dir
42925  cat >Imakefile <<'_ACEOF'
42926incroot:
42927	@echo incroot='${INCROOT}'
42928usrlibdir:
42929	@echo usrlibdir='${USRLIBDIR}'
42930libdir:
42931	@echo libdir='${LIBDIR}'
42932_ACEOF
42933  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
42934    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
42935    for ac_var in incroot usrlibdir libdir; do
42936      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
42937    done
42938    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
42939    for ac_extension in a so sl dylib la dll; do
42940      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
42941	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
42942	ac_im_usrlibdir=$ac_im_libdir; break
42943      fi
42944    done
42945    # Screen out bogus values from the imake configuration.  They are
42946    # bogus both because they are the default anyway, and because
42947    # using them would break gcc on systems where it needs fixed includes.
42948    case $ac_im_incroot in
42949	/usr/include) ac_x_includes= ;;
42950	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
42951    esac
42952    case $ac_im_usrlibdir in
42953	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
42954	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
42955    esac
42956  fi
42957  cd ..
42958  rm -f -r conftest.dir
42959fi
42960
42961# Standard set of common directories for X headers.
42962# Check X11 before X11Rn because it is often a symlink to the current release.
42963ac_x_header_dirs='
42964/usr/X11/include
42965/usr/X11R7/include
42966/usr/X11R6/include
42967/usr/X11R5/include
42968/usr/X11R4/include
42969
42970/usr/include/X11
42971/usr/include/X11R7
42972/usr/include/X11R6
42973/usr/include/X11R5
42974/usr/include/X11R4
42975
42976/usr/local/X11/include
42977/usr/local/X11R7/include
42978/usr/local/X11R6/include
42979/usr/local/X11R5/include
42980/usr/local/X11R4/include
42981
42982/usr/local/include/X11
42983/usr/local/include/X11R7
42984/usr/local/include/X11R6
42985/usr/local/include/X11R5
42986/usr/local/include/X11R4
42987
42988/usr/X386/include
42989/usr/x386/include
42990/usr/XFree86/include/X11
42991
42992/usr/include
42993/usr/local/include
42994/usr/unsupported/include
42995/usr/athena/include
42996/usr/local/x11r5/include
42997/usr/lpp/Xamples/include
42998
42999/usr/openwin/include
43000/usr/openwin/share/include'
43001
43002if test "$ac_x_includes" = no; then
43003  # Guess where to find include files, by looking for Xlib.h.
43004  # First, try using that file with no special directory specified.
43005  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43006/* end confdefs.h.  */
43007#include <X11/Xlib.h>
43008_ACEOF
43009if ac_fn_cxx_try_cpp "$LINENO"; then :
43010  # We can compile using X headers with no special include directory.
43011ac_x_includes=
43012else
43013  for ac_dir in $ac_x_header_dirs; do
43014  if test -r "$ac_dir/X11/Xlib.h"; then
43015    ac_x_includes=$ac_dir
43016    break
43017  fi
43018done
43019fi
43020rm -f conftest.err conftest.i conftest.$ac_ext
43021fi # $ac_x_includes = no
43022
43023if test "$ac_x_libraries" = no; then
43024  # Check for the libraries.
43025  # See if we find them without any special options.
43026  # Don't add to $LIBS permanently.
43027  ac_save_LIBS=$LIBS
43028  LIBS="-lX11 $LIBS"
43029  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43030/* end confdefs.h.  */
43031#include <X11/Xlib.h>
43032int
43033main ()
43034{
43035XrmInitialize ()
43036  ;
43037  return 0;
43038}
43039_ACEOF
43040if ac_fn_cxx_try_link "$LINENO"; then :
43041  LIBS=$ac_save_LIBS
43042# We can link X programs with no special library path.
43043ac_x_libraries=
43044else
43045  LIBS=$ac_save_LIBS
43046for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
43047do
43048  # Don't even attempt the hair of trying to link an X program!
43049  for ac_extension in a so sl dylib la dll; do
43050    if test -r "$ac_dir/libX11.$ac_extension"; then
43051      ac_x_libraries=$ac_dir
43052      break 2
43053    fi
43054  done
43055done
43056fi
43057rm -f core conftest.err conftest.$ac_objext \
43058    conftest$ac_exeext conftest.$ac_ext
43059fi # $ac_x_libraries = no
43060
43061case $ac_x_includes,$ac_x_libraries in #(
43062  no,* | *,no | *\'*)
43063    # Didn't find X, or a directory has "'" in its name.
43064    ac_cv_have_x="have_x=no";; #(
43065  *)
43066    # Record where we found X for the cache.
43067    ac_cv_have_x="have_x=yes\
43068	ac_x_includes='$ac_x_includes'\
43069	ac_x_libraries='$ac_x_libraries'"
43070esac
43071fi
43072;; #(
43073    *) have_x=yes;;
43074  esac
43075  eval "$ac_cv_have_x"
43076fi # $with_x != no
43077
43078if test "$have_x" != yes; then
43079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
43080$as_echo "$have_x" >&6; }
43081  no_x=yes
43082else
43083  # If each of the values was on the command line, it overrides each guess.
43084  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
43085  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
43086  # Update the cache value to reflect the command line values.
43087  ac_cv_have_x="have_x=yes\
43088	ac_x_includes='$x_includes'\
43089	ac_x_libraries='$x_libraries'"
43090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
43091$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
43092fi
43093
43094    if test "$no_x" = yes; then
43095  # Not all programs may use this symbol, but it does not hurt to define it.
43096
43097$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
43098
43099  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
43100else
43101  if test -n "$x_includes"; then
43102    X_CFLAGS="$X_CFLAGS -I$x_includes"
43103  fi
43104
43105  # It would also be nice to do this for all -L options, not just this one.
43106  if test -n "$x_libraries"; then
43107    X_LIBS="$X_LIBS -L$x_libraries"
43108    # For Solaris; some versions of Sun CC require a space after -R and
43109    # others require no space.  Words are not sufficient . . . .
43110    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
43111$as_echo_n "checking whether -R must be followed by a space... " >&6; }
43112    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
43113    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
43114    ac_cxx_werror_flag=yes
43115    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43116/* end confdefs.h.  */
43117
43118int
43119main ()
43120{
43121
43122  ;
43123  return 0;
43124}
43125_ACEOF
43126if ac_fn_cxx_try_link "$LINENO"; then :
43127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43128$as_echo "no" >&6; }
43129       X_LIBS="$X_LIBS -R$x_libraries"
43130else
43131  LIBS="$ac_xsave_LIBS -R $x_libraries"
43132       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43133/* end confdefs.h.  */
43134
43135int
43136main ()
43137{
43138
43139  ;
43140  return 0;
43141}
43142_ACEOF
43143if ac_fn_cxx_try_link "$LINENO"; then :
43144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43145$as_echo "yes" >&6; }
43146	  X_LIBS="$X_LIBS -R $x_libraries"
43147else
43148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
43149$as_echo "neither works" >&6; }
43150fi
43151rm -f core conftest.err conftest.$ac_objext \
43152    conftest$ac_exeext conftest.$ac_ext
43153fi
43154rm -f core conftest.err conftest.$ac_objext \
43155    conftest$ac_exeext conftest.$ac_ext
43156    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
43157    LIBS=$ac_xsave_LIBS
43158  fi
43159
43160  # Check for system-dependent libraries X programs must link with.
43161  # Do this before checking for the system-independent R6 libraries
43162  # (-lICE), since we may need -lsocket or whatever for X linking.
43163
43164  if test "$ISC" = yes; then
43165    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
43166  else
43167    # Martyn Johnson says this is needed for Ultrix, if the X
43168    # libraries were built with DECnet support.  And Karl Berry says
43169    # the Alpha needs dnet_stub (dnet does not exist).
43170    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
43171    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43172/* end confdefs.h.  */
43173
43174/* Override any GCC internal prototype to avoid an error.
43175   Use char because int might match the return type of a GCC
43176   builtin and then its argument prototype would still apply.  */
43177#ifdef __cplusplus
43178extern "C"
43179#endif
43180char XOpenDisplay ();
43181int
43182main ()
43183{
43184return XOpenDisplay ();
43185  ;
43186  return 0;
43187}
43188_ACEOF
43189if ac_fn_cxx_try_link "$LINENO"; then :
43190
43191else
43192  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
43193$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
43194if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
43195  $as_echo_n "(cached) " >&6
43196else
43197  ac_check_lib_save_LIBS=$LIBS
43198LIBS="-ldnet  $LIBS"
43199cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43200/* end confdefs.h.  */
43201
43202/* Override any GCC internal prototype to avoid an error.
43203   Use char because int might match the return type of a GCC
43204   builtin and then its argument prototype would still apply.  */
43205#ifdef __cplusplus
43206extern "C"
43207#endif
43208char dnet_ntoa ();
43209int
43210main ()
43211{
43212return dnet_ntoa ();
43213  ;
43214  return 0;
43215}
43216_ACEOF
43217if ac_fn_cxx_try_link "$LINENO"; then :
43218  ac_cv_lib_dnet_dnet_ntoa=yes
43219else
43220  ac_cv_lib_dnet_dnet_ntoa=no
43221fi
43222rm -f core conftest.err conftest.$ac_objext \
43223    conftest$ac_exeext conftest.$ac_ext
43224LIBS=$ac_check_lib_save_LIBS
43225fi
43226{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
43227$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
43228if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
43229  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
43230fi
43231
43232    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
43233      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
43234$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
43235if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
43236  $as_echo_n "(cached) " >&6
43237else
43238  ac_check_lib_save_LIBS=$LIBS
43239LIBS="-ldnet_stub  $LIBS"
43240cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43241/* end confdefs.h.  */
43242
43243/* Override any GCC internal prototype to avoid an error.
43244   Use char because int might match the return type of a GCC
43245   builtin and then its argument prototype would still apply.  */
43246#ifdef __cplusplus
43247extern "C"
43248#endif
43249char dnet_ntoa ();
43250int
43251main ()
43252{
43253return dnet_ntoa ();
43254  ;
43255  return 0;
43256}
43257_ACEOF
43258if ac_fn_cxx_try_link "$LINENO"; then :
43259  ac_cv_lib_dnet_stub_dnet_ntoa=yes
43260else
43261  ac_cv_lib_dnet_stub_dnet_ntoa=no
43262fi
43263rm -f core conftest.err conftest.$ac_objext \
43264    conftest$ac_exeext conftest.$ac_ext
43265LIBS=$ac_check_lib_save_LIBS
43266fi
43267{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
43268$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
43269if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
43270  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
43271fi
43272
43273    fi
43274fi
43275rm -f core conftest.err conftest.$ac_objext \
43276    conftest$ac_exeext conftest.$ac_ext
43277    LIBS="$ac_xsave_LIBS"
43278
43279    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
43280    # to get the SysV transport functions.
43281    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
43282    # needs -lnsl.
43283    # The nsl library prevents programs from opening the X display
43284    # on Irix 5.2, according to T.E. Dickey.
43285    # The functions gethostbyname, getservbyname, and inet_addr are
43286    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
43287    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
43288if test "x$ac_cv_func_gethostbyname" = xyes; then :
43289
43290fi
43291
43292    if test $ac_cv_func_gethostbyname = no; then
43293      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
43294$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
43295if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
43296  $as_echo_n "(cached) " >&6
43297else
43298  ac_check_lib_save_LIBS=$LIBS
43299LIBS="-lnsl  $LIBS"
43300cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43301/* end confdefs.h.  */
43302
43303/* Override any GCC internal prototype to avoid an error.
43304   Use char because int might match the return type of a GCC
43305   builtin and then its argument prototype would still apply.  */
43306#ifdef __cplusplus
43307extern "C"
43308#endif
43309char gethostbyname ();
43310int
43311main ()
43312{
43313return gethostbyname ();
43314  ;
43315  return 0;
43316}
43317_ACEOF
43318if ac_fn_cxx_try_link "$LINENO"; then :
43319  ac_cv_lib_nsl_gethostbyname=yes
43320else
43321  ac_cv_lib_nsl_gethostbyname=no
43322fi
43323rm -f core conftest.err conftest.$ac_objext \
43324    conftest$ac_exeext conftest.$ac_ext
43325LIBS=$ac_check_lib_save_LIBS
43326fi
43327{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
43328$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
43329if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
43330  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
43331fi
43332
43333      if test $ac_cv_lib_nsl_gethostbyname = no; then
43334	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
43335$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
43336if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
43337  $as_echo_n "(cached) " >&6
43338else
43339  ac_check_lib_save_LIBS=$LIBS
43340LIBS="-lbsd  $LIBS"
43341cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43342/* end confdefs.h.  */
43343
43344/* Override any GCC internal prototype to avoid an error.
43345   Use char because int might match the return type of a GCC
43346   builtin and then its argument prototype would still apply.  */
43347#ifdef __cplusplus
43348extern "C"
43349#endif
43350char gethostbyname ();
43351int
43352main ()
43353{
43354return gethostbyname ();
43355  ;
43356  return 0;
43357}
43358_ACEOF
43359if ac_fn_cxx_try_link "$LINENO"; then :
43360  ac_cv_lib_bsd_gethostbyname=yes
43361else
43362  ac_cv_lib_bsd_gethostbyname=no
43363fi
43364rm -f core conftest.err conftest.$ac_objext \
43365    conftest$ac_exeext conftest.$ac_ext
43366LIBS=$ac_check_lib_save_LIBS
43367fi
43368{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
43369$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
43370if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
43371  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
43372fi
43373
43374      fi
43375    fi
43376
43377    # lieder@skyler.mavd.honeywell.com says without -lsocket,
43378    # socket/setsockopt and other routines are undefined under SCO ODT
43379    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
43380    # on later versions), says Simon Leinen: it contains gethostby*
43381    # variants that don't use the name server (or something).  -lsocket
43382    # must be given before -lnsl if both are needed.  We assume that
43383    # if connect needs -lnsl, so does gethostbyname.
43384    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
43385if test "x$ac_cv_func_connect" = xyes; then :
43386
43387fi
43388
43389    if test $ac_cv_func_connect = no; then
43390      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
43391$as_echo_n "checking for connect in -lsocket... " >&6; }
43392if ${ac_cv_lib_socket_connect+:} false; then :
43393  $as_echo_n "(cached) " >&6
43394else
43395  ac_check_lib_save_LIBS=$LIBS
43396LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
43397cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43398/* end confdefs.h.  */
43399
43400/* Override any GCC internal prototype to avoid an error.
43401   Use char because int might match the return type of a GCC
43402   builtin and then its argument prototype would still apply.  */
43403#ifdef __cplusplus
43404extern "C"
43405#endif
43406char connect ();
43407int
43408main ()
43409{
43410return connect ();
43411  ;
43412  return 0;
43413}
43414_ACEOF
43415if ac_fn_cxx_try_link "$LINENO"; then :
43416  ac_cv_lib_socket_connect=yes
43417else
43418  ac_cv_lib_socket_connect=no
43419fi
43420rm -f core conftest.err conftest.$ac_objext \
43421    conftest$ac_exeext conftest.$ac_ext
43422LIBS=$ac_check_lib_save_LIBS
43423fi
43424{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
43425$as_echo "$ac_cv_lib_socket_connect" >&6; }
43426if test "x$ac_cv_lib_socket_connect" = xyes; then :
43427  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
43428fi
43429
43430    fi
43431
43432    # Guillermo Gomez says -lposix is necessary on A/UX.
43433    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
43434if test "x$ac_cv_func_remove" = xyes; then :
43435
43436fi
43437
43438    if test $ac_cv_func_remove = no; then
43439      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
43440$as_echo_n "checking for remove in -lposix... " >&6; }
43441if ${ac_cv_lib_posix_remove+:} false; then :
43442  $as_echo_n "(cached) " >&6
43443else
43444  ac_check_lib_save_LIBS=$LIBS
43445LIBS="-lposix  $LIBS"
43446cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43447/* end confdefs.h.  */
43448
43449/* Override any GCC internal prototype to avoid an error.
43450   Use char because int might match the return type of a GCC
43451   builtin and then its argument prototype would still apply.  */
43452#ifdef __cplusplus
43453extern "C"
43454#endif
43455char remove ();
43456int
43457main ()
43458{
43459return remove ();
43460  ;
43461  return 0;
43462}
43463_ACEOF
43464if ac_fn_cxx_try_link "$LINENO"; then :
43465  ac_cv_lib_posix_remove=yes
43466else
43467  ac_cv_lib_posix_remove=no
43468fi
43469rm -f core conftest.err conftest.$ac_objext \
43470    conftest$ac_exeext conftest.$ac_ext
43471LIBS=$ac_check_lib_save_LIBS
43472fi
43473{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
43474$as_echo "$ac_cv_lib_posix_remove" >&6; }
43475if test "x$ac_cv_lib_posix_remove" = xyes; then :
43476  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
43477fi
43478
43479    fi
43480
43481    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
43482    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
43483if test "x$ac_cv_func_shmat" = xyes; then :
43484
43485fi
43486
43487    if test $ac_cv_func_shmat = no; then
43488      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
43489$as_echo_n "checking for shmat in -lipc... " >&6; }
43490if ${ac_cv_lib_ipc_shmat+:} false; then :
43491  $as_echo_n "(cached) " >&6
43492else
43493  ac_check_lib_save_LIBS=$LIBS
43494LIBS="-lipc  $LIBS"
43495cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43496/* end confdefs.h.  */
43497
43498/* Override any GCC internal prototype to avoid an error.
43499   Use char because int might match the return type of a GCC
43500   builtin and then its argument prototype would still apply.  */
43501#ifdef __cplusplus
43502extern "C"
43503#endif
43504char shmat ();
43505int
43506main ()
43507{
43508return shmat ();
43509  ;
43510  return 0;
43511}
43512_ACEOF
43513if ac_fn_cxx_try_link "$LINENO"; then :
43514  ac_cv_lib_ipc_shmat=yes
43515else
43516  ac_cv_lib_ipc_shmat=no
43517fi
43518rm -f core conftest.err conftest.$ac_objext \
43519    conftest$ac_exeext conftest.$ac_ext
43520LIBS=$ac_check_lib_save_LIBS
43521fi
43522{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
43523$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
43524if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
43525  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
43526fi
43527
43528    fi
43529  fi
43530
43531  # Check for libraries that X11R6 Xt/Xaw programs need.
43532  ac_save_LDFLAGS=$LDFLAGS
43533  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
43534  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
43535  # check for ICE first), but we must link in the order -lSM -lICE or
43536  # we get undefined symbols.  So assume we have SM if we have ICE.
43537  # These have to be linked with before -lX11, unlike the other
43538  # libraries we check for below, so use a different variable.
43539  # John Interrante, Karl Berry
43540  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
43541$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
43542if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
43543  $as_echo_n "(cached) " >&6
43544else
43545  ac_check_lib_save_LIBS=$LIBS
43546LIBS="-lICE $X_EXTRA_LIBS $LIBS"
43547cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43548/* end confdefs.h.  */
43549
43550/* Override any GCC internal prototype to avoid an error.
43551   Use char because int might match the return type of a GCC
43552   builtin and then its argument prototype would still apply.  */
43553#ifdef __cplusplus
43554extern "C"
43555#endif
43556char IceConnectionNumber ();
43557int
43558main ()
43559{
43560return IceConnectionNumber ();
43561  ;
43562  return 0;
43563}
43564_ACEOF
43565if ac_fn_cxx_try_link "$LINENO"; then :
43566  ac_cv_lib_ICE_IceConnectionNumber=yes
43567else
43568  ac_cv_lib_ICE_IceConnectionNumber=no
43569fi
43570rm -f core conftest.err conftest.$ac_objext \
43571    conftest$ac_exeext conftest.$ac_ext
43572LIBS=$ac_check_lib_save_LIBS
43573fi
43574{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
43575$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
43576if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
43577  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
43578fi
43579
43580  LDFLAGS=$ac_save_LDFLAGS
43581
43582fi
43583
43584
43585    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
43586    # this doesn't make sense so we remove it.
43587    if test "x$COMPILE_TYPE" = xcross; then
43588      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
43589    fi
43590
43591    if test "x$no_x" = xyes; then
43592
43593  # Print a helpful message on how to acquire the necessary build dependency.
43594  # x11 is the help tag: freetype, cups, pulse, alsa etc
43595  MISSING_DEPENDENCY=x11
43596
43597  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43598    cygwin_help $MISSING_DEPENDENCY
43599  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43600    msys_help $MISSING_DEPENDENCY
43601  else
43602    PKGHANDLER_COMMAND=
43603
43604    case $PKGHANDLER in
43605      apt-get)
43606        apt_help     $MISSING_DEPENDENCY ;;
43607      yum)
43608        yum_help     $MISSING_DEPENDENCY ;;
43609      port)
43610        port_help    $MISSING_DEPENDENCY ;;
43611      pkgutil)
43612        pkgutil_help $MISSING_DEPENDENCY ;;
43613      pkgadd)
43614        pkgadd_help  $MISSING_DEPENDENCY ;;
43615    esac
43616
43617    if test "x$PKGHANDLER_COMMAND" != x; then
43618      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43619    fi
43620  fi
43621
43622      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
43623    fi
43624
43625    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43626      OPENWIN_HOME="/usr/openwin"
43627      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
43628      X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
43629          -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
43630          -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
43631          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
43632    fi
43633
43634    ac_ext=c
43635ac_cpp='$CPP $CPPFLAGS'
43636ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43637ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43638ac_compiler_gnu=$ac_cv_c_compiler_gnu
43639
43640    OLD_CFLAGS="$CFLAGS"
43641    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
43642
43643    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
43644    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
43645do :
43646  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
43647ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
43648          # include <X11/Xlib.h>
43649          # include <X11/Xutil.h>
43650
43651
43652"
43653if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
43654  cat >>confdefs.h <<_ACEOF
43655#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
43656_ACEOF
43657 X11_HEADERS_OK=yes
43658else
43659  X11_HEADERS_OK=no; break
43660fi
43661
43662done
43663
43664
43665    if test "x$X11_HEADERS_OK" = xno; then
43666
43667  # Print a helpful message on how to acquire the necessary build dependency.
43668  # x11 is the help tag: freetype, cups, pulse, alsa etc
43669  MISSING_DEPENDENCY=x11
43670
43671  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43672    cygwin_help $MISSING_DEPENDENCY
43673  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43674    msys_help $MISSING_DEPENDENCY
43675  else
43676    PKGHANDLER_COMMAND=
43677
43678    case $PKGHANDLER in
43679      apt-get)
43680        apt_help     $MISSING_DEPENDENCY ;;
43681      yum)
43682        yum_help     $MISSING_DEPENDENCY ;;
43683      port)
43684        port_help    $MISSING_DEPENDENCY ;;
43685      pkgutil)
43686        pkgutil_help $MISSING_DEPENDENCY ;;
43687      pkgadd)
43688        pkgadd_help  $MISSING_DEPENDENCY ;;
43689    esac
43690
43691    if test "x$PKGHANDLER_COMMAND" != x; then
43692      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43693    fi
43694  fi
43695
43696      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
43697    fi
43698
43699    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
43700    # defined in libawt_xawt.
43701    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
43702$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
43703    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43704/* end confdefs.h.  */
43705#include <X11/extensions/Xrender.h>
43706int
43707main ()
43708{
43709XLinearGradient x;
43710  ;
43711  return 0;
43712}
43713_ACEOF
43714if ac_fn_c_try_compile "$LINENO"; then :
43715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43716$as_echo "yes" >&6; }
43717else
43718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43719$as_echo "no" >&6; }
43720         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
43721fi
43722rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43723
43724    CFLAGS="$OLD_CFLAGS"
43725    ac_ext=cpp
43726ac_cpp='$CXXCPP $CPPFLAGS'
43727ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43728ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43729ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43730
43731  fi # X11_NOT_NEEDED
43732
43733
43734
43735
43736
43737
43738  ###############################################################################
43739  #
43740  # The common unix printing system cups is used to print from java.
43741  #
43742
43743# Check whether --with-cups was given.
43744if test "${with_cups+set}" = set; then :
43745  withval=$with_cups;
43746fi
43747
43748
43749# Check whether --with-cups-include was given.
43750if test "${with_cups_include+set}" = set; then :
43751  withval=$with_cups_include;
43752fi
43753
43754
43755  if test "x$CUPS_NOT_NEEDED" = xyes; then
43756    if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
43757      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
43758$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
43759    fi
43760    CUPS_CFLAGS=
43761  else
43762    CUPS_FOUND=no
43763
43764    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
43765      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
43766    fi
43767
43768    if test "x${with_cups}" != x; then
43769      CUPS_CFLAGS="-I${with_cups}/include"
43770      CUPS_FOUND=yes
43771    fi
43772    if test "x${with_cups_include}" != x; then
43773      CUPS_CFLAGS="-I${with_cups_include}"
43774      CUPS_FOUND=yes
43775    fi
43776    if test "x$CUPS_FOUND" = xno; then
43777
43778
43779  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
43780    # Source the builddeps file again, to make sure it uses the latest variables!
43781    . $builddepsfile
43782    # Look for a target and build machine specific resource!
43783    eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
43784    if test "x$resource" = x; then
43785      # Ok, lets instead look for a target specific resource
43786      eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
43787    fi
43788    if test "x$resource" = x; then
43789      # Ok, lets instead look for a build specific resource
43790      eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
43791    fi
43792    if test "x$resource" = x; then
43793      # Ok, lets instead look for a generic resource
43794      # (The cups comes from M4 and not the shell, thus no need for eval here.)
43795      resource=${builddep_cups}
43796    fi
43797    if test "x$resource" != x; then
43798      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
43799$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
43800      # If the resource in the builddeps.conf file is an existing directory,
43801      # for example /java/linux/cups
43802      if test -d ${resource}; then
43803        depdir=${resource}
43804      else
43805
43806  # cups is for example mymodule
43807  # $resource is for example libs/general/libmymod_1_2_3.zip
43808  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
43809  # $with_builddeps_dir is for example /localhome/builddeps
43810  # depdir is the name of the variable into which we store the depdir, eg MYMOD
43811  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
43812  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
43813  filename=`basename $resource`
43814  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
43815  filebase=${filename%%.*}
43816  extension=${filename#*.}
43817  installdir=$with_builddeps_dir/$filebase
43818  if test ! -f $installdir/$filename.unpacked; then
43819    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
43820$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
43821    if test ! -d $installdir; then
43822      mkdir -p $installdir
43823    fi
43824    if test ! -d $installdir; then
43825      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
43826    fi
43827    tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
43828    touch $tmpfile
43829    if test ! -f $tmpfile; then
43830      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
43831    fi
43832
43833  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
43834  # $tmpfile is the local file name for the downloaded file.
43835  VALID_TOOL=no
43836  if test "x$BDEPS_FTP" = xwget; then
43837    VALID_TOOL=yes
43838    wget -O $tmpfile $with_builddeps_server/$resource
43839  fi
43840  if test "x$BDEPS_FTP" = xlftp; then
43841    VALID_TOOL=yes
43842    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
43843  fi
43844  if test "x$BDEPS_FTP" = xftp; then
43845    VALID_TOOL=yes
43846    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
43847    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
43848    FTPUSERPWD=${FTPSERVER%%@*}
43849    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
43850      FTPUSER=${userpwd%%:*}
43851      FTPPWD=${userpwd#*@}
43852      FTPSERVER=${FTPSERVER#*@}
43853    else
43854      FTPUSER=ftp
43855      FTPPWD=ftp
43856    fi
43857    # the "pass" command does not work on some
43858    # ftp clients (read ftp.exe) but if it works,
43859    # passive mode is better!
43860    ( \
43861        echo "user $FTPUSER $FTPPWD"        ; \
43862        echo "pass"                         ; \
43863        echo "bin"                          ; \
43864        echo "get $FTPPATH $tmpfile"              ; \
43865    ) | ftp -in $FTPSERVER
43866  fi
43867  if test "x$VALID_TOOL" != xyes; then
43868    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
43869  fi
43870
43871    mv $tmpfile $installdir/$filename
43872    if test ! -s $installdir/$filename; then
43873      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
43874    fi
43875    case "$extension" in
43876      zip)  echo "Unzipping $installdir/$filename..."
43877        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
43878        ;;
43879      tar.gz) echo "Untaring $installdir/$filename..."
43880        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
43881        ;;
43882      tgz) echo "Untaring $installdir/$filename..."
43883        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
43884        ;;
43885      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
43886        ;;
43887    esac
43888  fi
43889  if test -f $installdir/$filename.unpacked; then
43890    depdir=$installdir
43891  fi
43892
43893      fi
43894      # Source the builddeps file again, because in the previous command, the depdir
43895      # was updated to point at the current build dependency install directory.
43896      . $builddepsfile
43897      # Now extract variables from the builddeps.conf files.
43898      theroot=${builddep_cups_ROOT}
43899      thecflags=${builddep_cups_CFLAGS}
43900      thelibs=${builddep_cups_LIBS}
43901      if test "x$depdir" = x; then
43902        as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
43903      fi
43904      CUPS=$depdir
43905      if test "x$theroot" != x; then
43906        CUPS="$theroot"
43907      fi
43908      if test "x$thecflags" != x; then
43909        CUPS_CFLAGS="$thecflags"
43910      fi
43911      if test "x$thelibs" != x; then
43912        CUPS_LIBS="$thelibs"
43913      fi
43914      CUPS_FOUND=yes
43915
43916    fi
43917
43918  fi
43919
43920    fi
43921    if test "x$CUPS_FOUND" = xno; then
43922      # Are the cups headers installed in the default /usr/include location?
43923      for ac_header in cups/cups.h cups/ppd.h
43924do :
43925  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
43926ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
43927if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
43928  cat >>confdefs.h <<_ACEOF
43929#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
43930_ACEOF
43931
43932            CUPS_FOUND=yes
43933            CUPS_CFLAGS=
43934            DEFAULT_CUPS=yes
43935
43936
43937fi
43938
43939done
43940
43941    fi
43942    if test "x$CUPS_FOUND" = xno; then
43943      # Getting nervous now? Lets poke around for standard Solaris third-party
43944      # package installation locations.
43945      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
43946$as_echo_n "checking for cups headers... " >&6; }
43947      if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
43948        # An SFW package seems to be installed!
43949        CUPS_FOUND=yes
43950        CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
43951      elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
43952        # A CSW package seems to be installed!
43953        CUPS_FOUND=yes
43954        CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
43955      fi
43956      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
43957$as_echo "$CUPS_FOUND" >&6; }
43958    fi
43959    if test "x$CUPS_FOUND" = xno; then
43960
43961  # Print a helpful message on how to acquire the necessary build dependency.
43962  # cups is the help tag: freetype, cups, pulse, alsa etc
43963  MISSING_DEPENDENCY=cups
43964
43965  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43966    cygwin_help $MISSING_DEPENDENCY
43967  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43968    msys_help $MISSING_DEPENDENCY
43969  else
43970    PKGHANDLER_COMMAND=
43971
43972    case $PKGHANDLER in
43973      apt-get)
43974        apt_help     $MISSING_DEPENDENCY ;;
43975      yum)
43976        yum_help     $MISSING_DEPENDENCY ;;
43977      port)
43978        port_help    $MISSING_DEPENDENCY ;;
43979      pkgutil)
43980        pkgutil_help $MISSING_DEPENDENCY ;;
43981      pkgadd)
43982        pkgadd_help  $MISSING_DEPENDENCY ;;
43983    esac
43984
43985    if test "x$PKGHANDLER_COMMAND" != x; then
43986      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43987    fi
43988  fi
43989
43990      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
43991    fi
43992  fi
43993
43994
43995
43996
43997
43998
43999  ###############################################################################
44000  #
44001  # The ubiquitous freetype library is used to render fonts.
44002  #
44003
44004# Check whether --with-freetype was given.
44005if test "${with_freetype+set}" = set; then :
44006  withval=$with_freetype;
44007fi
44008
44009
44010# Check whether --with-freetype-include was given.
44011if test "${with_freetype_include+set}" = set; then :
44012  withval=$with_freetype_include;
44013fi
44014
44015
44016# Check whether --with-freetype-lib was given.
44017if test "${with_freetype_lib+set}" = set; then :
44018  withval=$with_freetype_lib;
44019fi
44020
44021
44022# Check whether --with-freetype-src was given.
44023if test "${with_freetype_src+set}" = set; then :
44024  withval=$with_freetype_src;
44025fi
44026
44027  # Check whether --enable-freetype-bundling was given.
44028if test "${enable_freetype_bundling+set}" = set; then :
44029  enableval=$enable_freetype_bundling;
44030fi
44031
44032
44033  # Need to specify explicitly since it needs to be overridden on some versions of macosx
44034  FREETYPE_BASE_NAME=freetype
44035  FREETYPE_CFLAGS=
44036  FREETYPE_LIBS=
44037  FREETYPE_BUNDLE_LIB_PATH=
44038
44039  if test "x$FREETYPE_NOT_NEEDED" = xyes; then
44040    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
44041      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
44042$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
44043    fi
44044    if test "x$enable_freetype_bundling" != x; then
44045      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
44046$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
44047    fi
44048  else
44049    # freetype is needed to build; go get it!
44050
44051    BUNDLE_FREETYPE="$enable_freetype_bundling"
44052
44053    if  test "x$with_freetype_src" != x; then
44054      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44055        # Try to build freetype if --with-freetype-src was given on Windows
44056
44057  FREETYPE_SRC_PATH="$with_freetype_src"
44058  BUILD_FREETYPE=yes
44059
44060  # Check if the freetype sources are acessible..
44061  if ! test -d $FREETYPE_SRC_PATH; then
44062    { $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
44063$as_echo "$as_me: WARNING: --with-freetype-src specified, but can't find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
44064    BUILD_FREETYPE=no
44065  fi
44066  # ..and contain a vc2010 project file
44067  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
44068  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
44069    { $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
44070$as_echo "$as_me: WARNING: Can't find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
44071    BUILD_FREETYPE=no
44072  fi
44073  # Now check if configure found a version of 'msbuild.exe'
44074  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
44075    { $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
44076$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;}
44077    BUILD_FREETYPE=no
44078  fi
44079
44080  # Ready to go..
44081  if test "x$BUILD_FREETYPE" = xyes; then
44082
44083    # msbuild requires trailing slashes for output directories
44084    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
44085    freetype_lib_path_unix="$freetype_lib_path"
44086    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
44087
44088  unix_path="$vcxproj_path"
44089  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44090    windows_path=`$CYGPATH -m "$unix_path"`
44091    vcxproj_path="$windows_path"
44092  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44093    windows_path=`cmd //c echo $unix_path`
44094    vcxproj_path="$windows_path"
44095  fi
44096
44097
44098  unix_path="$freetype_lib_path"
44099  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44100    windows_path=`$CYGPATH -m "$unix_path"`
44101    freetype_lib_path="$windows_path"
44102  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44103    windows_path=`cmd //c echo $unix_path`
44104    freetype_lib_path="$windows_path"
44105  fi
44106
44107
44108  unix_path="$freetype_obj_path"
44109  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44110    windows_path=`$CYGPATH -m "$unix_path"`
44111    freetype_obj_path="$windows_path"
44112  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44113    windows_path=`cmd //c echo $unix_path`
44114    freetype_obj_path="$windows_path"
44115  fi
44116
44117    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
44118      freetype_platform=x64
44119    else
44120      freetype_platform=win32
44121    fi
44122
44123    # The original freetype project file is for VS 2010 (i.e. 'v100'),
44124    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
44125    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
44126    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
44127    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
44128$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
44129
44130    # First we try to build the freetype.dll
44131    $ECHO -e "@echo off\n"\
44132	     "$MSBUILD $vcxproj_path "\
44133		       "/p:PlatformToolset=$PLATFORM_TOOLSET "\
44134		       "/p:Configuration=\"Release Multithreaded\" "\
44135		       "/p:Platform=$freetype_platform "\
44136		       "/p:ConfigurationType=DynamicLibrary "\
44137		       "/p:TargetName=freetype "\
44138		       "/p:OutDir=\"$freetype_lib_path\" "\
44139		       "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
44140    cmd /c freetype.bat
44141
44142    if test -s "$freetype_lib_path_unix/freetype.dll"; then
44143      # If that succeeds we also build freetype.lib
44144      $ECHO -e "@echo off\n"\
44145	       "$MSBUILD $vcxproj_path "\
44146			 "/p:PlatformToolset=$PLATFORM_TOOLSET "\
44147			 "/p:Configuration=\"Release Multithreaded\" "\
44148			 "/p:Platform=$freetype_platform "\
44149			 "/p:ConfigurationType=StaticLibrary "\
44150			 "/p:TargetName=freetype "\
44151			 "/p:OutDir=\"$freetype_lib_path\" "\
44152			 "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
44153      cmd /c freetype.bat
44154
44155      if test -s "$freetype_lib_path_unix/freetype.lib"; then
44156	# Once we build both, lib and dll, set freetype lib and include path appropriately
44157	POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
44158	POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
44159	{ $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
44160$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
44161      else
44162	BUILD_FREETYPE=no
44163      fi
44164    else
44165      BUILD_FREETYPE=no
44166    fi
44167  fi
44168
44169        if test "x$BUILD_FREETYPE" = xyes; then
44170          # Okay, we built it. Check that it works.
44171
44172  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44173  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44174  METHOD="--with-freetype-src"
44175
44176  # Let's start with an optimistic view of the world :-)
44177  FOUND_FREETYPE=yes
44178
44179  # First look for the canonical freetype main include file ft2build.h.
44180  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44181    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
44182    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
44183    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44184      # Fail.
44185      FOUND_FREETYPE=no
44186    fi
44187  fi
44188
44189  if test "x$FOUND_FREETYPE" = xyes; then
44190    # Include file found, let's continue the sanity check.
44191    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44192$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44193
44194    # Reset to default value
44195    FREETYPE_BASE_NAME=freetype
44196    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44197    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44198      if test "x$OPENJDK_TARGET_OS" = xmacosx \
44199          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
44200        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
44201        # for the .6 version explicitly.
44202        FREETYPE_BASE_NAME=freetype.6
44203        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44204        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
44205$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
44206      else
44207        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44208$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44209        FOUND_FREETYPE=no
44210      fi
44211    else
44212      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44213        # On Windows, we will need both .lib and .dll file.
44214        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
44215          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
44216$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
44217          FOUND_FREETYPE=no
44218        fi
44219      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
44220          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
44221        # Found lib in isa dir, use that instead.
44222        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
44223        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
44224$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
44225      fi
44226    fi
44227  fi
44228
44229  if test "x$FOUND_FREETYPE" = xyes; then
44230
44231  # Only process if variable expands to non-empty
44232
44233  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
44234    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44235
44236  # Input might be given as Windows format, start by converting to
44237  # unix format.
44238  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44239  new_path=`$CYGPATH -u "$path"`
44240
44241  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44242  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44243  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44244  # "foo.exe" is OK but "foo" is an error.
44245  #
44246  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44247  # It is also a way to make sure we got the proper file name for the real test later on.
44248  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44249  if test "x$test_shortpath" = x; then
44250    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44251$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44252    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44253  fi
44254
44255  # Call helper function which possibly converts this using DOS-style short mode.
44256  # If so, the updated path is stored in $new_path.
44257
44258  input_path="$new_path"
44259  # Check if we need to convert this using DOS-style short mode. If the path
44260  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44261  # take no chances and rewrite it.
44262  # Note: m4 eats our [], so we need to use [ and ] instead.
44263  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44264  if test "x$has_forbidden_chars" != x; then
44265    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44266    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44267    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44268    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44269      # Going to short mode and back again did indeed matter. Since short mode is
44270      # case insensitive, let's make it lowercase to improve readability.
44271      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44272      # Now convert it back to Unix-style (cygpath)
44273      input_path=`$CYGPATH -u "$shortmode_path"`
44274      new_path="$input_path"
44275    fi
44276  fi
44277
44278  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44279  if test "x$test_cygdrive_prefix" = x; then
44280    # As a simple fix, exclude /usr/bin since it's not a real path.
44281    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44282      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44283      # a path prefixed by /cygdrive for fixpath to work.
44284      new_path="$CYGWIN_ROOT_PATH$input_path"
44285    fi
44286  fi
44287
44288
44289  if test "x$path" != "x$new_path"; then
44290    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44291    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44292$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44293  fi
44294
44295    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44296
44297  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44298  has_colon=`$ECHO $path | $GREP ^.:`
44299  new_path="$path"
44300  if test "x$has_colon" = x; then
44301    # Not in mixed or Windows style, start by that.
44302    new_path=`cmd //c echo $path`
44303  fi
44304
44305
44306  input_path="$new_path"
44307  # Check if we need to convert this using DOS-style short mode. If the path
44308  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44309  # take no chances and rewrite it.
44310  # Note: m4 eats our [], so we need to use [ and ] instead.
44311  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44312  if test "x$has_forbidden_chars" != x; then
44313    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44314    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44315  fi
44316
44317
44318  windows_path="$new_path"
44319  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44320    unix_path=`$CYGPATH -u "$windows_path"`
44321    new_path="$unix_path"
44322  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44323    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44324    new_path="$unix_path"
44325  fi
44326
44327  if test "x$path" != "x$new_path"; then
44328    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44329    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44330$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44331  fi
44332
44333  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44334  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44335
44336    else
44337      # We're on a unix platform. Hooray! :)
44338      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44339      has_space=`$ECHO "$path" | $GREP " "`
44340      if test "x$has_space" != x; then
44341        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44342$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44343        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44344      fi
44345
44346      # Use eval to expand a potential ~
44347      eval path="$path"
44348      if test ! -f "$path" && test ! -d "$path"; then
44349        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44350      fi
44351
44352      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44353    fi
44354  fi
44355
44356
44357  # Only process if variable expands to non-empty
44358
44359  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
44360    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44361
44362  # Input might be given as Windows format, start by converting to
44363  # unix format.
44364  path="$POTENTIAL_FREETYPE_LIB_PATH"
44365  new_path=`$CYGPATH -u "$path"`
44366
44367  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44368  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44369  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44370  # "foo.exe" is OK but "foo" is an error.
44371  #
44372  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44373  # It is also a way to make sure we got the proper file name for the real test later on.
44374  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44375  if test "x$test_shortpath" = x; then
44376    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44377$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44378    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44379  fi
44380
44381  # Call helper function which possibly converts this using DOS-style short mode.
44382  # If so, the updated path is stored in $new_path.
44383
44384  input_path="$new_path"
44385  # Check if we need to convert this using DOS-style short mode. If the path
44386  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44387  # take no chances and rewrite it.
44388  # Note: m4 eats our [], so we need to use [ and ] instead.
44389  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44390  if test "x$has_forbidden_chars" != x; then
44391    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44392    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44393    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44394    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44395      # Going to short mode and back again did indeed matter. Since short mode is
44396      # case insensitive, let's make it lowercase to improve readability.
44397      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44398      # Now convert it back to Unix-style (cygpath)
44399      input_path=`$CYGPATH -u "$shortmode_path"`
44400      new_path="$input_path"
44401    fi
44402  fi
44403
44404  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44405  if test "x$test_cygdrive_prefix" = x; then
44406    # As a simple fix, exclude /usr/bin since it's not a real path.
44407    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44408      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44409      # a path prefixed by /cygdrive for fixpath to work.
44410      new_path="$CYGWIN_ROOT_PATH$input_path"
44411    fi
44412  fi
44413
44414
44415  if test "x$path" != "x$new_path"; then
44416    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44417    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44418$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44419  fi
44420
44421    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44422
44423  path="$POTENTIAL_FREETYPE_LIB_PATH"
44424  has_colon=`$ECHO $path | $GREP ^.:`
44425  new_path="$path"
44426  if test "x$has_colon" = x; then
44427    # Not in mixed or Windows style, start by that.
44428    new_path=`cmd //c echo $path`
44429  fi
44430
44431
44432  input_path="$new_path"
44433  # Check if we need to convert this using DOS-style short mode. If the path
44434  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44435  # take no chances and rewrite it.
44436  # Note: m4 eats our [], so we need to use [ and ] instead.
44437  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44438  if test "x$has_forbidden_chars" != x; then
44439    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44440    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44441  fi
44442
44443
44444  windows_path="$new_path"
44445  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44446    unix_path=`$CYGPATH -u "$windows_path"`
44447    new_path="$unix_path"
44448  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44449    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44450    new_path="$unix_path"
44451  fi
44452
44453  if test "x$path" != "x$new_path"; then
44454    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44455    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44456$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44457  fi
44458
44459  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44460  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44461
44462    else
44463      # We're on a unix platform. Hooray! :)
44464      path="$POTENTIAL_FREETYPE_LIB_PATH"
44465      has_space=`$ECHO "$path" | $GREP " "`
44466      if test "x$has_space" != x; then
44467        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44468$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44469        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44470      fi
44471
44472      # Use eval to expand a potential ~
44473      eval path="$path"
44474      if test ! -f "$path" && test ! -d "$path"; then
44475        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44476      fi
44477
44478      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44479    fi
44480  fi
44481
44482
44483    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44484    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44485$as_echo_n "checking for freetype includes... " >&6; }
44486    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44487$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44488    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44489    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44490$as_echo_n "checking for freetype libraries... " >&6; }
44491    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44492$as_echo "$FREETYPE_LIB_PATH" >&6; }
44493  fi
44494
44495          if test "x$FOUND_FREETYPE" != xyes; then
44496            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
44497          fi
44498        else
44499          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
44500$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
44501          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
44502        fi
44503      else
44504        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
44505$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
44506      fi
44507    fi
44508
44509    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
44510      # User has specified settings
44511
44512      if test "x$BUNDLE_FREETYPE" = x; then
44513        # If not specified, default is to bundle freetype
44514        BUNDLE_FREETYPE=yes
44515      fi
44516
44517      if test "x$with_freetype" != x; then
44518        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
44519        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
44520      fi
44521
44522      # Allow --with-freetype-lib and --with-freetype-include to override
44523      if test "x$with_freetype_include" != x; then
44524        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
44525      fi
44526      if test "x$with_freetype_lib" != x; then
44527        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
44528      fi
44529
44530      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
44531        # Okay, we got it. Check that it works.
44532
44533  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44534  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44535  METHOD="--with-freetype"
44536
44537  # Let's start with an optimistic view of the world :-)
44538  FOUND_FREETYPE=yes
44539
44540  # First look for the canonical freetype main include file ft2build.h.
44541  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44542    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
44543    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
44544    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44545      # Fail.
44546      FOUND_FREETYPE=no
44547    fi
44548  fi
44549
44550  if test "x$FOUND_FREETYPE" = xyes; then
44551    # Include file found, let's continue the sanity check.
44552    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44553$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44554
44555    # Reset to default value
44556    FREETYPE_BASE_NAME=freetype
44557    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44558    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44559      if test "x$OPENJDK_TARGET_OS" = xmacosx \
44560          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
44561        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
44562        # for the .6 version explicitly.
44563        FREETYPE_BASE_NAME=freetype.6
44564        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44565        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
44566$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
44567      else
44568        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44569$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44570        FOUND_FREETYPE=no
44571      fi
44572    else
44573      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44574        # On Windows, we will need both .lib and .dll file.
44575        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
44576          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
44577$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
44578          FOUND_FREETYPE=no
44579        fi
44580      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
44581          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
44582        # Found lib in isa dir, use that instead.
44583        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
44584        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
44585$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
44586      fi
44587    fi
44588  fi
44589
44590  if test "x$FOUND_FREETYPE" = xyes; then
44591
44592  # Only process if variable expands to non-empty
44593
44594  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
44595    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44596
44597  # Input might be given as Windows format, start by converting to
44598  # unix format.
44599  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44600  new_path=`$CYGPATH -u "$path"`
44601
44602  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44603  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44604  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44605  # "foo.exe" is OK but "foo" is an error.
44606  #
44607  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44608  # It is also a way to make sure we got the proper file name for the real test later on.
44609  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44610  if test "x$test_shortpath" = x; then
44611    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44612$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44613    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44614  fi
44615
44616  # Call helper function which possibly converts this using DOS-style short mode.
44617  # If so, the updated path is stored in $new_path.
44618
44619  input_path="$new_path"
44620  # Check if we need to convert this using DOS-style short mode. If the path
44621  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44622  # take no chances and rewrite it.
44623  # Note: m4 eats our [], so we need to use [ and ] instead.
44624  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44625  if test "x$has_forbidden_chars" != x; then
44626    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44627    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44628    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44629    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44630      # Going to short mode and back again did indeed matter. Since short mode is
44631      # case insensitive, let's make it lowercase to improve readability.
44632      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44633      # Now convert it back to Unix-style (cygpath)
44634      input_path=`$CYGPATH -u "$shortmode_path"`
44635      new_path="$input_path"
44636    fi
44637  fi
44638
44639  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44640  if test "x$test_cygdrive_prefix" = x; then
44641    # As a simple fix, exclude /usr/bin since it's not a real path.
44642    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44643      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44644      # a path prefixed by /cygdrive for fixpath to work.
44645      new_path="$CYGWIN_ROOT_PATH$input_path"
44646    fi
44647  fi
44648
44649
44650  if test "x$path" != "x$new_path"; then
44651    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44652    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44653$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44654  fi
44655
44656    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44657
44658  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44659  has_colon=`$ECHO $path | $GREP ^.:`
44660  new_path="$path"
44661  if test "x$has_colon" = x; then
44662    # Not in mixed or Windows style, start by that.
44663    new_path=`cmd //c echo $path`
44664  fi
44665
44666
44667  input_path="$new_path"
44668  # Check if we need to convert this using DOS-style short mode. If the path
44669  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44670  # take no chances and rewrite it.
44671  # Note: m4 eats our [], so we need to use [ and ] instead.
44672  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44673  if test "x$has_forbidden_chars" != x; then
44674    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44675    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44676  fi
44677
44678
44679  windows_path="$new_path"
44680  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44681    unix_path=`$CYGPATH -u "$windows_path"`
44682    new_path="$unix_path"
44683  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44684    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44685    new_path="$unix_path"
44686  fi
44687
44688  if test "x$path" != "x$new_path"; then
44689    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44690    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44691$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44692  fi
44693
44694  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44695  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44696
44697    else
44698      # We're on a unix platform. Hooray! :)
44699      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44700      has_space=`$ECHO "$path" | $GREP " "`
44701      if test "x$has_space" != x; then
44702        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44703$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44704        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44705      fi
44706
44707      # Use eval to expand a potential ~
44708      eval path="$path"
44709      if test ! -f "$path" && test ! -d "$path"; then
44710        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44711      fi
44712
44713      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44714    fi
44715  fi
44716
44717
44718  # Only process if variable expands to non-empty
44719
44720  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
44721    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44722
44723  # Input might be given as Windows format, start by converting to
44724  # unix format.
44725  path="$POTENTIAL_FREETYPE_LIB_PATH"
44726  new_path=`$CYGPATH -u "$path"`
44727
44728  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44729  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44730  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44731  # "foo.exe" is OK but "foo" is an error.
44732  #
44733  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44734  # It is also a way to make sure we got the proper file name for the real test later on.
44735  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44736  if test "x$test_shortpath" = x; then
44737    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44738$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44739    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44740  fi
44741
44742  # Call helper function which possibly converts this using DOS-style short mode.
44743  # If so, the updated path is stored in $new_path.
44744
44745  input_path="$new_path"
44746  # Check if we need to convert this using DOS-style short mode. If the path
44747  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44748  # take no chances and rewrite it.
44749  # Note: m4 eats our [], so we need to use [ and ] instead.
44750  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44751  if test "x$has_forbidden_chars" != x; then
44752    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44753    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44754    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44755    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44756      # Going to short mode and back again did indeed matter. Since short mode is
44757      # case insensitive, let's make it lowercase to improve readability.
44758      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44759      # Now convert it back to Unix-style (cygpath)
44760      input_path=`$CYGPATH -u "$shortmode_path"`
44761      new_path="$input_path"
44762    fi
44763  fi
44764
44765  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44766  if test "x$test_cygdrive_prefix" = x; then
44767    # As a simple fix, exclude /usr/bin since it's not a real path.
44768    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44769      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44770      # a path prefixed by /cygdrive for fixpath to work.
44771      new_path="$CYGWIN_ROOT_PATH$input_path"
44772    fi
44773  fi
44774
44775
44776  if test "x$path" != "x$new_path"; then
44777    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44778    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44779$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44780  fi
44781
44782    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44783
44784  path="$POTENTIAL_FREETYPE_LIB_PATH"
44785  has_colon=`$ECHO $path | $GREP ^.:`
44786  new_path="$path"
44787  if test "x$has_colon" = x; then
44788    # Not in mixed or Windows style, start by that.
44789    new_path=`cmd //c echo $path`
44790  fi
44791
44792
44793  input_path="$new_path"
44794  # Check if we need to convert this using DOS-style short mode. If the path
44795  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44796  # take no chances and rewrite it.
44797  # Note: m4 eats our [], so we need to use [ and ] instead.
44798  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44799  if test "x$has_forbidden_chars" != x; then
44800    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44801    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44802  fi
44803
44804
44805  windows_path="$new_path"
44806  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44807    unix_path=`$CYGPATH -u "$windows_path"`
44808    new_path="$unix_path"
44809  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44810    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44811    new_path="$unix_path"
44812  fi
44813
44814  if test "x$path" != "x$new_path"; then
44815    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44816    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44817$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44818  fi
44819
44820  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44821  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44822
44823    else
44824      # We're on a unix platform. Hooray! :)
44825      path="$POTENTIAL_FREETYPE_LIB_PATH"
44826      has_space=`$ECHO "$path" | $GREP " "`
44827      if test "x$has_space" != x; then
44828        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44829$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44830        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44831      fi
44832
44833      # Use eval to expand a potential ~
44834      eval path="$path"
44835      if test ! -f "$path" && test ! -d "$path"; then
44836        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44837      fi
44838
44839      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44840    fi
44841  fi
44842
44843
44844    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44845    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44846$as_echo_n "checking for freetype includes... " >&6; }
44847    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44848$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44849    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44850    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44851$as_echo_n "checking for freetype libraries... " >&6; }
44852    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44853$as_echo "$FREETYPE_LIB_PATH" >&6; }
44854  fi
44855
44856        if test "x$FOUND_FREETYPE" != xyes; then
44857          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
44858        fi
44859      else
44860        # User specified only one of lib or include. This is an error.
44861        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
44862          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
44863$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
44864          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
44865        else
44866          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
44867$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
44868          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
44869        fi
44870      fi
44871    else
44872      # User did not specify settings, but we need freetype. Try to locate it.
44873
44874      if test "x$BUNDLE_FREETYPE" = x; then
44875        # If not specified, default is to bundle freetype only on windows
44876        if test "x$OPENJDK_TARGET_OS" = xwindows; then
44877          BUNDLE_FREETYPE=yes
44878        else
44879          BUNDLE_FREETYPE=no
44880        fi
44881      fi
44882
44883      if test "x$FOUND_FREETYPE" != xyes; then
44884        # Check builddeps
44885
44886
44887  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
44888    # Source the builddeps file again, to make sure it uses the latest variables!
44889    . $builddepsfile
44890    # Look for a target and build machine specific resource!
44891    eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
44892    if test "x$resource" = x; then
44893      # Ok, lets instead look for a target specific resource
44894      eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
44895    fi
44896    if test "x$resource" = x; then
44897      # Ok, lets instead look for a build specific resource
44898      eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
44899    fi
44900    if test "x$resource" = x; then
44901      # Ok, lets instead look for a generic resource
44902      # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
44903      resource=${builddep_freetype2}
44904    fi
44905    if test "x$resource" != x; then
44906      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
44907$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
44908      # If the resource in the builddeps.conf file is an existing directory,
44909      # for example /java/linux/cups
44910      if test -d ${resource}; then
44911        depdir=${resource}
44912      else
44913
44914  # freetype2 is for example mymodule
44915  # $resource is for example libs/general/libmymod_1_2_3.zip
44916  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
44917  # $with_builddeps_dir is for example /localhome/builddeps
44918  # depdir is the name of the variable into which we store the depdir, eg MYMOD
44919  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
44920  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
44921  filename=`basename $resource`
44922  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
44923  filebase=${filename%%.*}
44924  extension=${filename#*.}
44925  installdir=$with_builddeps_dir/$filebase
44926  if test ! -f $installdir/$filename.unpacked; then
44927    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
44928$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
44929    if test ! -d $installdir; then
44930      mkdir -p $installdir
44931    fi
44932    if test ! -d $installdir; then
44933      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
44934    fi
44935    tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
44936    touch $tmpfile
44937    if test ! -f $tmpfile; then
44938      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
44939    fi
44940
44941  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
44942  # $tmpfile is the local file name for the downloaded file.
44943  VALID_TOOL=no
44944  if test "x$BDEPS_FTP" = xwget; then
44945    VALID_TOOL=yes
44946    wget -O $tmpfile $with_builddeps_server/$resource
44947  fi
44948  if test "x$BDEPS_FTP" = xlftp; then
44949    VALID_TOOL=yes
44950    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
44951  fi
44952  if test "x$BDEPS_FTP" = xftp; then
44953    VALID_TOOL=yes
44954    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
44955    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
44956    FTPUSERPWD=${FTPSERVER%%@*}
44957    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
44958      FTPUSER=${userpwd%%:*}
44959      FTPPWD=${userpwd#*@}
44960      FTPSERVER=${FTPSERVER#*@}
44961    else
44962      FTPUSER=ftp
44963      FTPPWD=ftp
44964    fi
44965    # the "pass" command does not work on some
44966    # ftp clients (read ftp.exe) but if it works,
44967    # passive mode is better!
44968    ( \
44969        echo "user $FTPUSER $FTPPWD"        ; \
44970        echo "pass"                         ; \
44971        echo "bin"                          ; \
44972        echo "get $FTPPATH $tmpfile"              ; \
44973    ) | ftp -in $FTPSERVER
44974  fi
44975  if test "x$VALID_TOOL" != xyes; then
44976    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
44977  fi
44978
44979    mv $tmpfile $installdir/$filename
44980    if test ! -s $installdir/$filename; then
44981      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
44982    fi
44983    case "$extension" in
44984      zip)  echo "Unzipping $installdir/$filename..."
44985        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
44986        ;;
44987      tar.gz) echo "Untaring $installdir/$filename..."
44988        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44989        ;;
44990      tgz) echo "Untaring $installdir/$filename..."
44991        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44992        ;;
44993      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
44994        ;;
44995    esac
44996  fi
44997  if test -f $installdir/$filename.unpacked; then
44998    depdir=$installdir
44999  fi
45000
45001      fi
45002      # Source the builddeps file again, because in the previous command, the depdir
45003      # was updated to point at the current build dependency install directory.
45004      . $builddepsfile
45005      # Now extract variables from the builddeps.conf files.
45006      theroot=${builddep_freetype2_ROOT}
45007      thecflags=${builddep_freetype2_CFLAGS}
45008      thelibs=${builddep_freetype2_LIBS}
45009      if test "x$depdir" = x; then
45010        as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
45011      fi
45012      FREETYPE=$depdir
45013      if test "x$theroot" != x; then
45014        FREETYPE="$theroot"
45015      fi
45016      if test "x$thecflags" != x; then
45017        FREETYPE_CFLAGS="$thecflags"
45018      fi
45019      if test "x$thelibs" != x; then
45020        FREETYPE_LIBS="$thelibs"
45021      fi
45022      FOUND_FREETYPE=yes
45023      else FOUND_FREETYPE=no
45024
45025    fi
45026    else FOUND_FREETYPE=no
45027
45028  fi
45029
45030        # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
45031        if test "x$FOUND_FREETYPE" = xyes; then
45032          if test "x$BUNDLE_FREETYPE" = xyes; then
45033            { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
45034$as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
45035            FOUND_FREETYPE=no
45036          else
45037            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
45038$as_echo_n "checking for freetype... " >&6; }
45039            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
45040$as_echo "yes (using builddeps)" >&6; }
45041          fi
45042        fi
45043      fi
45044
45045      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
45046      if test "x$SYSROOT" = x; then
45047        if test "x$FOUND_FREETYPE" != xyes; then
45048          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
45049          if test "x$PKG_CONFIG" != x; then
45050
45051pkg_failed=no
45052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
45053$as_echo_n "checking for FREETYPE... " >&6; }
45054
45055if test -n "$FREETYPE_CFLAGS"; then
45056    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
45057 elif test -n "$PKG_CONFIG"; then
45058    if test -n "$PKG_CONFIG" && \
45059    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
45060  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
45061  ac_status=$?
45062  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45063  test $ac_status = 0; }; then
45064  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
45065else
45066  pkg_failed=yes
45067fi
45068 else
45069    pkg_failed=untried
45070fi
45071if test -n "$FREETYPE_LIBS"; then
45072    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
45073 elif test -n "$PKG_CONFIG"; then
45074    if test -n "$PKG_CONFIG" && \
45075    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
45076  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
45077  ac_status=$?
45078  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45079  test $ac_status = 0; }; then
45080  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
45081else
45082  pkg_failed=yes
45083fi
45084 else
45085    pkg_failed=untried
45086fi
45087
45088
45089
45090if test $pkg_failed = yes; then
45091
45092if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
45093        _pkg_short_errors_supported=yes
45094else
45095        _pkg_short_errors_supported=no
45096fi
45097        if test $_pkg_short_errors_supported = yes; then
45098	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
45099        else
45100	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
45101        fi
45102	# Put the nasty error message in config.log where it belongs
45103	echo "$FREETYPE_PKG_ERRORS" >&5
45104
45105	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45106$as_echo "no" >&6; }
45107                FOUND_FREETYPE=no
45108elif test $pkg_failed = untried; then
45109	FOUND_FREETYPE=no
45110else
45111	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
45112	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
45113        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45114$as_echo "yes" >&6; }
45115	FOUND_FREETYPE=yes
45116fi
45117            if test "x$FOUND_FREETYPE" = xyes; then
45118              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
45119              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
45120              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
45121              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
45122                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
45123              fi
45124              # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
45125              if test "x$BUNDLE_FREETYPE" = xyes; then
45126                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
45127$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
45128                FOUND_FREETYPE=no
45129              else
45130                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
45131$as_echo_n "checking for freetype... " >&6; }
45132                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
45133$as_echo "yes (using pkg-config)" >&6; }
45134              fi
45135            fi
45136          fi
45137        fi
45138      fi
45139
45140      if test "x$FOUND_FREETYPE" != xyes; then
45141        # Check in well-known locations
45142        if test "x$OPENJDK_TARGET_OS" = xwindows; then
45143          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
45144
45145  windows_path="$FREETYPE_BASE_DIR"
45146  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45147    unix_path=`$CYGPATH -u "$windows_path"`
45148    FREETYPE_BASE_DIR="$unix_path"
45149  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45150    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45151    FREETYPE_BASE_DIR="$unix_path"
45152  fi
45153
45154
45155  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45156  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45157  METHOD="well-known location"
45158
45159  # Let's start with an optimistic view of the world :-)
45160  FOUND_FREETYPE=yes
45161
45162  # First look for the canonical freetype main include file ft2build.h.
45163  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45164    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45165    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45166    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45167      # Fail.
45168      FOUND_FREETYPE=no
45169    fi
45170  fi
45171
45172  if test "x$FOUND_FREETYPE" = xyes; then
45173    # Include file found, let's continue the sanity check.
45174    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45175$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45176
45177    # Reset to default value
45178    FREETYPE_BASE_NAME=freetype
45179    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45180    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45181      if test "x$OPENJDK_TARGET_OS" = xmacosx \
45182          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45183        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45184        # for the .6 version explicitly.
45185        FREETYPE_BASE_NAME=freetype.6
45186        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45187        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45188$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45189      else
45190        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45191$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45192        FOUND_FREETYPE=no
45193      fi
45194    else
45195      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45196        # On Windows, we will need both .lib and .dll file.
45197        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45198          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45199$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45200          FOUND_FREETYPE=no
45201        fi
45202      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45203          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45204        # Found lib in isa dir, use that instead.
45205        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45206        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45207$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45208      fi
45209    fi
45210  fi
45211
45212  if test "x$FOUND_FREETYPE" = xyes; then
45213
45214  # Only process if variable expands to non-empty
45215
45216  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
45217    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45218
45219  # Input might be given as Windows format, start by converting to
45220  # unix format.
45221  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45222  new_path=`$CYGPATH -u "$path"`
45223
45224  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45225  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45226  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45227  # "foo.exe" is OK but "foo" is an error.
45228  #
45229  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45230  # It is also a way to make sure we got the proper file name for the real test later on.
45231  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45232  if test "x$test_shortpath" = x; then
45233    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45234$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45235    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45236  fi
45237
45238  # Call helper function which possibly converts this using DOS-style short mode.
45239  # If so, the updated path is stored in $new_path.
45240
45241  input_path="$new_path"
45242  # Check if we need to convert this using DOS-style short mode. If the path
45243  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45244  # take no chances and rewrite it.
45245  # Note: m4 eats our [], so we need to use [ and ] instead.
45246  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45247  if test "x$has_forbidden_chars" != x; then
45248    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45249    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45250    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45251    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45252      # Going to short mode and back again did indeed matter. Since short mode is
45253      # case insensitive, let's make it lowercase to improve readability.
45254      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45255      # Now convert it back to Unix-style (cygpath)
45256      input_path=`$CYGPATH -u "$shortmode_path"`
45257      new_path="$input_path"
45258    fi
45259  fi
45260
45261  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45262  if test "x$test_cygdrive_prefix" = x; then
45263    # As a simple fix, exclude /usr/bin since it's not a real path.
45264    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45265      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45266      # a path prefixed by /cygdrive for fixpath to work.
45267      new_path="$CYGWIN_ROOT_PATH$input_path"
45268    fi
45269  fi
45270
45271
45272  if test "x$path" != "x$new_path"; then
45273    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45274    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45275$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45276  fi
45277
45278    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45279
45280  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45281  has_colon=`$ECHO $path | $GREP ^.:`
45282  new_path="$path"
45283  if test "x$has_colon" = x; then
45284    # Not in mixed or Windows style, start by that.
45285    new_path=`cmd //c echo $path`
45286  fi
45287
45288
45289  input_path="$new_path"
45290  # Check if we need to convert this using DOS-style short mode. If the path
45291  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45292  # take no chances and rewrite it.
45293  # Note: m4 eats our [], so we need to use [ and ] instead.
45294  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45295  if test "x$has_forbidden_chars" != x; then
45296    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45297    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45298  fi
45299
45300
45301  windows_path="$new_path"
45302  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45303    unix_path=`$CYGPATH -u "$windows_path"`
45304    new_path="$unix_path"
45305  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45306    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45307    new_path="$unix_path"
45308  fi
45309
45310  if test "x$path" != "x$new_path"; then
45311    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45312    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45313$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45314  fi
45315
45316  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45317  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45318
45319    else
45320      # We're on a unix platform. Hooray! :)
45321      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45322      has_space=`$ECHO "$path" | $GREP " "`
45323      if test "x$has_space" != x; then
45324        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45325$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45326        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45327      fi
45328
45329      # Use eval to expand a potential ~
45330      eval path="$path"
45331      if test ! -f "$path" && test ! -d "$path"; then
45332        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45333      fi
45334
45335      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45336    fi
45337  fi
45338
45339
45340  # Only process if variable expands to non-empty
45341
45342  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
45343    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45344
45345  # Input might be given as Windows format, start by converting to
45346  # unix format.
45347  path="$POTENTIAL_FREETYPE_LIB_PATH"
45348  new_path=`$CYGPATH -u "$path"`
45349
45350  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45351  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45352  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45353  # "foo.exe" is OK but "foo" is an error.
45354  #
45355  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45356  # It is also a way to make sure we got the proper file name for the real test later on.
45357  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45358  if test "x$test_shortpath" = x; then
45359    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45360$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45361    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45362  fi
45363
45364  # Call helper function which possibly converts this using DOS-style short mode.
45365  # If so, the updated path is stored in $new_path.
45366
45367  input_path="$new_path"
45368  # Check if we need to convert this using DOS-style short mode. If the path
45369  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45370  # take no chances and rewrite it.
45371  # Note: m4 eats our [], so we need to use [ and ] instead.
45372  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45373  if test "x$has_forbidden_chars" != x; then
45374    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45375    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45376    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45377    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45378      # Going to short mode and back again did indeed matter. Since short mode is
45379      # case insensitive, let's make it lowercase to improve readability.
45380      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45381      # Now convert it back to Unix-style (cygpath)
45382      input_path=`$CYGPATH -u "$shortmode_path"`
45383      new_path="$input_path"
45384    fi
45385  fi
45386
45387  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45388  if test "x$test_cygdrive_prefix" = x; then
45389    # As a simple fix, exclude /usr/bin since it's not a real path.
45390    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45391      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45392      # a path prefixed by /cygdrive for fixpath to work.
45393      new_path="$CYGWIN_ROOT_PATH$input_path"
45394    fi
45395  fi
45396
45397
45398  if test "x$path" != "x$new_path"; then
45399    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45400    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45401$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45402  fi
45403
45404    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45405
45406  path="$POTENTIAL_FREETYPE_LIB_PATH"
45407  has_colon=`$ECHO $path | $GREP ^.:`
45408  new_path="$path"
45409  if test "x$has_colon" = x; then
45410    # Not in mixed or Windows style, start by that.
45411    new_path=`cmd //c echo $path`
45412  fi
45413
45414
45415  input_path="$new_path"
45416  # Check if we need to convert this using DOS-style short mode. If the path
45417  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45418  # take no chances and rewrite it.
45419  # Note: m4 eats our [], so we need to use [ and ] instead.
45420  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45421  if test "x$has_forbidden_chars" != x; then
45422    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45423    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45424  fi
45425
45426
45427  windows_path="$new_path"
45428  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45429    unix_path=`$CYGPATH -u "$windows_path"`
45430    new_path="$unix_path"
45431  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45432    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45433    new_path="$unix_path"
45434  fi
45435
45436  if test "x$path" != "x$new_path"; then
45437    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45438    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45439$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45440  fi
45441
45442  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45443  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45444
45445    else
45446      # We're on a unix platform. Hooray! :)
45447      path="$POTENTIAL_FREETYPE_LIB_PATH"
45448      has_space=`$ECHO "$path" | $GREP " "`
45449      if test "x$has_space" != x; then
45450        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45451$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45452        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45453      fi
45454
45455      # Use eval to expand a potential ~
45456      eval path="$path"
45457      if test ! -f "$path" && test ! -d "$path"; then
45458        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45459      fi
45460
45461      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45462    fi
45463  fi
45464
45465
45466    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45467    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45468$as_echo_n "checking for freetype includes... " >&6; }
45469    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45470$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45471    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45472    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45473$as_echo_n "checking for freetype libraries... " >&6; }
45474    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45475$as_echo "$FREETYPE_LIB_PATH" >&6; }
45476  fi
45477
45478          if test "x$FOUND_FREETYPE" != xyes; then
45479            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
45480
45481  windows_path="$FREETYPE_BASE_DIR"
45482  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45483    unix_path=`$CYGPATH -u "$windows_path"`
45484    FREETYPE_BASE_DIR="$unix_path"
45485  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45486    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45487    FREETYPE_BASE_DIR="$unix_path"
45488  fi
45489
45490
45491  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45492  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45493  METHOD="well-known location"
45494
45495  # Let's start with an optimistic view of the world :-)
45496  FOUND_FREETYPE=yes
45497
45498  # First look for the canonical freetype main include file ft2build.h.
45499  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45500    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45501    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45502    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45503      # Fail.
45504      FOUND_FREETYPE=no
45505    fi
45506  fi
45507
45508  if test "x$FOUND_FREETYPE" = xyes; then
45509    # Include file found, let's continue the sanity check.
45510    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45511$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45512
45513    # Reset to default value
45514    FREETYPE_BASE_NAME=freetype
45515    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45516    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45517      if test "x$OPENJDK_TARGET_OS" = xmacosx \
45518          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45519        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45520        # for the .6 version explicitly.
45521        FREETYPE_BASE_NAME=freetype.6
45522        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45523        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45524$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45525      else
45526        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45527$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45528        FOUND_FREETYPE=no
45529      fi
45530    else
45531      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45532        # On Windows, we will need both .lib and .dll file.
45533        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45534          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45535$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45536          FOUND_FREETYPE=no
45537        fi
45538      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45539          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45540        # Found lib in isa dir, use that instead.
45541        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45542        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45543$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45544      fi
45545    fi
45546  fi
45547
45548  if test "x$FOUND_FREETYPE" = xyes; then
45549
45550  # Only process if variable expands to non-empty
45551
45552  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
45553    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45554
45555  # Input might be given as Windows format, start by converting to
45556  # unix format.
45557  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45558  new_path=`$CYGPATH -u "$path"`
45559
45560  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45561  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45562  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45563  # "foo.exe" is OK but "foo" is an error.
45564  #
45565  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45566  # It is also a way to make sure we got the proper file name for the real test later on.
45567  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45568  if test "x$test_shortpath" = x; then
45569    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45570$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45571    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45572  fi
45573
45574  # Call helper function which possibly converts this using DOS-style short mode.
45575  # If so, the updated path is stored in $new_path.
45576
45577  input_path="$new_path"
45578  # Check if we need to convert this using DOS-style short mode. If the path
45579  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45580  # take no chances and rewrite it.
45581  # Note: m4 eats our [], so we need to use [ and ] instead.
45582  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45583  if test "x$has_forbidden_chars" != x; then
45584    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45585    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45586    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45587    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45588      # Going to short mode and back again did indeed matter. Since short mode is
45589      # case insensitive, let's make it lowercase to improve readability.
45590      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45591      # Now convert it back to Unix-style (cygpath)
45592      input_path=`$CYGPATH -u "$shortmode_path"`
45593      new_path="$input_path"
45594    fi
45595  fi
45596
45597  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45598  if test "x$test_cygdrive_prefix" = x; then
45599    # As a simple fix, exclude /usr/bin since it's not a real path.
45600    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45601      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45602      # a path prefixed by /cygdrive for fixpath to work.
45603      new_path="$CYGWIN_ROOT_PATH$input_path"
45604    fi
45605  fi
45606
45607
45608  if test "x$path" != "x$new_path"; then
45609    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45610    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45611$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45612  fi
45613
45614    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45615
45616  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45617  has_colon=`$ECHO $path | $GREP ^.:`
45618  new_path="$path"
45619  if test "x$has_colon" = x; then
45620    # Not in mixed or Windows style, start by that.
45621    new_path=`cmd //c echo $path`
45622  fi
45623
45624
45625  input_path="$new_path"
45626  # Check if we need to convert this using DOS-style short mode. If the path
45627  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45628  # take no chances and rewrite it.
45629  # Note: m4 eats our [], so we need to use [ and ] instead.
45630  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45631  if test "x$has_forbidden_chars" != x; then
45632    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45633    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45634  fi
45635
45636
45637  windows_path="$new_path"
45638  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45639    unix_path=`$CYGPATH -u "$windows_path"`
45640    new_path="$unix_path"
45641  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45642    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45643    new_path="$unix_path"
45644  fi
45645
45646  if test "x$path" != "x$new_path"; then
45647    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45648    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45649$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45650  fi
45651
45652  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45653  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45654
45655    else
45656      # We're on a unix platform. Hooray! :)
45657      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45658      has_space=`$ECHO "$path" | $GREP " "`
45659      if test "x$has_space" != x; then
45660        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45661$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45662        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45663      fi
45664
45665      # Use eval to expand a potential ~
45666      eval path="$path"
45667      if test ! -f "$path" && test ! -d "$path"; then
45668        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45669      fi
45670
45671      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45672    fi
45673  fi
45674
45675
45676  # Only process if variable expands to non-empty
45677
45678  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
45679    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45680
45681  # Input might be given as Windows format, start by converting to
45682  # unix format.
45683  path="$POTENTIAL_FREETYPE_LIB_PATH"
45684  new_path=`$CYGPATH -u "$path"`
45685
45686  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45687  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45688  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45689  # "foo.exe" is OK but "foo" is an error.
45690  #
45691  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45692  # It is also a way to make sure we got the proper file name for the real test later on.
45693  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45694  if test "x$test_shortpath" = x; then
45695    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45696$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45697    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45698  fi
45699
45700  # Call helper function which possibly converts this using DOS-style short mode.
45701  # If so, the updated path is stored in $new_path.
45702
45703  input_path="$new_path"
45704  # Check if we need to convert this using DOS-style short mode. If the path
45705  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45706  # take no chances and rewrite it.
45707  # Note: m4 eats our [], so we need to use [ and ] instead.
45708  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45709  if test "x$has_forbidden_chars" != x; then
45710    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45711    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45712    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45713    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45714      # Going to short mode and back again did indeed matter. Since short mode is
45715      # case insensitive, let's make it lowercase to improve readability.
45716      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45717      # Now convert it back to Unix-style (cygpath)
45718      input_path=`$CYGPATH -u "$shortmode_path"`
45719      new_path="$input_path"
45720    fi
45721  fi
45722
45723  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45724  if test "x$test_cygdrive_prefix" = x; then
45725    # As a simple fix, exclude /usr/bin since it's not a real path.
45726    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45727      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45728      # a path prefixed by /cygdrive for fixpath to work.
45729      new_path="$CYGWIN_ROOT_PATH$input_path"
45730    fi
45731  fi
45732
45733
45734  if test "x$path" != "x$new_path"; then
45735    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45736    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45737$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45738  fi
45739
45740    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45741
45742  path="$POTENTIAL_FREETYPE_LIB_PATH"
45743  has_colon=`$ECHO $path | $GREP ^.:`
45744  new_path="$path"
45745  if test "x$has_colon" = x; then
45746    # Not in mixed or Windows style, start by that.
45747    new_path=`cmd //c echo $path`
45748  fi
45749
45750
45751  input_path="$new_path"
45752  # Check if we need to convert this using DOS-style short mode. If the path
45753  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45754  # take no chances and rewrite it.
45755  # Note: m4 eats our [], so we need to use [ and ] instead.
45756  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45757  if test "x$has_forbidden_chars" != x; then
45758    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45759    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45760  fi
45761
45762
45763  windows_path="$new_path"
45764  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45765    unix_path=`$CYGPATH -u "$windows_path"`
45766    new_path="$unix_path"
45767  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45768    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45769    new_path="$unix_path"
45770  fi
45771
45772  if test "x$path" != "x$new_path"; then
45773    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45774    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45775$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45776  fi
45777
45778  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45779  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45780
45781    else
45782      # We're on a unix platform. Hooray! :)
45783      path="$POTENTIAL_FREETYPE_LIB_PATH"
45784      has_space=`$ECHO "$path" | $GREP " "`
45785      if test "x$has_space" != x; then
45786        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45787$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45788        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45789      fi
45790
45791      # Use eval to expand a potential ~
45792      eval path="$path"
45793      if test ! -f "$path" && test ! -d "$path"; then
45794        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45795      fi
45796
45797      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45798    fi
45799  fi
45800
45801
45802    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45803    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45804$as_echo_n "checking for freetype includes... " >&6; }
45805    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45806$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45807    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45808    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45809$as_echo_n "checking for freetype libraries... " >&6; }
45810    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45811$as_echo "$FREETYPE_LIB_PATH" >&6; }
45812  fi
45813
45814          fi
45815        else
45816          FREETYPE_BASE_DIR="$SYSROOT/usr"
45817
45818  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45819  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45820  METHOD="well-known location"
45821
45822  # Let's start with an optimistic view of the world :-)
45823  FOUND_FREETYPE=yes
45824
45825  # First look for the canonical freetype main include file ft2build.h.
45826  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45827    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45828    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45829    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45830      # Fail.
45831      FOUND_FREETYPE=no
45832    fi
45833  fi
45834
45835  if test "x$FOUND_FREETYPE" = xyes; then
45836    # Include file found, let's continue the sanity check.
45837    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45838$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45839
45840    # Reset to default value
45841    FREETYPE_BASE_NAME=freetype
45842    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45843    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45844      if test "x$OPENJDK_TARGET_OS" = xmacosx \
45845          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45846        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45847        # for the .6 version explicitly.
45848        FREETYPE_BASE_NAME=freetype.6
45849        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45850        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45851$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45852      else
45853        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45854$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45855        FOUND_FREETYPE=no
45856      fi
45857    else
45858      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45859        # On Windows, we will need both .lib and .dll file.
45860        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45861          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45862$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45863          FOUND_FREETYPE=no
45864        fi
45865      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45866          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45867        # Found lib in isa dir, use that instead.
45868        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45869        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45870$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45871      fi
45872    fi
45873  fi
45874
45875  if test "x$FOUND_FREETYPE" = xyes; then
45876
45877  # Only process if variable expands to non-empty
45878
45879  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
45880    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45881
45882  # Input might be given as Windows format, start by converting to
45883  # unix format.
45884  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45885  new_path=`$CYGPATH -u "$path"`
45886
45887  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45888  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45889  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45890  # "foo.exe" is OK but "foo" is an error.
45891  #
45892  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45893  # It is also a way to make sure we got the proper file name for the real test later on.
45894  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45895  if test "x$test_shortpath" = x; then
45896    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45897$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45898    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45899  fi
45900
45901  # Call helper function which possibly converts this using DOS-style short mode.
45902  # If so, the updated path is stored in $new_path.
45903
45904  input_path="$new_path"
45905  # Check if we need to convert this using DOS-style short mode. If the path
45906  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45907  # take no chances and rewrite it.
45908  # Note: m4 eats our [], so we need to use [ and ] instead.
45909  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45910  if test "x$has_forbidden_chars" != x; then
45911    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45912    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45913    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45914    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45915      # Going to short mode and back again did indeed matter. Since short mode is
45916      # case insensitive, let's make it lowercase to improve readability.
45917      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45918      # Now convert it back to Unix-style (cygpath)
45919      input_path=`$CYGPATH -u "$shortmode_path"`
45920      new_path="$input_path"
45921    fi
45922  fi
45923
45924  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45925  if test "x$test_cygdrive_prefix" = x; then
45926    # As a simple fix, exclude /usr/bin since it's not a real path.
45927    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45928      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45929      # a path prefixed by /cygdrive for fixpath to work.
45930      new_path="$CYGWIN_ROOT_PATH$input_path"
45931    fi
45932  fi
45933
45934
45935  if test "x$path" != "x$new_path"; then
45936    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45937    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45938$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45939  fi
45940
45941    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45942
45943  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45944  has_colon=`$ECHO $path | $GREP ^.:`
45945  new_path="$path"
45946  if test "x$has_colon" = x; then
45947    # Not in mixed or Windows style, start by that.
45948    new_path=`cmd //c echo $path`
45949  fi
45950
45951
45952  input_path="$new_path"
45953  # Check if we need to convert this using DOS-style short mode. If the path
45954  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45955  # take no chances and rewrite it.
45956  # Note: m4 eats our [], so we need to use [ and ] instead.
45957  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45958  if test "x$has_forbidden_chars" != x; then
45959    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45960    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45961  fi
45962
45963
45964  windows_path="$new_path"
45965  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45966    unix_path=`$CYGPATH -u "$windows_path"`
45967    new_path="$unix_path"
45968  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45969    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45970    new_path="$unix_path"
45971  fi
45972
45973  if test "x$path" != "x$new_path"; then
45974    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45975    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45976$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45977  fi
45978
45979  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45980  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45981
45982    else
45983      # We're on a unix platform. Hooray! :)
45984      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45985      has_space=`$ECHO "$path" | $GREP " "`
45986      if test "x$has_space" != x; then
45987        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45988$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45989        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45990      fi
45991
45992      # Use eval to expand a potential ~
45993      eval path="$path"
45994      if test ! -f "$path" && test ! -d "$path"; then
45995        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45996      fi
45997
45998      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45999    fi
46000  fi
46001
46002
46003  # Only process if variable expands to non-empty
46004
46005  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
46006    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46007
46008  # Input might be given as Windows format, start by converting to
46009  # unix format.
46010  path="$POTENTIAL_FREETYPE_LIB_PATH"
46011  new_path=`$CYGPATH -u "$path"`
46012
46013  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46014  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46015  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46016  # "foo.exe" is OK but "foo" is an error.
46017  #
46018  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46019  # It is also a way to make sure we got the proper file name for the real test later on.
46020  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46021  if test "x$test_shortpath" = x; then
46022    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46023$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46024    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46025  fi
46026
46027  # Call helper function which possibly converts this using DOS-style short mode.
46028  # If so, the updated path is stored in $new_path.
46029
46030  input_path="$new_path"
46031  # Check if we need to convert this using DOS-style short mode. If the path
46032  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46033  # take no chances and rewrite it.
46034  # Note: m4 eats our [], so we need to use [ and ] instead.
46035  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46036  if test "x$has_forbidden_chars" != x; then
46037    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46038    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46039    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46040    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46041      # Going to short mode and back again did indeed matter. Since short mode is
46042      # case insensitive, let's make it lowercase to improve readability.
46043      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46044      # Now convert it back to Unix-style (cygpath)
46045      input_path=`$CYGPATH -u "$shortmode_path"`
46046      new_path="$input_path"
46047    fi
46048  fi
46049
46050  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46051  if test "x$test_cygdrive_prefix" = x; then
46052    # As a simple fix, exclude /usr/bin since it's not a real path.
46053    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46054      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46055      # a path prefixed by /cygdrive for fixpath to work.
46056      new_path="$CYGWIN_ROOT_PATH$input_path"
46057    fi
46058  fi
46059
46060
46061  if test "x$path" != "x$new_path"; then
46062    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46063    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46064$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46065  fi
46066
46067    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46068
46069  path="$POTENTIAL_FREETYPE_LIB_PATH"
46070  has_colon=`$ECHO $path | $GREP ^.:`
46071  new_path="$path"
46072  if test "x$has_colon" = x; then
46073    # Not in mixed or Windows style, start by that.
46074    new_path=`cmd //c echo $path`
46075  fi
46076
46077
46078  input_path="$new_path"
46079  # Check if we need to convert this using DOS-style short mode. If the path
46080  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46081  # take no chances and rewrite it.
46082  # Note: m4 eats our [], so we need to use [ and ] instead.
46083  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46084  if test "x$has_forbidden_chars" != x; then
46085    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46086    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46087  fi
46088
46089
46090  windows_path="$new_path"
46091  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46092    unix_path=`$CYGPATH -u "$windows_path"`
46093    new_path="$unix_path"
46094  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46095    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46096    new_path="$unix_path"
46097  fi
46098
46099  if test "x$path" != "x$new_path"; then
46100    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46101    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46102$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46103  fi
46104
46105  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46106  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46107
46108    else
46109      # We're on a unix platform. Hooray! :)
46110      path="$POTENTIAL_FREETYPE_LIB_PATH"
46111      has_space=`$ECHO "$path" | $GREP " "`
46112      if test "x$has_space" != x; then
46113        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46114$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46115        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46116      fi
46117
46118      # Use eval to expand a potential ~
46119      eval path="$path"
46120      if test ! -f "$path" && test ! -d "$path"; then
46121        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46122      fi
46123
46124      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46125    fi
46126  fi
46127
46128
46129    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46130    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46131$as_echo_n "checking for freetype includes... " >&6; }
46132    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46133$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46134    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46135    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46136$as_echo_n "checking for freetype libraries... " >&6; }
46137    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46138$as_echo "$FREETYPE_LIB_PATH" >&6; }
46139  fi
46140
46141
46142          if test "x$FOUND_FREETYPE" != xyes; then
46143            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
46144
46145  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46146  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46147  METHOD="well-known location"
46148
46149  # Let's start with an optimistic view of the world :-)
46150  FOUND_FREETYPE=yes
46151
46152  # First look for the canonical freetype main include file ft2build.h.
46153  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46154    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46155    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46156    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46157      # Fail.
46158      FOUND_FREETYPE=no
46159    fi
46160  fi
46161
46162  if test "x$FOUND_FREETYPE" = xyes; then
46163    # Include file found, let's continue the sanity check.
46164    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46165$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46166
46167    # Reset to default value
46168    FREETYPE_BASE_NAME=freetype
46169    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46170    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46171      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46172          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46173        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46174        # for the .6 version explicitly.
46175        FREETYPE_BASE_NAME=freetype.6
46176        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46177        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46178$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46179      else
46180        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46181$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46182        FOUND_FREETYPE=no
46183      fi
46184    else
46185      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46186        # On Windows, we will need both .lib and .dll file.
46187        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46188          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46189$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46190          FOUND_FREETYPE=no
46191        fi
46192      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46193          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46194        # Found lib in isa dir, use that instead.
46195        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46196        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46197$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46198      fi
46199    fi
46200  fi
46201
46202  if test "x$FOUND_FREETYPE" = xyes; then
46203
46204  # Only process if variable expands to non-empty
46205
46206  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
46207    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46208
46209  # Input might be given as Windows format, start by converting to
46210  # unix format.
46211  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46212  new_path=`$CYGPATH -u "$path"`
46213
46214  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46215  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46216  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46217  # "foo.exe" is OK but "foo" is an error.
46218  #
46219  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46220  # It is also a way to make sure we got the proper file name for the real test later on.
46221  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46222  if test "x$test_shortpath" = x; then
46223    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46224$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46225    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46226  fi
46227
46228  # Call helper function which possibly converts this using DOS-style short mode.
46229  # If so, the updated path is stored in $new_path.
46230
46231  input_path="$new_path"
46232  # Check if we need to convert this using DOS-style short mode. If the path
46233  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46234  # take no chances and rewrite it.
46235  # Note: m4 eats our [], so we need to use [ and ] instead.
46236  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46237  if test "x$has_forbidden_chars" != x; then
46238    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46239    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46240    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46241    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46242      # Going to short mode and back again did indeed matter. Since short mode is
46243      # case insensitive, let's make it lowercase to improve readability.
46244      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46245      # Now convert it back to Unix-style (cygpath)
46246      input_path=`$CYGPATH -u "$shortmode_path"`
46247      new_path="$input_path"
46248    fi
46249  fi
46250
46251  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46252  if test "x$test_cygdrive_prefix" = x; then
46253    # As a simple fix, exclude /usr/bin since it's not a real path.
46254    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46255      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46256      # a path prefixed by /cygdrive for fixpath to work.
46257      new_path="$CYGWIN_ROOT_PATH$input_path"
46258    fi
46259  fi
46260
46261
46262  if test "x$path" != "x$new_path"; then
46263    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46264    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46265$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46266  fi
46267
46268    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46269
46270  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46271  has_colon=`$ECHO $path | $GREP ^.:`
46272  new_path="$path"
46273  if test "x$has_colon" = x; then
46274    # Not in mixed or Windows style, start by that.
46275    new_path=`cmd //c echo $path`
46276  fi
46277
46278
46279  input_path="$new_path"
46280  # Check if we need to convert this using DOS-style short mode. If the path
46281  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46282  # take no chances and rewrite it.
46283  # Note: m4 eats our [], so we need to use [ and ] instead.
46284  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46285  if test "x$has_forbidden_chars" != x; then
46286    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46287    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46288  fi
46289
46290
46291  windows_path="$new_path"
46292  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46293    unix_path=`$CYGPATH -u "$windows_path"`
46294    new_path="$unix_path"
46295  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46296    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46297    new_path="$unix_path"
46298  fi
46299
46300  if test "x$path" != "x$new_path"; then
46301    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46302    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46303$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46304  fi
46305
46306  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46307  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46308
46309    else
46310      # We're on a unix platform. Hooray! :)
46311      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46312      has_space=`$ECHO "$path" | $GREP " "`
46313      if test "x$has_space" != x; then
46314        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46315$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46316        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46317      fi
46318
46319      # Use eval to expand a potential ~
46320      eval path="$path"
46321      if test ! -f "$path" && test ! -d "$path"; then
46322        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46323      fi
46324
46325      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46326    fi
46327  fi
46328
46329
46330  # Only process if variable expands to non-empty
46331
46332  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
46333    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46334
46335  # Input might be given as Windows format, start by converting to
46336  # unix format.
46337  path="$POTENTIAL_FREETYPE_LIB_PATH"
46338  new_path=`$CYGPATH -u "$path"`
46339
46340  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46341  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46342  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46343  # "foo.exe" is OK but "foo" is an error.
46344  #
46345  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46346  # It is also a way to make sure we got the proper file name for the real test later on.
46347  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46348  if test "x$test_shortpath" = x; then
46349    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46350$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46351    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46352  fi
46353
46354  # Call helper function which possibly converts this using DOS-style short mode.
46355  # If so, the updated path is stored in $new_path.
46356
46357  input_path="$new_path"
46358  # Check if we need to convert this using DOS-style short mode. If the path
46359  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46360  # take no chances and rewrite it.
46361  # Note: m4 eats our [], so we need to use [ and ] instead.
46362  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46363  if test "x$has_forbidden_chars" != x; then
46364    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46365    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46366    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46367    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46368      # Going to short mode and back again did indeed matter. Since short mode is
46369      # case insensitive, let's make it lowercase to improve readability.
46370      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46371      # Now convert it back to Unix-style (cygpath)
46372      input_path=`$CYGPATH -u "$shortmode_path"`
46373      new_path="$input_path"
46374    fi
46375  fi
46376
46377  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46378  if test "x$test_cygdrive_prefix" = x; then
46379    # As a simple fix, exclude /usr/bin since it's not a real path.
46380    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46381      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46382      # a path prefixed by /cygdrive for fixpath to work.
46383      new_path="$CYGWIN_ROOT_PATH$input_path"
46384    fi
46385  fi
46386
46387
46388  if test "x$path" != "x$new_path"; then
46389    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46390    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46391$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46392  fi
46393
46394    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46395
46396  path="$POTENTIAL_FREETYPE_LIB_PATH"
46397  has_colon=`$ECHO $path | $GREP ^.:`
46398  new_path="$path"
46399  if test "x$has_colon" = x; then
46400    # Not in mixed or Windows style, start by that.
46401    new_path=`cmd //c echo $path`
46402  fi
46403
46404
46405  input_path="$new_path"
46406  # Check if we need to convert this using DOS-style short mode. If the path
46407  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46408  # take no chances and rewrite it.
46409  # Note: m4 eats our [], so we need to use [ and ] instead.
46410  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46411  if test "x$has_forbidden_chars" != x; then
46412    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46413    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46414  fi
46415
46416
46417  windows_path="$new_path"
46418  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46419    unix_path=`$CYGPATH -u "$windows_path"`
46420    new_path="$unix_path"
46421  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46422    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46423    new_path="$unix_path"
46424  fi
46425
46426  if test "x$path" != "x$new_path"; then
46427    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46428    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46429$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46430  fi
46431
46432  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46433  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46434
46435    else
46436      # We're on a unix platform. Hooray! :)
46437      path="$POTENTIAL_FREETYPE_LIB_PATH"
46438      has_space=`$ECHO "$path" | $GREP " "`
46439      if test "x$has_space" != x; then
46440        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46441$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46442        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46443      fi
46444
46445      # Use eval to expand a potential ~
46446      eval path="$path"
46447      if test ! -f "$path" && test ! -d "$path"; then
46448        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46449      fi
46450
46451      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46452    fi
46453  fi
46454
46455
46456    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46457    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46458$as_echo_n "checking for freetype includes... " >&6; }
46459    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46460$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46461    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46462    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46463$as_echo_n "checking for freetype libraries... " >&6; }
46464    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46465$as_echo "$FREETYPE_LIB_PATH" >&6; }
46466  fi
46467
46468          fi
46469
46470          if test "x$FOUND_FREETYPE" != xyes; then
46471            FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
46472
46473  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46474  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46475  METHOD="well-known location"
46476
46477  # Let's start with an optimistic view of the world :-)
46478  FOUND_FREETYPE=yes
46479
46480  # First look for the canonical freetype main include file ft2build.h.
46481  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46482    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46483    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46484    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46485      # Fail.
46486      FOUND_FREETYPE=no
46487    fi
46488  fi
46489
46490  if test "x$FOUND_FREETYPE" = xyes; then
46491    # Include file found, let's continue the sanity check.
46492    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46493$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46494
46495    # Reset to default value
46496    FREETYPE_BASE_NAME=freetype
46497    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46498    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46499      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46500          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46501        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46502        # for the .6 version explicitly.
46503        FREETYPE_BASE_NAME=freetype.6
46504        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46505        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46506$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46507      else
46508        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46509$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46510        FOUND_FREETYPE=no
46511      fi
46512    else
46513      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46514        # On Windows, we will need both .lib and .dll file.
46515        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46516          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46517$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46518          FOUND_FREETYPE=no
46519        fi
46520      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46521          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46522        # Found lib in isa dir, use that instead.
46523        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46524        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46525$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46526      fi
46527    fi
46528  fi
46529
46530  if test "x$FOUND_FREETYPE" = xyes; then
46531
46532  # Only process if variable expands to non-empty
46533
46534  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
46535    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46536
46537  # Input might be given as Windows format, start by converting to
46538  # unix format.
46539  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46540  new_path=`$CYGPATH -u "$path"`
46541
46542  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46543  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46544  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46545  # "foo.exe" is OK but "foo" is an error.
46546  #
46547  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46548  # It is also a way to make sure we got the proper file name for the real test later on.
46549  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46550  if test "x$test_shortpath" = x; then
46551    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46552$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46553    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46554  fi
46555
46556  # Call helper function which possibly converts this using DOS-style short mode.
46557  # If so, the updated path is stored in $new_path.
46558
46559  input_path="$new_path"
46560  # Check if we need to convert this using DOS-style short mode. If the path
46561  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46562  # take no chances and rewrite it.
46563  # Note: m4 eats our [], so we need to use [ and ] instead.
46564  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46565  if test "x$has_forbidden_chars" != x; then
46566    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46567    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46568    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46569    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46570      # Going to short mode and back again did indeed matter. Since short mode is
46571      # case insensitive, let's make it lowercase to improve readability.
46572      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46573      # Now convert it back to Unix-style (cygpath)
46574      input_path=`$CYGPATH -u "$shortmode_path"`
46575      new_path="$input_path"
46576    fi
46577  fi
46578
46579  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46580  if test "x$test_cygdrive_prefix" = x; then
46581    # As a simple fix, exclude /usr/bin since it's not a real path.
46582    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46583      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46584      # a path prefixed by /cygdrive for fixpath to work.
46585      new_path="$CYGWIN_ROOT_PATH$input_path"
46586    fi
46587  fi
46588
46589
46590  if test "x$path" != "x$new_path"; then
46591    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46592    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46593$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46594  fi
46595
46596    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46597
46598  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46599  has_colon=`$ECHO $path | $GREP ^.:`
46600  new_path="$path"
46601  if test "x$has_colon" = x; then
46602    # Not in mixed or Windows style, start by that.
46603    new_path=`cmd //c echo $path`
46604  fi
46605
46606
46607  input_path="$new_path"
46608  # Check if we need to convert this using DOS-style short mode. If the path
46609  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46610  # take no chances and rewrite it.
46611  # Note: m4 eats our [], so we need to use [ and ] instead.
46612  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46613  if test "x$has_forbidden_chars" != x; then
46614    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46615    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46616  fi
46617
46618
46619  windows_path="$new_path"
46620  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46621    unix_path=`$CYGPATH -u "$windows_path"`
46622    new_path="$unix_path"
46623  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46624    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46625    new_path="$unix_path"
46626  fi
46627
46628  if test "x$path" != "x$new_path"; then
46629    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46630    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46631$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46632  fi
46633
46634  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46635  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46636
46637    else
46638      # We're on a unix platform. Hooray! :)
46639      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46640      has_space=`$ECHO "$path" | $GREP " "`
46641      if test "x$has_space" != x; then
46642        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46643$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46644        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46645      fi
46646
46647      # Use eval to expand a potential ~
46648      eval path="$path"
46649      if test ! -f "$path" && test ! -d "$path"; then
46650        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46651      fi
46652
46653      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46654    fi
46655  fi
46656
46657
46658  # Only process if variable expands to non-empty
46659
46660  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
46661    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46662
46663  # Input might be given as Windows format, start by converting to
46664  # unix format.
46665  path="$POTENTIAL_FREETYPE_LIB_PATH"
46666  new_path=`$CYGPATH -u "$path"`
46667
46668  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46669  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46670  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46671  # "foo.exe" is OK but "foo" is an error.
46672  #
46673  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46674  # It is also a way to make sure we got the proper file name for the real test later on.
46675  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46676  if test "x$test_shortpath" = x; then
46677    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46678$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46679    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46680  fi
46681
46682  # Call helper function which possibly converts this using DOS-style short mode.
46683  # If so, the updated path is stored in $new_path.
46684
46685  input_path="$new_path"
46686  # Check if we need to convert this using DOS-style short mode. If the path
46687  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46688  # take no chances and rewrite it.
46689  # Note: m4 eats our [], so we need to use [ and ] instead.
46690  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46691  if test "x$has_forbidden_chars" != x; then
46692    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46693    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46694    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46695    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46696      # Going to short mode and back again did indeed matter. Since short mode is
46697      # case insensitive, let's make it lowercase to improve readability.
46698      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46699      # Now convert it back to Unix-style (cygpath)
46700      input_path=`$CYGPATH -u "$shortmode_path"`
46701      new_path="$input_path"
46702    fi
46703  fi
46704
46705  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46706  if test "x$test_cygdrive_prefix" = x; then
46707    # As a simple fix, exclude /usr/bin since it's not a real path.
46708    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46709      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46710      # a path prefixed by /cygdrive for fixpath to work.
46711      new_path="$CYGWIN_ROOT_PATH$input_path"
46712    fi
46713  fi
46714
46715
46716  if test "x$path" != "x$new_path"; then
46717    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46718    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46719$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46720  fi
46721
46722    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46723
46724  path="$POTENTIAL_FREETYPE_LIB_PATH"
46725  has_colon=`$ECHO $path | $GREP ^.:`
46726  new_path="$path"
46727  if test "x$has_colon" = x; then
46728    # Not in mixed or Windows style, start by that.
46729    new_path=`cmd //c echo $path`
46730  fi
46731
46732
46733  input_path="$new_path"
46734  # Check if we need to convert this using DOS-style short mode. If the path
46735  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46736  # take no chances and rewrite it.
46737  # Note: m4 eats our [], so we need to use [ and ] instead.
46738  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46739  if test "x$has_forbidden_chars" != x; then
46740    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46741    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46742  fi
46743
46744
46745  windows_path="$new_path"
46746  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46747    unix_path=`$CYGPATH -u "$windows_path"`
46748    new_path="$unix_path"
46749  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46750    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46751    new_path="$unix_path"
46752  fi
46753
46754  if test "x$path" != "x$new_path"; then
46755    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46756    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46757$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46758  fi
46759
46760  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46761  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46762
46763    else
46764      # We're on a unix platform. Hooray! :)
46765      path="$POTENTIAL_FREETYPE_LIB_PATH"
46766      has_space=`$ECHO "$path" | $GREP " "`
46767      if test "x$has_space" != x; then
46768        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46769$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46770        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46771      fi
46772
46773      # Use eval to expand a potential ~
46774      eval path="$path"
46775      if test ! -f "$path" && test ! -d "$path"; then
46776        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46777      fi
46778
46779      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46780    fi
46781  fi
46782
46783
46784    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46785    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46786$as_echo_n "checking for freetype includes... " >&6; }
46787    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46788$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46789    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46790    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46791$as_echo_n "checking for freetype libraries... " >&6; }
46792    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46793$as_echo "$FREETYPE_LIB_PATH" >&6; }
46794  fi
46795
46796          fi
46797
46798          if test "x$FOUND_FREETYPE" != xyes; then
46799            FREETYPE_BASE_DIR="$SYSROOT/usr"
46800            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
46801
46802  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46803  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
46804  METHOD="well-known location"
46805
46806  # Let's start with an optimistic view of the world :-)
46807  FOUND_FREETYPE=yes
46808
46809  # First look for the canonical freetype main include file ft2build.h.
46810  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46811    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46812    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46813    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46814      # Fail.
46815      FOUND_FREETYPE=no
46816    fi
46817  fi
46818
46819  if test "x$FOUND_FREETYPE" = xyes; then
46820    # Include file found, let's continue the sanity check.
46821    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46822$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46823
46824    # Reset to default value
46825    FREETYPE_BASE_NAME=freetype
46826    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46827    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46828      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46829          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46830        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46831        # for the .6 version explicitly.
46832        FREETYPE_BASE_NAME=freetype.6
46833        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46834        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46835$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46836      else
46837        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46838$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46839        FOUND_FREETYPE=no
46840      fi
46841    else
46842      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46843        # On Windows, we will need both .lib and .dll file.
46844        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46845          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46846$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46847          FOUND_FREETYPE=no
46848        fi
46849      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46850          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46851        # Found lib in isa dir, use that instead.
46852        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46853        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46854$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46855      fi
46856    fi
46857  fi
46858
46859  if test "x$FOUND_FREETYPE" = xyes; then
46860
46861  # Only process if variable expands to non-empty
46862
46863  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
46864    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46865
46866  # Input might be given as Windows format, start by converting to
46867  # unix format.
46868  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46869  new_path=`$CYGPATH -u "$path"`
46870
46871  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46872  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46873  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46874  # "foo.exe" is OK but "foo" is an error.
46875  #
46876  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46877  # It is also a way to make sure we got the proper file name for the real test later on.
46878  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46879  if test "x$test_shortpath" = x; then
46880    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46881$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46882    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46883  fi
46884
46885  # Call helper function which possibly converts this using DOS-style short mode.
46886  # If so, the updated path is stored in $new_path.
46887
46888  input_path="$new_path"
46889  # Check if we need to convert this using DOS-style short mode. If the path
46890  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46891  # take no chances and rewrite it.
46892  # Note: m4 eats our [], so we need to use [ and ] instead.
46893  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46894  if test "x$has_forbidden_chars" != x; then
46895    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46896    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46897    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46898    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46899      # Going to short mode and back again did indeed matter. Since short mode is
46900      # case insensitive, let's make it lowercase to improve readability.
46901      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46902      # Now convert it back to Unix-style (cygpath)
46903      input_path=`$CYGPATH -u "$shortmode_path"`
46904      new_path="$input_path"
46905    fi
46906  fi
46907
46908  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46909  if test "x$test_cygdrive_prefix" = x; then
46910    # As a simple fix, exclude /usr/bin since it's not a real path.
46911    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46912      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46913      # a path prefixed by /cygdrive for fixpath to work.
46914      new_path="$CYGWIN_ROOT_PATH$input_path"
46915    fi
46916  fi
46917
46918
46919  if test "x$path" != "x$new_path"; then
46920    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46921    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46922$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46923  fi
46924
46925    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46926
46927  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46928  has_colon=`$ECHO $path | $GREP ^.:`
46929  new_path="$path"
46930  if test "x$has_colon" = x; then
46931    # Not in mixed or Windows style, start by that.
46932    new_path=`cmd //c echo $path`
46933  fi
46934
46935
46936  input_path="$new_path"
46937  # Check if we need to convert this using DOS-style short mode. If the path
46938  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46939  # take no chances and rewrite it.
46940  # Note: m4 eats our [], so we need to use [ and ] instead.
46941  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46942  if test "x$has_forbidden_chars" != x; then
46943    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46944    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46945  fi
46946
46947
46948  windows_path="$new_path"
46949  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46950    unix_path=`$CYGPATH -u "$windows_path"`
46951    new_path="$unix_path"
46952  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46953    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46954    new_path="$unix_path"
46955  fi
46956
46957  if test "x$path" != "x$new_path"; then
46958    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46959    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46960$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46961  fi
46962
46963  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46964  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46965
46966    else
46967      # We're on a unix platform. Hooray! :)
46968      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46969      has_space=`$ECHO "$path" | $GREP " "`
46970      if test "x$has_space" != x; then
46971        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46972$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46973        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46974      fi
46975
46976      # Use eval to expand a potential ~
46977      eval path="$path"
46978      if test ! -f "$path" && test ! -d "$path"; then
46979        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46980      fi
46981
46982      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46983    fi
46984  fi
46985
46986
46987  # Only process if variable expands to non-empty
46988
46989  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
46990    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46991
46992  # Input might be given as Windows format, start by converting to
46993  # unix format.
46994  path="$POTENTIAL_FREETYPE_LIB_PATH"
46995  new_path=`$CYGPATH -u "$path"`
46996
46997  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46998  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46999  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47000  # "foo.exe" is OK but "foo" is an error.
47001  #
47002  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47003  # It is also a way to make sure we got the proper file name for the real test later on.
47004  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47005  if test "x$test_shortpath" = x; then
47006    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47007$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47008    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47009  fi
47010
47011  # Call helper function which possibly converts this using DOS-style short mode.
47012  # If so, the updated path is stored in $new_path.
47013
47014  input_path="$new_path"
47015  # Check if we need to convert this using DOS-style short mode. If the path
47016  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47017  # take no chances and rewrite it.
47018  # Note: m4 eats our [], so we need to use [ and ] instead.
47019  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47020  if test "x$has_forbidden_chars" != x; then
47021    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47022    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47023    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47024    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47025      # Going to short mode and back again did indeed matter. Since short mode is
47026      # case insensitive, let's make it lowercase to improve readability.
47027      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47028      # Now convert it back to Unix-style (cygpath)
47029      input_path=`$CYGPATH -u "$shortmode_path"`
47030      new_path="$input_path"
47031    fi
47032  fi
47033
47034  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47035  if test "x$test_cygdrive_prefix" = x; then
47036    # As a simple fix, exclude /usr/bin since it's not a real path.
47037    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47038      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47039      # a path prefixed by /cygdrive for fixpath to work.
47040      new_path="$CYGWIN_ROOT_PATH$input_path"
47041    fi
47042  fi
47043
47044
47045  if test "x$path" != "x$new_path"; then
47046    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47047    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47048$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47049  fi
47050
47051    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47052
47053  path="$POTENTIAL_FREETYPE_LIB_PATH"
47054  has_colon=`$ECHO $path | $GREP ^.:`
47055  new_path="$path"
47056  if test "x$has_colon" = x; then
47057    # Not in mixed or Windows style, start by that.
47058    new_path=`cmd //c echo $path`
47059  fi
47060
47061
47062  input_path="$new_path"
47063  # Check if we need to convert this using DOS-style short mode. If the path
47064  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47065  # take no chances and rewrite it.
47066  # Note: m4 eats our [], so we need to use [ and ] instead.
47067  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47068  if test "x$has_forbidden_chars" != x; then
47069    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47070    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47071  fi
47072
47073
47074  windows_path="$new_path"
47075  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47076    unix_path=`$CYGPATH -u "$windows_path"`
47077    new_path="$unix_path"
47078  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47079    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47080    new_path="$unix_path"
47081  fi
47082
47083  if test "x$path" != "x$new_path"; then
47084    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47085    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47086$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47087  fi
47088
47089  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47090  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47091
47092    else
47093      # We're on a unix platform. Hooray! :)
47094      path="$POTENTIAL_FREETYPE_LIB_PATH"
47095      has_space=`$ECHO "$path" | $GREP " "`
47096      if test "x$has_space" != x; then
47097        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47098$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47099        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47100      fi
47101
47102      # Use eval to expand a potential ~
47103      eval path="$path"
47104      if test ! -f "$path" && test ! -d "$path"; then
47105        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47106      fi
47107
47108      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47109    fi
47110  fi
47111
47112
47113    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47114    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47115$as_echo_n "checking for freetype includes... " >&6; }
47116    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47117$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47118    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47119    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47120$as_echo_n "checking for freetype libraries... " >&6; }
47121    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47122$as_echo "$FREETYPE_LIB_PATH" >&6; }
47123  fi
47124
47125            else
47126
47127  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47128  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
47129  METHOD="well-known location"
47130
47131  # Let's start with an optimistic view of the world :-)
47132  FOUND_FREETYPE=yes
47133
47134  # First look for the canonical freetype main include file ft2build.h.
47135  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47136    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47137    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47138    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47139      # Fail.
47140      FOUND_FREETYPE=no
47141    fi
47142  fi
47143
47144  if test "x$FOUND_FREETYPE" = xyes; then
47145    # Include file found, let's continue the sanity check.
47146    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47147$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47148
47149    # Reset to default value
47150    FREETYPE_BASE_NAME=freetype
47151    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47152    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47153      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47154          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47155        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47156        # for the .6 version explicitly.
47157        FREETYPE_BASE_NAME=freetype.6
47158        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47159        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47160$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47161      else
47162        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47163$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47164        FOUND_FREETYPE=no
47165      fi
47166    else
47167      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47168        # On Windows, we will need both .lib and .dll file.
47169        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47170          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47171$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47172          FOUND_FREETYPE=no
47173        fi
47174      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47175          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47176        # Found lib in isa dir, use that instead.
47177        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47178        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47179$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47180      fi
47181    fi
47182  fi
47183
47184  if test "x$FOUND_FREETYPE" = xyes; then
47185
47186  # Only process if variable expands to non-empty
47187
47188  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
47189    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47190
47191  # Input might be given as Windows format, start by converting to
47192  # unix format.
47193  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47194  new_path=`$CYGPATH -u "$path"`
47195
47196  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47197  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47198  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47199  # "foo.exe" is OK but "foo" is an error.
47200  #
47201  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47202  # It is also a way to make sure we got the proper file name for the real test later on.
47203  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47204  if test "x$test_shortpath" = x; then
47205    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47206$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47207    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47208  fi
47209
47210  # Call helper function which possibly converts this using DOS-style short mode.
47211  # If so, the updated path is stored in $new_path.
47212
47213  input_path="$new_path"
47214  # Check if we need to convert this using DOS-style short mode. If the path
47215  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47216  # take no chances and rewrite it.
47217  # Note: m4 eats our [], so we need to use [ and ] instead.
47218  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47219  if test "x$has_forbidden_chars" != x; then
47220    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47221    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47222    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47223    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47224      # Going to short mode and back again did indeed matter. Since short mode is
47225      # case insensitive, let's make it lowercase to improve readability.
47226      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47227      # Now convert it back to Unix-style (cygpath)
47228      input_path=`$CYGPATH -u "$shortmode_path"`
47229      new_path="$input_path"
47230    fi
47231  fi
47232
47233  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47234  if test "x$test_cygdrive_prefix" = x; then
47235    # As a simple fix, exclude /usr/bin since it's not a real path.
47236    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47237      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47238      # a path prefixed by /cygdrive for fixpath to work.
47239      new_path="$CYGWIN_ROOT_PATH$input_path"
47240    fi
47241  fi
47242
47243
47244  if test "x$path" != "x$new_path"; then
47245    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47246    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47247$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47248  fi
47249
47250    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47251
47252  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47253  has_colon=`$ECHO $path | $GREP ^.:`
47254  new_path="$path"
47255  if test "x$has_colon" = x; then
47256    # Not in mixed or Windows style, start by that.
47257    new_path=`cmd //c echo $path`
47258  fi
47259
47260
47261  input_path="$new_path"
47262  # Check if we need to convert this using DOS-style short mode. If the path
47263  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47264  # take no chances and rewrite it.
47265  # Note: m4 eats our [], so we need to use [ and ] instead.
47266  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47267  if test "x$has_forbidden_chars" != x; then
47268    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47269    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47270  fi
47271
47272
47273  windows_path="$new_path"
47274  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47275    unix_path=`$CYGPATH -u "$windows_path"`
47276    new_path="$unix_path"
47277  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47278    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47279    new_path="$unix_path"
47280  fi
47281
47282  if test "x$path" != "x$new_path"; then
47283    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47284    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47285$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47286  fi
47287
47288  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47289  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47290
47291    else
47292      # We're on a unix platform. Hooray! :)
47293      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47294      has_space=`$ECHO "$path" | $GREP " "`
47295      if test "x$has_space" != x; then
47296        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47297$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47298        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47299      fi
47300
47301      # Use eval to expand a potential ~
47302      eval path="$path"
47303      if test ! -f "$path" && test ! -d "$path"; then
47304        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47305      fi
47306
47307      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47308    fi
47309  fi
47310
47311
47312  # Only process if variable expands to non-empty
47313
47314  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
47315    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47316
47317  # Input might be given as Windows format, start by converting to
47318  # unix format.
47319  path="$POTENTIAL_FREETYPE_LIB_PATH"
47320  new_path=`$CYGPATH -u "$path"`
47321
47322  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47323  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47324  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47325  # "foo.exe" is OK but "foo" is an error.
47326  #
47327  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47328  # It is also a way to make sure we got the proper file name for the real test later on.
47329  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47330  if test "x$test_shortpath" = x; then
47331    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47332$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47333    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47334  fi
47335
47336  # Call helper function which possibly converts this using DOS-style short mode.
47337  # If so, the updated path is stored in $new_path.
47338
47339  input_path="$new_path"
47340  # Check if we need to convert this using DOS-style short mode. If the path
47341  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47342  # take no chances and rewrite it.
47343  # Note: m4 eats our [], so we need to use [ and ] instead.
47344  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47345  if test "x$has_forbidden_chars" != x; then
47346    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47347    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47348    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47349    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47350      # Going to short mode and back again did indeed matter. Since short mode is
47351      # case insensitive, let's make it lowercase to improve readability.
47352      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47353      # Now convert it back to Unix-style (cygpath)
47354      input_path=`$CYGPATH -u "$shortmode_path"`
47355      new_path="$input_path"
47356    fi
47357  fi
47358
47359  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47360  if test "x$test_cygdrive_prefix" = x; then
47361    # As a simple fix, exclude /usr/bin since it's not a real path.
47362    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47363      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47364      # a path prefixed by /cygdrive for fixpath to work.
47365      new_path="$CYGWIN_ROOT_PATH$input_path"
47366    fi
47367  fi
47368
47369
47370  if test "x$path" != "x$new_path"; then
47371    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47372    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47373$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47374  fi
47375
47376    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47377
47378  path="$POTENTIAL_FREETYPE_LIB_PATH"
47379  has_colon=`$ECHO $path | $GREP ^.:`
47380  new_path="$path"
47381  if test "x$has_colon" = x; then
47382    # Not in mixed or Windows style, start by that.
47383    new_path=`cmd //c echo $path`
47384  fi
47385
47386
47387  input_path="$new_path"
47388  # Check if we need to convert this using DOS-style short mode. If the path
47389  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47390  # take no chances and rewrite it.
47391  # Note: m4 eats our [], so we need to use [ and ] instead.
47392  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47393  if test "x$has_forbidden_chars" != x; then
47394    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47395    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47396  fi
47397
47398
47399  windows_path="$new_path"
47400  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47401    unix_path=`$CYGPATH -u "$windows_path"`
47402    new_path="$unix_path"
47403  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47404    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47405    new_path="$unix_path"
47406  fi
47407
47408  if test "x$path" != "x$new_path"; then
47409    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47410    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47411$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47412  fi
47413
47414  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47415  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47416
47417    else
47418      # We're on a unix platform. Hooray! :)
47419      path="$POTENTIAL_FREETYPE_LIB_PATH"
47420      has_space=`$ECHO "$path" | $GREP " "`
47421      if test "x$has_space" != x; then
47422        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47423$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47424        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47425      fi
47426
47427      # Use eval to expand a potential ~
47428      eval path="$path"
47429      if test ! -f "$path" && test ! -d "$path"; then
47430        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47431      fi
47432
47433      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47434    fi
47435  fi
47436
47437
47438    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47439    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47440$as_echo_n "checking for freetype includes... " >&6; }
47441    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47442$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47443    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47444    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47445$as_echo_n "checking for freetype libraries... " >&6; }
47446    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47447$as_echo "$FREETYPE_LIB_PATH" >&6; }
47448  fi
47449
47450              if test "x$FOUND_FREETYPE" != xyes; then
47451
47452  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47453  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
47454  METHOD="well-known location"
47455
47456  # Let's start with an optimistic view of the world :-)
47457  FOUND_FREETYPE=yes
47458
47459  # First look for the canonical freetype main include file ft2build.h.
47460  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47461    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47462    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47463    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47464      # Fail.
47465      FOUND_FREETYPE=no
47466    fi
47467  fi
47468
47469  if test "x$FOUND_FREETYPE" = xyes; then
47470    # Include file found, let's continue the sanity check.
47471    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47472$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47473
47474    # Reset to default value
47475    FREETYPE_BASE_NAME=freetype
47476    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47477    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47478      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47479          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47480        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47481        # for the .6 version explicitly.
47482        FREETYPE_BASE_NAME=freetype.6
47483        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47484        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47485$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47486      else
47487        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47488$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47489        FOUND_FREETYPE=no
47490      fi
47491    else
47492      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47493        # On Windows, we will need both .lib and .dll file.
47494        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47495          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47496$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47497          FOUND_FREETYPE=no
47498        fi
47499      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47500          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47501        # Found lib in isa dir, use that instead.
47502        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47503        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47504$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47505      fi
47506    fi
47507  fi
47508
47509  if test "x$FOUND_FREETYPE" = xyes; then
47510
47511  # Only process if variable expands to non-empty
47512
47513  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
47514    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47515
47516  # Input might be given as Windows format, start by converting to
47517  # unix format.
47518  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47519  new_path=`$CYGPATH -u "$path"`
47520
47521  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47522  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47523  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47524  # "foo.exe" is OK but "foo" is an error.
47525  #
47526  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47527  # It is also a way to make sure we got the proper file name for the real test later on.
47528  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47529  if test "x$test_shortpath" = x; then
47530    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47531$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47532    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47533  fi
47534
47535  # Call helper function which possibly converts this using DOS-style short mode.
47536  # If so, the updated path is stored in $new_path.
47537
47538  input_path="$new_path"
47539  # Check if we need to convert this using DOS-style short mode. If the path
47540  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47541  # take no chances and rewrite it.
47542  # Note: m4 eats our [], so we need to use [ and ] instead.
47543  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47544  if test "x$has_forbidden_chars" != x; then
47545    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47546    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47547    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47548    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47549      # Going to short mode and back again did indeed matter. Since short mode is
47550      # case insensitive, let's make it lowercase to improve readability.
47551      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47552      # Now convert it back to Unix-style (cygpath)
47553      input_path=`$CYGPATH -u "$shortmode_path"`
47554      new_path="$input_path"
47555    fi
47556  fi
47557
47558  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47559  if test "x$test_cygdrive_prefix" = x; then
47560    # As a simple fix, exclude /usr/bin since it's not a real path.
47561    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47562      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47563      # a path prefixed by /cygdrive for fixpath to work.
47564      new_path="$CYGWIN_ROOT_PATH$input_path"
47565    fi
47566  fi
47567
47568
47569  if test "x$path" != "x$new_path"; then
47570    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47571    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47572$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47573  fi
47574
47575    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47576
47577  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47578  has_colon=`$ECHO $path | $GREP ^.:`
47579  new_path="$path"
47580  if test "x$has_colon" = x; then
47581    # Not in mixed or Windows style, start by that.
47582    new_path=`cmd //c echo $path`
47583  fi
47584
47585
47586  input_path="$new_path"
47587  # Check if we need to convert this using DOS-style short mode. If the path
47588  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47589  # take no chances and rewrite it.
47590  # Note: m4 eats our [], so we need to use [ and ] instead.
47591  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47592  if test "x$has_forbidden_chars" != x; then
47593    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47594    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47595  fi
47596
47597
47598  windows_path="$new_path"
47599  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47600    unix_path=`$CYGPATH -u "$windows_path"`
47601    new_path="$unix_path"
47602  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47603    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47604    new_path="$unix_path"
47605  fi
47606
47607  if test "x$path" != "x$new_path"; then
47608    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47609    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47610$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47611  fi
47612
47613  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47614  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47615
47616    else
47617      # We're on a unix platform. Hooray! :)
47618      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47619      has_space=`$ECHO "$path" | $GREP " "`
47620      if test "x$has_space" != x; then
47621        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47622$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47623        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47624      fi
47625
47626      # Use eval to expand a potential ~
47627      eval path="$path"
47628      if test ! -f "$path" && test ! -d "$path"; then
47629        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47630      fi
47631
47632      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47633    fi
47634  fi
47635
47636
47637  # Only process if variable expands to non-empty
47638
47639  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
47640    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47641
47642  # Input might be given as Windows format, start by converting to
47643  # unix format.
47644  path="$POTENTIAL_FREETYPE_LIB_PATH"
47645  new_path=`$CYGPATH -u "$path"`
47646
47647  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47648  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47649  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47650  # "foo.exe" is OK but "foo" is an error.
47651  #
47652  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47653  # It is also a way to make sure we got the proper file name for the real test later on.
47654  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47655  if test "x$test_shortpath" = x; then
47656    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47657$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47658    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47659  fi
47660
47661  # Call helper function which possibly converts this using DOS-style short mode.
47662  # If so, the updated path is stored in $new_path.
47663
47664  input_path="$new_path"
47665  # Check if we need to convert this using DOS-style short mode. If the path
47666  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47667  # take no chances and rewrite it.
47668  # Note: m4 eats our [], so we need to use [ and ] instead.
47669  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47670  if test "x$has_forbidden_chars" != x; then
47671    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47672    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47673    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47674    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47675      # Going to short mode and back again did indeed matter. Since short mode is
47676      # case insensitive, let's make it lowercase to improve readability.
47677      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47678      # Now convert it back to Unix-style (cygpath)
47679      input_path=`$CYGPATH -u "$shortmode_path"`
47680      new_path="$input_path"
47681    fi
47682  fi
47683
47684  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47685  if test "x$test_cygdrive_prefix" = x; then
47686    # As a simple fix, exclude /usr/bin since it's not a real path.
47687    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47688      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47689      # a path prefixed by /cygdrive for fixpath to work.
47690      new_path="$CYGWIN_ROOT_PATH$input_path"
47691    fi
47692  fi
47693
47694
47695  if test "x$path" != "x$new_path"; then
47696    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47697    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47698$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47699  fi
47700
47701    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47702
47703  path="$POTENTIAL_FREETYPE_LIB_PATH"
47704  has_colon=`$ECHO $path | $GREP ^.:`
47705  new_path="$path"
47706  if test "x$has_colon" = x; then
47707    # Not in mixed or Windows style, start by that.
47708    new_path=`cmd //c echo $path`
47709  fi
47710
47711
47712  input_path="$new_path"
47713  # Check if we need to convert this using DOS-style short mode. If the path
47714  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47715  # take no chances and rewrite it.
47716  # Note: m4 eats our [], so we need to use [ and ] instead.
47717  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47718  if test "x$has_forbidden_chars" != x; then
47719    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47720    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47721  fi
47722
47723
47724  windows_path="$new_path"
47725  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47726    unix_path=`$CYGPATH -u "$windows_path"`
47727    new_path="$unix_path"
47728  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47729    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47730    new_path="$unix_path"
47731  fi
47732
47733  if test "x$path" != "x$new_path"; then
47734    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47735    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47736$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47737  fi
47738
47739  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47740  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47741
47742    else
47743      # We're on a unix platform. Hooray! :)
47744      path="$POTENTIAL_FREETYPE_LIB_PATH"
47745      has_space=`$ECHO "$path" | $GREP " "`
47746      if test "x$has_space" != x; then
47747        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47748$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47749        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47750      fi
47751
47752      # Use eval to expand a potential ~
47753      eval path="$path"
47754      if test ! -f "$path" && test ! -d "$path"; then
47755        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47756      fi
47757
47758      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47759    fi
47760  fi
47761
47762
47763    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47764    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47765$as_echo_n "checking for freetype includes... " >&6; }
47766    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47767$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47768    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47769    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47770$as_echo_n "checking for freetype libraries... " >&6; }
47771    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47772$as_echo "$FREETYPE_LIB_PATH" >&6; }
47773  fi
47774
47775              fi
47776            fi
47777          fi
47778        fi
47779      fi # end check in well-known locations
47780
47781      if test "x$FOUND_FREETYPE" != xyes; then
47782
47783  # Print a helpful message on how to acquire the necessary build dependency.
47784  # freetype is the help tag: freetype, cups, pulse, alsa etc
47785  MISSING_DEPENDENCY=freetype
47786
47787  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47788    cygwin_help $MISSING_DEPENDENCY
47789  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47790    msys_help $MISSING_DEPENDENCY
47791  else
47792    PKGHANDLER_COMMAND=
47793
47794    case $PKGHANDLER in
47795      apt-get)
47796        apt_help     $MISSING_DEPENDENCY ;;
47797      yum)
47798        yum_help     $MISSING_DEPENDENCY ;;
47799      port)
47800        port_help    $MISSING_DEPENDENCY ;;
47801      pkgutil)
47802        pkgutil_help $MISSING_DEPENDENCY ;;
47803      pkgadd)
47804        pkgadd_help  $MISSING_DEPENDENCY ;;
47805    esac
47806
47807    if test "x$PKGHANDLER_COMMAND" != x; then
47808      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
47809    fi
47810  fi
47811
47812        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
47813      fi
47814    fi # end user specified settings
47815
47816    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
47817    if test "x$FREETYPE_CFLAGS" = x; then
47818
47819  # Only process if variable expands to non-empty
47820
47821  if test "x$FREETYPE_INCLUDE_PATH" != x; then
47822    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47823
47824  # Input might be given as Windows format, start by converting to
47825  # unix format.
47826  path="$FREETYPE_INCLUDE_PATH"
47827  new_path=`$CYGPATH -u "$path"`
47828
47829  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47830  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47831  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47832  # "foo.exe" is OK but "foo" is an error.
47833  #
47834  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47835  # It is also a way to make sure we got the proper file name for the real test later on.
47836  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47837  if test "x$test_shortpath" = x; then
47838    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47839$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47840    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
47841  fi
47842
47843  # Call helper function which possibly converts this using DOS-style short mode.
47844  # If so, the updated path is stored in $new_path.
47845
47846  input_path="$new_path"
47847  # Check if we need to convert this using DOS-style short mode. If the path
47848  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47849  # take no chances and rewrite it.
47850  # Note: m4 eats our [], so we need to use [ and ] instead.
47851  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47852  if test "x$has_forbidden_chars" != x; then
47853    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47854    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47855    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47856    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47857      # Going to short mode and back again did indeed matter. Since short mode is
47858      # case insensitive, let's make it lowercase to improve readability.
47859      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47860      # Now convert it back to Unix-style (cygpath)
47861      input_path=`$CYGPATH -u "$shortmode_path"`
47862      new_path="$input_path"
47863    fi
47864  fi
47865
47866  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47867  if test "x$test_cygdrive_prefix" = x; then
47868    # As a simple fix, exclude /usr/bin since it's not a real path.
47869    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47870      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47871      # a path prefixed by /cygdrive for fixpath to work.
47872      new_path="$CYGWIN_ROOT_PATH$input_path"
47873    fi
47874  fi
47875
47876
47877  if test "x$path" != "x$new_path"; then
47878    FREETYPE_INCLUDE_PATH="$new_path"
47879    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47880$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47881  fi
47882
47883    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47884
47885  path="$FREETYPE_INCLUDE_PATH"
47886  has_colon=`$ECHO $path | $GREP ^.:`
47887  new_path="$path"
47888  if test "x$has_colon" = x; then
47889    # Not in mixed or Windows style, start by that.
47890    new_path=`cmd //c echo $path`
47891  fi
47892
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    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47903  fi
47904
47905
47906  windows_path="$new_path"
47907  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47908    unix_path=`$CYGPATH -u "$windows_path"`
47909    new_path="$unix_path"
47910  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47911    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47912    new_path="$unix_path"
47913  fi
47914
47915  if test "x$path" != "x$new_path"; then
47916    FREETYPE_INCLUDE_PATH="$new_path"
47917    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47918$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47919  fi
47920
47921  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47922  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47923
47924    else
47925      # We're on a unix platform. Hooray! :)
47926      path="$FREETYPE_INCLUDE_PATH"
47927      has_space=`$ECHO "$path" | $GREP " "`
47928      if test "x$has_space" != x; then
47929        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47930$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47931        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47932      fi
47933
47934      # Use eval to expand a potential ~
47935      eval path="$path"
47936      if test ! -f "$path" && test ! -d "$path"; then
47937        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47938      fi
47939
47940      FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47941    fi
47942  fi
47943
47944      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
47945        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
47946      else
47947        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
47948      fi
47949    fi
47950
47951    if test "x$FREETYPE_LIBS" = x; then
47952
47953  # Only process if variable expands to non-empty
47954
47955  if test "x$FREETYPE_LIB_PATH" != x; then
47956    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47957
47958  # Input might be given as Windows format, start by converting to
47959  # unix format.
47960  path="$FREETYPE_LIB_PATH"
47961  new_path=`$CYGPATH -u "$path"`
47962
47963  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47964  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47965  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47966  # "foo.exe" is OK but "foo" is an error.
47967  #
47968  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47969  # It is also a way to make sure we got the proper file name for the real test later on.
47970  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47971  if test "x$test_shortpath" = x; then
47972    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47973$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47974    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
47975  fi
47976
47977  # Call helper function which possibly converts this using DOS-style short mode.
47978  # If so, the updated path is stored in $new_path.
47979
47980  input_path="$new_path"
47981  # Check if we need to convert this using DOS-style short mode. If the path
47982  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47983  # take no chances and rewrite it.
47984  # Note: m4 eats our [], so we need to use [ and ] instead.
47985  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47986  if test "x$has_forbidden_chars" != x; then
47987    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47988    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47989    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47990    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47991      # Going to short mode and back again did indeed matter. Since short mode is
47992      # case insensitive, let's make it lowercase to improve readability.
47993      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47994      # Now convert it back to Unix-style (cygpath)
47995      input_path=`$CYGPATH -u "$shortmode_path"`
47996      new_path="$input_path"
47997    fi
47998  fi
47999
48000  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48001  if test "x$test_cygdrive_prefix" = x; then
48002    # As a simple fix, exclude /usr/bin since it's not a real path.
48003    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48004      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48005      # a path prefixed by /cygdrive for fixpath to work.
48006      new_path="$CYGWIN_ROOT_PATH$input_path"
48007    fi
48008  fi
48009
48010
48011  if test "x$path" != "x$new_path"; then
48012    FREETYPE_LIB_PATH="$new_path"
48013    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
48014$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48015  fi
48016
48017    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48018
48019  path="$FREETYPE_LIB_PATH"
48020  has_colon=`$ECHO $path | $GREP ^.:`
48021  new_path="$path"
48022  if test "x$has_colon" = x; then
48023    # Not in mixed or Windows style, start by that.
48024    new_path=`cmd //c echo $path`
48025  fi
48026
48027
48028  input_path="$new_path"
48029  # Check if we need to convert this using DOS-style short mode. If the path
48030  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48031  # take no chances and rewrite it.
48032  # Note: m4 eats our [], so we need to use [ and ] instead.
48033  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48034  if test "x$has_forbidden_chars" != x; then
48035    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48036    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48037  fi
48038
48039
48040  windows_path="$new_path"
48041  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48042    unix_path=`$CYGPATH -u "$windows_path"`
48043    new_path="$unix_path"
48044  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48045    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48046    new_path="$unix_path"
48047  fi
48048
48049  if test "x$path" != "x$new_path"; then
48050    FREETYPE_LIB_PATH="$new_path"
48051    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
48052$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48053  fi
48054
48055  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48056  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48057
48058    else
48059      # We're on a unix platform. Hooray! :)
48060      path="$FREETYPE_LIB_PATH"
48061      has_space=`$ECHO "$path" | $GREP " "`
48062      if test "x$has_space" != x; then
48063        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48064$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48065        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48066      fi
48067
48068      # Use eval to expand a potential ~
48069      eval path="$path"
48070      if test ! -f "$path" && test ! -d "$path"; then
48071        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48072      fi
48073
48074      FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
48075    fi
48076  fi
48077
48078      if test "x$OPENJDK_TARGET_OS" = xwindows; then
48079        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
48080      else
48081        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
48082      fi
48083    fi
48084
48085    # Try to compile it
48086    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
48087$as_echo_n "checking if we can compile and link with freetype... " >&6; }
48088    ac_ext=cpp
48089ac_cpp='$CXXCPP $CPPFLAGS'
48090ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48091ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48092ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48093
48094    PREV_CXXCFLAGS="$CXXFLAGS"
48095    PREV_LIBS="$LIBS"
48096    PREV_CXX="$CXX"
48097    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
48098    LIBS="$LIBS $FREETYPE_LIBS"
48099    CXX="$FIXPATH $CXX"
48100    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48101/* end confdefs.h.  */
48102
48103          #include<ft2build.h>
48104          #include FT_FREETYPE_H
48105          int main () {
48106            FT_Init_FreeType(NULL);
48107            return 0;
48108          }
48109
48110_ACEOF
48111if ac_fn_cxx_try_link "$LINENO"; then :
48112
48113          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48114$as_echo "yes" >&6; }
48115
48116else
48117
48118          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48119$as_echo "no" >&6; }
48120          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
48121$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
48122          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
48123$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
48124
48125
48126  # Print a helpful message on how to acquire the necessary build dependency.
48127  # freetype is the help tag: freetype, cups, pulse, alsa etc
48128  MISSING_DEPENDENCY=freetype
48129
48130  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48131    cygwin_help $MISSING_DEPENDENCY
48132  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48133    msys_help $MISSING_DEPENDENCY
48134  else
48135    PKGHANDLER_COMMAND=
48136
48137    case $PKGHANDLER in
48138      apt-get)
48139        apt_help     $MISSING_DEPENDENCY ;;
48140      yum)
48141        yum_help     $MISSING_DEPENDENCY ;;
48142      port)
48143        port_help    $MISSING_DEPENDENCY ;;
48144      pkgutil)
48145        pkgutil_help $MISSING_DEPENDENCY ;;
48146      pkgadd)
48147        pkgadd_help  $MISSING_DEPENDENCY ;;
48148    esac
48149
48150    if test "x$PKGHANDLER_COMMAND" != x; then
48151      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48152    fi
48153  fi
48154
48155
48156          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
48157
48158
48159fi
48160rm -f core conftest.err conftest.$ac_objext \
48161    conftest$ac_exeext conftest.$ac_ext
48162    CXXCFLAGS="$PREV_CXXFLAGS"
48163    LIBS="$PREV_LIBS"
48164    CXX="$PREV_CXX"
48165    ac_ext=cpp
48166ac_cpp='$CXXCPP $CPPFLAGS'
48167ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48168ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48169ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48170
48171
48172    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
48173$as_echo_n "checking if we should bundle freetype... " >&6; }
48174    if test "x$BUNDLE_FREETYPE" = xyes; then
48175      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
48176    fi
48177    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
48178$as_echo "$BUNDLE_FREETYPE" >&6; }
48179
48180  fi # end freetype needed
48181
48182
48183
48184
48185
48186
48187
48188  ###############################################################################
48189  #
48190  # Check for alsa headers and libraries. Used on Linux/GNU systems.
48191  #
48192
48193# Check whether --with-alsa was given.
48194if test "${with_alsa+set}" = set; then :
48195  withval=$with_alsa;
48196fi
48197
48198
48199# Check whether --with-alsa-include was given.
48200if test "${with_alsa_include+set}" = set; then :
48201  withval=$with_alsa_include;
48202fi
48203
48204
48205# Check whether --with-alsa-lib was given.
48206if test "${with_alsa_lib+set}" = set; then :
48207  withval=$with_alsa_lib;
48208fi
48209
48210
48211  if test "x$ALSA_NOT_NEEDED" = xyes; then
48212    if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
48213      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
48214$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
48215    fi
48216    ALSA_CFLAGS=
48217    ALSA_LIBS=
48218  else
48219    ALSA_FOUND=no
48220
48221    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
48222      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
48223    fi
48224
48225    if test "x${with_alsa}" != x; then
48226      ALSA_LIBS="-L${with_alsa}/lib -lasound"
48227      ALSA_CFLAGS="-I${with_alsa}/include"
48228      ALSA_FOUND=yes
48229    fi
48230    if test "x${with_alsa_include}" != x; then
48231      ALSA_CFLAGS="-I${with_alsa_include}"
48232      ALSA_FOUND=yes
48233    fi
48234    if test "x${with_alsa_lib}" != x; then
48235      ALSA_LIBS="-L${with_alsa_lib} -lasound"
48236      ALSA_FOUND=yes
48237    fi
48238    if test "x$ALSA_FOUND" = xno; then
48239
48240
48241  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
48242    # Source the builddeps file again, to make sure it uses the latest variables!
48243    . $builddepsfile
48244    # Look for a target and build machine specific resource!
48245    eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
48246    if test "x$resource" = x; then
48247      # Ok, lets instead look for a target specific resource
48248      eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
48249    fi
48250    if test "x$resource" = x; then
48251      # Ok, lets instead look for a build specific resource
48252      eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
48253    fi
48254    if test "x$resource" = x; then
48255      # Ok, lets instead look for a generic resource
48256      # (The alsa comes from M4 and not the shell, thus no need for eval here.)
48257      resource=${builddep_alsa}
48258    fi
48259    if test "x$resource" != x; then
48260      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
48261$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
48262      # If the resource in the builddeps.conf file is an existing directory,
48263      # for example /java/linux/cups
48264      if test -d ${resource}; then
48265        depdir=${resource}
48266      else
48267
48268  # alsa is for example mymodule
48269  # $resource is for example libs/general/libmymod_1_2_3.zip
48270  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
48271  # $with_builddeps_dir is for example /localhome/builddeps
48272  # depdir is the name of the variable into which we store the depdir, eg MYMOD
48273  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
48274  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
48275  filename=`basename $resource`
48276  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
48277  filebase=${filename%%.*}
48278  extension=${filename#*.}
48279  installdir=$with_builddeps_dir/$filebase
48280  if test ! -f $installdir/$filename.unpacked; then
48281    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
48282$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
48283    if test ! -d $installdir; then
48284      mkdir -p $installdir
48285    fi
48286    if test ! -d $installdir; then
48287      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
48288    fi
48289    tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
48290    touch $tmpfile
48291    if test ! -f $tmpfile; then
48292      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
48293    fi
48294
48295  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
48296  # $tmpfile is the local file name for the downloaded file.
48297  VALID_TOOL=no
48298  if test "x$BDEPS_FTP" = xwget; then
48299    VALID_TOOL=yes
48300    wget -O $tmpfile $with_builddeps_server/$resource
48301  fi
48302  if test "x$BDEPS_FTP" = xlftp; then
48303    VALID_TOOL=yes
48304    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
48305  fi
48306  if test "x$BDEPS_FTP" = xftp; then
48307    VALID_TOOL=yes
48308    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
48309    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
48310    FTPUSERPWD=${FTPSERVER%%@*}
48311    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
48312      FTPUSER=${userpwd%%:*}
48313      FTPPWD=${userpwd#*@}
48314      FTPSERVER=${FTPSERVER#*@}
48315    else
48316      FTPUSER=ftp
48317      FTPPWD=ftp
48318    fi
48319    # the "pass" command does not work on some
48320    # ftp clients (read ftp.exe) but if it works,
48321    # passive mode is better!
48322    ( \
48323        echo "user $FTPUSER $FTPPWD"        ; \
48324        echo "pass"                         ; \
48325        echo "bin"                          ; \
48326        echo "get $FTPPATH $tmpfile"              ; \
48327    ) | ftp -in $FTPSERVER
48328  fi
48329  if test "x$VALID_TOOL" != xyes; then
48330    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
48331  fi
48332
48333    mv $tmpfile $installdir/$filename
48334    if test ! -s $installdir/$filename; then
48335      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
48336    fi
48337    case "$extension" in
48338      zip)  echo "Unzipping $installdir/$filename..."
48339        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
48340        ;;
48341      tar.gz) echo "Untaring $installdir/$filename..."
48342        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
48343        ;;
48344      tgz) echo "Untaring $installdir/$filename..."
48345        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
48346        ;;
48347      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
48348        ;;
48349    esac
48350  fi
48351  if test -f $installdir/$filename.unpacked; then
48352    depdir=$installdir
48353  fi
48354
48355      fi
48356      # Source the builddeps file again, because in the previous command, the depdir
48357      # was updated to point at the current build dependency install directory.
48358      . $builddepsfile
48359      # Now extract variables from the builddeps.conf files.
48360      theroot=${builddep_alsa_ROOT}
48361      thecflags=${builddep_alsa_CFLAGS}
48362      thelibs=${builddep_alsa_LIBS}
48363      if test "x$depdir" = x; then
48364        as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
48365      fi
48366      ALSA=$depdir
48367      if test "x$theroot" != x; then
48368        ALSA="$theroot"
48369      fi
48370      if test "x$thecflags" != x; then
48371        ALSA_CFLAGS="$thecflags"
48372      fi
48373      if test "x$thelibs" != x; then
48374        ALSA_LIBS="$thelibs"
48375      fi
48376      ALSA_FOUND=yes
48377      else ALSA_FOUND=no
48378
48379    fi
48380    else ALSA_FOUND=no
48381
48382  fi
48383
48384    fi
48385    # Do not try pkg-config if we have a sysroot set.
48386    if test "x$SYSROOT" = x; then
48387      if test "x$ALSA_FOUND" = xno; then
48388
48389pkg_failed=no
48390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
48391$as_echo_n "checking for ALSA... " >&6; }
48392
48393if test -n "$ALSA_CFLAGS"; then
48394    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
48395 elif test -n "$PKG_CONFIG"; then
48396    if test -n "$PKG_CONFIG" && \
48397    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
48398  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
48399  ac_status=$?
48400  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48401  test $ac_status = 0; }; then
48402  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
48403else
48404  pkg_failed=yes
48405fi
48406 else
48407    pkg_failed=untried
48408fi
48409if test -n "$ALSA_LIBS"; then
48410    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
48411 elif test -n "$PKG_CONFIG"; then
48412    if test -n "$PKG_CONFIG" && \
48413    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
48414  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
48415  ac_status=$?
48416  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48417  test $ac_status = 0; }; then
48418  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
48419else
48420  pkg_failed=yes
48421fi
48422 else
48423    pkg_failed=untried
48424fi
48425
48426
48427
48428if test $pkg_failed = yes; then
48429
48430if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48431        _pkg_short_errors_supported=yes
48432else
48433        _pkg_short_errors_supported=no
48434fi
48435        if test $_pkg_short_errors_supported = yes; then
48436	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
48437        else
48438	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
48439        fi
48440	# Put the nasty error message in config.log where it belongs
48441	echo "$ALSA_PKG_ERRORS" >&5
48442
48443	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48444$as_echo "no" >&6; }
48445                ALSA_FOUND=no
48446elif test $pkg_failed = untried; then
48447	ALSA_FOUND=no
48448else
48449	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
48450	ALSA_LIBS=$pkg_cv_ALSA_LIBS
48451        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48452$as_echo "yes" >&6; }
48453	ALSA_FOUND=yes
48454fi
48455      fi
48456    fi
48457    if test "x$ALSA_FOUND" = xno; then
48458      for ac_header in alsa/asoundlib.h
48459do :
48460  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
48461if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
48462  cat >>confdefs.h <<_ACEOF
48463#define HAVE_ALSA_ASOUNDLIB_H 1
48464_ACEOF
48465
48466            ALSA_FOUND=yes
48467            ALSA_CFLAGS=-Iignoreme
48468            ALSA_LIBS=-lasound
48469            DEFAULT_ALSA=yes
48470
48471else
48472  ALSA_FOUND=no
48473fi
48474
48475done
48476
48477    fi
48478    if test "x$ALSA_FOUND" = xno; then
48479
48480  # Print a helpful message on how to acquire the necessary build dependency.
48481  # alsa is the help tag: freetype, cups, pulse, alsa etc
48482  MISSING_DEPENDENCY=alsa
48483
48484  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48485    cygwin_help $MISSING_DEPENDENCY
48486  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48487    msys_help $MISSING_DEPENDENCY
48488  else
48489    PKGHANDLER_COMMAND=
48490
48491    case $PKGHANDLER in
48492      apt-get)
48493        apt_help     $MISSING_DEPENDENCY ;;
48494      yum)
48495        yum_help     $MISSING_DEPENDENCY ;;
48496      port)
48497        port_help    $MISSING_DEPENDENCY ;;
48498      pkgutil)
48499        pkgutil_help $MISSING_DEPENDENCY ;;
48500      pkgadd)
48501        pkgadd_help  $MISSING_DEPENDENCY ;;
48502    esac
48503
48504    if test "x$PKGHANDLER_COMMAND" != x; then
48505      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48506    fi
48507  fi
48508
48509      as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
48510    fi
48511  fi
48512
48513
48514
48515
48516
48517
48518  ###############################################################################
48519  #
48520  # Check for the jpeg library
48521  #
48522
48523
48524# Check whether --with-libjpeg was given.
48525if test "${with_libjpeg+set}" = set; then :
48526  withval=$with_libjpeg;
48527fi
48528
48529
48530  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
48531$as_echo_n "checking for which libjpeg to use... " >&6; }
48532
48533  # default is bundled
48534  DEFAULT_LIBJPEG=bundled
48535
48536  #
48537  # if user didn't specify, use DEFAULT_LIBJPEG
48538  #
48539  if test "x${with_libjpeg}" = "x"; then
48540    with_libjpeg=${DEFAULT_LIBJPEG}
48541  fi
48542
48543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
48544$as_echo "${with_libjpeg}" >&6; }
48545
48546  if test "x${with_libjpeg}" = "xbundled"; then
48547    USE_EXTERNAL_LIBJPEG=false
48548  elif test "x${with_libjpeg}" = "xsystem"; then
48549    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
48550if test "x$ac_cv_header_jpeglib_h" = xyes; then :
48551
48552else
48553   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
48554fi
48555
48556
48557    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
48558$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
48559if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
48560  $as_echo_n "(cached) " >&6
48561else
48562  ac_check_lib_save_LIBS=$LIBS
48563LIBS="-ljpeg  $LIBS"
48564cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48565/* end confdefs.h.  */
48566
48567/* Override any GCC internal prototype to avoid an error.
48568   Use char because int might match the return type of a GCC
48569   builtin and then its argument prototype would still apply.  */
48570#ifdef __cplusplus
48571extern "C"
48572#endif
48573char jpeg_CreateDecompress ();
48574int
48575main ()
48576{
48577return jpeg_CreateDecompress ();
48578  ;
48579  return 0;
48580}
48581_ACEOF
48582if ac_fn_cxx_try_link "$LINENO"; then :
48583  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
48584else
48585  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
48586fi
48587rm -f core conftest.err conftest.$ac_objext \
48588    conftest$ac_exeext conftest.$ac_ext
48589LIBS=$ac_check_lib_save_LIBS
48590fi
48591{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
48592$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
48593if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
48594  cat >>confdefs.h <<_ACEOF
48595#define HAVE_LIBJPEG 1
48596_ACEOF
48597
48598  LIBS="-ljpeg $LIBS"
48599
48600else
48601   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
48602fi
48603
48604
48605    USE_EXTERNAL_LIBJPEG=true
48606  else
48607    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
48608  fi
48609
48610
48611
48612  ###############################################################################
48613  #
48614  # Check for the gif library
48615  #
48616
48617
48618# Check whether --with-giflib was given.
48619if test "${with_giflib+set}" = set; then :
48620  withval=$with_giflib;
48621fi
48622
48623
48624
48625  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
48626$as_echo_n "checking for which giflib to use... " >&6; }
48627
48628  # default is bundled
48629  DEFAULT_GIFLIB=bundled
48630
48631  #
48632  # if user didn't specify, use DEFAULT_GIFLIB
48633  #
48634  if test "x${with_giflib}" = "x"; then
48635    with_giflib=${DEFAULT_GIFLIB}
48636  fi
48637
48638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
48639$as_echo "${with_giflib}" >&6; }
48640
48641  if test "x${with_giflib}" = "xbundled"; then
48642    USE_EXTERNAL_LIBGIF=false
48643  elif test "x${with_giflib}" = "xsystem"; then
48644    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
48645if test "x$ac_cv_header_gif_lib_h" = xyes; then :
48646
48647else
48648   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
48649fi
48650
48651
48652    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
48653$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
48654if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
48655  $as_echo_n "(cached) " >&6
48656else
48657  ac_check_lib_save_LIBS=$LIBS
48658LIBS="-lgif  $LIBS"
48659cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48660/* end confdefs.h.  */
48661
48662/* Override any GCC internal prototype to avoid an error.
48663   Use char because int might match the return type of a GCC
48664   builtin and then its argument prototype would still apply.  */
48665#ifdef __cplusplus
48666extern "C"
48667#endif
48668char DGifGetCode ();
48669int
48670main ()
48671{
48672return DGifGetCode ();
48673  ;
48674  return 0;
48675}
48676_ACEOF
48677if ac_fn_cxx_try_link "$LINENO"; then :
48678  ac_cv_lib_gif_DGifGetCode=yes
48679else
48680  ac_cv_lib_gif_DGifGetCode=no
48681fi
48682rm -f core conftest.err conftest.$ac_objext \
48683    conftest$ac_exeext conftest.$ac_ext
48684LIBS=$ac_check_lib_save_LIBS
48685fi
48686{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
48687$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
48688if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
48689  cat >>confdefs.h <<_ACEOF
48690#define HAVE_LIBGIF 1
48691_ACEOF
48692
48693  LIBS="-lgif $LIBS"
48694
48695else
48696   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
48697fi
48698
48699
48700    USE_EXTERNAL_LIBGIF=true
48701  else
48702    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
48703  fi
48704
48705
48706  ###############################################################################
48707  #
48708  # Check for the lcms2 library
48709  #
48710
48711
48712# Check whether --with-lcms was given.
48713if test "${with_lcms+set}" = set; then :
48714  withval=$with_lcms;
48715fi
48716
48717
48718  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
48719$as_echo_n "checking for which lcms to use... " >&6; }
48720
48721  DEFAULT_LCMS=bundled
48722
48723  #
48724  # If user didn't specify, use DEFAULT_LCMS
48725  #
48726  if test "x${with_lcms}" = "x"; then
48727      with_lcms=${DEFAULT_LCMS}
48728  fi
48729
48730  if test "x${with_lcms}" = "xbundled"; then
48731    USE_EXTERNAL_LCMS=false
48732    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
48733$as_echo "bundled" >&6; }
48734  elif test "x${with_lcms}" = "xsystem"; then
48735    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
48736$as_echo "system" >&6; }
48737
48738pkg_failed=no
48739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
48740$as_echo_n "checking for LCMS... " >&6; }
48741
48742if test -n "$LCMS_CFLAGS"; then
48743    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
48744 elif test -n "$PKG_CONFIG"; then
48745    if test -n "$PKG_CONFIG" && \
48746    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
48747  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
48748  ac_status=$?
48749  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48750  test $ac_status = 0; }; then
48751  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
48752else
48753  pkg_failed=yes
48754fi
48755 else
48756    pkg_failed=untried
48757fi
48758if test -n "$LCMS_LIBS"; then
48759    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
48760 elif test -n "$PKG_CONFIG"; then
48761    if test -n "$PKG_CONFIG" && \
48762    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
48763  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
48764  ac_status=$?
48765  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48766  test $ac_status = 0; }; then
48767  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
48768else
48769  pkg_failed=yes
48770fi
48771 else
48772    pkg_failed=untried
48773fi
48774
48775
48776
48777if test $pkg_failed = yes; then
48778
48779if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48780        _pkg_short_errors_supported=yes
48781else
48782        _pkg_short_errors_supported=no
48783fi
48784        if test $_pkg_short_errors_supported = yes; then
48785	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
48786        else
48787	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
48788        fi
48789	# Put the nasty error message in config.log where it belongs
48790	echo "$LCMS_PKG_ERRORS" >&5
48791
48792	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48793$as_echo "no" >&6; }
48794                LCMS_FOUND=no
48795elif test $pkg_failed = untried; then
48796	LCMS_FOUND=no
48797else
48798	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
48799	LCMS_LIBS=$pkg_cv_LCMS_LIBS
48800        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48801$as_echo "yes" >&6; }
48802	LCMS_FOUND=yes
48803fi
48804    if test "x${LCMS_FOUND}" = "xyes"; then
48805      USE_EXTERNAL_LCMS=true
48806    else
48807      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
48808    fi
48809  else
48810    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
48811  fi
48812
48813
48814
48815  ###############################################################################
48816  #
48817  # Check for the png library
48818  #
48819
48820
48821# Check whether --with-libpng was given.
48822if test "${with_libpng+set}" = set; then :
48823  withval=$with_libpng;
48824fi
48825
48826
48827
48828  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
48829$as_echo_n "checking for which libpng to use... " >&6; }
48830
48831  # default is bundled
48832  DEFAULT_LIBPNG=bundled
48833
48834  #
48835  # if user didn't specify, use DEFAULT_LIBPNG
48836  #
48837  if test "x${with_libpng}" = "x"; then
48838      with_libpng=${DEFAULT_LIBPNG}
48839  fi
48840
48841  if test "x${with_libpng}" = "xbundled"; then
48842      USE_EXTERNAL_LIBPNG=false
48843      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
48844$as_echo "bundled" >&6; }
48845  elif test "x${with_libpng}" = "xsystem"; then
48846
48847pkg_failed=no
48848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
48849$as_echo_n "checking for PNG... " >&6; }
48850
48851if test -n "$PNG_CFLAGS"; then
48852    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
48853 elif test -n "$PKG_CONFIG"; then
48854    if test -n "$PKG_CONFIG" && \
48855    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
48856  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
48857  ac_status=$?
48858  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48859  test $ac_status = 0; }; then
48860  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
48861else
48862  pkg_failed=yes
48863fi
48864 else
48865    pkg_failed=untried
48866fi
48867if test -n "$PNG_LIBS"; then
48868    pkg_cv_PNG_LIBS="$PNG_LIBS"
48869 elif test -n "$PKG_CONFIG"; then
48870    if test -n "$PKG_CONFIG" && \
48871    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
48872  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
48873  ac_status=$?
48874  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48875  test $ac_status = 0; }; then
48876  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
48877else
48878  pkg_failed=yes
48879fi
48880 else
48881    pkg_failed=untried
48882fi
48883
48884
48885
48886if test $pkg_failed = yes; then
48887
48888if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48889        _pkg_short_errors_supported=yes
48890else
48891        _pkg_short_errors_supported=no
48892fi
48893        if test $_pkg_short_errors_supported = yes; then
48894	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
48895        else
48896	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
48897        fi
48898	# Put the nasty error message in config.log where it belongs
48899	echo "$PNG_PKG_ERRORS" >&5
48900
48901	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48902$as_echo "no" >&6; }
48903                 LIBPNG_FOUND=no
48904elif test $pkg_failed = untried; then
48905	 LIBPNG_FOUND=no
48906else
48907	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
48908	PNG_LIBS=$pkg_cv_PNG_LIBS
48909        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48910$as_echo "yes" >&6; }
48911	 LIBPNG_FOUND=yes
48912fi
48913      if test "x${LIBPNG_FOUND}" = "xyes"; then
48914          USE_EXTERNAL_LIBPNG=true
48915          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
48916$as_echo "system" >&6; }
48917      else
48918          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
48919$as_echo "system not found" >&6; }
48920          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
48921      fi
48922  else
48923      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
48924  fi
48925
48926
48927  ###############################################################################
48928  #
48929  # Check for the zlib library
48930  #
48931
48932
48933# Check whether --with-zlib was given.
48934if test "${with_zlib+set}" = set; then :
48935  withval=$with_zlib;
48936fi
48937
48938
48939  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
48940$as_echo_n "checking for compress in -lz... " >&6; }
48941if ${ac_cv_lib_z_compress+:} false; then :
48942  $as_echo_n "(cached) " >&6
48943else
48944  ac_check_lib_save_LIBS=$LIBS
48945LIBS="-lz  $LIBS"
48946cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48947/* end confdefs.h.  */
48948
48949/* Override any GCC internal prototype to avoid an error.
48950   Use char because int might match the return type of a GCC
48951   builtin and then its argument prototype would still apply.  */
48952#ifdef __cplusplus
48953extern "C"
48954#endif
48955char compress ();
48956int
48957main ()
48958{
48959return compress ();
48960  ;
48961  return 0;
48962}
48963_ACEOF
48964if ac_fn_cxx_try_link "$LINENO"; then :
48965  ac_cv_lib_z_compress=yes
48966else
48967  ac_cv_lib_z_compress=no
48968fi
48969rm -f core conftest.err conftest.$ac_objext \
48970    conftest$ac_exeext conftest.$ac_ext
48971LIBS=$ac_check_lib_save_LIBS
48972fi
48973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
48974$as_echo "$ac_cv_lib_z_compress" >&6; }
48975if test "x$ac_cv_lib_z_compress" = xyes; then :
48976   ZLIB_FOUND=yes
48977else
48978   ZLIB_FOUND=no
48979fi
48980
48981
48982  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
48983$as_echo_n "checking for which zlib to use... " >&6; }
48984
48985  DEFAULT_ZLIB=bundled
48986  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48987    #
48988    # On macosx default is system...on others default is
48989    #
48990    DEFAULT_ZLIB=system
48991  fi
48992
48993  if test "x${ZLIB_FOUND}" != "xyes"; then
48994    #
48995    # If we don't find any system...set default to bundled
48996    #
48997    DEFAULT_ZLIB=bundled
48998  fi
48999
49000  #
49001  # If user didn't specify, use DEFAULT_ZLIB
49002  #
49003  if test "x${with_zlib}" = "x"; then
49004    with_zlib=${DEFAULT_ZLIB}
49005  fi
49006
49007  if test "x${with_zlib}" = "xbundled"; then
49008    USE_EXTERNAL_LIBZ=false
49009    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
49010$as_echo "bundled" >&6; }
49011  elif test "x${with_zlib}" = "xsystem"; then
49012    if test "x${ZLIB_FOUND}" = "xyes"; then
49013      USE_EXTERNAL_LIBZ=true
49014      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49015$as_echo "system" >&6; }
49016    else
49017      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
49018$as_echo "system not found" >&6; }
49019      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
49020    fi
49021  else
49022    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
49023  fi
49024
49025
49026
49027  ###############################################################################
49028  LIBZIP_CAN_USE_MMAP=true
49029
49030
49031
49032  ###############################################################################
49033  #
49034  # Check if altzone exists in time.h
49035  #
49036
49037  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49038/* end confdefs.h.  */
49039#include <time.h>
49040int
49041main ()
49042{
49043return (int)altzone;
49044  ;
49045  return 0;
49046}
49047_ACEOF
49048if ac_fn_cxx_try_link "$LINENO"; then :
49049  has_altzone=yes
49050else
49051  has_altzone=no
49052fi
49053rm -f core conftest.err conftest.$ac_objext \
49054    conftest$ac_exeext conftest.$ac_ext
49055  if test "x$has_altzone" = xyes; then
49056
49057$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
49058
49059  fi
49060
49061  ###############################################################################
49062  #
49063  # Check the maths library
49064  #
49065
49066  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
49067$as_echo_n "checking for cos in -lm... " >&6; }
49068if ${ac_cv_lib_m_cos+:} false; then :
49069  $as_echo_n "(cached) " >&6
49070else
49071  ac_check_lib_save_LIBS=$LIBS
49072LIBS="-lm  $LIBS"
49073cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49074/* end confdefs.h.  */
49075
49076/* Override any GCC internal prototype to avoid an error.
49077   Use char because int might match the return type of a GCC
49078   builtin and then its argument prototype would still apply.  */
49079#ifdef __cplusplus
49080extern "C"
49081#endif
49082char cos ();
49083int
49084main ()
49085{
49086return cos ();
49087  ;
49088  return 0;
49089}
49090_ACEOF
49091if ac_fn_cxx_try_link "$LINENO"; then :
49092  ac_cv_lib_m_cos=yes
49093else
49094  ac_cv_lib_m_cos=no
49095fi
49096rm -f core conftest.err conftest.$ac_objext \
49097    conftest$ac_exeext conftest.$ac_ext
49098LIBS=$ac_check_lib_save_LIBS
49099fi
49100{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
49101$as_echo "$ac_cv_lib_m_cos" >&6; }
49102if test "x$ac_cv_lib_m_cos" = xyes; then :
49103  cat >>confdefs.h <<_ACEOF
49104#define HAVE_LIBM 1
49105_ACEOF
49106
49107  LIBS="-lm $LIBS"
49108
49109else
49110
49111        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
49112$as_echo "$as_me: Maths library was not found" >&6;}
49113
49114
49115fi
49116
49117
49118
49119  ###############################################################################
49120  #
49121  # Check for libdl.so
49122
49123  save_LIBS="$LIBS"
49124  LIBS=""
49125  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
49126$as_echo_n "checking for dlopen in -ldl... " >&6; }
49127if ${ac_cv_lib_dl_dlopen+:} false; then :
49128  $as_echo_n "(cached) " >&6
49129else
49130  ac_check_lib_save_LIBS=$LIBS
49131LIBS="-ldl  $LIBS"
49132cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49133/* end confdefs.h.  */
49134
49135/* Override any GCC internal prototype to avoid an error.
49136   Use char because int might match the return type of a GCC
49137   builtin and then its argument prototype would still apply.  */
49138#ifdef __cplusplus
49139extern "C"
49140#endif
49141char dlopen ();
49142int
49143main ()
49144{
49145return dlopen ();
49146  ;
49147  return 0;
49148}
49149_ACEOF
49150if ac_fn_cxx_try_link "$LINENO"; then :
49151  ac_cv_lib_dl_dlopen=yes
49152else
49153  ac_cv_lib_dl_dlopen=no
49154fi
49155rm -f core conftest.err conftest.$ac_objext \
49156    conftest$ac_exeext conftest.$ac_ext
49157LIBS=$ac_check_lib_save_LIBS
49158fi
49159{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
49160$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
49161if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
49162  cat >>confdefs.h <<_ACEOF
49163#define HAVE_LIBDL 1
49164_ACEOF
49165
49166  LIBS="-ldl $LIBS"
49167
49168fi
49169
49170  LIBDL="$LIBS"
49171
49172  LIBS="$save_LIBS"
49173
49174
49175  ###############################################################################
49176  #
49177  # statically link libstdc++ before C++ ABI is stablized on Linux unless
49178  # dynamic build is configured on command line.
49179  #
49180
49181# Check whether --with-stdc++lib was given.
49182if test "${with_stdc__lib+set}" = set; then :
49183  withval=$with_stdc__lib;
49184        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
49185                && test "x$with_stdc__lib" != xdefault; then
49186          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
49187        fi
49188
49189else
49190  with_stdc__lib=default
49191
49192fi
49193
49194
49195  if test "x$OPENJDK_TARGET_OS" = xlinux; then
49196    # Test if -lstdc++ works.
49197    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
49198$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
49199    ac_ext=cpp
49200ac_cpp='$CXXCPP $CPPFLAGS'
49201ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49202ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49203ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49204
49205    OLD_CXXFLAGS="$CXXFLAGS"
49206    CXXFLAGS="$CXXFLAGS -lstdc++"
49207    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49208/* end confdefs.h.  */
49209
49210int
49211main ()
49212{
49213return 0;
49214  ;
49215  return 0;
49216}
49217_ACEOF
49218if ac_fn_cxx_try_link "$LINENO"; then :
49219  has_dynamic_libstdcxx=yes
49220else
49221  has_dynamic_libstdcxx=no
49222fi
49223rm -f core conftest.err conftest.$ac_objext \
49224    conftest$ac_exeext conftest.$ac_ext
49225    CXXFLAGS="$OLD_CXXFLAGS"
49226    ac_ext=cpp
49227ac_cpp='$CXXCPP $CPPFLAGS'
49228ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49229ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49230ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49231
49232    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
49233$as_echo "$has_dynamic_libstdcxx" >&6; }
49234
49235    # Test if stdc++ can be linked statically.
49236    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
49237$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
49238    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
49239    ac_ext=cpp
49240ac_cpp='$CXXCPP $CPPFLAGS'
49241ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49242ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49243ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49244
49245    OLD_LIBS="$LIBS"
49246    OLD_CXX="$CXX"
49247    LIBS="$STATIC_STDCXX_FLAGS"
49248    CXX="$CC"
49249    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49250/* end confdefs.h.  */
49251
49252int
49253main ()
49254{
49255return 0;
49256  ;
49257  return 0;
49258}
49259_ACEOF
49260if ac_fn_cxx_try_link "$LINENO"; then :
49261  has_static_libstdcxx=yes
49262else
49263  has_static_libstdcxx=no
49264fi
49265rm -f core conftest.err conftest.$ac_objext \
49266    conftest$ac_exeext conftest.$ac_ext
49267    LIBS="$OLD_LIBS"
49268    CXX="$OLD_CXX"
49269    ac_ext=cpp
49270ac_cpp='$CXXCPP $CPPFLAGS'
49271ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49272ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49273ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49274
49275    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
49276$as_echo "$has_static_libstdcxx" >&6; }
49277
49278    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
49279      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
49280    fi
49281
49282    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
49283      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
49284    fi
49285
49286    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
49287      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
49288    fi
49289
49290    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
49291$as_echo_n "checking how to link with libstdc++... " >&6; }
49292    # If dynamic was requested, it's available since it would fail above otherwise.
49293    # If dynamic wasn't requested, go with static unless it isn't available.
49294    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49295      LIBCXX="$LIBCXX -lstdc++"
49296      LDCXX="$CXX"
49297      STATIC_CXX_SETTING="STATIC_CXX=false"
49298      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
49299$as_echo "dynamic" >&6; }
49300    else
49301      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
49302      LDCXX="$CC"
49303      STATIC_CXX_SETTING="STATIC_CXX=true"
49304      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
49305$as_echo "static" >&6; }
49306    fi
49307  fi
49308
49309
49310  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49311    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
49312
49313pkg_failed=no
49314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
49315$as_echo_n "checking for LIBFFI... " >&6; }
49316
49317if test -n "$LIBFFI_CFLAGS"; then
49318    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
49319 elif test -n "$PKG_CONFIG"; then
49320    if test -n "$PKG_CONFIG" && \
49321    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
49322  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
49323  ac_status=$?
49324  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49325  test $ac_status = 0; }; then
49326  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
49327else
49328  pkg_failed=yes
49329fi
49330 else
49331    pkg_failed=untried
49332fi
49333if test -n "$LIBFFI_LIBS"; then
49334    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
49335 elif test -n "$PKG_CONFIG"; then
49336    if test -n "$PKG_CONFIG" && \
49337    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
49338  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
49339  ac_status=$?
49340  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49341  test $ac_status = 0; }; then
49342  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
49343else
49344  pkg_failed=yes
49345fi
49346 else
49347    pkg_failed=untried
49348fi
49349
49350
49351
49352if test $pkg_failed = yes; then
49353
49354if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49355        _pkg_short_errors_supported=yes
49356else
49357        _pkg_short_errors_supported=no
49358fi
49359        if test $_pkg_short_errors_supported = yes; then
49360	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
49361        else
49362	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
49363        fi
49364	# Put the nasty error message in config.log where it belongs
49365	echo "$LIBFFI_PKG_ERRORS" >&5
49366
49367	as_fn_error $? "Package requirements (libffi) were not met:
49368
49369$LIBFFI_PKG_ERRORS
49370
49371Consider adjusting the PKG_CONFIG_PATH environment variable if you
49372installed software in a non-standard prefix.
49373
49374Alternatively, you may set the environment variables LIBFFI_CFLAGS
49375and LIBFFI_LIBS to avoid the need to call pkg-config.
49376See the pkg-config man page for more details.
49377" "$LINENO" 5
49378elif test $pkg_failed = untried; then
49379	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
49380$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
49381as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
49382is in your PATH or set the PKG_CONFIG environment variable to the full
49383path to pkg-config.
49384
49385Alternatively, you may set the environment variables LIBFFI_CFLAGS
49386and LIBFFI_LIBS to avoid the need to call pkg-config.
49387See the pkg-config man page for more details.
49388
49389To get pkg-config, see <http://pkg-config.freedesktop.org/>.
49390See \`config.log' for more details" "$LINENO" 5; }
49391else
49392	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
49393	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
49394        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49395$as_echo "yes" >&6; }
49396	:
49397fi
49398
49399  fi
49400
49401  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49402    # Extract the first word of "llvm-config", so it can be a program name with args.
49403set dummy llvm-config; ac_word=$2
49404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
49405$as_echo_n "checking for $ac_word... " >&6; }
49406if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
49407  $as_echo_n "(cached) " >&6
49408else
49409  if test -n "$LLVM_CONFIG"; then
49410  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
49411else
49412as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49413for as_dir in $PATH
49414do
49415  IFS=$as_save_IFS
49416  test -z "$as_dir" && as_dir=.
49417    for ac_exec_ext in '' $ac_executable_extensions; do
49418  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
49419    ac_cv_prog_LLVM_CONFIG="llvm-config"
49420    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
49421    break 2
49422  fi
49423done
49424  done
49425IFS=$as_save_IFS
49426
49427fi
49428fi
49429LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
49430if test -n "$LLVM_CONFIG"; then
49431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
49432$as_echo "$LLVM_CONFIG" >&6; }
49433else
49434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49435$as_echo "no" >&6; }
49436fi
49437
49438
49439
49440    if test "x$LLVM_CONFIG" != xllvm-config; then
49441      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
49442    fi
49443
49444    llvm_components="jit mcjit engine nativecodegen native"
49445    unset LLVM_CFLAGS
49446    for flag in $("$LLVM_CONFIG" --cxxflags); do
49447      if echo "${flag}" | grep -q '^-[ID]'; then
49448        if test "${flag}" != "-D_DEBUG" ; then
49449          if test "${LLVM_CFLAGS}" != "" ; then
49450            LLVM_CFLAGS="${LLVM_CFLAGS} "
49451          fi
49452          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
49453        fi
49454      fi
49455    done
49456    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
49457    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
49458
49459    unset LLVM_LDFLAGS
49460    for flag in $("${LLVM_CONFIG}" --ldflags); do
49461      if echo "${flag}" | grep -q '^-L'; then
49462        if test "${LLVM_LDFLAGS}" != ""; then
49463          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
49464        fi
49465        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
49466      fi
49467    done
49468
49469    unset LLVM_LIBS
49470    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
49471      if echo "${flag}" | grep -q '^-l'; then
49472        if test "${LLVM_LIBS}" != ""; then
49473          LLVM_LIBS="${LLVM_LIBS} "
49474        fi
49475        LLVM_LIBS="${LLVM_LIBS}${flag}"
49476      fi
49477    done
49478
49479
49480
49481
49482  fi
49483
49484  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
49485  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
49486    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
49487  fi
49488
49489  # TODO better (platform agnostic) test
49490  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
49491    LIBCXX="-lstdc++"
49492  fi
49493
49494
49495
49496
49497  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
49498
49499
49500# Check whether --with-msvcr-dll was given.
49501if test "${with_msvcr_dll+set}" = set; then :
49502  withval=$with_msvcr_dll;
49503fi
49504
49505
49506  if test "x$with_msvcr_dll" != x; then
49507    # If given explicitely by user, do not probe. If not present, fail directly.
49508
49509  DLL_NAME="$MSVCR_NAME"
49510  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
49511  METHOD="--with-msvcr-dll"
49512  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49513    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49514$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49515
49516    # Need to check if the found msvcr is correct architecture
49517    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49518$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49519    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49520    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49521      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49522      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49523      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49524        CORRECT_MSVCR_ARCH="PE32 executable"
49525      else
49526        CORRECT_MSVCR_ARCH="PE32+ executable"
49527      fi
49528    else
49529      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49530        CORRECT_MSVCR_ARCH=386
49531      else
49532        CORRECT_MSVCR_ARCH=x86-64
49533      fi
49534    fi
49535    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49536      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49537$as_echo "ok" >&6; }
49538      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49539
49540  # Only process if variable expands to non-empty
49541
49542  if test "x$MSVC_DLL" != x; then
49543    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49544
49545  # Input might be given as Windows format, start by converting to
49546  # unix format.
49547  path="$MSVC_DLL"
49548  new_path=`$CYGPATH -u "$path"`
49549
49550  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49551  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49552  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49553  # "foo.exe" is OK but "foo" is an error.
49554  #
49555  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49556  # It is also a way to make sure we got the proper file name for the real test later on.
49557  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49558  if test "x$test_shortpath" = x; then
49559    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49560$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49561    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49562  fi
49563
49564  # Call helper function which possibly converts this using DOS-style short mode.
49565  # If so, the updated path is stored in $new_path.
49566
49567  input_path="$new_path"
49568  # Check if we need to convert this using DOS-style short mode. If the path
49569  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49570  # take no chances and rewrite it.
49571  # Note: m4 eats our [], so we need to use [ and ] instead.
49572  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49573  if test "x$has_forbidden_chars" != x; then
49574    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49575    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49576    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49577    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49578      # Going to short mode and back again did indeed matter. Since short mode is
49579      # case insensitive, let's make it lowercase to improve readability.
49580      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49581      # Now convert it back to Unix-style (cygpath)
49582      input_path=`$CYGPATH -u "$shortmode_path"`
49583      new_path="$input_path"
49584    fi
49585  fi
49586
49587  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49588  if test "x$test_cygdrive_prefix" = x; then
49589    # As a simple fix, exclude /usr/bin since it's not a real path.
49590    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49591      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49592      # a path prefixed by /cygdrive for fixpath to work.
49593      new_path="$CYGWIN_ROOT_PATH$input_path"
49594    fi
49595  fi
49596
49597
49598  if test "x$path" != "x$new_path"; then
49599    MSVC_DLL="$new_path"
49600    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49601$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49602  fi
49603
49604    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49605
49606  path="$MSVC_DLL"
49607  has_colon=`$ECHO $path | $GREP ^.:`
49608  new_path="$path"
49609  if test "x$has_colon" = x; then
49610    # Not in mixed or Windows style, start by that.
49611    new_path=`cmd //c echo $path`
49612  fi
49613
49614
49615  input_path="$new_path"
49616  # Check if we need to convert this using DOS-style short mode. If the path
49617  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49618  # take no chances and rewrite it.
49619  # Note: m4 eats our [], so we need to use [ and ] instead.
49620  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49621  if test "x$has_forbidden_chars" != x; then
49622    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49623    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49624  fi
49625
49626
49627  windows_path="$new_path"
49628  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49629    unix_path=`$CYGPATH -u "$windows_path"`
49630    new_path="$unix_path"
49631  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49632    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49633    new_path="$unix_path"
49634  fi
49635
49636  if test "x$path" != "x$new_path"; then
49637    MSVC_DLL="$new_path"
49638    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49639$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49640  fi
49641
49642  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49643  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49644
49645    else
49646      # We're on a unix platform. Hooray! :)
49647      path="$MSVC_DLL"
49648      has_space=`$ECHO "$path" | $GREP " "`
49649      if test "x$has_space" != x; then
49650        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49651$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49652        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49653      fi
49654
49655      # Use eval to expand a potential ~
49656      eval path="$path"
49657      if test ! -f "$path" && test ! -d "$path"; then
49658        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49659      fi
49660
49661      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49662    fi
49663  fi
49664
49665      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49666$as_echo_n "checking for $DLL_NAME... " >&6; }
49667      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49668$as_echo "$MSVC_DLL" >&6; }
49669    else
49670      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49671$as_echo "incorrect, ignoring" >&6; }
49672      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49673$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49674    fi
49675  fi
49676
49677    if test "x$MSVC_DLL" = x; then
49678      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
49679    fi
49680    MSVCR_DLL="$MSVC_DLL"
49681  elif test "x$DEVKIT_MSVCR_DLL" != x; then
49682
49683  DLL_NAME="$MSVCR_NAME"
49684  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
49685  METHOD="devkit"
49686  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49687    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49688$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49689
49690    # Need to check if the found msvcr is correct architecture
49691    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49692$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49693    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49694    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49695      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49696      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49697      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49698        CORRECT_MSVCR_ARCH="PE32 executable"
49699      else
49700        CORRECT_MSVCR_ARCH="PE32+ executable"
49701      fi
49702    else
49703      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49704        CORRECT_MSVCR_ARCH=386
49705      else
49706        CORRECT_MSVCR_ARCH=x86-64
49707      fi
49708    fi
49709    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49710      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49711$as_echo "ok" >&6; }
49712      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49713
49714  # Only process if variable expands to non-empty
49715
49716  if test "x$MSVC_DLL" != x; then
49717    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49718
49719  # Input might be given as Windows format, start by converting to
49720  # unix format.
49721  path="$MSVC_DLL"
49722  new_path=`$CYGPATH -u "$path"`
49723
49724  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49725  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49726  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49727  # "foo.exe" is OK but "foo" is an error.
49728  #
49729  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49730  # It is also a way to make sure we got the proper file name for the real test later on.
49731  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49732  if test "x$test_shortpath" = x; then
49733    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49734$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49735    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49736  fi
49737
49738  # Call helper function which possibly converts this using DOS-style short mode.
49739  # If so, the updated path is stored in $new_path.
49740
49741  input_path="$new_path"
49742  # Check if we need to convert this using DOS-style short mode. If the path
49743  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49744  # take no chances and rewrite it.
49745  # Note: m4 eats our [], so we need to use [ and ] instead.
49746  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49747  if test "x$has_forbidden_chars" != x; then
49748    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49749    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49750    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49751    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49752      # Going to short mode and back again did indeed matter. Since short mode is
49753      # case insensitive, let's make it lowercase to improve readability.
49754      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49755      # Now convert it back to Unix-style (cygpath)
49756      input_path=`$CYGPATH -u "$shortmode_path"`
49757      new_path="$input_path"
49758    fi
49759  fi
49760
49761  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49762  if test "x$test_cygdrive_prefix" = x; then
49763    # As a simple fix, exclude /usr/bin since it's not a real path.
49764    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49765      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49766      # a path prefixed by /cygdrive for fixpath to work.
49767      new_path="$CYGWIN_ROOT_PATH$input_path"
49768    fi
49769  fi
49770
49771
49772  if test "x$path" != "x$new_path"; then
49773    MSVC_DLL="$new_path"
49774    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49775$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49776  fi
49777
49778    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49779
49780  path="$MSVC_DLL"
49781  has_colon=`$ECHO $path | $GREP ^.:`
49782  new_path="$path"
49783  if test "x$has_colon" = x; then
49784    # Not in mixed or Windows style, start by that.
49785    new_path=`cmd //c echo $path`
49786  fi
49787
49788
49789  input_path="$new_path"
49790  # Check if we need to convert this using DOS-style short mode. If the path
49791  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49792  # take no chances and rewrite it.
49793  # Note: m4 eats our [], so we need to use [ and ] instead.
49794  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49795  if test "x$has_forbidden_chars" != x; then
49796    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49797    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49798  fi
49799
49800
49801  windows_path="$new_path"
49802  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49803    unix_path=`$CYGPATH -u "$windows_path"`
49804    new_path="$unix_path"
49805  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49806    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49807    new_path="$unix_path"
49808  fi
49809
49810  if test "x$path" != "x$new_path"; then
49811    MSVC_DLL="$new_path"
49812    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49813$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49814  fi
49815
49816  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49817  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49818
49819    else
49820      # We're on a unix platform. Hooray! :)
49821      path="$MSVC_DLL"
49822      has_space=`$ECHO "$path" | $GREP " "`
49823      if test "x$has_space" != x; then
49824        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49825$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49826        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49827      fi
49828
49829      # Use eval to expand a potential ~
49830      eval path="$path"
49831      if test ! -f "$path" && test ! -d "$path"; then
49832        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49833      fi
49834
49835      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49836    fi
49837  fi
49838
49839      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49840$as_echo_n "checking for $DLL_NAME... " >&6; }
49841      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49842$as_echo "$MSVC_DLL" >&6; }
49843    else
49844      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49845$as_echo "incorrect, ignoring" >&6; }
49846      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49847$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49848    fi
49849  fi
49850
49851    if test "x$MSVC_DLL" = x; then
49852      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
49853    fi
49854    MSVCR_DLL="$MSVC_DLL"
49855  else
49856
49857  DLL_NAME="${MSVCR_NAME}"
49858  MSVC_DLL=
49859
49860  if test "x$MSVC_DLL" = x; then
49861    # Probe: Using well-known location from Visual Studio 10.0
49862    if test "x$VCINSTALLDIR" != x; then
49863      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
49864
49865  windows_path="$CYGWIN_VC_INSTALL_DIR"
49866  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49867    unix_path=`$CYGPATH -u "$windows_path"`
49868    CYGWIN_VC_INSTALL_DIR="$unix_path"
49869  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49870    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49871    CYGWIN_VC_INSTALL_DIR="$unix_path"
49872  fi
49873
49874      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49875        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
49876      else
49877        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
49878      fi
49879      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
49880
49881  DLL_NAME="$DLL_NAME"
49882  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49883  METHOD="well-known location in VCINSTALLDIR"
49884  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49885    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49886$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49887
49888    # Need to check if the found msvcr is correct architecture
49889    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49890$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49891    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49892    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49893      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49894      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49895      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49896        CORRECT_MSVCR_ARCH="PE32 executable"
49897      else
49898        CORRECT_MSVCR_ARCH="PE32+ executable"
49899      fi
49900    else
49901      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49902        CORRECT_MSVCR_ARCH=386
49903      else
49904        CORRECT_MSVCR_ARCH=x86-64
49905      fi
49906    fi
49907    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49908      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49909$as_echo "ok" >&6; }
49910      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49911
49912  # Only process if variable expands to non-empty
49913
49914  if test "x$MSVC_DLL" != x; then
49915    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49916
49917  # Input might be given as Windows format, start by converting to
49918  # unix format.
49919  path="$MSVC_DLL"
49920  new_path=`$CYGPATH -u "$path"`
49921
49922  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49923  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49924  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49925  # "foo.exe" is OK but "foo" is an error.
49926  #
49927  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49928  # It is also a way to make sure we got the proper file name for the real test later on.
49929  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49930  if test "x$test_shortpath" = x; then
49931    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49932$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49933    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49934  fi
49935
49936  # Call helper function which possibly converts this using DOS-style short mode.
49937  # If so, the updated path is stored in $new_path.
49938
49939  input_path="$new_path"
49940  # Check if we need to convert this using DOS-style short mode. If the path
49941  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49942  # take no chances and rewrite it.
49943  # Note: m4 eats our [], so we need to use [ and ] instead.
49944  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49945  if test "x$has_forbidden_chars" != x; then
49946    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49947    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49948    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49949    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49950      # Going to short mode and back again did indeed matter. Since short mode is
49951      # case insensitive, let's make it lowercase to improve readability.
49952      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49953      # Now convert it back to Unix-style (cygpath)
49954      input_path=`$CYGPATH -u "$shortmode_path"`
49955      new_path="$input_path"
49956    fi
49957  fi
49958
49959  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49960  if test "x$test_cygdrive_prefix" = x; then
49961    # As a simple fix, exclude /usr/bin since it's not a real path.
49962    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49963      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49964      # a path prefixed by /cygdrive for fixpath to work.
49965      new_path="$CYGWIN_ROOT_PATH$input_path"
49966    fi
49967  fi
49968
49969
49970  if test "x$path" != "x$new_path"; then
49971    MSVC_DLL="$new_path"
49972    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49973$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49974  fi
49975
49976    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49977
49978  path="$MSVC_DLL"
49979  has_colon=`$ECHO $path | $GREP ^.:`
49980  new_path="$path"
49981  if test "x$has_colon" = x; then
49982    # Not in mixed or Windows style, start by that.
49983    new_path=`cmd //c echo $path`
49984  fi
49985
49986
49987  input_path="$new_path"
49988  # Check if we need to convert this using DOS-style short mode. If the path
49989  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49990  # take no chances and rewrite it.
49991  # Note: m4 eats our [], so we need to use [ and ] instead.
49992  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49993  if test "x$has_forbidden_chars" != x; then
49994    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49995    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49996  fi
49997
49998
49999  windows_path="$new_path"
50000  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50001    unix_path=`$CYGPATH -u "$windows_path"`
50002    new_path="$unix_path"
50003  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50004    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50005    new_path="$unix_path"
50006  fi
50007
50008  if test "x$path" != "x$new_path"; then
50009    MSVC_DLL="$new_path"
50010    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50011$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50012  fi
50013
50014  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50015  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50016
50017    else
50018      # We're on a unix platform. Hooray! :)
50019      path="$MSVC_DLL"
50020      has_space=`$ECHO "$path" | $GREP " "`
50021      if test "x$has_space" != x; then
50022        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50023$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50024        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50025      fi
50026
50027      # Use eval to expand a potential ~
50028      eval path="$path"
50029      if test ! -f "$path" && test ! -d "$path"; then
50030        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50031      fi
50032
50033      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50034    fi
50035  fi
50036
50037      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50038$as_echo_n "checking for $DLL_NAME... " >&6; }
50039      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50040$as_echo "$MSVC_DLL" >&6; }
50041    else
50042      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50043$as_echo "incorrect, ignoring" >&6; }
50044      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50045$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50046    fi
50047  fi
50048
50049    fi
50050  fi
50051
50052  if test "x$MSVC_DLL" = x; then
50053    # Probe: Check in the Boot JDK directory.
50054    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
50055
50056  DLL_NAME="$DLL_NAME"
50057  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50058  METHOD="well-known location in Boot JDK"
50059  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50060    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50061$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50062
50063    # Need to check if the found msvcr is correct architecture
50064    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50065$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50066    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50067    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50068      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50069      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50070      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50071        CORRECT_MSVCR_ARCH="PE32 executable"
50072      else
50073        CORRECT_MSVCR_ARCH="PE32+ executable"
50074      fi
50075    else
50076      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50077        CORRECT_MSVCR_ARCH=386
50078      else
50079        CORRECT_MSVCR_ARCH=x86-64
50080      fi
50081    fi
50082    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50083      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50084$as_echo "ok" >&6; }
50085      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50086
50087  # Only process if variable expands to non-empty
50088
50089  if test "x$MSVC_DLL" != x; then
50090    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50091
50092  # Input might be given as Windows format, start by converting to
50093  # unix format.
50094  path="$MSVC_DLL"
50095  new_path=`$CYGPATH -u "$path"`
50096
50097  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50098  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50099  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50100  # "foo.exe" is OK but "foo" is an error.
50101  #
50102  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50103  # It is also a way to make sure we got the proper file name for the real test later on.
50104  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50105  if test "x$test_shortpath" = x; then
50106    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50107$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50108    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50109  fi
50110
50111  # Call helper function which possibly converts this using DOS-style short mode.
50112  # If so, the updated path is stored in $new_path.
50113
50114  input_path="$new_path"
50115  # Check if we need to convert this using DOS-style short mode. If the path
50116  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50117  # take no chances and rewrite it.
50118  # Note: m4 eats our [], so we need to use [ and ] instead.
50119  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50120  if test "x$has_forbidden_chars" != x; then
50121    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50122    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50123    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50124    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50125      # Going to short mode and back again did indeed matter. Since short mode is
50126      # case insensitive, let's make it lowercase to improve readability.
50127      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50128      # Now convert it back to Unix-style (cygpath)
50129      input_path=`$CYGPATH -u "$shortmode_path"`
50130      new_path="$input_path"
50131    fi
50132  fi
50133
50134  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50135  if test "x$test_cygdrive_prefix" = x; then
50136    # As a simple fix, exclude /usr/bin since it's not a real path.
50137    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50138      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50139      # a path prefixed by /cygdrive for fixpath to work.
50140      new_path="$CYGWIN_ROOT_PATH$input_path"
50141    fi
50142  fi
50143
50144
50145  if test "x$path" != "x$new_path"; then
50146    MSVC_DLL="$new_path"
50147    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50148$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50149  fi
50150
50151    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50152
50153  path="$MSVC_DLL"
50154  has_colon=`$ECHO $path | $GREP ^.:`
50155  new_path="$path"
50156  if test "x$has_colon" = x; then
50157    # Not in mixed or Windows style, start by that.
50158    new_path=`cmd //c echo $path`
50159  fi
50160
50161
50162  input_path="$new_path"
50163  # Check if we need to convert this using DOS-style short mode. If the path
50164  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50165  # take no chances and rewrite it.
50166  # Note: m4 eats our [], so we need to use [ and ] instead.
50167  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50168  if test "x$has_forbidden_chars" != x; then
50169    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50170    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50171  fi
50172
50173
50174  windows_path="$new_path"
50175  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50176    unix_path=`$CYGPATH -u "$windows_path"`
50177    new_path="$unix_path"
50178  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50179    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50180    new_path="$unix_path"
50181  fi
50182
50183  if test "x$path" != "x$new_path"; then
50184    MSVC_DLL="$new_path"
50185    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50186$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50187  fi
50188
50189  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50190  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50191
50192    else
50193      # We're on a unix platform. Hooray! :)
50194      path="$MSVC_DLL"
50195      has_space=`$ECHO "$path" | $GREP " "`
50196      if test "x$has_space" != x; then
50197        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50198$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50199        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50200      fi
50201
50202      # Use eval to expand a potential ~
50203      eval path="$path"
50204      if test ! -f "$path" && test ! -d "$path"; then
50205        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50206      fi
50207
50208      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50209    fi
50210  fi
50211
50212      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50213$as_echo_n "checking for $DLL_NAME... " >&6; }
50214      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50215$as_echo "$MSVC_DLL" >&6; }
50216    else
50217      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50218$as_echo "incorrect, ignoring" >&6; }
50219      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50220$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50221    fi
50222  fi
50223
50224  fi
50225
50226  if test "x$MSVC_DLL" = x; then
50227    # Probe: Look in the Windows system32 directory
50228    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
50229
50230  windows_path="$CYGWIN_SYSTEMROOT"
50231  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50232    unix_path=`$CYGPATH -u "$windows_path"`
50233    CYGWIN_SYSTEMROOT="$unix_path"
50234  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50235    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50236    CYGWIN_SYSTEMROOT="$unix_path"
50237  fi
50238
50239    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
50240
50241  DLL_NAME="$DLL_NAME"
50242  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50243  METHOD="well-known location in SYSTEMROOT"
50244  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50245    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50246$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50247
50248    # Need to check if the found msvcr is correct architecture
50249    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50250$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50251    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50252    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50253      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50254      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50255      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50256        CORRECT_MSVCR_ARCH="PE32 executable"
50257      else
50258        CORRECT_MSVCR_ARCH="PE32+ executable"
50259      fi
50260    else
50261      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50262        CORRECT_MSVCR_ARCH=386
50263      else
50264        CORRECT_MSVCR_ARCH=x86-64
50265      fi
50266    fi
50267    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50268      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50269$as_echo "ok" >&6; }
50270      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50271
50272  # Only process if variable expands to non-empty
50273
50274  if test "x$MSVC_DLL" != x; then
50275    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50276
50277  # Input might be given as Windows format, start by converting to
50278  # unix format.
50279  path="$MSVC_DLL"
50280  new_path=`$CYGPATH -u "$path"`
50281
50282  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50283  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50284  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50285  # "foo.exe" is OK but "foo" is an error.
50286  #
50287  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50288  # It is also a way to make sure we got the proper file name for the real test later on.
50289  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50290  if test "x$test_shortpath" = x; then
50291    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50292$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50293    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50294  fi
50295
50296  # Call helper function which possibly converts this using DOS-style short mode.
50297  # If so, the updated path is stored in $new_path.
50298
50299  input_path="$new_path"
50300  # Check if we need to convert this using DOS-style short mode. If the path
50301  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50302  # take no chances and rewrite it.
50303  # Note: m4 eats our [], so we need to use [ and ] instead.
50304  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50305  if test "x$has_forbidden_chars" != x; then
50306    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50307    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50308    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50309    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50310      # Going to short mode and back again did indeed matter. Since short mode is
50311      # case insensitive, let's make it lowercase to improve readability.
50312      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50313      # Now convert it back to Unix-style (cygpath)
50314      input_path=`$CYGPATH -u "$shortmode_path"`
50315      new_path="$input_path"
50316    fi
50317  fi
50318
50319  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50320  if test "x$test_cygdrive_prefix" = x; then
50321    # As a simple fix, exclude /usr/bin since it's not a real path.
50322    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50323      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50324      # a path prefixed by /cygdrive for fixpath to work.
50325      new_path="$CYGWIN_ROOT_PATH$input_path"
50326    fi
50327  fi
50328
50329
50330  if test "x$path" != "x$new_path"; then
50331    MSVC_DLL="$new_path"
50332    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50333$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50334  fi
50335
50336    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50337
50338  path="$MSVC_DLL"
50339  has_colon=`$ECHO $path | $GREP ^.:`
50340  new_path="$path"
50341  if test "x$has_colon" = x; then
50342    # Not in mixed or Windows style, start by that.
50343    new_path=`cmd //c echo $path`
50344  fi
50345
50346
50347  input_path="$new_path"
50348  # Check if we need to convert this using DOS-style short mode. If the path
50349  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50350  # take no chances and rewrite it.
50351  # Note: m4 eats our [], so we need to use [ and ] instead.
50352  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50353  if test "x$has_forbidden_chars" != x; then
50354    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50355    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50356  fi
50357
50358
50359  windows_path="$new_path"
50360  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50361    unix_path=`$CYGPATH -u "$windows_path"`
50362    new_path="$unix_path"
50363  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50364    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50365    new_path="$unix_path"
50366  fi
50367
50368  if test "x$path" != "x$new_path"; then
50369    MSVC_DLL="$new_path"
50370    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50371$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50372  fi
50373
50374  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50375  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50376
50377    else
50378      # We're on a unix platform. Hooray! :)
50379      path="$MSVC_DLL"
50380      has_space=`$ECHO "$path" | $GREP " "`
50381      if test "x$has_space" != x; then
50382        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50383$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50384        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50385      fi
50386
50387      # Use eval to expand a potential ~
50388      eval path="$path"
50389      if test ! -f "$path" && test ! -d "$path"; then
50390        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50391      fi
50392
50393      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50394    fi
50395  fi
50396
50397      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50398$as_echo_n "checking for $DLL_NAME... " >&6; }
50399      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50400$as_echo "$MSVC_DLL" >&6; }
50401    else
50402      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50403$as_echo "incorrect, ignoring" >&6; }
50404      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50405$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50406    fi
50407  fi
50408
50409  fi
50410
50411  if test "x$MSVC_DLL" = x; then
50412    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
50413    if test "x$VS100COMNTOOLS" != x; then
50414      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
50415
50416  windows_path="$CYGWIN_VS_TOOLS_DIR"
50417  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50418    unix_path=`$CYGPATH -u "$windows_path"`
50419    CYGWIN_VS_TOOLS_DIR="$unix_path"
50420  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50421    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50422    CYGWIN_VS_TOOLS_DIR="$unix_path"
50423  fi
50424
50425      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50426        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50427	    | $GREP -i /x64/ | $HEAD --lines 1`
50428      else
50429        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50430	    | $GREP -i /x86/ | $HEAD --lines 1`
50431      fi
50432
50433  DLL_NAME="$DLL_NAME"
50434  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50435  METHOD="search of VS100COMNTOOLS"
50436  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50437    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50438$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50439
50440    # Need to check if the found msvcr is correct architecture
50441    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50442$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50443    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50444    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50445      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50446      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50447      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50448        CORRECT_MSVCR_ARCH="PE32 executable"
50449      else
50450        CORRECT_MSVCR_ARCH="PE32+ executable"
50451      fi
50452    else
50453      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50454        CORRECT_MSVCR_ARCH=386
50455      else
50456        CORRECT_MSVCR_ARCH=x86-64
50457      fi
50458    fi
50459    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50460      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50461$as_echo "ok" >&6; }
50462      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50463
50464  # Only process if variable expands to non-empty
50465
50466  if test "x$MSVC_DLL" != x; then
50467    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50468
50469  # Input might be given as Windows format, start by converting to
50470  # unix format.
50471  path="$MSVC_DLL"
50472  new_path=`$CYGPATH -u "$path"`
50473
50474  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50475  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50476  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50477  # "foo.exe" is OK but "foo" is an error.
50478  #
50479  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50480  # It is also a way to make sure we got the proper file name for the real test later on.
50481  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50482  if test "x$test_shortpath" = x; then
50483    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50484$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50485    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50486  fi
50487
50488  # Call helper function which possibly converts this using DOS-style short mode.
50489  # If so, the updated path is stored in $new_path.
50490
50491  input_path="$new_path"
50492  # Check if we need to convert this using DOS-style short mode. If the path
50493  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50494  # take no chances and rewrite it.
50495  # Note: m4 eats our [], so we need to use [ and ] instead.
50496  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50497  if test "x$has_forbidden_chars" != x; then
50498    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50499    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50500    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50501    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50502      # Going to short mode and back again did indeed matter. Since short mode is
50503      # case insensitive, let's make it lowercase to improve readability.
50504      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50505      # Now convert it back to Unix-style (cygpath)
50506      input_path=`$CYGPATH -u "$shortmode_path"`
50507      new_path="$input_path"
50508    fi
50509  fi
50510
50511  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50512  if test "x$test_cygdrive_prefix" = x; then
50513    # As a simple fix, exclude /usr/bin since it's not a real path.
50514    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50515      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50516      # a path prefixed by /cygdrive for fixpath to work.
50517      new_path="$CYGWIN_ROOT_PATH$input_path"
50518    fi
50519  fi
50520
50521
50522  if test "x$path" != "x$new_path"; then
50523    MSVC_DLL="$new_path"
50524    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50525$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50526  fi
50527
50528    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50529
50530  path="$MSVC_DLL"
50531  has_colon=`$ECHO $path | $GREP ^.:`
50532  new_path="$path"
50533  if test "x$has_colon" = x; then
50534    # Not in mixed or Windows style, start by that.
50535    new_path=`cmd //c echo $path`
50536  fi
50537
50538
50539  input_path="$new_path"
50540  # Check if we need to convert this using DOS-style short mode. If the path
50541  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50542  # take no chances and rewrite it.
50543  # Note: m4 eats our [], so we need to use [ and ] instead.
50544  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50545  if test "x$has_forbidden_chars" != x; then
50546    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50547    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50548  fi
50549
50550
50551  windows_path="$new_path"
50552  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50553    unix_path=`$CYGPATH -u "$windows_path"`
50554    new_path="$unix_path"
50555  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50556    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50557    new_path="$unix_path"
50558  fi
50559
50560  if test "x$path" != "x$new_path"; then
50561    MSVC_DLL="$new_path"
50562    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50563$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50564  fi
50565
50566  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50567  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50568
50569    else
50570      # We're on a unix platform. Hooray! :)
50571      path="$MSVC_DLL"
50572      has_space=`$ECHO "$path" | $GREP " "`
50573      if test "x$has_space" != x; then
50574        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50575$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50576        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50577      fi
50578
50579      # Use eval to expand a potential ~
50580      eval path="$path"
50581      if test ! -f "$path" && test ! -d "$path"; then
50582        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50583      fi
50584
50585      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50586    fi
50587  fi
50588
50589      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50590$as_echo_n "checking for $DLL_NAME... " >&6; }
50591      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50592$as_echo "$MSVC_DLL" >&6; }
50593    else
50594      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50595$as_echo "incorrect, ignoring" >&6; }
50596      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50597$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50598    fi
50599  fi
50600
50601    fi
50602  fi
50603
50604  if test "x$MSVC_DLL" = x; then
50605    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
50606    # (This was the original behaviour; kept since it might turn something up)
50607    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
50608      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50609        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50610	    | $GREP x64 | $HEAD --lines 1`
50611      else
50612        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50613	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
50614        if test "x$POSSIBLE_MSVC_DLL" = x; then
50615          # We're grasping at straws now...
50616          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50617	      | $HEAD --lines 1`
50618        fi
50619      fi
50620
50621
50622  DLL_NAME="$DLL_NAME"
50623  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50624  METHOD="search of VCINSTALLDIR"
50625  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50626    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50627$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50628
50629    # Need to check if the found msvcr is correct architecture
50630    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50631$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50632    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50633    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50634      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50635      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50636      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50637        CORRECT_MSVCR_ARCH="PE32 executable"
50638      else
50639        CORRECT_MSVCR_ARCH="PE32+ executable"
50640      fi
50641    else
50642      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50643        CORRECT_MSVCR_ARCH=386
50644      else
50645        CORRECT_MSVCR_ARCH=x86-64
50646      fi
50647    fi
50648    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50649      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50650$as_echo "ok" >&6; }
50651      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50652
50653  # Only process if variable expands to non-empty
50654
50655  if test "x$MSVC_DLL" != x; then
50656    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50657
50658  # Input might be given as Windows format, start by converting to
50659  # unix format.
50660  path="$MSVC_DLL"
50661  new_path=`$CYGPATH -u "$path"`
50662
50663  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50664  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50665  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50666  # "foo.exe" is OK but "foo" is an error.
50667  #
50668  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50669  # It is also a way to make sure we got the proper file name for the real test later on.
50670  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50671  if test "x$test_shortpath" = x; then
50672    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50673$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50674    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50675  fi
50676
50677  # Call helper function which possibly converts this using DOS-style short mode.
50678  # If so, the updated path is stored in $new_path.
50679
50680  input_path="$new_path"
50681  # Check if we need to convert this using DOS-style short mode. If the path
50682  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50683  # take no chances and rewrite it.
50684  # Note: m4 eats our [], so we need to use [ and ] instead.
50685  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50686  if test "x$has_forbidden_chars" != x; then
50687    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50688    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50689    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50690    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50691      # Going to short mode and back again did indeed matter. Since short mode is
50692      # case insensitive, let's make it lowercase to improve readability.
50693      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50694      # Now convert it back to Unix-style (cygpath)
50695      input_path=`$CYGPATH -u "$shortmode_path"`
50696      new_path="$input_path"
50697    fi
50698  fi
50699
50700  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50701  if test "x$test_cygdrive_prefix" = x; then
50702    # As a simple fix, exclude /usr/bin since it's not a real path.
50703    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50704      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50705      # a path prefixed by /cygdrive for fixpath to work.
50706      new_path="$CYGWIN_ROOT_PATH$input_path"
50707    fi
50708  fi
50709
50710
50711  if test "x$path" != "x$new_path"; then
50712    MSVC_DLL="$new_path"
50713    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50714$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50715  fi
50716
50717    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50718
50719  path="$MSVC_DLL"
50720  has_colon=`$ECHO $path | $GREP ^.:`
50721  new_path="$path"
50722  if test "x$has_colon" = x; then
50723    # Not in mixed or Windows style, start by that.
50724    new_path=`cmd //c echo $path`
50725  fi
50726
50727
50728  input_path="$new_path"
50729  # Check if we need to convert this using DOS-style short mode. If the path
50730  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50731  # take no chances and rewrite it.
50732  # Note: m4 eats our [], so we need to use [ and ] instead.
50733  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50734  if test "x$has_forbidden_chars" != x; then
50735    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50736    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50737  fi
50738
50739
50740  windows_path="$new_path"
50741  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50742    unix_path=`$CYGPATH -u "$windows_path"`
50743    new_path="$unix_path"
50744  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50745    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50746    new_path="$unix_path"
50747  fi
50748
50749  if test "x$path" != "x$new_path"; then
50750    MSVC_DLL="$new_path"
50751    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50752$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50753  fi
50754
50755  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50756  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50757
50758    else
50759      # We're on a unix platform. Hooray! :)
50760      path="$MSVC_DLL"
50761      has_space=`$ECHO "$path" | $GREP " "`
50762      if test "x$has_space" != x; then
50763        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50764$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50765        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50766      fi
50767
50768      # Use eval to expand a potential ~
50769      eval path="$path"
50770      if test ! -f "$path" && test ! -d "$path"; then
50771        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50772      fi
50773
50774      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50775    fi
50776  fi
50777
50778      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50779$as_echo_n "checking for $DLL_NAME... " >&6; }
50780      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50781$as_echo "$MSVC_DLL" >&6; }
50782    else
50783      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50784$as_echo "incorrect, ignoring" >&6; }
50785      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50786$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50787    fi
50788  fi
50789
50790    fi
50791  fi
50792
50793  if test "x$MSVC_DLL" = x; then
50794    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50795$as_echo_n "checking for $DLL_NAME... " >&6; }
50796    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50797$as_echo "no" >&6; }
50798    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
50799  fi
50800
50801    MSVCR_DLL="$MSVC_DLL"
50802  fi
50803
50804
50805
50806# Check whether --with-msvcp-dll was given.
50807if test "${with_msvcp_dll+set}" = set; then :
50808  withval=$with_msvcp_dll;
50809fi
50810
50811
50812  if test "x$MSVCP_NAME" != "x"; then
50813    if test "x$with_msvcp_dll" != x; then
50814      # If given explicitely by user, do not probe. If not present, fail directly.
50815
50816  DLL_NAME="$MSVCP_NAME"
50817  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
50818  METHOD="--with-msvcp-dll"
50819  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50820    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50821$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50822
50823    # Need to check if the found msvcr is correct architecture
50824    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50825$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50826    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50827    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50828      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50829      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50830      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50831        CORRECT_MSVCR_ARCH="PE32 executable"
50832      else
50833        CORRECT_MSVCR_ARCH="PE32+ executable"
50834      fi
50835    else
50836      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50837        CORRECT_MSVCR_ARCH=386
50838      else
50839        CORRECT_MSVCR_ARCH=x86-64
50840      fi
50841    fi
50842    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50843      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50844$as_echo "ok" >&6; }
50845      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50846
50847  # Only process if variable expands to non-empty
50848
50849  if test "x$MSVC_DLL" != x; then
50850    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50851
50852  # Input might be given as Windows format, start by converting to
50853  # unix format.
50854  path="$MSVC_DLL"
50855  new_path=`$CYGPATH -u "$path"`
50856
50857  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50858  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50859  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50860  # "foo.exe" is OK but "foo" is an error.
50861  #
50862  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50863  # It is also a way to make sure we got the proper file name for the real test later on.
50864  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50865  if test "x$test_shortpath" = x; then
50866    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50867$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50868    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50869  fi
50870
50871  # Call helper function which possibly converts this using DOS-style short mode.
50872  # If so, the updated path is stored in $new_path.
50873
50874  input_path="$new_path"
50875  # Check if we need to convert this using DOS-style short mode. If the path
50876  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50877  # take no chances and rewrite it.
50878  # Note: m4 eats our [], so we need to use [ and ] instead.
50879  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50880  if test "x$has_forbidden_chars" != x; then
50881    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50882    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50883    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50884    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50885      # Going to short mode and back again did indeed matter. Since short mode is
50886      # case insensitive, let's make it lowercase to improve readability.
50887      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50888      # Now convert it back to Unix-style (cygpath)
50889      input_path=`$CYGPATH -u "$shortmode_path"`
50890      new_path="$input_path"
50891    fi
50892  fi
50893
50894  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50895  if test "x$test_cygdrive_prefix" = x; then
50896    # As a simple fix, exclude /usr/bin since it's not a real path.
50897    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50898      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50899      # a path prefixed by /cygdrive for fixpath to work.
50900      new_path="$CYGWIN_ROOT_PATH$input_path"
50901    fi
50902  fi
50903
50904
50905  if test "x$path" != "x$new_path"; then
50906    MSVC_DLL="$new_path"
50907    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50908$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50909  fi
50910
50911    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50912
50913  path="$MSVC_DLL"
50914  has_colon=`$ECHO $path | $GREP ^.:`
50915  new_path="$path"
50916  if test "x$has_colon" = x; then
50917    # Not in mixed or Windows style, start by that.
50918    new_path=`cmd //c echo $path`
50919  fi
50920
50921
50922  input_path="$new_path"
50923  # Check if we need to convert this using DOS-style short mode. If the path
50924  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50925  # take no chances and rewrite it.
50926  # Note: m4 eats our [], so we need to use [ and ] instead.
50927  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50928  if test "x$has_forbidden_chars" != x; then
50929    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50930    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50931  fi
50932
50933
50934  windows_path="$new_path"
50935  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50936    unix_path=`$CYGPATH -u "$windows_path"`
50937    new_path="$unix_path"
50938  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50939    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50940    new_path="$unix_path"
50941  fi
50942
50943  if test "x$path" != "x$new_path"; then
50944    MSVC_DLL="$new_path"
50945    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50946$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50947  fi
50948
50949  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50950  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50951
50952    else
50953      # We're on a unix platform. Hooray! :)
50954      path="$MSVC_DLL"
50955      has_space=`$ECHO "$path" | $GREP " "`
50956      if test "x$has_space" != x; then
50957        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50958$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50959        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50960      fi
50961
50962      # Use eval to expand a potential ~
50963      eval path="$path"
50964      if test ! -f "$path" && test ! -d "$path"; then
50965        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50966      fi
50967
50968      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50969    fi
50970  fi
50971
50972      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50973$as_echo_n "checking for $DLL_NAME... " >&6; }
50974      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50975$as_echo "$MSVC_DLL" >&6; }
50976    else
50977      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50978$as_echo "incorrect, ignoring" >&6; }
50979      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50980$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50981    fi
50982  fi
50983
50984      if test "x$MSVC_DLL" = x; then
50985        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
50986      fi
50987      MSVCP_DLL="$MSVC_DLL"
50988    elif test "x$DEVKIT_MSVCP_DLL" != x; then
50989
50990  DLL_NAME="$MSVCP_NAME"
50991  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
50992  METHOD="devkit"
50993  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50994    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50995$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50996
50997    # Need to check if the found msvcr is correct architecture
50998    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50999$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51000    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51001    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51002      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51003      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51004      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51005        CORRECT_MSVCR_ARCH="PE32 executable"
51006      else
51007        CORRECT_MSVCR_ARCH="PE32+ executable"
51008      fi
51009    else
51010      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51011        CORRECT_MSVCR_ARCH=386
51012      else
51013        CORRECT_MSVCR_ARCH=x86-64
51014      fi
51015    fi
51016    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51017      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51018$as_echo "ok" >&6; }
51019      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51020
51021  # Only process if variable expands to non-empty
51022
51023  if test "x$MSVC_DLL" != x; then
51024    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51025
51026  # Input might be given as Windows format, start by converting to
51027  # unix format.
51028  path="$MSVC_DLL"
51029  new_path=`$CYGPATH -u "$path"`
51030
51031  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51032  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51033  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51034  # "foo.exe" is OK but "foo" is an error.
51035  #
51036  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51037  # It is also a way to make sure we got the proper file name for the real test later on.
51038  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51039  if test "x$test_shortpath" = x; then
51040    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51041$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51042    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51043  fi
51044
51045  # Call helper function which possibly converts this using DOS-style short mode.
51046  # If so, the updated path is stored in $new_path.
51047
51048  input_path="$new_path"
51049  # Check if we need to convert this using DOS-style short mode. If the path
51050  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51051  # take no chances and rewrite it.
51052  # Note: m4 eats our [], so we need to use [ and ] instead.
51053  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51054  if test "x$has_forbidden_chars" != x; then
51055    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51056    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51057    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51058    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51059      # Going to short mode and back again did indeed matter. Since short mode is
51060      # case insensitive, let's make it lowercase to improve readability.
51061      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51062      # Now convert it back to Unix-style (cygpath)
51063      input_path=`$CYGPATH -u "$shortmode_path"`
51064      new_path="$input_path"
51065    fi
51066  fi
51067
51068  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51069  if test "x$test_cygdrive_prefix" = x; then
51070    # As a simple fix, exclude /usr/bin since it's not a real path.
51071    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51072      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51073      # a path prefixed by /cygdrive for fixpath to work.
51074      new_path="$CYGWIN_ROOT_PATH$input_path"
51075    fi
51076  fi
51077
51078
51079  if test "x$path" != "x$new_path"; then
51080    MSVC_DLL="$new_path"
51081    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51082$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51083  fi
51084
51085    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51086
51087  path="$MSVC_DLL"
51088  has_colon=`$ECHO $path | $GREP ^.:`
51089  new_path="$path"
51090  if test "x$has_colon" = x; then
51091    # Not in mixed or Windows style, start by that.
51092    new_path=`cmd //c echo $path`
51093  fi
51094
51095
51096  input_path="$new_path"
51097  # Check if we need to convert this using DOS-style short mode. If the path
51098  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51099  # take no chances and rewrite it.
51100  # Note: m4 eats our [], so we need to use [ and ] instead.
51101  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51102  if test "x$has_forbidden_chars" != x; then
51103    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51104    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51105  fi
51106
51107
51108  windows_path="$new_path"
51109  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51110    unix_path=`$CYGPATH -u "$windows_path"`
51111    new_path="$unix_path"
51112  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51113    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51114    new_path="$unix_path"
51115  fi
51116
51117  if test "x$path" != "x$new_path"; then
51118    MSVC_DLL="$new_path"
51119    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51120$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51121  fi
51122
51123  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51124  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51125
51126    else
51127      # We're on a unix platform. Hooray! :)
51128      path="$MSVC_DLL"
51129      has_space=`$ECHO "$path" | $GREP " "`
51130      if test "x$has_space" != x; then
51131        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51132$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51133        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51134      fi
51135
51136      # Use eval to expand a potential ~
51137      eval path="$path"
51138      if test ! -f "$path" && test ! -d "$path"; then
51139        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51140      fi
51141
51142      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51143    fi
51144  fi
51145
51146      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51147$as_echo_n "checking for $DLL_NAME... " >&6; }
51148      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51149$as_echo "$MSVC_DLL" >&6; }
51150    else
51151      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51152$as_echo "incorrect, ignoring" >&6; }
51153      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51154$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51155    fi
51156  fi
51157
51158      if test "x$MSVC_DLL" = x; then
51159        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
51160      fi
51161      MSVCP_DLL="$MSVC_DLL"
51162    else
51163
51164  DLL_NAME="${MSVCP_NAME}"
51165  MSVC_DLL=
51166
51167  if test "x$MSVC_DLL" = x; then
51168    # Probe: Using well-known location from Visual Studio 10.0
51169    if test "x$VCINSTALLDIR" != x; then
51170      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
51171
51172  windows_path="$CYGWIN_VC_INSTALL_DIR"
51173  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51174    unix_path=`$CYGPATH -u "$windows_path"`
51175    CYGWIN_VC_INSTALL_DIR="$unix_path"
51176  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51177    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51178    CYGWIN_VC_INSTALL_DIR="$unix_path"
51179  fi
51180
51181      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51182        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
51183      else
51184        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
51185      fi
51186      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
51187
51188  DLL_NAME="$DLL_NAME"
51189  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51190  METHOD="well-known location in VCINSTALLDIR"
51191  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51192    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51193$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51194
51195    # Need to check if the found msvcr is correct architecture
51196    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51197$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51198    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51199    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51200      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51201      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51202      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51203        CORRECT_MSVCR_ARCH="PE32 executable"
51204      else
51205        CORRECT_MSVCR_ARCH="PE32+ executable"
51206      fi
51207    else
51208      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51209        CORRECT_MSVCR_ARCH=386
51210      else
51211        CORRECT_MSVCR_ARCH=x86-64
51212      fi
51213    fi
51214    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51215      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51216$as_echo "ok" >&6; }
51217      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51218
51219  # Only process if variable expands to non-empty
51220
51221  if test "x$MSVC_DLL" != x; then
51222    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51223
51224  # Input might be given as Windows format, start by converting to
51225  # unix format.
51226  path="$MSVC_DLL"
51227  new_path=`$CYGPATH -u "$path"`
51228
51229  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51230  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51231  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51232  # "foo.exe" is OK but "foo" is an error.
51233  #
51234  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51235  # It is also a way to make sure we got the proper file name for the real test later on.
51236  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51237  if test "x$test_shortpath" = x; then
51238    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51239$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51240    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51241  fi
51242
51243  # Call helper function which possibly converts this using DOS-style short mode.
51244  # If so, the updated path is stored in $new_path.
51245
51246  input_path="$new_path"
51247  # Check if we need to convert this using DOS-style short mode. If the path
51248  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51249  # take no chances and rewrite it.
51250  # Note: m4 eats our [], so we need to use [ and ] instead.
51251  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51252  if test "x$has_forbidden_chars" != x; then
51253    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51254    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51255    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51256    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51257      # Going to short mode and back again did indeed matter. Since short mode is
51258      # case insensitive, let's make it lowercase to improve readability.
51259      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51260      # Now convert it back to Unix-style (cygpath)
51261      input_path=`$CYGPATH -u "$shortmode_path"`
51262      new_path="$input_path"
51263    fi
51264  fi
51265
51266  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51267  if test "x$test_cygdrive_prefix" = x; then
51268    # As a simple fix, exclude /usr/bin since it's not a real path.
51269    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51270      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51271      # a path prefixed by /cygdrive for fixpath to work.
51272      new_path="$CYGWIN_ROOT_PATH$input_path"
51273    fi
51274  fi
51275
51276
51277  if test "x$path" != "x$new_path"; then
51278    MSVC_DLL="$new_path"
51279    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51280$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51281  fi
51282
51283    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51284
51285  path="$MSVC_DLL"
51286  has_colon=`$ECHO $path | $GREP ^.:`
51287  new_path="$path"
51288  if test "x$has_colon" = x; then
51289    # Not in mixed or Windows style, start by that.
51290    new_path=`cmd //c echo $path`
51291  fi
51292
51293
51294  input_path="$new_path"
51295  # Check if we need to convert this using DOS-style short mode. If the path
51296  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51297  # take no chances and rewrite it.
51298  # Note: m4 eats our [], so we need to use [ and ] instead.
51299  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51300  if test "x$has_forbidden_chars" != x; then
51301    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51302    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51303  fi
51304
51305
51306  windows_path="$new_path"
51307  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51308    unix_path=`$CYGPATH -u "$windows_path"`
51309    new_path="$unix_path"
51310  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51311    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51312    new_path="$unix_path"
51313  fi
51314
51315  if test "x$path" != "x$new_path"; then
51316    MSVC_DLL="$new_path"
51317    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51318$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51319  fi
51320
51321  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51322  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51323
51324    else
51325      # We're on a unix platform. Hooray! :)
51326      path="$MSVC_DLL"
51327      has_space=`$ECHO "$path" | $GREP " "`
51328      if test "x$has_space" != x; then
51329        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51330$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51331        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51332      fi
51333
51334      # Use eval to expand a potential ~
51335      eval path="$path"
51336      if test ! -f "$path" && test ! -d "$path"; then
51337        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51338      fi
51339
51340      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51341    fi
51342  fi
51343
51344      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51345$as_echo_n "checking for $DLL_NAME... " >&6; }
51346      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51347$as_echo "$MSVC_DLL" >&6; }
51348    else
51349      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51350$as_echo "incorrect, ignoring" >&6; }
51351      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51352$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51353    fi
51354  fi
51355
51356    fi
51357  fi
51358
51359  if test "x$MSVC_DLL" = x; then
51360    # Probe: Check in the Boot JDK directory.
51361    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
51362
51363  DLL_NAME="$DLL_NAME"
51364  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51365  METHOD="well-known location in Boot JDK"
51366  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51367    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51368$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51369
51370    # Need to check if the found msvcr is correct architecture
51371    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51372$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51373    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51374    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51375      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51376      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51377      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51378        CORRECT_MSVCR_ARCH="PE32 executable"
51379      else
51380        CORRECT_MSVCR_ARCH="PE32+ executable"
51381      fi
51382    else
51383      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51384        CORRECT_MSVCR_ARCH=386
51385      else
51386        CORRECT_MSVCR_ARCH=x86-64
51387      fi
51388    fi
51389    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51390      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51391$as_echo "ok" >&6; }
51392      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51393
51394  # Only process if variable expands to non-empty
51395
51396  if test "x$MSVC_DLL" != x; then
51397    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51398
51399  # Input might be given as Windows format, start by converting to
51400  # unix format.
51401  path="$MSVC_DLL"
51402  new_path=`$CYGPATH -u "$path"`
51403
51404  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51405  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51406  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51407  # "foo.exe" is OK but "foo" is an error.
51408  #
51409  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51410  # It is also a way to make sure we got the proper file name for the real test later on.
51411  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51412  if test "x$test_shortpath" = x; then
51413    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51414$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51415    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51416  fi
51417
51418  # Call helper function which possibly converts this using DOS-style short mode.
51419  # If so, the updated path is stored in $new_path.
51420
51421  input_path="$new_path"
51422  # Check if we need to convert this using DOS-style short mode. If the path
51423  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51424  # take no chances and rewrite it.
51425  # Note: m4 eats our [], so we need to use [ and ] instead.
51426  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51427  if test "x$has_forbidden_chars" != x; then
51428    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51429    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51430    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51431    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51432      # Going to short mode and back again did indeed matter. Since short mode is
51433      # case insensitive, let's make it lowercase to improve readability.
51434      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51435      # Now convert it back to Unix-style (cygpath)
51436      input_path=`$CYGPATH -u "$shortmode_path"`
51437      new_path="$input_path"
51438    fi
51439  fi
51440
51441  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51442  if test "x$test_cygdrive_prefix" = x; then
51443    # As a simple fix, exclude /usr/bin since it's not a real path.
51444    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51445      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51446      # a path prefixed by /cygdrive for fixpath to work.
51447      new_path="$CYGWIN_ROOT_PATH$input_path"
51448    fi
51449  fi
51450
51451
51452  if test "x$path" != "x$new_path"; then
51453    MSVC_DLL="$new_path"
51454    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51455$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51456  fi
51457
51458    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51459
51460  path="$MSVC_DLL"
51461  has_colon=`$ECHO $path | $GREP ^.:`
51462  new_path="$path"
51463  if test "x$has_colon" = x; then
51464    # Not in mixed or Windows style, start by that.
51465    new_path=`cmd //c echo $path`
51466  fi
51467
51468
51469  input_path="$new_path"
51470  # Check if we need to convert this using DOS-style short mode. If the path
51471  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51472  # take no chances and rewrite it.
51473  # Note: m4 eats our [], so we need to use [ and ] instead.
51474  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51475  if test "x$has_forbidden_chars" != x; then
51476    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51477    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51478  fi
51479
51480
51481  windows_path="$new_path"
51482  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51483    unix_path=`$CYGPATH -u "$windows_path"`
51484    new_path="$unix_path"
51485  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51486    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51487    new_path="$unix_path"
51488  fi
51489
51490  if test "x$path" != "x$new_path"; then
51491    MSVC_DLL="$new_path"
51492    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51493$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51494  fi
51495
51496  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51497  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51498
51499    else
51500      # We're on a unix platform. Hooray! :)
51501      path="$MSVC_DLL"
51502      has_space=`$ECHO "$path" | $GREP " "`
51503      if test "x$has_space" != x; then
51504        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51505$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51506        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51507      fi
51508
51509      # Use eval to expand a potential ~
51510      eval path="$path"
51511      if test ! -f "$path" && test ! -d "$path"; then
51512        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51513      fi
51514
51515      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51516    fi
51517  fi
51518
51519      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51520$as_echo_n "checking for $DLL_NAME... " >&6; }
51521      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51522$as_echo "$MSVC_DLL" >&6; }
51523    else
51524      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51525$as_echo "incorrect, ignoring" >&6; }
51526      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51527$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51528    fi
51529  fi
51530
51531  fi
51532
51533  if test "x$MSVC_DLL" = x; then
51534    # Probe: Look in the Windows system32 directory
51535    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
51536
51537  windows_path="$CYGWIN_SYSTEMROOT"
51538  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51539    unix_path=`$CYGPATH -u "$windows_path"`
51540    CYGWIN_SYSTEMROOT="$unix_path"
51541  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51542    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51543    CYGWIN_SYSTEMROOT="$unix_path"
51544  fi
51545
51546    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
51547
51548  DLL_NAME="$DLL_NAME"
51549  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51550  METHOD="well-known location in SYSTEMROOT"
51551  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51552    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51553$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51554
51555    # Need to check if the found msvcr is correct architecture
51556    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51557$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51558    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51559    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51560      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51561      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51562      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51563        CORRECT_MSVCR_ARCH="PE32 executable"
51564      else
51565        CORRECT_MSVCR_ARCH="PE32+ executable"
51566      fi
51567    else
51568      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51569        CORRECT_MSVCR_ARCH=386
51570      else
51571        CORRECT_MSVCR_ARCH=x86-64
51572      fi
51573    fi
51574    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51575      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51576$as_echo "ok" >&6; }
51577      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51578
51579  # Only process if variable expands to non-empty
51580
51581  if test "x$MSVC_DLL" != x; then
51582    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51583
51584  # Input might be given as Windows format, start by converting to
51585  # unix format.
51586  path="$MSVC_DLL"
51587  new_path=`$CYGPATH -u "$path"`
51588
51589  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51590  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51591  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51592  # "foo.exe" is OK but "foo" is an error.
51593  #
51594  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51595  # It is also a way to make sure we got the proper file name for the real test later on.
51596  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51597  if test "x$test_shortpath" = x; then
51598    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51599$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51600    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51601  fi
51602
51603  # Call helper function which possibly converts this using DOS-style short mode.
51604  # If so, the updated path is stored in $new_path.
51605
51606  input_path="$new_path"
51607  # Check if we need to convert this using DOS-style short mode. If the path
51608  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51609  # take no chances and rewrite it.
51610  # Note: m4 eats our [], so we need to use [ and ] instead.
51611  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51612  if test "x$has_forbidden_chars" != x; then
51613    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51614    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51615    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51616    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51617      # Going to short mode and back again did indeed matter. Since short mode is
51618      # case insensitive, let's make it lowercase to improve readability.
51619      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51620      # Now convert it back to Unix-style (cygpath)
51621      input_path=`$CYGPATH -u "$shortmode_path"`
51622      new_path="$input_path"
51623    fi
51624  fi
51625
51626  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51627  if test "x$test_cygdrive_prefix" = x; then
51628    # As a simple fix, exclude /usr/bin since it's not a real path.
51629    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51630      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51631      # a path prefixed by /cygdrive for fixpath to work.
51632      new_path="$CYGWIN_ROOT_PATH$input_path"
51633    fi
51634  fi
51635
51636
51637  if test "x$path" != "x$new_path"; then
51638    MSVC_DLL="$new_path"
51639    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51640$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51641  fi
51642
51643    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51644
51645  path="$MSVC_DLL"
51646  has_colon=`$ECHO $path | $GREP ^.:`
51647  new_path="$path"
51648  if test "x$has_colon" = x; then
51649    # Not in mixed or Windows style, start by that.
51650    new_path=`cmd //c echo $path`
51651  fi
51652
51653
51654  input_path="$new_path"
51655  # Check if we need to convert this using DOS-style short mode. If the path
51656  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51657  # take no chances and rewrite it.
51658  # Note: m4 eats our [], so we need to use [ and ] instead.
51659  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51660  if test "x$has_forbidden_chars" != x; then
51661    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51662    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51663  fi
51664
51665
51666  windows_path="$new_path"
51667  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51668    unix_path=`$CYGPATH -u "$windows_path"`
51669    new_path="$unix_path"
51670  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51671    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51672    new_path="$unix_path"
51673  fi
51674
51675  if test "x$path" != "x$new_path"; then
51676    MSVC_DLL="$new_path"
51677    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51678$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51679  fi
51680
51681  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51682  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51683
51684    else
51685      # We're on a unix platform. Hooray! :)
51686      path="$MSVC_DLL"
51687      has_space=`$ECHO "$path" | $GREP " "`
51688      if test "x$has_space" != x; then
51689        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51690$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51691        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51692      fi
51693
51694      # Use eval to expand a potential ~
51695      eval path="$path"
51696      if test ! -f "$path" && test ! -d "$path"; then
51697        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51698      fi
51699
51700      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51701    fi
51702  fi
51703
51704      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51705$as_echo_n "checking for $DLL_NAME... " >&6; }
51706      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51707$as_echo "$MSVC_DLL" >&6; }
51708    else
51709      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51710$as_echo "incorrect, ignoring" >&6; }
51711      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51712$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51713    fi
51714  fi
51715
51716  fi
51717
51718  if test "x$MSVC_DLL" = x; then
51719    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
51720    if test "x$VS100COMNTOOLS" != x; then
51721      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
51722
51723  windows_path="$CYGWIN_VS_TOOLS_DIR"
51724  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51725    unix_path=`$CYGPATH -u "$windows_path"`
51726    CYGWIN_VS_TOOLS_DIR="$unix_path"
51727  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51728    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51729    CYGWIN_VS_TOOLS_DIR="$unix_path"
51730  fi
51731
51732      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51733        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
51734	    | $GREP -i /x64/ | $HEAD --lines 1`
51735      else
51736        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
51737	    | $GREP -i /x86/ | $HEAD --lines 1`
51738      fi
51739
51740  DLL_NAME="$DLL_NAME"
51741  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51742  METHOD="search of VS100COMNTOOLS"
51743  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51744    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51745$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51746
51747    # Need to check if the found msvcr is correct architecture
51748    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51749$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51750    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51751    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51752      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51753      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51754      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51755        CORRECT_MSVCR_ARCH="PE32 executable"
51756      else
51757        CORRECT_MSVCR_ARCH="PE32+ executable"
51758      fi
51759    else
51760      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51761        CORRECT_MSVCR_ARCH=386
51762      else
51763        CORRECT_MSVCR_ARCH=x86-64
51764      fi
51765    fi
51766    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51767      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51768$as_echo "ok" >&6; }
51769      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51770
51771  # Only process if variable expands to non-empty
51772
51773  if test "x$MSVC_DLL" != x; then
51774    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51775
51776  # Input might be given as Windows format, start by converting to
51777  # unix format.
51778  path="$MSVC_DLL"
51779  new_path=`$CYGPATH -u "$path"`
51780
51781  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51782  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51783  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51784  # "foo.exe" is OK but "foo" is an error.
51785  #
51786  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51787  # It is also a way to make sure we got the proper file name for the real test later on.
51788  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51789  if test "x$test_shortpath" = x; then
51790    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51791$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51792    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51793  fi
51794
51795  # Call helper function which possibly converts this using DOS-style short mode.
51796  # If so, the updated path is stored in $new_path.
51797
51798  input_path="$new_path"
51799  # Check if we need to convert this using DOS-style short mode. If the path
51800  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51801  # take no chances and rewrite it.
51802  # Note: m4 eats our [], so we need to use [ and ] instead.
51803  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51804  if test "x$has_forbidden_chars" != x; then
51805    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51806    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51807    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51808    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51809      # Going to short mode and back again did indeed matter. Since short mode is
51810      # case insensitive, let's make it lowercase to improve readability.
51811      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51812      # Now convert it back to Unix-style (cygpath)
51813      input_path=`$CYGPATH -u "$shortmode_path"`
51814      new_path="$input_path"
51815    fi
51816  fi
51817
51818  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51819  if test "x$test_cygdrive_prefix" = x; then
51820    # As a simple fix, exclude /usr/bin since it's not a real path.
51821    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51822      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51823      # a path prefixed by /cygdrive for fixpath to work.
51824      new_path="$CYGWIN_ROOT_PATH$input_path"
51825    fi
51826  fi
51827
51828
51829  if test "x$path" != "x$new_path"; then
51830    MSVC_DLL="$new_path"
51831    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51832$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51833  fi
51834
51835    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51836
51837  path="$MSVC_DLL"
51838  has_colon=`$ECHO $path | $GREP ^.:`
51839  new_path="$path"
51840  if test "x$has_colon" = x; then
51841    # Not in mixed or Windows style, start by that.
51842    new_path=`cmd //c echo $path`
51843  fi
51844
51845
51846  input_path="$new_path"
51847  # Check if we need to convert this using DOS-style short mode. If the path
51848  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51849  # take no chances and rewrite it.
51850  # Note: m4 eats our [], so we need to use [ and ] instead.
51851  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51852  if test "x$has_forbidden_chars" != x; then
51853    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51854    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51855  fi
51856
51857
51858  windows_path="$new_path"
51859  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51860    unix_path=`$CYGPATH -u "$windows_path"`
51861    new_path="$unix_path"
51862  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51863    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51864    new_path="$unix_path"
51865  fi
51866
51867  if test "x$path" != "x$new_path"; then
51868    MSVC_DLL="$new_path"
51869    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51870$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51871  fi
51872
51873  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51874  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51875
51876    else
51877      # We're on a unix platform. Hooray! :)
51878      path="$MSVC_DLL"
51879      has_space=`$ECHO "$path" | $GREP " "`
51880      if test "x$has_space" != x; then
51881        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51882$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51883        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51884      fi
51885
51886      # Use eval to expand a potential ~
51887      eval path="$path"
51888      if test ! -f "$path" && test ! -d "$path"; then
51889        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51890      fi
51891
51892      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51893    fi
51894  fi
51895
51896      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51897$as_echo_n "checking for $DLL_NAME... " >&6; }
51898      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51899$as_echo "$MSVC_DLL" >&6; }
51900    else
51901      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51902$as_echo "incorrect, ignoring" >&6; }
51903      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51904$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51905    fi
51906  fi
51907
51908    fi
51909  fi
51910
51911  if test "x$MSVC_DLL" = x; then
51912    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
51913    # (This was the original behaviour; kept since it might turn something up)
51914    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
51915      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51916        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
51917	    | $GREP x64 | $HEAD --lines 1`
51918      else
51919        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
51920	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
51921        if test "x$POSSIBLE_MSVC_DLL" = x; then
51922          # We're grasping at straws now...
51923          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
51924	      | $HEAD --lines 1`
51925        fi
51926      fi
51927
51928
51929  DLL_NAME="$DLL_NAME"
51930  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51931  METHOD="search of VCINSTALLDIR"
51932  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51933    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51934$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51935
51936    # Need to check if the found msvcr is correct architecture
51937    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51938$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51939    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51940    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51941      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51942      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51943      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51944        CORRECT_MSVCR_ARCH="PE32 executable"
51945      else
51946        CORRECT_MSVCR_ARCH="PE32+ executable"
51947      fi
51948    else
51949      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51950        CORRECT_MSVCR_ARCH=386
51951      else
51952        CORRECT_MSVCR_ARCH=x86-64
51953      fi
51954    fi
51955    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51956      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51957$as_echo "ok" >&6; }
51958      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51959
51960  # Only process if variable expands to non-empty
51961
51962  if test "x$MSVC_DLL" != x; then
51963    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51964
51965  # Input might be given as Windows format, start by converting to
51966  # unix format.
51967  path="$MSVC_DLL"
51968  new_path=`$CYGPATH -u "$path"`
51969
51970  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51971  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51972  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51973  # "foo.exe" is OK but "foo" is an error.
51974  #
51975  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51976  # It is also a way to make sure we got the proper file name for the real test later on.
51977  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51978  if test "x$test_shortpath" = x; then
51979    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51980$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51981    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51982  fi
51983
51984  # Call helper function which possibly converts this using DOS-style short mode.
51985  # If so, the updated path is stored in $new_path.
51986
51987  input_path="$new_path"
51988  # Check if we need to convert this using DOS-style short mode. If the path
51989  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51990  # take no chances and rewrite it.
51991  # Note: m4 eats our [], so we need to use [ and ] instead.
51992  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51993  if test "x$has_forbidden_chars" != x; then
51994    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51995    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51996    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51997    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51998      # Going to short mode and back again did indeed matter. Since short mode is
51999      # case insensitive, let's make it lowercase to improve readability.
52000      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52001      # Now convert it back to Unix-style (cygpath)
52002      input_path=`$CYGPATH -u "$shortmode_path"`
52003      new_path="$input_path"
52004    fi
52005  fi
52006
52007  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52008  if test "x$test_cygdrive_prefix" = x; then
52009    # As a simple fix, exclude /usr/bin since it's not a real path.
52010    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52011      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52012      # a path prefixed by /cygdrive for fixpath to work.
52013      new_path="$CYGWIN_ROOT_PATH$input_path"
52014    fi
52015  fi
52016
52017
52018  if test "x$path" != "x$new_path"; then
52019    MSVC_DLL="$new_path"
52020    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52021$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52022  fi
52023
52024    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52025
52026  path="$MSVC_DLL"
52027  has_colon=`$ECHO $path | $GREP ^.:`
52028  new_path="$path"
52029  if test "x$has_colon" = x; then
52030    # Not in mixed or Windows style, start by that.
52031    new_path=`cmd //c echo $path`
52032  fi
52033
52034
52035  input_path="$new_path"
52036  # Check if we need to convert this using DOS-style short mode. If the path
52037  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52038  # take no chances and rewrite it.
52039  # Note: m4 eats our [], so we need to use [ and ] instead.
52040  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52041  if test "x$has_forbidden_chars" != x; then
52042    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52043    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52044  fi
52045
52046
52047  windows_path="$new_path"
52048  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52049    unix_path=`$CYGPATH -u "$windows_path"`
52050    new_path="$unix_path"
52051  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52052    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52053    new_path="$unix_path"
52054  fi
52055
52056  if test "x$path" != "x$new_path"; then
52057    MSVC_DLL="$new_path"
52058    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52059$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52060  fi
52061
52062  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52063  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52064
52065    else
52066      # We're on a unix platform. Hooray! :)
52067      path="$MSVC_DLL"
52068      has_space=`$ECHO "$path" | $GREP " "`
52069      if test "x$has_space" != x; then
52070        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52071$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52072        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52073      fi
52074
52075      # Use eval to expand a potential ~
52076      eval path="$path"
52077      if test ! -f "$path" && test ! -d "$path"; then
52078        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
52079      fi
52080
52081      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
52082    fi
52083  fi
52084
52085      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52086$as_echo_n "checking for $DLL_NAME... " >&6; }
52087      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
52088$as_echo "$MSVC_DLL" >&6; }
52089    else
52090      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
52091$as_echo "incorrect, ignoring" >&6; }
52092      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
52093$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
52094    fi
52095  fi
52096
52097    fi
52098  fi
52099
52100  if test "x$MSVC_DLL" = x; then
52101    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52102$as_echo_n "checking for $DLL_NAME... " >&6; }
52103    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52104$as_echo "no" >&6; }
52105    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
52106  fi
52107
52108      MSVCP_DLL="$MSVC_DLL"
52109    fi
52110
52111  fi
52112
52113
52114
52115# Check whether --with-dxsdk was given.
52116if test "${with_dxsdk+set}" = set; then :
52117  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
52118$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
52119fi
52120
52121
52122
52123
52124# Check whether --with-dxsdk-lib was given.
52125if test "${with_dxsdk_lib+set}" = set; then :
52126  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
52127$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
52128fi
52129
52130
52131
52132
52133# Check whether --with-dxsdk-include was given.
52134if test "${with_dxsdk_include+set}" = set; then :
52135  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
52136$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
52137fi
52138
52139
52140  fi
52141
52142
52143###############################################################################
52144#
52145# We need to do some final tweaking, when everything else is done.
52146#
52147###############################################################################
52148
52149
52150  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
52151
52152
52153  # The name of the Service Agent jar.
52154  SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
52155  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
52156    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
52157  fi
52158
52159
52160
52161    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
52162$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
52163
52164    if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
52165      ENABLE_INTREE_EC=yes
52166      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52167$as_echo "yes" >&6; }
52168    else
52169      ENABLE_INTREE_EC=no
52170      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52171$as_echo "no" >&6; }
52172    fi
52173
52174
52175
52176
52177###############################################################################
52178#
52179# Configure parts of the build that only affect the build performance,
52180# not the result.
52181#
52182###############################################################################
52183
52184
52185  # How many cores do we have on this build system?
52186
52187# Check whether --with-num-cores was given.
52188if test "${with_num_cores+set}" = set; then :
52189  withval=$with_num_cores;
52190fi
52191
52192  if test "x$with_num_cores" = x; then
52193    # The number of cores were not specified, try to probe them.
52194
52195  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
52196$as_echo_n "checking for number of cores... " >&6; }
52197  NUM_CORES=1
52198  FOUND_CORES=no
52199
52200  if test -f /proc/cpuinfo; then
52201    # Looks like a Linux (or cygwin) system
52202    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
52203    FOUND_CORES=yes
52204  elif test -x /usr/sbin/psrinfo; then
52205    # Looks like a Solaris system
52206    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
52207    FOUND_CORES=yes
52208  elif test -x /usr/sbin/system_profiler; then
52209    # Looks like a MacOSX system
52210    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
52211    FOUND_CORES=yes
52212  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
52213    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
52214    FOUND_CORES=yes
52215  elif test -n "$NUMBER_OF_PROCESSORS"; then
52216    # On windows, look in the env
52217    NUM_CORES=$NUMBER_OF_PROCESSORS
52218    FOUND_CORES=yes
52219  fi
52220
52221  if test "x$FOUND_CORES" = xyes; then
52222    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
52223$as_echo "$NUM_CORES" >&6; }
52224  else
52225    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
52226$as_echo "could not detect number of cores, defaulting to 1" >&6; }
52227    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
52228$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
52229  fi
52230
52231  else
52232    NUM_CORES=$with_num_cores
52233  fi
52234
52235
52236
52237  # How much memory do we have on this build system?
52238
52239# Check whether --with-memory-size was given.
52240if test "${with_memory_size+set}" = set; then :
52241  withval=$with_memory_size;
52242fi
52243
52244  if test "x$with_memory_size" = x; then
52245    # The memory size was not specified, try to probe it.
52246
52247  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
52248$as_echo_n "checking for memory size... " >&6; }
52249  # Default to 1024 MB
52250  MEMORY_SIZE=1024
52251  FOUND_MEM=no
52252
52253  if test -f /proc/meminfo; then
52254    # Looks like a Linux (or cygwin) system
52255    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
52256    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
52257    FOUND_MEM=yes
52258  elif test -x /usr/sbin/prtconf; then
52259    # Looks like a Solaris or AIX system
52260    MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
52261    FOUND_MEM=yes
52262  elif test -x /usr/sbin/system_profiler; then
52263    # Looks like a MacOSX system
52264    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
52265    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
52266    FOUND_MEM=yes
52267  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
52268    # Windows, but without cygwin
52269    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
52270    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
52271    FOUND_MEM=yes
52272  fi
52273
52274  if test "x$FOUND_MEM" = xyes; then
52275    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
52276$as_echo "$MEMORY_SIZE MB" >&6; }
52277  else
52278    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
52279$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
52280    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
52281$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
52282  fi
52283
52284  else
52285    MEMORY_SIZE=$with_memory_size
52286  fi
52287
52288
52289
52290  # Provide a decent default number of parallel jobs for make depending on
52291  # number of cores, amount of memory and machine architecture.
52292
52293# Check whether --with-jobs was given.
52294if test "${with_jobs+set}" = set; then :
52295  withval=$with_jobs;
52296fi
52297
52298  if test "x$with_jobs" = x; then
52299    # Number of jobs was not specified, calculate.
52300    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
52301$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
52302    # Approximate memory in GB.
52303    memory_gb=`expr $MEMORY_SIZE / 1024`
52304    # Pick the lowest of memory in gb and number of cores.
52305    if test "$memory_gb" -lt "$NUM_CORES"; then
52306      JOBS="$memory_gb"
52307    else
52308      JOBS="$NUM_CORES"
52309      # On bigger machines, leave some room for other processes to run
52310      if test "$JOBS" -gt "4"; then
52311        JOBS=`expr $JOBS '*' 90 / 100`
52312      fi
52313    fi
52314    # Cap number of jobs to 16
52315    if test "$JOBS" -gt "16"; then
52316      JOBS=16
52317    fi
52318    if test "$JOBS" -eq "0"; then
52319      JOBS=1
52320    fi
52321    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
52322$as_echo "$JOBS" >&6; }
52323  else
52324    JOBS=$with_jobs
52325  fi
52326
52327
52328
52329# Setup arguments for the boot jdk (after cores and memory have been setup)
52330
52331  ##############################################################################
52332  #
52333  # Specify jvm options for anything that is run with the Boot JDK.
52334  # Not all JVM:s accept the same arguments on the command line.
52335  #
52336
52337# Check whether --with-boot-jdk-jvmargs was given.
52338if test "${with_boot_jdk_jvmargs+set}" = set; then :
52339  withval=$with_boot_jdk_jvmargs;
52340fi
52341
52342
52343  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
52344$as_echo_n "checking flags for boot jdk java command ... " >&6; }
52345
52346  # Disable special log output when a debug build is used as Boot JDK...
52347
52348  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
52349  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
52350  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
52351  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52352  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52353  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52354    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
52355    JVM_ARG_OK=true
52356  else
52357    $ECHO "Arg failed:" >&5
52358    $ECHO "$OUTPUT" >&5
52359    JVM_ARG_OK=false
52360  fi
52361
52362
52363  # Apply user provided options.
52364
52365  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
52366  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
52367  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
52368  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52369  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52370  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52371    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
52372    JVM_ARG_OK=true
52373  else
52374    $ECHO "Arg failed:" >&5
52375    $ECHO "$OUTPUT" >&5
52376    JVM_ARG_OK=false
52377  fi
52378
52379
52380  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
52381$as_echo "$boot_jdk_jvmargs" >&6; }
52382
52383  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
52384  JAVA_FLAGS=$boot_jdk_jvmargs
52385
52386
52387
52388  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
52389$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
52390
52391  # Starting amount of heap memory.
52392
52393  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
52394  $ECHO "Command: $JAVA -Xms64M -version" >&5
52395  OUTPUT=`$JAVA -Xms64M -version 2>&1`
52396  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52397  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52398  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52399    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
52400    JVM_ARG_OK=true
52401  else
52402    $ECHO "Arg failed:" >&5
52403    $ECHO "$OUTPUT" >&5
52404    JVM_ARG_OK=false
52405  fi
52406
52407
52408  # Maximum amount of heap memory.
52409  # Maximum stack size.
52410  JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
52411  if test "x$BUILD_NUM_BITS" = x32; then
52412    if test "$JVM_MAX_HEAP" -gt "1100"; then
52413      JVM_MAX_HEAP=1100
52414    elif test "$JVM_MAX_HEAP" -lt "512"; then
52415      JVM_MAX_HEAP=512
52416    fi
52417    STACK_SIZE=768
52418  else
52419    # Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit
52420    # pointers are used. Apparently, we need to increase the heap and stack
52421    # space for the jvm. More specifically, when running javac to build huge
52422    # jdk batch
52423    if test "$JVM_MAX_HEAP" -gt "1600"; then
52424      JVM_MAX_HEAP=1600
52425    elif test "$JVM_MAX_HEAP" -lt "512"; then
52426      JVM_MAX_HEAP=512
52427    fi
52428    STACK_SIZE=1536
52429  fi
52430
52431  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
52432  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
52433  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
52434  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52435  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52436  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52437    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
52438    JVM_ARG_OK=true
52439  else
52440    $ECHO "Arg failed:" >&5
52441    $ECHO "$OUTPUT" >&5
52442    JVM_ARG_OK=false
52443  fi
52444
52445
52446  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
52447  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
52448  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
52449  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52450  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52451  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52452    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
52453    JVM_ARG_OK=true
52454  else
52455    $ECHO "Arg failed:" >&5
52456    $ECHO "$OUTPUT" >&5
52457    JVM_ARG_OK=false
52458  fi
52459
52460
52461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
52462$as_echo "$boot_jdk_jvmargs_big" >&6; }
52463
52464  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
52465
52466
52467
52468  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
52469$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
52470
52471  # Use serial gc for small short lived tools if possible
52472
52473  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
52474  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
52475  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
52476  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52477  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52478  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52479    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
52480    JVM_ARG_OK=true
52481  else
52482    $ECHO "Arg failed:" >&5
52483    $ECHO "$OUTPUT" >&5
52484    JVM_ARG_OK=false
52485  fi
52486
52487
52488  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
52489  $ECHO "Command: $JAVA -Xms32M -version" >&5
52490  OUTPUT=`$JAVA -Xms32M -version 2>&1`
52491  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52492  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52493  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52494    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
52495    JVM_ARG_OK=true
52496  else
52497    $ECHO "Arg failed:" >&5
52498    $ECHO "$OUTPUT" >&5
52499    JVM_ARG_OK=false
52500  fi
52501
52502
52503  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
52504  $ECHO "Command: $JAVA -Xmx512M -version" >&5
52505  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
52506  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52507  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52508  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52509    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
52510    JVM_ARG_OK=true
52511  else
52512    $ECHO "Arg failed:" >&5
52513    $ECHO "$OUTPUT" >&5
52514    JVM_ARG_OK=false
52515  fi
52516
52517
52518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
52519$as_echo "$boot_jdk_jvmargs_small" >&6; }
52520
52521  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
52522
52523
52524  JAVA_TOOL_FLAGS_SMALL=""
52525  for f in $JAVA_FLAGS_SMALL; do
52526    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
52527  done
52528
52529
52530
52531# Setup smart javac (after cores and memory have been setup)
52532
52533
52534# Check whether --with-sjavac-server-java was given.
52535if test "${with_sjavac_server_java+set}" = set; then :
52536  withval=$with_sjavac_server_java;
52537fi
52538
52539
52540  if test "x$with_sjavac_server_java" != x; then
52541    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
52542    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
52543    if test "x$FOUND_VERSION" = x; then
52544      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
52545    fi
52546  else
52547    SJAVAC_SERVER_JAVA="$JAVA"
52548  fi
52549
52550
52551  if test "$MEMORY_SIZE" -gt "3000"; then
52552
52553  $ECHO "Check if jvm arg is ok: -d64" >&5
52554  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
52555  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
52556  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52557  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52558  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52559    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
52560    JVM_ARG_OK=true
52561  else
52562    $ECHO "Arg failed:" >&5
52563    $ECHO "$OUTPUT" >&5
52564    JVM_ARG_OK=false
52565  fi
52566
52567    if test "$JVM_ARG_OK" = true; then
52568      JVM_64BIT=true
52569      JVM_ARG_OK=false
52570    fi
52571  fi
52572
52573  MX_VALUE=`expr $MEMORY_SIZE / 2`
52574  if test "$JVM_64BIT" = true; then
52575    # Set ms lower than mx since more than one instance of the server might
52576    # get launched at the same time before they figure out which instance won.
52577    MS_VALUE=512
52578    if test "$MX_VALUE" -gt "2048"; then
52579      MX_VALUE=2048
52580    fi
52581  else
52582    MS_VALUE=256
52583    if test "$MX_VALUE" -gt "1500"; then
52584      MX_VALUE=1500
52585    fi
52586  fi
52587  if test "$MX_VALUE" -lt "512"; then
52588    MX_VALUE=512
52589  fi
52590
52591  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
52592  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
52593  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
52594  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52595  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52596  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52597    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
52598    JVM_ARG_OK=true
52599  else
52600    $ECHO "Arg failed:" >&5
52601    $ECHO "$OUTPUT" >&5
52602    JVM_ARG_OK=false
52603  fi
52604
52605
52606
52607  # Check whether --enable-sjavac was given.
52608if test "${enable_sjavac+set}" = set; then :
52609  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
52610else
52611  ENABLE_SJAVAC='no'
52612fi
52613
52614  if test "x$JVM_ARG_OK" = "xfalse"; then
52615    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
52616$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
52617    ENABLE_SJAVAC=no;
52618  fi
52619  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
52620$as_echo_n "checking whether to use sjavac... " >&6; }
52621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
52622$as_echo "$ENABLE_SJAVAC" >&6; }
52623
52624
52625
52626# Can the C/C++ compiler use precompiled headers?
52627
52628
52629  ###############################################################################
52630  #
52631  # Can the C/C++ compiler use precompiled headers?
52632  #
52633  # Check whether --enable-precompiled-headers was given.
52634if test "${enable_precompiled_headers+set}" = set; then :
52635  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
52636else
52637  ENABLE_PRECOMPH=yes
52638fi
52639
52640
52641  USE_PRECOMPILED_HEADER=1
52642  if test "x$ENABLE_PRECOMPH" = xno; then
52643    USE_PRECOMPILED_HEADER=0
52644  fi
52645
52646  if test "x$ENABLE_PRECOMPH" = xyes; then
52647    # Check that the compiler actually supports precomp headers.
52648    if test "x$TOOLCHAIN_TYPE" = xgcc; then
52649      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
52650$as_echo_n "checking that precompiled headers work... " >&6; }
52651      echo "int alfa();" > conftest.h
52652      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
52653      if test ! -f conftest.hpp.gch; then
52654        USE_PRECOMPILED_HEADER=0
52655        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52656$as_echo "no" >&6; }
52657      else
52658        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52659$as_echo "yes" >&6; }
52660      fi
52661      rm -f conftest.h conftest.hpp.gch
52662    fi
52663  fi
52664
52665
52666
52667
52668# Setup use of ccache, if available
52669
52670  # Check whether --enable-ccache was given.
52671if test "${enable_ccache+set}" = set; then :
52672  enableval=$enable_ccache;
52673fi
52674
52675
52676  CCACHE=
52677  CCACHE_STATUS=
52678  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
52679$as_echo_n "checking is ccache enabled... " >&6; }
52680  if test "x$enable_ccache" = xyes; then
52681    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
52682      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52683$as_echo "yes" >&6; }
52684      OLD_PATH="$PATH"
52685      if test "x$TOOLCHAIN_PATH" != x; then
52686        PATH=$TOOLCHAIN_PATH:$PATH
52687      fi
52688
52689
52690
52691  # Publish this variable in the help.
52692
52693
52694  if test "x$CCACHE" = x; then
52695    # The variable is not set by user, try to locate tool using the code snippet
52696    for ac_prog in ccache
52697do
52698  # Extract the first word of "$ac_prog", so it can be a program name with args.
52699set dummy $ac_prog; ac_word=$2
52700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
52701$as_echo_n "checking for $ac_word... " >&6; }
52702if ${ac_cv_path_CCACHE+:} false; then :
52703  $as_echo_n "(cached) " >&6
52704else
52705  case $CCACHE in
52706  [\\/]* | ?:[\\/]*)
52707  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
52708  ;;
52709  *)
52710  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
52711for as_dir in $PATH
52712do
52713  IFS=$as_save_IFS
52714  test -z "$as_dir" && as_dir=.
52715    for ac_exec_ext in '' $ac_executable_extensions; do
52716  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
52717    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
52718    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
52719    break 2
52720  fi
52721done
52722  done
52723IFS=$as_save_IFS
52724
52725  ;;
52726esac
52727fi
52728CCACHE=$ac_cv_path_CCACHE
52729if test -n "$CCACHE"; then
52730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
52731$as_echo "$CCACHE" >&6; }
52732else
52733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52734$as_echo "no" >&6; }
52735fi
52736
52737
52738  test -n "$CCACHE" && break
52739done
52740
52741  else
52742    # The variable is set, but is it from the command line or the environment?
52743
52744    # Try to remove the string !CCACHE! from our list.
52745    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
52746    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
52747      # If it failed, the variable was not from the command line. Ignore it,
52748      # but warn the user (except for BASH, which is always set by the calling BASH).
52749      if test "xCCACHE" != xBASH; then
52750        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
52751$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
52752      fi
52753      # Try to locate tool using the code snippet
52754      for ac_prog in ccache
52755do
52756  # Extract the first word of "$ac_prog", so it can be a program name with args.
52757set dummy $ac_prog; ac_word=$2
52758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
52759$as_echo_n "checking for $ac_word... " >&6; }
52760if ${ac_cv_path_CCACHE+:} false; then :
52761  $as_echo_n "(cached) " >&6
52762else
52763  case $CCACHE in
52764  [\\/]* | ?:[\\/]*)
52765  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
52766  ;;
52767  *)
52768  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
52769for as_dir in $PATH
52770do
52771  IFS=$as_save_IFS
52772  test -z "$as_dir" && as_dir=.
52773    for ac_exec_ext in '' $ac_executable_extensions; do
52774  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
52775    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
52776    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
52777    break 2
52778  fi
52779done
52780  done
52781IFS=$as_save_IFS
52782
52783  ;;
52784esac
52785fi
52786CCACHE=$ac_cv_path_CCACHE
52787if test -n "$CCACHE"; then
52788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
52789$as_echo "$CCACHE" >&6; }
52790else
52791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52792$as_echo "no" >&6; }
52793fi
52794
52795
52796  test -n "$CCACHE" && break
52797done
52798
52799    else
52800      # If it succeeded, then it was overridden by the user. We will use it
52801      # for the tool.
52802
52803      # First remove it from the list of overridden variables, so we can test
52804      # for unknown variables in the end.
52805      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
52806
52807      # Check if the provided tool contains a complete path.
52808      tool_specified="$CCACHE"
52809      tool_basename="${tool_specified##*/}"
52810      if test "x$tool_basename" = "x$tool_specified"; then
52811        # A command without a complete path is provided, search $PATH.
52812        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
52813$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
52814        # Extract the first word of "$tool_basename", so it can be a program name with args.
52815set dummy $tool_basename; ac_word=$2
52816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
52817$as_echo_n "checking for $ac_word... " >&6; }
52818if ${ac_cv_path_CCACHE+:} false; then :
52819  $as_echo_n "(cached) " >&6
52820else
52821  case $CCACHE in
52822  [\\/]* | ?:[\\/]*)
52823  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
52824  ;;
52825  *)
52826  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
52827for as_dir in $PATH
52828do
52829  IFS=$as_save_IFS
52830  test -z "$as_dir" && as_dir=.
52831    for ac_exec_ext in '' $ac_executable_extensions; do
52832  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
52833    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
52834    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
52835    break 2
52836  fi
52837done
52838  done
52839IFS=$as_save_IFS
52840
52841  ;;
52842esac
52843fi
52844CCACHE=$ac_cv_path_CCACHE
52845if test -n "$CCACHE"; then
52846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
52847$as_echo "$CCACHE" >&6; }
52848else
52849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52850$as_echo "no" >&6; }
52851fi
52852
52853
52854        if test "x$CCACHE" = x; then
52855          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
52856        fi
52857      else
52858        # Otherwise we believe it is a complete path. Use it as it is.
52859        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
52860$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
52861        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
52862$as_echo_n "checking for CCACHE... " >&6; }
52863        if test ! -x "$tool_specified"; then
52864          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
52865$as_echo "not found" >&6; }
52866          as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
52867        fi
52868        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
52869$as_echo "$tool_specified" >&6; }
52870      fi
52871    fi
52872  fi
52873
52874
52875
52876  if test "x$CCACHE" = x; then
52877    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
52878  fi
52879
52880
52881      PATH="$OLD_PATH"
52882      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
52883      CCACHE_STATUS="Active ($CCACHE_VERSION)"
52884    else
52885      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52886$as_echo "no" >&6; }
52887      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
52888$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
52889    fi
52890  elif test "x$enable_ccache" = xno; then
52891    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
52892$as_echo "no, explicitly disabled" >&6; }
52893    CCACHE_STATUS="Disabled"
52894  elif test "x$enable_ccache" = x; then
52895    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52896$as_echo "no" >&6; }
52897  else
52898    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
52899$as_echo "unknown" >&6; }
52900    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
52901  fi
52902
52903
52904
52905# Check whether --with-ccache-dir was given.
52906if test "${with_ccache_dir+set}" = set; then :
52907  withval=$with_ccache_dir;
52908fi
52909
52910
52911  if test "x$with_ccache_dir" != x; then
52912    # When using a non home ccache directory, assume the use is to share ccache files
52913    # with other users. Thus change the umask.
52914    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
52915    if test "x$CCACHE" = x; then
52916      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
52917$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
52918    fi
52919  fi
52920
52921  if test "x$CCACHE" != x; then
52922
52923  if test "x$CCACHE" != x; then
52924    if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
52925      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
52926          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
52927      if test "x$HAS_BAD_CCACHE" != "x"; then
52928        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
52929      fi
52930      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
52931$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
52932      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
52933      PUSHED_FLAGS="$CXXFLAGS"
52934      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
52935      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52936/* end confdefs.h.  */
52937
52938int
52939main ()
52940{
52941
52942  ;
52943  return 0;
52944}
52945_ACEOF
52946if ac_fn_cxx_try_compile "$LINENO"; then :
52947  CC_KNOWS_CCACHE_TRICK=yes
52948else
52949  CC_KNOWS_CCACHE_TRICK=no
52950fi
52951rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52952      CXXFLAGS="$PUSHED_FLAGS"
52953      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
52954        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52955$as_echo "yes" >&6; }
52956        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
52957
52958        CCACHE_SLOPPINESS=pch_defines,time_macros
52959      else
52960        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52961$as_echo "no" >&6; }
52962        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
52963      fi
52964    fi
52965
52966    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
52967        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
52968
52969    if test "x$SET_CCACHE_DIR" != x; then
52970      mkdir -p $CCACHE_DIR > /dev/null 2>&1
52971      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
52972    fi
52973  fi
52974
52975  fi
52976
52977
52978###############################################################################
52979#
52980# And now the finish...
52981#
52982###############################################################################
52983
52984# Check for some common pitfalls
52985
52986  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52987    file_to_test="$SRC_ROOT/LICENSE"
52988    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
52989      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
52990    fi
52991  fi
52992
52993
52994  # Did user specify any unknown variables?
52995
52996  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
52997    # Replace the separating ! with spaces before presenting for end user.
52998    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
52999    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
53000$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
53001  fi
53002
53003
53004  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
53005$as_echo_n "checking if build directory is on local disk... " >&6; }
53006
53007  # df -l lists only local disks; if the given directory is not found then
53008  # a non-zero exit code is given
53009  if test "x$DF" = x; then
53010    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53011      # msys does not have df; use Windows "net use" instead.
53012      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
53013      if test "x$IS_NETWORK_DISK" = x; then
53014        OUTPUT_DIR_IS_LOCAL="yes"
53015      else
53016        OUTPUT_DIR_IS_LOCAL="no"
53017      fi
53018    else
53019      # No df here, say it's local
53020      OUTPUT_DIR_IS_LOCAL="yes"
53021    fi
53022  else
53023    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
53024      OUTPUT_DIR_IS_LOCAL="yes"
53025    else
53026      OUTPUT_DIR_IS_LOCAL="no"
53027    fi
53028  fi
53029
53030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
53031$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
53032
53033
53034
53035  # Check if the user has any old-style ALT_ variables set.
53036  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
53037
53038  # Before generating output files, test if they exist. If they do, this is a reconfigure.
53039  # Since we can't properly handle the dependencies for this, warn the user about the situation
53040  if test -e $OUTPUT_ROOT/spec.gmk; then
53041    IS_RECONFIGURE=yes
53042  else
53043    IS_RECONFIGURE=no
53044  fi
53045
53046
53047# At the end, call the custom hook. (Dummy macro if no custom sources available)
53048
53049
53050# We're messing a bit with internal autoconf variables to put the config.status
53051# in the output directory instead of the current directory.
53052CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
53053
53054# Create the actual output files. Now the main work of configure is done.
53055cat >confcache <<\_ACEOF
53056# This file is a shell script that caches the results of configure
53057# tests run on this system so they can be shared between configure
53058# scripts and configure runs, see configure's option --config-cache.
53059# It is not useful on other systems.  If it contains results you don't
53060# want to keep, you may remove or edit it.
53061#
53062# config.status only pays attention to the cache file if you give it
53063# the --recheck option to rerun configure.
53064#
53065# `ac_cv_env_foo' variables (set or unset) will be overridden when
53066# loading this file, other *unset* `ac_cv_foo' will be assigned the
53067# following values.
53068
53069_ACEOF
53070
53071# The following way of writing the cache mishandles newlines in values,
53072# but we know of no workaround that is simple, portable, and efficient.
53073# So, we kill variables containing newlines.
53074# Ultrix sh set writes to stderr and can't be redirected directly,
53075# and sets the high bit in the cache file unless we assign to the vars.
53076(
53077  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
53078    eval ac_val=\$$ac_var
53079    case $ac_val in #(
53080    *${as_nl}*)
53081      case $ac_var in #(
53082      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
53083$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
53084      esac
53085      case $ac_var in #(
53086      _ | IFS | as_nl) ;; #(
53087      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
53088      *) { eval $ac_var=; unset $ac_var;} ;;
53089      esac ;;
53090    esac
53091  done
53092
53093  (set) 2>&1 |
53094    case $as_nl`(ac_space=' '; set) 2>&1` in #(
53095    *${as_nl}ac_space=\ *)
53096      # `set' does not quote correctly, so add quotes: double-quote
53097      # substitution turns \\\\ into \\, and sed turns \\ into \.
53098      sed -n \
53099	"s/'/'\\\\''/g;
53100	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
53101      ;; #(
53102    *)
53103      # `set' quotes correctly as required by POSIX, so do not add quotes.
53104      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
53105      ;;
53106    esac |
53107    sort
53108) |
53109  sed '
53110     /^ac_cv_env_/b end
53111     t clear
53112     :clear
53113     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
53114     t end
53115     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
53116     :end' >>confcache
53117if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
53118  if test -w "$cache_file"; then
53119    if test "x$cache_file" != "x/dev/null"; then
53120      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
53121$as_echo "$as_me: updating cache $cache_file" >&6;}
53122      if test ! -f "$cache_file" || test -h "$cache_file"; then
53123	cat confcache >"$cache_file"
53124      else
53125        case $cache_file in #(
53126        */* | ?:*)
53127	  mv -f confcache "$cache_file"$$ &&
53128	  mv -f "$cache_file"$$ "$cache_file" ;; #(
53129        *)
53130	  mv -f confcache "$cache_file" ;;
53131	esac
53132      fi
53133    fi
53134  else
53135    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
53136$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
53137  fi
53138fi
53139rm -f confcache
53140
53141test "x$prefix" = xNONE && prefix=$ac_default_prefix
53142# Let make expand exec_prefix.
53143test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
53144
53145# Transform confdefs.h into DEFS.
53146# Protect against shell expansion while executing Makefile rules.
53147# Protect against Makefile macro expansion.
53148#
53149# If the first sed substitution is executed (which looks for macros that
53150# take arguments), then branch to the quote section.  Otherwise,
53151# look for a macro that doesn't take arguments.
53152ac_script='
53153:mline
53154/\\$/{
53155 N
53156 s,\\\n,,
53157 b mline
53158}
53159t clear
53160:clear
53161s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
53162t quote
53163s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
53164t quote
53165b any
53166:quote
53167s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
53168s/\[/\\&/g
53169s/\]/\\&/g
53170s/\$/$$/g
53171H
53172:any
53173${
53174	g
53175	s/^\n//
53176	s/\n/ /g
53177	p
53178}
53179'
53180DEFS=`sed -n "$ac_script" confdefs.h`
53181
53182
53183ac_libobjs=
53184ac_ltlibobjs=
53185U=
53186for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
53187  # 1. Remove the extension, and $U if already installed.
53188  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
53189  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
53190  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
53191  #    will be set to the directory where LIBOBJS objects are built.
53192  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
53193  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
53194done
53195LIBOBJS=$ac_libobjs
53196
53197LTLIBOBJS=$ac_ltlibobjs
53198
53199
53200
53201: "${CONFIG_STATUS=./config.status}"
53202ac_write_fail=0
53203ac_clean_files_save=$ac_clean_files
53204ac_clean_files="$ac_clean_files $CONFIG_STATUS"
53205{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
53206$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
53207as_write_fail=0
53208cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
53209#! $SHELL
53210# Generated by $as_me.
53211# Run this file to recreate the current configuration.
53212# Compiler output produced by configure, useful for debugging
53213# configure, is in config.log if it exists.
53214
53215debug=false
53216ac_cs_recheck=false
53217ac_cs_silent=false
53218
53219SHELL=\${CONFIG_SHELL-$SHELL}
53220export SHELL
53221_ASEOF
53222cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
53223## -------------------- ##
53224## M4sh Initialization. ##
53225## -------------------- ##
53226
53227# Be more Bourne compatible
53228DUALCASE=1; export DUALCASE # for MKS sh
53229if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
53230  emulate sh
53231  NULLCMD=:
53232  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
53233  # is contrary to our usage.  Disable this feature.
53234  alias -g '${1+"$@"}'='"$@"'
53235  setopt NO_GLOB_SUBST
53236else
53237  case `(set -o) 2>/dev/null` in #(
53238  *posix*) :
53239    set -o posix ;; #(
53240  *) :
53241     ;;
53242esac
53243fi
53244
53245
53246as_nl='
53247'
53248export as_nl
53249# Printing a long string crashes Solaris 7 /usr/bin/printf.
53250as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
53251as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
53252as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
53253# Prefer a ksh shell builtin over an external printf program on Solaris,
53254# but without wasting forks for bash or zsh.
53255if test -z "$BASH_VERSION$ZSH_VERSION" \
53256    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
53257  as_echo='print -r --'
53258  as_echo_n='print -rn --'
53259elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
53260  as_echo='printf %s\n'
53261  as_echo_n='printf %s'
53262else
53263  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
53264    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53265    as_echo_n='/usr/ucb/echo -n'
53266  else
53267    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
53268    as_echo_n_body='eval
53269      arg=$1;
53270      case $arg in #(
53271      *"$as_nl"*)
53272	expr "X$arg" : "X\\(.*\\)$as_nl";
53273	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
53274      esac;
53275      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
53276    '
53277    export as_echo_n_body
53278    as_echo_n='sh -c $as_echo_n_body as_echo'
53279  fi
53280  export as_echo_body
53281  as_echo='sh -c $as_echo_body as_echo'
53282fi
53283
53284# The user is always right.
53285if test "${PATH_SEPARATOR+set}" != set; then
53286  PATH_SEPARATOR=:
53287  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
53288    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
53289      PATH_SEPARATOR=';'
53290  }
53291fi
53292
53293
53294# IFS
53295# We need space, tab and new line, in precisely that order.  Quoting is
53296# there to prevent editors from complaining about space-tab.
53297# (If _AS_PATH_WALK were called with IFS unset, it would disable word
53298# splitting by setting IFS to empty value.)
53299IFS=" ""	$as_nl"
53300
53301# Find who we are.  Look in the path if we contain no directory separator.
53302as_myself=
53303case $0 in #((
53304  *[\\/]* ) as_myself=$0 ;;
53305  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
53306for as_dir in $PATH
53307do
53308  IFS=$as_save_IFS
53309  test -z "$as_dir" && as_dir=.
53310    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
53311  done
53312IFS=$as_save_IFS
53313
53314     ;;
53315esac
53316# We did not find ourselves, most probably we were run as `sh COMMAND'
53317# in which case we are not to be found in the path.
53318if test "x$as_myself" = x; then
53319  as_myself=$0
53320fi
53321if test ! -f "$as_myself"; then
53322  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
53323  exit 1
53324fi
53325
53326# Unset variables that we do not need and which cause bugs (e.g. in
53327# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
53328# suppresses any "Segmentation fault" message there.  '((' could
53329# trigger a bug in pdksh 5.2.14.
53330for as_var in BASH_ENV ENV MAIL MAILPATH
53331do eval test x\${$as_var+set} = xset \
53332  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
53333done
53334PS1='$ '
53335PS2='> '
53336PS4='+ '
53337
53338# NLS nuisances.
53339LC_ALL=C
53340export LC_ALL
53341LANGUAGE=C
53342export LANGUAGE
53343
53344# CDPATH.
53345(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
53346
53347
53348# as_fn_error STATUS ERROR [LINENO LOG_FD]
53349# ----------------------------------------
53350# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
53351# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
53352# script with STATUS, using 1 if that was 0.
53353as_fn_error ()
53354{
53355  as_status=$1; test $as_status -eq 0 && as_status=1
53356  if test "$4"; then
53357    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
53358    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
53359  fi
53360  $as_echo "$as_me: error: $2" >&2
53361  as_fn_exit $as_status
53362} # as_fn_error
53363
53364
53365# as_fn_set_status STATUS
53366# -----------------------
53367# Set $? to STATUS, without forking.
53368as_fn_set_status ()
53369{
53370  return $1
53371} # as_fn_set_status
53372
53373# as_fn_exit STATUS
53374# -----------------
53375# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
53376as_fn_exit ()
53377{
53378  set +e
53379  as_fn_set_status $1
53380  exit $1
53381} # as_fn_exit
53382
53383# as_fn_unset VAR
53384# ---------------
53385# Portably unset VAR.
53386as_fn_unset ()
53387{
53388  { eval $1=; unset $1;}
53389}
53390as_unset=as_fn_unset
53391# as_fn_append VAR VALUE
53392# ----------------------
53393# Append the text in VALUE to the end of the definition contained in VAR. Take
53394# advantage of any shell optimizations that allow amortized linear growth over
53395# repeated appends, instead of the typical quadratic growth present in naive
53396# implementations.
53397if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
53398  eval 'as_fn_append ()
53399  {
53400    eval $1+=\$2
53401  }'
53402else
53403  as_fn_append ()
53404  {
53405    eval $1=\$$1\$2
53406  }
53407fi # as_fn_append
53408
53409# as_fn_arith ARG...
53410# ------------------
53411# Perform arithmetic evaluation on the ARGs, and store the result in the
53412# global $as_val. Take advantage of shells that can avoid forks. The arguments
53413# must be portable across $(()) and expr.
53414if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
53415  eval 'as_fn_arith ()
53416  {
53417    as_val=$(( $* ))
53418  }'
53419else
53420  as_fn_arith ()
53421  {
53422    as_val=`expr "$@" || test $? -eq 1`
53423  }
53424fi # as_fn_arith
53425
53426
53427if expr a : '\(a\)' >/dev/null 2>&1 &&
53428   test "X`expr 00001 : '.*\(...\)'`" = X001; then
53429  as_expr=expr
53430else
53431  as_expr=false
53432fi
53433
53434if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
53435  as_basename=basename
53436else
53437  as_basename=false
53438fi
53439
53440if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
53441  as_dirname=dirname
53442else
53443  as_dirname=false
53444fi
53445
53446as_me=`$as_basename -- "$0" ||
53447$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
53448	 X"$0" : 'X\(//\)$' \| \
53449	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
53450$as_echo X/"$0" |
53451    sed '/^.*\/\([^/][^/]*\)\/*$/{
53452	    s//\1/
53453	    q
53454	  }
53455	  /^X\/\(\/\/\)$/{
53456	    s//\1/
53457	    q
53458	  }
53459	  /^X\/\(\/\).*/{
53460	    s//\1/
53461	    q
53462	  }
53463	  s/.*/./; q'`
53464
53465# Avoid depending upon Character Ranges.
53466as_cr_letters='abcdefghijklmnopqrstuvwxyz'
53467as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
53468as_cr_Letters=$as_cr_letters$as_cr_LETTERS
53469as_cr_digits='0123456789'
53470as_cr_alnum=$as_cr_Letters$as_cr_digits
53471
53472ECHO_C= ECHO_N= ECHO_T=
53473case `echo -n x` in #(((((
53474-n*)
53475  case `echo 'xy\c'` in
53476  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
53477  xy)  ECHO_C='\c';;
53478  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
53479       ECHO_T='	';;
53480  esac;;
53481*)
53482  ECHO_N='-n';;
53483esac
53484
53485rm -f conf$$ conf$$.exe conf$$.file
53486if test -d conf$$.dir; then
53487  rm -f conf$$.dir/conf$$.file
53488else
53489  rm -f conf$$.dir
53490  mkdir conf$$.dir 2>/dev/null
53491fi
53492if (echo >conf$$.file) 2>/dev/null; then
53493  if ln -s conf$$.file conf$$ 2>/dev/null; then
53494    as_ln_s='ln -s'
53495    # ... but there are two gotchas:
53496    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
53497    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
53498    # In both cases, we have to default to `cp -pR'.
53499    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
53500      as_ln_s='cp -pR'
53501  elif ln conf$$.file conf$$ 2>/dev/null; then
53502    as_ln_s=ln
53503  else
53504    as_ln_s='cp -pR'
53505  fi
53506else
53507  as_ln_s='cp -pR'
53508fi
53509rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
53510rmdir conf$$.dir 2>/dev/null
53511
53512
53513# as_fn_mkdir_p
53514# -------------
53515# Create "$as_dir" as a directory, including parents if necessary.
53516as_fn_mkdir_p ()
53517{
53518
53519  case $as_dir in #(
53520  -*) as_dir=./$as_dir;;
53521  esac
53522  test -d "$as_dir" || eval $as_mkdir_p || {
53523    as_dirs=
53524    while :; do
53525      case $as_dir in #(
53526      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
53527      *) as_qdir=$as_dir;;
53528      esac
53529      as_dirs="'$as_qdir' $as_dirs"
53530      as_dir=`$as_dirname -- "$as_dir" ||
53531$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
53532	 X"$as_dir" : 'X\(//\)[^/]' \| \
53533	 X"$as_dir" : 'X\(//\)$' \| \
53534	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
53535$as_echo X"$as_dir" |
53536    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
53537	    s//\1/
53538	    q
53539	  }
53540	  /^X\(\/\/\)[^/].*/{
53541	    s//\1/
53542	    q
53543	  }
53544	  /^X\(\/\/\)$/{
53545	    s//\1/
53546	    q
53547	  }
53548	  /^X\(\/\).*/{
53549	    s//\1/
53550	    q
53551	  }
53552	  s/.*/./; q'`
53553      test -d "$as_dir" && break
53554    done
53555    test -z "$as_dirs" || eval "mkdir $as_dirs"
53556  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
53557
53558
53559} # as_fn_mkdir_p
53560if mkdir -p . 2>/dev/null; then
53561  as_mkdir_p='mkdir -p "$as_dir"'
53562else
53563  test -d ./-p && rmdir ./-p
53564  as_mkdir_p=false
53565fi
53566
53567
53568# as_fn_executable_p FILE
53569# -----------------------
53570# Test if FILE is an executable regular file.
53571as_fn_executable_p ()
53572{
53573  test -f "$1" && test -x "$1"
53574} # as_fn_executable_p
53575as_test_x='test -x'
53576as_executable_p=as_fn_executable_p
53577
53578# Sed expression to map a string onto a valid CPP name.
53579as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
53580
53581# Sed expression to map a string onto a valid variable name.
53582as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
53583
53584
53585exec 6>&1
53586## ----------------------------------- ##
53587## Main body of $CONFIG_STATUS script. ##
53588## ----------------------------------- ##
53589_ASEOF
53590test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
53591
53592cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
53593# Save the log message, to keep $0 and so on meaningful, and to
53594# report actual input values of CONFIG_FILES etc. instead of their
53595# values after options handling.
53596ac_log="
53597This file was extended by OpenJDK $as_me jdk9, which was
53598generated by GNU Autoconf 2.69.  Invocation command line was
53599
53600  CONFIG_FILES    = $CONFIG_FILES
53601  CONFIG_HEADERS  = $CONFIG_HEADERS
53602  CONFIG_LINKS    = $CONFIG_LINKS
53603  CONFIG_COMMANDS = $CONFIG_COMMANDS
53604  $ $0 $@
53605
53606on `(hostname || uname -n) 2>/dev/null | sed 1q`
53607"
53608
53609_ACEOF
53610
53611case $ac_config_files in *"
53612"*) set x $ac_config_files; shift; ac_config_files=$*;;
53613esac
53614
53615
53616
53617cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
53618# Files that config.status was made for.
53619config_files="$ac_config_files"
53620
53621_ACEOF
53622
53623cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
53624ac_cs_usage="\
53625\`$as_me' instantiates files and other configuration actions
53626from templates according to the current configuration.  Unless the files
53627and actions are specified as TAGs, all are instantiated by default.
53628
53629Usage: $0 [OPTION]... [TAG]...
53630
53631  -h, --help       print this help, then exit
53632  -V, --version    print version number and configuration settings, then exit
53633      --config     print configuration, then exit
53634  -q, --quiet, --silent
53635                   do not print progress messages
53636  -d, --debug      don't remove temporary files
53637      --recheck    update $as_me by reconfiguring in the same conditions
53638      --file=FILE[:TEMPLATE]
53639                   instantiate the configuration file FILE
53640
53641Configuration files:
53642$config_files
53643
53644Report bugs to <build-dev@openjdk.java.net>.
53645OpenJDK home page: <http://openjdk.java.net>."
53646
53647_ACEOF
53648cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
53649ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
53650ac_cs_version="\\
53651OpenJDK config.status jdk9
53652configured by $0, generated by GNU Autoconf 2.69,
53653  with options \\"\$ac_cs_config\\"
53654
53655Copyright (C) 2012 Free Software Foundation, Inc.
53656This config.status script is free software; the Free Software Foundation
53657gives unlimited permission to copy, distribute and modify it."
53658
53659ac_pwd='$ac_pwd'
53660srcdir='$srcdir'
53661AWK='$AWK'
53662test -n "\$AWK" || AWK=awk
53663_ACEOF
53664
53665cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
53666# The default lists apply if the user does not specify any file.
53667ac_need_defaults=:
53668while test $# != 0
53669do
53670  case $1 in
53671  --*=?*)
53672    ac_option=`expr "X$1" : 'X\([^=]*\)='`
53673    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
53674    ac_shift=:
53675    ;;
53676  --*=)
53677    ac_option=`expr "X$1" : 'X\([^=]*\)='`
53678    ac_optarg=
53679    ac_shift=:
53680    ;;
53681  *)
53682    ac_option=$1
53683    ac_optarg=$2
53684    ac_shift=shift
53685    ;;
53686  esac
53687
53688  case $ac_option in
53689  # Handling of the options.
53690  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
53691    ac_cs_recheck=: ;;
53692  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
53693    $as_echo "$ac_cs_version"; exit ;;
53694  --config | --confi | --conf | --con | --co | --c )
53695    $as_echo "$ac_cs_config"; exit ;;
53696  --debug | --debu | --deb | --de | --d | -d )
53697    debug=: ;;
53698  --file | --fil | --fi | --f )
53699    $ac_shift
53700    case $ac_optarg in
53701    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
53702    '') as_fn_error $? "missing file argument" ;;
53703    esac
53704    as_fn_append CONFIG_FILES " '$ac_optarg'"
53705    ac_need_defaults=false;;
53706  --he | --h |  --help | --hel | -h )
53707    $as_echo "$ac_cs_usage"; exit ;;
53708  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
53709  | -silent | --silent | --silen | --sile | --sil | --si | --s)
53710    ac_cs_silent=: ;;
53711
53712  # This is an error.
53713  -*) as_fn_error $? "unrecognized option: \`$1'
53714Try \`$0 --help' for more information." ;;
53715
53716  *) as_fn_append ac_config_targets " $1"
53717     ac_need_defaults=false ;;
53718
53719  esac
53720  shift
53721done
53722
53723ac_configure_extra_args=
53724
53725if $ac_cs_silent; then
53726  exec 6>/dev/null
53727  ac_configure_extra_args="$ac_configure_extra_args --silent"
53728fi
53729
53730_ACEOF
53731cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
53732if \$ac_cs_recheck; then
53733  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
53734  shift
53735  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
53736  CONFIG_SHELL='$SHELL'
53737  export CONFIG_SHELL
53738  exec "\$@"
53739fi
53740
53741_ACEOF
53742cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
53743exec 5>>config.log
53744{
53745  echo
53746  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
53747## Running $as_me. ##
53748_ASBOX
53749  $as_echo "$ac_log"
53750} >&5
53751
53752_ACEOF
53753cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
53754_ACEOF
53755
53756cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
53757
53758# Handling of arguments.
53759for ac_config_target in $ac_config_targets
53760do
53761  case $ac_config_target in
53762    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
53763    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
53764    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
53765    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
53766    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
53767
53768  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
53769  esac
53770done
53771
53772
53773# If the user did not use the arguments to specify the items to instantiate,
53774# then the envvar interface is used.  Set only those that are not.
53775# We use the long form for the default assignment because of an extremely
53776# bizarre bug on SunOS 4.1.3.
53777if $ac_need_defaults; then
53778  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
53779fi
53780
53781# Have a temporary directory for convenience.  Make it in the build tree
53782# simply because there is no reason against having it here, and in addition,
53783# creating and moving files from /tmp can sometimes cause problems.
53784# Hook for its removal unless debugging.
53785# Note that there is a small window in which the directory will not be cleaned:
53786# after its creation but before its name has been assigned to `$tmp'.
53787$debug ||
53788{
53789  tmp= ac_tmp=
53790  trap 'exit_status=$?
53791  : "${ac_tmp:=$tmp}"
53792  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
53793' 0
53794  trap 'as_fn_exit 1' 1 2 13 15
53795}
53796# Create a (secure) tmp directory for tmp files.
53797
53798{
53799  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
53800  test -d "$tmp"
53801}  ||
53802{
53803  tmp=./conf$$-$RANDOM
53804  (umask 077 && mkdir "$tmp")
53805} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
53806ac_tmp=$tmp
53807
53808# Set up the scripts for CONFIG_FILES section.
53809# No need to generate them if there are no CONFIG_FILES.
53810# This happens for instance with `./config.status config.h'.
53811if test -n "$CONFIG_FILES"; then
53812
53813
53814ac_cr=`echo X | tr X '\015'`
53815# On cygwin, bash can eat \r inside `` if the user requested igncr.
53816# But we know of no other shell where ac_cr would be empty at this
53817# point, so we can use a bashism as a fallback.
53818if test "x$ac_cr" = x; then
53819  eval ac_cr=\$\'\\r\'
53820fi
53821ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
53822if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
53823  ac_cs_awk_cr='\\r'
53824else
53825  ac_cs_awk_cr=$ac_cr
53826fi
53827
53828echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
53829_ACEOF
53830
53831
53832{
53833  echo "cat >conf$$subs.awk <<_ACEOF" &&
53834  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
53835  echo "_ACEOF"
53836} >conf$$subs.sh ||
53837  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
53838ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
53839ac_delim='%!_!# '
53840for ac_last_try in false false false false false :; do
53841  . ./conf$$subs.sh ||
53842    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
53843
53844  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
53845  if test $ac_delim_n = $ac_delim_num; then
53846    break
53847  elif $ac_last_try; then
53848    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
53849  else
53850    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
53851  fi
53852done
53853rm -f conf$$subs.sh
53854
53855cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
53856cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
53857_ACEOF
53858sed -n '
53859h
53860s/^/S["/; s/!.*/"]=/
53861p
53862g
53863s/^[^!]*!//
53864:repl
53865t repl
53866s/'"$ac_delim"'$//
53867t delim
53868:nl
53869h
53870s/\(.\{148\}\)..*/\1/
53871t more1
53872s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
53873p
53874n
53875b repl
53876:more1
53877s/["\\]/\\&/g; s/^/"/; s/$/"\\/
53878p
53879g
53880s/.\{148\}//
53881t nl
53882:delim
53883h
53884s/\(.\{148\}\)..*/\1/
53885t more2
53886s/["\\]/\\&/g; s/^/"/; s/$/"/
53887p
53888b
53889:more2
53890s/["\\]/\\&/g; s/^/"/; s/$/"\\/
53891p
53892g
53893s/.\{148\}//
53894t delim
53895' <conf$$subs.awk | sed '
53896/^[^""]/{
53897  N
53898  s/\n//
53899}
53900' >>$CONFIG_STATUS || ac_write_fail=1
53901rm -f conf$$subs.awk
53902cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
53903_ACAWK
53904cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
53905  for (key in S) S_is_set[key] = 1
53906  FS = ""
53907
53908}
53909{
53910  line = $ 0
53911  nfields = split(line, field, "@")
53912  substed = 0
53913  len = length(field[1])
53914  for (i = 2; i < nfields; i++) {
53915    key = field[i]
53916    keylen = length(key)
53917    if (S_is_set[key]) {
53918      value = S[key]
53919      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
53920      len += length(value) + length(field[++i])
53921      substed = 1
53922    } else
53923      len += 1 + keylen
53924  }
53925
53926  print line
53927}
53928
53929_ACAWK
53930_ACEOF
53931cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
53932if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
53933  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
53934else
53935  cat
53936fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
53937  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
53938_ACEOF
53939
53940# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
53941# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
53942# trailing colons and then remove the whole line if VPATH becomes empty
53943# (actually we leave an empty line to preserve line numbers).
53944if test "x$srcdir" = x.; then
53945  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
53946h
53947s///
53948s/^/:/
53949s/[	 ]*$/:/
53950s/:\$(srcdir):/:/g
53951s/:\${srcdir}:/:/g
53952s/:@srcdir@:/:/g
53953s/^:*//
53954s/:*$//
53955x
53956s/\(=[	 ]*\).*/\1/
53957G
53958s/\n//
53959s/^[^=]*=[	 ]*$//
53960}'
53961fi
53962
53963cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
53964fi # test -n "$CONFIG_FILES"
53965
53966
53967eval set X "  :F $CONFIG_FILES      "
53968shift
53969for ac_tag
53970do
53971  case $ac_tag in
53972  :[FHLC]) ac_mode=$ac_tag; continue;;
53973  esac
53974  case $ac_mode$ac_tag in
53975  :[FHL]*:*);;
53976  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
53977  :[FH]-) ac_tag=-:-;;
53978  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
53979  esac
53980  ac_save_IFS=$IFS
53981  IFS=:
53982  set x $ac_tag
53983  IFS=$ac_save_IFS
53984  shift
53985  ac_file=$1
53986  shift
53987
53988  case $ac_mode in
53989  :L) ac_source=$1;;
53990  :[FH])
53991    ac_file_inputs=
53992    for ac_f
53993    do
53994      case $ac_f in
53995      -) ac_f="$ac_tmp/stdin";;
53996      *) # Look for the file first in the build tree, then in the source tree
53997	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
53998	 # because $ac_f cannot contain `:'.
53999	 test -f "$ac_f" ||
54000	   case $ac_f in
54001	   [\\/$]*) false;;
54002	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
54003	   esac ||
54004	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
54005      esac
54006      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
54007      as_fn_append ac_file_inputs " '$ac_f'"
54008    done
54009
54010    # Let's still pretend it is `configure' which instantiates (i.e., don't
54011    # use $as_me), people would be surprised to read:
54012    #    /* config.h.  Generated by config.status.  */
54013    configure_input='Generated from '`
54014	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
54015	`' by configure.'
54016    if test x"$ac_file" != x-; then
54017      configure_input="$ac_file.  $configure_input"
54018      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
54019$as_echo "$as_me: creating $ac_file" >&6;}
54020    fi
54021    # Neutralize special characters interpreted by sed in replacement strings.
54022    case $configure_input in #(
54023    *\&* | *\|* | *\\* )
54024       ac_sed_conf_input=`$as_echo "$configure_input" |
54025       sed 's/[\\\\&|]/\\\\&/g'`;; #(
54026    *) ac_sed_conf_input=$configure_input;;
54027    esac
54028
54029    case $ac_tag in
54030    *:-:* | *:-) cat >"$ac_tmp/stdin" \
54031      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
54032    esac
54033    ;;
54034  esac
54035
54036  ac_dir=`$as_dirname -- "$ac_file" ||
54037$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
54038	 X"$ac_file" : 'X\(//\)[^/]' \| \
54039	 X"$ac_file" : 'X\(//\)$' \| \
54040	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
54041$as_echo X"$ac_file" |
54042    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
54043	    s//\1/
54044	    q
54045	  }
54046	  /^X\(\/\/\)[^/].*/{
54047	    s//\1/
54048	    q
54049	  }
54050	  /^X\(\/\/\)$/{
54051	    s//\1/
54052	    q
54053	  }
54054	  /^X\(\/\).*/{
54055	    s//\1/
54056	    q
54057	  }
54058	  s/.*/./; q'`
54059  as_dir="$ac_dir"; as_fn_mkdir_p
54060  ac_builddir=.
54061
54062case "$ac_dir" in
54063.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
54064*)
54065  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
54066  # A ".." for each directory in $ac_dir_suffix.
54067  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
54068  case $ac_top_builddir_sub in
54069  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
54070  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
54071  esac ;;
54072esac
54073ac_abs_top_builddir=$ac_pwd
54074ac_abs_builddir=$ac_pwd$ac_dir_suffix
54075# for backward compatibility:
54076ac_top_builddir=$ac_top_build_prefix
54077
54078case $srcdir in
54079  .)  # We are building in place.
54080    ac_srcdir=.
54081    ac_top_srcdir=$ac_top_builddir_sub
54082    ac_abs_top_srcdir=$ac_pwd ;;
54083  [\\/]* | ?:[\\/]* )  # Absolute name.
54084    ac_srcdir=$srcdir$ac_dir_suffix;
54085    ac_top_srcdir=$srcdir
54086    ac_abs_top_srcdir=$srcdir ;;
54087  *) # Relative name.
54088    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
54089    ac_top_srcdir=$ac_top_build_prefix$srcdir
54090    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
54091esac
54092ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
54093
54094
54095  case $ac_mode in
54096  :F)
54097  #
54098  # CONFIG_FILE
54099  #
54100
54101_ACEOF
54102
54103cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54104# If the template does not know about datarootdir, expand it.
54105# FIXME: This hack should be removed a few years after 2.60.
54106ac_datarootdir_hack=; ac_datarootdir_seen=
54107ac_sed_dataroot='
54108/datarootdir/ {
54109  p
54110  q
54111}
54112/@datadir@/p
54113/@docdir@/p
54114/@infodir@/p
54115/@localedir@/p
54116/@mandir@/p'
54117case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
54118*datarootdir*) ac_datarootdir_seen=yes;;
54119*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
54120  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
54121$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
54122_ACEOF
54123cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54124  ac_datarootdir_hack='
54125  s&@datadir@&$datadir&g
54126  s&@docdir@&$docdir&g
54127  s&@infodir@&$infodir&g
54128  s&@localedir@&$localedir&g
54129  s&@mandir@&$mandir&g
54130  s&\\\${datarootdir}&$datarootdir&g' ;;
54131esac
54132_ACEOF
54133
54134# Neutralize VPATH when `$srcdir' = `.'.
54135# Shell code in configure.ac might set extrasub.
54136# FIXME: do we really want to maintain this feature?
54137cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54138ac_sed_extra="$ac_vpsub
54139$extrasub
54140_ACEOF
54141cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54142:t
54143/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
54144s|@configure_input@|$ac_sed_conf_input|;t t
54145s&@top_builddir@&$ac_top_builddir_sub&;t t
54146s&@top_build_prefix@&$ac_top_build_prefix&;t t
54147s&@srcdir@&$ac_srcdir&;t t
54148s&@abs_srcdir@&$ac_abs_srcdir&;t t
54149s&@top_srcdir@&$ac_top_srcdir&;t t
54150s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
54151s&@builddir@&$ac_builddir&;t t
54152s&@abs_builddir@&$ac_abs_builddir&;t t
54153s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
54154$ac_datarootdir_hack
54155"
54156eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
54157  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
54158
54159test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
54160  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
54161  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
54162      "$ac_tmp/out"`; test -z "$ac_out"; } &&
54163  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
54164which seems to be undefined.  Please make sure it is defined" >&5
54165$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
54166which seems to be undefined.  Please make sure it is defined" >&2;}
54167
54168  rm -f "$ac_tmp/stdin"
54169  case $ac_file in
54170  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
54171  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
54172  esac \
54173  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
54174 ;;
54175
54176
54177
54178  esac
54179
54180done # for ac_tag
54181
54182
54183as_fn_exit 0
54184_ACEOF
54185ac_clean_files=$ac_clean_files_save
54186
54187test $ac_write_fail = 0 ||
54188  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
54189
54190
54191# configure is writing to config.log, and then calls config.status.
54192# config.status does its own redirection, appending to config.log.
54193# Unfortunately, on DOS this fails, as config.log is still kept open
54194# by configure, so config.status won't be able to write to it; its
54195# output is simply discarded.  So we exec the FD to /dev/null,
54196# effectively closing config.log, so it can be properly (re)opened and
54197# appended to by config.status.  When coming back to configure, we
54198# need to make the FD available again.
54199if test "$no_create" != yes; then
54200  ac_cs_success=:
54201  ac_config_status_args=
54202  test "$silent" = yes &&
54203    ac_config_status_args="$ac_config_status_args --quiet"
54204  exec 5>/dev/null
54205  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
54206  exec 5>>config.log
54207  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
54208  # would make configure fail if this is the last instruction.
54209  $ac_cs_success || as_fn_exit 1
54210fi
54211if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
54212  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
54213$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
54214fi
54215
54216
54217# After AC_OUTPUT, we need to do final work
54218
54219
54220  # Try to move config.log (generated by autoconf) to the configure-support directory.
54221  if test -e ./config.log; then
54222    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
54223  fi
54224
54225  # Rotate our log file (configure.log)
54226  if test -e "$OUTPUT_ROOT/configure.log.old"; then
54227    $RM -f "$OUTPUT_ROOT/configure.log.old"
54228  fi
54229  if test -e "$OUTPUT_ROOT/configure.log"; then
54230    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
54231  fi
54232
54233  # Move configure.log from current directory to the build output root
54234  if test -e ./configure.log; then
54235    echo found it
54236    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
54237  fi
54238
54239  # Make the compare script executable
54240  $CHMOD +x $OUTPUT_ROOT/compare.sh
54241
54242
54243# Finally output some useful information to the user
54244
54245  # Finally output some useful information to the user
54246
54247  printf "\n"
54248  printf "====================================================\n"
54249  if test "x$no_create" != "xyes"; then
54250    if test "x$IS_RECONFIGURE" != "xyes"; then
54251      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
54252    else
54253      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
54254    fi
54255  else
54256    if test "x$IS_RECONFIGURE" != "xyes"; then
54257      printf "A configuration has been successfully checked but not created\n"
54258    else
54259      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
54260    fi
54261  fi
54262  if test "x$CONFIGURE_COMMAND_LINE" != x; then
54263    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
54264  else
54265    printf "using default settings.\n"
54266  fi
54267
54268  printf "\n"
54269  printf "Configuration summary:\n"
54270  printf "* Debug level:    $DEBUG_LEVEL\n"
54271  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
54272  printf "* JDK variant:    $JDK_VARIANT\n"
54273  printf "* JVM variants:   $with_jvm_variants\n"
54274  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
54275
54276  printf "\n"
54277  printf "Tools summary:\n"
54278  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
54279    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
54280  fi
54281  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
54282  if test "x$TOOLCHAIN_VERSION" != "x"; then
54283    print_version=" $TOOLCHAIN_VERSION"
54284  fi
54285  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
54286  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
54287  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
54288
54289  printf "\n"
54290  printf "Build performance summary:\n"
54291  printf "* Cores to use:   $JOBS\n"
54292  printf "* Memory limit:   $MEMORY_SIZE MB\n"
54293  if test "x$CCACHE_STATUS" != "x"; then
54294    printf "* ccache status:  $CCACHE_STATUS\n"
54295  fi
54296  printf "\n"
54297
54298  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
54299    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
54300    printf "will result in longer build times.\n"
54301    printf "\n"
54302  fi
54303
54304  if test "x$FOUND_ALT_VARIABLES" != "x"; then
54305    printf "WARNING: You have old-style ALT_ environment variables set.\n"
54306    printf "These are not respected, and will be ignored. It is recommended\n"
54307    printf "that you clean your environment. The following variables are set:\n"
54308    printf "$FOUND_ALT_VARIABLES\n"
54309    printf "\n"
54310  fi
54311
54312  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
54313    printf "WARNING: Your build output directory is not on a local disk.\n"
54314    printf "This will severely degrade build performance!\n"
54315    printf "It is recommended that you create an output directory on a local disk,\n"
54316    printf "and run the configure script again from that directory.\n"
54317    printf "\n"
54318  fi
54319
54320  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
54321    printf "WARNING: The result of this configuration has overridden an older\n"
54322    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
54323    printf "proper build. Failure to do so might result in strange build problems.\n"
54324    printf "\n"
54325  fi
54326
54327  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
54328    printf "WARNING: The result of this configuration was not saved.\n"
54329    printf "You should run without '--no-create | -n' to create the configuration.\n"
54330    printf "\n"
54331  fi
54332
54333
54334
54335  # Locate config.log.
54336  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
54337    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
54338  elif test -e "./config.log"; then
54339    CONFIG_LOG_PATH="."
54340  fi
54341
54342  if test -e "$CONFIG_LOG_PATH/config.log"; then
54343    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
54344    if test $? -eq 0; then
54345      printf "The following warnings were produced. Repeated here for convenience:\n"
54346      # We must quote sed expression (using []) to stop m4 from eating the [].
54347      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
54348      printf "\n"
54349    fi
54350  fi
54351
54352