generated-configure.sh revision 1756:4999895b3a44
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
828VERSION_SHORT
829VERSION_STRING
830VERSION_NUMBER_FOUR_POSITIONS
831VERSION_NUMBER
832VERSION_OPT
833VERSION_BUILD
834VERSION_PRE
835VERSION_PATCH
836VERSION_SECURITY
837VERSION_MINOR
838VERSION_MAJOR
839MACOSX_BUNDLE_ID_BASE
840MACOSX_BUNDLE_NAME_BASE
841COMPANY_NAME
842JDK_RC_PLATFORM_NAME
843PRODUCT_SUFFIX
844PRODUCT_NAME
845LAUNCHER_NAME
846COPYRIGHT_YEAR
847COMPRESS_JARS
848RMICONNECTOR_IIOP
849UNLIMITED_CRYPTO
850CACERTS_FILE
851TEST_IN_BUILD
852BUILD_HEADLESS
853SUPPORT_HEADFUL
854SUPPORT_HEADLESS
855BDEPS_FTP
856BDEPS_UNZIP
857OS_VERSION_MICRO
858OS_VERSION_MINOR
859OS_VERSION_MAJOR
860PKG_CONFIG
861BASH_ARGS
862CODESIGN
863XATTR
864DSYMUTIL
865IS_GNU_TIME
866TIME
867STAT
868HG
869READELF
870OTOOL
871LDD
872ZIP
873UNZIP
874FIND_DELETE
875OUTPUT_SYNC
876OUTPUT_SYNC_SUPPORTED
877MAKE
878CHECK_TOOLSDIR_MAKE
879CHECK_TOOLSDIR_GMAKE
880CHECK_MAKE
881CHECK_GMAKE
882PKGHANDLER
883CONFIGURESUPPORT_OUTPUTDIR
884OUTPUT_ROOT
885CONF_NAME
886SPEC
887SDKROOT
888XCODEBUILD
889BUILD_VARIANT_RELEASE
890DEBUG_CLASSFILES
891FASTDEBUG
892VARIANT
893DEBUG_LEVEL
894MACOSX_UNIVERSAL
895INCLUDE_SA
896JVM_VARIANT_CORE
897JVM_VARIANT_ZEROSHARK
898JVM_VARIANT_ZERO
899JVM_VARIANT_KERNEL
900JVM_VARIANT_MINIMAL1
901JVM_VARIANT_CLIENT
902JVM_VARIANT_SERVER
903JVM_VARIANTS
904JVM_INTERPRETER
905JDK_VARIANT
906SET_OPENJDK
907CANONICAL_TOPDIR
908ORIGINAL_TOPDIR
909TOPDIR
910PATH_SEP
911ZERO_ARCHDEF
912DEFINE_CROSS_COMPILE_ARCH
913LP64
914OPENJDK_TARGET_OS_EXPORT_DIR
915OPENJDK_TARGET_CPU_JLI_CFLAGS
916OPENJDK_TARGET_CPU_OSARCH
917OPENJDK_TARGET_CPU_ISADIR
918OPENJDK_TARGET_CPU_LIBDIR
919OPENJDK_TARGET_CPU_LEGACY_LIB
920OPENJDK_TARGET_CPU_LEGACY
921REQUIRED_OS_VERSION
922REQUIRED_OS_NAME
923COMPILE_TYPE
924OPENJDK_TARGET_CPU_ENDIAN
925OPENJDK_TARGET_CPU_BITS
926OPENJDK_TARGET_CPU_ARCH
927OPENJDK_TARGET_CPU
928OPENJDK_TARGET_OS_ENV
929OPENJDK_TARGET_OS_TYPE
930OPENJDK_TARGET_OS
931OPENJDK_BUILD_CPU_ENDIAN
932OPENJDK_BUILD_CPU_BITS
933OPENJDK_BUILD_CPU_ARCH
934OPENJDK_BUILD_CPU
935OPENJDK_BUILD_OS_ENV
936OPENJDK_BUILD_OS_TYPE
937OPENJDK_BUILD_OS
938OPENJDK_BUILD_AUTOCONF_NAME
939OPENJDK_TARGET_AUTOCONF_NAME
940target_os
941target_vendor
942target_cpu
943target
944host_os
945host_vendor
946host_cpu
947host
948build_os
949build_vendor
950build_cpu
951build
952CPIO
953SETFILE
954DF
955READLINK
956CYGPATH
957SED
958FGREP
959EGREP
960GREP
961AWK
962XARGS
963WHICH
964WC
965UNIQ
966UNAME
967TR
968TOUCH
969TEE
970TAR
971TAIL
972SORT
973SH
974RM
975PRINTF
976NAWK
977MV
978MKTEMP
979MKDIR
980LS
981LN
982HEAD
983FIND
984FILE
985EXPR
986ECHO
987DIRNAME
988DIFF
989DATE
990CUT
991CP
992COMM
993CMP
994CHMOD
995CAT
996BASH
997BASENAME
998DATE_WHEN_CONFIGURED
999ORIGINAL_PATH
1000CONFIGURE_COMMAND_LINE
1001target_alias
1002host_alias
1003build_alias
1004LIBS
1005ECHO_T
1006ECHO_N
1007ECHO_C
1008DEFS
1009mandir
1010localedir
1011libdir
1012psdir
1013pdfdir
1014dvidir
1015htmldir
1016infodir
1017docdir
1018oldincludedir
1019includedir
1020localstatedir
1021sharedstatedir
1022sysconfdir
1023datadir
1024datarootdir
1025libexecdir
1026sbindir
1027bindir
1028program_transform_name
1029prefix
1030exec_prefix
1031PACKAGE_URL
1032PACKAGE_BUGREPORT
1033PACKAGE_STRING
1034PACKAGE_VERSION
1035PACKAGE_TARNAME
1036PACKAGE_NAME
1037PATH_SEPARATOR
1038SHELL'
1039ac_subst_files=''
1040ac_user_opts='
1041enable_option_checking
1042with_target_bits
1043enable_openjdk_only
1044with_custom_make_dir
1045with_jdk_variant
1046with_jvm_interpreter
1047with_jvm_variants
1048enable_debug
1049with_debug_level
1050with_devkit
1051with_sys_root
1052with_sysroot
1053with_tools_dir
1054with_toolchain_path
1055with_extra_path
1056with_sdk_name
1057with_conf_name
1058with_output_sync
1059with_builddeps_conf
1060with_builddeps_server
1061with_builddeps_dir
1062with_builddeps_group
1063enable_headful
1064enable_hotspot_test_in_build
1065with_cacerts_file
1066enable_unlimited_crypto
1067enable_rmiconnector_iiop
1068with_copyright_year
1069with_milestone
1070with_update_version
1071with_user_release_suffix
1072with_build_number
1073with_version_string
1074with_version_pre_base
1075with_version_pre_debuglevel
1076with_version_opt
1077with_version_build
1078with_version_major
1079with_version_minor
1080with_version_security
1081with_version_patch
1082with_boot_jdk
1083with_add_source_root
1084with_override_source_root
1085with_adds_and_overrides
1086with_override_langtools
1087with_override_corba
1088with_override_jaxp
1089with_override_jaxws
1090with_override_hotspot
1091with_override_nashorn
1092with_override_jdk
1093with_import_hotspot
1094with_toolchain_type
1095with_toolchain_version
1096with_jtreg
1097with_extra_cflags
1098with_extra_cxxflags
1099with_extra_ldflags
1100enable_warnings_as_errors
1101enable_debug_symbols
1102enable_zip_debug_info
1103enable_native_coverage
1104with_x
1105with_cups
1106with_cups_include
1107with_freetype
1108with_freetype_include
1109with_freetype_lib
1110with_freetype_src
1111enable_freetype_bundling
1112with_alsa
1113with_alsa_include
1114with_alsa_lib
1115with_libjpeg
1116with_giflib
1117with_lcms
1118with_libpng
1119with_zlib
1120with_stdc__lib
1121with_msvcr_dll
1122with_msvcp_dll
1123with_dxsdk
1124with_dxsdk_lib
1125with_dxsdk_include
1126with_num_cores
1127with_memory_size
1128with_jobs
1129with_boot_jdk_jvmargs
1130with_sjavac_server_java
1131enable_sjavac
1132enable_precompiled_headers
1133enable_ccache
1134with_ccache_dir
1135'
1136      ac_precious_vars='build_alias
1137host_alias
1138target_alias
1139BASENAME
1140BASH
1141CAT
1142CHMOD
1143CMP
1144COMM
1145CP
1146CUT
1147DATE
1148DIFF
1149DIRNAME
1150ECHO
1151EXPR
1152FILE
1153FIND
1154HEAD
1155LN
1156LS
1157MKDIR
1158MKTEMP
1159MV
1160NAWK
1161PRINTF
1162RM
1163SH
1164SORT
1165TAIL
1166TAR
1167TEE
1168TOUCH
1169TR
1170UNAME
1171UNIQ
1172WC
1173WHICH
1174XARGS
1175AWK
1176GREP
1177EGREP
1178FGREP
1179SED
1180CYGPATH
1181READLINK
1182DF
1183SETFILE
1184CPIO
1185UNZIP
1186ZIP
1187LDD
1188OTOOL
1189READELF
1190HG
1191STAT
1192TIME
1193DSYMUTIL
1194XATTR
1195CODESIGN
1196PKG_CONFIG
1197JAVA
1198JAVAC
1199JAVAH
1200JAR
1201JARSIGNER
1202CC
1203CFLAGS
1204LDFLAGS
1205LIBS
1206CPPFLAGS
1207CXX
1208CXXFLAGS
1209CCC
1210CPP
1211CXXCPP
1212AS
1213AR
1214LIPO
1215STRIP
1216NM
1217GNM
1218OBJCOPY
1219OBJDUMP
1220BUILD_CC
1221BUILD_CXX
1222BUILD_LD
1223JTREGEXE
1224XMKMF
1225FREETYPE_CFLAGS
1226FREETYPE_LIBS
1227ALSA_CFLAGS
1228ALSA_LIBS
1229LCMS_CFLAGS
1230LCMS_LIBS
1231PNG_CFLAGS
1232PNG_LIBS
1233LIBFFI_CFLAGS
1234LIBFFI_LIBS
1235CCACHE'
1236
1237
1238# Initialize some variables set by options.
1239ac_init_help=
1240ac_init_version=false
1241ac_unrecognized_opts=
1242ac_unrecognized_sep=
1243# The variables have the same names as the options, with
1244# dashes changed to underlines.
1245cache_file=/dev/null
1246exec_prefix=NONE
1247no_create=
1248no_recursion=
1249prefix=NONE
1250program_prefix=NONE
1251program_suffix=NONE
1252program_transform_name=s,x,x,
1253silent=
1254site=
1255srcdir=
1256verbose=
1257x_includes=NONE
1258x_libraries=NONE
1259
1260# Installation directory options.
1261# These are left unexpanded so users can "make install exec_prefix=/foo"
1262# and all the variables that are supposed to be based on exec_prefix
1263# by default will actually change.
1264# Use braces instead of parens because sh, perl, etc. also accept them.
1265# (The list follows the same order as the GNU Coding Standards.)
1266bindir='${exec_prefix}/bin'
1267sbindir='${exec_prefix}/sbin'
1268libexecdir='${exec_prefix}/libexec'
1269datarootdir='${prefix}/share'
1270datadir='${datarootdir}'
1271sysconfdir='${prefix}/etc'
1272sharedstatedir='${prefix}/com'
1273localstatedir='${prefix}/var'
1274includedir='${prefix}/include'
1275oldincludedir='/usr/include'
1276docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1277infodir='${datarootdir}/info'
1278htmldir='${docdir}'
1279dvidir='${docdir}'
1280pdfdir='${docdir}'
1281psdir='${docdir}'
1282libdir='${exec_prefix}/lib'
1283localedir='${datarootdir}/locale'
1284mandir='${datarootdir}/man'
1285
1286ac_prev=
1287ac_dashdash=
1288for ac_option
1289do
1290  # If the previous option needs an argument, assign it.
1291  if test -n "$ac_prev"; then
1292    eval $ac_prev=\$ac_option
1293    ac_prev=
1294    continue
1295  fi
1296
1297  case $ac_option in
1298  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1299  *=)   ac_optarg= ;;
1300  *)    ac_optarg=yes ;;
1301  esac
1302
1303  # Accept the important Cygnus configure options, so we can diagnose typos.
1304
1305  case $ac_dashdash$ac_option in
1306  --)
1307    ac_dashdash=yes ;;
1308
1309  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1310    ac_prev=bindir ;;
1311  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1312    bindir=$ac_optarg ;;
1313
1314  -build | --build | --buil | --bui | --bu)
1315    ac_prev=build_alias ;;
1316  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1317    build_alias=$ac_optarg ;;
1318
1319  -cache-file | --cache-file | --cache-fil | --cache-fi \
1320  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1321    ac_prev=cache_file ;;
1322  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1323  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1324    cache_file=$ac_optarg ;;
1325
1326  --config-cache | -C)
1327    cache_file=config.cache ;;
1328
1329  -datadir | --datadir | --datadi | --datad)
1330    ac_prev=datadir ;;
1331  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1332    datadir=$ac_optarg ;;
1333
1334  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1335  | --dataroo | --dataro | --datar)
1336    ac_prev=datarootdir ;;
1337  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1338  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1339    datarootdir=$ac_optarg ;;
1340
1341  -disable-* | --disable-*)
1342    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1343    # Reject names that are not valid shell variable names.
1344    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1345      as_fn_error $? "invalid feature name: $ac_useropt"
1346    ac_useropt_orig=$ac_useropt
1347    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1348    case $ac_user_opts in
1349      *"
1350"enable_$ac_useropt"
1351"*) ;;
1352      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1353	 ac_unrecognized_sep=', ';;
1354    esac
1355    eval enable_$ac_useropt=no ;;
1356
1357  -docdir | --docdir | --docdi | --doc | --do)
1358    ac_prev=docdir ;;
1359  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1360    docdir=$ac_optarg ;;
1361
1362  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1363    ac_prev=dvidir ;;
1364  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1365    dvidir=$ac_optarg ;;
1366
1367  -enable-* | --enable-*)
1368    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1369    # Reject names that are not valid shell variable names.
1370    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1371      as_fn_error $? "invalid feature name: $ac_useropt"
1372    ac_useropt_orig=$ac_useropt
1373    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1374    case $ac_user_opts in
1375      *"
1376"enable_$ac_useropt"
1377"*) ;;
1378      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1379	 ac_unrecognized_sep=', ';;
1380    esac
1381    eval enable_$ac_useropt=\$ac_optarg ;;
1382
1383  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1384  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1385  | --exec | --exe | --ex)
1386    ac_prev=exec_prefix ;;
1387  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1388  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1389  | --exec=* | --exe=* | --ex=*)
1390    exec_prefix=$ac_optarg ;;
1391
1392  -gas | --gas | --ga | --g)
1393    # Obsolete; use --with-gas.
1394    with_gas=yes ;;
1395
1396  -help | --help | --hel | --he | -h)
1397    ac_init_help=long ;;
1398  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1399    ac_init_help=recursive ;;
1400  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1401    ac_init_help=short ;;
1402
1403  -host | --host | --hos | --ho)
1404    ac_prev=host_alias ;;
1405  -host=* | --host=* | --hos=* | --ho=*)
1406    host_alias=$ac_optarg ;;
1407
1408  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1409    ac_prev=htmldir ;;
1410  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1411  | --ht=*)
1412    htmldir=$ac_optarg ;;
1413
1414  -includedir | --includedir | --includedi | --included | --include \
1415  | --includ | --inclu | --incl | --inc)
1416    ac_prev=includedir ;;
1417  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1418  | --includ=* | --inclu=* | --incl=* | --inc=*)
1419    includedir=$ac_optarg ;;
1420
1421  -infodir | --infodir | --infodi | --infod | --info | --inf)
1422    ac_prev=infodir ;;
1423  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1424    infodir=$ac_optarg ;;
1425
1426  -libdir | --libdir | --libdi | --libd)
1427    ac_prev=libdir ;;
1428  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1429    libdir=$ac_optarg ;;
1430
1431  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1432  | --libexe | --libex | --libe)
1433    ac_prev=libexecdir ;;
1434  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1435  | --libexe=* | --libex=* | --libe=*)
1436    libexecdir=$ac_optarg ;;
1437
1438  -localedir | --localedir | --localedi | --localed | --locale)
1439    ac_prev=localedir ;;
1440  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1441    localedir=$ac_optarg ;;
1442
1443  -localstatedir | --localstatedir | --localstatedi | --localstated \
1444  | --localstate | --localstat | --localsta | --localst | --locals)
1445    ac_prev=localstatedir ;;
1446  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1447  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1448    localstatedir=$ac_optarg ;;
1449
1450  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1451    ac_prev=mandir ;;
1452  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1453    mandir=$ac_optarg ;;
1454
1455  -nfp | --nfp | --nf)
1456    # Obsolete; use --without-fp.
1457    with_fp=no ;;
1458
1459  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1460  | --no-cr | --no-c | -n)
1461    no_create=yes ;;
1462
1463  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1464  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1465    no_recursion=yes ;;
1466
1467  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1468  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1469  | --oldin | --oldi | --old | --ol | --o)
1470    ac_prev=oldincludedir ;;
1471  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1472  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1473  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1474    oldincludedir=$ac_optarg ;;
1475
1476  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1477    ac_prev=prefix ;;
1478  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1479    prefix=$ac_optarg ;;
1480
1481  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1482  | --program-pre | --program-pr | --program-p)
1483    ac_prev=program_prefix ;;
1484  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1485  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1486    program_prefix=$ac_optarg ;;
1487
1488  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1489  | --program-suf | --program-su | --program-s)
1490    ac_prev=program_suffix ;;
1491  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1492  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1493    program_suffix=$ac_optarg ;;
1494
1495  -program-transform-name | --program-transform-name \
1496  | --program-transform-nam | --program-transform-na \
1497  | --program-transform-n | --program-transform- \
1498  | --program-transform | --program-transfor \
1499  | --program-transfo | --program-transf \
1500  | --program-trans | --program-tran \
1501  | --progr-tra | --program-tr | --program-t)
1502    ac_prev=program_transform_name ;;
1503  -program-transform-name=* | --program-transform-name=* \
1504  | --program-transform-nam=* | --program-transform-na=* \
1505  | --program-transform-n=* | --program-transform-=* \
1506  | --program-transform=* | --program-transfor=* \
1507  | --program-transfo=* | --program-transf=* \
1508  | --program-trans=* | --program-tran=* \
1509  | --progr-tra=* | --program-tr=* | --program-t=*)
1510    program_transform_name=$ac_optarg ;;
1511
1512  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1513    ac_prev=pdfdir ;;
1514  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1515    pdfdir=$ac_optarg ;;
1516
1517  -psdir | --psdir | --psdi | --psd | --ps)
1518    ac_prev=psdir ;;
1519  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1520    psdir=$ac_optarg ;;
1521
1522  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1523  | -silent | --silent | --silen | --sile | --sil)
1524    silent=yes ;;
1525
1526  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1527    ac_prev=sbindir ;;
1528  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1529  | --sbi=* | --sb=*)
1530    sbindir=$ac_optarg ;;
1531
1532  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1533  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1534  | --sharedst | --shareds | --shared | --share | --shar \
1535  | --sha | --sh)
1536    ac_prev=sharedstatedir ;;
1537  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1538  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1539  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1540  | --sha=* | --sh=*)
1541    sharedstatedir=$ac_optarg ;;
1542
1543  -site | --site | --sit)
1544    ac_prev=site ;;
1545  -site=* | --site=* | --sit=*)
1546    site=$ac_optarg ;;
1547
1548  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1549    ac_prev=srcdir ;;
1550  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1551    srcdir=$ac_optarg ;;
1552
1553  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1554  | --syscon | --sysco | --sysc | --sys | --sy)
1555    ac_prev=sysconfdir ;;
1556  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1557  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1558    sysconfdir=$ac_optarg ;;
1559
1560  -target | --target | --targe | --targ | --tar | --ta | --t)
1561    ac_prev=target_alias ;;
1562  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1563    target_alias=$ac_optarg ;;
1564
1565  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1566    verbose=yes ;;
1567
1568  -version | --version | --versio | --versi | --vers | -V)
1569    ac_init_version=: ;;
1570
1571  -with-* | --with-*)
1572    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1573    # Reject names that are not valid shell variable names.
1574    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1575      as_fn_error $? "invalid package name: $ac_useropt"
1576    ac_useropt_orig=$ac_useropt
1577    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1578    case $ac_user_opts in
1579      *"
1580"with_$ac_useropt"
1581"*) ;;
1582      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1583	 ac_unrecognized_sep=', ';;
1584    esac
1585    eval with_$ac_useropt=\$ac_optarg ;;
1586
1587  -without-* | --without-*)
1588    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1589    # Reject names that are not valid shell variable names.
1590    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1591      as_fn_error $? "invalid package name: $ac_useropt"
1592    ac_useropt_orig=$ac_useropt
1593    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1594    case $ac_user_opts in
1595      *"
1596"with_$ac_useropt"
1597"*) ;;
1598      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1599	 ac_unrecognized_sep=', ';;
1600    esac
1601    eval with_$ac_useropt=no ;;
1602
1603  --x)
1604    # Obsolete; use --with-x.
1605    with_x=yes ;;
1606
1607  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1608  | --x-incl | --x-inc | --x-in | --x-i)
1609    ac_prev=x_includes ;;
1610  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1611  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1612    x_includes=$ac_optarg ;;
1613
1614  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1615  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1616    ac_prev=x_libraries ;;
1617  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1618  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1619    x_libraries=$ac_optarg ;;
1620
1621  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1622Try \`$0 --help' for more information"
1623    ;;
1624
1625  *=*)
1626    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1627    # Reject names that are not valid shell variable names.
1628    case $ac_envvar in #(
1629      '' | [0-9]* | *[!_$as_cr_alnum]* )
1630      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1631    esac
1632    eval $ac_envvar=\$ac_optarg
1633    export $ac_envvar ;;
1634
1635  *)
1636    # FIXME: should be removed in autoconf 3.0.
1637    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1638    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1639      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1640    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1641    ;;
1642
1643  esac
1644done
1645
1646if test -n "$ac_prev"; then
1647  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1648  as_fn_error $? "missing argument to $ac_option"
1649fi
1650
1651if test -n "$ac_unrecognized_opts"; then
1652  case $enable_option_checking in
1653    no) ;;
1654    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1655    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1656  esac
1657fi
1658
1659# Check all directory arguments for consistency.
1660for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1661		datadir sysconfdir sharedstatedir localstatedir includedir \
1662		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1663		libdir localedir mandir
1664do
1665  eval ac_val=\$$ac_var
1666  # Remove trailing slashes.
1667  case $ac_val in
1668    */ )
1669      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1670      eval $ac_var=\$ac_val;;
1671  esac
1672  # Be sure to have absolute directory names.
1673  case $ac_val in
1674    [\\/$]* | ?:[\\/]* )  continue;;
1675    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1676  esac
1677  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1678done
1679
1680# There might be people who depend on the old broken behavior: `$host'
1681# used to hold the argument of --host etc.
1682# FIXME: To remove some day.
1683build=$build_alias
1684host=$host_alias
1685target=$target_alias
1686
1687# FIXME: To remove some day.
1688if test "x$host_alias" != x; then
1689  if test "x$build_alias" = x; then
1690    cross_compiling=maybe
1691  elif test "x$build_alias" != "x$host_alias"; then
1692    cross_compiling=yes
1693  fi
1694fi
1695
1696ac_tool_prefix=
1697test -n "$host_alias" && ac_tool_prefix=$host_alias-
1698
1699test "$silent" = yes && exec 6>/dev/null
1700
1701
1702ac_pwd=`pwd` && test -n "$ac_pwd" &&
1703ac_ls_di=`ls -di .` &&
1704ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1705  as_fn_error $? "working directory cannot be determined"
1706test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1707  as_fn_error $? "pwd does not report name of working directory"
1708
1709
1710# Find the source files, if location was not specified.
1711if test -z "$srcdir"; then
1712  ac_srcdir_defaulted=yes
1713  # Try the directory containing this script, then the parent directory.
1714  ac_confdir=`$as_dirname -- "$as_myself" ||
1715$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1716	 X"$as_myself" : 'X\(//\)[^/]' \| \
1717	 X"$as_myself" : 'X\(//\)$' \| \
1718	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1719$as_echo X"$as_myself" |
1720    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1721	    s//\1/
1722	    q
1723	  }
1724	  /^X\(\/\/\)[^/].*/{
1725	    s//\1/
1726	    q
1727	  }
1728	  /^X\(\/\/\)$/{
1729	    s//\1/
1730	    q
1731	  }
1732	  /^X\(\/\).*/{
1733	    s//\1/
1734	    q
1735	  }
1736	  s/.*/./; q'`
1737  srcdir=$ac_confdir
1738  if test ! -r "$srcdir/$ac_unique_file"; then
1739    srcdir=..
1740  fi
1741else
1742  ac_srcdir_defaulted=no
1743fi
1744if test ! -r "$srcdir/$ac_unique_file"; then
1745  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1746  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1747fi
1748ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1749ac_abs_confdir=`(
1750	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1751	pwd)`
1752# When building in place, set srcdir=.
1753if test "$ac_abs_confdir" = "$ac_pwd"; then
1754  srcdir=.
1755fi
1756# Remove unnecessary trailing slashes from srcdir.
1757# Double slashes in file names in object file debugging info
1758# mess up M-x gdb in Emacs.
1759case $srcdir in
1760*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1761esac
1762for ac_var in $ac_precious_vars; do
1763  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1764  eval ac_env_${ac_var}_value=\$${ac_var}
1765  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1766  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1767done
1768
1769#
1770# Report the --help message.
1771#
1772if test "$ac_init_help" = "long"; then
1773  # Omit some internal or obsolete options to make the list less imposing.
1774  # This message is too long to be a string in the A/UX 3.1 sh.
1775  cat <<_ACEOF
1776\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1777
1778Usage: $0 [OPTION]... [VAR=VALUE]...
1779
1780To assign environment variables (e.g., CC, CFLAGS...), specify them as
1781VAR=VALUE.  See below for descriptions of some of the useful variables.
1782
1783Defaults for the options are specified in brackets.
1784
1785Configuration:
1786  -h, --help              display this help and exit
1787      --help=short        display options specific to this package
1788      --help=recursive    display the short help of all the included packages
1789  -V, --version           display version information and exit
1790  -q, --quiet, --silent   do not print \`checking ...' messages
1791      --cache-file=FILE   cache test results in FILE [disabled]
1792  -C, --config-cache      alias for \`--cache-file=config.cache'
1793  -n, --no-create         do not create output files
1794      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1795
1796Installation directories:
1797  --prefix=PREFIX         install architecture-independent files in PREFIX
1798                          [$ac_default_prefix]
1799  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1800                          [PREFIX]
1801
1802By default, \`make install' will install all the files in
1803\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1804an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1805for instance \`--prefix=\$HOME'.
1806
1807For better control, use the options below.
1808
1809Fine tuning of the installation directories:
1810  --bindir=DIR            user executables [EPREFIX/bin]
1811  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1812  --libexecdir=DIR        program executables [EPREFIX/libexec]
1813  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1814  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1815  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1816  --libdir=DIR            object code libraries [EPREFIX/lib]
1817  --includedir=DIR        C header files [PREFIX/include]
1818  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1819  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1820  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1821  --infodir=DIR           info documentation [DATAROOTDIR/info]
1822  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1823  --mandir=DIR            man documentation [DATAROOTDIR/man]
1824  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1825  --htmldir=DIR           html documentation [DOCDIR]
1826  --dvidir=DIR            dvi documentation [DOCDIR]
1827  --pdfdir=DIR            pdf documentation [DOCDIR]
1828  --psdir=DIR             ps documentation [DOCDIR]
1829_ACEOF
1830
1831  cat <<\_ACEOF
1832
1833X features:
1834  --x-includes=DIR    X include files are in DIR
1835  --x-libraries=DIR   X library files are in DIR
1836
1837System types:
1838  --build=BUILD     configure for building on BUILD [guessed]
1839  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1840  --target=TARGET   configure for building compilers for TARGET [HOST]
1841_ACEOF
1842fi
1843
1844if test -n "$ac_init_help"; then
1845  case $ac_init_help in
1846     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1847   esac
1848  cat <<\_ACEOF
1849
1850Optional Features:
1851  --disable-option-checking  ignore unrecognized --enable/--with options
1852  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1853  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1854  --enable-openjdk-only   suppress building custom source even if present
1855                          [disabled]
1856  --enable-debug          set the debug level to fastdebug (shorthand for
1857                          --with-debug-level=fastdebug) [disabled]
1858  --disable-headful       disable building headful support (graphical UI
1859                          support) [enabled]
1860  --enable-hotspot-test-in-build
1861                          run the Queens test after Hotspot build [disabled]
1862  --enable-unlimited-crypto
1863                          Enable unlimited crypto policy [disabled]
1864  --enable-rmiconnector-iiop
1865                          enable the JMX RMIConnector iiop transport
1866                          [disabled]
1867  --disable-warnings-as-errors
1868                          do not consider native warnings to be an error
1869                          [enabled]
1870  --disable-debug-symbols disable generation of debug symbols [enabled]
1871  --disable-zip-debug-info
1872                          disable zipping of debug-info files [enabled]
1873  --enable-native-coverage
1874                          enable native compilation with code coverage
1875                          data[disabled]
1876  --disable-freetype-bundling
1877                          disable bundling of the freetype library with the
1878                          build result [enabled on Windows or when using
1879                          --with-freetype, disabled otherwise]
1880  --enable-sjavac         use sjavac to do fast incremental compiles
1881                          [disabled]
1882  --disable-precompiled-headers
1883                          disable using precompiled headers when compiling C++
1884                          [enabled]
1885  --enable-ccache         enable using ccache to speed up recompilations
1886                          [disabled]
1887
1888Optional Packages:
1889  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1890  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1891  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1892                          support it), e.g. --with-target-bits=32 [guessed]
1893  --with-custom-make-dir  Deprecated. Option is kept for backwards
1894                          compatibility and is ignored
1895  --with-jdk-variant      JDK variant to build (normal) [normal]
1896  --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1897  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1898                          client, minimal1, kernel, zero, zeroshark, core)
1899                          [server]
1900  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
1901                          optimized (HotSpot build only)) [release]
1902  --with-devkit           use this devkit for compilers, tools and resources
1903  --with-sys-root         alias for --with-sysroot for backwards compatability
1904  --with-sysroot          use this directory as sysroot
1905  --with-tools-dir        alias for --with-toolchain-path for backwards
1906                          compatibility
1907  --with-toolchain-path   prepend these directories when searching for
1908                          toolchain binaries (compilers etc)
1909  --with-extra-path       prepend these directories to the default path
1910  --with-sdk-name         use the platform SDK of the given name. [macosx]
1911  --with-conf-name        use this as the name of the configuration [generated
1912                          from important configuration options]
1913  --with-output-sync      set make output sync type if supported by make.
1914                          [recurse]
1915  --with-builddeps-conf   use this configuration file for the builddeps
1916  --with-builddeps-server download and use build dependencies from this server
1917                          url
1918  --with-builddeps-dir    store downloaded build dependencies here
1919                          [/localhome/builddeps]
1920  --with-builddeps-group  chgrp the downloaded build dependencies to this
1921                          group
1922  --with-cacerts-file     specify alternative cacerts file
1923  --with-copyright-year   Set copyright year value for build [current year]
1924  --with-milestone        Deprecated. Option is kept for backwards
1925                          compatibility and is ignored
1926  --with-update-version   Deprecated. Option is kept for backwards
1927                          compatibility and is ignored
1928  --with-user-release-suffix
1929                          Deprecated. Option is kept for backwards
1930                          compatibility and is ignored
1931  --with-build-number     Deprecated. Option is kept for backwards
1932                          compatibility and is ignored
1933  --with-version-string   Set version string [calculated]
1934  --with-version-pre-base Set the base part of the version 'PRE' field
1935                          (pre-release identifier) ['internal']
1936  --with-version-pre-debuglevel
1937                          Set the debug level part of the version 'PRE' field
1938                          (pre-release identifier) [current debug level]
1939  --with-version-opt      Set version 'OPT' field (build metadata)
1940                          [<timestamp>.<user>.<dirname>]
1941  --with-version-build    Set version 'BUILD' field (build number) [not
1942                          specified]
1943  --with-version-major    Set version 'MAJOR' field (first number) [current
1944                          source value]
1945  --with-version-minor    Set version 'MINOR' field (second number) [current
1946                          source value]
1947  --with-version-security Set version 'SECURITY' field (third number) [current
1948                          source value]
1949  --with-version-patch    Set version 'PATCH' field (fourth number) [not
1950                          specified]
1951  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1952  --with-add-source-root  for each and every source directory, look in this
1953                          additional source root for the same directory; if it
1954                          exists and have files in it, include it in the build
1955  --with-override-source-root
1956                          for each and every source directory, look in this
1957                          override source root for the same directory; if it
1958                          exists, use that directory instead and ignore the
1959                          directory in the original source root
1960  --with-adds-and-overrides
1961                          use the subdirs 'adds' and 'overrides' in the
1962                          specified directory as add-source-root and
1963                          override-source-root
1964  --with-override-langtools
1965                          use this langtools dir for the build
1966  --with-override-corba   use this corba dir for the build
1967  --with-override-jaxp    use this jaxp dir for the build
1968  --with-override-jaxws   use this jaxws dir for the build
1969  --with-override-hotspot use this hotspot dir for the build
1970  --with-override-nashorn use this nashorn dir for the build
1971  --with-override-jdk     use this jdk dir for the build
1972  --with-import-hotspot   import hotspot binaries from this jdk image or
1973                          hotspot build dist dir instead of building from
1974                          source
1975  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
1976                          to show possible values [platform dependent]
1977  --with-toolchain-version
1978                          the version of the toolchain to look for, use
1979                          '--help' to show possible values [platform
1980                          dependent]
1981  --with-jtreg            Regression Test Harness [probed]
1982  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1983  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1984  --with-extra-ldflags    extra flags to be used when linking jdk
1985  --with-x                use the X Window System
1986  --with-cups             specify prefix directory for the cups package
1987                          (expecting the headers under PATH/include)
1988  --with-cups-include     specify directory for the cups include files
1989  --with-freetype         specify prefix directory for the freetype package
1990                          (expecting the libraries under PATH/lib and the
1991                          headers under PATH/include)
1992  --with-freetype-include specify directory for the freetype include files
1993  --with-freetype-lib     specify directory for the freetype library
1994  --with-freetype-src     specify directory with freetype sources to
1995                          automatically build the library (experimental,
1996                          Windows-only)
1997  --with-alsa             specify prefix directory for the alsa package
1998                          (expecting the libraries under PATH/lib and the
1999                          headers under PATH/include)
2000  --with-alsa-include     specify directory for the alsa include files
2001  --with-alsa-lib         specify directory for the alsa library
2002  --with-libjpeg          use libjpeg from build system or OpenJDK source
2003                          (system, bundled) [bundled]
2004  --with-giflib           use giflib from build system or OpenJDK source
2005                          (system, bundled) [bundled]
2006  --with-lcms             use lcms2 from build system or OpenJDK source
2007                          (system, bundled) [bundled]
2008  --with-libpng           use libpng from build system or OpenJDK source
2009                          (system, bundled) [bundled]
2010  --with-zlib             use zlib from build system or OpenJDK source
2011                          (system, bundled) [bundled]
2012  --with-stdc++lib=<static>,<dynamic>,<default>
2013                          force linking of the C++ runtime on Linux to either
2014                          static or dynamic, default is static with dynamic as
2015                          fallback
2016  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2017                          (Windows only) [probed]
2018  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2019                          (Windows only) [probed]
2020  --with-dxsdk            Deprecated. Option is kept for backwards
2021                          compatibility and is ignored
2022  --with-dxsdk-lib        Deprecated. Option is kept for backwards
2023                          compatibility and is ignored
2024  --with-dxsdk-include    Deprecated. Option is kept for backwards
2025                          compatibility and is ignored
2026  --with-num-cores        number of cores in the build system, e.g.
2027                          --with-num-cores=8 [probed]
2028  --with-memory-size      memory (in MB) available in the build system, e.g.
2029                          --with-memory-size=1024 [probed]
2030  --with-jobs             number of parallel jobs to let make run [calculated
2031                          based on cores and memory]
2032  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2033                          invocations of boot JDK, overriding the default
2034                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2035                          -enableassertions"
2036  --with-sjavac-server-java
2037                          use this java binary for running the sjavac
2038                          background server [Boot JDK java]
2039  --with-ccache-dir       where to store ccache files [~/.ccache]
2040
2041Some influential environment variables:
2042  BASENAME    Override default value for BASENAME
2043  BASH        Override default value for BASH
2044  CAT         Override default value for CAT
2045  CHMOD       Override default value for CHMOD
2046  CMP         Override default value for CMP
2047  COMM        Override default value for COMM
2048  CP          Override default value for CP
2049  CUT         Override default value for CUT
2050  DATE        Override default value for DATE
2051  DIFF        Override default value for DIFF
2052  DIRNAME     Override default value for DIRNAME
2053  ECHO        Override default value for ECHO
2054  EXPR        Override default value for EXPR
2055  FILE        Override default value for FILE
2056  FIND        Override default value for FIND
2057  HEAD        Override default value for HEAD
2058  LN          Override default value for LN
2059  LS          Override default value for LS
2060  MKDIR       Override default value for MKDIR
2061  MKTEMP      Override default value for MKTEMP
2062  MV          Override default value for MV
2063  NAWK        Override default value for NAWK
2064  PRINTF      Override default value for PRINTF
2065  RM          Override default value for RM
2066  SH          Override default value for SH
2067  SORT        Override default value for SORT
2068  TAIL        Override default value for TAIL
2069  TAR         Override default value for TAR
2070  TEE         Override default value for TEE
2071  TOUCH       Override default value for TOUCH
2072  TR          Override default value for TR
2073  UNAME       Override default value for UNAME
2074  UNIQ        Override default value for UNIQ
2075  WC          Override default value for WC
2076  WHICH       Override default value for WHICH
2077  XARGS       Override default value for XARGS
2078  AWK         Override default value for AWK
2079  GREP        Override default value for GREP
2080  EGREP       Override default value for EGREP
2081  FGREP       Override default value for FGREP
2082  SED         Override default value for SED
2083  CYGPATH     Override default value for CYGPATH
2084  READLINK    Override default value for READLINK
2085  DF          Override default value for DF
2086  SETFILE     Override default value for SETFILE
2087  CPIO        Override default value for CPIO
2088  UNZIP       Override default value for UNZIP
2089  ZIP         Override default value for ZIP
2090  LDD         Override default value for LDD
2091  OTOOL       Override default value for OTOOL
2092  READELF     Override default value for READELF
2093  HG          Override default value for HG
2094  STAT        Override default value for STAT
2095  TIME        Override default value for TIME
2096  DSYMUTIL    Override default value for DSYMUTIL
2097  XATTR       Override default value for XATTR
2098  CODESIGN    Override default value for CODESIGN
2099  PKG_CONFIG  path to pkg-config utility
2100  JAVA        Override default value for JAVA
2101  JAVAC       Override default value for JAVAC
2102  JAVAH       Override default value for JAVAH
2103  JAR         Override default value for JAR
2104  JARSIGNER   Override default value for JARSIGNER
2105  CC          C compiler command
2106  CFLAGS      C compiler flags
2107  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2108              nonstandard directory <lib dir>
2109  LIBS        libraries to pass to the linker, e.g. -l<library>
2110  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2111              you have headers in a nonstandard directory <include dir>
2112  CXX         C++ compiler command
2113  CXXFLAGS    C++ compiler flags
2114  CPP         C preprocessor
2115  CXXCPP      C++ preprocessor
2116  AS          Override default value for AS
2117  AR          Override default value for AR
2118  LIPO        Override default value for LIPO
2119  STRIP       Override default value for STRIP
2120  NM          Override default value for NM
2121  GNM         Override default value for GNM
2122  OBJCOPY     Override default value for OBJCOPY
2123  OBJDUMP     Override default value for OBJDUMP
2124  BUILD_CC    Override default value for BUILD_CC
2125  BUILD_CXX   Override default value for BUILD_CXX
2126  BUILD_LD    Override default value for BUILD_LD
2127  JTREGEXE    Override default value for JTREGEXE
2128  XMKMF       Path to xmkmf, Makefile generator for X Window System
2129  FREETYPE_CFLAGS
2130              C compiler flags for FREETYPE, overriding pkg-config
2131  FREETYPE_LIBS
2132              linker flags for FREETYPE, overriding pkg-config
2133  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2134  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2135  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2136  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2137  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2138  PNG_LIBS    linker flags for PNG, overriding pkg-config
2139  LIBFFI_CFLAGS
2140              C compiler flags for LIBFFI, overriding pkg-config
2141  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2142  CCACHE      Override default value for CCACHE
2143
2144Use these variables to override the choices made by `configure' or to help
2145it to find libraries and programs with nonstandard names/locations.
2146
2147Report bugs to <build-dev@openjdk.java.net>.
2148OpenJDK home page: <http://openjdk.java.net>.
2149_ACEOF
2150ac_status=$?
2151fi
2152
2153if test "$ac_init_help" = "recursive"; then
2154  # If there are subdirs, report their specific --help.
2155  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2156    test -d "$ac_dir" ||
2157      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2158      continue
2159    ac_builddir=.
2160
2161case "$ac_dir" in
2162.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2163*)
2164  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2165  # A ".." for each directory in $ac_dir_suffix.
2166  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2167  case $ac_top_builddir_sub in
2168  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2169  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2170  esac ;;
2171esac
2172ac_abs_top_builddir=$ac_pwd
2173ac_abs_builddir=$ac_pwd$ac_dir_suffix
2174# for backward compatibility:
2175ac_top_builddir=$ac_top_build_prefix
2176
2177case $srcdir in
2178  .)  # We are building in place.
2179    ac_srcdir=.
2180    ac_top_srcdir=$ac_top_builddir_sub
2181    ac_abs_top_srcdir=$ac_pwd ;;
2182  [\\/]* | ?:[\\/]* )  # Absolute name.
2183    ac_srcdir=$srcdir$ac_dir_suffix;
2184    ac_top_srcdir=$srcdir
2185    ac_abs_top_srcdir=$srcdir ;;
2186  *) # Relative name.
2187    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2188    ac_top_srcdir=$ac_top_build_prefix$srcdir
2189    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2190esac
2191ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2192
2193    cd "$ac_dir" || { ac_status=$?; continue; }
2194    # Check for guested configure.
2195    if test -f "$ac_srcdir/configure.gnu"; then
2196      echo &&
2197      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2198    elif test -f "$ac_srcdir/configure"; then
2199      echo &&
2200      $SHELL "$ac_srcdir/configure" --help=recursive
2201    else
2202      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2203    fi || ac_status=$?
2204    cd "$ac_pwd" || { ac_status=$?; break; }
2205  done
2206fi
2207
2208test -n "$ac_init_help" && exit $ac_status
2209if $ac_init_version; then
2210  cat <<\_ACEOF
2211OpenJDK configure jdk9
2212generated by GNU Autoconf 2.69
2213
2214Copyright (C) 2012 Free Software Foundation, Inc.
2215This configure script is free software; the Free Software Foundation
2216gives unlimited permission to copy, distribute and modify it.
2217_ACEOF
2218  exit
2219fi
2220
2221## ------------------------ ##
2222## Autoconf initialization. ##
2223## ------------------------ ##
2224
2225# ac_fn_c_try_compile LINENO
2226# --------------------------
2227# Try to compile conftest.$ac_ext, and return whether this succeeded.
2228ac_fn_c_try_compile ()
2229{
2230  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2231  rm -f conftest.$ac_objext
2232  if { { ac_try="$ac_compile"
2233case "(($ac_try" in
2234  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2235  *) ac_try_echo=$ac_try;;
2236esac
2237eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2238$as_echo "$ac_try_echo"; } >&5
2239  (eval "$ac_compile") 2>conftest.err
2240  ac_status=$?
2241  if test -s conftest.err; then
2242    grep -v '^ *+' conftest.err >conftest.er1
2243    cat conftest.er1 >&5
2244    mv -f conftest.er1 conftest.err
2245  fi
2246  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2247  test $ac_status = 0; } && {
2248	 test -z "$ac_c_werror_flag" ||
2249	 test ! -s conftest.err
2250       } && test -s conftest.$ac_objext; then :
2251  ac_retval=0
2252else
2253  $as_echo "$as_me: failed program was:" >&5
2254sed 's/^/| /' conftest.$ac_ext >&5
2255
2256	ac_retval=1
2257fi
2258  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2259  as_fn_set_status $ac_retval
2260
2261} # ac_fn_c_try_compile
2262
2263# ac_fn_cxx_try_compile LINENO
2264# ----------------------------
2265# Try to compile conftest.$ac_ext, and return whether this succeeded.
2266ac_fn_cxx_try_compile ()
2267{
2268  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2269  rm -f conftest.$ac_objext
2270  if { { ac_try="$ac_compile"
2271case "(($ac_try" in
2272  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2273  *) ac_try_echo=$ac_try;;
2274esac
2275eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2276$as_echo "$ac_try_echo"; } >&5
2277  (eval "$ac_compile") 2>conftest.err
2278  ac_status=$?
2279  if test -s conftest.err; then
2280    grep -v '^ *+' conftest.err >conftest.er1
2281    cat conftest.er1 >&5
2282    mv -f conftest.er1 conftest.err
2283  fi
2284  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2285  test $ac_status = 0; } && {
2286	 test -z "$ac_cxx_werror_flag" ||
2287	 test ! -s conftest.err
2288       } && test -s conftest.$ac_objext; then :
2289  ac_retval=0
2290else
2291  $as_echo "$as_me: failed program was:" >&5
2292sed 's/^/| /' conftest.$ac_ext >&5
2293
2294	ac_retval=1
2295fi
2296  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2297  as_fn_set_status $ac_retval
2298
2299} # ac_fn_cxx_try_compile
2300
2301# ac_fn_c_try_cpp LINENO
2302# ----------------------
2303# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2304ac_fn_c_try_cpp ()
2305{
2306  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2307  if { { ac_try="$ac_cpp conftest.$ac_ext"
2308case "(($ac_try" in
2309  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2310  *) ac_try_echo=$ac_try;;
2311esac
2312eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2313$as_echo "$ac_try_echo"; } >&5
2314  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2315  ac_status=$?
2316  if test -s conftest.err; then
2317    grep -v '^ *+' conftest.err >conftest.er1
2318    cat conftest.er1 >&5
2319    mv -f conftest.er1 conftest.err
2320  fi
2321  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2322  test $ac_status = 0; } > conftest.i && {
2323	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2324	 test ! -s conftest.err
2325       }; then :
2326  ac_retval=0
2327else
2328  $as_echo "$as_me: failed program was:" >&5
2329sed 's/^/| /' conftest.$ac_ext >&5
2330
2331    ac_retval=1
2332fi
2333  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2334  as_fn_set_status $ac_retval
2335
2336} # ac_fn_c_try_cpp
2337
2338# ac_fn_cxx_try_cpp LINENO
2339# ------------------------
2340# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2341ac_fn_cxx_try_cpp ()
2342{
2343  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2344  if { { ac_try="$ac_cpp conftest.$ac_ext"
2345case "(($ac_try" in
2346  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2347  *) ac_try_echo=$ac_try;;
2348esac
2349eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2350$as_echo "$ac_try_echo"; } >&5
2351  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2352  ac_status=$?
2353  if test -s conftest.err; then
2354    grep -v '^ *+' conftest.err >conftest.er1
2355    cat conftest.er1 >&5
2356    mv -f conftest.er1 conftest.err
2357  fi
2358  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2359  test $ac_status = 0; } > conftest.i && {
2360	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2361	 test ! -s conftest.err
2362       }; then :
2363  ac_retval=0
2364else
2365  $as_echo "$as_me: failed program was:" >&5
2366sed 's/^/| /' conftest.$ac_ext >&5
2367
2368    ac_retval=1
2369fi
2370  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2371  as_fn_set_status $ac_retval
2372
2373} # ac_fn_cxx_try_cpp
2374
2375# ac_fn_c_try_link LINENO
2376# -----------------------
2377# Try to link conftest.$ac_ext, and return whether this succeeded.
2378ac_fn_c_try_link ()
2379{
2380  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2381  rm -f conftest.$ac_objext conftest$ac_exeext
2382  if { { ac_try="$ac_link"
2383case "(($ac_try" in
2384  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2385  *) ac_try_echo=$ac_try;;
2386esac
2387eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2388$as_echo "$ac_try_echo"; } >&5
2389  (eval "$ac_link") 2>conftest.err
2390  ac_status=$?
2391  if test -s conftest.err; then
2392    grep -v '^ *+' conftest.err >conftest.er1
2393    cat conftest.er1 >&5
2394    mv -f conftest.er1 conftest.err
2395  fi
2396  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2397  test $ac_status = 0; } && {
2398	 test -z "$ac_c_werror_flag" ||
2399	 test ! -s conftest.err
2400       } && test -s conftest$ac_exeext && {
2401	 test "$cross_compiling" = yes ||
2402	 test -x conftest$ac_exeext
2403       }; then :
2404  ac_retval=0
2405else
2406  $as_echo "$as_me: failed program was:" >&5
2407sed 's/^/| /' conftest.$ac_ext >&5
2408
2409	ac_retval=1
2410fi
2411  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2412  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2413  # interfere with the next link command; also delete a directory that is
2414  # left behind by Apple's compiler.  We do this before executing the actions.
2415  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2416  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2417  as_fn_set_status $ac_retval
2418
2419} # ac_fn_c_try_link
2420
2421# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2422# ---------------------------------------------------------
2423# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2424# the include files in INCLUDES and setting the cache variable VAR
2425# accordingly.
2426ac_fn_cxx_check_header_mongrel ()
2427{
2428  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2429  if eval \${$3+:} false; then :
2430  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2431$as_echo_n "checking for $2... " >&6; }
2432if eval \${$3+:} false; then :
2433  $as_echo_n "(cached) " >&6
2434fi
2435eval ac_res=\$$3
2436	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2437$as_echo "$ac_res" >&6; }
2438else
2439  # Is the header compilable?
2440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2441$as_echo_n "checking $2 usability... " >&6; }
2442cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2443/* end confdefs.h.  */
2444$4
2445#include <$2>
2446_ACEOF
2447if ac_fn_cxx_try_compile "$LINENO"; then :
2448  ac_header_compiler=yes
2449else
2450  ac_header_compiler=no
2451fi
2452rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2453{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2454$as_echo "$ac_header_compiler" >&6; }
2455
2456# Is the header present?
2457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2458$as_echo_n "checking $2 presence... " >&6; }
2459cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2460/* end confdefs.h.  */
2461#include <$2>
2462_ACEOF
2463if ac_fn_cxx_try_cpp "$LINENO"; then :
2464  ac_header_preproc=yes
2465else
2466  ac_header_preproc=no
2467fi
2468rm -f conftest.err conftest.i conftest.$ac_ext
2469{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2470$as_echo "$ac_header_preproc" >&6; }
2471
2472# So?  What about this header?
2473case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2474  yes:no: )
2475    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2476$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2477    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2478$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2479    ;;
2480  no:yes:* )
2481    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2482$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2483    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2484$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2485    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2486$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2487    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2488$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2489    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2490$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2491( $as_echo "## ----------------------------------------- ##
2492## Report this to build-dev@openjdk.java.net ##
2493## ----------------------------------------- ##"
2494     ) | sed "s/^/$as_me: WARNING:     /" >&2
2495    ;;
2496esac
2497  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2498$as_echo_n "checking for $2... " >&6; }
2499if eval \${$3+:} false; then :
2500  $as_echo_n "(cached) " >&6
2501else
2502  eval "$3=\$ac_header_compiler"
2503fi
2504eval ac_res=\$$3
2505	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2506$as_echo "$ac_res" >&6; }
2507fi
2508  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2509
2510} # ac_fn_cxx_check_header_mongrel
2511
2512# ac_fn_cxx_try_run LINENO
2513# ------------------------
2514# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2515# that executables *can* be run.
2516ac_fn_cxx_try_run ()
2517{
2518  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2519  if { { ac_try="$ac_link"
2520case "(($ac_try" in
2521  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2522  *) ac_try_echo=$ac_try;;
2523esac
2524eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2525$as_echo "$ac_try_echo"; } >&5
2526  (eval "$ac_link") 2>&5
2527  ac_status=$?
2528  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2529  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2530  { { case "(($ac_try" in
2531  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2532  *) ac_try_echo=$ac_try;;
2533esac
2534eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2535$as_echo "$ac_try_echo"; } >&5
2536  (eval "$ac_try") 2>&5
2537  ac_status=$?
2538  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2539  test $ac_status = 0; }; }; then :
2540  ac_retval=0
2541else
2542  $as_echo "$as_me: program exited with status $ac_status" >&5
2543       $as_echo "$as_me: failed program was:" >&5
2544sed 's/^/| /' conftest.$ac_ext >&5
2545
2546       ac_retval=$ac_status
2547fi
2548  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2549  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2550  as_fn_set_status $ac_retval
2551
2552} # ac_fn_cxx_try_run
2553
2554# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2555# ---------------------------------------------------------
2556# Tests whether HEADER exists and can be compiled using the include files in
2557# INCLUDES, setting the cache variable VAR accordingly.
2558ac_fn_cxx_check_header_compile ()
2559{
2560  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2561  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2562$as_echo_n "checking for $2... " >&6; }
2563if eval \${$3+:} false; then :
2564  $as_echo_n "(cached) " >&6
2565else
2566  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2567/* end confdefs.h.  */
2568$4
2569#include <$2>
2570_ACEOF
2571if ac_fn_cxx_try_compile "$LINENO"; then :
2572  eval "$3=yes"
2573else
2574  eval "$3=no"
2575fi
2576rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2577fi
2578eval ac_res=\$$3
2579	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2580$as_echo "$ac_res" >&6; }
2581  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2582
2583} # ac_fn_cxx_check_header_compile
2584
2585# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2586# ----------------------------------------------
2587# Tries to find the compile-time value of EXPR in a program that includes
2588# INCLUDES, setting VAR accordingly. Returns whether the value could be
2589# computed
2590ac_fn_cxx_compute_int ()
2591{
2592  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2593  if test "$cross_compiling" = yes; then
2594    # Depending upon the size, compute the lo and hi bounds.
2595cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2596/* end confdefs.h.  */
2597$4
2598int
2599main ()
2600{
2601static int test_array [1 - 2 * !(($2) >= 0)];
2602test_array [0] = 0;
2603return test_array [0];
2604
2605  ;
2606  return 0;
2607}
2608_ACEOF
2609if ac_fn_cxx_try_compile "$LINENO"; then :
2610  ac_lo=0 ac_mid=0
2611  while :; do
2612    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2613/* end confdefs.h.  */
2614$4
2615int
2616main ()
2617{
2618static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2619test_array [0] = 0;
2620return test_array [0];
2621
2622  ;
2623  return 0;
2624}
2625_ACEOF
2626if ac_fn_cxx_try_compile "$LINENO"; then :
2627  ac_hi=$ac_mid; break
2628else
2629  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2630			if test $ac_lo -le $ac_mid; then
2631			  ac_lo= ac_hi=
2632			  break
2633			fi
2634			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2635fi
2636rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2637  done
2638else
2639  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2640/* end confdefs.h.  */
2641$4
2642int
2643main ()
2644{
2645static int test_array [1 - 2 * !(($2) < 0)];
2646test_array [0] = 0;
2647return test_array [0];
2648
2649  ;
2650  return 0;
2651}
2652_ACEOF
2653if ac_fn_cxx_try_compile "$LINENO"; then :
2654  ac_hi=-1 ac_mid=-1
2655  while :; do
2656    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2657/* end confdefs.h.  */
2658$4
2659int
2660main ()
2661{
2662static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2663test_array [0] = 0;
2664return test_array [0];
2665
2666  ;
2667  return 0;
2668}
2669_ACEOF
2670if ac_fn_cxx_try_compile "$LINENO"; then :
2671  ac_lo=$ac_mid; break
2672else
2673  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2674			if test $ac_mid -le $ac_hi; then
2675			  ac_lo= ac_hi=
2676			  break
2677			fi
2678			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2679fi
2680rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2681  done
2682else
2683  ac_lo= ac_hi=
2684fi
2685rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2686fi
2687rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2688# Binary search between lo and hi bounds.
2689while test "x$ac_lo" != "x$ac_hi"; do
2690  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2691  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2692/* end confdefs.h.  */
2693$4
2694int
2695main ()
2696{
2697static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2698test_array [0] = 0;
2699return test_array [0];
2700
2701  ;
2702  return 0;
2703}
2704_ACEOF
2705if ac_fn_cxx_try_compile "$LINENO"; then :
2706  ac_hi=$ac_mid
2707else
2708  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2709fi
2710rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2711done
2712case $ac_lo in #((
2713?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2714'') ac_retval=1 ;;
2715esac
2716  else
2717    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2718/* end confdefs.h.  */
2719$4
2720static long int longval () { return $2; }
2721static unsigned long int ulongval () { return $2; }
2722#include <stdio.h>
2723#include <stdlib.h>
2724int
2725main ()
2726{
2727
2728  FILE *f = fopen ("conftest.val", "w");
2729  if (! f)
2730    return 1;
2731  if (($2) < 0)
2732    {
2733      long int i = longval ();
2734      if (i != ($2))
2735	return 1;
2736      fprintf (f, "%ld", i);
2737    }
2738  else
2739    {
2740      unsigned long int i = ulongval ();
2741      if (i != ($2))
2742	return 1;
2743      fprintf (f, "%lu", i);
2744    }
2745  /* Do not output a trailing newline, as this causes \r\n confusion
2746     on some platforms.  */
2747  return ferror (f) || fclose (f) != 0;
2748
2749  ;
2750  return 0;
2751}
2752_ACEOF
2753if ac_fn_cxx_try_run "$LINENO"; then :
2754  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2755else
2756  ac_retval=1
2757fi
2758rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2759  conftest.$ac_objext conftest.beam conftest.$ac_ext
2760rm -f conftest.val
2761
2762  fi
2763  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2764  as_fn_set_status $ac_retval
2765
2766} # ac_fn_cxx_compute_int
2767
2768# ac_fn_cxx_try_link LINENO
2769# -------------------------
2770# Try to link conftest.$ac_ext, and return whether this succeeded.
2771ac_fn_cxx_try_link ()
2772{
2773  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2774  rm -f conftest.$ac_objext conftest$ac_exeext
2775  if { { ac_try="$ac_link"
2776case "(($ac_try" in
2777  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2778  *) ac_try_echo=$ac_try;;
2779esac
2780eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2781$as_echo "$ac_try_echo"; } >&5
2782  (eval "$ac_link") 2>conftest.err
2783  ac_status=$?
2784  if test -s conftest.err; then
2785    grep -v '^ *+' conftest.err >conftest.er1
2786    cat conftest.er1 >&5
2787    mv -f conftest.er1 conftest.err
2788  fi
2789  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2790  test $ac_status = 0; } && {
2791	 test -z "$ac_cxx_werror_flag" ||
2792	 test ! -s conftest.err
2793       } && test -s conftest$ac_exeext && {
2794	 test "$cross_compiling" = yes ||
2795	 test -x conftest$ac_exeext
2796       }; then :
2797  ac_retval=0
2798else
2799  $as_echo "$as_me: failed program was:" >&5
2800sed 's/^/| /' conftest.$ac_ext >&5
2801
2802	ac_retval=1
2803fi
2804  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2805  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2806  # interfere with the next link command; also delete a directory that is
2807  # left behind by Apple's compiler.  We do this before executing the actions.
2808  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2809  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2810  as_fn_set_status $ac_retval
2811
2812} # ac_fn_cxx_try_link
2813
2814# ac_fn_cxx_check_func LINENO FUNC VAR
2815# ------------------------------------
2816# Tests whether FUNC exists, setting the cache variable VAR accordingly
2817ac_fn_cxx_check_func ()
2818{
2819  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2820  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2821$as_echo_n "checking for $2... " >&6; }
2822if eval \${$3+:} false; then :
2823  $as_echo_n "(cached) " >&6
2824else
2825  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2826/* end confdefs.h.  */
2827/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2828   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2829#define $2 innocuous_$2
2830
2831/* System header to define __stub macros and hopefully few prototypes,
2832    which can conflict with char $2 (); below.
2833    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2834    <limits.h> exists even on freestanding compilers.  */
2835
2836#ifdef __STDC__
2837# include <limits.h>
2838#else
2839# include <assert.h>
2840#endif
2841
2842#undef $2
2843
2844/* Override any GCC internal prototype to avoid an error.
2845   Use char because int might match the return type of a GCC
2846   builtin and then its argument prototype would still apply.  */
2847#ifdef __cplusplus
2848extern "C"
2849#endif
2850char $2 ();
2851/* The GNU C library defines this for functions which it implements
2852    to always fail with ENOSYS.  Some functions are actually named
2853    something starting with __ and the normal name is an alias.  */
2854#if defined __stub_$2 || defined __stub___$2
2855choke me
2856#endif
2857
2858int
2859main ()
2860{
2861return $2 ();
2862  ;
2863  return 0;
2864}
2865_ACEOF
2866if ac_fn_cxx_try_link "$LINENO"; then :
2867  eval "$3=yes"
2868else
2869  eval "$3=no"
2870fi
2871rm -f core conftest.err conftest.$ac_objext \
2872    conftest$ac_exeext conftest.$ac_ext
2873fi
2874eval ac_res=\$$3
2875	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2876$as_echo "$ac_res" >&6; }
2877  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2878
2879} # ac_fn_cxx_check_func
2880
2881# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2882# -------------------------------------------------------
2883# Tests whether HEADER exists and can be compiled using the include files in
2884# INCLUDES, setting the cache variable VAR accordingly.
2885ac_fn_c_check_header_compile ()
2886{
2887  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2888  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2889$as_echo_n "checking for $2... " >&6; }
2890if eval \${$3+:} false; then :
2891  $as_echo_n "(cached) " >&6
2892else
2893  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2894/* end confdefs.h.  */
2895$4
2896#include <$2>
2897_ACEOF
2898if ac_fn_c_try_compile "$LINENO"; then :
2899  eval "$3=yes"
2900else
2901  eval "$3=no"
2902fi
2903rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2904fi
2905eval ac_res=\$$3
2906	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2907$as_echo "$ac_res" >&6; }
2908  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2909
2910} # ac_fn_c_check_header_compile
2911cat >config.log <<_ACEOF
2912This file contains any messages produced by compilers while
2913running configure, to aid debugging if configure makes a mistake.
2914
2915It was created by OpenJDK $as_me jdk9, which was
2916generated by GNU Autoconf 2.69.  Invocation command line was
2917
2918  $ $0 $@
2919
2920_ACEOF
2921exec 5>>config.log
2922{
2923cat <<_ASUNAME
2924## --------- ##
2925## Platform. ##
2926## --------- ##
2927
2928hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2929uname -m = `(uname -m) 2>/dev/null || echo unknown`
2930uname -r = `(uname -r) 2>/dev/null || echo unknown`
2931uname -s = `(uname -s) 2>/dev/null || echo unknown`
2932uname -v = `(uname -v) 2>/dev/null || echo unknown`
2933
2934/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2935/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2936
2937/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2938/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2939/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2940/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2941/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2942/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2943/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2944
2945_ASUNAME
2946
2947as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2948for as_dir in $PATH
2949do
2950  IFS=$as_save_IFS
2951  test -z "$as_dir" && as_dir=.
2952    $as_echo "PATH: $as_dir"
2953  done
2954IFS=$as_save_IFS
2955
2956} >&5
2957
2958cat >&5 <<_ACEOF
2959
2960
2961## ----------- ##
2962## Core tests. ##
2963## ----------- ##
2964
2965_ACEOF
2966
2967
2968# Keep a trace of the command line.
2969# Strip out --no-create and --no-recursion so they do not pile up.
2970# Strip out --silent because we don't want to record it for future runs.
2971# Also quote any args containing shell meta-characters.
2972# Make two passes to allow for proper duplicate-argument suppression.
2973ac_configure_args=
2974ac_configure_args0=
2975ac_configure_args1=
2976ac_must_keep_next=false
2977for ac_pass in 1 2
2978do
2979  for ac_arg
2980  do
2981    case $ac_arg in
2982    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2983    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2984    | -silent | --silent | --silen | --sile | --sil)
2985      continue ;;
2986    *\'*)
2987      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2988    esac
2989    case $ac_pass in
2990    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2991    2)
2992      as_fn_append ac_configure_args1 " '$ac_arg'"
2993      if test $ac_must_keep_next = true; then
2994	ac_must_keep_next=false # Got value, back to normal.
2995      else
2996	case $ac_arg in
2997	  *=* | --config-cache | -C | -disable-* | --disable-* \
2998	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2999	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3000	  | -with-* | --with-* | -without-* | --without-* | --x)
3001	    case "$ac_configure_args0 " in
3002	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3003	    esac
3004	    ;;
3005	  -* ) ac_must_keep_next=true ;;
3006	esac
3007      fi
3008      as_fn_append ac_configure_args " '$ac_arg'"
3009      ;;
3010    esac
3011  done
3012done
3013{ ac_configure_args0=; unset ac_configure_args0;}
3014{ ac_configure_args1=; unset ac_configure_args1;}
3015
3016# When interrupted or exit'd, cleanup temporary files, and complete
3017# config.log.  We remove comments because anyway the quotes in there
3018# would cause problems or look ugly.
3019# WARNING: Use '\'' to represent an apostrophe within the trap.
3020# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3021trap 'exit_status=$?
3022  # Save into config.log some information that might help in debugging.
3023  {
3024    echo
3025
3026    $as_echo "## ---------------- ##
3027## Cache variables. ##
3028## ---------------- ##"
3029    echo
3030    # The following way of writing the cache mishandles newlines in values,
3031(
3032  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3033    eval ac_val=\$$ac_var
3034    case $ac_val in #(
3035    *${as_nl}*)
3036      case $ac_var in #(
3037      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3038$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3039      esac
3040      case $ac_var in #(
3041      _ | IFS | as_nl) ;; #(
3042      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3043      *) { eval $ac_var=; unset $ac_var;} ;;
3044      esac ;;
3045    esac
3046  done
3047  (set) 2>&1 |
3048    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3049    *${as_nl}ac_space=\ *)
3050      sed -n \
3051	"s/'\''/'\''\\\\'\'''\''/g;
3052	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3053      ;; #(
3054    *)
3055      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3056      ;;
3057    esac |
3058    sort
3059)
3060    echo
3061
3062    $as_echo "## ----------------- ##
3063## Output variables. ##
3064## ----------------- ##"
3065    echo
3066    for ac_var in $ac_subst_vars
3067    do
3068      eval ac_val=\$$ac_var
3069      case $ac_val in
3070      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3071      esac
3072      $as_echo "$ac_var='\''$ac_val'\''"
3073    done | sort
3074    echo
3075
3076    if test -n "$ac_subst_files"; then
3077      $as_echo "## ------------------- ##
3078## File substitutions. ##
3079## ------------------- ##"
3080      echo
3081      for ac_var in $ac_subst_files
3082      do
3083	eval ac_val=\$$ac_var
3084	case $ac_val in
3085	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3086	esac
3087	$as_echo "$ac_var='\''$ac_val'\''"
3088      done | sort
3089      echo
3090    fi
3091
3092    if test -s confdefs.h; then
3093      $as_echo "## ----------- ##
3094## confdefs.h. ##
3095## ----------- ##"
3096      echo
3097      cat confdefs.h
3098      echo
3099    fi
3100    test "$ac_signal" != 0 &&
3101      $as_echo "$as_me: caught signal $ac_signal"
3102    $as_echo "$as_me: exit $exit_status"
3103  } >&5
3104  rm -f core *.core core.conftest.* &&
3105    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3106    exit $exit_status
3107' 0
3108for ac_signal in 1 2 13 15; do
3109  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3110done
3111ac_signal=0
3112
3113# confdefs.h avoids OS command line length limits that DEFS can exceed.
3114rm -f -r conftest* confdefs.h
3115
3116$as_echo "/* confdefs.h */" > confdefs.h
3117
3118# Predefined preprocessor variables.
3119
3120cat >>confdefs.h <<_ACEOF
3121#define PACKAGE_NAME "$PACKAGE_NAME"
3122_ACEOF
3123
3124cat >>confdefs.h <<_ACEOF
3125#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3126_ACEOF
3127
3128cat >>confdefs.h <<_ACEOF
3129#define PACKAGE_VERSION "$PACKAGE_VERSION"
3130_ACEOF
3131
3132cat >>confdefs.h <<_ACEOF
3133#define PACKAGE_STRING "$PACKAGE_STRING"
3134_ACEOF
3135
3136cat >>confdefs.h <<_ACEOF
3137#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3138_ACEOF
3139
3140cat >>confdefs.h <<_ACEOF
3141#define PACKAGE_URL "$PACKAGE_URL"
3142_ACEOF
3143
3144
3145# Let the site file select an alternate cache file if it wants to.
3146# Prefer an explicitly selected file to automatically selected ones.
3147ac_site_file1=NONE
3148ac_site_file2=NONE
3149if test -n "$CONFIG_SITE"; then
3150  # We do not want a PATH search for config.site.
3151  case $CONFIG_SITE in #((
3152    -*)  ac_site_file1=./$CONFIG_SITE;;
3153    */*) ac_site_file1=$CONFIG_SITE;;
3154    *)   ac_site_file1=./$CONFIG_SITE;;
3155  esac
3156elif test "x$prefix" != xNONE; then
3157  ac_site_file1=$prefix/share/config.site
3158  ac_site_file2=$prefix/etc/config.site
3159else
3160  ac_site_file1=$ac_default_prefix/share/config.site
3161  ac_site_file2=$ac_default_prefix/etc/config.site
3162fi
3163for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3164do
3165  test "x$ac_site_file" = xNONE && continue
3166  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3167    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3168$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3169    sed 's/^/| /' "$ac_site_file" >&5
3170    . "$ac_site_file" \
3171      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3172$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3173as_fn_error $? "failed to load site script $ac_site_file
3174See \`config.log' for more details" "$LINENO" 5; }
3175  fi
3176done
3177
3178if test -r "$cache_file"; then
3179  # Some versions of bash will fail to source /dev/null (special files
3180  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3181  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3182    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3183$as_echo "$as_me: loading cache $cache_file" >&6;}
3184    case $cache_file in
3185      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3186      *)                      . "./$cache_file";;
3187    esac
3188  fi
3189else
3190  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3191$as_echo "$as_me: creating cache $cache_file" >&6;}
3192  >$cache_file
3193fi
3194
3195# Check that the precious variables saved in the cache have kept the same
3196# value.
3197ac_cache_corrupted=false
3198for ac_var in $ac_precious_vars; do
3199  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3200  eval ac_new_set=\$ac_env_${ac_var}_set
3201  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3202  eval ac_new_val=\$ac_env_${ac_var}_value
3203  case $ac_old_set,$ac_new_set in
3204    set,)
3205      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3206$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3207      ac_cache_corrupted=: ;;
3208    ,set)
3209      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3210$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3211      ac_cache_corrupted=: ;;
3212    ,);;
3213    *)
3214      if test "x$ac_old_val" != "x$ac_new_val"; then
3215	# differences in whitespace do not lead to failure.
3216	ac_old_val_w=`echo x $ac_old_val`
3217	ac_new_val_w=`echo x $ac_new_val`
3218	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3219	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3220$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3221	  ac_cache_corrupted=:
3222	else
3223	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3224$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3225	  eval $ac_var=\$ac_old_val
3226	fi
3227	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3228$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3229	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3230$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3231      fi;;
3232  esac
3233  # Pass precious variables to config.status.
3234  if test "$ac_new_set" = set; then
3235    case $ac_new_val in
3236    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3237    *) ac_arg=$ac_var=$ac_new_val ;;
3238    esac
3239    case " $ac_configure_args " in
3240      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3241      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3242    esac
3243  fi
3244done
3245if $ac_cache_corrupted; then
3246  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3247$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3248  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3249$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3250  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3251fi
3252## -------------------- ##
3253## Main body of script. ##
3254## -------------------- ##
3255
3256ac_ext=c
3257ac_cpp='$CPP $CPPFLAGS'
3258ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3259ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3260ac_compiler_gnu=$ac_cv_c_compiler_gnu
3261
3262
3263
3264ac_aux_dir=
3265for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3266  if test -f "$ac_dir/install-sh"; then
3267    ac_aux_dir=$ac_dir
3268    ac_install_sh="$ac_aux_dir/install-sh -c"
3269    break
3270  elif test -f "$ac_dir/install.sh"; then
3271    ac_aux_dir=$ac_dir
3272    ac_install_sh="$ac_aux_dir/install.sh -c"
3273    break
3274  elif test -f "$ac_dir/shtool"; then
3275    ac_aux_dir=$ac_dir
3276    ac_install_sh="$ac_aux_dir/shtool install -c"
3277    break
3278  fi
3279done
3280if test -z "$ac_aux_dir"; then
3281  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
3282fi
3283
3284# These three variables are undocumented and unsupported,
3285# and are intended to be withdrawn in a future Autoconf release.
3286# They can cause serious problems if a builder's source tree is in a directory
3287# whose full name contains unusual characters.
3288ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3289ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3290ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3291
3292
3293# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3294
3295#
3296# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3297# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3298#
3299# This code is free software; you can redistribute it and/or modify it
3300# under the terms of the GNU General Public License version 2 only, as
3301# published by the Free Software Foundation.  Oracle designates this
3302# particular file as subject to the "Classpath" exception as provided
3303# by Oracle in the LICENSE file that accompanied this code.
3304#
3305# This code is distributed in the hope that it will be useful, but WITHOUT
3306# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3307# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3308# version 2 for more details (a copy is included in the LICENSE file that
3309# accompanied this code).
3310#
3311# You should have received a copy of the GNU General Public License version
3312# 2 along with this work; if not, write to the Free Software Foundation,
3313# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3314#
3315# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3316# or visit www.oracle.com if you need additional information or have any
3317# questions.
3318#
3319
3320#
3321# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3322#
3323# This program is free software; you can redistribute it and/or modify
3324# it under the terms of the GNU General Public License as published by
3325# the Free Software Foundation; either version 2 of the License, or
3326# (at your option) any later version.
3327#
3328# This program is distributed in the hope that it will be useful, but
3329# WITHOUT ANY WARRANTY; without even the implied warranty of
3330# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3331# General Public License for more details.
3332#
3333# You should have received a copy of the GNU General Public License
3334# along with this program; if not, write to the Free Software
3335# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3336#
3337# As a special exception to the GNU General Public License, if you
3338# distribute this file as part of a program that contains a
3339# configuration script generated by Autoconf, you may include it under
3340# the same distribution terms that you use for the rest of that program.
3341
3342# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3343# ----------------------------------
3344# PKG_PROG_PKG_CONFIG
3345
3346# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3347#
3348# Check to see whether a particular set of modules exists.  Similar
3349# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3350#
3351#
3352# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3353# this or PKG_CHECK_MODULES is called, or make sure to call
3354# PKG_CHECK_EXISTS manually
3355# --------------------------------------------------------------
3356
3357
3358
3359# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3360# ---------------------------------------------
3361# _PKG_CONFIG
3362
3363# _PKG_SHORT_ERRORS_SUPPORTED
3364# -----------------------------
3365# _PKG_SHORT_ERRORS_SUPPORTED
3366
3367
3368# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3369# [ACTION-IF-NOT-FOUND])
3370#
3371#
3372# Note that if there is a possibility the first call to
3373# PKG_CHECK_MODULES might not happen, you should be sure to include an
3374# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3375#
3376#
3377# --------------------------------------------------------------
3378# PKG_CHECK_MODULES
3379
3380
3381# Include these first...
3382#
3383# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3384# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3385#
3386# This code is free software; you can redistribute it and/or modify it
3387# under the terms of the GNU General Public License version 2 only, as
3388# published by the Free Software Foundation.  Oracle designates this
3389# particular file as subject to the "Classpath" exception as provided
3390# by Oracle in the LICENSE file that accompanied this code.
3391#
3392# This code is distributed in the hope that it will be useful, but WITHOUT
3393# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3394# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3395# version 2 for more details (a copy is included in the LICENSE file that
3396# accompanied this code).
3397#
3398# You should have received a copy of the GNU General Public License version
3399# 2 along with this work; if not, write to the Free Software Foundation,
3400# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3401#
3402# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3403# or visit www.oracle.com if you need additional information or have any
3404# questions.
3405#
3406
3407# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3408# If so, then append $1 to $2 \
3409# Also set JVM_ARG_OK to true/false depending on outcome.
3410
3411
3412# Appends a string to a path variable, only adding the : when needed.
3413
3414
3415# Prepends a string to a path variable, only adding the : when needed.
3416
3417
3418# This will make sure the given variable points to a full and proper
3419# path. This means:
3420# 1) There will be no spaces in the path. On unix platforms,
3421#    spaces in the path will result in an error. On Windows,
3422#    the path will be rewritten using short-style to be space-free.
3423# 2) The path will be absolute, and it will be in unix-style (on
3424#     cygwin).
3425# $1: The name of the variable to fix
3426
3427
3428# This will make sure the given variable points to a executable
3429# with a full and proper path. This means:
3430# 1) There will be no spaces in the path. On unix platforms,
3431#    spaces in the path will result in an error. On Windows,
3432#    the path will be rewritten using short-style to be space-free.
3433# 2) The path will be absolute, and it will be in unix-style (on
3434#     cygwin).
3435# Any arguments given to the executable is preserved.
3436# If the input variable does not have a directory specification, then
3437# it need to be in the PATH.
3438# $1: The name of the variable to fix
3439
3440
3441
3442
3443# Register a --with argument but mark it as deprecated
3444# $1: The name of the with argument to deprecate, not including --with-
3445
3446
3447# Register a --enable argument but mark it as deprecated
3448# $1: The name of the with argument to deprecate, not including --enable-
3449# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3450
3451
3452
3453
3454# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3455# $1: variable to check
3456
3457
3458# Check that there are no unprocessed overridden variables left.
3459# If so, they are an incorrect argument and we will exit with an error.
3460
3461
3462# Setup a tool for the given variable. If correctly specified by the user,
3463# use that value, otherwise search for the tool using the supplied code snippet.
3464# $1: variable to set
3465# $2: code snippet to call to look for the tool
3466
3467
3468# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3469# $1: variable to set
3470# $2: executable name (or list of names) to look for
3471
3472
3473# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3474# $1: variable to set
3475# $2: executable name (or list of names) to look for
3476
3477
3478# Like BASIC_PATH_PROGS but fails if no tool was found.
3479# $1: variable to set
3480# $2: executable name (or list of names) to look for
3481
3482
3483# Like BASIC_SETUP_TOOL but fails if no tool was found.
3484# $1: variable to set
3485# $2: autoconf macro to call to look for the special tool
3486
3487
3488# Setup the most fundamental tools that relies on not much else to set up,
3489# but is used by much of the early bootstrap code.
3490
3491
3492# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3493
3494
3495# Evaluates platform specific overrides for devkit variables.
3496# $1: Name of variable
3497
3498
3499
3500
3501
3502
3503#%%% Simple tools %%%
3504
3505# Check if we have found a usable version of make
3506# $1: the path to a potential make binary (or empty)
3507# $2: the description on how we found this
3508
3509
3510
3511
3512# Goes looking for a usable version of GNU make.
3513
3514
3515
3516
3517
3518
3519# Check if build directory is on local disk. If not possible to determine,
3520# we prefer to claim it's local.
3521# Argument 1: directory to test
3522# Argument 2: what to do if it is on local disk
3523# Argument 3: what to do otherwise (remote disk or failure)
3524
3525
3526# Check that source files have basic read permissions set. This might
3527# not be the case in cygwin in certain conditions.
3528
3529
3530
3531
3532# Check for support for specific options in bash
3533
3534
3535# Code to run after AC_OUTPUT
3536
3537
3538#
3539# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3540# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3541#
3542# This code is free software; you can redistribute it and/or modify it
3543# under the terms of the GNU General Public License version 2 only, as
3544# published by the Free Software Foundation.  Oracle designates this
3545# particular file as subject to the "Classpath" exception as provided
3546# by Oracle in the LICENSE file that accompanied this code.
3547#
3548# This code is distributed in the hope that it will be useful, but WITHOUT
3549# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3550# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3551# version 2 for more details (a copy is included in the LICENSE file that
3552# accompanied this code).
3553#
3554# You should have received a copy of the GNU General Public License version
3555# 2 along with this work; if not, write to the Free Software Foundation,
3556# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3557#
3558# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3559# or visit www.oracle.com if you need additional information or have any
3560# questions.
3561#
3562
3563
3564
3565
3566
3567# Helper function which possibly converts a path using DOS-style short mode.
3568# If so, the updated path is stored in $new_path.
3569# $1: The path to check
3570
3571
3572# Helper function which possibly converts a path using DOS-style short mode.
3573# If so, the updated path is stored in $new_path.
3574# $1: The path to check
3575
3576
3577# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3578# and could probably be heavily simplified. However, all changes in this
3579# area tend to need lot of testing in different scenarios, and in lack of
3580# proper unit testing, cleaning this up has not been deemed worth the effort
3581# at the moment.
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3592
3593
3594
3595
3596#
3597# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3598# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3599#
3600# This code is free software; you can redistribute it and/or modify it
3601# under the terms of the GNU General Public License version 2 only, as
3602# published by the Free Software Foundation.  Oracle designates this
3603# particular file as subject to the "Classpath" exception as provided
3604# by Oracle in the LICENSE file that accompanied this code.
3605#
3606# This code is distributed in the hope that it will be useful, but WITHOUT
3607# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3608# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3609# version 2 for more details (a copy is included in the LICENSE file that
3610# accompanied this code).
3611#
3612# You should have received a copy of the GNU General Public License version
3613# 2 along with this work; if not, write to the Free Software Foundation,
3614# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3615#
3616# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3617# or visit www.oracle.com if you need additional information or have any
3618# questions.
3619#
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631# ... then the rest
3632#
3633# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3634# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3635#
3636# This code is free software; you can redistribute it and/or modify it
3637# under the terms of the GNU General Public License version 2 only, as
3638# published by the Free Software Foundation.  Oracle designates this
3639# particular file as subject to the "Classpath" exception as provided
3640# by Oracle in the LICENSE file that accompanied this code.
3641#
3642# This code is distributed in the hope that it will be useful, but WITHOUT
3643# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3644# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3645# version 2 for more details (a copy is included in the LICENSE file that
3646# accompanied this code).
3647#
3648# You should have received a copy of the GNU General Public License version
3649# 2 along with this work; if not, write to the Free Software Foundation,
3650# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3651#
3652# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3653# or visit www.oracle.com if you need additional information or have any
3654# questions.
3655#
3656
3657########################################################################
3658# This file handles detection of the Boot JDK. The Boot JDK detection
3659# process has been developed as a response to solve a complex real-world
3660# problem. Initially, it was simple, but it has grown as platform after
3661# platform, idiosyncracy after idiosyncracy has been supported.
3662#
3663# The basic idea is this:
3664# 1) You need an acceptable *) JDK to use as a Boot JDK
3665# 2) There are several ways to locate a JDK, that are mostly platform
3666#    dependent **)
3667# 3) You can have multiple JDKs installed
3668# 4) If possible, configure should try to dig out an acceptable JDK
3669#    automatically, without having to resort to command-line options
3670#
3671# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3672#     javac) and not a JRE, etc.
3673#
3674# **) On Windows we typically use a well-known path.
3675#     On MacOSX we typically use the tool java_home.
3676#     On Linux we typically find javac in the $PATH, and then follow a
3677#     chain of symlinks that often ends up in a real JDK.
3678#
3679# This leads to the code where we check in different ways to locate a
3680# JDK, and if one is found, check if it is acceptable. If not, we print
3681# our reasons for rejecting it (useful when debugging non-working
3682# configure situations) and continue checking the next one.
3683########################################################################
3684
3685# Execute the check given as argument, and verify the result
3686# If the Boot JDK was previously found, do nothing
3687# $1 A command line (typically autoconf macro) to execute
3688
3689
3690# Test: Is bootjdk explicitely set by command line arguments?
3691
3692
3693# Test: Is bootjdk available from builddeps?
3694
3695
3696# Test: Is $JAVA_HOME set?
3697
3698
3699# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3700
3701
3702# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3703# $1: Argument to the java_home binary (optional)
3704
3705
3706# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3707
3708
3709# Look for a jdk in the given path. If there are multiple, try to select the newest.
3710# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3711# $1 = Path to directory containing jdk installations.
3712# $2 = String to append to the found JDK directory to get the proper JDK home
3713
3714
3715# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3716# environmental variable as base for where to look.
3717# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3718
3719
3720# Test: Is there a JDK installed in default, well-known locations?
3721
3722
3723# Check that a command-line tool in the Boot JDK is correct
3724# $1 = name of variable to assign
3725# $2 = name of binary
3726
3727
3728###############################################################################
3729#
3730# We need a Boot JDK to bootstrap the build.
3731#
3732
3733
3734
3735
3736
3737#
3738# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3739# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3740#
3741# This code is free software; you can redistribute it and/or modify it
3742# under the terms of the GNU General Public License version 2 only, as
3743# published by the Free Software Foundation.  Oracle designates this
3744# particular file as subject to the "Classpath" exception as provided
3745# by Oracle in the LICENSE file that accompanied this code.
3746#
3747# This code is distributed in the hope that it will be useful, but WITHOUT
3748# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3749# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3750# version 2 for more details (a copy is included in the LICENSE file that
3751# accompanied this code).
3752#
3753# You should have received a copy of the GNU General Public License version
3754# 2 along with this work; if not, write to the Free Software Foundation,
3755# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3756#
3757# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3758# or visit www.oracle.com if you need additional information or have any
3759# questions.
3760#
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781#
3782# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3783# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3784#
3785# This code is free software; you can redistribute it and/or modify it
3786# under the terms of the GNU General Public License version 2 only, as
3787# published by the Free Software Foundation.  Oracle designates this
3788# particular file as subject to the "Classpath" exception as provided
3789# by Oracle in the LICENSE file that accompanied this code.
3790#
3791# This code is distributed in the hope that it will be useful, but WITHOUT
3792# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3793# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3794# version 2 for more details (a copy is included in the LICENSE file that
3795# accompanied this code).
3796#
3797# You should have received a copy of the GNU General Public License version
3798# 2 along with this work; if not, write to the Free Software Foundation,
3799# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3800#
3801# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3802# or visit www.oracle.com if you need additional information or have any
3803# questions.
3804#
3805
3806
3807
3808
3809
3810# Documentation on common flags used for solstudio in HIGHEST.
3811#
3812# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3813#          done with care, there are some assumptions below that need to
3814#          be understood about the use of pointers, and IEEE behavior.
3815#
3816# -fns: Use non-standard floating point mode (not IEEE 754)
3817# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3818# -fsingle: Use single precision floating point with 'float'
3819# -xalias_level=basic: Assume memory references via basic pointer types do not alias
3820#   (Source with excessing pointer casting and data access with mixed
3821#    pointer types are not recommended)
3822# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3823#   (If you expect perfect errno behavior, do not use this)
3824# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3825# -xrestrict: Pointer parameters to functions do not overlap
3826#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3827#    If you pass in multiple pointers to the same data, do not use this)
3828# -xlibmil: Inline some library routines
3829#   (If you expect perfect errno behavior, do not use this)
3830# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3831#   (If you expect perfect errno behavior, do not use this)
3832#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3833
3834    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3835    # Bug?
3836    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3837    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3838    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3839    #fi
3840
3841
3842
3843
3844
3845# FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3846#                                   [RUN-IF-FALSE])
3847# ------------------------------------------------------------
3848# Check that the c and c++ compilers support an argument
3849
3850
3851# FLAGS_LINKER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3852#                                    [RUN-IF-FALSE])
3853# ------------------------------------------------------------
3854# Check that the linker support an argument
3855
3856
3857
3858
3859#
3860# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3861# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3862#
3863# This code is free software; you can redistribute it and/or modify it
3864# under the terms of the GNU General Public License version 2 only, as
3865# published by the Free Software Foundation.  Oracle designates this
3866# particular file as subject to the "Classpath" exception as provided
3867# by Oracle in the LICENSE file that accompanied this code.
3868#
3869# This code is distributed in the hope that it will be useful, but WITHOUT
3870# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3871# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3872# version 2 for more details (a copy is included in the LICENSE file that
3873# accompanied this code).
3874#
3875# You should have received a copy of the GNU General Public License version
3876# 2 along with this work; if not, write to the Free Software Foundation,
3877# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3878#
3879# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3880# or visit www.oracle.com if you need additional information or have any
3881# questions.
3882#
3883
3884
3885
3886
3887
3888cygwin_help() {
3889  case $1 in
3890    unzip)
3891      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3892      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3893      ;;
3894    zip)
3895      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3896      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3897      ;;
3898    make)
3899      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3900      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3901      ;;
3902    freetype)
3903      HELP_MSG="
3904The freetype library can now be build during the configure process.
3905Download the freetype sources and unpack them into an arbitrary directory:
3906
3907wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
3908tar -xzf freetype-2.5.3.tar.gz
3909
3910Then run configure with '--with-freetype-src=<freetype_src>'. This will
3911automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
3912builds or into '<freetype_src>/lib32' for 32-bit builds.
3913Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
3914and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds."
3915      ;;
3916  esac
3917}
3918
3919msys_help() {
3920  PKGHANDLER_COMMAND=""
3921}
3922
3923apt_help() {
3924  case $1 in
3925    devkit)
3926      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3927    openjdk)
3928      PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3929    alsa)
3930      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3931    cups)
3932      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3933    freetype)
3934      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3935    pulse)
3936      PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3937    x11)
3938      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3939    ccache)
3940      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3941  esac
3942}
3943
3944yum_help() {
3945  case $1 in
3946    devkit)
3947      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3948    openjdk)
3949      PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3950    alsa)
3951      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3952    cups)
3953      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3954    freetype)
3955      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3956    pulse)
3957      PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3958    x11)
3959      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
3960    ccache)
3961      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3962  esac
3963}
3964
3965port_help() {
3966  PKGHANDLER_COMMAND=""
3967}
3968
3969pkgutil_help() {
3970  PKGHANDLER_COMMAND=""
3971}
3972
3973pkgadd_help() {
3974  PKGHANDLER_COMMAND=""
3975}
3976
3977# This function will check if we're called from the "configure" wrapper while
3978# printing --help. If so, we will print out additional information that can
3979# only be extracted within the autoconf script, and then exit. This must be
3980# called at the very beginning in configure.ac.
3981
3982
3983
3984
3985
3986
3987#
3988# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3989# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3990#
3991# This code is free software; you can redistribute it and/or modify it
3992# under the terms of the GNU General Public License version 2 only, as
3993# published by the Free Software Foundation.  Oracle designates this
3994# particular file as subject to the "Classpath" exception as provided
3995# by Oracle in the LICENSE file that accompanied this code.
3996#
3997# This code is distributed in the hope that it will be useful, but WITHOUT
3998# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3999# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4000# version 2 for more details (a copy is included in the LICENSE file that
4001# accompanied this code).
4002#
4003# You should have received a copy of the GNU General Public License version
4004# 2 along with this work; if not, write to the Free Software Foundation,
4005# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4006#
4007# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4008# or visit www.oracle.com if you need additional information or have any
4009# questions.
4010#
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021###############################################################################
4022#
4023# Should we build only OpenJDK even if closed sources are present?
4024#
4025
4026
4027
4028
4029
4030
4031###############################################################################
4032#
4033# Enable or disable the elliptic curve crypto implementation
4034#
4035
4036
4037
4038
4039
4040################################################################################
4041#
4042# Gcov coverage data for hotspot
4043#
4044
4045
4046#
4047# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4048# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4049#
4050# This code is free software; you can redistribute it and/or modify it
4051# under the terms of the GNU General Public License version 2 only, as
4052# published by the Free Software Foundation.  Oracle designates this
4053# particular file as subject to the "Classpath" exception as provided
4054# by Oracle in the LICENSE file that accompanied this code.
4055#
4056# This code is distributed in the hope that it will be useful, but WITHOUT
4057# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4058# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4059# version 2 for more details (a copy is included in the LICENSE file that
4060# accompanied this code).
4061#
4062# You should have received a copy of the GNU General Public License version
4063# 2 along with this work; if not, write to the Free Software Foundation,
4064# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4065#
4066# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4067# or visit www.oracle.com if you need additional information or have any
4068# questions.
4069#
4070
4071###############################################################################
4072#
4073# Setup version numbers
4074#
4075
4076# Verify that a given string represents a valid version number, and assign it
4077# to a variable.
4078
4079# Argument 1: the variable to assign to
4080# Argument 2: the value given by the user
4081
4082
4083
4084
4085#
4086# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
4087# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4088#
4089# This code is free software; you can redistribute it and/or modify it
4090# under the terms of the GNU General Public License version 2 only, as
4091# published by the Free Software Foundation.  Oracle designates this
4092# particular file as subject to the "Classpath" exception as provided
4093# by Oracle in the LICENSE file that accompanied this code.
4094#
4095# This code is distributed in the hope that it will be useful, but WITHOUT
4096# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4097# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4098# version 2 for more details (a copy is included in the LICENSE file that
4099# accompanied this code).
4100#
4101# You should have received a copy of the GNU General Public License version
4102# 2 along with this work; if not, write to the Free Software Foundation,
4103# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4104#
4105# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4106# or visit www.oracle.com if you need additional information or have any
4107# questions.
4108#
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130#
4131# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4132# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4133#
4134# This code is free software; you can redistribute it and/or modify it
4135# under the terms of the GNU General Public License version 2 only, as
4136# published by the Free Software Foundation.  Oracle designates this
4137# particular file as subject to the "Classpath" exception as provided
4138# by Oracle in the LICENSE file that accompanied this code.
4139#
4140# This code is distributed in the hope that it will be useful, but WITHOUT
4141# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4142# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4143# version 2 for more details (a copy is included in the LICENSE file that
4144# accompanied this code).
4145#
4146# You should have received a copy of the GNU General Public License version
4147# 2 along with this work; if not, write to the Free Software Foundation,
4148# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4149#
4150# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4151# or visit www.oracle.com if you need additional information or have any
4152# questions.
4153#
4154
4155# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4156# Converts autoconf style CPU name to OpenJDK style, into
4157# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4158
4159
4160# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4161# Converts autoconf style OS name to OpenJDK style, into
4162# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4163
4164
4165# Expects $host_os $host_cpu $build_os and $build_cpu
4166# and $with_target_bits to have been setup!
4167#
4168# Translate the standard triplet(quadruplet) definition
4169# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4170# OPENJDK_BUILD_OS, etc.
4171
4172
4173# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4174# accordingly. Must be done after setting up build and target system, but before
4175# doing anything else with these values.
4176
4177
4178# Setup the legacy variables, for controlling the old makefiles.
4179#
4180
4181
4182
4183
4184#%%% Build and target systems %%%
4185
4186
4187
4188
4189# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4190# Add -mX to various FLAGS variables.
4191
4192
4193
4194
4195
4196
4197#
4198# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4199# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4200#
4201# This code is free software; you can redistribute it and/or modify it
4202# under the terms of the GNU General Public License version 2 only, as
4203# published by the Free Software Foundation.  Oracle designates this
4204# particular file as subject to the "Classpath" exception as provided
4205# by Oracle in the LICENSE file that accompanied this code.
4206#
4207# This code is distributed in the hope that it will be useful, but WITHOUT
4208# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4209# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4210# version 2 for more details (a copy is included in the LICENSE file that
4211# accompanied this code).
4212#
4213# You should have received a copy of the GNU General Public License version
4214# 2 along with this work; if not, write to the Free Software Foundation,
4215# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4216#
4217# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4218# or visit www.oracle.com if you need additional information or have any
4219# questions.
4220#
4221
4222
4223
4224
4225
4226
4227
4228
4229#
4230# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4231# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4232#
4233# This code is free software; you can redistribute it and/or modify it
4234# under the terms of the GNU General Public License version 2 only, as
4235# published by the Free Software Foundation.  Oracle designates this
4236# particular file as subject to the "Classpath" exception as provided
4237# by Oracle in the LICENSE file that accompanied this code.
4238#
4239# This code is distributed in the hope that it will be useful, but WITHOUT
4240# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4241# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4242# version 2 for more details (a copy is included in the LICENSE file that
4243# accompanied this code).
4244#
4245# You should have received a copy of the GNU General Public License version
4246# 2 along with this work; if not, write to the Free Software Foundation,
4247# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4248#
4249# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4250# or visit www.oracle.com if you need additional information or have any
4251# questions.
4252#
4253
4254########################################################################
4255# This file is responsible for detecting, verifying and setting up the
4256# toolchain, i.e. the compiler, linker and related utilities. It will setup
4257# proper paths to the binaries, but it will not setup any flags.
4258#
4259# The binaries used is determined by the toolchain type, which is the family of
4260# compilers and related tools that are used.
4261########################################################################
4262
4263
4264# All valid toolchains, regardless of platform (used by help.m4)
4265VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4266
4267# These toolchains are valid on different platforms
4268VALID_TOOLCHAINS_linux="gcc clang"
4269VALID_TOOLCHAINS_solaris="solstudio"
4270VALID_TOOLCHAINS_macosx="gcc clang"
4271VALID_TOOLCHAINS_aix="xlc"
4272VALID_TOOLCHAINS_windows="microsoft"
4273
4274# Toolchain descriptions
4275TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4276TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4277TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4278TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4279TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4280
4281# Setup a number of variables describing how native output files are
4282# named on this platform/toolchain.
4283
4284
4285# Determine which toolchain type to use, and make sure it is valid for this
4286# platform. Setup various information about the selected toolchain.
4287
4288
4289# Before we start detecting the toolchain executables, we might need some
4290# special setup, e.g. additional paths etc.
4291
4292
4293# Restore path, etc
4294
4295
4296# Check if a compiler is of the toolchain type we expect, and save the version
4297# information from it. If the compiler does not match the expected type,
4298# this function will abort using AC_MSG_ERROR. If it matches, the version will
4299# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4300# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4301#
4302# $1 = compiler to test (CC or CXX)
4303# $2 = human readable name of compiler (C or C++)
4304
4305
4306# Try to locate the given C or C++ compiler in the path, or otherwise.
4307#
4308# $1 = compiler to test (CC or CXX)
4309# $2 = human readable name of compiler (C or C++)
4310# $3 = list of compiler names to search for
4311
4312
4313# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4314# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4315# archiver (AR). Verify that the compilers are correct according to the
4316# toolchain type.
4317
4318
4319# Setup additional tools that is considered a part of the toolchain, but not the
4320# core part. Many of these are highly platform-specific and do not exist,
4321# and/or are not needed on all platforms.
4322
4323
4324# Setup the build tools (i.e, the compiler and linker used to build programs
4325# that should be run on the build platform, not the target platform, as a build
4326# helper). Since the non-cross-compile case uses the normal, target compilers
4327# for this, we can only do this after these have been setup.
4328
4329
4330# Setup legacy variables that are still needed as alternative ways to refer to
4331# parts of the toolchain.
4332
4333
4334# Do some additional checks on the detected tools.
4335
4336
4337# Setup the JTReg Regression Test Harness.
4338
4339
4340#
4341# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4342# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4343#
4344# This code is free software; you can redistribute it and/or modify it
4345# under the terms of the GNU General Public License version 2 only, as
4346# published by the Free Software Foundation.  Oracle designates this
4347# particular file as subject to the "Classpath" exception as provided
4348# by Oracle in the LICENSE file that accompanied this code.
4349#
4350# This code is distributed in the hope that it will be useful, but WITHOUT
4351# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4352# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4353# version 2 for more details (a copy is included in the LICENSE file that
4354# accompanied this code).
4355#
4356# You should have received a copy of the GNU General Public License version
4357# 2 along with this work; if not, write to the Free Software Foundation,
4358# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4359#
4360# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4361# or visit www.oracle.com if you need additional information or have any
4362# questions.
4363#
4364
4365################################################################################
4366# The order of these defines the priority by which we try to find them.
4367VALID_VS_VERSIONS="2013 2012 2010"
4368
4369VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
4370VS_VERSION_INTERNAL_2010=100
4371VS_MSVCR_2010=msvcr100.dll
4372# We don't use msvcp on Visual Studio 2010
4373#VS_MSVCP_2010=msvcp100.dll
4374VS_ENVVAR_2010="VS100COMNTOOLS"
4375VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
4376VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
4377VS_VS_PLATFORM_NAME_2010="v100"
4378VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
4379
4380VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
4381VS_VERSION_INTERNAL_2012=110
4382VS_MSVCR_2012=msvcr110.dll
4383VS_MSVCP_2012=msvcp110.dll
4384VS_ENVVAR_2012="VS110COMNTOOLS"
4385VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
4386VS_SDK_INSTALLDIR_2012=
4387VS_VS_PLATFORM_NAME_2012="v110"
4388VS_SDK_PLATFORM_NAME_2012=
4389
4390VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
4391VS_VERSION_INTERNAL_2013=120
4392VS_MSVCR_2013=msvcr120.dll
4393VS_MSVCP_2013=msvcp120.dll
4394VS_ENVVAR_2013="VS120COMNTOOLS"
4395VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
4396VS_SDK_INSTALLDIR_2013=
4397VS_VS_PLATFORM_NAME_2013="v120"
4398VS_SDK_PLATFORM_NAME_2013=
4399
4400################################################################################
4401
4402
4403
4404################################################################################
4405
4406
4407
4408################################################################################
4409# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
4410# build environment and assigns it to VS_ENV_CMD
4411
4412
4413################################################################################
4414
4415
4416
4417################################################################################
4418# Check if the VS env variables were setup prior to running configure.
4419# If not, then find vcvarsall.bat and run it automatically, and integrate
4420# the set env variables into the spec file.
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435# This line needs to be here, verbatim, after all includes and the dummy hook
4436# definitions. It is replaced with custom functionality when building
4437# custom sources.
4438#CUSTOM_AUTOCONF_INCLUDE
4439
4440# Do not change or remove the following line, it is needed for consistency checks:
4441DATE_WHEN_GENERATED=1433974864
4442
4443###############################################################################
4444#
4445# Initialization / Boot-strapping
4446#
4447# The bootstrapping process needs to solve the "chicken or the egg" problem,
4448# thus it jumps back and forth, each time gaining something needed later on.
4449#
4450###############################################################################
4451
4452# If we are requested to print additional help, do that and then exit.
4453# This must be the very first call.
4454
4455  if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4456    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4457    $PRINTF "Which are valid to use depends on the build platform.\n"
4458    for toolchain in $VALID_TOOLCHAINS_all; do
4459      # Use indirect variable referencing
4460      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4461      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4462      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4463    done
4464
4465    # And now exit directly
4466    exit 0
4467  fi
4468
4469
4470# Basic initialization that must happen first of all in the normal process.
4471
4472  # Save the original command line. This is passed to us by the wrapper configure script.
4473
4474  # Save the path variable before it gets changed
4475  ORIGINAL_PATH="$PATH"
4476
4477  DATE_WHEN_CONFIGURED=`LANG=C date`
4478
4479  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4480$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4481  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4482$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4483
4484
4485  # Start with tools that do not need have cross compilation support
4486  # and can be expected to be found in the default PATH. These tools are
4487  # used by configure. Nor are these tools expected to be found in the
4488  # devkit from the builddeps server either, since they are
4489  # needed to download the devkit.
4490
4491  # First are all the simple required tools.
4492
4493
4494
4495  # Publish this variable in the help.
4496
4497
4498  if test "x$BASENAME" = x; then
4499    # The variable is not set by user, try to locate tool using the code snippet
4500    for ac_prog in basename
4501do
4502  # Extract the first word of "$ac_prog", so it can be a program name with args.
4503set dummy $ac_prog; ac_word=$2
4504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4505$as_echo_n "checking for $ac_word... " >&6; }
4506if ${ac_cv_path_BASENAME+:} false; then :
4507  $as_echo_n "(cached) " >&6
4508else
4509  case $BASENAME in
4510  [\\/]* | ?:[\\/]*)
4511  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4512  ;;
4513  *)
4514  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4515for as_dir in $PATH
4516do
4517  IFS=$as_save_IFS
4518  test -z "$as_dir" && as_dir=.
4519    for ac_exec_ext in '' $ac_executable_extensions; do
4520  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4521    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4522    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4523    break 2
4524  fi
4525done
4526  done
4527IFS=$as_save_IFS
4528
4529  ;;
4530esac
4531fi
4532BASENAME=$ac_cv_path_BASENAME
4533if test -n "$BASENAME"; then
4534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4535$as_echo "$BASENAME" >&6; }
4536else
4537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4538$as_echo "no" >&6; }
4539fi
4540
4541
4542  test -n "$BASENAME" && break
4543done
4544
4545  else
4546    # The variable is set, but is it from the command line or the environment?
4547
4548    # Try to remove the string !BASENAME! from our list.
4549    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4550    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4551      # If it failed, the variable was not from the command line. Ignore it,
4552      # but warn the user (except for BASH, which is always set by the calling BASH).
4553      if test "xBASENAME" != xBASH; then
4554        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4555$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4556      fi
4557      # Try to locate tool using the code snippet
4558      for ac_prog in basename
4559do
4560  # Extract the first word of "$ac_prog", so it can be a program name with args.
4561set dummy $ac_prog; ac_word=$2
4562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4563$as_echo_n "checking for $ac_word... " >&6; }
4564if ${ac_cv_path_BASENAME+:} false; then :
4565  $as_echo_n "(cached) " >&6
4566else
4567  case $BASENAME in
4568  [\\/]* | ?:[\\/]*)
4569  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4570  ;;
4571  *)
4572  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4573for as_dir in $PATH
4574do
4575  IFS=$as_save_IFS
4576  test -z "$as_dir" && as_dir=.
4577    for ac_exec_ext in '' $ac_executable_extensions; do
4578  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4579    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4580    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4581    break 2
4582  fi
4583done
4584  done
4585IFS=$as_save_IFS
4586
4587  ;;
4588esac
4589fi
4590BASENAME=$ac_cv_path_BASENAME
4591if test -n "$BASENAME"; then
4592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4593$as_echo "$BASENAME" >&6; }
4594else
4595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4596$as_echo "no" >&6; }
4597fi
4598
4599
4600  test -n "$BASENAME" && break
4601done
4602
4603    else
4604      # If it succeeded, then it was overridden by the user. We will use it
4605      # for the tool.
4606
4607      # First remove it from the list of overridden variables, so we can test
4608      # for unknown variables in the end.
4609      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4610
4611      # Check if the provided tool contains a complete path.
4612      tool_specified="$BASENAME"
4613      tool_basename="${tool_specified##*/}"
4614      if test "x$tool_basename" = "x$tool_specified"; then
4615        # A command without a complete path is provided, search $PATH.
4616        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
4617$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
4618        # Extract the first word of "$tool_basename", so it can be a program name with args.
4619set dummy $tool_basename; ac_word=$2
4620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4621$as_echo_n "checking for $ac_word... " >&6; }
4622if ${ac_cv_path_BASENAME+:} false; then :
4623  $as_echo_n "(cached) " >&6
4624else
4625  case $BASENAME in
4626  [\\/]* | ?:[\\/]*)
4627  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4628  ;;
4629  *)
4630  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4631for as_dir in $PATH
4632do
4633  IFS=$as_save_IFS
4634  test -z "$as_dir" && as_dir=.
4635    for ac_exec_ext in '' $ac_executable_extensions; do
4636  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4637    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4638    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4639    break 2
4640  fi
4641done
4642  done
4643IFS=$as_save_IFS
4644
4645  ;;
4646esac
4647fi
4648BASENAME=$ac_cv_path_BASENAME
4649if test -n "$BASENAME"; then
4650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4651$as_echo "$BASENAME" >&6; }
4652else
4653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4654$as_echo "no" >&6; }
4655fi
4656
4657
4658        if test "x$BASENAME" = x; then
4659          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4660        fi
4661      else
4662        # Otherwise we believe it is a complete path. Use it as it is.
4663        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
4664$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
4665        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4666$as_echo_n "checking for BASENAME... " >&6; }
4667        if test ! -x "$tool_specified"; then
4668          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4669$as_echo "not found" >&6; }
4670          as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
4671        fi
4672        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4673$as_echo "$tool_specified" >&6; }
4674      fi
4675    fi
4676  fi
4677
4678
4679
4680  if test "x$BASENAME" = x; then
4681    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
4682  fi
4683
4684
4685
4686
4687
4688  # Publish this variable in the help.
4689
4690
4691  if test "x$BASH" = x; then
4692    # The variable is not set by user, try to locate tool using the code snippet
4693    for ac_prog in bash
4694do
4695  # Extract the first word of "$ac_prog", so it can be a program name with args.
4696set dummy $ac_prog; ac_word=$2
4697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4698$as_echo_n "checking for $ac_word... " >&6; }
4699if ${ac_cv_path_BASH+:} false; then :
4700  $as_echo_n "(cached) " >&6
4701else
4702  case $BASH in
4703  [\\/]* | ?:[\\/]*)
4704  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4705  ;;
4706  *)
4707  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4708for as_dir in $PATH
4709do
4710  IFS=$as_save_IFS
4711  test -z "$as_dir" && as_dir=.
4712    for ac_exec_ext in '' $ac_executable_extensions; do
4713  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4714    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4715    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4716    break 2
4717  fi
4718done
4719  done
4720IFS=$as_save_IFS
4721
4722  ;;
4723esac
4724fi
4725BASH=$ac_cv_path_BASH
4726if test -n "$BASH"; then
4727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4728$as_echo "$BASH" >&6; }
4729else
4730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4731$as_echo "no" >&6; }
4732fi
4733
4734
4735  test -n "$BASH" && break
4736done
4737
4738  else
4739    # The variable is set, but is it from the command line or the environment?
4740
4741    # Try to remove the string !BASH! from our list.
4742    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
4743    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4744      # If it failed, the variable was not from the command line. Ignore it,
4745      # but warn the user (except for BASH, which is always set by the calling BASH).
4746      if test "xBASH" != xBASH; then
4747        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
4748$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
4749      fi
4750      # Try to locate tool using the code snippet
4751      for ac_prog in bash
4752do
4753  # Extract the first word of "$ac_prog", so it can be a program name with args.
4754set dummy $ac_prog; ac_word=$2
4755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4756$as_echo_n "checking for $ac_word... " >&6; }
4757if ${ac_cv_path_BASH+:} false; then :
4758  $as_echo_n "(cached) " >&6
4759else
4760  case $BASH in
4761  [\\/]* | ?:[\\/]*)
4762  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4763  ;;
4764  *)
4765  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4766for as_dir in $PATH
4767do
4768  IFS=$as_save_IFS
4769  test -z "$as_dir" && as_dir=.
4770    for ac_exec_ext in '' $ac_executable_extensions; do
4771  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4772    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4773    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4774    break 2
4775  fi
4776done
4777  done
4778IFS=$as_save_IFS
4779
4780  ;;
4781esac
4782fi
4783BASH=$ac_cv_path_BASH
4784if test -n "$BASH"; then
4785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4786$as_echo "$BASH" >&6; }
4787else
4788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4789$as_echo "no" >&6; }
4790fi
4791
4792
4793  test -n "$BASH" && break
4794done
4795
4796    else
4797      # If it succeeded, then it was overridden by the user. We will use it
4798      # for the tool.
4799
4800      # First remove it from the list of overridden variables, so we can test
4801      # for unknown variables in the end.
4802      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4803
4804      # Check if the provided tool contains a complete path.
4805      tool_specified="$BASH"
4806      tool_basename="${tool_specified##*/}"
4807      if test "x$tool_basename" = "x$tool_specified"; then
4808        # A command without a complete path is provided, search $PATH.
4809        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
4810$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
4811        # Extract the first word of "$tool_basename", so it can be a program name with args.
4812set dummy $tool_basename; ac_word=$2
4813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4814$as_echo_n "checking for $ac_word... " >&6; }
4815if ${ac_cv_path_BASH+:} false; then :
4816  $as_echo_n "(cached) " >&6
4817else
4818  case $BASH in
4819  [\\/]* | ?:[\\/]*)
4820  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4821  ;;
4822  *)
4823  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4824for as_dir in $PATH
4825do
4826  IFS=$as_save_IFS
4827  test -z "$as_dir" && as_dir=.
4828    for ac_exec_ext in '' $ac_executable_extensions; do
4829  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4830    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4831    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4832    break 2
4833  fi
4834done
4835  done
4836IFS=$as_save_IFS
4837
4838  ;;
4839esac
4840fi
4841BASH=$ac_cv_path_BASH
4842if test -n "$BASH"; then
4843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4844$as_echo "$BASH" >&6; }
4845else
4846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4847$as_echo "no" >&6; }
4848fi
4849
4850
4851        if test "x$BASH" = x; then
4852          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4853        fi
4854      else
4855        # Otherwise we believe it is a complete path. Use it as it is.
4856        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
4857$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
4858        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
4859$as_echo_n "checking for BASH... " >&6; }
4860        if test ! -x "$tool_specified"; then
4861          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4862$as_echo "not found" >&6; }
4863          as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
4864        fi
4865        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4866$as_echo "$tool_specified" >&6; }
4867      fi
4868    fi
4869  fi
4870
4871
4872
4873  if test "x$BASH" = x; then
4874    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
4875  fi
4876
4877
4878
4879
4880
4881  # Publish this variable in the help.
4882
4883
4884  if test "x$CAT" = x; then
4885    # The variable is not set by user, try to locate tool using the code snippet
4886    for ac_prog in cat
4887do
4888  # Extract the first word of "$ac_prog", so it can be a program name with args.
4889set dummy $ac_prog; ac_word=$2
4890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4891$as_echo_n "checking for $ac_word... " >&6; }
4892if ${ac_cv_path_CAT+:} false; then :
4893  $as_echo_n "(cached) " >&6
4894else
4895  case $CAT in
4896  [\\/]* | ?:[\\/]*)
4897  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4898  ;;
4899  *)
4900  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4901for as_dir in $PATH
4902do
4903  IFS=$as_save_IFS
4904  test -z "$as_dir" && as_dir=.
4905    for ac_exec_ext in '' $ac_executable_extensions; do
4906  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4907    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4908    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4909    break 2
4910  fi
4911done
4912  done
4913IFS=$as_save_IFS
4914
4915  ;;
4916esac
4917fi
4918CAT=$ac_cv_path_CAT
4919if test -n "$CAT"; then
4920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4921$as_echo "$CAT" >&6; }
4922else
4923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4924$as_echo "no" >&6; }
4925fi
4926
4927
4928  test -n "$CAT" && break
4929done
4930
4931  else
4932    # The variable is set, but is it from the command line or the environment?
4933
4934    # Try to remove the string !CAT! from our list.
4935    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
4936    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4937      # If it failed, the variable was not from the command line. Ignore it,
4938      # but warn the user (except for BASH, which is always set by the calling BASH).
4939      if test "xCAT" != xBASH; then
4940        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
4941$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
4942      fi
4943      # Try to locate tool using the code snippet
4944      for ac_prog in cat
4945do
4946  # Extract the first word of "$ac_prog", so it can be a program name with args.
4947set dummy $ac_prog; ac_word=$2
4948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4949$as_echo_n "checking for $ac_word... " >&6; }
4950if ${ac_cv_path_CAT+:} false; then :
4951  $as_echo_n "(cached) " >&6
4952else
4953  case $CAT in
4954  [\\/]* | ?:[\\/]*)
4955  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4956  ;;
4957  *)
4958  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4959for as_dir in $PATH
4960do
4961  IFS=$as_save_IFS
4962  test -z "$as_dir" && as_dir=.
4963    for ac_exec_ext in '' $ac_executable_extensions; do
4964  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4965    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4966    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4967    break 2
4968  fi
4969done
4970  done
4971IFS=$as_save_IFS
4972
4973  ;;
4974esac
4975fi
4976CAT=$ac_cv_path_CAT
4977if test -n "$CAT"; then
4978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4979$as_echo "$CAT" >&6; }
4980else
4981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4982$as_echo "no" >&6; }
4983fi
4984
4985
4986  test -n "$CAT" && break
4987done
4988
4989    else
4990      # If it succeeded, then it was overridden by the user. We will use it
4991      # for the tool.
4992
4993      # First remove it from the list of overridden variables, so we can test
4994      # for unknown variables in the end.
4995      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4996
4997      # Check if the provided tool contains a complete path.
4998      tool_specified="$CAT"
4999      tool_basename="${tool_specified##*/}"
5000      if test "x$tool_basename" = "x$tool_specified"; then
5001        # A command without a complete path is provided, search $PATH.
5002        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5003$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5004        # Extract the first word of "$tool_basename", so it can be a program name with args.
5005set dummy $tool_basename; ac_word=$2
5006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5007$as_echo_n "checking for $ac_word... " >&6; }
5008if ${ac_cv_path_CAT+:} false; then :
5009  $as_echo_n "(cached) " >&6
5010else
5011  case $CAT in
5012  [\\/]* | ?:[\\/]*)
5013  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5014  ;;
5015  *)
5016  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5017for as_dir in $PATH
5018do
5019  IFS=$as_save_IFS
5020  test -z "$as_dir" && as_dir=.
5021    for ac_exec_ext in '' $ac_executable_extensions; do
5022  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5023    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5024    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5025    break 2
5026  fi
5027done
5028  done
5029IFS=$as_save_IFS
5030
5031  ;;
5032esac
5033fi
5034CAT=$ac_cv_path_CAT
5035if test -n "$CAT"; then
5036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5037$as_echo "$CAT" >&6; }
5038else
5039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5040$as_echo "no" >&6; }
5041fi
5042
5043
5044        if test "x$CAT" = x; then
5045          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5046        fi
5047      else
5048        # Otherwise we believe it is a complete path. Use it as it is.
5049        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5050$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5051        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5052$as_echo_n "checking for CAT... " >&6; }
5053        if test ! -x "$tool_specified"; then
5054          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5055$as_echo "not found" >&6; }
5056          as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5057        fi
5058        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5059$as_echo "$tool_specified" >&6; }
5060      fi
5061    fi
5062  fi
5063
5064
5065
5066  if test "x$CAT" = x; then
5067    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5068  fi
5069
5070
5071
5072
5073
5074  # Publish this variable in the help.
5075
5076
5077  if test "x$CHMOD" = x; then
5078    # The variable is not set by user, try to locate tool using the code snippet
5079    for ac_prog in chmod
5080do
5081  # Extract the first word of "$ac_prog", so it can be a program name with args.
5082set dummy $ac_prog; ac_word=$2
5083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5084$as_echo_n "checking for $ac_word... " >&6; }
5085if ${ac_cv_path_CHMOD+:} false; then :
5086  $as_echo_n "(cached) " >&6
5087else
5088  case $CHMOD in
5089  [\\/]* | ?:[\\/]*)
5090  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5091  ;;
5092  *)
5093  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5094for as_dir in $PATH
5095do
5096  IFS=$as_save_IFS
5097  test -z "$as_dir" && as_dir=.
5098    for ac_exec_ext in '' $ac_executable_extensions; do
5099  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5100    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5101    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5102    break 2
5103  fi
5104done
5105  done
5106IFS=$as_save_IFS
5107
5108  ;;
5109esac
5110fi
5111CHMOD=$ac_cv_path_CHMOD
5112if test -n "$CHMOD"; then
5113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5114$as_echo "$CHMOD" >&6; }
5115else
5116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5117$as_echo "no" >&6; }
5118fi
5119
5120
5121  test -n "$CHMOD" && break
5122done
5123
5124  else
5125    # The variable is set, but is it from the command line or the environment?
5126
5127    # Try to remove the string !CHMOD! from our list.
5128    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5129    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5130      # If it failed, the variable was not from the command line. Ignore it,
5131      # but warn the user (except for BASH, which is always set by the calling BASH).
5132      if test "xCHMOD" != xBASH; then
5133        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5134$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5135      fi
5136      # Try to locate tool using the code snippet
5137      for ac_prog in chmod
5138do
5139  # Extract the first word of "$ac_prog", so it can be a program name with args.
5140set dummy $ac_prog; ac_word=$2
5141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5142$as_echo_n "checking for $ac_word... " >&6; }
5143if ${ac_cv_path_CHMOD+:} false; then :
5144  $as_echo_n "(cached) " >&6
5145else
5146  case $CHMOD in
5147  [\\/]* | ?:[\\/]*)
5148  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5149  ;;
5150  *)
5151  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5152for as_dir in $PATH
5153do
5154  IFS=$as_save_IFS
5155  test -z "$as_dir" && as_dir=.
5156    for ac_exec_ext in '' $ac_executable_extensions; do
5157  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5158    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5159    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5160    break 2
5161  fi
5162done
5163  done
5164IFS=$as_save_IFS
5165
5166  ;;
5167esac
5168fi
5169CHMOD=$ac_cv_path_CHMOD
5170if test -n "$CHMOD"; then
5171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5172$as_echo "$CHMOD" >&6; }
5173else
5174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5175$as_echo "no" >&6; }
5176fi
5177
5178
5179  test -n "$CHMOD" && break
5180done
5181
5182    else
5183      # If it succeeded, then it was overridden by the user. We will use it
5184      # for the tool.
5185
5186      # First remove it from the list of overridden variables, so we can test
5187      # for unknown variables in the end.
5188      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5189
5190      # Check if the provided tool contains a complete path.
5191      tool_specified="$CHMOD"
5192      tool_basename="${tool_specified##*/}"
5193      if test "x$tool_basename" = "x$tool_specified"; then
5194        # A command without a complete path is provided, search $PATH.
5195        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5196$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5197        # Extract the first word of "$tool_basename", so it can be a program name with args.
5198set dummy $tool_basename; ac_word=$2
5199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5200$as_echo_n "checking for $ac_word... " >&6; }
5201if ${ac_cv_path_CHMOD+:} false; then :
5202  $as_echo_n "(cached) " >&6
5203else
5204  case $CHMOD in
5205  [\\/]* | ?:[\\/]*)
5206  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5207  ;;
5208  *)
5209  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5210for as_dir in $PATH
5211do
5212  IFS=$as_save_IFS
5213  test -z "$as_dir" && as_dir=.
5214    for ac_exec_ext in '' $ac_executable_extensions; do
5215  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5216    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5217    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5218    break 2
5219  fi
5220done
5221  done
5222IFS=$as_save_IFS
5223
5224  ;;
5225esac
5226fi
5227CHMOD=$ac_cv_path_CHMOD
5228if test -n "$CHMOD"; then
5229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5230$as_echo "$CHMOD" >&6; }
5231else
5232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5233$as_echo "no" >&6; }
5234fi
5235
5236
5237        if test "x$CHMOD" = x; then
5238          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5239        fi
5240      else
5241        # Otherwise we believe it is a complete path. Use it as it is.
5242        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5243$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5244        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5245$as_echo_n "checking for CHMOD... " >&6; }
5246        if test ! -x "$tool_specified"; then
5247          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5248$as_echo "not found" >&6; }
5249          as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5250        fi
5251        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5252$as_echo "$tool_specified" >&6; }
5253      fi
5254    fi
5255  fi
5256
5257
5258
5259  if test "x$CHMOD" = x; then
5260    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5261  fi
5262
5263
5264
5265
5266
5267  # Publish this variable in the help.
5268
5269
5270  if test "x$CMP" = x; then
5271    # The variable is not set by user, try to locate tool using the code snippet
5272    for ac_prog in cmp
5273do
5274  # Extract the first word of "$ac_prog", so it can be a program name with args.
5275set dummy $ac_prog; ac_word=$2
5276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5277$as_echo_n "checking for $ac_word... " >&6; }
5278if ${ac_cv_path_CMP+:} false; then :
5279  $as_echo_n "(cached) " >&6
5280else
5281  case $CMP in
5282  [\\/]* | ?:[\\/]*)
5283  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5284  ;;
5285  *)
5286  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5287for as_dir in $PATH
5288do
5289  IFS=$as_save_IFS
5290  test -z "$as_dir" && as_dir=.
5291    for ac_exec_ext in '' $ac_executable_extensions; do
5292  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5293    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5294    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5295    break 2
5296  fi
5297done
5298  done
5299IFS=$as_save_IFS
5300
5301  ;;
5302esac
5303fi
5304CMP=$ac_cv_path_CMP
5305if test -n "$CMP"; then
5306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5307$as_echo "$CMP" >&6; }
5308else
5309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5310$as_echo "no" >&6; }
5311fi
5312
5313
5314  test -n "$CMP" && break
5315done
5316
5317  else
5318    # The variable is set, but is it from the command line or the environment?
5319
5320    # Try to remove the string !CMP! from our list.
5321    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5322    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5323      # If it failed, the variable was not from the command line. Ignore it,
5324      # but warn the user (except for BASH, which is always set by the calling BASH).
5325      if test "xCMP" != xBASH; then
5326        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5327$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5328      fi
5329      # Try to locate tool using the code snippet
5330      for ac_prog in cmp
5331do
5332  # Extract the first word of "$ac_prog", so it can be a program name with args.
5333set dummy $ac_prog; ac_word=$2
5334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5335$as_echo_n "checking for $ac_word... " >&6; }
5336if ${ac_cv_path_CMP+:} false; then :
5337  $as_echo_n "(cached) " >&6
5338else
5339  case $CMP in
5340  [\\/]* | ?:[\\/]*)
5341  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5342  ;;
5343  *)
5344  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5345for as_dir in $PATH
5346do
5347  IFS=$as_save_IFS
5348  test -z "$as_dir" && as_dir=.
5349    for ac_exec_ext in '' $ac_executable_extensions; do
5350  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5351    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5352    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5353    break 2
5354  fi
5355done
5356  done
5357IFS=$as_save_IFS
5358
5359  ;;
5360esac
5361fi
5362CMP=$ac_cv_path_CMP
5363if test -n "$CMP"; then
5364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5365$as_echo "$CMP" >&6; }
5366else
5367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5368$as_echo "no" >&6; }
5369fi
5370
5371
5372  test -n "$CMP" && break
5373done
5374
5375    else
5376      # If it succeeded, then it was overridden by the user. We will use it
5377      # for the tool.
5378
5379      # First remove it from the list of overridden variables, so we can test
5380      # for unknown variables in the end.
5381      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5382
5383      # Check if the provided tool contains a complete path.
5384      tool_specified="$CMP"
5385      tool_basename="${tool_specified##*/}"
5386      if test "x$tool_basename" = "x$tool_specified"; then
5387        # A command without a complete path is provided, search $PATH.
5388        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5389$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5390        # Extract the first word of "$tool_basename", so it can be a program name with args.
5391set dummy $tool_basename; ac_word=$2
5392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5393$as_echo_n "checking for $ac_word... " >&6; }
5394if ${ac_cv_path_CMP+:} false; then :
5395  $as_echo_n "(cached) " >&6
5396else
5397  case $CMP in
5398  [\\/]* | ?:[\\/]*)
5399  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5400  ;;
5401  *)
5402  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5403for as_dir in $PATH
5404do
5405  IFS=$as_save_IFS
5406  test -z "$as_dir" && as_dir=.
5407    for ac_exec_ext in '' $ac_executable_extensions; do
5408  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5409    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5410    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5411    break 2
5412  fi
5413done
5414  done
5415IFS=$as_save_IFS
5416
5417  ;;
5418esac
5419fi
5420CMP=$ac_cv_path_CMP
5421if test -n "$CMP"; then
5422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5423$as_echo "$CMP" >&6; }
5424else
5425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5426$as_echo "no" >&6; }
5427fi
5428
5429
5430        if test "x$CMP" = x; then
5431          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5432        fi
5433      else
5434        # Otherwise we believe it is a complete path. Use it as it is.
5435        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5436$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5437        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5438$as_echo_n "checking for CMP... " >&6; }
5439        if test ! -x "$tool_specified"; then
5440          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5441$as_echo "not found" >&6; }
5442          as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5443        fi
5444        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5445$as_echo "$tool_specified" >&6; }
5446      fi
5447    fi
5448  fi
5449
5450
5451
5452  if test "x$CMP" = x; then
5453    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5454  fi
5455
5456
5457
5458
5459
5460  # Publish this variable in the help.
5461
5462
5463  if test "x$COMM" = x; then
5464    # The variable is not set by user, try to locate tool using the code snippet
5465    for ac_prog in comm
5466do
5467  # Extract the first word of "$ac_prog", so it can be a program name with args.
5468set dummy $ac_prog; ac_word=$2
5469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5470$as_echo_n "checking for $ac_word... " >&6; }
5471if ${ac_cv_path_COMM+:} false; then :
5472  $as_echo_n "(cached) " >&6
5473else
5474  case $COMM in
5475  [\\/]* | ?:[\\/]*)
5476  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5477  ;;
5478  *)
5479  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5480for as_dir in $PATH
5481do
5482  IFS=$as_save_IFS
5483  test -z "$as_dir" && as_dir=.
5484    for ac_exec_ext in '' $ac_executable_extensions; do
5485  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5486    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5487    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5488    break 2
5489  fi
5490done
5491  done
5492IFS=$as_save_IFS
5493
5494  ;;
5495esac
5496fi
5497COMM=$ac_cv_path_COMM
5498if test -n "$COMM"; then
5499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5500$as_echo "$COMM" >&6; }
5501else
5502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5503$as_echo "no" >&6; }
5504fi
5505
5506
5507  test -n "$COMM" && break
5508done
5509
5510  else
5511    # The variable is set, but is it from the command line or the environment?
5512
5513    # Try to remove the string !COMM! from our list.
5514    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5515    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5516      # If it failed, the variable was not from the command line. Ignore it,
5517      # but warn the user (except for BASH, which is always set by the calling BASH).
5518      if test "xCOMM" != xBASH; then
5519        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5520$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5521      fi
5522      # Try to locate tool using the code snippet
5523      for ac_prog in comm
5524do
5525  # Extract the first word of "$ac_prog", so it can be a program name with args.
5526set dummy $ac_prog; ac_word=$2
5527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5528$as_echo_n "checking for $ac_word... " >&6; }
5529if ${ac_cv_path_COMM+:} false; then :
5530  $as_echo_n "(cached) " >&6
5531else
5532  case $COMM in
5533  [\\/]* | ?:[\\/]*)
5534  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5535  ;;
5536  *)
5537  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5538for as_dir in $PATH
5539do
5540  IFS=$as_save_IFS
5541  test -z "$as_dir" && as_dir=.
5542    for ac_exec_ext in '' $ac_executable_extensions; do
5543  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5544    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5545    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5546    break 2
5547  fi
5548done
5549  done
5550IFS=$as_save_IFS
5551
5552  ;;
5553esac
5554fi
5555COMM=$ac_cv_path_COMM
5556if test -n "$COMM"; then
5557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5558$as_echo "$COMM" >&6; }
5559else
5560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5561$as_echo "no" >&6; }
5562fi
5563
5564
5565  test -n "$COMM" && break
5566done
5567
5568    else
5569      # If it succeeded, then it was overridden by the user. We will use it
5570      # for the tool.
5571
5572      # First remove it from the list of overridden variables, so we can test
5573      # for unknown variables in the end.
5574      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5575
5576      # Check if the provided tool contains a complete path.
5577      tool_specified="$COMM"
5578      tool_basename="${tool_specified##*/}"
5579      if test "x$tool_basename" = "x$tool_specified"; then
5580        # A command without a complete path is provided, search $PATH.
5581        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
5582$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
5583        # Extract the first word of "$tool_basename", so it can be a program name with args.
5584set dummy $tool_basename; ac_word=$2
5585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5586$as_echo_n "checking for $ac_word... " >&6; }
5587if ${ac_cv_path_COMM+:} false; then :
5588  $as_echo_n "(cached) " >&6
5589else
5590  case $COMM in
5591  [\\/]* | ?:[\\/]*)
5592  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5593  ;;
5594  *)
5595  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5596for as_dir in $PATH
5597do
5598  IFS=$as_save_IFS
5599  test -z "$as_dir" && as_dir=.
5600    for ac_exec_ext in '' $ac_executable_extensions; do
5601  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5602    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5603    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5604    break 2
5605  fi
5606done
5607  done
5608IFS=$as_save_IFS
5609
5610  ;;
5611esac
5612fi
5613COMM=$ac_cv_path_COMM
5614if test -n "$COMM"; then
5615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5616$as_echo "$COMM" >&6; }
5617else
5618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5619$as_echo "no" >&6; }
5620fi
5621
5622
5623        if test "x$COMM" = x; then
5624          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5625        fi
5626      else
5627        # Otherwise we believe it is a complete path. Use it as it is.
5628        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
5629$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
5630        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5631$as_echo_n "checking for COMM... " >&6; }
5632        if test ! -x "$tool_specified"; then
5633          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5634$as_echo "not found" >&6; }
5635          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
5636        fi
5637        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5638$as_echo "$tool_specified" >&6; }
5639      fi
5640    fi
5641  fi
5642
5643
5644
5645  if test "x$COMM" = x; then
5646    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
5647  fi
5648
5649
5650
5651
5652
5653  # Publish this variable in the help.
5654
5655
5656  if test "x$CP" = x; then
5657    # The variable is not set by user, try to locate tool using the code snippet
5658    for ac_prog in cp
5659do
5660  # Extract the first word of "$ac_prog", so it can be a program name with args.
5661set dummy $ac_prog; ac_word=$2
5662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5663$as_echo_n "checking for $ac_word... " >&6; }
5664if ${ac_cv_path_CP+:} false; then :
5665  $as_echo_n "(cached) " >&6
5666else
5667  case $CP in
5668  [\\/]* | ?:[\\/]*)
5669  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5670  ;;
5671  *)
5672  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5673for as_dir in $PATH
5674do
5675  IFS=$as_save_IFS
5676  test -z "$as_dir" && as_dir=.
5677    for ac_exec_ext in '' $ac_executable_extensions; do
5678  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5679    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5680    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5681    break 2
5682  fi
5683done
5684  done
5685IFS=$as_save_IFS
5686
5687  ;;
5688esac
5689fi
5690CP=$ac_cv_path_CP
5691if test -n "$CP"; then
5692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5693$as_echo "$CP" >&6; }
5694else
5695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5696$as_echo "no" >&6; }
5697fi
5698
5699
5700  test -n "$CP" && break
5701done
5702
5703  else
5704    # The variable is set, but is it from the command line or the environment?
5705
5706    # Try to remove the string !CP! from our list.
5707    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
5708    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5709      # If it failed, the variable was not from the command line. Ignore it,
5710      # but warn the user (except for BASH, which is always set by the calling BASH).
5711      if test "xCP" != xBASH; then
5712        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
5713$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
5714      fi
5715      # Try to locate tool using the code snippet
5716      for ac_prog in cp
5717do
5718  # Extract the first word of "$ac_prog", so it can be a program name with args.
5719set dummy $ac_prog; ac_word=$2
5720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5721$as_echo_n "checking for $ac_word... " >&6; }
5722if ${ac_cv_path_CP+:} false; then :
5723  $as_echo_n "(cached) " >&6
5724else
5725  case $CP in
5726  [\\/]* | ?:[\\/]*)
5727  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5728  ;;
5729  *)
5730  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5731for as_dir in $PATH
5732do
5733  IFS=$as_save_IFS
5734  test -z "$as_dir" && as_dir=.
5735    for ac_exec_ext in '' $ac_executable_extensions; do
5736  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5737    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5738    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5739    break 2
5740  fi
5741done
5742  done
5743IFS=$as_save_IFS
5744
5745  ;;
5746esac
5747fi
5748CP=$ac_cv_path_CP
5749if test -n "$CP"; then
5750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5751$as_echo "$CP" >&6; }
5752else
5753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5754$as_echo "no" >&6; }
5755fi
5756
5757
5758  test -n "$CP" && break
5759done
5760
5761    else
5762      # If it succeeded, then it was overridden by the user. We will use it
5763      # for the tool.
5764
5765      # First remove it from the list of overridden variables, so we can test
5766      # for unknown variables in the end.
5767      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5768
5769      # Check if the provided tool contains a complete path.
5770      tool_specified="$CP"
5771      tool_basename="${tool_specified##*/}"
5772      if test "x$tool_basename" = "x$tool_specified"; then
5773        # A command without a complete path is provided, search $PATH.
5774        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
5775$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
5776        # Extract the first word of "$tool_basename", so it can be a program name with args.
5777set dummy $tool_basename; ac_word=$2
5778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5779$as_echo_n "checking for $ac_word... " >&6; }
5780if ${ac_cv_path_CP+:} false; then :
5781  $as_echo_n "(cached) " >&6
5782else
5783  case $CP in
5784  [\\/]* | ?:[\\/]*)
5785  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5786  ;;
5787  *)
5788  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5789for as_dir in $PATH
5790do
5791  IFS=$as_save_IFS
5792  test -z "$as_dir" && as_dir=.
5793    for ac_exec_ext in '' $ac_executable_extensions; do
5794  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5795    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5796    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5797    break 2
5798  fi
5799done
5800  done
5801IFS=$as_save_IFS
5802
5803  ;;
5804esac
5805fi
5806CP=$ac_cv_path_CP
5807if test -n "$CP"; then
5808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5809$as_echo "$CP" >&6; }
5810else
5811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5812$as_echo "no" >&6; }
5813fi
5814
5815
5816        if test "x$CP" = x; then
5817          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5818        fi
5819      else
5820        # Otherwise we believe it is a complete path. Use it as it is.
5821        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
5822$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
5823        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
5824$as_echo_n "checking for CP... " >&6; }
5825        if test ! -x "$tool_specified"; then
5826          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5827$as_echo "not found" >&6; }
5828          as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
5829        fi
5830        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5831$as_echo "$tool_specified" >&6; }
5832      fi
5833    fi
5834  fi
5835
5836
5837
5838  if test "x$CP" = x; then
5839    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
5840  fi
5841
5842
5843
5844
5845
5846  # Publish this variable in the help.
5847
5848
5849  if test "x$CUT" = x; then
5850    # The variable is not set by user, try to locate tool using the code snippet
5851    for ac_prog in cut
5852do
5853  # Extract the first word of "$ac_prog", so it can be a program name with args.
5854set dummy $ac_prog; ac_word=$2
5855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5856$as_echo_n "checking for $ac_word... " >&6; }
5857if ${ac_cv_path_CUT+:} false; then :
5858  $as_echo_n "(cached) " >&6
5859else
5860  case $CUT in
5861  [\\/]* | ?:[\\/]*)
5862  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5863  ;;
5864  *)
5865  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5866for as_dir in $PATH
5867do
5868  IFS=$as_save_IFS
5869  test -z "$as_dir" && as_dir=.
5870    for ac_exec_ext in '' $ac_executable_extensions; do
5871  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5872    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5873    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5874    break 2
5875  fi
5876done
5877  done
5878IFS=$as_save_IFS
5879
5880  ;;
5881esac
5882fi
5883CUT=$ac_cv_path_CUT
5884if test -n "$CUT"; then
5885  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5886$as_echo "$CUT" >&6; }
5887else
5888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5889$as_echo "no" >&6; }
5890fi
5891
5892
5893  test -n "$CUT" && break
5894done
5895
5896  else
5897    # The variable is set, but is it from the command line or the environment?
5898
5899    # Try to remove the string !CUT! from our list.
5900    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
5901    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5902      # If it failed, the variable was not from the command line. Ignore it,
5903      # but warn the user (except for BASH, which is always set by the calling BASH).
5904      if test "xCUT" != xBASH; then
5905        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
5906$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
5907      fi
5908      # Try to locate tool using the code snippet
5909      for ac_prog in cut
5910do
5911  # Extract the first word of "$ac_prog", so it can be a program name with args.
5912set dummy $ac_prog; ac_word=$2
5913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5914$as_echo_n "checking for $ac_word... " >&6; }
5915if ${ac_cv_path_CUT+:} false; then :
5916  $as_echo_n "(cached) " >&6
5917else
5918  case $CUT in
5919  [\\/]* | ?:[\\/]*)
5920  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5921  ;;
5922  *)
5923  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5924for as_dir in $PATH
5925do
5926  IFS=$as_save_IFS
5927  test -z "$as_dir" && as_dir=.
5928    for ac_exec_ext in '' $ac_executable_extensions; do
5929  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5930    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5931    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5932    break 2
5933  fi
5934done
5935  done
5936IFS=$as_save_IFS
5937
5938  ;;
5939esac
5940fi
5941CUT=$ac_cv_path_CUT
5942if test -n "$CUT"; then
5943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5944$as_echo "$CUT" >&6; }
5945else
5946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5947$as_echo "no" >&6; }
5948fi
5949
5950
5951  test -n "$CUT" && break
5952done
5953
5954    else
5955      # If it succeeded, then it was overridden by the user. We will use it
5956      # for the tool.
5957
5958      # First remove it from the list of overridden variables, so we can test
5959      # for unknown variables in the end.
5960      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5961
5962      # Check if the provided tool contains a complete path.
5963      tool_specified="$CUT"
5964      tool_basename="${tool_specified##*/}"
5965      if test "x$tool_basename" = "x$tool_specified"; then
5966        # A command without a complete path is provided, search $PATH.
5967        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
5968$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
5969        # Extract the first word of "$tool_basename", so it can be a program name with args.
5970set dummy $tool_basename; ac_word=$2
5971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5972$as_echo_n "checking for $ac_word... " >&6; }
5973if ${ac_cv_path_CUT+:} false; then :
5974  $as_echo_n "(cached) " >&6
5975else
5976  case $CUT in
5977  [\\/]* | ?:[\\/]*)
5978  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5979  ;;
5980  *)
5981  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5982for as_dir in $PATH
5983do
5984  IFS=$as_save_IFS
5985  test -z "$as_dir" && as_dir=.
5986    for ac_exec_ext in '' $ac_executable_extensions; do
5987  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5988    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5989    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5990    break 2
5991  fi
5992done
5993  done
5994IFS=$as_save_IFS
5995
5996  ;;
5997esac
5998fi
5999CUT=$ac_cv_path_CUT
6000if test -n "$CUT"; then
6001  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6002$as_echo "$CUT" >&6; }
6003else
6004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6005$as_echo "no" >&6; }
6006fi
6007
6008
6009        if test "x$CUT" = x; then
6010          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6011        fi
6012      else
6013        # Otherwise we believe it is a complete path. Use it as it is.
6014        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6015$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6016        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6017$as_echo_n "checking for CUT... " >&6; }
6018        if test ! -x "$tool_specified"; then
6019          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6020$as_echo "not found" >&6; }
6021          as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6022        fi
6023        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6024$as_echo "$tool_specified" >&6; }
6025      fi
6026    fi
6027  fi
6028
6029
6030
6031  if test "x$CUT" = x; then
6032    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6033  fi
6034
6035
6036
6037
6038
6039  # Publish this variable in the help.
6040
6041
6042  if test "x$DATE" = x; then
6043    # The variable is not set by user, try to locate tool using the code snippet
6044    for ac_prog in date
6045do
6046  # Extract the first word of "$ac_prog", so it can be a program name with args.
6047set dummy $ac_prog; ac_word=$2
6048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6049$as_echo_n "checking for $ac_word... " >&6; }
6050if ${ac_cv_path_DATE+:} false; then :
6051  $as_echo_n "(cached) " >&6
6052else
6053  case $DATE in
6054  [\\/]* | ?:[\\/]*)
6055  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6056  ;;
6057  *)
6058  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6059for as_dir in $PATH
6060do
6061  IFS=$as_save_IFS
6062  test -z "$as_dir" && as_dir=.
6063    for ac_exec_ext in '' $ac_executable_extensions; do
6064  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6065    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6066    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6067    break 2
6068  fi
6069done
6070  done
6071IFS=$as_save_IFS
6072
6073  ;;
6074esac
6075fi
6076DATE=$ac_cv_path_DATE
6077if test -n "$DATE"; then
6078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6079$as_echo "$DATE" >&6; }
6080else
6081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6082$as_echo "no" >&6; }
6083fi
6084
6085
6086  test -n "$DATE" && break
6087done
6088
6089  else
6090    # The variable is set, but is it from the command line or the environment?
6091
6092    # Try to remove the string !DATE! from our list.
6093    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6094    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6095      # If it failed, the variable was not from the command line. Ignore it,
6096      # but warn the user (except for BASH, which is always set by the calling BASH).
6097      if test "xDATE" != xBASH; then
6098        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6099$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6100      fi
6101      # Try to locate tool using the code snippet
6102      for ac_prog in date
6103do
6104  # Extract the first word of "$ac_prog", so it can be a program name with args.
6105set dummy $ac_prog; ac_word=$2
6106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6107$as_echo_n "checking for $ac_word... " >&6; }
6108if ${ac_cv_path_DATE+:} false; then :
6109  $as_echo_n "(cached) " >&6
6110else
6111  case $DATE in
6112  [\\/]* | ?:[\\/]*)
6113  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6114  ;;
6115  *)
6116  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6117for as_dir in $PATH
6118do
6119  IFS=$as_save_IFS
6120  test -z "$as_dir" && as_dir=.
6121    for ac_exec_ext in '' $ac_executable_extensions; do
6122  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6123    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6124    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6125    break 2
6126  fi
6127done
6128  done
6129IFS=$as_save_IFS
6130
6131  ;;
6132esac
6133fi
6134DATE=$ac_cv_path_DATE
6135if test -n "$DATE"; then
6136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6137$as_echo "$DATE" >&6; }
6138else
6139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6140$as_echo "no" >&6; }
6141fi
6142
6143
6144  test -n "$DATE" && break
6145done
6146
6147    else
6148      # If it succeeded, then it was overridden by the user. We will use it
6149      # for the tool.
6150
6151      # First remove it from the list of overridden variables, so we can test
6152      # for unknown variables in the end.
6153      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6154
6155      # Check if the provided tool contains a complete path.
6156      tool_specified="$DATE"
6157      tool_basename="${tool_specified##*/}"
6158      if test "x$tool_basename" = "x$tool_specified"; then
6159        # A command without a complete path is provided, search $PATH.
6160        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6161$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6162        # Extract the first word of "$tool_basename", so it can be a program name with args.
6163set dummy $tool_basename; ac_word=$2
6164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6165$as_echo_n "checking for $ac_word... " >&6; }
6166if ${ac_cv_path_DATE+:} false; then :
6167  $as_echo_n "(cached) " >&6
6168else
6169  case $DATE in
6170  [\\/]* | ?:[\\/]*)
6171  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6172  ;;
6173  *)
6174  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6175for as_dir in $PATH
6176do
6177  IFS=$as_save_IFS
6178  test -z "$as_dir" && as_dir=.
6179    for ac_exec_ext in '' $ac_executable_extensions; do
6180  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6181    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6182    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6183    break 2
6184  fi
6185done
6186  done
6187IFS=$as_save_IFS
6188
6189  ;;
6190esac
6191fi
6192DATE=$ac_cv_path_DATE
6193if test -n "$DATE"; then
6194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6195$as_echo "$DATE" >&6; }
6196else
6197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6198$as_echo "no" >&6; }
6199fi
6200
6201
6202        if test "x$DATE" = x; then
6203          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6204        fi
6205      else
6206        # Otherwise we believe it is a complete path. Use it as it is.
6207        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6208$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6209        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6210$as_echo_n "checking for DATE... " >&6; }
6211        if test ! -x "$tool_specified"; then
6212          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6213$as_echo "not found" >&6; }
6214          as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6215        fi
6216        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6217$as_echo "$tool_specified" >&6; }
6218      fi
6219    fi
6220  fi
6221
6222
6223
6224  if test "x$DATE" = x; then
6225    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6226  fi
6227
6228
6229
6230
6231
6232  # Publish this variable in the help.
6233
6234
6235  if test "x$DIFF" = x; then
6236    # The variable is not set by user, try to locate tool using the code snippet
6237    for ac_prog in gdiff diff
6238do
6239  # Extract the first word of "$ac_prog", so it can be a program name with args.
6240set dummy $ac_prog; ac_word=$2
6241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6242$as_echo_n "checking for $ac_word... " >&6; }
6243if ${ac_cv_path_DIFF+:} false; then :
6244  $as_echo_n "(cached) " >&6
6245else
6246  case $DIFF in
6247  [\\/]* | ?:[\\/]*)
6248  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6249  ;;
6250  *)
6251  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6252for as_dir in $PATH
6253do
6254  IFS=$as_save_IFS
6255  test -z "$as_dir" && as_dir=.
6256    for ac_exec_ext in '' $ac_executable_extensions; do
6257  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6258    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6259    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6260    break 2
6261  fi
6262done
6263  done
6264IFS=$as_save_IFS
6265
6266  ;;
6267esac
6268fi
6269DIFF=$ac_cv_path_DIFF
6270if test -n "$DIFF"; then
6271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6272$as_echo "$DIFF" >&6; }
6273else
6274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6275$as_echo "no" >&6; }
6276fi
6277
6278
6279  test -n "$DIFF" && break
6280done
6281
6282  else
6283    # The variable is set, but is it from the command line or the environment?
6284
6285    # Try to remove the string !DIFF! from our list.
6286    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6287    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6288      # If it failed, the variable was not from the command line. Ignore it,
6289      # but warn the user (except for BASH, which is always set by the calling BASH).
6290      if test "xDIFF" != xBASH; then
6291        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6292$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6293      fi
6294      # Try to locate tool using the code snippet
6295      for ac_prog in gdiff diff
6296do
6297  # Extract the first word of "$ac_prog", so it can be a program name with args.
6298set dummy $ac_prog; ac_word=$2
6299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6300$as_echo_n "checking for $ac_word... " >&6; }
6301if ${ac_cv_path_DIFF+:} false; then :
6302  $as_echo_n "(cached) " >&6
6303else
6304  case $DIFF in
6305  [\\/]* | ?:[\\/]*)
6306  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6307  ;;
6308  *)
6309  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6310for as_dir in $PATH
6311do
6312  IFS=$as_save_IFS
6313  test -z "$as_dir" && as_dir=.
6314    for ac_exec_ext in '' $ac_executable_extensions; do
6315  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6316    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6317    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6318    break 2
6319  fi
6320done
6321  done
6322IFS=$as_save_IFS
6323
6324  ;;
6325esac
6326fi
6327DIFF=$ac_cv_path_DIFF
6328if test -n "$DIFF"; then
6329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6330$as_echo "$DIFF" >&6; }
6331else
6332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6333$as_echo "no" >&6; }
6334fi
6335
6336
6337  test -n "$DIFF" && break
6338done
6339
6340    else
6341      # If it succeeded, then it was overridden by the user. We will use it
6342      # for the tool.
6343
6344      # First remove it from the list of overridden variables, so we can test
6345      # for unknown variables in the end.
6346      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6347
6348      # Check if the provided tool contains a complete path.
6349      tool_specified="$DIFF"
6350      tool_basename="${tool_specified##*/}"
6351      if test "x$tool_basename" = "x$tool_specified"; then
6352        # A command without a complete path is provided, search $PATH.
6353        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6354$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6355        # Extract the first word of "$tool_basename", so it can be a program name with args.
6356set dummy $tool_basename; ac_word=$2
6357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6358$as_echo_n "checking for $ac_word... " >&6; }
6359if ${ac_cv_path_DIFF+:} false; then :
6360  $as_echo_n "(cached) " >&6
6361else
6362  case $DIFF in
6363  [\\/]* | ?:[\\/]*)
6364  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6365  ;;
6366  *)
6367  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6368for as_dir in $PATH
6369do
6370  IFS=$as_save_IFS
6371  test -z "$as_dir" && as_dir=.
6372    for ac_exec_ext in '' $ac_executable_extensions; do
6373  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6374    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6375    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6376    break 2
6377  fi
6378done
6379  done
6380IFS=$as_save_IFS
6381
6382  ;;
6383esac
6384fi
6385DIFF=$ac_cv_path_DIFF
6386if test -n "$DIFF"; then
6387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6388$as_echo "$DIFF" >&6; }
6389else
6390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6391$as_echo "no" >&6; }
6392fi
6393
6394
6395        if test "x$DIFF" = x; then
6396          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6397        fi
6398      else
6399        # Otherwise we believe it is a complete path. Use it as it is.
6400        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6401$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6402        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6403$as_echo_n "checking for DIFF... " >&6; }
6404        if test ! -x "$tool_specified"; then
6405          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6406$as_echo "not found" >&6; }
6407          as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6408        fi
6409        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6410$as_echo "$tool_specified" >&6; }
6411      fi
6412    fi
6413  fi
6414
6415
6416
6417  if test "x$DIFF" = x; then
6418    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6419  fi
6420
6421
6422
6423
6424
6425  # Publish this variable in the help.
6426
6427
6428  if test "x$DIRNAME" = x; then
6429    # The variable is not set by user, try to locate tool using the code snippet
6430    for ac_prog in dirname
6431do
6432  # Extract the first word of "$ac_prog", so it can be a program name with args.
6433set dummy $ac_prog; ac_word=$2
6434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6435$as_echo_n "checking for $ac_word... " >&6; }
6436if ${ac_cv_path_DIRNAME+:} false; then :
6437  $as_echo_n "(cached) " >&6
6438else
6439  case $DIRNAME in
6440  [\\/]* | ?:[\\/]*)
6441  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6442  ;;
6443  *)
6444  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6445for as_dir in $PATH
6446do
6447  IFS=$as_save_IFS
6448  test -z "$as_dir" && as_dir=.
6449    for ac_exec_ext in '' $ac_executable_extensions; do
6450  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6451    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6452    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6453    break 2
6454  fi
6455done
6456  done
6457IFS=$as_save_IFS
6458
6459  ;;
6460esac
6461fi
6462DIRNAME=$ac_cv_path_DIRNAME
6463if test -n "$DIRNAME"; then
6464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6465$as_echo "$DIRNAME" >&6; }
6466else
6467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6468$as_echo "no" >&6; }
6469fi
6470
6471
6472  test -n "$DIRNAME" && break
6473done
6474
6475  else
6476    # The variable is set, but is it from the command line or the environment?
6477
6478    # Try to remove the string !DIRNAME! from our list.
6479    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6480    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6481      # If it failed, the variable was not from the command line. Ignore it,
6482      # but warn the user (except for BASH, which is always set by the calling BASH).
6483      if test "xDIRNAME" != xBASH; then
6484        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6485$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6486      fi
6487      # Try to locate tool using the code snippet
6488      for ac_prog in dirname
6489do
6490  # Extract the first word of "$ac_prog", so it can be a program name with args.
6491set dummy $ac_prog; ac_word=$2
6492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6493$as_echo_n "checking for $ac_word... " >&6; }
6494if ${ac_cv_path_DIRNAME+:} false; then :
6495  $as_echo_n "(cached) " >&6
6496else
6497  case $DIRNAME in
6498  [\\/]* | ?:[\\/]*)
6499  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6500  ;;
6501  *)
6502  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6503for as_dir in $PATH
6504do
6505  IFS=$as_save_IFS
6506  test -z "$as_dir" && as_dir=.
6507    for ac_exec_ext in '' $ac_executable_extensions; do
6508  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6509    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6510    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6511    break 2
6512  fi
6513done
6514  done
6515IFS=$as_save_IFS
6516
6517  ;;
6518esac
6519fi
6520DIRNAME=$ac_cv_path_DIRNAME
6521if test -n "$DIRNAME"; then
6522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6523$as_echo "$DIRNAME" >&6; }
6524else
6525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6526$as_echo "no" >&6; }
6527fi
6528
6529
6530  test -n "$DIRNAME" && break
6531done
6532
6533    else
6534      # If it succeeded, then it was overridden by the user. We will use it
6535      # for the tool.
6536
6537      # First remove it from the list of overridden variables, so we can test
6538      # for unknown variables in the end.
6539      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6540
6541      # Check if the provided tool contains a complete path.
6542      tool_specified="$DIRNAME"
6543      tool_basename="${tool_specified##*/}"
6544      if test "x$tool_basename" = "x$tool_specified"; then
6545        # A command without a complete path is provided, search $PATH.
6546        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
6547$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
6548        # Extract the first word of "$tool_basename", so it can be a program name with args.
6549set dummy $tool_basename; ac_word=$2
6550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6551$as_echo_n "checking for $ac_word... " >&6; }
6552if ${ac_cv_path_DIRNAME+:} false; then :
6553  $as_echo_n "(cached) " >&6
6554else
6555  case $DIRNAME in
6556  [\\/]* | ?:[\\/]*)
6557  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6558  ;;
6559  *)
6560  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6561for as_dir in $PATH
6562do
6563  IFS=$as_save_IFS
6564  test -z "$as_dir" && as_dir=.
6565    for ac_exec_ext in '' $ac_executable_extensions; do
6566  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6567    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6568    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6569    break 2
6570  fi
6571done
6572  done
6573IFS=$as_save_IFS
6574
6575  ;;
6576esac
6577fi
6578DIRNAME=$ac_cv_path_DIRNAME
6579if test -n "$DIRNAME"; then
6580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6581$as_echo "$DIRNAME" >&6; }
6582else
6583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6584$as_echo "no" >&6; }
6585fi
6586
6587
6588        if test "x$DIRNAME" = x; then
6589          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6590        fi
6591      else
6592        # Otherwise we believe it is a complete path. Use it as it is.
6593        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
6594$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
6595        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6596$as_echo_n "checking for DIRNAME... " >&6; }
6597        if test ! -x "$tool_specified"; then
6598          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6599$as_echo "not found" >&6; }
6600          as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
6601        fi
6602        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6603$as_echo "$tool_specified" >&6; }
6604      fi
6605    fi
6606  fi
6607
6608
6609
6610  if test "x$DIRNAME" = x; then
6611    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
6612  fi
6613
6614
6615
6616
6617
6618  # Publish this variable in the help.
6619
6620
6621  if test "x$ECHO" = x; then
6622    # The variable is not set by user, try to locate tool using the code snippet
6623    for ac_prog in echo
6624do
6625  # Extract the first word of "$ac_prog", so it can be a program name with args.
6626set dummy $ac_prog; ac_word=$2
6627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6628$as_echo_n "checking for $ac_word... " >&6; }
6629if ${ac_cv_path_ECHO+:} false; then :
6630  $as_echo_n "(cached) " >&6
6631else
6632  case $ECHO in
6633  [\\/]* | ?:[\\/]*)
6634  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6635  ;;
6636  *)
6637  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6638for as_dir in $PATH
6639do
6640  IFS=$as_save_IFS
6641  test -z "$as_dir" && as_dir=.
6642    for ac_exec_ext in '' $ac_executable_extensions; do
6643  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6644    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6645    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6646    break 2
6647  fi
6648done
6649  done
6650IFS=$as_save_IFS
6651
6652  ;;
6653esac
6654fi
6655ECHO=$ac_cv_path_ECHO
6656if test -n "$ECHO"; then
6657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6658$as_echo "$ECHO" >&6; }
6659else
6660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6661$as_echo "no" >&6; }
6662fi
6663
6664
6665  test -n "$ECHO" && break
6666done
6667
6668  else
6669    # The variable is set, but is it from the command line or the environment?
6670
6671    # Try to remove the string !ECHO! from our list.
6672    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
6673    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6674      # If it failed, the variable was not from the command line. Ignore it,
6675      # but warn the user (except for BASH, which is always set by the calling BASH).
6676      if test "xECHO" != xBASH; then
6677        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
6678$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
6679      fi
6680      # Try to locate tool using the code snippet
6681      for ac_prog in echo
6682do
6683  # Extract the first word of "$ac_prog", so it can be a program name with args.
6684set dummy $ac_prog; ac_word=$2
6685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6686$as_echo_n "checking for $ac_word... " >&6; }
6687if ${ac_cv_path_ECHO+:} false; then :
6688  $as_echo_n "(cached) " >&6
6689else
6690  case $ECHO in
6691  [\\/]* | ?:[\\/]*)
6692  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6693  ;;
6694  *)
6695  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6696for as_dir in $PATH
6697do
6698  IFS=$as_save_IFS
6699  test -z "$as_dir" && as_dir=.
6700    for ac_exec_ext in '' $ac_executable_extensions; do
6701  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6702    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6703    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6704    break 2
6705  fi
6706done
6707  done
6708IFS=$as_save_IFS
6709
6710  ;;
6711esac
6712fi
6713ECHO=$ac_cv_path_ECHO
6714if test -n "$ECHO"; then
6715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6716$as_echo "$ECHO" >&6; }
6717else
6718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6719$as_echo "no" >&6; }
6720fi
6721
6722
6723  test -n "$ECHO" && break
6724done
6725
6726    else
6727      # If it succeeded, then it was overridden by the user. We will use it
6728      # for the tool.
6729
6730      # First remove it from the list of overridden variables, so we can test
6731      # for unknown variables in the end.
6732      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6733
6734      # Check if the provided tool contains a complete path.
6735      tool_specified="$ECHO"
6736      tool_basename="${tool_specified##*/}"
6737      if test "x$tool_basename" = "x$tool_specified"; then
6738        # A command without a complete path is provided, search $PATH.
6739        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
6740$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
6741        # Extract the first word of "$tool_basename", so it can be a program name with args.
6742set dummy $tool_basename; ac_word=$2
6743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6744$as_echo_n "checking for $ac_word... " >&6; }
6745if ${ac_cv_path_ECHO+:} false; then :
6746  $as_echo_n "(cached) " >&6
6747else
6748  case $ECHO in
6749  [\\/]* | ?:[\\/]*)
6750  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6751  ;;
6752  *)
6753  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6754for as_dir in $PATH
6755do
6756  IFS=$as_save_IFS
6757  test -z "$as_dir" && as_dir=.
6758    for ac_exec_ext in '' $ac_executable_extensions; do
6759  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6760    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6761    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6762    break 2
6763  fi
6764done
6765  done
6766IFS=$as_save_IFS
6767
6768  ;;
6769esac
6770fi
6771ECHO=$ac_cv_path_ECHO
6772if test -n "$ECHO"; then
6773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6774$as_echo "$ECHO" >&6; }
6775else
6776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6777$as_echo "no" >&6; }
6778fi
6779
6780
6781        if test "x$ECHO" = x; then
6782          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6783        fi
6784      else
6785        # Otherwise we believe it is a complete path. Use it as it is.
6786        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
6787$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
6788        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
6789$as_echo_n "checking for ECHO... " >&6; }
6790        if test ! -x "$tool_specified"; then
6791          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6792$as_echo "not found" >&6; }
6793          as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
6794        fi
6795        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6796$as_echo "$tool_specified" >&6; }
6797      fi
6798    fi
6799  fi
6800
6801
6802
6803  if test "x$ECHO" = x; then
6804    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
6805  fi
6806
6807
6808
6809
6810
6811  # Publish this variable in the help.
6812
6813
6814  if test "x$EXPR" = x; then
6815    # The variable is not set by user, try to locate tool using the code snippet
6816    for ac_prog in expr
6817do
6818  # Extract the first word of "$ac_prog", so it can be a program name with args.
6819set dummy $ac_prog; ac_word=$2
6820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6821$as_echo_n "checking for $ac_word... " >&6; }
6822if ${ac_cv_path_EXPR+:} false; then :
6823  $as_echo_n "(cached) " >&6
6824else
6825  case $EXPR in
6826  [\\/]* | ?:[\\/]*)
6827  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6828  ;;
6829  *)
6830  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6831for as_dir in $PATH
6832do
6833  IFS=$as_save_IFS
6834  test -z "$as_dir" && as_dir=.
6835    for ac_exec_ext in '' $ac_executable_extensions; do
6836  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6837    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6838    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6839    break 2
6840  fi
6841done
6842  done
6843IFS=$as_save_IFS
6844
6845  ;;
6846esac
6847fi
6848EXPR=$ac_cv_path_EXPR
6849if test -n "$EXPR"; then
6850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6851$as_echo "$EXPR" >&6; }
6852else
6853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6854$as_echo "no" >&6; }
6855fi
6856
6857
6858  test -n "$EXPR" && break
6859done
6860
6861  else
6862    # The variable is set, but is it from the command line or the environment?
6863
6864    # Try to remove the string !EXPR! from our list.
6865    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
6866    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6867      # If it failed, the variable was not from the command line. Ignore it,
6868      # but warn the user (except for BASH, which is always set by the calling BASH).
6869      if test "xEXPR" != xBASH; then
6870        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
6871$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
6872      fi
6873      # Try to locate tool using the code snippet
6874      for ac_prog in expr
6875do
6876  # Extract the first word of "$ac_prog", so it can be a program name with args.
6877set dummy $ac_prog; ac_word=$2
6878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6879$as_echo_n "checking for $ac_word... " >&6; }
6880if ${ac_cv_path_EXPR+:} false; then :
6881  $as_echo_n "(cached) " >&6
6882else
6883  case $EXPR in
6884  [\\/]* | ?:[\\/]*)
6885  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6886  ;;
6887  *)
6888  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6889for as_dir in $PATH
6890do
6891  IFS=$as_save_IFS
6892  test -z "$as_dir" && as_dir=.
6893    for ac_exec_ext in '' $ac_executable_extensions; do
6894  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6895    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6896    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6897    break 2
6898  fi
6899done
6900  done
6901IFS=$as_save_IFS
6902
6903  ;;
6904esac
6905fi
6906EXPR=$ac_cv_path_EXPR
6907if test -n "$EXPR"; then
6908  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6909$as_echo "$EXPR" >&6; }
6910else
6911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6912$as_echo "no" >&6; }
6913fi
6914
6915
6916  test -n "$EXPR" && break
6917done
6918
6919    else
6920      # If it succeeded, then it was overridden by the user. We will use it
6921      # for the tool.
6922
6923      # First remove it from the list of overridden variables, so we can test
6924      # for unknown variables in the end.
6925      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6926
6927      # Check if the provided tool contains a complete path.
6928      tool_specified="$EXPR"
6929      tool_basename="${tool_specified##*/}"
6930      if test "x$tool_basename" = "x$tool_specified"; then
6931        # A command without a complete path is provided, search $PATH.
6932        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
6933$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
6934        # Extract the first word of "$tool_basename", so it can be a program name with args.
6935set dummy $tool_basename; ac_word=$2
6936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6937$as_echo_n "checking for $ac_word... " >&6; }
6938if ${ac_cv_path_EXPR+:} false; then :
6939  $as_echo_n "(cached) " >&6
6940else
6941  case $EXPR in
6942  [\\/]* | ?:[\\/]*)
6943  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6944  ;;
6945  *)
6946  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6947for as_dir in $PATH
6948do
6949  IFS=$as_save_IFS
6950  test -z "$as_dir" && as_dir=.
6951    for ac_exec_ext in '' $ac_executable_extensions; do
6952  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6953    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6954    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6955    break 2
6956  fi
6957done
6958  done
6959IFS=$as_save_IFS
6960
6961  ;;
6962esac
6963fi
6964EXPR=$ac_cv_path_EXPR
6965if test -n "$EXPR"; then
6966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6967$as_echo "$EXPR" >&6; }
6968else
6969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6970$as_echo "no" >&6; }
6971fi
6972
6973
6974        if test "x$EXPR" = x; then
6975          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6976        fi
6977      else
6978        # Otherwise we believe it is a complete path. Use it as it is.
6979        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
6980$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
6981        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
6982$as_echo_n "checking for EXPR... " >&6; }
6983        if test ! -x "$tool_specified"; then
6984          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6985$as_echo "not found" >&6; }
6986          as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
6987        fi
6988        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6989$as_echo "$tool_specified" >&6; }
6990      fi
6991    fi
6992  fi
6993
6994
6995
6996  if test "x$EXPR" = x; then
6997    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
6998  fi
6999
7000
7001
7002
7003
7004  # Publish this variable in the help.
7005
7006
7007  if test "x$FILE" = x; then
7008    # The variable is not set by user, try to locate tool using the code snippet
7009    for ac_prog in file
7010do
7011  # Extract the first word of "$ac_prog", so it can be a program name with args.
7012set dummy $ac_prog; ac_word=$2
7013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7014$as_echo_n "checking for $ac_word... " >&6; }
7015if ${ac_cv_path_FILE+:} false; then :
7016  $as_echo_n "(cached) " >&6
7017else
7018  case $FILE in
7019  [\\/]* | ?:[\\/]*)
7020  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7021  ;;
7022  *)
7023  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7024for as_dir in $PATH
7025do
7026  IFS=$as_save_IFS
7027  test -z "$as_dir" && as_dir=.
7028    for ac_exec_ext in '' $ac_executable_extensions; do
7029  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7030    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7031    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7032    break 2
7033  fi
7034done
7035  done
7036IFS=$as_save_IFS
7037
7038  ;;
7039esac
7040fi
7041FILE=$ac_cv_path_FILE
7042if test -n "$FILE"; then
7043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7044$as_echo "$FILE" >&6; }
7045else
7046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7047$as_echo "no" >&6; }
7048fi
7049
7050
7051  test -n "$FILE" && break
7052done
7053
7054  else
7055    # The variable is set, but is it from the command line or the environment?
7056
7057    # Try to remove the string !FILE! from our list.
7058    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7059    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7060      # If it failed, the variable was not from the command line. Ignore it,
7061      # but warn the user (except for BASH, which is always set by the calling BASH).
7062      if test "xFILE" != xBASH; then
7063        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7064$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7065      fi
7066      # Try to locate tool using the code snippet
7067      for ac_prog in file
7068do
7069  # Extract the first word of "$ac_prog", so it can be a program name with args.
7070set dummy $ac_prog; ac_word=$2
7071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7072$as_echo_n "checking for $ac_word... " >&6; }
7073if ${ac_cv_path_FILE+:} false; then :
7074  $as_echo_n "(cached) " >&6
7075else
7076  case $FILE in
7077  [\\/]* | ?:[\\/]*)
7078  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7079  ;;
7080  *)
7081  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7082for as_dir in $PATH
7083do
7084  IFS=$as_save_IFS
7085  test -z "$as_dir" && as_dir=.
7086    for ac_exec_ext in '' $ac_executable_extensions; do
7087  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7088    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7089    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7090    break 2
7091  fi
7092done
7093  done
7094IFS=$as_save_IFS
7095
7096  ;;
7097esac
7098fi
7099FILE=$ac_cv_path_FILE
7100if test -n "$FILE"; then
7101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7102$as_echo "$FILE" >&6; }
7103else
7104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7105$as_echo "no" >&6; }
7106fi
7107
7108
7109  test -n "$FILE" && break
7110done
7111
7112    else
7113      # If it succeeded, then it was overridden by the user. We will use it
7114      # for the tool.
7115
7116      # First remove it from the list of overridden variables, so we can test
7117      # for unknown variables in the end.
7118      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7119
7120      # Check if the provided tool contains a complete path.
7121      tool_specified="$FILE"
7122      tool_basename="${tool_specified##*/}"
7123      if test "x$tool_basename" = "x$tool_specified"; then
7124        # A command without a complete path is provided, search $PATH.
7125        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7126$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7127        # Extract the first word of "$tool_basename", so it can be a program name with args.
7128set dummy $tool_basename; ac_word=$2
7129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7130$as_echo_n "checking for $ac_word... " >&6; }
7131if ${ac_cv_path_FILE+:} false; then :
7132  $as_echo_n "(cached) " >&6
7133else
7134  case $FILE in
7135  [\\/]* | ?:[\\/]*)
7136  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7137  ;;
7138  *)
7139  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7140for as_dir in $PATH
7141do
7142  IFS=$as_save_IFS
7143  test -z "$as_dir" && as_dir=.
7144    for ac_exec_ext in '' $ac_executable_extensions; do
7145  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7146    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7147    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7148    break 2
7149  fi
7150done
7151  done
7152IFS=$as_save_IFS
7153
7154  ;;
7155esac
7156fi
7157FILE=$ac_cv_path_FILE
7158if test -n "$FILE"; then
7159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7160$as_echo "$FILE" >&6; }
7161else
7162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7163$as_echo "no" >&6; }
7164fi
7165
7166
7167        if test "x$FILE" = x; then
7168          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7169        fi
7170      else
7171        # Otherwise we believe it is a complete path. Use it as it is.
7172        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7173$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7174        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7175$as_echo_n "checking for FILE... " >&6; }
7176        if test ! -x "$tool_specified"; then
7177          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7178$as_echo "not found" >&6; }
7179          as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7180        fi
7181        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7182$as_echo "$tool_specified" >&6; }
7183      fi
7184    fi
7185  fi
7186
7187
7188
7189  if test "x$FILE" = x; then
7190    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7191  fi
7192
7193
7194
7195
7196
7197  # Publish this variable in the help.
7198
7199
7200  if test "x$FIND" = x; then
7201    # The variable is not set by user, try to locate tool using the code snippet
7202    for ac_prog in find
7203do
7204  # Extract the first word of "$ac_prog", so it can be a program name with args.
7205set dummy $ac_prog; ac_word=$2
7206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7207$as_echo_n "checking for $ac_word... " >&6; }
7208if ${ac_cv_path_FIND+:} false; then :
7209  $as_echo_n "(cached) " >&6
7210else
7211  case $FIND in
7212  [\\/]* | ?:[\\/]*)
7213  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7214  ;;
7215  *)
7216  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7217for as_dir in $PATH
7218do
7219  IFS=$as_save_IFS
7220  test -z "$as_dir" && as_dir=.
7221    for ac_exec_ext in '' $ac_executable_extensions; do
7222  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7223    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7224    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7225    break 2
7226  fi
7227done
7228  done
7229IFS=$as_save_IFS
7230
7231  ;;
7232esac
7233fi
7234FIND=$ac_cv_path_FIND
7235if test -n "$FIND"; then
7236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7237$as_echo "$FIND" >&6; }
7238else
7239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7240$as_echo "no" >&6; }
7241fi
7242
7243
7244  test -n "$FIND" && break
7245done
7246
7247  else
7248    # The variable is set, but is it from the command line or the environment?
7249
7250    # Try to remove the string !FIND! from our list.
7251    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7252    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7253      # If it failed, the variable was not from the command line. Ignore it,
7254      # but warn the user (except for BASH, which is always set by the calling BASH).
7255      if test "xFIND" != xBASH; then
7256        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7257$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7258      fi
7259      # Try to locate tool using the code snippet
7260      for ac_prog in find
7261do
7262  # Extract the first word of "$ac_prog", so it can be a program name with args.
7263set dummy $ac_prog; ac_word=$2
7264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7265$as_echo_n "checking for $ac_word... " >&6; }
7266if ${ac_cv_path_FIND+:} false; then :
7267  $as_echo_n "(cached) " >&6
7268else
7269  case $FIND in
7270  [\\/]* | ?:[\\/]*)
7271  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7272  ;;
7273  *)
7274  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7275for as_dir in $PATH
7276do
7277  IFS=$as_save_IFS
7278  test -z "$as_dir" && as_dir=.
7279    for ac_exec_ext in '' $ac_executable_extensions; do
7280  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7281    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7282    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7283    break 2
7284  fi
7285done
7286  done
7287IFS=$as_save_IFS
7288
7289  ;;
7290esac
7291fi
7292FIND=$ac_cv_path_FIND
7293if test -n "$FIND"; then
7294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7295$as_echo "$FIND" >&6; }
7296else
7297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7298$as_echo "no" >&6; }
7299fi
7300
7301
7302  test -n "$FIND" && break
7303done
7304
7305    else
7306      # If it succeeded, then it was overridden by the user. We will use it
7307      # for the tool.
7308
7309      # First remove it from the list of overridden variables, so we can test
7310      # for unknown variables in the end.
7311      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7312
7313      # Check if the provided tool contains a complete path.
7314      tool_specified="$FIND"
7315      tool_basename="${tool_specified##*/}"
7316      if test "x$tool_basename" = "x$tool_specified"; then
7317        # A command without a complete path is provided, search $PATH.
7318        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7319$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7320        # Extract the first word of "$tool_basename", so it can be a program name with args.
7321set dummy $tool_basename; ac_word=$2
7322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7323$as_echo_n "checking for $ac_word... " >&6; }
7324if ${ac_cv_path_FIND+:} false; then :
7325  $as_echo_n "(cached) " >&6
7326else
7327  case $FIND in
7328  [\\/]* | ?:[\\/]*)
7329  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7330  ;;
7331  *)
7332  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7333for as_dir in $PATH
7334do
7335  IFS=$as_save_IFS
7336  test -z "$as_dir" && as_dir=.
7337    for ac_exec_ext in '' $ac_executable_extensions; do
7338  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7339    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7340    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7341    break 2
7342  fi
7343done
7344  done
7345IFS=$as_save_IFS
7346
7347  ;;
7348esac
7349fi
7350FIND=$ac_cv_path_FIND
7351if test -n "$FIND"; then
7352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7353$as_echo "$FIND" >&6; }
7354else
7355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7356$as_echo "no" >&6; }
7357fi
7358
7359
7360        if test "x$FIND" = x; then
7361          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7362        fi
7363      else
7364        # Otherwise we believe it is a complete path. Use it as it is.
7365        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7366$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7367        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7368$as_echo_n "checking for FIND... " >&6; }
7369        if test ! -x "$tool_specified"; then
7370          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7371$as_echo "not found" >&6; }
7372          as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7373        fi
7374        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7375$as_echo "$tool_specified" >&6; }
7376      fi
7377    fi
7378  fi
7379
7380
7381
7382  if test "x$FIND" = x; then
7383    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7384  fi
7385
7386
7387
7388
7389
7390  # Publish this variable in the help.
7391
7392
7393  if test "x$HEAD" = x; then
7394    # The variable is not set by user, try to locate tool using the code snippet
7395    for ac_prog in head
7396do
7397  # Extract the first word of "$ac_prog", so it can be a program name with args.
7398set dummy $ac_prog; ac_word=$2
7399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7400$as_echo_n "checking for $ac_word... " >&6; }
7401if ${ac_cv_path_HEAD+:} false; then :
7402  $as_echo_n "(cached) " >&6
7403else
7404  case $HEAD in
7405  [\\/]* | ?:[\\/]*)
7406  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7407  ;;
7408  *)
7409  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7410for as_dir in $PATH
7411do
7412  IFS=$as_save_IFS
7413  test -z "$as_dir" && as_dir=.
7414    for ac_exec_ext in '' $ac_executable_extensions; do
7415  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7416    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7417    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7418    break 2
7419  fi
7420done
7421  done
7422IFS=$as_save_IFS
7423
7424  ;;
7425esac
7426fi
7427HEAD=$ac_cv_path_HEAD
7428if test -n "$HEAD"; then
7429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7430$as_echo "$HEAD" >&6; }
7431else
7432  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7433$as_echo "no" >&6; }
7434fi
7435
7436
7437  test -n "$HEAD" && break
7438done
7439
7440  else
7441    # The variable is set, but is it from the command line or the environment?
7442
7443    # Try to remove the string !HEAD! from our list.
7444    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
7445    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7446      # If it failed, the variable was not from the command line. Ignore it,
7447      # but warn the user (except for BASH, which is always set by the calling BASH).
7448      if test "xHEAD" != xBASH; then
7449        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
7450$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
7451      fi
7452      # Try to locate tool using the code snippet
7453      for ac_prog in head
7454do
7455  # Extract the first word of "$ac_prog", so it can be a program name with args.
7456set dummy $ac_prog; ac_word=$2
7457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7458$as_echo_n "checking for $ac_word... " >&6; }
7459if ${ac_cv_path_HEAD+:} false; then :
7460  $as_echo_n "(cached) " >&6
7461else
7462  case $HEAD in
7463  [\\/]* | ?:[\\/]*)
7464  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7465  ;;
7466  *)
7467  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7468for as_dir in $PATH
7469do
7470  IFS=$as_save_IFS
7471  test -z "$as_dir" && as_dir=.
7472    for ac_exec_ext in '' $ac_executable_extensions; do
7473  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7474    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7475    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7476    break 2
7477  fi
7478done
7479  done
7480IFS=$as_save_IFS
7481
7482  ;;
7483esac
7484fi
7485HEAD=$ac_cv_path_HEAD
7486if test -n "$HEAD"; then
7487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7488$as_echo "$HEAD" >&6; }
7489else
7490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7491$as_echo "no" >&6; }
7492fi
7493
7494
7495  test -n "$HEAD" && break
7496done
7497
7498    else
7499      # If it succeeded, then it was overridden by the user. We will use it
7500      # for the tool.
7501
7502      # First remove it from the list of overridden variables, so we can test
7503      # for unknown variables in the end.
7504      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7505
7506      # Check if the provided tool contains a complete path.
7507      tool_specified="$HEAD"
7508      tool_basename="${tool_specified##*/}"
7509      if test "x$tool_basename" = "x$tool_specified"; then
7510        # A command without a complete path is provided, search $PATH.
7511        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
7512$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
7513        # Extract the first word of "$tool_basename", so it can be a program name with args.
7514set dummy $tool_basename; ac_word=$2
7515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7516$as_echo_n "checking for $ac_word... " >&6; }
7517if ${ac_cv_path_HEAD+:} false; then :
7518  $as_echo_n "(cached) " >&6
7519else
7520  case $HEAD in
7521  [\\/]* | ?:[\\/]*)
7522  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7523  ;;
7524  *)
7525  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7526for as_dir in $PATH
7527do
7528  IFS=$as_save_IFS
7529  test -z "$as_dir" && as_dir=.
7530    for ac_exec_ext in '' $ac_executable_extensions; do
7531  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7532    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7533    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7534    break 2
7535  fi
7536done
7537  done
7538IFS=$as_save_IFS
7539
7540  ;;
7541esac
7542fi
7543HEAD=$ac_cv_path_HEAD
7544if test -n "$HEAD"; then
7545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7546$as_echo "$HEAD" >&6; }
7547else
7548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7549$as_echo "no" >&6; }
7550fi
7551
7552
7553        if test "x$HEAD" = x; then
7554          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7555        fi
7556      else
7557        # Otherwise we believe it is a complete path. Use it as it is.
7558        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
7559$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
7560        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7561$as_echo_n "checking for HEAD... " >&6; }
7562        if test ! -x "$tool_specified"; then
7563          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7564$as_echo "not found" >&6; }
7565          as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
7566        fi
7567        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7568$as_echo "$tool_specified" >&6; }
7569      fi
7570    fi
7571  fi
7572
7573
7574
7575  if test "x$HEAD" = x; then
7576    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
7577  fi
7578
7579
7580
7581
7582
7583  # Publish this variable in the help.
7584
7585
7586  if test "x$LN" = x; then
7587    # The variable is not set by user, try to locate tool using the code snippet
7588    for ac_prog in ln
7589do
7590  # Extract the first word of "$ac_prog", so it can be a program name with args.
7591set dummy $ac_prog; ac_word=$2
7592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7593$as_echo_n "checking for $ac_word... " >&6; }
7594if ${ac_cv_path_LN+:} false; then :
7595  $as_echo_n "(cached) " >&6
7596else
7597  case $LN in
7598  [\\/]* | ?:[\\/]*)
7599  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7600  ;;
7601  *)
7602  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7603for as_dir in $PATH
7604do
7605  IFS=$as_save_IFS
7606  test -z "$as_dir" && as_dir=.
7607    for ac_exec_ext in '' $ac_executable_extensions; do
7608  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7609    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7610    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7611    break 2
7612  fi
7613done
7614  done
7615IFS=$as_save_IFS
7616
7617  ;;
7618esac
7619fi
7620LN=$ac_cv_path_LN
7621if test -n "$LN"; then
7622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7623$as_echo "$LN" >&6; }
7624else
7625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7626$as_echo "no" >&6; }
7627fi
7628
7629
7630  test -n "$LN" && break
7631done
7632
7633  else
7634    # The variable is set, but is it from the command line or the environment?
7635
7636    # Try to remove the string !LN! from our list.
7637    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
7638    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7639      # If it failed, the variable was not from the command line. Ignore it,
7640      # but warn the user (except for BASH, which is always set by the calling BASH).
7641      if test "xLN" != xBASH; then
7642        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
7643$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
7644      fi
7645      # Try to locate tool using the code snippet
7646      for ac_prog in ln
7647do
7648  # Extract the first word of "$ac_prog", so it can be a program name with args.
7649set dummy $ac_prog; ac_word=$2
7650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7651$as_echo_n "checking for $ac_word... " >&6; }
7652if ${ac_cv_path_LN+:} false; then :
7653  $as_echo_n "(cached) " >&6
7654else
7655  case $LN in
7656  [\\/]* | ?:[\\/]*)
7657  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7658  ;;
7659  *)
7660  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7661for as_dir in $PATH
7662do
7663  IFS=$as_save_IFS
7664  test -z "$as_dir" && as_dir=.
7665    for ac_exec_ext in '' $ac_executable_extensions; do
7666  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7667    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7668    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7669    break 2
7670  fi
7671done
7672  done
7673IFS=$as_save_IFS
7674
7675  ;;
7676esac
7677fi
7678LN=$ac_cv_path_LN
7679if test -n "$LN"; then
7680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7681$as_echo "$LN" >&6; }
7682else
7683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7684$as_echo "no" >&6; }
7685fi
7686
7687
7688  test -n "$LN" && break
7689done
7690
7691    else
7692      # If it succeeded, then it was overridden by the user. We will use it
7693      # for the tool.
7694
7695      # First remove it from the list of overridden variables, so we can test
7696      # for unknown variables in the end.
7697      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7698
7699      # Check if the provided tool contains a complete path.
7700      tool_specified="$LN"
7701      tool_basename="${tool_specified##*/}"
7702      if test "x$tool_basename" = "x$tool_specified"; then
7703        # A command without a complete path is provided, search $PATH.
7704        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
7705$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
7706        # Extract the first word of "$tool_basename", so it can be a program name with args.
7707set dummy $tool_basename; ac_word=$2
7708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7709$as_echo_n "checking for $ac_word... " >&6; }
7710if ${ac_cv_path_LN+:} false; then :
7711  $as_echo_n "(cached) " >&6
7712else
7713  case $LN in
7714  [\\/]* | ?:[\\/]*)
7715  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7716  ;;
7717  *)
7718  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7719for as_dir in $PATH
7720do
7721  IFS=$as_save_IFS
7722  test -z "$as_dir" && as_dir=.
7723    for ac_exec_ext in '' $ac_executable_extensions; do
7724  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7725    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7726    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7727    break 2
7728  fi
7729done
7730  done
7731IFS=$as_save_IFS
7732
7733  ;;
7734esac
7735fi
7736LN=$ac_cv_path_LN
7737if test -n "$LN"; then
7738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7739$as_echo "$LN" >&6; }
7740else
7741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7742$as_echo "no" >&6; }
7743fi
7744
7745
7746        if test "x$LN" = x; then
7747          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7748        fi
7749      else
7750        # Otherwise we believe it is a complete path. Use it as it is.
7751        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
7752$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
7753        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
7754$as_echo_n "checking for LN... " >&6; }
7755        if test ! -x "$tool_specified"; then
7756          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7757$as_echo "not found" >&6; }
7758          as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
7759        fi
7760        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7761$as_echo "$tool_specified" >&6; }
7762      fi
7763    fi
7764  fi
7765
7766
7767
7768  if test "x$LN" = x; then
7769    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
7770  fi
7771
7772
7773
7774
7775
7776  # Publish this variable in the help.
7777
7778
7779  if test "x$LS" = x; then
7780    # The variable is not set by user, try to locate tool using the code snippet
7781    for ac_prog in ls
7782do
7783  # Extract the first word of "$ac_prog", so it can be a program name with args.
7784set dummy $ac_prog; ac_word=$2
7785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7786$as_echo_n "checking for $ac_word... " >&6; }
7787if ${ac_cv_path_LS+:} false; then :
7788  $as_echo_n "(cached) " >&6
7789else
7790  case $LS in
7791  [\\/]* | ?:[\\/]*)
7792  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7793  ;;
7794  *)
7795  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7796for as_dir in $PATH
7797do
7798  IFS=$as_save_IFS
7799  test -z "$as_dir" && as_dir=.
7800    for ac_exec_ext in '' $ac_executable_extensions; do
7801  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7802    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7803    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7804    break 2
7805  fi
7806done
7807  done
7808IFS=$as_save_IFS
7809
7810  ;;
7811esac
7812fi
7813LS=$ac_cv_path_LS
7814if test -n "$LS"; then
7815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7816$as_echo "$LS" >&6; }
7817else
7818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7819$as_echo "no" >&6; }
7820fi
7821
7822
7823  test -n "$LS" && break
7824done
7825
7826  else
7827    # The variable is set, but is it from the command line or the environment?
7828
7829    # Try to remove the string !LS! from our list.
7830    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
7831    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7832      # If it failed, the variable was not from the command line. Ignore it,
7833      # but warn the user (except for BASH, which is always set by the calling BASH).
7834      if test "xLS" != xBASH; then
7835        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
7836$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
7837      fi
7838      # Try to locate tool using the code snippet
7839      for ac_prog in ls
7840do
7841  # Extract the first word of "$ac_prog", so it can be a program name with args.
7842set dummy $ac_prog; ac_word=$2
7843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7844$as_echo_n "checking for $ac_word... " >&6; }
7845if ${ac_cv_path_LS+:} false; then :
7846  $as_echo_n "(cached) " >&6
7847else
7848  case $LS in
7849  [\\/]* | ?:[\\/]*)
7850  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7851  ;;
7852  *)
7853  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7854for as_dir in $PATH
7855do
7856  IFS=$as_save_IFS
7857  test -z "$as_dir" && as_dir=.
7858    for ac_exec_ext in '' $ac_executable_extensions; do
7859  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7860    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7861    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7862    break 2
7863  fi
7864done
7865  done
7866IFS=$as_save_IFS
7867
7868  ;;
7869esac
7870fi
7871LS=$ac_cv_path_LS
7872if test -n "$LS"; then
7873  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7874$as_echo "$LS" >&6; }
7875else
7876  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7877$as_echo "no" >&6; }
7878fi
7879
7880
7881  test -n "$LS" && break
7882done
7883
7884    else
7885      # If it succeeded, then it was overridden by the user. We will use it
7886      # for the tool.
7887
7888      # First remove it from the list of overridden variables, so we can test
7889      # for unknown variables in the end.
7890      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7891
7892      # Check if the provided tool contains a complete path.
7893      tool_specified="$LS"
7894      tool_basename="${tool_specified##*/}"
7895      if test "x$tool_basename" = "x$tool_specified"; then
7896        # A command without a complete path is provided, search $PATH.
7897        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
7898$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
7899        # Extract the first word of "$tool_basename", so it can be a program name with args.
7900set dummy $tool_basename; ac_word=$2
7901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7902$as_echo_n "checking for $ac_word... " >&6; }
7903if ${ac_cv_path_LS+:} false; then :
7904  $as_echo_n "(cached) " >&6
7905else
7906  case $LS in
7907  [\\/]* | ?:[\\/]*)
7908  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7909  ;;
7910  *)
7911  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7912for as_dir in $PATH
7913do
7914  IFS=$as_save_IFS
7915  test -z "$as_dir" && as_dir=.
7916    for ac_exec_ext in '' $ac_executable_extensions; do
7917  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7918    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7919    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7920    break 2
7921  fi
7922done
7923  done
7924IFS=$as_save_IFS
7925
7926  ;;
7927esac
7928fi
7929LS=$ac_cv_path_LS
7930if test -n "$LS"; then
7931  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7932$as_echo "$LS" >&6; }
7933else
7934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7935$as_echo "no" >&6; }
7936fi
7937
7938
7939        if test "x$LS" = x; then
7940          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7941        fi
7942      else
7943        # Otherwise we believe it is a complete path. Use it as it is.
7944        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
7945$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
7946        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
7947$as_echo_n "checking for LS... " >&6; }
7948        if test ! -x "$tool_specified"; then
7949          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7950$as_echo "not found" >&6; }
7951          as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
7952        fi
7953        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7954$as_echo "$tool_specified" >&6; }
7955      fi
7956    fi
7957  fi
7958
7959
7960
7961  if test "x$LS" = x; then
7962    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
7963  fi
7964
7965
7966
7967
7968
7969  # Publish this variable in the help.
7970
7971
7972  if test "x$MKDIR" = x; then
7973    # The variable is not set by user, try to locate tool using the code snippet
7974    for ac_prog in mkdir
7975do
7976  # Extract the first word of "$ac_prog", so it can be a program name with args.
7977set dummy $ac_prog; ac_word=$2
7978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7979$as_echo_n "checking for $ac_word... " >&6; }
7980if ${ac_cv_path_MKDIR+:} false; then :
7981  $as_echo_n "(cached) " >&6
7982else
7983  case $MKDIR in
7984  [\\/]* | ?:[\\/]*)
7985  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7986  ;;
7987  *)
7988  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7989for as_dir in $PATH
7990do
7991  IFS=$as_save_IFS
7992  test -z "$as_dir" && as_dir=.
7993    for ac_exec_ext in '' $ac_executable_extensions; do
7994  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7995    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7996    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7997    break 2
7998  fi
7999done
8000  done
8001IFS=$as_save_IFS
8002
8003  ;;
8004esac
8005fi
8006MKDIR=$ac_cv_path_MKDIR
8007if test -n "$MKDIR"; then
8008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8009$as_echo "$MKDIR" >&6; }
8010else
8011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8012$as_echo "no" >&6; }
8013fi
8014
8015
8016  test -n "$MKDIR" && break
8017done
8018
8019  else
8020    # The variable is set, but is it from the command line or the environment?
8021
8022    # Try to remove the string !MKDIR! from our list.
8023    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
8024    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8025      # If it failed, the variable was not from the command line. Ignore it,
8026      # but warn the user (except for BASH, which is always set by the calling BASH).
8027      if test "xMKDIR" != xBASH; then
8028        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
8029$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
8030      fi
8031      # Try to locate tool using the code snippet
8032      for ac_prog in mkdir
8033do
8034  # Extract the first word of "$ac_prog", so it can be a program name with args.
8035set dummy $ac_prog; ac_word=$2
8036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8037$as_echo_n "checking for $ac_word... " >&6; }
8038if ${ac_cv_path_MKDIR+:} false; then :
8039  $as_echo_n "(cached) " >&6
8040else
8041  case $MKDIR in
8042  [\\/]* | ?:[\\/]*)
8043  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8044  ;;
8045  *)
8046  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8047for as_dir in $PATH
8048do
8049  IFS=$as_save_IFS
8050  test -z "$as_dir" && as_dir=.
8051    for ac_exec_ext in '' $ac_executable_extensions; do
8052  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8053    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8054    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8055    break 2
8056  fi
8057done
8058  done
8059IFS=$as_save_IFS
8060
8061  ;;
8062esac
8063fi
8064MKDIR=$ac_cv_path_MKDIR
8065if test -n "$MKDIR"; then
8066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8067$as_echo "$MKDIR" >&6; }
8068else
8069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8070$as_echo "no" >&6; }
8071fi
8072
8073
8074  test -n "$MKDIR" && break
8075done
8076
8077    else
8078      # If it succeeded, then it was overridden by the user. We will use it
8079      # for the tool.
8080
8081      # First remove it from the list of overridden variables, so we can test
8082      # for unknown variables in the end.
8083      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8084
8085      # Check if the provided tool contains a complete path.
8086      tool_specified="$MKDIR"
8087      tool_basename="${tool_specified##*/}"
8088      if test "x$tool_basename" = "x$tool_specified"; then
8089        # A command without a complete path is provided, search $PATH.
8090        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8091$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8092        # Extract the first word of "$tool_basename", so it can be a program name with args.
8093set dummy $tool_basename; ac_word=$2
8094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8095$as_echo_n "checking for $ac_word... " >&6; }
8096if ${ac_cv_path_MKDIR+:} false; then :
8097  $as_echo_n "(cached) " >&6
8098else
8099  case $MKDIR in
8100  [\\/]* | ?:[\\/]*)
8101  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8102  ;;
8103  *)
8104  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8105for as_dir in $PATH
8106do
8107  IFS=$as_save_IFS
8108  test -z "$as_dir" && as_dir=.
8109    for ac_exec_ext in '' $ac_executable_extensions; do
8110  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8111    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8112    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8113    break 2
8114  fi
8115done
8116  done
8117IFS=$as_save_IFS
8118
8119  ;;
8120esac
8121fi
8122MKDIR=$ac_cv_path_MKDIR
8123if test -n "$MKDIR"; then
8124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8125$as_echo "$MKDIR" >&6; }
8126else
8127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8128$as_echo "no" >&6; }
8129fi
8130
8131
8132        if test "x$MKDIR" = x; then
8133          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8134        fi
8135      else
8136        # Otherwise we believe it is a complete path. Use it as it is.
8137        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8138$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8139        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8140$as_echo_n "checking for MKDIR... " >&6; }
8141        if test ! -x "$tool_specified"; then
8142          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8143$as_echo "not found" >&6; }
8144          as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8145        fi
8146        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8147$as_echo "$tool_specified" >&6; }
8148      fi
8149    fi
8150  fi
8151
8152
8153
8154  if test "x$MKDIR" = x; then
8155    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8156  fi
8157
8158
8159
8160
8161
8162  # Publish this variable in the help.
8163
8164
8165  if test "x$MKTEMP" = x; then
8166    # The variable is not set by user, try to locate tool using the code snippet
8167    for ac_prog in mktemp
8168do
8169  # Extract the first word of "$ac_prog", so it can be a program name with args.
8170set dummy $ac_prog; ac_word=$2
8171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8172$as_echo_n "checking for $ac_word... " >&6; }
8173if ${ac_cv_path_MKTEMP+:} false; then :
8174  $as_echo_n "(cached) " >&6
8175else
8176  case $MKTEMP in
8177  [\\/]* | ?:[\\/]*)
8178  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8179  ;;
8180  *)
8181  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8182for as_dir in $PATH
8183do
8184  IFS=$as_save_IFS
8185  test -z "$as_dir" && as_dir=.
8186    for ac_exec_ext in '' $ac_executable_extensions; do
8187  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8188    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8189    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8190    break 2
8191  fi
8192done
8193  done
8194IFS=$as_save_IFS
8195
8196  ;;
8197esac
8198fi
8199MKTEMP=$ac_cv_path_MKTEMP
8200if test -n "$MKTEMP"; then
8201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8202$as_echo "$MKTEMP" >&6; }
8203else
8204  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8205$as_echo "no" >&6; }
8206fi
8207
8208
8209  test -n "$MKTEMP" && break
8210done
8211
8212  else
8213    # The variable is set, but is it from the command line or the environment?
8214
8215    # Try to remove the string !MKTEMP! from our list.
8216    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8217    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8218      # If it failed, the variable was not from the command line. Ignore it,
8219      # but warn the user (except for BASH, which is always set by the calling BASH).
8220      if test "xMKTEMP" != xBASH; then
8221        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8222$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8223      fi
8224      # Try to locate tool using the code snippet
8225      for ac_prog in mktemp
8226do
8227  # Extract the first word of "$ac_prog", so it can be a program name with args.
8228set dummy $ac_prog; ac_word=$2
8229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8230$as_echo_n "checking for $ac_word... " >&6; }
8231if ${ac_cv_path_MKTEMP+:} false; then :
8232  $as_echo_n "(cached) " >&6
8233else
8234  case $MKTEMP in
8235  [\\/]* | ?:[\\/]*)
8236  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8237  ;;
8238  *)
8239  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8240for as_dir in $PATH
8241do
8242  IFS=$as_save_IFS
8243  test -z "$as_dir" && as_dir=.
8244    for ac_exec_ext in '' $ac_executable_extensions; do
8245  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8246    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8247    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8248    break 2
8249  fi
8250done
8251  done
8252IFS=$as_save_IFS
8253
8254  ;;
8255esac
8256fi
8257MKTEMP=$ac_cv_path_MKTEMP
8258if test -n "$MKTEMP"; then
8259  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8260$as_echo "$MKTEMP" >&6; }
8261else
8262  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8263$as_echo "no" >&6; }
8264fi
8265
8266
8267  test -n "$MKTEMP" && break
8268done
8269
8270    else
8271      # If it succeeded, then it was overridden by the user. We will use it
8272      # for the tool.
8273
8274      # First remove it from the list of overridden variables, so we can test
8275      # for unknown variables in the end.
8276      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8277
8278      # Check if the provided tool contains a complete path.
8279      tool_specified="$MKTEMP"
8280      tool_basename="${tool_specified##*/}"
8281      if test "x$tool_basename" = "x$tool_specified"; then
8282        # A command without a complete path is provided, search $PATH.
8283        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8284$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8285        # Extract the first word of "$tool_basename", so it can be a program name with args.
8286set dummy $tool_basename; ac_word=$2
8287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8288$as_echo_n "checking for $ac_word... " >&6; }
8289if ${ac_cv_path_MKTEMP+:} false; then :
8290  $as_echo_n "(cached) " >&6
8291else
8292  case $MKTEMP in
8293  [\\/]* | ?:[\\/]*)
8294  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8295  ;;
8296  *)
8297  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8298for as_dir in $PATH
8299do
8300  IFS=$as_save_IFS
8301  test -z "$as_dir" && as_dir=.
8302    for ac_exec_ext in '' $ac_executable_extensions; do
8303  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8304    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8305    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8306    break 2
8307  fi
8308done
8309  done
8310IFS=$as_save_IFS
8311
8312  ;;
8313esac
8314fi
8315MKTEMP=$ac_cv_path_MKTEMP
8316if test -n "$MKTEMP"; then
8317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8318$as_echo "$MKTEMP" >&6; }
8319else
8320  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8321$as_echo "no" >&6; }
8322fi
8323
8324
8325        if test "x$MKTEMP" = x; then
8326          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8327        fi
8328      else
8329        # Otherwise we believe it is a complete path. Use it as it is.
8330        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8331$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8332        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8333$as_echo_n "checking for MKTEMP... " >&6; }
8334        if test ! -x "$tool_specified"; then
8335          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8336$as_echo "not found" >&6; }
8337          as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8338        fi
8339        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8340$as_echo "$tool_specified" >&6; }
8341      fi
8342    fi
8343  fi
8344
8345
8346
8347  if test "x$MKTEMP" = x; then
8348    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8349  fi
8350
8351
8352
8353
8354
8355  # Publish this variable in the help.
8356
8357
8358  if test "x$MV" = x; then
8359    # The variable is not set by user, try to locate tool using the code snippet
8360    for ac_prog in mv
8361do
8362  # Extract the first word of "$ac_prog", so it can be a program name with args.
8363set dummy $ac_prog; ac_word=$2
8364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8365$as_echo_n "checking for $ac_word... " >&6; }
8366if ${ac_cv_path_MV+:} false; then :
8367  $as_echo_n "(cached) " >&6
8368else
8369  case $MV in
8370  [\\/]* | ?:[\\/]*)
8371  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8372  ;;
8373  *)
8374  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8375for as_dir in $PATH
8376do
8377  IFS=$as_save_IFS
8378  test -z "$as_dir" && as_dir=.
8379    for ac_exec_ext in '' $ac_executable_extensions; do
8380  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8381    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8382    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8383    break 2
8384  fi
8385done
8386  done
8387IFS=$as_save_IFS
8388
8389  ;;
8390esac
8391fi
8392MV=$ac_cv_path_MV
8393if test -n "$MV"; then
8394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8395$as_echo "$MV" >&6; }
8396else
8397  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8398$as_echo "no" >&6; }
8399fi
8400
8401
8402  test -n "$MV" && break
8403done
8404
8405  else
8406    # The variable is set, but is it from the command line or the environment?
8407
8408    # Try to remove the string !MV! from our list.
8409    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
8410    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8411      # If it failed, the variable was not from the command line. Ignore it,
8412      # but warn the user (except for BASH, which is always set by the calling BASH).
8413      if test "xMV" != xBASH; then
8414        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
8415$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
8416      fi
8417      # Try to locate tool using the code snippet
8418      for ac_prog in mv
8419do
8420  # Extract the first word of "$ac_prog", so it can be a program name with args.
8421set dummy $ac_prog; ac_word=$2
8422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8423$as_echo_n "checking for $ac_word... " >&6; }
8424if ${ac_cv_path_MV+:} false; then :
8425  $as_echo_n "(cached) " >&6
8426else
8427  case $MV in
8428  [\\/]* | ?:[\\/]*)
8429  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8430  ;;
8431  *)
8432  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8433for as_dir in $PATH
8434do
8435  IFS=$as_save_IFS
8436  test -z "$as_dir" && as_dir=.
8437    for ac_exec_ext in '' $ac_executable_extensions; do
8438  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8439    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8440    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8441    break 2
8442  fi
8443done
8444  done
8445IFS=$as_save_IFS
8446
8447  ;;
8448esac
8449fi
8450MV=$ac_cv_path_MV
8451if test -n "$MV"; then
8452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8453$as_echo "$MV" >&6; }
8454else
8455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8456$as_echo "no" >&6; }
8457fi
8458
8459
8460  test -n "$MV" && break
8461done
8462
8463    else
8464      # If it succeeded, then it was overridden by the user. We will use it
8465      # for the tool.
8466
8467      # First remove it from the list of overridden variables, so we can test
8468      # for unknown variables in the end.
8469      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8470
8471      # Check if the provided tool contains a complete path.
8472      tool_specified="$MV"
8473      tool_basename="${tool_specified##*/}"
8474      if test "x$tool_basename" = "x$tool_specified"; then
8475        # A command without a complete path is provided, search $PATH.
8476        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
8477$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
8478        # Extract the first word of "$tool_basename", so it can be a program name with args.
8479set dummy $tool_basename; ac_word=$2
8480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8481$as_echo_n "checking for $ac_word... " >&6; }
8482if ${ac_cv_path_MV+:} false; then :
8483  $as_echo_n "(cached) " >&6
8484else
8485  case $MV in
8486  [\\/]* | ?:[\\/]*)
8487  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8488  ;;
8489  *)
8490  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8491for as_dir in $PATH
8492do
8493  IFS=$as_save_IFS
8494  test -z "$as_dir" && as_dir=.
8495    for ac_exec_ext in '' $ac_executable_extensions; do
8496  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8497    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8498    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8499    break 2
8500  fi
8501done
8502  done
8503IFS=$as_save_IFS
8504
8505  ;;
8506esac
8507fi
8508MV=$ac_cv_path_MV
8509if test -n "$MV"; then
8510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8511$as_echo "$MV" >&6; }
8512else
8513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8514$as_echo "no" >&6; }
8515fi
8516
8517
8518        if test "x$MV" = x; then
8519          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8520        fi
8521      else
8522        # Otherwise we believe it is a complete path. Use it as it is.
8523        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
8524$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
8525        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8526$as_echo_n "checking for MV... " >&6; }
8527        if test ! -x "$tool_specified"; then
8528          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8529$as_echo "not found" >&6; }
8530          as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
8531        fi
8532        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8533$as_echo "$tool_specified" >&6; }
8534      fi
8535    fi
8536  fi
8537
8538
8539
8540  if test "x$MV" = x; then
8541    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
8542  fi
8543
8544
8545
8546
8547
8548  # Publish this variable in the help.
8549
8550
8551  if test "x$NAWK" = x; then
8552    # The variable is not set by user, try to locate tool using the code snippet
8553    for ac_prog in nawk gawk awk
8554do
8555  # Extract the first word of "$ac_prog", so it can be a program name with args.
8556set dummy $ac_prog; ac_word=$2
8557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8558$as_echo_n "checking for $ac_word... " >&6; }
8559if ${ac_cv_path_NAWK+:} false; then :
8560  $as_echo_n "(cached) " >&6
8561else
8562  case $NAWK in
8563  [\\/]* | ?:[\\/]*)
8564  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8565  ;;
8566  *)
8567  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8568for as_dir in $PATH
8569do
8570  IFS=$as_save_IFS
8571  test -z "$as_dir" && as_dir=.
8572    for ac_exec_ext in '' $ac_executable_extensions; do
8573  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8574    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8575    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8576    break 2
8577  fi
8578done
8579  done
8580IFS=$as_save_IFS
8581
8582  ;;
8583esac
8584fi
8585NAWK=$ac_cv_path_NAWK
8586if test -n "$NAWK"; then
8587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8588$as_echo "$NAWK" >&6; }
8589else
8590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8591$as_echo "no" >&6; }
8592fi
8593
8594
8595  test -n "$NAWK" && break
8596done
8597
8598  else
8599    # The variable is set, but is it from the command line or the environment?
8600
8601    # Try to remove the string !NAWK! from our list.
8602    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
8603    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8604      # If it failed, the variable was not from the command line. Ignore it,
8605      # but warn the user (except for BASH, which is always set by the calling BASH).
8606      if test "xNAWK" != xBASH; then
8607        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
8608$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
8609      fi
8610      # Try to locate tool using the code snippet
8611      for ac_prog in nawk gawk awk
8612do
8613  # Extract the first word of "$ac_prog", so it can be a program name with args.
8614set dummy $ac_prog; ac_word=$2
8615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8616$as_echo_n "checking for $ac_word... " >&6; }
8617if ${ac_cv_path_NAWK+:} false; then :
8618  $as_echo_n "(cached) " >&6
8619else
8620  case $NAWK in
8621  [\\/]* | ?:[\\/]*)
8622  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8623  ;;
8624  *)
8625  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8626for as_dir in $PATH
8627do
8628  IFS=$as_save_IFS
8629  test -z "$as_dir" && as_dir=.
8630    for ac_exec_ext in '' $ac_executable_extensions; do
8631  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8632    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8633    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8634    break 2
8635  fi
8636done
8637  done
8638IFS=$as_save_IFS
8639
8640  ;;
8641esac
8642fi
8643NAWK=$ac_cv_path_NAWK
8644if test -n "$NAWK"; then
8645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8646$as_echo "$NAWK" >&6; }
8647else
8648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8649$as_echo "no" >&6; }
8650fi
8651
8652
8653  test -n "$NAWK" && break
8654done
8655
8656    else
8657      # If it succeeded, then it was overridden by the user. We will use it
8658      # for the tool.
8659
8660      # First remove it from the list of overridden variables, so we can test
8661      # for unknown variables in the end.
8662      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8663
8664      # Check if the provided tool contains a complete path.
8665      tool_specified="$NAWK"
8666      tool_basename="${tool_specified##*/}"
8667      if test "x$tool_basename" = "x$tool_specified"; then
8668        # A command without a complete path is provided, search $PATH.
8669        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
8670$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
8671        # Extract the first word of "$tool_basename", so it can be a program name with args.
8672set dummy $tool_basename; ac_word=$2
8673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8674$as_echo_n "checking for $ac_word... " >&6; }
8675if ${ac_cv_path_NAWK+:} false; then :
8676  $as_echo_n "(cached) " >&6
8677else
8678  case $NAWK in
8679  [\\/]* | ?:[\\/]*)
8680  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8681  ;;
8682  *)
8683  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8684for as_dir in $PATH
8685do
8686  IFS=$as_save_IFS
8687  test -z "$as_dir" && as_dir=.
8688    for ac_exec_ext in '' $ac_executable_extensions; do
8689  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8690    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8691    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8692    break 2
8693  fi
8694done
8695  done
8696IFS=$as_save_IFS
8697
8698  ;;
8699esac
8700fi
8701NAWK=$ac_cv_path_NAWK
8702if test -n "$NAWK"; then
8703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8704$as_echo "$NAWK" >&6; }
8705else
8706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8707$as_echo "no" >&6; }
8708fi
8709
8710
8711        if test "x$NAWK" = x; then
8712          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8713        fi
8714      else
8715        # Otherwise we believe it is a complete path. Use it as it is.
8716        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
8717$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
8718        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
8719$as_echo_n "checking for NAWK... " >&6; }
8720        if test ! -x "$tool_specified"; then
8721          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8722$as_echo "not found" >&6; }
8723          as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
8724        fi
8725        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8726$as_echo "$tool_specified" >&6; }
8727      fi
8728    fi
8729  fi
8730
8731
8732
8733  if test "x$NAWK" = x; then
8734    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
8735  fi
8736
8737
8738
8739
8740
8741  # Publish this variable in the help.
8742
8743
8744  if test "x$PRINTF" = x; then
8745    # The variable is not set by user, try to locate tool using the code snippet
8746    for ac_prog in printf
8747do
8748  # Extract the first word of "$ac_prog", so it can be a program name with args.
8749set dummy $ac_prog; ac_word=$2
8750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8751$as_echo_n "checking for $ac_word... " >&6; }
8752if ${ac_cv_path_PRINTF+:} false; then :
8753  $as_echo_n "(cached) " >&6
8754else
8755  case $PRINTF in
8756  [\\/]* | ?:[\\/]*)
8757  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8758  ;;
8759  *)
8760  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8761for as_dir in $PATH
8762do
8763  IFS=$as_save_IFS
8764  test -z "$as_dir" && as_dir=.
8765    for ac_exec_ext in '' $ac_executable_extensions; do
8766  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8767    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8768    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8769    break 2
8770  fi
8771done
8772  done
8773IFS=$as_save_IFS
8774
8775  ;;
8776esac
8777fi
8778PRINTF=$ac_cv_path_PRINTF
8779if test -n "$PRINTF"; then
8780  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8781$as_echo "$PRINTF" >&6; }
8782else
8783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8784$as_echo "no" >&6; }
8785fi
8786
8787
8788  test -n "$PRINTF" && break
8789done
8790
8791  else
8792    # The variable is set, but is it from the command line or the environment?
8793
8794    # Try to remove the string !PRINTF! from our list.
8795    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
8796    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8797      # If it failed, the variable was not from the command line. Ignore it,
8798      # but warn the user (except for BASH, which is always set by the calling BASH).
8799      if test "xPRINTF" != xBASH; then
8800        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
8801$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
8802      fi
8803      # Try to locate tool using the code snippet
8804      for ac_prog in printf
8805do
8806  # Extract the first word of "$ac_prog", so it can be a program name with args.
8807set dummy $ac_prog; ac_word=$2
8808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8809$as_echo_n "checking for $ac_word... " >&6; }
8810if ${ac_cv_path_PRINTF+:} false; then :
8811  $as_echo_n "(cached) " >&6
8812else
8813  case $PRINTF in
8814  [\\/]* | ?:[\\/]*)
8815  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8816  ;;
8817  *)
8818  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8819for as_dir in $PATH
8820do
8821  IFS=$as_save_IFS
8822  test -z "$as_dir" && as_dir=.
8823    for ac_exec_ext in '' $ac_executable_extensions; do
8824  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8825    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8826    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8827    break 2
8828  fi
8829done
8830  done
8831IFS=$as_save_IFS
8832
8833  ;;
8834esac
8835fi
8836PRINTF=$ac_cv_path_PRINTF
8837if test -n "$PRINTF"; then
8838  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8839$as_echo "$PRINTF" >&6; }
8840else
8841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8842$as_echo "no" >&6; }
8843fi
8844
8845
8846  test -n "$PRINTF" && break
8847done
8848
8849    else
8850      # If it succeeded, then it was overridden by the user. We will use it
8851      # for the tool.
8852
8853      # First remove it from the list of overridden variables, so we can test
8854      # for unknown variables in the end.
8855      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8856
8857      # Check if the provided tool contains a complete path.
8858      tool_specified="$PRINTF"
8859      tool_basename="${tool_specified##*/}"
8860      if test "x$tool_basename" = "x$tool_specified"; then
8861        # A command without a complete path is provided, search $PATH.
8862        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
8863$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
8864        # Extract the first word of "$tool_basename", so it can be a program name with args.
8865set dummy $tool_basename; ac_word=$2
8866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8867$as_echo_n "checking for $ac_word... " >&6; }
8868if ${ac_cv_path_PRINTF+:} false; then :
8869  $as_echo_n "(cached) " >&6
8870else
8871  case $PRINTF in
8872  [\\/]* | ?:[\\/]*)
8873  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8874  ;;
8875  *)
8876  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8877for as_dir in $PATH
8878do
8879  IFS=$as_save_IFS
8880  test -z "$as_dir" && as_dir=.
8881    for ac_exec_ext in '' $ac_executable_extensions; do
8882  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8883    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8884    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8885    break 2
8886  fi
8887done
8888  done
8889IFS=$as_save_IFS
8890
8891  ;;
8892esac
8893fi
8894PRINTF=$ac_cv_path_PRINTF
8895if test -n "$PRINTF"; then
8896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8897$as_echo "$PRINTF" >&6; }
8898else
8899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8900$as_echo "no" >&6; }
8901fi
8902
8903
8904        if test "x$PRINTF" = x; then
8905          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8906        fi
8907      else
8908        # Otherwise we believe it is a complete path. Use it as it is.
8909        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
8910$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
8911        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
8912$as_echo_n "checking for PRINTF... " >&6; }
8913        if test ! -x "$tool_specified"; then
8914          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8915$as_echo "not found" >&6; }
8916          as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
8917        fi
8918        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8919$as_echo "$tool_specified" >&6; }
8920      fi
8921    fi
8922  fi
8923
8924
8925
8926  if test "x$PRINTF" = x; then
8927    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
8928  fi
8929
8930
8931
8932
8933
8934  # Publish this variable in the help.
8935
8936
8937  if test "x$RM" = x; then
8938    # The variable is not set by user, try to locate tool using the code snippet
8939    for ac_prog in rm
8940do
8941  # Extract the first word of "$ac_prog", so it can be a program name with args.
8942set dummy $ac_prog; ac_word=$2
8943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8944$as_echo_n "checking for $ac_word... " >&6; }
8945if ${ac_cv_path_RM+:} false; then :
8946  $as_echo_n "(cached) " >&6
8947else
8948  case $RM in
8949  [\\/]* | ?:[\\/]*)
8950  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8951  ;;
8952  *)
8953  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8954for as_dir in $PATH
8955do
8956  IFS=$as_save_IFS
8957  test -z "$as_dir" && as_dir=.
8958    for ac_exec_ext in '' $ac_executable_extensions; do
8959  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8960    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8961    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8962    break 2
8963  fi
8964done
8965  done
8966IFS=$as_save_IFS
8967
8968  ;;
8969esac
8970fi
8971RM=$ac_cv_path_RM
8972if test -n "$RM"; then
8973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8974$as_echo "$RM" >&6; }
8975else
8976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8977$as_echo "no" >&6; }
8978fi
8979
8980
8981  test -n "$RM" && break
8982done
8983
8984  else
8985    # The variable is set, but is it from the command line or the environment?
8986
8987    # Try to remove the string !RM! from our list.
8988    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
8989    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8990      # If it failed, the variable was not from the command line. Ignore it,
8991      # but warn the user (except for BASH, which is always set by the calling BASH).
8992      if test "xRM" != xBASH; then
8993        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
8994$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
8995      fi
8996      # Try to locate tool using the code snippet
8997      for ac_prog in rm
8998do
8999  # Extract the first word of "$ac_prog", so it can be a program name with args.
9000set dummy $ac_prog; ac_word=$2
9001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9002$as_echo_n "checking for $ac_word... " >&6; }
9003if ${ac_cv_path_RM+:} false; then :
9004  $as_echo_n "(cached) " >&6
9005else
9006  case $RM in
9007  [\\/]* | ?:[\\/]*)
9008  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9009  ;;
9010  *)
9011  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9012for as_dir in $PATH
9013do
9014  IFS=$as_save_IFS
9015  test -z "$as_dir" && as_dir=.
9016    for ac_exec_ext in '' $ac_executable_extensions; do
9017  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9018    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9019    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9020    break 2
9021  fi
9022done
9023  done
9024IFS=$as_save_IFS
9025
9026  ;;
9027esac
9028fi
9029RM=$ac_cv_path_RM
9030if test -n "$RM"; then
9031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9032$as_echo "$RM" >&6; }
9033else
9034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9035$as_echo "no" >&6; }
9036fi
9037
9038
9039  test -n "$RM" && break
9040done
9041
9042    else
9043      # If it succeeded, then it was overridden by the user. We will use it
9044      # for the tool.
9045
9046      # First remove it from the list of overridden variables, so we can test
9047      # for unknown variables in the end.
9048      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9049
9050      # Check if the provided tool contains a complete path.
9051      tool_specified="$RM"
9052      tool_basename="${tool_specified##*/}"
9053      if test "x$tool_basename" = "x$tool_specified"; then
9054        # A command without a complete path is provided, search $PATH.
9055        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
9056$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
9057        # Extract the first word of "$tool_basename", so it can be a program name with args.
9058set dummy $tool_basename; ac_word=$2
9059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9060$as_echo_n "checking for $ac_word... " >&6; }
9061if ${ac_cv_path_RM+:} false; then :
9062  $as_echo_n "(cached) " >&6
9063else
9064  case $RM in
9065  [\\/]* | ?:[\\/]*)
9066  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9067  ;;
9068  *)
9069  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9070for as_dir in $PATH
9071do
9072  IFS=$as_save_IFS
9073  test -z "$as_dir" && as_dir=.
9074    for ac_exec_ext in '' $ac_executable_extensions; do
9075  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9076    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9077    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9078    break 2
9079  fi
9080done
9081  done
9082IFS=$as_save_IFS
9083
9084  ;;
9085esac
9086fi
9087RM=$ac_cv_path_RM
9088if test -n "$RM"; then
9089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9090$as_echo "$RM" >&6; }
9091else
9092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9093$as_echo "no" >&6; }
9094fi
9095
9096
9097        if test "x$RM" = x; then
9098          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9099        fi
9100      else
9101        # Otherwise we believe it is a complete path. Use it as it is.
9102        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
9103$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
9104        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9105$as_echo_n "checking for RM... " >&6; }
9106        if test ! -x "$tool_specified"; then
9107          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9108$as_echo "not found" >&6; }
9109          as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
9110        fi
9111        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9112$as_echo "$tool_specified" >&6; }
9113      fi
9114    fi
9115  fi
9116
9117
9118
9119  if test "x$RM" = x; then
9120    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9121  fi
9122
9123
9124
9125
9126
9127  # Publish this variable in the help.
9128
9129
9130  if test "x$SH" = x; then
9131    # The variable is not set by user, try to locate tool using the code snippet
9132    for ac_prog in sh
9133do
9134  # Extract the first word of "$ac_prog", so it can be a program name with args.
9135set dummy $ac_prog; ac_word=$2
9136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9137$as_echo_n "checking for $ac_word... " >&6; }
9138if ${ac_cv_path_SH+:} false; then :
9139  $as_echo_n "(cached) " >&6
9140else
9141  case $SH in
9142  [\\/]* | ?:[\\/]*)
9143  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9144  ;;
9145  *)
9146  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9147for as_dir in $PATH
9148do
9149  IFS=$as_save_IFS
9150  test -z "$as_dir" && as_dir=.
9151    for ac_exec_ext in '' $ac_executable_extensions; do
9152  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9153    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9154    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9155    break 2
9156  fi
9157done
9158  done
9159IFS=$as_save_IFS
9160
9161  ;;
9162esac
9163fi
9164SH=$ac_cv_path_SH
9165if test -n "$SH"; then
9166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9167$as_echo "$SH" >&6; }
9168else
9169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9170$as_echo "no" >&6; }
9171fi
9172
9173
9174  test -n "$SH" && break
9175done
9176
9177  else
9178    # The variable is set, but is it from the command line or the environment?
9179
9180    # Try to remove the string !SH! from our list.
9181    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
9182    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9183      # If it failed, the variable was not from the command line. Ignore it,
9184      # but warn the user (except for BASH, which is always set by the calling BASH).
9185      if test "xSH" != xBASH; then
9186        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
9187$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
9188      fi
9189      # Try to locate tool using the code snippet
9190      for ac_prog in sh
9191do
9192  # Extract the first word of "$ac_prog", so it can be a program name with args.
9193set dummy $ac_prog; ac_word=$2
9194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9195$as_echo_n "checking for $ac_word... " >&6; }
9196if ${ac_cv_path_SH+:} false; then :
9197  $as_echo_n "(cached) " >&6
9198else
9199  case $SH in
9200  [\\/]* | ?:[\\/]*)
9201  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9202  ;;
9203  *)
9204  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9205for as_dir in $PATH
9206do
9207  IFS=$as_save_IFS
9208  test -z "$as_dir" && as_dir=.
9209    for ac_exec_ext in '' $ac_executable_extensions; do
9210  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9211    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9212    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9213    break 2
9214  fi
9215done
9216  done
9217IFS=$as_save_IFS
9218
9219  ;;
9220esac
9221fi
9222SH=$ac_cv_path_SH
9223if test -n "$SH"; then
9224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9225$as_echo "$SH" >&6; }
9226else
9227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9228$as_echo "no" >&6; }
9229fi
9230
9231
9232  test -n "$SH" && break
9233done
9234
9235    else
9236      # If it succeeded, then it was overridden by the user. We will use it
9237      # for the tool.
9238
9239      # First remove it from the list of overridden variables, so we can test
9240      # for unknown variables in the end.
9241      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9242
9243      # Check if the provided tool contains a complete path.
9244      tool_specified="$SH"
9245      tool_basename="${tool_specified##*/}"
9246      if test "x$tool_basename" = "x$tool_specified"; then
9247        # A command without a complete path is provided, search $PATH.
9248        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
9249$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
9250        # Extract the first word of "$tool_basename", so it can be a program name with args.
9251set dummy $tool_basename; ac_word=$2
9252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9253$as_echo_n "checking for $ac_word... " >&6; }
9254if ${ac_cv_path_SH+:} false; then :
9255  $as_echo_n "(cached) " >&6
9256else
9257  case $SH in
9258  [\\/]* | ?:[\\/]*)
9259  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9260  ;;
9261  *)
9262  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9263for as_dir in $PATH
9264do
9265  IFS=$as_save_IFS
9266  test -z "$as_dir" && as_dir=.
9267    for ac_exec_ext in '' $ac_executable_extensions; do
9268  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9269    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9270    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9271    break 2
9272  fi
9273done
9274  done
9275IFS=$as_save_IFS
9276
9277  ;;
9278esac
9279fi
9280SH=$ac_cv_path_SH
9281if test -n "$SH"; then
9282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9283$as_echo "$SH" >&6; }
9284else
9285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9286$as_echo "no" >&6; }
9287fi
9288
9289
9290        if test "x$SH" = x; then
9291          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9292        fi
9293      else
9294        # Otherwise we believe it is a complete path. Use it as it is.
9295        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
9296$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
9297        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9298$as_echo_n "checking for SH... " >&6; }
9299        if test ! -x "$tool_specified"; then
9300          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9301$as_echo "not found" >&6; }
9302          as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
9303        fi
9304        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9305$as_echo "$tool_specified" >&6; }
9306      fi
9307    fi
9308  fi
9309
9310
9311
9312  if test "x$SH" = x; then
9313    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
9314  fi
9315
9316
9317
9318
9319
9320  # Publish this variable in the help.
9321
9322
9323  if test "x$SORT" = x; then
9324    # The variable is not set by user, try to locate tool using the code snippet
9325    for ac_prog in sort
9326do
9327  # Extract the first word of "$ac_prog", so it can be a program name with args.
9328set dummy $ac_prog; ac_word=$2
9329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9330$as_echo_n "checking for $ac_word... " >&6; }
9331if ${ac_cv_path_SORT+:} false; then :
9332  $as_echo_n "(cached) " >&6
9333else
9334  case $SORT in
9335  [\\/]* | ?:[\\/]*)
9336  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9337  ;;
9338  *)
9339  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9340for as_dir in $PATH
9341do
9342  IFS=$as_save_IFS
9343  test -z "$as_dir" && as_dir=.
9344    for ac_exec_ext in '' $ac_executable_extensions; do
9345  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9346    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9347    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9348    break 2
9349  fi
9350done
9351  done
9352IFS=$as_save_IFS
9353
9354  ;;
9355esac
9356fi
9357SORT=$ac_cv_path_SORT
9358if test -n "$SORT"; then
9359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9360$as_echo "$SORT" >&6; }
9361else
9362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9363$as_echo "no" >&6; }
9364fi
9365
9366
9367  test -n "$SORT" && break
9368done
9369
9370  else
9371    # The variable is set, but is it from the command line or the environment?
9372
9373    # Try to remove the string !SORT! from our list.
9374    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
9375    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9376      # If it failed, the variable was not from the command line. Ignore it,
9377      # but warn the user (except for BASH, which is always set by the calling BASH).
9378      if test "xSORT" != xBASH; then
9379        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
9380$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
9381      fi
9382      # Try to locate tool using the code snippet
9383      for ac_prog in sort
9384do
9385  # Extract the first word of "$ac_prog", so it can be a program name with args.
9386set dummy $ac_prog; ac_word=$2
9387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9388$as_echo_n "checking for $ac_word... " >&6; }
9389if ${ac_cv_path_SORT+:} false; then :
9390  $as_echo_n "(cached) " >&6
9391else
9392  case $SORT in
9393  [\\/]* | ?:[\\/]*)
9394  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9395  ;;
9396  *)
9397  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9398for as_dir in $PATH
9399do
9400  IFS=$as_save_IFS
9401  test -z "$as_dir" && as_dir=.
9402    for ac_exec_ext in '' $ac_executable_extensions; do
9403  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9404    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9405    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9406    break 2
9407  fi
9408done
9409  done
9410IFS=$as_save_IFS
9411
9412  ;;
9413esac
9414fi
9415SORT=$ac_cv_path_SORT
9416if test -n "$SORT"; then
9417  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9418$as_echo "$SORT" >&6; }
9419else
9420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9421$as_echo "no" >&6; }
9422fi
9423
9424
9425  test -n "$SORT" && break
9426done
9427
9428    else
9429      # If it succeeded, then it was overridden by the user. We will use it
9430      # for the tool.
9431
9432      # First remove it from the list of overridden variables, so we can test
9433      # for unknown variables in the end.
9434      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9435
9436      # Check if the provided tool contains a complete path.
9437      tool_specified="$SORT"
9438      tool_basename="${tool_specified##*/}"
9439      if test "x$tool_basename" = "x$tool_specified"; then
9440        # A command without a complete path is provided, search $PATH.
9441        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
9442$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
9443        # Extract the first word of "$tool_basename", so it can be a program name with args.
9444set dummy $tool_basename; ac_word=$2
9445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9446$as_echo_n "checking for $ac_word... " >&6; }
9447if ${ac_cv_path_SORT+:} false; then :
9448  $as_echo_n "(cached) " >&6
9449else
9450  case $SORT in
9451  [\\/]* | ?:[\\/]*)
9452  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9453  ;;
9454  *)
9455  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9456for as_dir in $PATH
9457do
9458  IFS=$as_save_IFS
9459  test -z "$as_dir" && as_dir=.
9460    for ac_exec_ext in '' $ac_executable_extensions; do
9461  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9462    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9463    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9464    break 2
9465  fi
9466done
9467  done
9468IFS=$as_save_IFS
9469
9470  ;;
9471esac
9472fi
9473SORT=$ac_cv_path_SORT
9474if test -n "$SORT"; then
9475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9476$as_echo "$SORT" >&6; }
9477else
9478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9479$as_echo "no" >&6; }
9480fi
9481
9482
9483        if test "x$SORT" = x; then
9484          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9485        fi
9486      else
9487        # Otherwise we believe it is a complete path. Use it as it is.
9488        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
9489$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
9490        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
9491$as_echo_n "checking for SORT... " >&6; }
9492        if test ! -x "$tool_specified"; then
9493          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9494$as_echo "not found" >&6; }
9495          as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
9496        fi
9497        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9498$as_echo "$tool_specified" >&6; }
9499      fi
9500    fi
9501  fi
9502
9503
9504
9505  if test "x$SORT" = x; then
9506    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
9507  fi
9508
9509
9510
9511
9512
9513  # Publish this variable in the help.
9514
9515
9516  if test "x$TAIL" = x; then
9517    # The variable is not set by user, try to locate tool using the code snippet
9518    for ac_prog in tail
9519do
9520  # Extract the first word of "$ac_prog", so it can be a program name with args.
9521set dummy $ac_prog; ac_word=$2
9522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9523$as_echo_n "checking for $ac_word... " >&6; }
9524if ${ac_cv_path_TAIL+:} false; then :
9525  $as_echo_n "(cached) " >&6
9526else
9527  case $TAIL in
9528  [\\/]* | ?:[\\/]*)
9529  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9530  ;;
9531  *)
9532  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9533for as_dir in $PATH
9534do
9535  IFS=$as_save_IFS
9536  test -z "$as_dir" && as_dir=.
9537    for ac_exec_ext in '' $ac_executable_extensions; do
9538  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9539    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9540    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9541    break 2
9542  fi
9543done
9544  done
9545IFS=$as_save_IFS
9546
9547  ;;
9548esac
9549fi
9550TAIL=$ac_cv_path_TAIL
9551if test -n "$TAIL"; then
9552  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9553$as_echo "$TAIL" >&6; }
9554else
9555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9556$as_echo "no" >&6; }
9557fi
9558
9559
9560  test -n "$TAIL" && break
9561done
9562
9563  else
9564    # The variable is set, but is it from the command line or the environment?
9565
9566    # Try to remove the string !TAIL! from our list.
9567    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
9568    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9569      # If it failed, the variable was not from the command line. Ignore it,
9570      # but warn the user (except for BASH, which is always set by the calling BASH).
9571      if test "xTAIL" != xBASH; then
9572        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
9573$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
9574      fi
9575      # Try to locate tool using the code snippet
9576      for ac_prog in tail
9577do
9578  # Extract the first word of "$ac_prog", so it can be a program name with args.
9579set dummy $ac_prog; ac_word=$2
9580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9581$as_echo_n "checking for $ac_word... " >&6; }
9582if ${ac_cv_path_TAIL+:} false; then :
9583  $as_echo_n "(cached) " >&6
9584else
9585  case $TAIL in
9586  [\\/]* | ?:[\\/]*)
9587  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9588  ;;
9589  *)
9590  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9591for as_dir in $PATH
9592do
9593  IFS=$as_save_IFS
9594  test -z "$as_dir" && as_dir=.
9595    for ac_exec_ext in '' $ac_executable_extensions; do
9596  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9597    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9598    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9599    break 2
9600  fi
9601done
9602  done
9603IFS=$as_save_IFS
9604
9605  ;;
9606esac
9607fi
9608TAIL=$ac_cv_path_TAIL
9609if test -n "$TAIL"; then
9610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9611$as_echo "$TAIL" >&6; }
9612else
9613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9614$as_echo "no" >&6; }
9615fi
9616
9617
9618  test -n "$TAIL" && break
9619done
9620
9621    else
9622      # If it succeeded, then it was overridden by the user. We will use it
9623      # for the tool.
9624
9625      # First remove it from the list of overridden variables, so we can test
9626      # for unknown variables in the end.
9627      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9628
9629      # Check if the provided tool contains a complete path.
9630      tool_specified="$TAIL"
9631      tool_basename="${tool_specified##*/}"
9632      if test "x$tool_basename" = "x$tool_specified"; then
9633        # A command without a complete path is provided, search $PATH.
9634        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
9635$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
9636        # Extract the first word of "$tool_basename", so it can be a program name with args.
9637set dummy $tool_basename; ac_word=$2
9638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9639$as_echo_n "checking for $ac_word... " >&6; }
9640if ${ac_cv_path_TAIL+:} false; then :
9641  $as_echo_n "(cached) " >&6
9642else
9643  case $TAIL in
9644  [\\/]* | ?:[\\/]*)
9645  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9646  ;;
9647  *)
9648  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9649for as_dir in $PATH
9650do
9651  IFS=$as_save_IFS
9652  test -z "$as_dir" && as_dir=.
9653    for ac_exec_ext in '' $ac_executable_extensions; do
9654  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9655    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9656    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9657    break 2
9658  fi
9659done
9660  done
9661IFS=$as_save_IFS
9662
9663  ;;
9664esac
9665fi
9666TAIL=$ac_cv_path_TAIL
9667if test -n "$TAIL"; then
9668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9669$as_echo "$TAIL" >&6; }
9670else
9671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9672$as_echo "no" >&6; }
9673fi
9674
9675
9676        if test "x$TAIL" = x; then
9677          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9678        fi
9679      else
9680        # Otherwise we believe it is a complete path. Use it as it is.
9681        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
9682$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
9683        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
9684$as_echo_n "checking for TAIL... " >&6; }
9685        if test ! -x "$tool_specified"; then
9686          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9687$as_echo "not found" >&6; }
9688          as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
9689        fi
9690        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9691$as_echo "$tool_specified" >&6; }
9692      fi
9693    fi
9694  fi
9695
9696
9697
9698  if test "x$TAIL" = x; then
9699    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
9700  fi
9701
9702
9703
9704
9705
9706  # Publish this variable in the help.
9707
9708
9709  if test "x$TAR" = x; then
9710    # The variable is not set by user, try to locate tool using the code snippet
9711    for ac_prog in tar
9712do
9713  # Extract the first word of "$ac_prog", so it can be a program name with args.
9714set dummy $ac_prog; ac_word=$2
9715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9716$as_echo_n "checking for $ac_word... " >&6; }
9717if ${ac_cv_path_TAR+:} false; then :
9718  $as_echo_n "(cached) " >&6
9719else
9720  case $TAR in
9721  [\\/]* | ?:[\\/]*)
9722  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9723  ;;
9724  *)
9725  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9726for as_dir in $PATH
9727do
9728  IFS=$as_save_IFS
9729  test -z "$as_dir" && as_dir=.
9730    for ac_exec_ext in '' $ac_executable_extensions; do
9731  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9732    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9733    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9734    break 2
9735  fi
9736done
9737  done
9738IFS=$as_save_IFS
9739
9740  ;;
9741esac
9742fi
9743TAR=$ac_cv_path_TAR
9744if test -n "$TAR"; then
9745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9746$as_echo "$TAR" >&6; }
9747else
9748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9749$as_echo "no" >&6; }
9750fi
9751
9752
9753  test -n "$TAR" && break
9754done
9755
9756  else
9757    # The variable is set, but is it from the command line or the environment?
9758
9759    # Try to remove the string !TAR! from our list.
9760    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
9761    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9762      # If it failed, the variable was not from the command line. Ignore it,
9763      # but warn the user (except for BASH, which is always set by the calling BASH).
9764      if test "xTAR" != xBASH; then
9765        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
9766$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
9767      fi
9768      # Try to locate tool using the code snippet
9769      for ac_prog in tar
9770do
9771  # Extract the first word of "$ac_prog", so it can be a program name with args.
9772set dummy $ac_prog; ac_word=$2
9773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9774$as_echo_n "checking for $ac_word... " >&6; }
9775if ${ac_cv_path_TAR+:} false; then :
9776  $as_echo_n "(cached) " >&6
9777else
9778  case $TAR in
9779  [\\/]* | ?:[\\/]*)
9780  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9781  ;;
9782  *)
9783  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9784for as_dir in $PATH
9785do
9786  IFS=$as_save_IFS
9787  test -z "$as_dir" && as_dir=.
9788    for ac_exec_ext in '' $ac_executable_extensions; do
9789  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9790    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9791    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9792    break 2
9793  fi
9794done
9795  done
9796IFS=$as_save_IFS
9797
9798  ;;
9799esac
9800fi
9801TAR=$ac_cv_path_TAR
9802if test -n "$TAR"; then
9803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9804$as_echo "$TAR" >&6; }
9805else
9806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9807$as_echo "no" >&6; }
9808fi
9809
9810
9811  test -n "$TAR" && break
9812done
9813
9814    else
9815      # If it succeeded, then it was overridden by the user. We will use it
9816      # for the tool.
9817
9818      # First remove it from the list of overridden variables, so we can test
9819      # for unknown variables in the end.
9820      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9821
9822      # Check if the provided tool contains a complete path.
9823      tool_specified="$TAR"
9824      tool_basename="${tool_specified##*/}"
9825      if test "x$tool_basename" = "x$tool_specified"; then
9826        # A command without a complete path is provided, search $PATH.
9827        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
9828$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
9829        # Extract the first word of "$tool_basename", so it can be a program name with args.
9830set dummy $tool_basename; ac_word=$2
9831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9832$as_echo_n "checking for $ac_word... " >&6; }
9833if ${ac_cv_path_TAR+:} false; then :
9834  $as_echo_n "(cached) " >&6
9835else
9836  case $TAR in
9837  [\\/]* | ?:[\\/]*)
9838  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9839  ;;
9840  *)
9841  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9842for as_dir in $PATH
9843do
9844  IFS=$as_save_IFS
9845  test -z "$as_dir" && as_dir=.
9846    for ac_exec_ext in '' $ac_executable_extensions; do
9847  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9848    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9849    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9850    break 2
9851  fi
9852done
9853  done
9854IFS=$as_save_IFS
9855
9856  ;;
9857esac
9858fi
9859TAR=$ac_cv_path_TAR
9860if test -n "$TAR"; then
9861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9862$as_echo "$TAR" >&6; }
9863else
9864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9865$as_echo "no" >&6; }
9866fi
9867
9868
9869        if test "x$TAR" = x; then
9870          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9871        fi
9872      else
9873        # Otherwise we believe it is a complete path. Use it as it is.
9874        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
9875$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
9876        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9877$as_echo_n "checking for TAR... " >&6; }
9878        if test ! -x "$tool_specified"; then
9879          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9880$as_echo "not found" >&6; }
9881          as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
9882        fi
9883        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9884$as_echo "$tool_specified" >&6; }
9885      fi
9886    fi
9887  fi
9888
9889
9890
9891  if test "x$TAR" = x; then
9892    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
9893  fi
9894
9895
9896
9897
9898
9899  # Publish this variable in the help.
9900
9901
9902  if test "x$TEE" = x; then
9903    # The variable is not set by user, try to locate tool using the code snippet
9904    for ac_prog in tee
9905do
9906  # Extract the first word of "$ac_prog", so it can be a program name with args.
9907set dummy $ac_prog; ac_word=$2
9908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9909$as_echo_n "checking for $ac_word... " >&6; }
9910if ${ac_cv_path_TEE+:} false; then :
9911  $as_echo_n "(cached) " >&6
9912else
9913  case $TEE in
9914  [\\/]* | ?:[\\/]*)
9915  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9916  ;;
9917  *)
9918  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9919for as_dir in $PATH
9920do
9921  IFS=$as_save_IFS
9922  test -z "$as_dir" && as_dir=.
9923    for ac_exec_ext in '' $ac_executable_extensions; do
9924  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9925    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9926    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9927    break 2
9928  fi
9929done
9930  done
9931IFS=$as_save_IFS
9932
9933  ;;
9934esac
9935fi
9936TEE=$ac_cv_path_TEE
9937if test -n "$TEE"; then
9938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9939$as_echo "$TEE" >&6; }
9940else
9941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9942$as_echo "no" >&6; }
9943fi
9944
9945
9946  test -n "$TEE" && break
9947done
9948
9949  else
9950    # The variable is set, but is it from the command line or the environment?
9951
9952    # Try to remove the string !TEE! from our list.
9953    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
9954    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9955      # If it failed, the variable was not from the command line. Ignore it,
9956      # but warn the user (except for BASH, which is always set by the calling BASH).
9957      if test "xTEE" != xBASH; then
9958        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
9959$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
9960      fi
9961      # Try to locate tool using the code snippet
9962      for ac_prog in tee
9963do
9964  # Extract the first word of "$ac_prog", so it can be a program name with args.
9965set dummy $ac_prog; ac_word=$2
9966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9967$as_echo_n "checking for $ac_word... " >&6; }
9968if ${ac_cv_path_TEE+:} false; then :
9969  $as_echo_n "(cached) " >&6
9970else
9971  case $TEE in
9972  [\\/]* | ?:[\\/]*)
9973  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9974  ;;
9975  *)
9976  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9977for as_dir in $PATH
9978do
9979  IFS=$as_save_IFS
9980  test -z "$as_dir" && as_dir=.
9981    for ac_exec_ext in '' $ac_executable_extensions; do
9982  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9983    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9984    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9985    break 2
9986  fi
9987done
9988  done
9989IFS=$as_save_IFS
9990
9991  ;;
9992esac
9993fi
9994TEE=$ac_cv_path_TEE
9995if test -n "$TEE"; then
9996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9997$as_echo "$TEE" >&6; }
9998else
9999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10000$as_echo "no" >&6; }
10001fi
10002
10003
10004  test -n "$TEE" && break
10005done
10006
10007    else
10008      # If it succeeded, then it was overridden by the user. We will use it
10009      # for the tool.
10010
10011      # First remove it from the list of overridden variables, so we can test
10012      # for unknown variables in the end.
10013      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10014
10015      # Check if the provided tool contains a complete path.
10016      tool_specified="$TEE"
10017      tool_basename="${tool_specified##*/}"
10018      if test "x$tool_basename" = "x$tool_specified"; then
10019        # A command without a complete path is provided, search $PATH.
10020        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
10021$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
10022        # Extract the first word of "$tool_basename", so it can be a program name with args.
10023set dummy $tool_basename; ac_word=$2
10024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10025$as_echo_n "checking for $ac_word... " >&6; }
10026if ${ac_cv_path_TEE+:} false; then :
10027  $as_echo_n "(cached) " >&6
10028else
10029  case $TEE in
10030  [\\/]* | ?:[\\/]*)
10031  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10032  ;;
10033  *)
10034  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10035for as_dir in $PATH
10036do
10037  IFS=$as_save_IFS
10038  test -z "$as_dir" && as_dir=.
10039    for ac_exec_ext in '' $ac_executable_extensions; do
10040  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10041    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10042    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10043    break 2
10044  fi
10045done
10046  done
10047IFS=$as_save_IFS
10048
10049  ;;
10050esac
10051fi
10052TEE=$ac_cv_path_TEE
10053if test -n "$TEE"; then
10054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10055$as_echo "$TEE" >&6; }
10056else
10057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10058$as_echo "no" >&6; }
10059fi
10060
10061
10062        if test "x$TEE" = x; then
10063          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10064        fi
10065      else
10066        # Otherwise we believe it is a complete path. Use it as it is.
10067        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
10068$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
10069        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10070$as_echo_n "checking for TEE... " >&6; }
10071        if test ! -x "$tool_specified"; then
10072          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10073$as_echo "not found" >&6; }
10074          as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
10075        fi
10076        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10077$as_echo "$tool_specified" >&6; }
10078      fi
10079    fi
10080  fi
10081
10082
10083
10084  if test "x$TEE" = x; then
10085    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
10086  fi
10087
10088
10089
10090
10091
10092  # Publish this variable in the help.
10093
10094
10095  if test "x$TOUCH" = x; then
10096    # The variable is not set by user, try to locate tool using the code snippet
10097    for ac_prog in touch
10098do
10099  # Extract the first word of "$ac_prog", so it can be a program name with args.
10100set dummy $ac_prog; ac_word=$2
10101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10102$as_echo_n "checking for $ac_word... " >&6; }
10103if ${ac_cv_path_TOUCH+:} false; then :
10104  $as_echo_n "(cached) " >&6
10105else
10106  case $TOUCH in
10107  [\\/]* | ?:[\\/]*)
10108  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10109  ;;
10110  *)
10111  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10112for as_dir in $PATH
10113do
10114  IFS=$as_save_IFS
10115  test -z "$as_dir" && as_dir=.
10116    for ac_exec_ext in '' $ac_executable_extensions; do
10117  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10118    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10119    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10120    break 2
10121  fi
10122done
10123  done
10124IFS=$as_save_IFS
10125
10126  ;;
10127esac
10128fi
10129TOUCH=$ac_cv_path_TOUCH
10130if test -n "$TOUCH"; then
10131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10132$as_echo "$TOUCH" >&6; }
10133else
10134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10135$as_echo "no" >&6; }
10136fi
10137
10138
10139  test -n "$TOUCH" && break
10140done
10141
10142  else
10143    # The variable is set, but is it from the command line or the environment?
10144
10145    # Try to remove the string !TOUCH! from our list.
10146    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
10147    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10148      # If it failed, the variable was not from the command line. Ignore it,
10149      # but warn the user (except for BASH, which is always set by the calling BASH).
10150      if test "xTOUCH" != xBASH; then
10151        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
10152$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
10153      fi
10154      # Try to locate tool using the code snippet
10155      for ac_prog in touch
10156do
10157  # Extract the first word of "$ac_prog", so it can be a program name with args.
10158set dummy $ac_prog; ac_word=$2
10159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10160$as_echo_n "checking for $ac_word... " >&6; }
10161if ${ac_cv_path_TOUCH+:} false; then :
10162  $as_echo_n "(cached) " >&6
10163else
10164  case $TOUCH in
10165  [\\/]* | ?:[\\/]*)
10166  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10167  ;;
10168  *)
10169  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10170for as_dir in $PATH
10171do
10172  IFS=$as_save_IFS
10173  test -z "$as_dir" && as_dir=.
10174    for ac_exec_ext in '' $ac_executable_extensions; do
10175  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10176    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10177    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10178    break 2
10179  fi
10180done
10181  done
10182IFS=$as_save_IFS
10183
10184  ;;
10185esac
10186fi
10187TOUCH=$ac_cv_path_TOUCH
10188if test -n "$TOUCH"; then
10189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10190$as_echo "$TOUCH" >&6; }
10191else
10192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10193$as_echo "no" >&6; }
10194fi
10195
10196
10197  test -n "$TOUCH" && break
10198done
10199
10200    else
10201      # If it succeeded, then it was overridden by the user. We will use it
10202      # for the tool.
10203
10204      # First remove it from the list of overridden variables, so we can test
10205      # for unknown variables in the end.
10206      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10207
10208      # Check if the provided tool contains a complete path.
10209      tool_specified="$TOUCH"
10210      tool_basename="${tool_specified##*/}"
10211      if test "x$tool_basename" = "x$tool_specified"; then
10212        # A command without a complete path is provided, search $PATH.
10213        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
10214$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
10215        # Extract the first word of "$tool_basename", so it can be a program name with args.
10216set dummy $tool_basename; ac_word=$2
10217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10218$as_echo_n "checking for $ac_word... " >&6; }
10219if ${ac_cv_path_TOUCH+:} false; then :
10220  $as_echo_n "(cached) " >&6
10221else
10222  case $TOUCH in
10223  [\\/]* | ?:[\\/]*)
10224  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10225  ;;
10226  *)
10227  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10228for as_dir in $PATH
10229do
10230  IFS=$as_save_IFS
10231  test -z "$as_dir" && as_dir=.
10232    for ac_exec_ext in '' $ac_executable_extensions; do
10233  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10234    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10235    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10236    break 2
10237  fi
10238done
10239  done
10240IFS=$as_save_IFS
10241
10242  ;;
10243esac
10244fi
10245TOUCH=$ac_cv_path_TOUCH
10246if test -n "$TOUCH"; then
10247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10248$as_echo "$TOUCH" >&6; }
10249else
10250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10251$as_echo "no" >&6; }
10252fi
10253
10254
10255        if test "x$TOUCH" = x; then
10256          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10257        fi
10258      else
10259        # Otherwise we believe it is a complete path. Use it as it is.
10260        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
10261$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
10262        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10263$as_echo_n "checking for TOUCH... " >&6; }
10264        if test ! -x "$tool_specified"; then
10265          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10266$as_echo "not found" >&6; }
10267          as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
10268        fi
10269        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10270$as_echo "$tool_specified" >&6; }
10271      fi
10272    fi
10273  fi
10274
10275
10276
10277  if test "x$TOUCH" = x; then
10278    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
10279  fi
10280
10281
10282
10283
10284
10285  # Publish this variable in the help.
10286
10287
10288  if test "x$TR" = x; then
10289    # The variable is not set by user, try to locate tool using the code snippet
10290    for ac_prog in tr
10291do
10292  # Extract the first word of "$ac_prog", so it can be a program name with args.
10293set dummy $ac_prog; ac_word=$2
10294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10295$as_echo_n "checking for $ac_word... " >&6; }
10296if ${ac_cv_path_TR+:} false; then :
10297  $as_echo_n "(cached) " >&6
10298else
10299  case $TR in
10300  [\\/]* | ?:[\\/]*)
10301  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10302  ;;
10303  *)
10304  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10305for as_dir in $PATH
10306do
10307  IFS=$as_save_IFS
10308  test -z "$as_dir" && as_dir=.
10309    for ac_exec_ext in '' $ac_executable_extensions; do
10310  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10311    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10312    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10313    break 2
10314  fi
10315done
10316  done
10317IFS=$as_save_IFS
10318
10319  ;;
10320esac
10321fi
10322TR=$ac_cv_path_TR
10323if test -n "$TR"; then
10324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10325$as_echo "$TR" >&6; }
10326else
10327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10328$as_echo "no" >&6; }
10329fi
10330
10331
10332  test -n "$TR" && break
10333done
10334
10335  else
10336    # The variable is set, but is it from the command line or the environment?
10337
10338    # Try to remove the string !TR! from our list.
10339    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
10340    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10341      # If it failed, the variable was not from the command line. Ignore it,
10342      # but warn the user (except for BASH, which is always set by the calling BASH).
10343      if test "xTR" != xBASH; then
10344        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
10345$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
10346      fi
10347      # Try to locate tool using the code snippet
10348      for ac_prog in tr
10349do
10350  # Extract the first word of "$ac_prog", so it can be a program name with args.
10351set dummy $ac_prog; ac_word=$2
10352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10353$as_echo_n "checking for $ac_word... " >&6; }
10354if ${ac_cv_path_TR+:} false; then :
10355  $as_echo_n "(cached) " >&6
10356else
10357  case $TR in
10358  [\\/]* | ?:[\\/]*)
10359  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10360  ;;
10361  *)
10362  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10363for as_dir in $PATH
10364do
10365  IFS=$as_save_IFS
10366  test -z "$as_dir" && as_dir=.
10367    for ac_exec_ext in '' $ac_executable_extensions; do
10368  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10369    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10370    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10371    break 2
10372  fi
10373done
10374  done
10375IFS=$as_save_IFS
10376
10377  ;;
10378esac
10379fi
10380TR=$ac_cv_path_TR
10381if test -n "$TR"; then
10382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10383$as_echo "$TR" >&6; }
10384else
10385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10386$as_echo "no" >&6; }
10387fi
10388
10389
10390  test -n "$TR" && break
10391done
10392
10393    else
10394      # If it succeeded, then it was overridden by the user. We will use it
10395      # for the tool.
10396
10397      # First remove it from the list of overridden variables, so we can test
10398      # for unknown variables in the end.
10399      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10400
10401      # Check if the provided tool contains a complete path.
10402      tool_specified="$TR"
10403      tool_basename="${tool_specified##*/}"
10404      if test "x$tool_basename" = "x$tool_specified"; then
10405        # A command without a complete path is provided, search $PATH.
10406        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
10407$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
10408        # Extract the first word of "$tool_basename", so it can be a program name with args.
10409set dummy $tool_basename; ac_word=$2
10410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10411$as_echo_n "checking for $ac_word... " >&6; }
10412if ${ac_cv_path_TR+:} false; then :
10413  $as_echo_n "(cached) " >&6
10414else
10415  case $TR in
10416  [\\/]* | ?:[\\/]*)
10417  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10418  ;;
10419  *)
10420  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10421for as_dir in $PATH
10422do
10423  IFS=$as_save_IFS
10424  test -z "$as_dir" && as_dir=.
10425    for ac_exec_ext in '' $ac_executable_extensions; do
10426  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10427    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10428    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10429    break 2
10430  fi
10431done
10432  done
10433IFS=$as_save_IFS
10434
10435  ;;
10436esac
10437fi
10438TR=$ac_cv_path_TR
10439if test -n "$TR"; then
10440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10441$as_echo "$TR" >&6; }
10442else
10443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10444$as_echo "no" >&6; }
10445fi
10446
10447
10448        if test "x$TR" = x; then
10449          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10450        fi
10451      else
10452        # Otherwise we believe it is a complete path. Use it as it is.
10453        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
10454$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
10455        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
10456$as_echo_n "checking for TR... " >&6; }
10457        if test ! -x "$tool_specified"; then
10458          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10459$as_echo "not found" >&6; }
10460          as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
10461        fi
10462        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10463$as_echo "$tool_specified" >&6; }
10464      fi
10465    fi
10466  fi
10467
10468
10469
10470  if test "x$TR" = x; then
10471    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
10472  fi
10473
10474
10475
10476
10477
10478  # Publish this variable in the help.
10479
10480
10481  if test "x$UNAME" = x; then
10482    # The variable is not set by user, try to locate tool using the code snippet
10483    for ac_prog in uname
10484do
10485  # Extract the first word of "$ac_prog", so it can be a program name with args.
10486set dummy $ac_prog; ac_word=$2
10487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10488$as_echo_n "checking for $ac_word... " >&6; }
10489if ${ac_cv_path_UNAME+:} false; then :
10490  $as_echo_n "(cached) " >&6
10491else
10492  case $UNAME in
10493  [\\/]* | ?:[\\/]*)
10494  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10495  ;;
10496  *)
10497  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10498for as_dir in $PATH
10499do
10500  IFS=$as_save_IFS
10501  test -z "$as_dir" && as_dir=.
10502    for ac_exec_ext in '' $ac_executable_extensions; do
10503  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10504    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10505    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10506    break 2
10507  fi
10508done
10509  done
10510IFS=$as_save_IFS
10511
10512  ;;
10513esac
10514fi
10515UNAME=$ac_cv_path_UNAME
10516if test -n "$UNAME"; then
10517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10518$as_echo "$UNAME" >&6; }
10519else
10520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10521$as_echo "no" >&6; }
10522fi
10523
10524
10525  test -n "$UNAME" && break
10526done
10527
10528  else
10529    # The variable is set, but is it from the command line or the environment?
10530
10531    # Try to remove the string !UNAME! from our list.
10532    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
10533    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10534      # If it failed, the variable was not from the command line. Ignore it,
10535      # but warn the user (except for BASH, which is always set by the calling BASH).
10536      if test "xUNAME" != xBASH; then
10537        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
10538$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
10539      fi
10540      # Try to locate tool using the code snippet
10541      for ac_prog in uname
10542do
10543  # Extract the first word of "$ac_prog", so it can be a program name with args.
10544set dummy $ac_prog; ac_word=$2
10545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10546$as_echo_n "checking for $ac_word... " >&6; }
10547if ${ac_cv_path_UNAME+:} false; then :
10548  $as_echo_n "(cached) " >&6
10549else
10550  case $UNAME in
10551  [\\/]* | ?:[\\/]*)
10552  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10553  ;;
10554  *)
10555  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10556for as_dir in $PATH
10557do
10558  IFS=$as_save_IFS
10559  test -z "$as_dir" && as_dir=.
10560    for ac_exec_ext in '' $ac_executable_extensions; do
10561  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10562    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10563    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10564    break 2
10565  fi
10566done
10567  done
10568IFS=$as_save_IFS
10569
10570  ;;
10571esac
10572fi
10573UNAME=$ac_cv_path_UNAME
10574if test -n "$UNAME"; then
10575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10576$as_echo "$UNAME" >&6; }
10577else
10578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10579$as_echo "no" >&6; }
10580fi
10581
10582
10583  test -n "$UNAME" && break
10584done
10585
10586    else
10587      # If it succeeded, then it was overridden by the user. We will use it
10588      # for the tool.
10589
10590      # First remove it from the list of overridden variables, so we can test
10591      # for unknown variables in the end.
10592      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10593
10594      # Check if the provided tool contains a complete path.
10595      tool_specified="$UNAME"
10596      tool_basename="${tool_specified##*/}"
10597      if test "x$tool_basename" = "x$tool_specified"; then
10598        # A command without a complete path is provided, search $PATH.
10599        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
10600$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
10601        # Extract the first word of "$tool_basename", so it can be a program name with args.
10602set dummy $tool_basename; ac_word=$2
10603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10604$as_echo_n "checking for $ac_word... " >&6; }
10605if ${ac_cv_path_UNAME+:} false; then :
10606  $as_echo_n "(cached) " >&6
10607else
10608  case $UNAME in
10609  [\\/]* | ?:[\\/]*)
10610  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10611  ;;
10612  *)
10613  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10614for as_dir in $PATH
10615do
10616  IFS=$as_save_IFS
10617  test -z "$as_dir" && as_dir=.
10618    for ac_exec_ext in '' $ac_executable_extensions; do
10619  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10620    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10621    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10622    break 2
10623  fi
10624done
10625  done
10626IFS=$as_save_IFS
10627
10628  ;;
10629esac
10630fi
10631UNAME=$ac_cv_path_UNAME
10632if test -n "$UNAME"; then
10633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10634$as_echo "$UNAME" >&6; }
10635else
10636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10637$as_echo "no" >&6; }
10638fi
10639
10640
10641        if test "x$UNAME" = x; then
10642          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10643        fi
10644      else
10645        # Otherwise we believe it is a complete path. Use it as it is.
10646        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
10647$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
10648        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
10649$as_echo_n "checking for UNAME... " >&6; }
10650        if test ! -x "$tool_specified"; then
10651          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10652$as_echo "not found" >&6; }
10653          as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
10654        fi
10655        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10656$as_echo "$tool_specified" >&6; }
10657      fi
10658    fi
10659  fi
10660
10661
10662
10663  if test "x$UNAME" = x; then
10664    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
10665  fi
10666
10667
10668
10669
10670
10671  # Publish this variable in the help.
10672
10673
10674  if test "x$UNIQ" = x; then
10675    # The variable is not set by user, try to locate tool using the code snippet
10676    for ac_prog in uniq
10677do
10678  # Extract the first word of "$ac_prog", so it can be a program name with args.
10679set dummy $ac_prog; ac_word=$2
10680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10681$as_echo_n "checking for $ac_word... " >&6; }
10682if ${ac_cv_path_UNIQ+:} false; then :
10683  $as_echo_n "(cached) " >&6
10684else
10685  case $UNIQ in
10686  [\\/]* | ?:[\\/]*)
10687  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10688  ;;
10689  *)
10690  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10691for as_dir in $PATH
10692do
10693  IFS=$as_save_IFS
10694  test -z "$as_dir" && as_dir=.
10695    for ac_exec_ext in '' $ac_executable_extensions; do
10696  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10697    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10698    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10699    break 2
10700  fi
10701done
10702  done
10703IFS=$as_save_IFS
10704
10705  ;;
10706esac
10707fi
10708UNIQ=$ac_cv_path_UNIQ
10709if test -n "$UNIQ"; then
10710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10711$as_echo "$UNIQ" >&6; }
10712else
10713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10714$as_echo "no" >&6; }
10715fi
10716
10717
10718  test -n "$UNIQ" && break
10719done
10720
10721  else
10722    # The variable is set, but is it from the command line or the environment?
10723
10724    # Try to remove the string !UNIQ! from our list.
10725    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
10726    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10727      # If it failed, the variable was not from the command line. Ignore it,
10728      # but warn the user (except for BASH, which is always set by the calling BASH).
10729      if test "xUNIQ" != xBASH; then
10730        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
10731$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
10732      fi
10733      # Try to locate tool using the code snippet
10734      for ac_prog in uniq
10735do
10736  # Extract the first word of "$ac_prog", so it can be a program name with args.
10737set dummy $ac_prog; ac_word=$2
10738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10739$as_echo_n "checking for $ac_word... " >&6; }
10740if ${ac_cv_path_UNIQ+:} false; then :
10741  $as_echo_n "(cached) " >&6
10742else
10743  case $UNIQ in
10744  [\\/]* | ?:[\\/]*)
10745  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10746  ;;
10747  *)
10748  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10749for as_dir in $PATH
10750do
10751  IFS=$as_save_IFS
10752  test -z "$as_dir" && as_dir=.
10753    for ac_exec_ext in '' $ac_executable_extensions; do
10754  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10755    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10756    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10757    break 2
10758  fi
10759done
10760  done
10761IFS=$as_save_IFS
10762
10763  ;;
10764esac
10765fi
10766UNIQ=$ac_cv_path_UNIQ
10767if test -n "$UNIQ"; then
10768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10769$as_echo "$UNIQ" >&6; }
10770else
10771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10772$as_echo "no" >&6; }
10773fi
10774
10775
10776  test -n "$UNIQ" && break
10777done
10778
10779    else
10780      # If it succeeded, then it was overridden by the user. We will use it
10781      # for the tool.
10782
10783      # First remove it from the list of overridden variables, so we can test
10784      # for unknown variables in the end.
10785      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10786
10787      # Check if the provided tool contains a complete path.
10788      tool_specified="$UNIQ"
10789      tool_basename="${tool_specified##*/}"
10790      if test "x$tool_basename" = "x$tool_specified"; then
10791        # A command without a complete path is provided, search $PATH.
10792        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
10793$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
10794        # Extract the first word of "$tool_basename", so it can be a program name with args.
10795set dummy $tool_basename; ac_word=$2
10796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10797$as_echo_n "checking for $ac_word... " >&6; }
10798if ${ac_cv_path_UNIQ+:} false; then :
10799  $as_echo_n "(cached) " >&6
10800else
10801  case $UNIQ in
10802  [\\/]* | ?:[\\/]*)
10803  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10804  ;;
10805  *)
10806  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10807for as_dir in $PATH
10808do
10809  IFS=$as_save_IFS
10810  test -z "$as_dir" && as_dir=.
10811    for ac_exec_ext in '' $ac_executable_extensions; do
10812  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10813    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10814    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10815    break 2
10816  fi
10817done
10818  done
10819IFS=$as_save_IFS
10820
10821  ;;
10822esac
10823fi
10824UNIQ=$ac_cv_path_UNIQ
10825if test -n "$UNIQ"; then
10826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10827$as_echo "$UNIQ" >&6; }
10828else
10829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10830$as_echo "no" >&6; }
10831fi
10832
10833
10834        if test "x$UNIQ" = x; then
10835          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10836        fi
10837      else
10838        # Otherwise we believe it is a complete path. Use it as it is.
10839        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
10840$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
10841        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
10842$as_echo_n "checking for UNIQ... " >&6; }
10843        if test ! -x "$tool_specified"; then
10844          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10845$as_echo "not found" >&6; }
10846          as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
10847        fi
10848        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10849$as_echo "$tool_specified" >&6; }
10850      fi
10851    fi
10852  fi
10853
10854
10855
10856  if test "x$UNIQ" = x; then
10857    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
10858  fi
10859
10860
10861
10862
10863
10864  # Publish this variable in the help.
10865
10866
10867  if test "x$WC" = x; then
10868    # The variable is not set by user, try to locate tool using the code snippet
10869    for ac_prog in wc
10870do
10871  # Extract the first word of "$ac_prog", so it can be a program name with args.
10872set dummy $ac_prog; ac_word=$2
10873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10874$as_echo_n "checking for $ac_word... " >&6; }
10875if ${ac_cv_path_WC+:} false; then :
10876  $as_echo_n "(cached) " >&6
10877else
10878  case $WC in
10879  [\\/]* | ?:[\\/]*)
10880  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10881  ;;
10882  *)
10883  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10884for as_dir in $PATH
10885do
10886  IFS=$as_save_IFS
10887  test -z "$as_dir" && as_dir=.
10888    for ac_exec_ext in '' $ac_executable_extensions; do
10889  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10890    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10891    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10892    break 2
10893  fi
10894done
10895  done
10896IFS=$as_save_IFS
10897
10898  ;;
10899esac
10900fi
10901WC=$ac_cv_path_WC
10902if test -n "$WC"; then
10903  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10904$as_echo "$WC" >&6; }
10905else
10906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10907$as_echo "no" >&6; }
10908fi
10909
10910
10911  test -n "$WC" && break
10912done
10913
10914  else
10915    # The variable is set, but is it from the command line or the environment?
10916
10917    # Try to remove the string !WC! from our list.
10918    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
10919    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10920      # If it failed, the variable was not from the command line. Ignore it,
10921      # but warn the user (except for BASH, which is always set by the calling BASH).
10922      if test "xWC" != xBASH; then
10923        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
10924$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
10925      fi
10926      # Try to locate tool using the code snippet
10927      for ac_prog in wc
10928do
10929  # Extract the first word of "$ac_prog", so it can be a program name with args.
10930set dummy $ac_prog; ac_word=$2
10931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10932$as_echo_n "checking for $ac_word... " >&6; }
10933if ${ac_cv_path_WC+:} false; then :
10934  $as_echo_n "(cached) " >&6
10935else
10936  case $WC in
10937  [\\/]* | ?:[\\/]*)
10938  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10939  ;;
10940  *)
10941  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10942for as_dir in $PATH
10943do
10944  IFS=$as_save_IFS
10945  test -z "$as_dir" && as_dir=.
10946    for ac_exec_ext in '' $ac_executable_extensions; do
10947  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10948    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10949    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10950    break 2
10951  fi
10952done
10953  done
10954IFS=$as_save_IFS
10955
10956  ;;
10957esac
10958fi
10959WC=$ac_cv_path_WC
10960if test -n "$WC"; then
10961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10962$as_echo "$WC" >&6; }
10963else
10964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10965$as_echo "no" >&6; }
10966fi
10967
10968
10969  test -n "$WC" && break
10970done
10971
10972    else
10973      # If it succeeded, then it was overridden by the user. We will use it
10974      # for the tool.
10975
10976      # First remove it from the list of overridden variables, so we can test
10977      # for unknown variables in the end.
10978      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10979
10980      # Check if the provided tool contains a complete path.
10981      tool_specified="$WC"
10982      tool_basename="${tool_specified##*/}"
10983      if test "x$tool_basename" = "x$tool_specified"; then
10984        # A command without a complete path is provided, search $PATH.
10985        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
10986$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
10987        # Extract the first word of "$tool_basename", so it can be a program name with args.
10988set dummy $tool_basename; ac_word=$2
10989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10990$as_echo_n "checking for $ac_word... " >&6; }
10991if ${ac_cv_path_WC+:} false; then :
10992  $as_echo_n "(cached) " >&6
10993else
10994  case $WC in
10995  [\\/]* | ?:[\\/]*)
10996  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10997  ;;
10998  *)
10999  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11000for as_dir in $PATH
11001do
11002  IFS=$as_save_IFS
11003  test -z "$as_dir" && as_dir=.
11004    for ac_exec_ext in '' $ac_executable_extensions; do
11005  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11006    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11007    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11008    break 2
11009  fi
11010done
11011  done
11012IFS=$as_save_IFS
11013
11014  ;;
11015esac
11016fi
11017WC=$ac_cv_path_WC
11018if test -n "$WC"; then
11019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11020$as_echo "$WC" >&6; }
11021else
11022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11023$as_echo "no" >&6; }
11024fi
11025
11026
11027        if test "x$WC" = x; then
11028          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11029        fi
11030      else
11031        # Otherwise we believe it is a complete path. Use it as it is.
11032        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
11033$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
11034        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
11035$as_echo_n "checking for WC... " >&6; }
11036        if test ! -x "$tool_specified"; then
11037          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11038$as_echo "not found" >&6; }
11039          as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
11040        fi
11041        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11042$as_echo "$tool_specified" >&6; }
11043      fi
11044    fi
11045  fi
11046
11047
11048
11049  if test "x$WC" = x; then
11050    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
11051  fi
11052
11053
11054
11055
11056
11057  # Publish this variable in the help.
11058
11059
11060  if test "x$WHICH" = x; then
11061    # The variable is not set by user, try to locate tool using the code snippet
11062    for ac_prog in which
11063do
11064  # Extract the first word of "$ac_prog", so it can be a program name with args.
11065set dummy $ac_prog; ac_word=$2
11066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11067$as_echo_n "checking for $ac_word... " >&6; }
11068if ${ac_cv_path_WHICH+:} false; then :
11069  $as_echo_n "(cached) " >&6
11070else
11071  case $WHICH in
11072  [\\/]* | ?:[\\/]*)
11073  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11074  ;;
11075  *)
11076  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11077for as_dir in $PATH
11078do
11079  IFS=$as_save_IFS
11080  test -z "$as_dir" && as_dir=.
11081    for ac_exec_ext in '' $ac_executable_extensions; do
11082  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11083    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11084    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11085    break 2
11086  fi
11087done
11088  done
11089IFS=$as_save_IFS
11090
11091  ;;
11092esac
11093fi
11094WHICH=$ac_cv_path_WHICH
11095if test -n "$WHICH"; then
11096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11097$as_echo "$WHICH" >&6; }
11098else
11099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11100$as_echo "no" >&6; }
11101fi
11102
11103
11104  test -n "$WHICH" && break
11105done
11106
11107  else
11108    # The variable is set, but is it from the command line or the environment?
11109
11110    # Try to remove the string !WHICH! from our list.
11111    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
11112    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11113      # If it failed, the variable was not from the command line. Ignore it,
11114      # but warn the user (except for BASH, which is always set by the calling BASH).
11115      if test "xWHICH" != xBASH; then
11116        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
11117$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
11118      fi
11119      # Try to locate tool using the code snippet
11120      for ac_prog in which
11121do
11122  # Extract the first word of "$ac_prog", so it can be a program name with args.
11123set dummy $ac_prog; ac_word=$2
11124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11125$as_echo_n "checking for $ac_word... " >&6; }
11126if ${ac_cv_path_WHICH+:} false; then :
11127  $as_echo_n "(cached) " >&6
11128else
11129  case $WHICH in
11130  [\\/]* | ?:[\\/]*)
11131  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11132  ;;
11133  *)
11134  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11135for as_dir in $PATH
11136do
11137  IFS=$as_save_IFS
11138  test -z "$as_dir" && as_dir=.
11139    for ac_exec_ext in '' $ac_executable_extensions; do
11140  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11141    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11142    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11143    break 2
11144  fi
11145done
11146  done
11147IFS=$as_save_IFS
11148
11149  ;;
11150esac
11151fi
11152WHICH=$ac_cv_path_WHICH
11153if test -n "$WHICH"; then
11154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11155$as_echo "$WHICH" >&6; }
11156else
11157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11158$as_echo "no" >&6; }
11159fi
11160
11161
11162  test -n "$WHICH" && break
11163done
11164
11165    else
11166      # If it succeeded, then it was overridden by the user. We will use it
11167      # for the tool.
11168
11169      # First remove it from the list of overridden variables, so we can test
11170      # for unknown variables in the end.
11171      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11172
11173      # Check if the provided tool contains a complete path.
11174      tool_specified="$WHICH"
11175      tool_basename="${tool_specified##*/}"
11176      if test "x$tool_basename" = "x$tool_specified"; then
11177        # A command without a complete path is provided, search $PATH.
11178        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
11179$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
11180        # Extract the first word of "$tool_basename", so it can be a program name with args.
11181set dummy $tool_basename; ac_word=$2
11182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11183$as_echo_n "checking for $ac_word... " >&6; }
11184if ${ac_cv_path_WHICH+:} false; then :
11185  $as_echo_n "(cached) " >&6
11186else
11187  case $WHICH in
11188  [\\/]* | ?:[\\/]*)
11189  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11190  ;;
11191  *)
11192  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11193for as_dir in $PATH
11194do
11195  IFS=$as_save_IFS
11196  test -z "$as_dir" && as_dir=.
11197    for ac_exec_ext in '' $ac_executable_extensions; do
11198  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11199    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11200    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11201    break 2
11202  fi
11203done
11204  done
11205IFS=$as_save_IFS
11206
11207  ;;
11208esac
11209fi
11210WHICH=$ac_cv_path_WHICH
11211if test -n "$WHICH"; then
11212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11213$as_echo "$WHICH" >&6; }
11214else
11215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11216$as_echo "no" >&6; }
11217fi
11218
11219
11220        if test "x$WHICH" = x; then
11221          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11222        fi
11223      else
11224        # Otherwise we believe it is a complete path. Use it as it is.
11225        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
11226$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
11227        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11228$as_echo_n "checking for WHICH... " >&6; }
11229        if test ! -x "$tool_specified"; then
11230          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11231$as_echo "not found" >&6; }
11232          as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
11233        fi
11234        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11235$as_echo "$tool_specified" >&6; }
11236      fi
11237    fi
11238  fi
11239
11240
11241
11242  if test "x$WHICH" = x; then
11243    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
11244  fi
11245
11246
11247
11248
11249
11250  # Publish this variable in the help.
11251
11252
11253  if test "x$XARGS" = x; then
11254    # The variable is not set by user, try to locate tool using the code snippet
11255    for ac_prog in xargs
11256do
11257  # Extract the first word of "$ac_prog", so it can be a program name with args.
11258set dummy $ac_prog; ac_word=$2
11259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11260$as_echo_n "checking for $ac_word... " >&6; }
11261if ${ac_cv_path_XARGS+:} false; then :
11262  $as_echo_n "(cached) " >&6
11263else
11264  case $XARGS in
11265  [\\/]* | ?:[\\/]*)
11266  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11267  ;;
11268  *)
11269  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11270for as_dir in $PATH
11271do
11272  IFS=$as_save_IFS
11273  test -z "$as_dir" && as_dir=.
11274    for ac_exec_ext in '' $ac_executable_extensions; do
11275  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11276    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11277    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11278    break 2
11279  fi
11280done
11281  done
11282IFS=$as_save_IFS
11283
11284  ;;
11285esac
11286fi
11287XARGS=$ac_cv_path_XARGS
11288if test -n "$XARGS"; then
11289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11290$as_echo "$XARGS" >&6; }
11291else
11292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11293$as_echo "no" >&6; }
11294fi
11295
11296
11297  test -n "$XARGS" && break
11298done
11299
11300  else
11301    # The variable is set, but is it from the command line or the environment?
11302
11303    # Try to remove the string !XARGS! from our list.
11304    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
11305    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11306      # If it failed, the variable was not from the command line. Ignore it,
11307      # but warn the user (except for BASH, which is always set by the calling BASH).
11308      if test "xXARGS" != xBASH; then
11309        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
11310$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
11311      fi
11312      # Try to locate tool using the code snippet
11313      for ac_prog in xargs
11314do
11315  # Extract the first word of "$ac_prog", so it can be a program name with args.
11316set dummy $ac_prog; ac_word=$2
11317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11318$as_echo_n "checking for $ac_word... " >&6; }
11319if ${ac_cv_path_XARGS+:} false; then :
11320  $as_echo_n "(cached) " >&6
11321else
11322  case $XARGS in
11323  [\\/]* | ?:[\\/]*)
11324  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11325  ;;
11326  *)
11327  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11328for as_dir in $PATH
11329do
11330  IFS=$as_save_IFS
11331  test -z "$as_dir" && as_dir=.
11332    for ac_exec_ext in '' $ac_executable_extensions; do
11333  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11334    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11335    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11336    break 2
11337  fi
11338done
11339  done
11340IFS=$as_save_IFS
11341
11342  ;;
11343esac
11344fi
11345XARGS=$ac_cv_path_XARGS
11346if test -n "$XARGS"; then
11347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11348$as_echo "$XARGS" >&6; }
11349else
11350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11351$as_echo "no" >&6; }
11352fi
11353
11354
11355  test -n "$XARGS" && break
11356done
11357
11358    else
11359      # If it succeeded, then it was overridden by the user. We will use it
11360      # for the tool.
11361
11362      # First remove it from the list of overridden variables, so we can test
11363      # for unknown variables in the end.
11364      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11365
11366      # Check if the provided tool contains a complete path.
11367      tool_specified="$XARGS"
11368      tool_basename="${tool_specified##*/}"
11369      if test "x$tool_basename" = "x$tool_specified"; then
11370        # A command without a complete path is provided, search $PATH.
11371        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
11372$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
11373        # Extract the first word of "$tool_basename", so it can be a program name with args.
11374set dummy $tool_basename; ac_word=$2
11375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11376$as_echo_n "checking for $ac_word... " >&6; }
11377if ${ac_cv_path_XARGS+:} false; then :
11378  $as_echo_n "(cached) " >&6
11379else
11380  case $XARGS in
11381  [\\/]* | ?:[\\/]*)
11382  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11383  ;;
11384  *)
11385  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11386for as_dir in $PATH
11387do
11388  IFS=$as_save_IFS
11389  test -z "$as_dir" && as_dir=.
11390    for ac_exec_ext in '' $ac_executable_extensions; do
11391  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11392    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11393    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11394    break 2
11395  fi
11396done
11397  done
11398IFS=$as_save_IFS
11399
11400  ;;
11401esac
11402fi
11403XARGS=$ac_cv_path_XARGS
11404if test -n "$XARGS"; then
11405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11406$as_echo "$XARGS" >&6; }
11407else
11408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11409$as_echo "no" >&6; }
11410fi
11411
11412
11413        if test "x$XARGS" = x; then
11414          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11415        fi
11416      else
11417        # Otherwise we believe it is a complete path. Use it as it is.
11418        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
11419$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
11420        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
11421$as_echo_n "checking for XARGS... " >&6; }
11422        if test ! -x "$tool_specified"; then
11423          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11424$as_echo "not found" >&6; }
11425          as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
11426        fi
11427        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11428$as_echo "$tool_specified" >&6; }
11429      fi
11430    fi
11431  fi
11432
11433
11434
11435  if test "x$XARGS" = x; then
11436    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
11437  fi
11438
11439
11440
11441  # Then required tools that require some special treatment.
11442
11443
11444  # Publish this variable in the help.
11445
11446
11447  if test "x$AWK" = x; then
11448    # The variable is not set by user, try to locate tool using the code snippet
11449    for ac_prog in gawk mawk nawk awk
11450do
11451  # Extract the first word of "$ac_prog", so it can be a program name with args.
11452set dummy $ac_prog; ac_word=$2
11453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11454$as_echo_n "checking for $ac_word... " >&6; }
11455if ${ac_cv_prog_AWK+:} false; then :
11456  $as_echo_n "(cached) " >&6
11457else
11458  if test -n "$AWK"; then
11459  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11460else
11461as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11462for as_dir in $PATH
11463do
11464  IFS=$as_save_IFS
11465  test -z "$as_dir" && as_dir=.
11466    for ac_exec_ext in '' $ac_executable_extensions; do
11467  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11468    ac_cv_prog_AWK="$ac_prog"
11469    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11470    break 2
11471  fi
11472done
11473  done
11474IFS=$as_save_IFS
11475
11476fi
11477fi
11478AWK=$ac_cv_prog_AWK
11479if test -n "$AWK"; then
11480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11481$as_echo "$AWK" >&6; }
11482else
11483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11484$as_echo "no" >&6; }
11485fi
11486
11487
11488  test -n "$AWK" && break
11489done
11490
11491  else
11492    # The variable is set, but is it from the command line or the environment?
11493
11494    # Try to remove the string !AWK! from our list.
11495    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
11496    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11497      # If it failed, the variable was not from the command line. Ignore it,
11498      # but warn the user (except for BASH, which is always set by the calling BASH).
11499      if test "xAWK" != xBASH; then
11500        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
11501$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
11502      fi
11503      # Try to locate tool using the code snippet
11504      for ac_prog in gawk mawk nawk awk
11505do
11506  # Extract the first word of "$ac_prog", so it can be a program name with args.
11507set dummy $ac_prog; ac_word=$2
11508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11509$as_echo_n "checking for $ac_word... " >&6; }
11510if ${ac_cv_prog_AWK+:} false; then :
11511  $as_echo_n "(cached) " >&6
11512else
11513  if test -n "$AWK"; then
11514  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11515else
11516as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11517for as_dir in $PATH
11518do
11519  IFS=$as_save_IFS
11520  test -z "$as_dir" && as_dir=.
11521    for ac_exec_ext in '' $ac_executable_extensions; do
11522  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11523    ac_cv_prog_AWK="$ac_prog"
11524    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11525    break 2
11526  fi
11527done
11528  done
11529IFS=$as_save_IFS
11530
11531fi
11532fi
11533AWK=$ac_cv_prog_AWK
11534if test -n "$AWK"; then
11535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11536$as_echo "$AWK" >&6; }
11537else
11538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11539$as_echo "no" >&6; }
11540fi
11541
11542
11543  test -n "$AWK" && break
11544done
11545
11546    else
11547      # If it succeeded, then it was overridden by the user. We will use it
11548      # for the tool.
11549
11550      # First remove it from the list of overridden variables, so we can test
11551      # for unknown variables in the end.
11552      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11553
11554      # Check if the provided tool contains a complete path.
11555      tool_specified="$AWK"
11556      tool_basename="${tool_specified##*/}"
11557      if test "x$tool_basename" = "x$tool_specified"; then
11558        # A command without a complete path is provided, search $PATH.
11559        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
11560$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
11561        # Extract the first word of "$tool_basename", so it can be a program name with args.
11562set dummy $tool_basename; ac_word=$2
11563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11564$as_echo_n "checking for $ac_word... " >&6; }
11565if ${ac_cv_path_AWK+:} false; then :
11566  $as_echo_n "(cached) " >&6
11567else
11568  case $AWK in
11569  [\\/]* | ?:[\\/]*)
11570  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
11571  ;;
11572  *)
11573  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11574for as_dir in $PATH
11575do
11576  IFS=$as_save_IFS
11577  test -z "$as_dir" && as_dir=.
11578    for ac_exec_ext in '' $ac_executable_extensions; do
11579  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11580    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
11581    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11582    break 2
11583  fi
11584done
11585  done
11586IFS=$as_save_IFS
11587
11588  ;;
11589esac
11590fi
11591AWK=$ac_cv_path_AWK
11592if test -n "$AWK"; then
11593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11594$as_echo "$AWK" >&6; }
11595else
11596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11597$as_echo "no" >&6; }
11598fi
11599
11600
11601        if test "x$AWK" = x; then
11602          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11603        fi
11604      else
11605        # Otherwise we believe it is a complete path. Use it as it is.
11606        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
11607$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
11608        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
11609$as_echo_n "checking for AWK... " >&6; }
11610        if test ! -x "$tool_specified"; then
11611          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11612$as_echo "not found" >&6; }
11613          as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
11614        fi
11615        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11616$as_echo "$tool_specified" >&6; }
11617      fi
11618    fi
11619  fi
11620
11621
11622  if test "x$AWK" = x; then
11623    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
11624  fi
11625
11626
11627
11628
11629  # Publish this variable in the help.
11630
11631
11632  if test "x$GREP" = x; then
11633    # The variable is not set by user, try to locate tool using the code snippet
11634    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11635$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11636if ${ac_cv_path_GREP+:} false; then :
11637  $as_echo_n "(cached) " >&6
11638else
11639  if test -z "$GREP"; then
11640  ac_path_GREP_found=false
11641  # Loop through the user's path and test for each of PROGNAME-LIST
11642  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11643for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11644do
11645  IFS=$as_save_IFS
11646  test -z "$as_dir" && as_dir=.
11647    for ac_prog in grep ggrep; do
11648    for ac_exec_ext in '' $ac_executable_extensions; do
11649      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11650      as_fn_executable_p "$ac_path_GREP" || continue
11651# Check for GNU ac_path_GREP and select it if it is found.
11652  # Check for GNU $ac_path_GREP
11653case `"$ac_path_GREP" --version 2>&1` in
11654*GNU*)
11655  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11656*)
11657  ac_count=0
11658  $as_echo_n 0123456789 >"conftest.in"
11659  while :
11660  do
11661    cat "conftest.in" "conftest.in" >"conftest.tmp"
11662    mv "conftest.tmp" "conftest.in"
11663    cp "conftest.in" "conftest.nl"
11664    $as_echo 'GREP' >> "conftest.nl"
11665    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11666    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11667    as_fn_arith $ac_count + 1 && ac_count=$as_val
11668    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11669      # Best one so far, save it but keep looking for a better one
11670      ac_cv_path_GREP="$ac_path_GREP"
11671      ac_path_GREP_max=$ac_count
11672    fi
11673    # 10*(2^10) chars as input seems more than enough
11674    test $ac_count -gt 10 && break
11675  done
11676  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11677esac
11678
11679      $ac_path_GREP_found && break 3
11680    done
11681  done
11682  done
11683IFS=$as_save_IFS
11684  if test -z "$ac_cv_path_GREP"; then
11685    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11686  fi
11687else
11688  ac_cv_path_GREP=$GREP
11689fi
11690
11691fi
11692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11693$as_echo "$ac_cv_path_GREP" >&6; }
11694 GREP="$ac_cv_path_GREP"
11695
11696
11697  else
11698    # The variable is set, but is it from the command line or the environment?
11699
11700    # Try to remove the string !GREP! from our list.
11701    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
11702    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11703      # If it failed, the variable was not from the command line. Ignore it,
11704      # but warn the user (except for BASH, which is always set by the calling BASH).
11705      if test "xGREP" != xBASH; then
11706        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
11707$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
11708      fi
11709      # Try to locate tool using the code snippet
11710      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11711$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11712if ${ac_cv_path_GREP+:} false; then :
11713  $as_echo_n "(cached) " >&6
11714else
11715  if test -z "$GREP"; then
11716  ac_path_GREP_found=false
11717  # Loop through the user's path and test for each of PROGNAME-LIST
11718  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11719for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11720do
11721  IFS=$as_save_IFS
11722  test -z "$as_dir" && as_dir=.
11723    for ac_prog in grep ggrep; do
11724    for ac_exec_ext in '' $ac_executable_extensions; do
11725      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11726      as_fn_executable_p "$ac_path_GREP" || continue
11727# Check for GNU ac_path_GREP and select it if it is found.
11728  # Check for GNU $ac_path_GREP
11729case `"$ac_path_GREP" --version 2>&1` in
11730*GNU*)
11731  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11732*)
11733  ac_count=0
11734  $as_echo_n 0123456789 >"conftest.in"
11735  while :
11736  do
11737    cat "conftest.in" "conftest.in" >"conftest.tmp"
11738    mv "conftest.tmp" "conftest.in"
11739    cp "conftest.in" "conftest.nl"
11740    $as_echo 'GREP' >> "conftest.nl"
11741    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11742    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11743    as_fn_arith $ac_count + 1 && ac_count=$as_val
11744    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11745      # Best one so far, save it but keep looking for a better one
11746      ac_cv_path_GREP="$ac_path_GREP"
11747      ac_path_GREP_max=$ac_count
11748    fi
11749    # 10*(2^10) chars as input seems more than enough
11750    test $ac_count -gt 10 && break
11751  done
11752  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11753esac
11754
11755      $ac_path_GREP_found && break 3
11756    done
11757  done
11758  done
11759IFS=$as_save_IFS
11760  if test -z "$ac_cv_path_GREP"; then
11761    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11762  fi
11763else
11764  ac_cv_path_GREP=$GREP
11765fi
11766
11767fi
11768{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11769$as_echo "$ac_cv_path_GREP" >&6; }
11770 GREP="$ac_cv_path_GREP"
11771
11772
11773    else
11774      # If it succeeded, then it was overridden by the user. We will use it
11775      # for the tool.
11776
11777      # First remove it from the list of overridden variables, so we can test
11778      # for unknown variables in the end.
11779      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11780
11781      # Check if the provided tool contains a complete path.
11782      tool_specified="$GREP"
11783      tool_basename="${tool_specified##*/}"
11784      if test "x$tool_basename" = "x$tool_specified"; then
11785        # A command without a complete path is provided, search $PATH.
11786        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
11787$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
11788        # Extract the first word of "$tool_basename", so it can be a program name with args.
11789set dummy $tool_basename; ac_word=$2
11790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11791$as_echo_n "checking for $ac_word... " >&6; }
11792if ${ac_cv_path_GREP+:} false; then :
11793  $as_echo_n "(cached) " >&6
11794else
11795  case $GREP in
11796  [\\/]* | ?:[\\/]*)
11797  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
11798  ;;
11799  *)
11800  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11801for as_dir in $PATH
11802do
11803  IFS=$as_save_IFS
11804  test -z "$as_dir" && as_dir=.
11805    for ac_exec_ext in '' $ac_executable_extensions; do
11806  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11807    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
11808    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11809    break 2
11810  fi
11811done
11812  done
11813IFS=$as_save_IFS
11814
11815  ;;
11816esac
11817fi
11818GREP=$ac_cv_path_GREP
11819if test -n "$GREP"; then
11820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
11821$as_echo "$GREP" >&6; }
11822else
11823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11824$as_echo "no" >&6; }
11825fi
11826
11827
11828        if test "x$GREP" = x; then
11829          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11830        fi
11831      else
11832        # Otherwise we believe it is a complete path. Use it as it is.
11833        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
11834$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
11835        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
11836$as_echo_n "checking for GREP... " >&6; }
11837        if test ! -x "$tool_specified"; then
11838          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11839$as_echo "not found" >&6; }
11840          as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
11841        fi
11842        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11843$as_echo "$tool_specified" >&6; }
11844      fi
11845    fi
11846  fi
11847
11848
11849  if test "x$GREP" = x; then
11850    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
11851  fi
11852
11853
11854
11855
11856  # Publish this variable in the help.
11857
11858
11859  if test "x$EGREP" = x; then
11860    # The variable is not set by user, try to locate tool using the code snippet
11861    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11862$as_echo_n "checking for egrep... " >&6; }
11863if ${ac_cv_path_EGREP+:} false; then :
11864  $as_echo_n "(cached) " >&6
11865else
11866  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11867   then ac_cv_path_EGREP="$GREP -E"
11868   else
11869     if test -z "$EGREP"; then
11870  ac_path_EGREP_found=false
11871  # Loop through the user's path and test for each of PROGNAME-LIST
11872  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11873for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11874do
11875  IFS=$as_save_IFS
11876  test -z "$as_dir" && as_dir=.
11877    for ac_prog in egrep; do
11878    for ac_exec_ext in '' $ac_executable_extensions; do
11879      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11880      as_fn_executable_p "$ac_path_EGREP" || continue
11881# Check for GNU ac_path_EGREP and select it if it is found.
11882  # Check for GNU $ac_path_EGREP
11883case `"$ac_path_EGREP" --version 2>&1` in
11884*GNU*)
11885  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11886*)
11887  ac_count=0
11888  $as_echo_n 0123456789 >"conftest.in"
11889  while :
11890  do
11891    cat "conftest.in" "conftest.in" >"conftest.tmp"
11892    mv "conftest.tmp" "conftest.in"
11893    cp "conftest.in" "conftest.nl"
11894    $as_echo 'EGREP' >> "conftest.nl"
11895    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11896    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11897    as_fn_arith $ac_count + 1 && ac_count=$as_val
11898    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11899      # Best one so far, save it but keep looking for a better one
11900      ac_cv_path_EGREP="$ac_path_EGREP"
11901      ac_path_EGREP_max=$ac_count
11902    fi
11903    # 10*(2^10) chars as input seems more than enough
11904    test $ac_count -gt 10 && break
11905  done
11906  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11907esac
11908
11909      $ac_path_EGREP_found && break 3
11910    done
11911  done
11912  done
11913IFS=$as_save_IFS
11914  if test -z "$ac_cv_path_EGREP"; then
11915    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11916  fi
11917else
11918  ac_cv_path_EGREP=$EGREP
11919fi
11920
11921   fi
11922fi
11923{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11924$as_echo "$ac_cv_path_EGREP" >&6; }
11925 EGREP="$ac_cv_path_EGREP"
11926
11927
11928  else
11929    # The variable is set, but is it from the command line or the environment?
11930
11931    # Try to remove the string !EGREP! from our list.
11932    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
11933    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11934      # If it failed, the variable was not from the command line. Ignore it,
11935      # but warn the user (except for BASH, which is always set by the calling BASH).
11936      if test "xEGREP" != xBASH; then
11937        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
11938$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
11939      fi
11940      # Try to locate tool using the code snippet
11941      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11942$as_echo_n "checking for egrep... " >&6; }
11943if ${ac_cv_path_EGREP+:} false; then :
11944  $as_echo_n "(cached) " >&6
11945else
11946  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11947   then ac_cv_path_EGREP="$GREP -E"
11948   else
11949     if test -z "$EGREP"; then
11950  ac_path_EGREP_found=false
11951  # Loop through the user's path and test for each of PROGNAME-LIST
11952  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11953for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11954do
11955  IFS=$as_save_IFS
11956  test -z "$as_dir" && as_dir=.
11957    for ac_prog in egrep; do
11958    for ac_exec_ext in '' $ac_executable_extensions; do
11959      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11960      as_fn_executable_p "$ac_path_EGREP" || continue
11961# Check for GNU ac_path_EGREP and select it if it is found.
11962  # Check for GNU $ac_path_EGREP
11963case `"$ac_path_EGREP" --version 2>&1` in
11964*GNU*)
11965  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11966*)
11967  ac_count=0
11968  $as_echo_n 0123456789 >"conftest.in"
11969  while :
11970  do
11971    cat "conftest.in" "conftest.in" >"conftest.tmp"
11972    mv "conftest.tmp" "conftest.in"
11973    cp "conftest.in" "conftest.nl"
11974    $as_echo 'EGREP' >> "conftest.nl"
11975    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11976    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11977    as_fn_arith $ac_count + 1 && ac_count=$as_val
11978    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11979      # Best one so far, save it but keep looking for a better one
11980      ac_cv_path_EGREP="$ac_path_EGREP"
11981      ac_path_EGREP_max=$ac_count
11982    fi
11983    # 10*(2^10) chars as input seems more than enough
11984    test $ac_count -gt 10 && break
11985  done
11986  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11987esac
11988
11989      $ac_path_EGREP_found && break 3
11990    done
11991  done
11992  done
11993IFS=$as_save_IFS
11994  if test -z "$ac_cv_path_EGREP"; then
11995    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11996  fi
11997else
11998  ac_cv_path_EGREP=$EGREP
11999fi
12000
12001   fi
12002fi
12003{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
12004$as_echo "$ac_cv_path_EGREP" >&6; }
12005 EGREP="$ac_cv_path_EGREP"
12006
12007
12008    else
12009      # If it succeeded, then it was overridden by the user. We will use it
12010      # for the tool.
12011
12012      # First remove it from the list of overridden variables, so we can test
12013      # for unknown variables in the end.
12014      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12015
12016      # Check if the provided tool contains a complete path.
12017      tool_specified="$EGREP"
12018      tool_basename="${tool_specified##*/}"
12019      if test "x$tool_basename" = "x$tool_specified"; then
12020        # A command without a complete path is provided, search $PATH.
12021        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
12022$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
12023        # Extract the first word of "$tool_basename", so it can be a program name with args.
12024set dummy $tool_basename; ac_word=$2
12025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12026$as_echo_n "checking for $ac_word... " >&6; }
12027if ${ac_cv_path_EGREP+:} false; then :
12028  $as_echo_n "(cached) " >&6
12029else
12030  case $EGREP in
12031  [\\/]* | ?:[\\/]*)
12032  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
12033  ;;
12034  *)
12035  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12036for as_dir in $PATH
12037do
12038  IFS=$as_save_IFS
12039  test -z "$as_dir" && as_dir=.
12040    for ac_exec_ext in '' $ac_executable_extensions; do
12041  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12042    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
12043    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12044    break 2
12045  fi
12046done
12047  done
12048IFS=$as_save_IFS
12049
12050  ;;
12051esac
12052fi
12053EGREP=$ac_cv_path_EGREP
12054if test -n "$EGREP"; then
12055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
12056$as_echo "$EGREP" >&6; }
12057else
12058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12059$as_echo "no" >&6; }
12060fi
12061
12062
12063        if test "x$EGREP" = x; then
12064          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12065        fi
12066      else
12067        # Otherwise we believe it is a complete path. Use it as it is.
12068        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
12069$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
12070        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
12071$as_echo_n "checking for EGREP... " >&6; }
12072        if test ! -x "$tool_specified"; then
12073          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12074$as_echo "not found" >&6; }
12075          as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12076        fi
12077        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12078$as_echo "$tool_specified" >&6; }
12079      fi
12080    fi
12081  fi
12082
12083
12084  if test "x$EGREP" = x; then
12085    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
12086  fi
12087
12088
12089
12090
12091  # Publish this variable in the help.
12092
12093
12094  if test "x$FGREP" = x; then
12095    # The variable is not set by user, try to locate tool using the code snippet
12096    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12097$as_echo_n "checking for fgrep... " >&6; }
12098if ${ac_cv_path_FGREP+:} false; then :
12099  $as_echo_n "(cached) " >&6
12100else
12101  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12102   then ac_cv_path_FGREP="$GREP -F"
12103   else
12104     if test -z "$FGREP"; then
12105  ac_path_FGREP_found=false
12106  # Loop through the user's path and test for each of PROGNAME-LIST
12107  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12108for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12109do
12110  IFS=$as_save_IFS
12111  test -z "$as_dir" && as_dir=.
12112    for ac_prog in fgrep; do
12113    for ac_exec_ext in '' $ac_executable_extensions; do
12114      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12115      as_fn_executable_p "$ac_path_FGREP" || continue
12116# Check for GNU ac_path_FGREP and select it if it is found.
12117  # Check for GNU $ac_path_FGREP
12118case `"$ac_path_FGREP" --version 2>&1` in
12119*GNU*)
12120  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12121*)
12122  ac_count=0
12123  $as_echo_n 0123456789 >"conftest.in"
12124  while :
12125  do
12126    cat "conftest.in" "conftest.in" >"conftest.tmp"
12127    mv "conftest.tmp" "conftest.in"
12128    cp "conftest.in" "conftest.nl"
12129    $as_echo 'FGREP' >> "conftest.nl"
12130    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12131    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12132    as_fn_arith $ac_count + 1 && ac_count=$as_val
12133    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12134      # Best one so far, save it but keep looking for a better one
12135      ac_cv_path_FGREP="$ac_path_FGREP"
12136      ac_path_FGREP_max=$ac_count
12137    fi
12138    # 10*(2^10) chars as input seems more than enough
12139    test $ac_count -gt 10 && break
12140  done
12141  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12142esac
12143
12144      $ac_path_FGREP_found && break 3
12145    done
12146  done
12147  done
12148IFS=$as_save_IFS
12149  if test -z "$ac_cv_path_FGREP"; then
12150    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12151  fi
12152else
12153  ac_cv_path_FGREP=$FGREP
12154fi
12155
12156   fi
12157fi
12158{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12159$as_echo "$ac_cv_path_FGREP" >&6; }
12160 FGREP="$ac_cv_path_FGREP"
12161
12162
12163  else
12164    # The variable is set, but is it from the command line or the environment?
12165
12166    # Try to remove the string !FGREP! from our list.
12167    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
12168    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12169      # If it failed, the variable was not from the command line. Ignore it,
12170      # but warn the user (except for BASH, which is always set by the calling BASH).
12171      if test "xFGREP" != xBASH; then
12172        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
12173$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
12174      fi
12175      # Try to locate tool using the code snippet
12176      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12177$as_echo_n "checking for fgrep... " >&6; }
12178if ${ac_cv_path_FGREP+:} false; then :
12179  $as_echo_n "(cached) " >&6
12180else
12181  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12182   then ac_cv_path_FGREP="$GREP -F"
12183   else
12184     if test -z "$FGREP"; then
12185  ac_path_FGREP_found=false
12186  # Loop through the user's path and test for each of PROGNAME-LIST
12187  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12188for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12189do
12190  IFS=$as_save_IFS
12191  test -z "$as_dir" && as_dir=.
12192    for ac_prog in fgrep; do
12193    for ac_exec_ext in '' $ac_executable_extensions; do
12194      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12195      as_fn_executable_p "$ac_path_FGREP" || continue
12196# Check for GNU ac_path_FGREP and select it if it is found.
12197  # Check for GNU $ac_path_FGREP
12198case `"$ac_path_FGREP" --version 2>&1` in
12199*GNU*)
12200  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12201*)
12202  ac_count=0
12203  $as_echo_n 0123456789 >"conftest.in"
12204  while :
12205  do
12206    cat "conftest.in" "conftest.in" >"conftest.tmp"
12207    mv "conftest.tmp" "conftest.in"
12208    cp "conftest.in" "conftest.nl"
12209    $as_echo 'FGREP' >> "conftest.nl"
12210    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12211    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12212    as_fn_arith $ac_count + 1 && ac_count=$as_val
12213    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12214      # Best one so far, save it but keep looking for a better one
12215      ac_cv_path_FGREP="$ac_path_FGREP"
12216      ac_path_FGREP_max=$ac_count
12217    fi
12218    # 10*(2^10) chars as input seems more than enough
12219    test $ac_count -gt 10 && break
12220  done
12221  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12222esac
12223
12224      $ac_path_FGREP_found && break 3
12225    done
12226  done
12227  done
12228IFS=$as_save_IFS
12229  if test -z "$ac_cv_path_FGREP"; then
12230    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12231  fi
12232else
12233  ac_cv_path_FGREP=$FGREP
12234fi
12235
12236   fi
12237fi
12238{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12239$as_echo "$ac_cv_path_FGREP" >&6; }
12240 FGREP="$ac_cv_path_FGREP"
12241
12242
12243    else
12244      # If it succeeded, then it was overridden by the user. We will use it
12245      # for the tool.
12246
12247      # First remove it from the list of overridden variables, so we can test
12248      # for unknown variables in the end.
12249      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12250
12251      # Check if the provided tool contains a complete path.
12252      tool_specified="$FGREP"
12253      tool_basename="${tool_specified##*/}"
12254      if test "x$tool_basename" = "x$tool_specified"; then
12255        # A command without a complete path is provided, search $PATH.
12256        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
12257$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
12258        # Extract the first word of "$tool_basename", so it can be a program name with args.
12259set dummy $tool_basename; ac_word=$2
12260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12261$as_echo_n "checking for $ac_word... " >&6; }
12262if ${ac_cv_path_FGREP+:} false; then :
12263  $as_echo_n "(cached) " >&6
12264else
12265  case $FGREP in
12266  [\\/]* | ?:[\\/]*)
12267  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
12268  ;;
12269  *)
12270  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12271for as_dir in $PATH
12272do
12273  IFS=$as_save_IFS
12274  test -z "$as_dir" && as_dir=.
12275    for ac_exec_ext in '' $ac_executable_extensions; do
12276  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12277    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
12278    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12279    break 2
12280  fi
12281done
12282  done
12283IFS=$as_save_IFS
12284
12285  ;;
12286esac
12287fi
12288FGREP=$ac_cv_path_FGREP
12289if test -n "$FGREP"; then
12290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
12291$as_echo "$FGREP" >&6; }
12292else
12293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12294$as_echo "no" >&6; }
12295fi
12296
12297
12298        if test "x$FGREP" = x; then
12299          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12300        fi
12301      else
12302        # Otherwise we believe it is a complete path. Use it as it is.
12303        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
12304$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
12305        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
12306$as_echo_n "checking for FGREP... " >&6; }
12307        if test ! -x "$tool_specified"; then
12308          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12309$as_echo "not found" >&6; }
12310          as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12311        fi
12312        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12313$as_echo "$tool_specified" >&6; }
12314      fi
12315    fi
12316  fi
12317
12318
12319  if test "x$FGREP" = x; then
12320    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
12321  fi
12322
12323
12324
12325
12326  # Publish this variable in the help.
12327
12328
12329  if test "x$SED" = x; then
12330    # The variable is not set by user, try to locate tool using the code snippet
12331    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12332$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12333if ${ac_cv_path_SED+:} false; then :
12334  $as_echo_n "(cached) " >&6
12335else
12336            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12337     for ac_i in 1 2 3 4 5 6 7; do
12338       ac_script="$ac_script$as_nl$ac_script"
12339     done
12340     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12341     { ac_script=; unset ac_script;}
12342     if test -z "$SED"; then
12343  ac_path_SED_found=false
12344  # Loop through the user's path and test for each of PROGNAME-LIST
12345  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12346for as_dir in $PATH
12347do
12348  IFS=$as_save_IFS
12349  test -z "$as_dir" && as_dir=.
12350    for ac_prog in sed gsed; do
12351    for ac_exec_ext in '' $ac_executable_extensions; do
12352      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12353      as_fn_executable_p "$ac_path_SED" || continue
12354# Check for GNU ac_path_SED and select it if it is found.
12355  # Check for GNU $ac_path_SED
12356case `"$ac_path_SED" --version 2>&1` in
12357*GNU*)
12358  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12359*)
12360  ac_count=0
12361  $as_echo_n 0123456789 >"conftest.in"
12362  while :
12363  do
12364    cat "conftest.in" "conftest.in" >"conftest.tmp"
12365    mv "conftest.tmp" "conftest.in"
12366    cp "conftest.in" "conftest.nl"
12367    $as_echo '' >> "conftest.nl"
12368    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12369    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12370    as_fn_arith $ac_count + 1 && ac_count=$as_val
12371    if test $ac_count -gt ${ac_path_SED_max-0}; then
12372      # Best one so far, save it but keep looking for a better one
12373      ac_cv_path_SED="$ac_path_SED"
12374      ac_path_SED_max=$ac_count
12375    fi
12376    # 10*(2^10) chars as input seems more than enough
12377    test $ac_count -gt 10 && break
12378  done
12379  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12380esac
12381
12382      $ac_path_SED_found && break 3
12383    done
12384  done
12385  done
12386IFS=$as_save_IFS
12387  if test -z "$ac_cv_path_SED"; then
12388    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12389  fi
12390else
12391  ac_cv_path_SED=$SED
12392fi
12393
12394fi
12395{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12396$as_echo "$ac_cv_path_SED" >&6; }
12397 SED="$ac_cv_path_SED"
12398  rm -f conftest.sed
12399
12400  else
12401    # The variable is set, but is it from the command line or the environment?
12402
12403    # Try to remove the string !SED! from our list.
12404    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
12405    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12406      # If it failed, the variable was not from the command line. Ignore it,
12407      # but warn the user (except for BASH, which is always set by the calling BASH).
12408      if test "xSED" != xBASH; then
12409        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
12410$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
12411      fi
12412      # Try to locate tool using the code snippet
12413      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12414$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12415if ${ac_cv_path_SED+:} false; then :
12416  $as_echo_n "(cached) " >&6
12417else
12418            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12419     for ac_i in 1 2 3 4 5 6 7; do
12420       ac_script="$ac_script$as_nl$ac_script"
12421     done
12422     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12423     { ac_script=; unset ac_script;}
12424     if test -z "$SED"; then
12425  ac_path_SED_found=false
12426  # Loop through the user's path and test for each of PROGNAME-LIST
12427  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12428for as_dir in $PATH
12429do
12430  IFS=$as_save_IFS
12431  test -z "$as_dir" && as_dir=.
12432    for ac_prog in sed gsed; do
12433    for ac_exec_ext in '' $ac_executable_extensions; do
12434      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12435      as_fn_executable_p "$ac_path_SED" || continue
12436# Check for GNU ac_path_SED and select it if it is found.
12437  # Check for GNU $ac_path_SED
12438case `"$ac_path_SED" --version 2>&1` in
12439*GNU*)
12440  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12441*)
12442  ac_count=0
12443  $as_echo_n 0123456789 >"conftest.in"
12444  while :
12445  do
12446    cat "conftest.in" "conftest.in" >"conftest.tmp"
12447    mv "conftest.tmp" "conftest.in"
12448    cp "conftest.in" "conftest.nl"
12449    $as_echo '' >> "conftest.nl"
12450    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12451    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12452    as_fn_arith $ac_count + 1 && ac_count=$as_val
12453    if test $ac_count -gt ${ac_path_SED_max-0}; then
12454      # Best one so far, save it but keep looking for a better one
12455      ac_cv_path_SED="$ac_path_SED"
12456      ac_path_SED_max=$ac_count
12457    fi
12458    # 10*(2^10) chars as input seems more than enough
12459    test $ac_count -gt 10 && break
12460  done
12461  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12462esac
12463
12464      $ac_path_SED_found && break 3
12465    done
12466  done
12467  done
12468IFS=$as_save_IFS
12469  if test -z "$ac_cv_path_SED"; then
12470    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12471  fi
12472else
12473  ac_cv_path_SED=$SED
12474fi
12475
12476fi
12477{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12478$as_echo "$ac_cv_path_SED" >&6; }
12479 SED="$ac_cv_path_SED"
12480  rm -f conftest.sed
12481
12482    else
12483      # If it succeeded, then it was overridden by the user. We will use it
12484      # for the tool.
12485
12486      # First remove it from the list of overridden variables, so we can test
12487      # for unknown variables in the end.
12488      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12489
12490      # Check if the provided tool contains a complete path.
12491      tool_specified="$SED"
12492      tool_basename="${tool_specified##*/}"
12493      if test "x$tool_basename" = "x$tool_specified"; then
12494        # A command without a complete path is provided, search $PATH.
12495        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
12496$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
12497        # Extract the first word of "$tool_basename", so it can be a program name with args.
12498set dummy $tool_basename; ac_word=$2
12499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12500$as_echo_n "checking for $ac_word... " >&6; }
12501if ${ac_cv_path_SED+:} false; then :
12502  $as_echo_n "(cached) " >&6
12503else
12504  case $SED in
12505  [\\/]* | ?:[\\/]*)
12506  ac_cv_path_SED="$SED" # Let the user override the test with a path.
12507  ;;
12508  *)
12509  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12510for as_dir in $PATH
12511do
12512  IFS=$as_save_IFS
12513  test -z "$as_dir" && as_dir=.
12514    for ac_exec_ext in '' $ac_executable_extensions; do
12515  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12516    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
12517    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12518    break 2
12519  fi
12520done
12521  done
12522IFS=$as_save_IFS
12523
12524  ;;
12525esac
12526fi
12527SED=$ac_cv_path_SED
12528if test -n "$SED"; then
12529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
12530$as_echo "$SED" >&6; }
12531else
12532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12533$as_echo "no" >&6; }
12534fi
12535
12536
12537        if test "x$SED" = x; then
12538          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12539        fi
12540      else
12541        # Otherwise we believe it is a complete path. Use it as it is.
12542        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
12543$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
12544        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
12545$as_echo_n "checking for SED... " >&6; }
12546        if test ! -x "$tool_specified"; then
12547          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12548$as_echo "not found" >&6; }
12549          as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
12550        fi
12551        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12552$as_echo "$tool_specified" >&6; }
12553      fi
12554    fi
12555  fi
12556
12557
12558  if test "x$SED" = x; then
12559    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
12560  fi
12561
12562
12563
12564  # Always force rm.
12565  RM="$RM -f"
12566
12567  # pwd behaves differently on various platforms and some don't support the -L flag.
12568  # Always use the bash builtin pwd to get uniform behavior.
12569  THEPWDCMD=pwd
12570
12571  # These are not required on all platforms
12572
12573
12574  # Publish this variable in the help.
12575
12576
12577  if test "x$CYGPATH" = x; then
12578    # The variable is not set by user, try to locate tool using the code snippet
12579    for ac_prog in cygpath
12580do
12581  # Extract the first word of "$ac_prog", so it can be a program name with args.
12582set dummy $ac_prog; ac_word=$2
12583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12584$as_echo_n "checking for $ac_word... " >&6; }
12585if ${ac_cv_path_CYGPATH+:} false; then :
12586  $as_echo_n "(cached) " >&6
12587else
12588  case $CYGPATH in
12589  [\\/]* | ?:[\\/]*)
12590  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12591  ;;
12592  *)
12593  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12594for as_dir in $PATH
12595do
12596  IFS=$as_save_IFS
12597  test -z "$as_dir" && as_dir=.
12598    for ac_exec_ext in '' $ac_executable_extensions; do
12599  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12600    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12601    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12602    break 2
12603  fi
12604done
12605  done
12606IFS=$as_save_IFS
12607
12608  ;;
12609esac
12610fi
12611CYGPATH=$ac_cv_path_CYGPATH
12612if test -n "$CYGPATH"; then
12613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12614$as_echo "$CYGPATH" >&6; }
12615else
12616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12617$as_echo "no" >&6; }
12618fi
12619
12620
12621  test -n "$CYGPATH" && break
12622done
12623
12624  else
12625    # The variable is set, but is it from the command line or the environment?
12626
12627    # Try to remove the string !CYGPATH! from our list.
12628    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
12629    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12630      # If it failed, the variable was not from the command line. Ignore it,
12631      # but warn the user (except for BASH, which is always set by the calling BASH).
12632      if test "xCYGPATH" != xBASH; then
12633        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
12634$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
12635      fi
12636      # Try to locate tool using the code snippet
12637      for ac_prog in cygpath
12638do
12639  # Extract the first word of "$ac_prog", so it can be a program name with args.
12640set dummy $ac_prog; ac_word=$2
12641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12642$as_echo_n "checking for $ac_word... " >&6; }
12643if ${ac_cv_path_CYGPATH+:} false; then :
12644  $as_echo_n "(cached) " >&6
12645else
12646  case $CYGPATH in
12647  [\\/]* | ?:[\\/]*)
12648  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12649  ;;
12650  *)
12651  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12652for as_dir in $PATH
12653do
12654  IFS=$as_save_IFS
12655  test -z "$as_dir" && as_dir=.
12656    for ac_exec_ext in '' $ac_executable_extensions; do
12657  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12658    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12659    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12660    break 2
12661  fi
12662done
12663  done
12664IFS=$as_save_IFS
12665
12666  ;;
12667esac
12668fi
12669CYGPATH=$ac_cv_path_CYGPATH
12670if test -n "$CYGPATH"; then
12671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12672$as_echo "$CYGPATH" >&6; }
12673else
12674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12675$as_echo "no" >&6; }
12676fi
12677
12678
12679  test -n "$CYGPATH" && break
12680done
12681
12682    else
12683      # If it succeeded, then it was overridden by the user. We will use it
12684      # for the tool.
12685
12686      # First remove it from the list of overridden variables, so we can test
12687      # for unknown variables in the end.
12688      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12689
12690      # Check if the provided tool contains a complete path.
12691      tool_specified="$CYGPATH"
12692      tool_basename="${tool_specified##*/}"
12693      if test "x$tool_basename" = "x$tool_specified"; then
12694        # A command without a complete path is provided, search $PATH.
12695        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
12696$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
12697        # Extract the first word of "$tool_basename", so it can be a program name with args.
12698set dummy $tool_basename; ac_word=$2
12699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12700$as_echo_n "checking for $ac_word... " >&6; }
12701if ${ac_cv_path_CYGPATH+:} false; then :
12702  $as_echo_n "(cached) " >&6
12703else
12704  case $CYGPATH in
12705  [\\/]* | ?:[\\/]*)
12706  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12707  ;;
12708  *)
12709  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12710for as_dir in $PATH
12711do
12712  IFS=$as_save_IFS
12713  test -z "$as_dir" && as_dir=.
12714    for ac_exec_ext in '' $ac_executable_extensions; do
12715  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12716    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12717    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12718    break 2
12719  fi
12720done
12721  done
12722IFS=$as_save_IFS
12723
12724  ;;
12725esac
12726fi
12727CYGPATH=$ac_cv_path_CYGPATH
12728if test -n "$CYGPATH"; then
12729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12730$as_echo "$CYGPATH" >&6; }
12731else
12732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12733$as_echo "no" >&6; }
12734fi
12735
12736
12737        if test "x$CYGPATH" = x; then
12738          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12739        fi
12740      else
12741        # Otherwise we believe it is a complete path. Use it as it is.
12742        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
12743$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
12744        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
12745$as_echo_n "checking for CYGPATH... " >&6; }
12746        if test ! -x "$tool_specified"; then
12747          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12748$as_echo "not found" >&6; }
12749          as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
12750        fi
12751        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12752$as_echo "$tool_specified" >&6; }
12753      fi
12754    fi
12755  fi
12756
12757
12758
12759
12760  # Publish this variable in the help.
12761
12762
12763  if test "x$READLINK" = x; then
12764    # The variable is not set by user, try to locate tool using the code snippet
12765    for ac_prog in greadlink readlink
12766do
12767  # Extract the first word of "$ac_prog", so it can be a program name with args.
12768set dummy $ac_prog; ac_word=$2
12769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12770$as_echo_n "checking for $ac_word... " >&6; }
12771if ${ac_cv_path_READLINK+:} false; then :
12772  $as_echo_n "(cached) " >&6
12773else
12774  case $READLINK in
12775  [\\/]* | ?:[\\/]*)
12776  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12777  ;;
12778  *)
12779  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12780for as_dir in $PATH
12781do
12782  IFS=$as_save_IFS
12783  test -z "$as_dir" && as_dir=.
12784    for ac_exec_ext in '' $ac_executable_extensions; do
12785  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12786    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12787    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12788    break 2
12789  fi
12790done
12791  done
12792IFS=$as_save_IFS
12793
12794  ;;
12795esac
12796fi
12797READLINK=$ac_cv_path_READLINK
12798if test -n "$READLINK"; then
12799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12800$as_echo "$READLINK" >&6; }
12801else
12802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12803$as_echo "no" >&6; }
12804fi
12805
12806
12807  test -n "$READLINK" && break
12808done
12809
12810  else
12811    # The variable is set, but is it from the command line or the environment?
12812
12813    # Try to remove the string !READLINK! from our list.
12814    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
12815    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12816      # If it failed, the variable was not from the command line. Ignore it,
12817      # but warn the user (except for BASH, which is always set by the calling BASH).
12818      if test "xREADLINK" != xBASH; then
12819        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
12820$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
12821      fi
12822      # Try to locate tool using the code snippet
12823      for ac_prog in greadlink readlink
12824do
12825  # Extract the first word of "$ac_prog", so it can be a program name with args.
12826set dummy $ac_prog; ac_word=$2
12827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12828$as_echo_n "checking for $ac_word... " >&6; }
12829if ${ac_cv_path_READLINK+:} false; then :
12830  $as_echo_n "(cached) " >&6
12831else
12832  case $READLINK in
12833  [\\/]* | ?:[\\/]*)
12834  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12835  ;;
12836  *)
12837  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12838for as_dir in $PATH
12839do
12840  IFS=$as_save_IFS
12841  test -z "$as_dir" && as_dir=.
12842    for ac_exec_ext in '' $ac_executable_extensions; do
12843  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12844    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12845    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12846    break 2
12847  fi
12848done
12849  done
12850IFS=$as_save_IFS
12851
12852  ;;
12853esac
12854fi
12855READLINK=$ac_cv_path_READLINK
12856if test -n "$READLINK"; then
12857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12858$as_echo "$READLINK" >&6; }
12859else
12860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12861$as_echo "no" >&6; }
12862fi
12863
12864
12865  test -n "$READLINK" && break
12866done
12867
12868    else
12869      # If it succeeded, then it was overridden by the user. We will use it
12870      # for the tool.
12871
12872      # First remove it from the list of overridden variables, so we can test
12873      # for unknown variables in the end.
12874      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12875
12876      # Check if the provided tool contains a complete path.
12877      tool_specified="$READLINK"
12878      tool_basename="${tool_specified##*/}"
12879      if test "x$tool_basename" = "x$tool_specified"; then
12880        # A command without a complete path is provided, search $PATH.
12881        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
12882$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
12883        # Extract the first word of "$tool_basename", so it can be a program name with args.
12884set dummy $tool_basename; ac_word=$2
12885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12886$as_echo_n "checking for $ac_word... " >&6; }
12887if ${ac_cv_path_READLINK+:} false; then :
12888  $as_echo_n "(cached) " >&6
12889else
12890  case $READLINK in
12891  [\\/]* | ?:[\\/]*)
12892  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12893  ;;
12894  *)
12895  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12896for as_dir in $PATH
12897do
12898  IFS=$as_save_IFS
12899  test -z "$as_dir" && as_dir=.
12900    for ac_exec_ext in '' $ac_executable_extensions; do
12901  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12902    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12903    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12904    break 2
12905  fi
12906done
12907  done
12908IFS=$as_save_IFS
12909
12910  ;;
12911esac
12912fi
12913READLINK=$ac_cv_path_READLINK
12914if test -n "$READLINK"; then
12915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12916$as_echo "$READLINK" >&6; }
12917else
12918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12919$as_echo "no" >&6; }
12920fi
12921
12922
12923        if test "x$READLINK" = x; then
12924          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12925        fi
12926      else
12927        # Otherwise we believe it is a complete path. Use it as it is.
12928        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
12929$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
12930        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
12931$as_echo_n "checking for READLINK... " >&6; }
12932        if test ! -x "$tool_specified"; then
12933          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12934$as_echo "not found" >&6; }
12935          as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
12936        fi
12937        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12938$as_echo "$tool_specified" >&6; }
12939      fi
12940    fi
12941  fi
12942
12943
12944
12945
12946  # Publish this variable in the help.
12947
12948
12949  if test "x$DF" = x; then
12950    # The variable is not set by user, try to locate tool using the code snippet
12951    for ac_prog in df
12952do
12953  # Extract the first word of "$ac_prog", so it can be a program name with args.
12954set dummy $ac_prog; ac_word=$2
12955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12956$as_echo_n "checking for $ac_word... " >&6; }
12957if ${ac_cv_path_DF+:} false; then :
12958  $as_echo_n "(cached) " >&6
12959else
12960  case $DF in
12961  [\\/]* | ?:[\\/]*)
12962  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12963  ;;
12964  *)
12965  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12966for as_dir in $PATH
12967do
12968  IFS=$as_save_IFS
12969  test -z "$as_dir" && as_dir=.
12970    for ac_exec_ext in '' $ac_executable_extensions; do
12971  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12972    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12973    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12974    break 2
12975  fi
12976done
12977  done
12978IFS=$as_save_IFS
12979
12980  ;;
12981esac
12982fi
12983DF=$ac_cv_path_DF
12984if test -n "$DF"; then
12985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12986$as_echo "$DF" >&6; }
12987else
12988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12989$as_echo "no" >&6; }
12990fi
12991
12992
12993  test -n "$DF" && break
12994done
12995
12996  else
12997    # The variable is set, but is it from the command line or the environment?
12998
12999    # Try to remove the string !DF! from our list.
13000    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
13001    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13002      # If it failed, the variable was not from the command line. Ignore it,
13003      # but warn the user (except for BASH, which is always set by the calling BASH).
13004      if test "xDF" != xBASH; then
13005        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
13006$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
13007      fi
13008      # Try to locate tool using the code snippet
13009      for ac_prog in df
13010do
13011  # Extract the first word of "$ac_prog", so it can be a program name with args.
13012set dummy $ac_prog; ac_word=$2
13013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13014$as_echo_n "checking for $ac_word... " >&6; }
13015if ${ac_cv_path_DF+:} false; then :
13016  $as_echo_n "(cached) " >&6
13017else
13018  case $DF in
13019  [\\/]* | ?:[\\/]*)
13020  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13021  ;;
13022  *)
13023  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13024for as_dir in $PATH
13025do
13026  IFS=$as_save_IFS
13027  test -z "$as_dir" && as_dir=.
13028    for ac_exec_ext in '' $ac_executable_extensions; do
13029  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13030    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13031    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13032    break 2
13033  fi
13034done
13035  done
13036IFS=$as_save_IFS
13037
13038  ;;
13039esac
13040fi
13041DF=$ac_cv_path_DF
13042if test -n "$DF"; then
13043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13044$as_echo "$DF" >&6; }
13045else
13046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13047$as_echo "no" >&6; }
13048fi
13049
13050
13051  test -n "$DF" && break
13052done
13053
13054    else
13055      # If it succeeded, then it was overridden by the user. We will use it
13056      # for the tool.
13057
13058      # First remove it from the list of overridden variables, so we can test
13059      # for unknown variables in the end.
13060      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13061
13062      # Check if the provided tool contains a complete path.
13063      tool_specified="$DF"
13064      tool_basename="${tool_specified##*/}"
13065      if test "x$tool_basename" = "x$tool_specified"; then
13066        # A command without a complete path is provided, search $PATH.
13067        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
13068$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
13069        # Extract the first word of "$tool_basename", so it can be a program name with args.
13070set dummy $tool_basename; ac_word=$2
13071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13072$as_echo_n "checking for $ac_word... " >&6; }
13073if ${ac_cv_path_DF+:} false; then :
13074  $as_echo_n "(cached) " >&6
13075else
13076  case $DF in
13077  [\\/]* | ?:[\\/]*)
13078  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13079  ;;
13080  *)
13081  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13082for as_dir in $PATH
13083do
13084  IFS=$as_save_IFS
13085  test -z "$as_dir" && as_dir=.
13086    for ac_exec_ext in '' $ac_executable_extensions; do
13087  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13088    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13089    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13090    break 2
13091  fi
13092done
13093  done
13094IFS=$as_save_IFS
13095
13096  ;;
13097esac
13098fi
13099DF=$ac_cv_path_DF
13100if test -n "$DF"; then
13101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13102$as_echo "$DF" >&6; }
13103else
13104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13105$as_echo "no" >&6; }
13106fi
13107
13108
13109        if test "x$DF" = x; then
13110          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13111        fi
13112      else
13113        # Otherwise we believe it is a complete path. Use it as it is.
13114        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
13115$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
13116        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
13117$as_echo_n "checking for DF... " >&6; }
13118        if test ! -x "$tool_specified"; then
13119          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13120$as_echo "not found" >&6; }
13121          as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
13122        fi
13123        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13124$as_echo "$tool_specified" >&6; }
13125      fi
13126    fi
13127  fi
13128
13129
13130
13131
13132  # Publish this variable in the help.
13133
13134
13135  if test "x$SETFILE" = x; then
13136    # The variable is not set by user, try to locate tool using the code snippet
13137    for ac_prog in SetFile
13138do
13139  # Extract the first word of "$ac_prog", so it can be a program name with args.
13140set dummy $ac_prog; ac_word=$2
13141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13142$as_echo_n "checking for $ac_word... " >&6; }
13143if ${ac_cv_path_SETFILE+:} false; then :
13144  $as_echo_n "(cached) " >&6
13145else
13146  case $SETFILE in
13147  [\\/]* | ?:[\\/]*)
13148  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13149  ;;
13150  *)
13151  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13152for as_dir in $PATH
13153do
13154  IFS=$as_save_IFS
13155  test -z "$as_dir" && as_dir=.
13156    for ac_exec_ext in '' $ac_executable_extensions; do
13157  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13158    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13159    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13160    break 2
13161  fi
13162done
13163  done
13164IFS=$as_save_IFS
13165
13166  ;;
13167esac
13168fi
13169SETFILE=$ac_cv_path_SETFILE
13170if test -n "$SETFILE"; then
13171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13172$as_echo "$SETFILE" >&6; }
13173else
13174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13175$as_echo "no" >&6; }
13176fi
13177
13178
13179  test -n "$SETFILE" && break
13180done
13181
13182  else
13183    # The variable is set, but is it from the command line or the environment?
13184
13185    # Try to remove the string !SETFILE! from our list.
13186    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
13187    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13188      # If it failed, the variable was not from the command line. Ignore it,
13189      # but warn the user (except for BASH, which is always set by the calling BASH).
13190      if test "xSETFILE" != xBASH; then
13191        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
13192$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
13193      fi
13194      # Try to locate tool using the code snippet
13195      for ac_prog in SetFile
13196do
13197  # Extract the first word of "$ac_prog", so it can be a program name with args.
13198set dummy $ac_prog; ac_word=$2
13199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13200$as_echo_n "checking for $ac_word... " >&6; }
13201if ${ac_cv_path_SETFILE+:} false; then :
13202  $as_echo_n "(cached) " >&6
13203else
13204  case $SETFILE in
13205  [\\/]* | ?:[\\/]*)
13206  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13207  ;;
13208  *)
13209  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13210for as_dir in $PATH
13211do
13212  IFS=$as_save_IFS
13213  test -z "$as_dir" && as_dir=.
13214    for ac_exec_ext in '' $ac_executable_extensions; do
13215  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13216    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13217    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13218    break 2
13219  fi
13220done
13221  done
13222IFS=$as_save_IFS
13223
13224  ;;
13225esac
13226fi
13227SETFILE=$ac_cv_path_SETFILE
13228if test -n "$SETFILE"; then
13229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13230$as_echo "$SETFILE" >&6; }
13231else
13232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13233$as_echo "no" >&6; }
13234fi
13235
13236
13237  test -n "$SETFILE" && break
13238done
13239
13240    else
13241      # If it succeeded, then it was overridden by the user. We will use it
13242      # for the tool.
13243
13244      # First remove it from the list of overridden variables, so we can test
13245      # for unknown variables in the end.
13246      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13247
13248      # Check if the provided tool contains a complete path.
13249      tool_specified="$SETFILE"
13250      tool_basename="${tool_specified##*/}"
13251      if test "x$tool_basename" = "x$tool_specified"; then
13252        # A command without a complete path is provided, search $PATH.
13253        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
13254$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
13255        # Extract the first word of "$tool_basename", so it can be a program name with args.
13256set dummy $tool_basename; ac_word=$2
13257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13258$as_echo_n "checking for $ac_word... " >&6; }
13259if ${ac_cv_path_SETFILE+:} false; then :
13260  $as_echo_n "(cached) " >&6
13261else
13262  case $SETFILE in
13263  [\\/]* | ?:[\\/]*)
13264  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13265  ;;
13266  *)
13267  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13268for as_dir in $PATH
13269do
13270  IFS=$as_save_IFS
13271  test -z "$as_dir" && as_dir=.
13272    for ac_exec_ext in '' $ac_executable_extensions; do
13273  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13274    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13275    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13276    break 2
13277  fi
13278done
13279  done
13280IFS=$as_save_IFS
13281
13282  ;;
13283esac
13284fi
13285SETFILE=$ac_cv_path_SETFILE
13286if test -n "$SETFILE"; then
13287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13288$as_echo "$SETFILE" >&6; }
13289else
13290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13291$as_echo "no" >&6; }
13292fi
13293
13294
13295        if test "x$SETFILE" = x; then
13296          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13297        fi
13298      else
13299        # Otherwise we believe it is a complete path. Use it as it is.
13300        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
13301$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
13302        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
13303$as_echo_n "checking for SETFILE... " >&6; }
13304        if test ! -x "$tool_specified"; then
13305          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13306$as_echo "not found" >&6; }
13307          as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
13308        fi
13309        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13310$as_echo "$tool_specified" >&6; }
13311      fi
13312    fi
13313  fi
13314
13315
13316
13317
13318  # Publish this variable in the help.
13319
13320
13321  if test "x$CPIO" = x; then
13322    # The variable is not set by user, try to locate tool using the code snippet
13323    for ac_prog in cpio bsdcpio
13324do
13325  # Extract the first word of "$ac_prog", so it can be a program name with args.
13326set dummy $ac_prog; ac_word=$2
13327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13328$as_echo_n "checking for $ac_word... " >&6; }
13329if ${ac_cv_path_CPIO+:} false; then :
13330  $as_echo_n "(cached) " >&6
13331else
13332  case $CPIO in
13333  [\\/]* | ?:[\\/]*)
13334  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13335  ;;
13336  *)
13337  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13338for as_dir in $PATH
13339do
13340  IFS=$as_save_IFS
13341  test -z "$as_dir" && as_dir=.
13342    for ac_exec_ext in '' $ac_executable_extensions; do
13343  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13344    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13345    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13346    break 2
13347  fi
13348done
13349  done
13350IFS=$as_save_IFS
13351
13352  ;;
13353esac
13354fi
13355CPIO=$ac_cv_path_CPIO
13356if test -n "$CPIO"; then
13357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13358$as_echo "$CPIO" >&6; }
13359else
13360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13361$as_echo "no" >&6; }
13362fi
13363
13364
13365  test -n "$CPIO" && break
13366done
13367
13368  else
13369    # The variable is set, but is it from the command line or the environment?
13370
13371    # Try to remove the string !CPIO! from our list.
13372    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
13373    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13374      # If it failed, the variable was not from the command line. Ignore it,
13375      # but warn the user (except for BASH, which is always set by the calling BASH).
13376      if test "xCPIO" != xBASH; then
13377        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
13378$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
13379      fi
13380      # Try to locate tool using the code snippet
13381      for ac_prog in cpio bsdcpio
13382do
13383  # Extract the first word of "$ac_prog", so it can be a program name with args.
13384set dummy $ac_prog; ac_word=$2
13385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13386$as_echo_n "checking for $ac_word... " >&6; }
13387if ${ac_cv_path_CPIO+:} false; then :
13388  $as_echo_n "(cached) " >&6
13389else
13390  case $CPIO in
13391  [\\/]* | ?:[\\/]*)
13392  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13393  ;;
13394  *)
13395  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13396for as_dir in $PATH
13397do
13398  IFS=$as_save_IFS
13399  test -z "$as_dir" && as_dir=.
13400    for ac_exec_ext in '' $ac_executable_extensions; do
13401  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13402    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13403    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13404    break 2
13405  fi
13406done
13407  done
13408IFS=$as_save_IFS
13409
13410  ;;
13411esac
13412fi
13413CPIO=$ac_cv_path_CPIO
13414if test -n "$CPIO"; then
13415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13416$as_echo "$CPIO" >&6; }
13417else
13418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13419$as_echo "no" >&6; }
13420fi
13421
13422
13423  test -n "$CPIO" && break
13424done
13425
13426    else
13427      # If it succeeded, then it was overridden by the user. We will use it
13428      # for the tool.
13429
13430      # First remove it from the list of overridden variables, so we can test
13431      # for unknown variables in the end.
13432      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13433
13434      # Check if the provided tool contains a complete path.
13435      tool_specified="$CPIO"
13436      tool_basename="${tool_specified##*/}"
13437      if test "x$tool_basename" = "x$tool_specified"; then
13438        # A command without a complete path is provided, search $PATH.
13439        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
13440$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
13441        # Extract the first word of "$tool_basename", so it can be a program name with args.
13442set dummy $tool_basename; ac_word=$2
13443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13444$as_echo_n "checking for $ac_word... " >&6; }
13445if ${ac_cv_path_CPIO+:} false; then :
13446  $as_echo_n "(cached) " >&6
13447else
13448  case $CPIO in
13449  [\\/]* | ?:[\\/]*)
13450  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13451  ;;
13452  *)
13453  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13454for as_dir in $PATH
13455do
13456  IFS=$as_save_IFS
13457  test -z "$as_dir" && as_dir=.
13458    for ac_exec_ext in '' $ac_executable_extensions; do
13459  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13460    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13461    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13462    break 2
13463  fi
13464done
13465  done
13466IFS=$as_save_IFS
13467
13468  ;;
13469esac
13470fi
13471CPIO=$ac_cv_path_CPIO
13472if test -n "$CPIO"; then
13473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13474$as_echo "$CPIO" >&6; }
13475else
13476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13477$as_echo "no" >&6; }
13478fi
13479
13480
13481        if test "x$CPIO" = x; then
13482          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13483        fi
13484      else
13485        # Otherwise we believe it is a complete path. Use it as it is.
13486        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
13487$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
13488        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
13489$as_echo_n "checking for CPIO... " >&6; }
13490        if test ! -x "$tool_specified"; then
13491          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13492$as_echo "not found" >&6; }
13493          as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
13494        fi
13495        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13496$as_echo "$tool_specified" >&6; }
13497      fi
13498    fi
13499  fi
13500
13501
13502
13503
13504# Now we can determine OpenJDK build and target platforms. This is required to
13505# have early on.
13506# Make sure we can run config.sub.
13507$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
13508  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
13509
13510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
13511$as_echo_n "checking build system type... " >&6; }
13512if ${ac_cv_build+:} false; then :
13513  $as_echo_n "(cached) " >&6
13514else
13515  ac_build_alias=$build_alias
13516test "x$ac_build_alias" = x &&
13517  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
13518test "x$ac_build_alias" = x &&
13519  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
13520ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
13521  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
13522
13523fi
13524{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
13525$as_echo "$ac_cv_build" >&6; }
13526case $ac_cv_build in
13527*-*-*) ;;
13528*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
13529esac
13530build=$ac_cv_build
13531ac_save_IFS=$IFS; IFS='-'
13532set x $ac_cv_build
13533shift
13534build_cpu=$1
13535build_vendor=$2
13536shift; shift
13537# Remember, the first character of IFS is used to create $*,
13538# except with old shells:
13539build_os=$*
13540IFS=$ac_save_IFS
13541case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
13542
13543
13544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
13545$as_echo_n "checking host system type... " >&6; }
13546if ${ac_cv_host+:} false; then :
13547  $as_echo_n "(cached) " >&6
13548else
13549  if test "x$host_alias" = x; then
13550  ac_cv_host=$ac_cv_build
13551else
13552  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
13553    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
13554fi
13555
13556fi
13557{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
13558$as_echo "$ac_cv_host" >&6; }
13559case $ac_cv_host in
13560*-*-*) ;;
13561*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
13562esac
13563host=$ac_cv_host
13564ac_save_IFS=$IFS; IFS='-'
13565set x $ac_cv_host
13566shift
13567host_cpu=$1
13568host_vendor=$2
13569shift; shift
13570# Remember, the first character of IFS is used to create $*,
13571# except with old shells:
13572host_os=$*
13573IFS=$ac_save_IFS
13574case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
13575
13576
13577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
13578$as_echo_n "checking target system type... " >&6; }
13579if ${ac_cv_target+:} false; then :
13580  $as_echo_n "(cached) " >&6
13581else
13582  if test "x$target_alias" = x; then
13583  ac_cv_target=$ac_cv_host
13584else
13585  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
13586    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
13587fi
13588
13589fi
13590{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
13591$as_echo "$ac_cv_target" >&6; }
13592case $ac_cv_target in
13593*-*-*) ;;
13594*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
13595esac
13596target=$ac_cv_target
13597ac_save_IFS=$IFS; IFS='-'
13598set x $ac_cv_target
13599shift
13600target_cpu=$1
13601target_vendor=$2
13602shift; shift
13603# Remember, the first character of IFS is used to create $*,
13604# except with old shells:
13605target_os=$*
13606IFS=$ac_save_IFS
13607case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
13608
13609
13610# The aliases save the names the user supplied, while $host etc.
13611# will get canonicalized.
13612test -n "$target_alias" &&
13613  test "$program_prefix$program_suffix$program_transform_name" = \
13614    NONENONEs,x,x, &&
13615  program_prefix=${target_alias}-
13616
13617  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
13618  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
13619  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
13620  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
13621  # to use the configure naming style.
13622
13623
13624
13625
13626
13627  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
13628  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
13629  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
13630  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
13631  OPENJDK_TARGET_AUTOCONF_NAME="$host"
13632  OPENJDK_BUILD_AUTOCONF_NAME="$build"
13633
13634
13635
13636  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13637
13638  case "$build_os" in
13639    *linux*)
13640      VAR_OS=linux
13641      VAR_OS_TYPE=unix
13642      ;;
13643    *solaris*)
13644      VAR_OS=solaris
13645      VAR_OS_TYPE=unix
13646      ;;
13647    *darwin*)
13648      VAR_OS=macosx
13649      VAR_OS_TYPE=unix
13650      ;;
13651    *bsd*)
13652      VAR_OS=bsd
13653      VAR_OS_TYPE=unix
13654      ;;
13655    *cygwin*)
13656      VAR_OS=windows
13657      VAR_OS_ENV=windows.cygwin
13658      ;;
13659    *mingw*)
13660      VAR_OS=windows
13661      VAR_OS_ENV=windows.msys
13662      ;;
13663    *aix*)
13664      VAR_OS=aix
13665      VAR_OS_TYPE=unix
13666      ;;
13667    *)
13668      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
13669      ;;
13670  esac
13671
13672
13673  # First argument is the cpu name from the trip/quad
13674  case "$build_cpu" in
13675    x86_64)
13676      VAR_CPU=x86_64
13677      VAR_CPU_ARCH=x86
13678      VAR_CPU_BITS=64
13679      VAR_CPU_ENDIAN=little
13680      ;;
13681    i?86)
13682      VAR_CPU=x86
13683      VAR_CPU_ARCH=x86
13684      VAR_CPU_BITS=32
13685      VAR_CPU_ENDIAN=little
13686      ;;
13687    arm*)
13688      VAR_CPU=arm
13689      VAR_CPU_ARCH=arm
13690      VAR_CPU_BITS=32
13691      VAR_CPU_ENDIAN=little
13692      ;;
13693    aarch64)
13694      VAR_CPU=aarch64
13695      VAR_CPU_ARCH=aarch64
13696      VAR_CPU_BITS=64
13697      VAR_CPU_ENDIAN=little
13698      ;;
13699    powerpc)
13700      VAR_CPU=ppc
13701      VAR_CPU_ARCH=ppc
13702      VAR_CPU_BITS=32
13703      VAR_CPU_ENDIAN=big
13704      ;;
13705    powerpc64)
13706      VAR_CPU=ppc64
13707      VAR_CPU_ARCH=ppc
13708      VAR_CPU_BITS=64
13709      VAR_CPU_ENDIAN=big
13710      ;;
13711    powerpc64le)
13712      VAR_CPU=ppc64
13713      VAR_CPU_ARCH=ppc
13714      VAR_CPU_BITS=64
13715      VAR_CPU_ENDIAN=little
13716      ;;
13717    s390)
13718      VAR_CPU=s390
13719      VAR_CPU_ARCH=s390
13720      VAR_CPU_BITS=32
13721      VAR_CPU_ENDIAN=big
13722      ;;
13723    s390x)
13724      VAR_CPU=s390x
13725      VAR_CPU_ARCH=s390
13726      VAR_CPU_BITS=64
13727      VAR_CPU_ENDIAN=big
13728      ;;
13729    sparc)
13730      VAR_CPU=sparc
13731      VAR_CPU_ARCH=sparc
13732      VAR_CPU_BITS=32
13733      VAR_CPU_ENDIAN=big
13734      ;;
13735    sparcv9|sparc64)
13736      VAR_CPU=sparcv9
13737      VAR_CPU_ARCH=sparc
13738      VAR_CPU_BITS=64
13739      VAR_CPU_ENDIAN=big
13740      ;;
13741    *)
13742      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
13743      ;;
13744  esac
13745
13746  # ..and setup our own variables. (Do this explicitely to facilitate searching)
13747  OPENJDK_BUILD_OS="$VAR_OS"
13748  if test "x$VAR_OS_TYPE" != x; then
13749    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
13750  else
13751    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
13752  fi
13753  if test "x$VAR_OS_ENV" != x; then
13754    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
13755  else
13756    OPENJDK_BUILD_OS_ENV="$VAR_OS"
13757  fi
13758  OPENJDK_BUILD_CPU="$VAR_CPU"
13759  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
13760  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
13761  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13762
13763
13764
13765
13766
13767
13768
13769
13770  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
13771$as_echo_n "checking openjdk-build os-cpu... " >&6; }
13772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
13773$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
13774
13775  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13776
13777  case "$host_os" in
13778    *linux*)
13779      VAR_OS=linux
13780      VAR_OS_TYPE=unix
13781      ;;
13782    *solaris*)
13783      VAR_OS=solaris
13784      VAR_OS_TYPE=unix
13785      ;;
13786    *darwin*)
13787      VAR_OS=macosx
13788      VAR_OS_TYPE=unix
13789      ;;
13790    *bsd*)
13791      VAR_OS=bsd
13792      VAR_OS_TYPE=unix
13793      ;;
13794    *cygwin*)
13795      VAR_OS=windows
13796      VAR_OS_ENV=windows.cygwin
13797      ;;
13798    *mingw*)
13799      VAR_OS=windows
13800      VAR_OS_ENV=windows.msys
13801      ;;
13802    *aix*)
13803      VAR_OS=aix
13804      VAR_OS_TYPE=unix
13805      ;;
13806    *)
13807      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
13808      ;;
13809  esac
13810
13811
13812  # First argument is the cpu name from the trip/quad
13813  case "$host_cpu" in
13814    x86_64)
13815      VAR_CPU=x86_64
13816      VAR_CPU_ARCH=x86
13817      VAR_CPU_BITS=64
13818      VAR_CPU_ENDIAN=little
13819      ;;
13820    i?86)
13821      VAR_CPU=x86
13822      VAR_CPU_ARCH=x86
13823      VAR_CPU_BITS=32
13824      VAR_CPU_ENDIAN=little
13825      ;;
13826    arm*)
13827      VAR_CPU=arm
13828      VAR_CPU_ARCH=arm
13829      VAR_CPU_BITS=32
13830      VAR_CPU_ENDIAN=little
13831      ;;
13832    aarch64)
13833      VAR_CPU=aarch64
13834      VAR_CPU_ARCH=aarch64
13835      VAR_CPU_BITS=64
13836      VAR_CPU_ENDIAN=little
13837      ;;
13838    powerpc)
13839      VAR_CPU=ppc
13840      VAR_CPU_ARCH=ppc
13841      VAR_CPU_BITS=32
13842      VAR_CPU_ENDIAN=big
13843      ;;
13844    powerpc64)
13845      VAR_CPU=ppc64
13846      VAR_CPU_ARCH=ppc
13847      VAR_CPU_BITS=64
13848      VAR_CPU_ENDIAN=big
13849      ;;
13850    powerpc64le)
13851      VAR_CPU=ppc64
13852      VAR_CPU_ARCH=ppc
13853      VAR_CPU_BITS=64
13854      VAR_CPU_ENDIAN=little
13855      ;;
13856    s390)
13857      VAR_CPU=s390
13858      VAR_CPU_ARCH=s390
13859      VAR_CPU_BITS=32
13860      VAR_CPU_ENDIAN=big
13861      ;;
13862    s390x)
13863      VAR_CPU=s390x
13864      VAR_CPU_ARCH=s390
13865      VAR_CPU_BITS=64
13866      VAR_CPU_ENDIAN=big
13867      ;;
13868    sparc)
13869      VAR_CPU=sparc
13870      VAR_CPU_ARCH=sparc
13871      VAR_CPU_BITS=32
13872      VAR_CPU_ENDIAN=big
13873      ;;
13874    sparcv9|sparc64)
13875      VAR_CPU=sparcv9
13876      VAR_CPU_ARCH=sparc
13877      VAR_CPU_BITS=64
13878      VAR_CPU_ENDIAN=big
13879      ;;
13880    *)
13881      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
13882      ;;
13883  esac
13884
13885  # ... and setup our own variables. (Do this explicitely to facilitate searching)
13886  OPENJDK_TARGET_OS="$VAR_OS"
13887  if test "x$VAR_OS_TYPE" != x; then
13888    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
13889  else
13890    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
13891  fi
13892  if test "x$VAR_OS_ENV" != x; then
13893    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
13894  else
13895    OPENJDK_TARGET_OS_ENV="$VAR_OS"
13896  fi
13897  OPENJDK_TARGET_CPU="$VAR_CPU"
13898  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
13899  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
13900  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13901
13902
13903
13904
13905
13906
13907
13908
13909  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
13910$as_echo_n "checking openjdk-target os-cpu... " >&6; }
13911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
13912$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
13913
13914
13915
13916# Check whether --with-target-bits was given.
13917if test "${with_target_bits+set}" = set; then :
13918  withval=$with_target_bits;
13919fi
13920
13921
13922  # We have three types of compiles:
13923  # native  == normal compilation, target system == build system
13924  # cross   == traditional cross compilation, target system != build system; special toolchain needed
13925  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
13926  #
13927  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
13928    # We're doing a proper cross-compilation
13929    COMPILE_TYPE="cross"
13930  else
13931    COMPILE_TYPE="native"
13932  fi
13933
13934  if test "x$with_target_bits" != x; then
13935    if test "x$COMPILE_TYPE" = "xcross"; then
13936      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
13937    fi
13938
13939    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13940      # A reduced build is requested
13941      COMPILE_TYPE="reduced"
13942      OPENJDK_TARGET_CPU_BITS=32
13943      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
13944        OPENJDK_TARGET_CPU=x86
13945      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
13946        OPENJDK_TARGET_CPU=sparc
13947      else
13948        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
13949      fi
13950    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
13951      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
13952    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
13953      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
13954$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
13955    else
13956      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
13957    fi
13958  fi
13959
13960
13961  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
13962$as_echo_n "checking compilation type... " >&6; }
13963  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
13964$as_echo "$COMPILE_TYPE" >&6; }
13965
13966
13967  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
13968    REQUIRED_OS_NAME=SunOS
13969    REQUIRED_OS_VERSION=5.10
13970  fi
13971  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
13972    REQUIRED_OS_NAME=Linux
13973    REQUIRED_OS_VERSION=2.6
13974  fi
13975  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13976    REQUIRED_OS_NAME=Windows
13977    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
13978      REQUIRED_OS_VERSION=5.2
13979    else
13980      REQUIRED_OS_VERSION=5.1
13981    fi
13982  fi
13983  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
13984    REQUIRED_OS_NAME=Darwin
13985    REQUIRED_OS_VERSION=11.2
13986  fi
13987
13988
13989
13990
13991
13992  # Also store the legacy naming of the cpu.
13993  # Ie i586 and amd64 instead of x86 and x86_64
13994  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
13995  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13996    OPENJDK_TARGET_CPU_LEGACY="i586"
13997  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13998    # On all platforms except MacOSX replace x86_64 with amd64.
13999    OPENJDK_TARGET_CPU_LEGACY="amd64"
14000  fi
14001
14002
14003  # And the second legacy naming of the cpu.
14004  # Ie i386 and amd64 instead of x86 and x86_64.
14005  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
14006  if test "x$OPENJDK_TARGET_CPU" = xx86; then
14007    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
14008  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14009    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
14010  fi
14011
14012
14013  # This is the name of the cpu (but using i386 and amd64 instead of
14014  # x86 and x86_64, respectively), preceeded by a /, to be used when
14015  # locating libraries. On macosx, it's empty, though.
14016  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
14017  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
14018    OPENJDK_TARGET_CPU_LIBDIR=""
14019  fi
14020
14021
14022  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
14023  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
14024  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
14025  OPENJDK_TARGET_CPU_ISADIR=""
14026  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
14027    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14028      OPENJDK_TARGET_CPU_ISADIR="/amd64"
14029    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
14030      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
14031    fi
14032  fi
14033
14034
14035  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
14036  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
14037  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
14038    # On linux only, we replace x86 with i386.
14039    OPENJDK_TARGET_CPU_OSARCH="i386"
14040  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14041    # On all platforms except macosx, we replace x86_64 with amd64.
14042    OPENJDK_TARGET_CPU_OSARCH="amd64"
14043  fi
14044
14045
14046  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
14047  if test "x$OPENJDK_TARGET_CPU" = xx86; then
14048    OPENJDK_TARGET_CPU_JLI="i386"
14049  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14050    # On all platforms except macosx, we replace x86_64 with amd64.
14051    OPENJDK_TARGET_CPU_JLI="amd64"
14052  fi
14053  # Now setup the -D flags for building libjli.
14054  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
14055  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
14056    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
14057      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
14058    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
14059      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
14060    fi
14061  fi
14062
14063
14064  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
14065      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
14066  else
14067      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
14068  fi
14069
14070
14071  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14072    A_LP64="LP64:="
14073    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
14074    # unpack200.exe
14075    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
14076      ADD_LP64="-D_LP64=1"
14077    fi
14078  fi
14079  LP64=$A_LP64
14080
14081
14082  if test "x$COMPILE_TYPE" = "xcross"; then
14083    # FIXME: ... or should this include reduced builds..?
14084    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
14085  else
14086    DEFINE_CROSS_COMPILE_ARCH=""
14087  fi
14088
14089
14090  # ZERO_ARCHDEF is used to enable architecture-specific code
14091  case "${OPENJDK_TARGET_CPU}" in
14092    ppc)     ZERO_ARCHDEF=PPC32 ;;
14093    ppc64)   ZERO_ARCHDEF=PPC64 ;;
14094    s390*)   ZERO_ARCHDEF=S390  ;;
14095    sparc*)  ZERO_ARCHDEF=SPARC ;;
14096    x86_64*) ZERO_ARCHDEF=AMD64 ;;
14097    x86)     ZERO_ARCHDEF=IA32  ;;
14098    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
14099  esac
14100
14101
14102
14103
14104# Continue setting up basic stuff. Most remaining code require fundamental tools.
14105
14106  # Save the current directory this script was started from
14107  CURDIR="$PWD"
14108
14109  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
14110    PATH_SEP=";"
14111
14112  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
14113  if test $SRC_ROOT_LENGTH -gt 100; then
14114    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
14115  fi
14116
14117  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14118    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
14119$as_echo_n "checking cygwin release... " >&6; }
14120    CYGWIN_VERSION=`$UNAME -r`
14121    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
14122$as_echo "$CYGWIN_VERSION" >&6; }
14123    WINDOWS_ENV_VENDOR='cygwin'
14124    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
14125
14126    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
14127    if test "x$CYGWIN_VERSION_OLD" != x; then
14128      { $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
14129$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;}
14130      as_fn_error $? "Cannot continue" "$LINENO" 5
14131    fi
14132    if test "x$CYGPATH" = x; then
14133      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
14134    fi
14135    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
14136$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
14137    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
14138    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
14139    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
14140    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
14141    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
14142$as_echo "$CYGWIN_ROOT_PATH" >&6; }
14143    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
14144    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
14145    if test "x$test_cygdrive_prefix" = x; then
14146      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
14147    fi
14148  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14149    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
14150$as_echo_n "checking msys release... " >&6; }
14151    MSYS_VERSION=`$UNAME -r`
14152    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
14153$as_echo "$MSYS_VERSION" >&6; }
14154
14155    WINDOWS_ENV_VENDOR='msys'
14156    WINDOWS_ENV_VERSION="$MSYS_VERSION"
14157
14158    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
14159$as_echo_n "checking msys root directory as unix-style path... " >&6; }
14160    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
14161    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
14162
14163  windows_path="$MSYS_ROOT_PATH"
14164  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14165    unix_path=`$CYGPATH -u "$windows_path"`
14166    MSYS_ROOT_PATH="$unix_path"
14167  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14168    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14169    MSYS_ROOT_PATH="$unix_path"
14170  fi
14171
14172    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
14173$as_echo "$MSYS_ROOT_PATH" >&6; }
14174    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
14175  else
14176    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
14177  fi
14178
14179  # Test if windows or unix (cygwin/msys) find is first in path.
14180  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
14181$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
14182  FIND_BINARY_OUTPUT=`find --version 2>&1`
14183  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
14184    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
14185$as_echo "unix style" >&6; }
14186  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
14187    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
14188$as_echo "Windows" >&6; }
14189    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
14190$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
14191    { $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
14192$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
14193    as_fn_error $? "Cannot continue" "$LINENO" 5
14194  else
14195    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
14196$as_echo "unknown" >&6; }
14197    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
14198$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
14199  fi
14200
14201  else
14202    PATH_SEP=":"
14203  fi
14204
14205
14206  # We get the top-level directory from the supporting wrappers.
14207  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
14208$as_echo_n "checking for top-level directory... " >&6; }
14209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
14210$as_echo "$TOPDIR" >&6; }
14211
14212
14213  # Save the original version of TOPDIR for string comparisons
14214  ORIGINAL_TOPDIR="$TOPDIR"
14215
14216
14217  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
14218
14219  # Only process if variable expands to non-empty
14220
14221  if test "x$CURDIR" != x; then
14222    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14223
14224  # Input might be given as Windows format, start by converting to
14225  # unix format.
14226  path="$CURDIR"
14227  new_path=`$CYGPATH -u "$path"`
14228
14229  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14230  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14231  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14232  # "foo.exe" is OK but "foo" is an error.
14233  #
14234  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14235  # It is also a way to make sure we got the proper file name for the real test later on.
14236  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14237  if test "x$test_shortpath" = x; then
14238    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14239$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14240    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
14241  fi
14242
14243  # Call helper function which possibly converts this using DOS-style short mode.
14244  # If so, the updated path is stored in $new_path.
14245
14246  input_path="$new_path"
14247  # Check if we need to convert this using DOS-style short mode. If the path
14248  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14249  # take no chances and rewrite it.
14250  # Note: m4 eats our [], so we need to use [ and ] instead.
14251  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14252  if test "x$has_forbidden_chars" != x; then
14253    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14254    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14255    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14256    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14257      # Going to short mode and back again did indeed matter. Since short mode is
14258      # case insensitive, let's make it lowercase to improve readability.
14259      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14260      # Now convert it back to Unix-style (cygpath)
14261      input_path=`$CYGPATH -u "$shortmode_path"`
14262      new_path="$input_path"
14263    fi
14264  fi
14265
14266  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14267  if test "x$test_cygdrive_prefix" = x; then
14268    # As a simple fix, exclude /usr/bin since it's not a real path.
14269    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14270      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14271      # a path prefixed by /cygdrive for fixpath to work.
14272      new_path="$CYGWIN_ROOT_PATH$input_path"
14273    fi
14274  fi
14275
14276
14277  if test "x$path" != "x$new_path"; then
14278    CURDIR="$new_path"
14279    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14280$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14281  fi
14282
14283    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14284
14285  path="$CURDIR"
14286  has_colon=`$ECHO $path | $GREP ^.:`
14287  new_path="$path"
14288  if test "x$has_colon" = x; then
14289    # Not in mixed or Windows style, start by that.
14290    new_path=`cmd //c echo $path`
14291  fi
14292
14293
14294  input_path="$new_path"
14295  # Check if we need to convert this using DOS-style short mode. If the path
14296  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14297  # take no chances and rewrite it.
14298  # Note: m4 eats our [], so we need to use [ and ] instead.
14299  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14300  if test "x$has_forbidden_chars" != x; then
14301    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14302    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14303  fi
14304
14305
14306  windows_path="$new_path"
14307  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14308    unix_path=`$CYGPATH -u "$windows_path"`
14309    new_path="$unix_path"
14310  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14311    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14312    new_path="$unix_path"
14313  fi
14314
14315  if test "x$path" != "x$new_path"; then
14316    CURDIR="$new_path"
14317    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14318$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14319  fi
14320
14321  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14322  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14323
14324    else
14325      # We're on a unix platform. Hooray! :)
14326      path="$CURDIR"
14327      has_space=`$ECHO "$path" | $GREP " "`
14328      if test "x$has_space" != x; then
14329        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14330$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14331        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14332      fi
14333
14334      # Use eval to expand a potential ~
14335      eval path="$path"
14336      if test ! -f "$path" && test ! -d "$path"; then
14337        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14338      fi
14339
14340      CURDIR="`cd "$path"; $THEPWDCMD -L`"
14341    fi
14342  fi
14343
14344
14345  # Only process if variable expands to non-empty
14346
14347  if test "x$TOPDIR" != x; then
14348    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14349
14350  # Input might be given as Windows format, start by converting to
14351  # unix format.
14352  path="$TOPDIR"
14353  new_path=`$CYGPATH -u "$path"`
14354
14355  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14356  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14357  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14358  # "foo.exe" is OK but "foo" is an error.
14359  #
14360  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14361  # It is also a way to make sure we got the proper file name for the real test later on.
14362  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14363  if test "x$test_shortpath" = x; then
14364    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14365$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14366    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
14367  fi
14368
14369  # Call helper function which possibly converts this using DOS-style short mode.
14370  # If so, the updated path is stored in $new_path.
14371
14372  input_path="$new_path"
14373  # Check if we need to convert this using DOS-style short mode. If the path
14374  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14375  # take no chances and rewrite it.
14376  # Note: m4 eats our [], so we need to use [ and ] instead.
14377  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14378  if test "x$has_forbidden_chars" != x; then
14379    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14380    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14381    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14382    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14383      # Going to short mode and back again did indeed matter. Since short mode is
14384      # case insensitive, let's make it lowercase to improve readability.
14385      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14386      # Now convert it back to Unix-style (cygpath)
14387      input_path=`$CYGPATH -u "$shortmode_path"`
14388      new_path="$input_path"
14389    fi
14390  fi
14391
14392  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14393  if test "x$test_cygdrive_prefix" = x; then
14394    # As a simple fix, exclude /usr/bin since it's not a real path.
14395    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14396      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14397      # a path prefixed by /cygdrive for fixpath to work.
14398      new_path="$CYGWIN_ROOT_PATH$input_path"
14399    fi
14400  fi
14401
14402
14403  if test "x$path" != "x$new_path"; then
14404    TOPDIR="$new_path"
14405    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14406$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14407  fi
14408
14409    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14410
14411  path="$TOPDIR"
14412  has_colon=`$ECHO $path | $GREP ^.:`
14413  new_path="$path"
14414  if test "x$has_colon" = x; then
14415    # Not in mixed or Windows style, start by that.
14416    new_path=`cmd //c echo $path`
14417  fi
14418
14419
14420  input_path="$new_path"
14421  # Check if we need to convert this using DOS-style short mode. If the path
14422  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14423  # take no chances and rewrite it.
14424  # Note: m4 eats our [], so we need to use [ and ] instead.
14425  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14426  if test "x$has_forbidden_chars" != x; then
14427    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14428    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14429  fi
14430
14431
14432  windows_path="$new_path"
14433  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14434    unix_path=`$CYGPATH -u "$windows_path"`
14435    new_path="$unix_path"
14436  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14437    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14438    new_path="$unix_path"
14439  fi
14440
14441  if test "x$path" != "x$new_path"; then
14442    TOPDIR="$new_path"
14443    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14444$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14445  fi
14446
14447  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14448  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14449
14450    else
14451      # We're on a unix platform. Hooray! :)
14452      path="$TOPDIR"
14453      has_space=`$ECHO "$path" | $GREP " "`
14454      if test "x$has_space" != x; then
14455        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14456$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14457        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14458      fi
14459
14460      # Use eval to expand a potential ~
14461      eval path="$path"
14462      if test ! -f "$path" && test ! -d "$path"; then
14463        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14464      fi
14465
14466      TOPDIR="`cd "$path"; $THEPWDCMD -L`"
14467    fi
14468  fi
14469
14470  # SRC_ROOT is a traditional alias for TOPDIR.
14471  SRC_ROOT=$TOPDIR
14472
14473  # Calculate a canonical version of TOPDIR for string comparisons
14474  CANONICAL_TOPDIR=$TOPDIR
14475
14476  if test "x$OPENJDK_BUILD_OS" != xwindows; then
14477    # Follow a chain of symbolic links. Use readlink
14478    # where it exists, else fall back to horribly
14479    # complicated shell code.
14480    if test "x$READLINK_TESTED" != yes; then
14481      # On MacOSX there is a readlink tool with a different
14482      # purpose than the GNU readlink tool. Check the found readlink.
14483      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
14484      if test "x$ISGNU" = x; then
14485        # A readlink that we do not know how to use.
14486        # Are there other non-GNU readlinks out there?
14487        READLINK_TESTED=yes
14488        READLINK=
14489      fi
14490    fi
14491
14492    if test "x$READLINK" != x; then
14493      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
14494    else
14495      # Save the current directory for restoring afterwards
14496      STARTDIR=$PWD
14497      COUNTER=0
14498      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
14499      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
14500      cd $sym_link_dir
14501      # Use -P flag to resolve symlinks in directories.
14502      cd `$THEPWDCMD -P`
14503      sym_link_dir=`$THEPWDCMD -P`
14504      # Resolve file symlinks
14505      while test $COUNTER -lt 20; do
14506        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
14507        if test "x$ISLINK" == x; then
14508          # This is not a symbolic link! We are done!
14509          break
14510        fi
14511        # Again resolve directory symlinks since the target of the just found
14512        # link could be in a different directory
14513        cd `$DIRNAME $ISLINK`
14514        sym_link_dir=`$THEPWDCMD -P`
14515        sym_link_file=`$BASENAME $ISLINK`
14516        let COUNTER=COUNTER+1
14517      done
14518      cd $STARTDIR
14519      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
14520    fi
14521  fi
14522
14523
14524
14525  # Locate the directory of this script.
14526  AUTOCONF_DIR=$TOPDIR/common/autoconf
14527
14528
14529# Check if it's a pure open build or if custom sources are to be used.
14530
14531  # Check whether --enable-openjdk-only was given.
14532if test "${enable_openjdk_only+set}" = set; then :
14533  enableval=$enable_openjdk_only;
14534else
14535  enable_openjdk_only="no"
14536fi
14537
14538
14539  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
14540$as_echo_n "checking for presence of closed sources... " >&6; }
14541  if test -d "$SRC_ROOT/jdk/src/closed"; then
14542    CLOSED_SOURCE_PRESENT=yes
14543  else
14544    CLOSED_SOURCE_PRESENT=no
14545  fi
14546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
14547$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
14548
14549  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
14550$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
14551  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
14552  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
14553$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
14554
14555  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
14556    OPENJDK=true
14557    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14558      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
14559$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
14560    fi
14561  else
14562    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14563      OPENJDK=true
14564    else
14565      OPENJDK=false
14566    fi
14567  fi
14568
14569  if test "x$OPENJDK" = "xtrue"; then
14570    SET_OPENJDK="OPENJDK=true"
14571  fi
14572
14573
14574
14575  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
14576  # the IncludeCustomExtension macro.
14577
14578
14579# Check whether --with-custom-make-dir was given.
14580if test "${with_custom_make_dir+set}" = set; then :
14581  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
14582$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
14583fi
14584
14585
14586
14587
14588# These are needed to be able to create a configuration name (and thus the output directory)
14589
14590  ###############################################################################
14591  #
14592  # Check which variant of the JDK that we want to build.
14593  # Currently we have:
14594  #    normal:   standard edition
14595  # but the custom make system may add other variants
14596  #
14597  # Effectively the JDK variant gives a name to a specific set of
14598  # modules to compile into the JDK. In the future, these modules
14599  # might even be Jigsaw modules.
14600  #
14601  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
14602$as_echo_n "checking which variant of the JDK to build... " >&6; }
14603
14604# Check whether --with-jdk-variant was given.
14605if test "${with_jdk_variant+set}" = set; then :
14606  withval=$with_jdk_variant;
14607fi
14608
14609
14610  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
14611    JDK_VARIANT="normal"
14612  else
14613    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
14614  fi
14615
14616
14617
14618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
14619$as_echo "$JDK_VARIANT" >&6; }
14620
14621
14622###############################################################################
14623#
14624# Check which interpreter of the JVM we want to build.
14625# Currently we have:
14626#    template: Template interpreter (the default)
14627#    cpp     : C++ interpreter
14628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
14629$as_echo_n "checking which interpreter of the JVM to build... " >&6; }
14630
14631# Check whether --with-jvm-interpreter was given.
14632if test "${with_jvm_interpreter+set}" = set; then :
14633  withval=$with_jvm_interpreter;
14634fi
14635
14636
14637if test "x$with_jvm_interpreter" = x; then
14638     with_jvm_interpreter="template"
14639fi
14640
14641JVM_INTERPRETER="$with_jvm_interpreter"
14642
14643if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
14644   as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
14645fi
14646
14647
14648
14649{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
14650$as_echo "$with_jvm_interpreter" >&6; }
14651
14652
14653
14654  ###############################################################################
14655  #
14656  # Check which variants of the JVM that we want to build.
14657  # Currently we have:
14658  #    server: normal interpreter and a tiered C1/C2 compiler
14659  #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
14660  #    minimal1: reduced form of client with optional VM services and features stripped out
14661  #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
14662  #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
14663  #    zero: no machine code interpreter, no compiler
14664  #    zeroshark: zero interpreter and shark/llvm compiler backend
14665#    core: interpreter only, no compiler (only works on some platforms)
14666  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
14667$as_echo_n "checking which variants of the JVM to build... " >&6; }
14668
14669# Check whether --with-jvm-variants was given.
14670if test "${with_jvm_variants+set}" = set; then :
14671  withval=$with_jvm_variants;
14672fi
14673
14674
14675  if test "x$with_jvm_variants" = x; then
14676    with_jvm_variants="server"
14677  fi
14678
14679  JVM_VARIANTS=",$with_jvm_variants,"
14680  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,//'`
14681
14682  if test "x$TEST_VARIANTS" != "x,"; then
14683     as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
14684  fi
14685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
14686$as_echo "$with_jvm_variants" >&6; }
14687
14688  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
14689  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
14690  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
14691  JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
14692  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
14693  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
14694  JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
14695
14696  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14697    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14698      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
14699    fi
14700  fi
14701  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14702    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14703      as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
14704    fi
14705  fi
14706  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14707    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14708      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
14709    fi
14710  fi
14711
14712  # Replace the commas with AND for use in the build directory name.
14713  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
14714  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/'`
14715  if test "x$COUNT_VARIANTS" != "x,1"; then
14716    BUILDING_MULTIPLE_JVM_VARIANTS=yes
14717  else
14718    BUILDING_MULTIPLE_JVM_VARIANTS=no
14719  fi
14720
14721
14722
14723
14724
14725
14726
14727
14728
14729
14730  INCLUDE_SA=true
14731  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
14732    INCLUDE_SA=false
14733  fi
14734  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
14735    INCLUDE_SA=false
14736  fi
14737  if test "x$OPENJDK_TARGET_OS" = xaix ; then
14738    INCLUDE_SA=false
14739  fi
14740  if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
14741    INCLUDE_SA=false
14742  fi
14743
14744
14745  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
14746    MACOSX_UNIVERSAL="true"
14747  fi
14748
14749
14750
14751
14752  ###############################################################################
14753  #
14754  # Set the debug level
14755  #    release: no debug information, all optimizations, no asserts.
14756  #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
14757  #    fastdebug: debug information (-g), all optimizations, all asserts
14758  #    slowdebug: debug information (-g), no optimizations, all asserts
14759  #
14760  DEBUG_LEVEL="release"
14761  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
14762$as_echo_n "checking which debug level to use... " >&6; }
14763  # Check whether --enable-debug was given.
14764if test "${enable_debug+set}" = set; then :
14765  enableval=$enable_debug;
14766        ENABLE_DEBUG="${enableval}"
14767        DEBUG_LEVEL="fastdebug"
14768
14769else
14770  ENABLE_DEBUG="no"
14771fi
14772
14773
14774
14775# Check whether --with-debug-level was given.
14776if test "${with_debug_level+set}" = set; then :
14777  withval=$with_debug_level;
14778        DEBUG_LEVEL="${withval}"
14779        if test "x$ENABLE_DEBUG" = xyes; then
14780          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
14781        fi
14782
14783fi
14784
14785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
14786$as_echo "$DEBUG_LEVEL" >&6; }
14787
14788  if test "x$DEBUG_LEVEL" != xrelease && \
14789      test "x$DEBUG_LEVEL" != xoptimized && \
14790      test "x$DEBUG_LEVEL" != xfastdebug && \
14791      test "x$DEBUG_LEVEL" != xslowdebug; then
14792    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
14793  fi
14794
14795
14796  ###############################################################################
14797  #
14798  # Setup legacy vars/targets and new vars to deal with different debug levels.
14799  #
14800
14801  case $DEBUG_LEVEL in
14802    release )
14803      VARIANT="OPT"
14804      FASTDEBUG="false"
14805      DEBUG_CLASSFILES="false"
14806      BUILD_VARIANT_RELEASE=""
14807      HOTSPOT_DEBUG_LEVEL="product"
14808      HOTSPOT_EXPORT="product"
14809      ;;
14810    fastdebug )
14811      VARIANT="DBG"
14812      FASTDEBUG="true"
14813      DEBUG_CLASSFILES="true"
14814      BUILD_VARIANT_RELEASE="-fastdebug"
14815      HOTSPOT_DEBUG_LEVEL="fastdebug"
14816      HOTSPOT_EXPORT="fastdebug"
14817      ;;
14818    slowdebug )
14819      VARIANT="DBG"
14820      FASTDEBUG="false"
14821      DEBUG_CLASSFILES="true"
14822      BUILD_VARIANT_RELEASE="-debug"
14823      HOTSPOT_DEBUG_LEVEL="debug"
14824      HOTSPOT_EXPORT="debug"
14825      ;;
14826    optimized )
14827      VARIANT="OPT"
14828      FASTDEBUG="false"
14829      DEBUG_CLASSFILES="false"
14830      BUILD_VARIANT_RELEASE="-optimized"
14831      HOTSPOT_DEBUG_LEVEL="optimized"
14832      HOTSPOT_EXPORT="optimized"
14833      ;;
14834  esac
14835
14836  # The debug level 'optimized' is a little special because it is currently only
14837  # applicable to the HotSpot build where it means to build a completely
14838  # optimized version of the VM without any debugging code (like for the
14839  # 'release' debug level which is called 'product' in the HotSpot build) but
14840  # with the exception that it can contain additional code which is otherwise
14841  # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
14842  # test new and/or experimental features which are not intended for customer
14843  # shipment. Because these new features need to be tested and benchmarked in
14844  # real world scenarios, we want to build the containing JDK at the 'release'
14845  # debug level.
14846  if test "x$DEBUG_LEVEL" = xoptimized; then
14847    DEBUG_LEVEL="release"
14848  fi
14849
14850  #####
14851  # Generate the legacy makefile targets for hotspot.
14852  # The hotspot api for selecting the build artifacts, really, needs to be improved.
14853  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
14854  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
14855  # But until then ...
14856  HOTSPOT_TARGET=""
14857
14858  if test "x$JVM_VARIANT_SERVER" = xtrue; then
14859    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
14860  fi
14861
14862  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14863    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
14864  fi
14865
14866  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14867    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
14868  fi
14869
14870  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14871    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
14872  fi
14873
14874  if test "x$JVM_VARIANT_ZERO" = xtrue; then
14875    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
14876  fi
14877
14878  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
14879    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
14880  fi
14881
14882  if test "x$JVM_VARIANT_CORE" = xtrue; then
14883    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
14884  fi
14885
14886  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
14887
14888  # On Macosx universal binaries are produced, but they only contain
14889  # 64 bit intel. This invalidates control of which jvms are built
14890  # from configure, but only server is valid anyway. Fix this
14891  # when hotspot makefiles are rewritten.
14892  if test "x$MACOSX_UNIVERSAL" = xtrue; then
14893    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
14894  fi
14895
14896  #####
14897
14898
14899
14900
14901
14902
14903
14904
14905# With basic setup done, call the custom early hook.
14906
14907
14908# Check if we have devkits, extra paths or sysroot set.
14909
14910
14911# Check whether --with-devkit was given.
14912if test "${with_devkit+set}" = set; then :
14913  withval=$with_devkit;
14914
14915  # Only process if variable expands to non-empty
14916
14917  if test "x$with_devkit" != x; then
14918    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14919
14920  # Input might be given as Windows format, start by converting to
14921  # unix format.
14922  path="$with_devkit"
14923  new_path=`$CYGPATH -u "$path"`
14924
14925  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14926  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14927  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14928  # "foo.exe" is OK but "foo" is an error.
14929  #
14930  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14931  # It is also a way to make sure we got the proper file name for the real test later on.
14932  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14933  if test "x$test_shortpath" = x; then
14934    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14935$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14936    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
14937  fi
14938
14939  # Call helper function which possibly converts this using DOS-style short mode.
14940  # If so, the updated path is stored in $new_path.
14941
14942  input_path="$new_path"
14943  # Check if we need to convert this using DOS-style short mode. If the path
14944  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14945  # take no chances and rewrite it.
14946  # Note: m4 eats our [], so we need to use [ and ] instead.
14947  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14948  if test "x$has_forbidden_chars" != x; then
14949    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14950    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14951    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14952    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14953      # Going to short mode and back again did indeed matter. Since short mode is
14954      # case insensitive, let's make it lowercase to improve readability.
14955      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14956      # Now convert it back to Unix-style (cygpath)
14957      input_path=`$CYGPATH -u "$shortmode_path"`
14958      new_path="$input_path"
14959    fi
14960  fi
14961
14962  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14963  if test "x$test_cygdrive_prefix" = x; then
14964    # As a simple fix, exclude /usr/bin since it's not a real path.
14965    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14966      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14967      # a path prefixed by /cygdrive for fixpath to work.
14968      new_path="$CYGWIN_ROOT_PATH$input_path"
14969    fi
14970  fi
14971
14972
14973  if test "x$path" != "x$new_path"; then
14974    with_devkit="$new_path"
14975    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14976$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14977  fi
14978
14979    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14980
14981  path="$with_devkit"
14982  has_colon=`$ECHO $path | $GREP ^.:`
14983  new_path="$path"
14984  if test "x$has_colon" = x; then
14985    # Not in mixed or Windows style, start by that.
14986    new_path=`cmd //c echo $path`
14987  fi
14988
14989
14990  input_path="$new_path"
14991  # Check if we need to convert this using DOS-style short mode. If the path
14992  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14993  # take no chances and rewrite it.
14994  # Note: m4 eats our [], so we need to use [ and ] instead.
14995  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14996  if test "x$has_forbidden_chars" != x; then
14997    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14998    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14999  fi
15000
15001
15002  windows_path="$new_path"
15003  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15004    unix_path=`$CYGPATH -u "$windows_path"`
15005    new_path="$unix_path"
15006  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15007    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15008    new_path="$unix_path"
15009  fi
15010
15011  if test "x$path" != "x$new_path"; then
15012    with_devkit="$new_path"
15013    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
15014$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
15015  fi
15016
15017  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15018  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15019
15020    else
15021      # We're on a unix platform. Hooray! :)
15022      path="$with_devkit"
15023      has_space=`$ECHO "$path" | $GREP " "`
15024      if test "x$has_space" != x; then
15025        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
15026$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
15027        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15028      fi
15029
15030      # Use eval to expand a potential ~
15031      eval path="$path"
15032      if test ! -f "$path" && test ! -d "$path"; then
15033        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
15034      fi
15035
15036      with_devkit="`cd "$path"; $THEPWDCMD -L`"
15037    fi
15038  fi
15039
15040        DEVKIT_ROOT="$with_devkit"
15041        # Check for a meta data info file in the root of the devkit
15042        if test -f "$DEVKIT_ROOT/devkit.info"; then
15043          . $DEVKIT_ROOT/devkit.info
15044          # This potentially sets the following:
15045          # A descriptive name of the devkit
15046
15047  if test "x$DEVKIT_NAME" = x; then
15048    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
15049  fi
15050
15051          # Corresponds to --with-extra-path
15052
15053  if test "x$DEVKIT_EXTRA_PATH" = x; then
15054    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
15055  fi
15056
15057          # Corresponds to --with-toolchain-path
15058
15059  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
15060    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
15061  fi
15062
15063          # Corresponds to --with-sysroot
15064
15065  if test "x$DEVKIT_SYSROOT" = x; then
15066    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
15067  fi
15068
15069
15070          # Identifies the Visual Studio version in the devkit
15071
15072  if test "x$DEVKIT_VS_VERSION" = x; then
15073    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
15074  fi
15075
15076          # The Visual Studio include environment variable
15077
15078  if test "x$DEVKIT_VS_INCLUDE" = x; then
15079    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
15080  fi
15081
15082          # The Visual Studio lib environment variable
15083
15084  if test "x$DEVKIT_VS_LIB" = x; then
15085    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
15086  fi
15087
15088          # Corresponds to --with-msvcr-dll
15089
15090  if test "x$DEVKIT_MSVCR_DLL" = x; then
15091    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
15092  fi
15093
15094          # Corresponds to --with-msvcp-dll
15095
15096  if test "x$DEVKIT_MSVCP_DLL" = x; then
15097    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
15098  fi
15099
15100        fi
15101
15102        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
15103$as_echo_n "checking for devkit... " >&6; }
15104        if test "x$DEVKIT_NAME" != x; then
15105          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
15106$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
15107        else
15108          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
15109$as_echo "$DEVKIT_ROOT" >&6; }
15110        fi
15111
15112
15113  if test "x$DEVKIT_EXTRA_PATH" != x; then
15114    if test "x$EXTRA_PATH" = x; then
15115      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
15116    else
15117      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
15118    fi
15119  fi
15120
15121
15122        # Fallback default of just /bin if DEVKIT_PATH is not defined
15123        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
15124          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
15125        fi
15126
15127  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
15128    if test "x$TOOLCHAIN_PATH" = x; then
15129      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
15130    else
15131      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
15132    fi
15133  fi
15134
15135
15136        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
15137        # places for backwards compatiblity.
15138        if test "x$DEVKIT_SYSROOT" != x; then
15139          SYSROOT="$DEVKIT_SYSROOT"
15140        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
15141          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
15142        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
15143          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
15144        fi
15145
15146
15147fi
15148
15149
15150  # You can force the sysroot if the sysroot encoded into the compiler tools
15151  # is not correct.
15152
15153# Check whether --with-sys-root was given.
15154if test "${with_sys_root+set}" = set; then :
15155  withval=$with_sys_root; SYSROOT=$with_sys_root
15156
15157fi
15158
15159
15160
15161# Check whether --with-sysroot was given.
15162if test "${with_sysroot+set}" = set; then :
15163  withval=$with_sysroot; SYSROOT=$with_sysroot
15164
15165fi
15166
15167
15168
15169# Check whether --with-tools-dir was given.
15170if test "${with_tools_dir+set}" = set; then :
15171  withval=$with_tools_dir;
15172  if test "x$with_tools_dir" != x; then
15173    if test "x$TOOLCHAIN_PATH" = x; then
15174      TOOLCHAIN_PATH="$with_tools_dir"
15175    else
15176      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
15177    fi
15178  fi
15179
15180
15181fi
15182
15183
15184
15185# Check whether --with-toolchain-path was given.
15186if test "${with_toolchain_path+set}" = set; then :
15187  withval=$with_toolchain_path;
15188  if test "x$with_toolchain_path" != x; then
15189    if test "x$TOOLCHAIN_PATH" = x; then
15190      TOOLCHAIN_PATH="$with_toolchain_path"
15191    else
15192      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
15193    fi
15194  fi
15195
15196
15197fi
15198
15199
15200
15201# Check whether --with-extra-path was given.
15202if test "${with_extra_path+set}" = set; then :
15203  withval=$with_extra_path;
15204  if test "x$with_extra_path" != x; then
15205    if test "x$EXTRA_PATH" = x; then
15206      EXTRA_PATH="$with_extra_path"
15207    else
15208      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
15209    fi
15210  fi
15211
15212
15213fi
15214
15215
15216  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
15217    # detect if Xcode is installed by running xcodebuild -version
15218    # if no Xcode installed, xcodebuild exits with 1
15219    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
15220    if /usr/bin/xcodebuild -version >/dev/null 2>&1; then
15221      # We need to use xcodebuild in the toolchain dir provided by the user, this will
15222      # fall back on the stub binary in /usr/bin/xcodebuild
15223      # Extract the first word of "xcodebuild", so it can be a program name with args.
15224set dummy xcodebuild; ac_word=$2
15225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15226$as_echo_n "checking for $ac_word... " >&6; }
15227if ${ac_cv_path_XCODEBUILD+:} false; then :
15228  $as_echo_n "(cached) " >&6
15229else
15230  case $XCODEBUILD in
15231  [\\/]* | ?:[\\/]*)
15232  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
15233  ;;
15234  *)
15235  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15236for as_dir in $TOOLCHAIN_PATH
15237do
15238  IFS=$as_save_IFS
15239  test -z "$as_dir" && as_dir=.
15240    for ac_exec_ext in '' $ac_executable_extensions; do
15241  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15242    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
15243    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15244    break 2
15245  fi
15246done
15247  done
15248IFS=$as_save_IFS
15249
15250  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
15251  ;;
15252esac
15253fi
15254XCODEBUILD=$ac_cv_path_XCODEBUILD
15255if test -n "$XCODEBUILD"; then
15256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
15257$as_echo "$XCODEBUILD" >&6; }
15258else
15259  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15260$as_echo "no" >&6; }
15261fi
15262
15263
15264    else
15265      # this should result in SYSROOT being empty, unless --with-sysroot is provided
15266      # when only the command line tools are installed there are no SDKs, so headers
15267      # are copied into the system frameworks
15268      XCODEBUILD=
15269
15270    fi
15271
15272    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
15273$as_echo_n "checking for sdk name... " >&6; }
15274
15275# Check whether --with-sdk-name was given.
15276if test "${with_sdk_name+set}" = set; then :
15277  withval=$with_sdk_name; SDKNAME=$with_sdk_name
15278
15279fi
15280
15281    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
15282$as_echo "$SDKNAME" >&6; }
15283
15284    # if toolchain path is specified then don't rely on system headers, they may not compile
15285    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
15286    test -z "$TOOLCHAIN_PATH" && \
15287      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
15288
15289    if test -z "$SYSROOT"; then
15290      if test -n "$XCODEBUILD"; then
15291        # if we don't have system headers, use default SDK name (last resort)
15292        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15293          SDKNAME=${SDKNAME:-macosx}
15294        fi
15295
15296        if test -n "$SDKNAME"; then
15297          # Call xcodebuild to determine SYSROOT
15298          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | grep '^Path: ' | sed 's/Path: //'`
15299        fi
15300      else
15301        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15302          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
15303        fi
15304      fi
15305    else
15306      # warn user if --with-sdk-name was also set
15307      if test -n "$with_sdk_name"; then
15308        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
15309$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
15310      fi
15311    fi
15312
15313    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
15314      # If no system framework headers, then SYSROOT must be set, or we won't build
15315      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
15316    fi
15317
15318    # Perform a basic sanity test
15319    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
15320      if test -z "$SYSROOT"; then
15321        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
15322      else
15323        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
15324      fi
15325    fi
15326
15327    # set SDKROOT too, Xcode tools will pick it up
15328    SDKROOT=$SYSROOT
15329
15330  fi
15331
15332  # Prepend the extra path to the global path
15333
15334  if test "x$EXTRA_PATH" != x; then
15335    if test "x$PATH" = x; then
15336      PATH="$EXTRA_PATH"
15337    else
15338      PATH="$EXTRA_PATH:$PATH"
15339    fi
15340  fi
15341
15342
15343  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
15344    # Add extra search paths on solaris for utilities like ar and as etc...
15345    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
15346  fi
15347
15348  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
15349$as_echo_n "checking for sysroot... " >&6; }
15350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
15351$as_echo "$SYSROOT" >&6; }
15352  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
15353$as_echo_n "checking for toolchain path... " >&6; }
15354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
15355$as_echo "$TOOLCHAIN_PATH" >&6; }
15356  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
15357$as_echo_n "checking for extra path... " >&6; }
15358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
15359$as_echo "$EXTRA_PATH" >&6; }
15360
15361
15362# To properly create a configuration name, we need to have the OpenJDK target
15363# and options (variants and debug level) parsed.
15364
15365
15366
15367# Check whether --with-conf-name was given.
15368if test "${with_conf_name+set}" = set; then :
15369  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
15370fi
15371
15372
15373  # Test from where we are running configure, in or outside of src root.
15374  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
15375$as_echo_n "checking where to store configuration... " >&6; }
15376  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
15377      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
15378      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
15379    # We are running configure from the src root.
15380    # Create a default ./build/target-variant-debuglevel output root.
15381    if test "x${CONF_NAME}" = x; then
15382      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
15383$as_echo "in default location" >&6; }
15384      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
15385    else
15386      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
15387$as_echo "in build directory with custom name" >&6; }
15388    fi
15389    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
15390    $MKDIR -p "$OUTPUT_ROOT"
15391    if test ! -d "$OUTPUT_ROOT"; then
15392      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
15393    fi
15394  else
15395    # We are running configure from outside of the src dir.
15396    # Then use the current directory as output dir!
15397    # If configuration is situated in normal build directory, just use the build
15398    # directory name as configuration name, otherwise use the complete path.
15399    if test "x${CONF_NAME}" = x; then
15400      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
15401    fi
15402    OUTPUT_ROOT="$CURDIR"
15403    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
15404$as_echo "in current directory" >&6; }
15405
15406    # WARNING: This might be a bad thing to do. You need to be sure you want to
15407    # have a configuration in this directory. Do some sanity checks!
15408
15409    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
15410      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
15411      # other files
15412      files_present=`$LS $OUTPUT_ROOT`
15413      # Configure has already touched config.log and confdefs.h in the current dir when this check
15414      # is performed.
15415      filtered_files=`$ECHO "$files_present" \
15416          | $SED -e 's/config.log//g' \
15417              -e 's/configure.log//g' \
15418              -e 's/confdefs.h//g' \
15419              -e 's/ //g' \
15420          | $TR -d '\n'`
15421      if test "x$filtered_files" != x; then
15422        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
15423$as_echo "$as_me: Current directory is $CURDIR." >&6;}
15424        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
15425$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
15426        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
15427$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
15428        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
15429$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
15430        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
15431$as_echo "$as_me: seriously mess up just about everything." >&6;}
15432        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
15433$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
15434        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
15435$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
15436        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
15437      fi
15438    fi
15439  fi
15440  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
15441$as_echo_n "checking what configuration name to use... " >&6; }
15442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
15443$as_echo "$CONF_NAME" >&6; }
15444
15445
15446  # Only process if variable expands to non-empty
15447
15448  if test "x$OUTPUT_ROOT" != x; then
15449    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15450
15451  # Input might be given as Windows format, start by converting to
15452  # unix format.
15453  path="$OUTPUT_ROOT"
15454  new_path=`$CYGPATH -u "$path"`
15455
15456  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15457  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15458  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15459  # "foo.exe" is OK but "foo" is an error.
15460  #
15461  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15462  # It is also a way to make sure we got the proper file name for the real test later on.
15463  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15464  if test "x$test_shortpath" = x; then
15465    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15466$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15467    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
15468  fi
15469
15470  # Call helper function which possibly converts this using DOS-style short mode.
15471  # If so, the updated path is stored in $new_path.
15472
15473  input_path="$new_path"
15474  # Check if we need to convert this using DOS-style short mode. If the path
15475  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15476  # take no chances and rewrite it.
15477  # Note: m4 eats our [], so we need to use [ and ] instead.
15478  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15479  if test "x$has_forbidden_chars" != x; then
15480    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15481    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15482    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15483    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15484      # Going to short mode and back again did indeed matter. Since short mode is
15485      # case insensitive, let's make it lowercase to improve readability.
15486      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15487      # Now convert it back to Unix-style (cygpath)
15488      input_path=`$CYGPATH -u "$shortmode_path"`
15489      new_path="$input_path"
15490    fi
15491  fi
15492
15493  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15494  if test "x$test_cygdrive_prefix" = x; then
15495    # As a simple fix, exclude /usr/bin since it's not a real path.
15496    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15497      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15498      # a path prefixed by /cygdrive for fixpath to work.
15499      new_path="$CYGWIN_ROOT_PATH$input_path"
15500    fi
15501  fi
15502
15503
15504  if test "x$path" != "x$new_path"; then
15505    OUTPUT_ROOT="$new_path"
15506    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15507$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15508  fi
15509
15510    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15511
15512  path="$OUTPUT_ROOT"
15513  has_colon=`$ECHO $path | $GREP ^.:`
15514  new_path="$path"
15515  if test "x$has_colon" = x; then
15516    # Not in mixed or Windows style, start by that.
15517    new_path=`cmd //c echo $path`
15518  fi
15519
15520
15521  input_path="$new_path"
15522  # Check if we need to convert this using DOS-style short mode. If the path
15523  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15524  # take no chances and rewrite it.
15525  # Note: m4 eats our [], so we need to use [ and ] instead.
15526  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15527  if test "x$has_forbidden_chars" != x; then
15528    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15529    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15530  fi
15531
15532
15533  windows_path="$new_path"
15534  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15535    unix_path=`$CYGPATH -u "$windows_path"`
15536    new_path="$unix_path"
15537  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15538    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15539    new_path="$unix_path"
15540  fi
15541
15542  if test "x$path" != "x$new_path"; then
15543    OUTPUT_ROOT="$new_path"
15544    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15545$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15546  fi
15547
15548  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15549  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15550
15551    else
15552      # We're on a unix platform. Hooray! :)
15553      path="$OUTPUT_ROOT"
15554      has_space=`$ECHO "$path" | $GREP " "`
15555      if test "x$has_space" != x; then
15556        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15557$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15558        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15559      fi
15560
15561      # Use eval to expand a potential ~
15562      eval path="$path"
15563      if test ! -f "$path" && test ! -d "$path"; then
15564        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
15565      fi
15566
15567      OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
15568    fi
15569  fi
15570
15571
15572  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
15573  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
15574
15575  SPEC=$OUTPUT_ROOT/spec.gmk
15576
15577  CONF_NAME=$CONF_NAME
15578
15579  OUTPUT_ROOT=$OUTPUT_ROOT
15580
15581
15582
15583  # The spec.gmk file contains all variables for the make system.
15584  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
15585
15586  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
15587  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
15588
15589  # The bootcycle-spec.gmk file contains support for boot cycle builds.
15590  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
15591
15592  # The compare.sh is used to compare the build output to other builds.
15593  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
15594
15595  # The generated Makefile knows where the spec.gmk is and where the source is.
15596  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
15597  # which will look for generated configurations
15598  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
15599
15600
15601
15602# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
15603
15604  for ac_prog in apt-get yum port pkgutil pkgadd
15605do
15606  # Extract the first word of "$ac_prog", so it can be a program name with args.
15607set dummy $ac_prog; ac_word=$2
15608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15609$as_echo_n "checking for $ac_word... " >&6; }
15610if ${ac_cv_prog_PKGHANDLER+:} false; then :
15611  $as_echo_n "(cached) " >&6
15612else
15613  if test -n "$PKGHANDLER"; then
15614  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
15615else
15616as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15617for as_dir in $PATH
15618do
15619  IFS=$as_save_IFS
15620  test -z "$as_dir" && as_dir=.
15621    for ac_exec_ext in '' $ac_executable_extensions; do
15622  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15623    ac_cv_prog_PKGHANDLER="$ac_prog"
15624    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15625    break 2
15626  fi
15627done
15628  done
15629IFS=$as_save_IFS
15630
15631fi
15632fi
15633PKGHANDLER=$ac_cv_prog_PKGHANDLER
15634if test -n "$PKGHANDLER"; then
15635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
15636$as_echo "$PKGHANDLER" >&6; }
15637else
15638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15639$as_echo "no" >&6; }
15640fi
15641
15642
15643  test -n "$PKGHANDLER" && break
15644done
15645
15646
15647
15648# Setup tools that requires more complex handling, or that is not needed by the configure script.
15649
15650
15651  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
15652  if test "x$MAKE" != x; then
15653    # User has supplied a make, test it.
15654    if test ! -f "$MAKE"; then
15655      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
15656    fi
15657
15658  MAKE_CANDIDATE=""$MAKE""
15659  DESCRIPTION="user supplied MAKE=$MAKE"
15660
15661  # On Cygwin, we require a newer version of make than on other platforms
15662  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15663    MAKE_VERSION_EXPR="-e 4\."
15664    MAKE_REQUIRED_VERSION="4.0"
15665   else
15666    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
15667    MAKE_REQUIRED_VERSION="3.81"
15668  fi
15669
15670  if test "x$MAKE_CANDIDATE" != x; then
15671    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15672$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15673    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15674    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15675    if test "x$IS_GNU_MAKE" = x; then
15676      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15677$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15678    else
15679      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
15680      if test "x$IS_MODERN_MAKE" = x; then
15681        { $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
15682$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;}
15683      else
15684        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15685          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15686            MAKE_EXPECTED_ENV='cygwin'
15687          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15688            MAKE_EXPECTED_ENV='msys'
15689          else
15690            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15691          fi
15692          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15693          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15694        else
15695          # Not relevant for non-Windows
15696          IS_MAKE_CORRECT_ENV=true
15697        fi
15698        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15699          { $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
15700$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;}
15701        else
15702          FOUND_MAKE=$MAKE_CANDIDATE
15703
15704  # Only process if variable expands to non-empty
15705
15706  if test "x$FOUND_MAKE" != x; then
15707    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15708
15709  # First separate the path from the arguments. This will split at the first
15710  # space.
15711  complete="$FOUND_MAKE"
15712  path="${complete%% *}"
15713  tmp="$complete EOL"
15714  arguments="${tmp#* }"
15715
15716  # Input might be given as Windows format, start by converting to
15717  # unix format.
15718  new_path=`$CYGPATH -u "$path"`
15719
15720  # Now try to locate executable using which
15721  new_path=`$WHICH "$new_path" 2> /dev/null`
15722  # bat and cmd files are not always considered executable in cygwin causing which
15723  # to not find them
15724  if test "x$new_path" = x \
15725      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15726      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15727    new_path=`$CYGPATH -u "$path"`
15728  fi
15729  if test "x$new_path" = x; then
15730    # Oops. Which didn't find the executable.
15731    # The splitting of arguments from the executable at a space might have been incorrect,
15732    # since paths with space are more likely in Windows. Give it another try with the whole
15733    # argument.
15734    path="$complete"
15735    arguments="EOL"
15736    new_path=`$CYGPATH -u "$path"`
15737    new_path=`$WHICH "$new_path" 2> /dev/null`
15738    # bat and cmd files are not always considered executable in cygwin causing which
15739    # to not find them
15740    if test "x$new_path" = x \
15741        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15742        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15743      new_path=`$CYGPATH -u "$path"`
15744    fi
15745    if test "x$new_path" = x; then
15746      # It's still not found. Now this is an unrecoverable error.
15747      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15748$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15749      has_space=`$ECHO "$complete" | $GREP " "`
15750      if test "x$has_space" != x; then
15751        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15752$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15753      fi
15754      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15755    fi
15756  fi
15757
15758  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15759  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15760  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15761  # "foo.exe" is OK but "foo" is an error.
15762  #
15763  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15764  # It is also a way to make sure we got the proper file name for the real test later on.
15765  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15766  if test "x$test_shortpath" = x; then
15767    # Short path failed, file does not exist as specified.
15768    # Try adding .exe or .cmd
15769    if test -f "${new_path}.exe"; then
15770      input_to_shortpath="${new_path}.exe"
15771    elif test -f "${new_path}.cmd"; then
15772      input_to_shortpath="${new_path}.cmd"
15773    else
15774      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15775$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15776      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15777$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15778      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15779    fi
15780  else
15781    input_to_shortpath="$new_path"
15782  fi
15783
15784  # Call helper function which possibly converts this using DOS-style short mode.
15785  # If so, the updated path is stored in $new_path.
15786  new_path="$input_to_shortpath"
15787
15788  input_path="$input_to_shortpath"
15789  # Check if we need to convert this using DOS-style short mode. If the path
15790  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15791  # take no chances and rewrite it.
15792  # Note: m4 eats our [], so we need to use [ and ] instead.
15793  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15794  if test "x$has_forbidden_chars" != x; then
15795    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15796    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15797    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15798    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15799      # Going to short mode and back again did indeed matter. Since short mode is
15800      # case insensitive, let's make it lowercase to improve readability.
15801      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15802      # Now convert it back to Unix-style (cygpath)
15803      input_path=`$CYGPATH -u "$shortmode_path"`
15804      new_path="$input_path"
15805    fi
15806  fi
15807
15808  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15809  if test "x$test_cygdrive_prefix" = x; then
15810    # As a simple fix, exclude /usr/bin since it's not a real path.
15811    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15812      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15813      # a path prefixed by /cygdrive for fixpath to work.
15814      new_path="$CYGWIN_ROOT_PATH$input_path"
15815    fi
15816  fi
15817
15818  # remove trailing .exe if any
15819  new_path="${new_path/%.exe/}"
15820
15821    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15822
15823  # First separate the path from the arguments. This will split at the first
15824  # space.
15825  complete="$FOUND_MAKE"
15826  path="${complete%% *}"
15827  tmp="$complete EOL"
15828  arguments="${tmp#* }"
15829
15830  # Input might be given as Windows format, start by converting to
15831  # unix format.
15832  new_path="$path"
15833
15834  windows_path="$new_path"
15835  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15836    unix_path=`$CYGPATH -u "$windows_path"`
15837    new_path="$unix_path"
15838  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15839    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15840    new_path="$unix_path"
15841  fi
15842
15843
15844  # Now try to locate executable using which
15845  new_path=`$WHICH "$new_path" 2> /dev/null`
15846
15847  if test "x$new_path" = x; then
15848    # Oops. Which didn't find the executable.
15849    # The splitting of arguments from the executable at a space might have been incorrect,
15850    # since paths with space are more likely in Windows. Give it another try with the whole
15851    # argument.
15852    path="$complete"
15853    arguments="EOL"
15854    new_path="$path"
15855
15856  windows_path="$new_path"
15857  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15858    unix_path=`$CYGPATH -u "$windows_path"`
15859    new_path="$unix_path"
15860  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15861    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15862    new_path="$unix_path"
15863  fi
15864
15865
15866    new_path=`$WHICH "$new_path" 2> /dev/null`
15867    # bat and cmd files are not always considered executable in MSYS causing which
15868    # to not find them
15869    if test "x$new_path" = x \
15870        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15871        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15872      new_path="$path"
15873
15874  windows_path="$new_path"
15875  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15876    unix_path=`$CYGPATH -u "$windows_path"`
15877    new_path="$unix_path"
15878  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15879    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15880    new_path="$unix_path"
15881  fi
15882
15883    fi
15884
15885    if test "x$new_path" = x; then
15886      # It's still not found. Now this is an unrecoverable error.
15887      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15888$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15889      has_space=`$ECHO "$complete" | $GREP " "`
15890      if test "x$has_space" != x; then
15891        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15892$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15893      fi
15894      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15895    fi
15896  fi
15897
15898  # Now new_path has a complete unix path to the binary
15899  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15900    # Keep paths in /bin as-is, but remove trailing .exe if any
15901    new_path="${new_path/%.exe/}"
15902    # Do not save /bin paths to all_fixpath_prefixes!
15903  else
15904    # Not in mixed or Windows style, start by that.
15905    new_path=`cmd //c echo $new_path`
15906
15907  input_path="$new_path"
15908  # Check if we need to convert this using DOS-style short mode. If the path
15909  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15910  # take no chances and rewrite it.
15911  # Note: m4 eats our [], so we need to use [ and ] instead.
15912  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15913  if test "x$has_forbidden_chars" != x; then
15914    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15915    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15916  fi
15917
15918    # Output is in $new_path
15919
15920  windows_path="$new_path"
15921  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15922    unix_path=`$CYGPATH -u "$windows_path"`
15923    new_path="$unix_path"
15924  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15925    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15926    new_path="$unix_path"
15927  fi
15928
15929    # remove trailing .exe if any
15930    new_path="${new_path/%.exe/}"
15931
15932    # Save the first 10 bytes of this path to the storage, so fixpath can work.
15933    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15934  fi
15935
15936    else
15937      # We're on a unix platform. Hooray! :)
15938      # First separate the path from the arguments. This will split at the first
15939      # space.
15940      complete="$FOUND_MAKE"
15941      path="${complete%% *}"
15942      tmp="$complete EOL"
15943      arguments="${tmp#* }"
15944
15945      # Cannot rely on the command "which" here since it doesn't always work.
15946      is_absolute_path=`$ECHO "$path" | $GREP ^/`
15947      if test -z "$is_absolute_path"; then
15948        # Path to executable is not absolute. Find it.
15949        IFS_save="$IFS"
15950        IFS=:
15951        for p in $PATH; do
15952          if test -f "$p/$path" && test -x "$p/$path"; then
15953            new_path="$p/$path"
15954            break
15955          fi
15956        done
15957        IFS="$IFS_save"
15958      else
15959        # This is an absolute path, we can use it without further modifications.
15960        new_path="$path"
15961      fi
15962
15963      if test "x$new_path" = x; then
15964        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15965$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15966        has_space=`$ECHO "$complete" | $GREP " "`
15967        if test "x$has_space" != x; then
15968          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15969$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15970        fi
15971        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15972      fi
15973    fi
15974
15975    # Now join together the path and the arguments once again
15976    if test "x$arguments" != xEOL; then
15977      new_complete="$new_path ${arguments% *}"
15978    else
15979      new_complete="$new_path"
15980    fi
15981
15982    if test "x$complete" != "x$new_complete"; then
15983      FOUND_MAKE="$new_complete"
15984      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15985$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15986    fi
15987  fi
15988
15989        fi
15990      fi
15991    fi
15992  fi
15993
15994    if test "x$FOUND_MAKE" = x; then
15995      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
15996    fi
15997  else
15998    # Try our hardest to locate a correct version of GNU make
15999    for ac_prog in gmake
16000do
16001  # Extract the first word of "$ac_prog", so it can be a program name with args.
16002set dummy $ac_prog; ac_word=$2
16003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16004$as_echo_n "checking for $ac_word... " >&6; }
16005if ${ac_cv_path_CHECK_GMAKE+:} false; then :
16006  $as_echo_n "(cached) " >&6
16007else
16008  case $CHECK_GMAKE in
16009  [\\/]* | ?:[\\/]*)
16010  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
16011  ;;
16012  *)
16013  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16014for as_dir in $PATH
16015do
16016  IFS=$as_save_IFS
16017  test -z "$as_dir" && as_dir=.
16018    for ac_exec_ext in '' $ac_executable_extensions; do
16019  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16020    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16021    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16022    break 2
16023  fi
16024done
16025  done
16026IFS=$as_save_IFS
16027
16028  ;;
16029esac
16030fi
16031CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
16032if test -n "$CHECK_GMAKE"; then
16033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
16034$as_echo "$CHECK_GMAKE" >&6; }
16035else
16036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16037$as_echo "no" >&6; }
16038fi
16039
16040
16041  test -n "$CHECK_GMAKE" && break
16042done
16043
16044
16045  MAKE_CANDIDATE=""$CHECK_GMAKE""
16046  DESCRIPTION="gmake in PATH"
16047
16048  # On Cygwin, we require a newer version of make than on other platforms
16049  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16050    MAKE_VERSION_EXPR="-e 4\."
16051    MAKE_REQUIRED_VERSION="4.0"
16052   else
16053    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16054    MAKE_REQUIRED_VERSION="3.81"
16055  fi
16056
16057  if test "x$MAKE_CANDIDATE" != x; then
16058    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16059$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16060    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16061    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16062    if test "x$IS_GNU_MAKE" = x; then
16063      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16064$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16065    else
16066      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
16067      if test "x$IS_MODERN_MAKE" = x; then
16068        { $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
16069$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;}
16070      else
16071        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16072          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16073            MAKE_EXPECTED_ENV='cygwin'
16074          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16075            MAKE_EXPECTED_ENV='msys'
16076          else
16077            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16078          fi
16079          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16080          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16081        else
16082          # Not relevant for non-Windows
16083          IS_MAKE_CORRECT_ENV=true
16084        fi
16085        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16086          { $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
16087$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;}
16088        else
16089          FOUND_MAKE=$MAKE_CANDIDATE
16090
16091  # Only process if variable expands to non-empty
16092
16093  if test "x$FOUND_MAKE" != x; then
16094    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16095
16096  # First separate the path from the arguments. This will split at the first
16097  # space.
16098  complete="$FOUND_MAKE"
16099  path="${complete%% *}"
16100  tmp="$complete EOL"
16101  arguments="${tmp#* }"
16102
16103  # Input might be given as Windows format, start by converting to
16104  # unix format.
16105  new_path=`$CYGPATH -u "$path"`
16106
16107  # Now try to locate executable using which
16108  new_path=`$WHICH "$new_path" 2> /dev/null`
16109  # bat and cmd files are not always considered executable in cygwin causing which
16110  # to not find them
16111  if test "x$new_path" = x \
16112      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16113      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16114    new_path=`$CYGPATH -u "$path"`
16115  fi
16116  if test "x$new_path" = x; then
16117    # Oops. Which didn't find the executable.
16118    # The splitting of arguments from the executable at a space might have been incorrect,
16119    # since paths with space are more likely in Windows. Give it another try with the whole
16120    # argument.
16121    path="$complete"
16122    arguments="EOL"
16123    new_path=`$CYGPATH -u "$path"`
16124    new_path=`$WHICH "$new_path" 2> /dev/null`
16125    # bat and cmd files are not always considered executable in cygwin causing which
16126    # to not find them
16127    if test "x$new_path" = x \
16128        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16129        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16130      new_path=`$CYGPATH -u "$path"`
16131    fi
16132    if test "x$new_path" = x; then
16133      # It's still not found. Now this is an unrecoverable error.
16134      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16135$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16136      has_space=`$ECHO "$complete" | $GREP " "`
16137      if test "x$has_space" != x; then
16138        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16139$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16140      fi
16141      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16142    fi
16143  fi
16144
16145  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16146  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16147  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16148  # "foo.exe" is OK but "foo" is an error.
16149  #
16150  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16151  # It is also a way to make sure we got the proper file name for the real test later on.
16152  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16153  if test "x$test_shortpath" = x; then
16154    # Short path failed, file does not exist as specified.
16155    # Try adding .exe or .cmd
16156    if test -f "${new_path}.exe"; then
16157      input_to_shortpath="${new_path}.exe"
16158    elif test -f "${new_path}.cmd"; then
16159      input_to_shortpath="${new_path}.cmd"
16160    else
16161      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16162$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16163      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16164$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16165      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16166    fi
16167  else
16168    input_to_shortpath="$new_path"
16169  fi
16170
16171  # Call helper function which possibly converts this using DOS-style short mode.
16172  # If so, the updated path is stored in $new_path.
16173  new_path="$input_to_shortpath"
16174
16175  input_path="$input_to_shortpath"
16176  # Check if we need to convert this using DOS-style short mode. If the path
16177  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16178  # take no chances and rewrite it.
16179  # Note: m4 eats our [], so we need to use [ and ] instead.
16180  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16181  if test "x$has_forbidden_chars" != x; then
16182    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16183    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16184    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16185    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16186      # Going to short mode and back again did indeed matter. Since short mode is
16187      # case insensitive, let's make it lowercase to improve readability.
16188      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16189      # Now convert it back to Unix-style (cygpath)
16190      input_path=`$CYGPATH -u "$shortmode_path"`
16191      new_path="$input_path"
16192    fi
16193  fi
16194
16195  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16196  if test "x$test_cygdrive_prefix" = x; then
16197    # As a simple fix, exclude /usr/bin since it's not a real path.
16198    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16199      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16200      # a path prefixed by /cygdrive for fixpath to work.
16201      new_path="$CYGWIN_ROOT_PATH$input_path"
16202    fi
16203  fi
16204
16205  # remove trailing .exe if any
16206  new_path="${new_path/%.exe/}"
16207
16208    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16209
16210  # First separate the path from the arguments. This will split at the first
16211  # space.
16212  complete="$FOUND_MAKE"
16213  path="${complete%% *}"
16214  tmp="$complete EOL"
16215  arguments="${tmp#* }"
16216
16217  # Input might be given as Windows format, start by converting to
16218  # unix format.
16219  new_path="$path"
16220
16221  windows_path="$new_path"
16222  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16223    unix_path=`$CYGPATH -u "$windows_path"`
16224    new_path="$unix_path"
16225  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16226    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16227    new_path="$unix_path"
16228  fi
16229
16230
16231  # Now try to locate executable using which
16232  new_path=`$WHICH "$new_path" 2> /dev/null`
16233
16234  if test "x$new_path" = x; then
16235    # Oops. Which didn't find the executable.
16236    # The splitting of arguments from the executable at a space might have been incorrect,
16237    # since paths with space are more likely in Windows. Give it another try with the whole
16238    # argument.
16239    path="$complete"
16240    arguments="EOL"
16241    new_path="$path"
16242
16243  windows_path="$new_path"
16244  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16245    unix_path=`$CYGPATH -u "$windows_path"`
16246    new_path="$unix_path"
16247  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16248    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16249    new_path="$unix_path"
16250  fi
16251
16252
16253    new_path=`$WHICH "$new_path" 2> /dev/null`
16254    # bat and cmd files are not always considered executable in MSYS causing which
16255    # to not find them
16256    if test "x$new_path" = x \
16257        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16258        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16259      new_path="$path"
16260
16261  windows_path="$new_path"
16262  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16263    unix_path=`$CYGPATH -u "$windows_path"`
16264    new_path="$unix_path"
16265  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16266    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16267    new_path="$unix_path"
16268  fi
16269
16270    fi
16271
16272    if test "x$new_path" = x; then
16273      # It's still not found. Now this is an unrecoverable error.
16274      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16275$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16276      has_space=`$ECHO "$complete" | $GREP " "`
16277      if test "x$has_space" != x; then
16278        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16279$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16280      fi
16281      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16282    fi
16283  fi
16284
16285  # Now new_path has a complete unix path to the binary
16286  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16287    # Keep paths in /bin as-is, but remove trailing .exe if any
16288    new_path="${new_path/%.exe/}"
16289    # Do not save /bin paths to all_fixpath_prefixes!
16290  else
16291    # Not in mixed or Windows style, start by that.
16292    new_path=`cmd //c echo $new_path`
16293
16294  input_path="$new_path"
16295  # Check if we need to convert this using DOS-style short mode. If the path
16296  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16297  # take no chances and rewrite it.
16298  # Note: m4 eats our [], so we need to use [ and ] instead.
16299  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16300  if test "x$has_forbidden_chars" != x; then
16301    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16302    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16303  fi
16304
16305    # Output is in $new_path
16306
16307  windows_path="$new_path"
16308  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16309    unix_path=`$CYGPATH -u "$windows_path"`
16310    new_path="$unix_path"
16311  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16312    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16313    new_path="$unix_path"
16314  fi
16315
16316    # remove trailing .exe if any
16317    new_path="${new_path/%.exe/}"
16318
16319    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16320    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16321  fi
16322
16323    else
16324      # We're on a unix platform. Hooray! :)
16325      # First separate the path from the arguments. This will split at the first
16326      # space.
16327      complete="$FOUND_MAKE"
16328      path="${complete%% *}"
16329      tmp="$complete EOL"
16330      arguments="${tmp#* }"
16331
16332      # Cannot rely on the command "which" here since it doesn't always work.
16333      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16334      if test -z "$is_absolute_path"; then
16335        # Path to executable is not absolute. Find it.
16336        IFS_save="$IFS"
16337        IFS=:
16338        for p in $PATH; do
16339          if test -f "$p/$path" && test -x "$p/$path"; then
16340            new_path="$p/$path"
16341            break
16342          fi
16343        done
16344        IFS="$IFS_save"
16345      else
16346        # This is an absolute path, we can use it without further modifications.
16347        new_path="$path"
16348      fi
16349
16350      if test "x$new_path" = x; then
16351        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16352$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16353        has_space=`$ECHO "$complete" | $GREP " "`
16354        if test "x$has_space" != x; then
16355          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16356$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16357        fi
16358        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16359      fi
16360    fi
16361
16362    # Now join together the path and the arguments once again
16363    if test "x$arguments" != xEOL; then
16364      new_complete="$new_path ${arguments% *}"
16365    else
16366      new_complete="$new_path"
16367    fi
16368
16369    if test "x$complete" != "x$new_complete"; then
16370      FOUND_MAKE="$new_complete"
16371      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16372$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16373    fi
16374  fi
16375
16376        fi
16377      fi
16378    fi
16379  fi
16380
16381
16382    if test "x$FOUND_MAKE" = x; then
16383      for ac_prog in make
16384do
16385  # Extract the first word of "$ac_prog", so it can be a program name with args.
16386set dummy $ac_prog; ac_word=$2
16387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16388$as_echo_n "checking for $ac_word... " >&6; }
16389if ${ac_cv_path_CHECK_MAKE+:} false; then :
16390  $as_echo_n "(cached) " >&6
16391else
16392  case $CHECK_MAKE in
16393  [\\/]* | ?:[\\/]*)
16394  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
16395  ;;
16396  *)
16397  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16398for as_dir in $PATH
16399do
16400  IFS=$as_save_IFS
16401  test -z "$as_dir" && as_dir=.
16402    for ac_exec_ext in '' $ac_executable_extensions; do
16403  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16404    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
16405    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16406    break 2
16407  fi
16408done
16409  done
16410IFS=$as_save_IFS
16411
16412  ;;
16413esac
16414fi
16415CHECK_MAKE=$ac_cv_path_CHECK_MAKE
16416if test -n "$CHECK_MAKE"; then
16417  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
16418$as_echo "$CHECK_MAKE" >&6; }
16419else
16420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16421$as_echo "no" >&6; }
16422fi
16423
16424
16425  test -n "$CHECK_MAKE" && break
16426done
16427
16428
16429  MAKE_CANDIDATE=""$CHECK_MAKE""
16430  DESCRIPTION="make in PATH"
16431
16432  # On Cygwin, we require a newer version of make than on other platforms
16433  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16434    MAKE_VERSION_EXPR="-e 4\."
16435    MAKE_REQUIRED_VERSION="4.0"
16436   else
16437    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16438    MAKE_REQUIRED_VERSION="3.81"
16439  fi
16440
16441  if test "x$MAKE_CANDIDATE" != x; then
16442    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16443$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16444    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16445    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16446    if test "x$IS_GNU_MAKE" = x; then
16447      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16448$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16449    else
16450      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
16451      if test "x$IS_MODERN_MAKE" = x; then
16452        { $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
16453$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;}
16454      else
16455        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16456          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16457            MAKE_EXPECTED_ENV='cygwin'
16458          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16459            MAKE_EXPECTED_ENV='msys'
16460          else
16461            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16462          fi
16463          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16464          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16465        else
16466          # Not relevant for non-Windows
16467          IS_MAKE_CORRECT_ENV=true
16468        fi
16469        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16470          { $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
16471$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;}
16472        else
16473          FOUND_MAKE=$MAKE_CANDIDATE
16474
16475  # Only process if variable expands to non-empty
16476
16477  if test "x$FOUND_MAKE" != x; then
16478    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16479
16480  # First separate the path from the arguments. This will split at the first
16481  # space.
16482  complete="$FOUND_MAKE"
16483  path="${complete%% *}"
16484  tmp="$complete EOL"
16485  arguments="${tmp#* }"
16486
16487  # Input might be given as Windows format, start by converting to
16488  # unix format.
16489  new_path=`$CYGPATH -u "$path"`
16490
16491  # Now try to locate executable using which
16492  new_path=`$WHICH "$new_path" 2> /dev/null`
16493  # bat and cmd files are not always considered executable in cygwin causing which
16494  # to not find them
16495  if test "x$new_path" = x \
16496      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16497      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16498    new_path=`$CYGPATH -u "$path"`
16499  fi
16500  if test "x$new_path" = x; then
16501    # Oops. Which didn't find the executable.
16502    # The splitting of arguments from the executable at a space might have been incorrect,
16503    # since paths with space are more likely in Windows. Give it another try with the whole
16504    # argument.
16505    path="$complete"
16506    arguments="EOL"
16507    new_path=`$CYGPATH -u "$path"`
16508    new_path=`$WHICH "$new_path" 2> /dev/null`
16509    # bat and cmd files are not always considered executable in cygwin causing which
16510    # to not find them
16511    if test "x$new_path" = x \
16512        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16513        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16514      new_path=`$CYGPATH -u "$path"`
16515    fi
16516    if test "x$new_path" = x; then
16517      # It's still not found. Now this is an unrecoverable error.
16518      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16519$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16520      has_space=`$ECHO "$complete" | $GREP " "`
16521      if test "x$has_space" != x; then
16522        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16523$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16524      fi
16525      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16526    fi
16527  fi
16528
16529  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16530  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16531  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16532  # "foo.exe" is OK but "foo" is an error.
16533  #
16534  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16535  # It is also a way to make sure we got the proper file name for the real test later on.
16536  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16537  if test "x$test_shortpath" = x; then
16538    # Short path failed, file does not exist as specified.
16539    # Try adding .exe or .cmd
16540    if test -f "${new_path}.exe"; then
16541      input_to_shortpath="${new_path}.exe"
16542    elif test -f "${new_path}.cmd"; then
16543      input_to_shortpath="${new_path}.cmd"
16544    else
16545      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16546$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16547      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16548$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16549      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16550    fi
16551  else
16552    input_to_shortpath="$new_path"
16553  fi
16554
16555  # Call helper function which possibly converts this using DOS-style short mode.
16556  # If so, the updated path is stored in $new_path.
16557  new_path="$input_to_shortpath"
16558
16559  input_path="$input_to_shortpath"
16560  # Check if we need to convert this using DOS-style short mode. If the path
16561  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16562  # take no chances and rewrite it.
16563  # Note: m4 eats our [], so we need to use [ and ] instead.
16564  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16565  if test "x$has_forbidden_chars" != x; then
16566    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16567    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16568    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16569    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16570      # Going to short mode and back again did indeed matter. Since short mode is
16571      # case insensitive, let's make it lowercase to improve readability.
16572      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16573      # Now convert it back to Unix-style (cygpath)
16574      input_path=`$CYGPATH -u "$shortmode_path"`
16575      new_path="$input_path"
16576    fi
16577  fi
16578
16579  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16580  if test "x$test_cygdrive_prefix" = x; then
16581    # As a simple fix, exclude /usr/bin since it's not a real path.
16582    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16583      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16584      # a path prefixed by /cygdrive for fixpath to work.
16585      new_path="$CYGWIN_ROOT_PATH$input_path"
16586    fi
16587  fi
16588
16589  # remove trailing .exe if any
16590  new_path="${new_path/%.exe/}"
16591
16592    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16593
16594  # First separate the path from the arguments. This will split at the first
16595  # space.
16596  complete="$FOUND_MAKE"
16597  path="${complete%% *}"
16598  tmp="$complete EOL"
16599  arguments="${tmp#* }"
16600
16601  # Input might be given as Windows format, start by converting to
16602  # unix format.
16603  new_path="$path"
16604
16605  windows_path="$new_path"
16606  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16607    unix_path=`$CYGPATH -u "$windows_path"`
16608    new_path="$unix_path"
16609  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16610    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16611    new_path="$unix_path"
16612  fi
16613
16614
16615  # Now try to locate executable using which
16616  new_path=`$WHICH "$new_path" 2> /dev/null`
16617
16618  if test "x$new_path" = x; then
16619    # Oops. Which didn't find the executable.
16620    # The splitting of arguments from the executable at a space might have been incorrect,
16621    # since paths with space are more likely in Windows. Give it another try with the whole
16622    # argument.
16623    path="$complete"
16624    arguments="EOL"
16625    new_path="$path"
16626
16627  windows_path="$new_path"
16628  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16629    unix_path=`$CYGPATH -u "$windows_path"`
16630    new_path="$unix_path"
16631  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16632    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16633    new_path="$unix_path"
16634  fi
16635
16636
16637    new_path=`$WHICH "$new_path" 2> /dev/null`
16638    # bat and cmd files are not always considered executable in MSYS causing which
16639    # to not find them
16640    if test "x$new_path" = x \
16641        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16642        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16643      new_path="$path"
16644
16645  windows_path="$new_path"
16646  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16647    unix_path=`$CYGPATH -u "$windows_path"`
16648    new_path="$unix_path"
16649  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16650    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16651    new_path="$unix_path"
16652  fi
16653
16654    fi
16655
16656    if test "x$new_path" = x; then
16657      # It's still not found. Now this is an unrecoverable error.
16658      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16659$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16660      has_space=`$ECHO "$complete" | $GREP " "`
16661      if test "x$has_space" != x; then
16662        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16663$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16664      fi
16665      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16666    fi
16667  fi
16668
16669  # Now new_path has a complete unix path to the binary
16670  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16671    # Keep paths in /bin as-is, but remove trailing .exe if any
16672    new_path="${new_path/%.exe/}"
16673    # Do not save /bin paths to all_fixpath_prefixes!
16674  else
16675    # Not in mixed or Windows style, start by that.
16676    new_path=`cmd //c echo $new_path`
16677
16678  input_path="$new_path"
16679  # Check if we need to convert this using DOS-style short mode. If the path
16680  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16681  # take no chances and rewrite it.
16682  # Note: m4 eats our [], so we need to use [ and ] instead.
16683  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16684  if test "x$has_forbidden_chars" != x; then
16685    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16686    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16687  fi
16688
16689    # Output is in $new_path
16690
16691  windows_path="$new_path"
16692  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16693    unix_path=`$CYGPATH -u "$windows_path"`
16694    new_path="$unix_path"
16695  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16696    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16697    new_path="$unix_path"
16698  fi
16699
16700    # remove trailing .exe if any
16701    new_path="${new_path/%.exe/}"
16702
16703    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16704    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16705  fi
16706
16707    else
16708      # We're on a unix platform. Hooray! :)
16709      # First separate the path from the arguments. This will split at the first
16710      # space.
16711      complete="$FOUND_MAKE"
16712      path="${complete%% *}"
16713      tmp="$complete EOL"
16714      arguments="${tmp#* }"
16715
16716      # Cannot rely on the command "which" here since it doesn't always work.
16717      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16718      if test -z "$is_absolute_path"; then
16719        # Path to executable is not absolute. Find it.
16720        IFS_save="$IFS"
16721        IFS=:
16722        for p in $PATH; do
16723          if test -f "$p/$path" && test -x "$p/$path"; then
16724            new_path="$p/$path"
16725            break
16726          fi
16727        done
16728        IFS="$IFS_save"
16729      else
16730        # This is an absolute path, we can use it without further modifications.
16731        new_path="$path"
16732      fi
16733
16734      if test "x$new_path" = x; then
16735        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16736$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16737        has_space=`$ECHO "$complete" | $GREP " "`
16738        if test "x$has_space" != x; then
16739          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16740$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16741        fi
16742        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16743      fi
16744    fi
16745
16746    # Now join together the path and the arguments once again
16747    if test "x$arguments" != xEOL; then
16748      new_complete="$new_path ${arguments% *}"
16749    else
16750      new_complete="$new_path"
16751    fi
16752
16753    if test "x$complete" != "x$new_complete"; then
16754      FOUND_MAKE="$new_complete"
16755      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16756$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16757    fi
16758  fi
16759
16760        fi
16761      fi
16762    fi
16763  fi
16764
16765    fi
16766
16767    if test "x$FOUND_MAKE" = x; then
16768      if test "x$TOOLCHAIN_PATH" != x; then
16769        # We have a toolchain path, check that as well before giving up.
16770        OLD_PATH=$PATH
16771        PATH=$TOOLCHAIN_PATH:$PATH
16772        for ac_prog in gmake
16773do
16774  # Extract the first word of "$ac_prog", so it can be a program name with args.
16775set dummy $ac_prog; ac_word=$2
16776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16777$as_echo_n "checking for $ac_word... " >&6; }
16778if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
16779  $as_echo_n "(cached) " >&6
16780else
16781  case $CHECK_TOOLSDIR_GMAKE in
16782  [\\/]* | ?:[\\/]*)
16783  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
16784  ;;
16785  *)
16786  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16787for as_dir in $PATH
16788do
16789  IFS=$as_save_IFS
16790  test -z "$as_dir" && as_dir=.
16791    for ac_exec_ext in '' $ac_executable_extensions; do
16792  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16793    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16794    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16795    break 2
16796  fi
16797done
16798  done
16799IFS=$as_save_IFS
16800
16801  ;;
16802esac
16803fi
16804CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
16805if test -n "$CHECK_TOOLSDIR_GMAKE"; then
16806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
16807$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
16808else
16809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16810$as_echo "no" >&6; }
16811fi
16812
16813
16814  test -n "$CHECK_TOOLSDIR_GMAKE" && break
16815done
16816
16817
16818  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
16819  DESCRIPTION="gmake in tools-dir"
16820
16821  # On Cygwin, we require a newer version of make than on other platforms
16822  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16823    MAKE_VERSION_EXPR="-e 4\."
16824    MAKE_REQUIRED_VERSION="4.0"
16825   else
16826    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16827    MAKE_REQUIRED_VERSION="3.81"
16828  fi
16829
16830  if test "x$MAKE_CANDIDATE" != x; then
16831    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16832$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16833    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16834    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16835    if test "x$IS_GNU_MAKE" = x; then
16836      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16837$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16838    else
16839      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
16840      if test "x$IS_MODERN_MAKE" = x; then
16841        { $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
16842$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;}
16843      else
16844        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16845          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16846            MAKE_EXPECTED_ENV='cygwin'
16847          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16848            MAKE_EXPECTED_ENV='msys'
16849          else
16850            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16851          fi
16852          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16853          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16854        else
16855          # Not relevant for non-Windows
16856          IS_MAKE_CORRECT_ENV=true
16857        fi
16858        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16859          { $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
16860$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;}
16861        else
16862          FOUND_MAKE=$MAKE_CANDIDATE
16863
16864  # Only process if variable expands to non-empty
16865
16866  if test "x$FOUND_MAKE" != x; then
16867    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16868
16869  # First separate the path from the arguments. This will split at the first
16870  # space.
16871  complete="$FOUND_MAKE"
16872  path="${complete%% *}"
16873  tmp="$complete EOL"
16874  arguments="${tmp#* }"
16875
16876  # Input might be given as Windows format, start by converting to
16877  # unix format.
16878  new_path=`$CYGPATH -u "$path"`
16879
16880  # Now try to locate executable using which
16881  new_path=`$WHICH "$new_path" 2> /dev/null`
16882  # bat and cmd files are not always considered executable in cygwin causing which
16883  # to not find them
16884  if test "x$new_path" = x \
16885      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16886      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16887    new_path=`$CYGPATH -u "$path"`
16888  fi
16889  if test "x$new_path" = x; then
16890    # Oops. Which didn't find the executable.
16891    # The splitting of arguments from the executable at a space might have been incorrect,
16892    # since paths with space are more likely in Windows. Give it another try with the whole
16893    # argument.
16894    path="$complete"
16895    arguments="EOL"
16896    new_path=`$CYGPATH -u "$path"`
16897    new_path=`$WHICH "$new_path" 2> /dev/null`
16898    # bat and cmd files are not always considered executable in cygwin causing which
16899    # to not find them
16900    if test "x$new_path" = x \
16901        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16902        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16903      new_path=`$CYGPATH -u "$path"`
16904    fi
16905    if test "x$new_path" = x; then
16906      # It's still not found. Now this is an unrecoverable error.
16907      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16908$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16909      has_space=`$ECHO "$complete" | $GREP " "`
16910      if test "x$has_space" != x; then
16911        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16912$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16913      fi
16914      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16915    fi
16916  fi
16917
16918  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16919  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16920  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16921  # "foo.exe" is OK but "foo" is an error.
16922  #
16923  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16924  # It is also a way to make sure we got the proper file name for the real test later on.
16925  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16926  if test "x$test_shortpath" = x; then
16927    # Short path failed, file does not exist as specified.
16928    # Try adding .exe or .cmd
16929    if test -f "${new_path}.exe"; then
16930      input_to_shortpath="${new_path}.exe"
16931    elif test -f "${new_path}.cmd"; then
16932      input_to_shortpath="${new_path}.cmd"
16933    else
16934      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16935$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16936      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16937$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16938      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16939    fi
16940  else
16941    input_to_shortpath="$new_path"
16942  fi
16943
16944  # Call helper function which possibly converts this using DOS-style short mode.
16945  # If so, the updated path is stored in $new_path.
16946  new_path="$input_to_shortpath"
16947
16948  input_path="$input_to_shortpath"
16949  # Check if we need to convert this using DOS-style short mode. If the path
16950  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16951  # take no chances and rewrite it.
16952  # Note: m4 eats our [], so we need to use [ and ] instead.
16953  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16954  if test "x$has_forbidden_chars" != x; then
16955    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16956    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16957    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16958    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16959      # Going to short mode and back again did indeed matter. Since short mode is
16960      # case insensitive, let's make it lowercase to improve readability.
16961      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16962      # Now convert it back to Unix-style (cygpath)
16963      input_path=`$CYGPATH -u "$shortmode_path"`
16964      new_path="$input_path"
16965    fi
16966  fi
16967
16968  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16969  if test "x$test_cygdrive_prefix" = x; then
16970    # As a simple fix, exclude /usr/bin since it's not a real path.
16971    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16972      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16973      # a path prefixed by /cygdrive for fixpath to work.
16974      new_path="$CYGWIN_ROOT_PATH$input_path"
16975    fi
16976  fi
16977
16978  # remove trailing .exe if any
16979  new_path="${new_path/%.exe/}"
16980
16981    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16982
16983  # First separate the path from the arguments. This will split at the first
16984  # space.
16985  complete="$FOUND_MAKE"
16986  path="${complete%% *}"
16987  tmp="$complete EOL"
16988  arguments="${tmp#* }"
16989
16990  # Input might be given as Windows format, start by converting to
16991  # unix format.
16992  new_path="$path"
16993
16994  windows_path="$new_path"
16995  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16996    unix_path=`$CYGPATH -u "$windows_path"`
16997    new_path="$unix_path"
16998  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16999    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17000    new_path="$unix_path"
17001  fi
17002
17003
17004  # Now try to locate executable using which
17005  new_path=`$WHICH "$new_path" 2> /dev/null`
17006
17007  if test "x$new_path" = x; then
17008    # Oops. Which didn't find the executable.
17009    # The splitting of arguments from the executable at a space might have been incorrect,
17010    # since paths with space are more likely in Windows. Give it another try with the whole
17011    # argument.
17012    path="$complete"
17013    arguments="EOL"
17014    new_path="$path"
17015
17016  windows_path="$new_path"
17017  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17018    unix_path=`$CYGPATH -u "$windows_path"`
17019    new_path="$unix_path"
17020  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17021    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17022    new_path="$unix_path"
17023  fi
17024
17025
17026    new_path=`$WHICH "$new_path" 2> /dev/null`
17027    # bat and cmd files are not always considered executable in MSYS causing which
17028    # to not find them
17029    if test "x$new_path" = x \
17030        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17031        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17032      new_path="$path"
17033
17034  windows_path="$new_path"
17035  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17036    unix_path=`$CYGPATH -u "$windows_path"`
17037    new_path="$unix_path"
17038  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17039    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17040    new_path="$unix_path"
17041  fi
17042
17043    fi
17044
17045    if test "x$new_path" = x; then
17046      # It's still not found. Now this is an unrecoverable error.
17047      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17048$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17049      has_space=`$ECHO "$complete" | $GREP " "`
17050      if test "x$has_space" != x; then
17051        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17052$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17053      fi
17054      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17055    fi
17056  fi
17057
17058  # Now new_path has a complete unix path to the binary
17059  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17060    # Keep paths in /bin as-is, but remove trailing .exe if any
17061    new_path="${new_path/%.exe/}"
17062    # Do not save /bin paths to all_fixpath_prefixes!
17063  else
17064    # Not in mixed or Windows style, start by that.
17065    new_path=`cmd //c echo $new_path`
17066
17067  input_path="$new_path"
17068  # Check if we need to convert this using DOS-style short mode. If the path
17069  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17070  # take no chances and rewrite it.
17071  # Note: m4 eats our [], so we need to use [ and ] instead.
17072  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17073  if test "x$has_forbidden_chars" != x; then
17074    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17075    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17076  fi
17077
17078    # Output is in $new_path
17079
17080  windows_path="$new_path"
17081  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17082    unix_path=`$CYGPATH -u "$windows_path"`
17083    new_path="$unix_path"
17084  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17085    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17086    new_path="$unix_path"
17087  fi
17088
17089    # remove trailing .exe if any
17090    new_path="${new_path/%.exe/}"
17091
17092    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17093    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17094  fi
17095
17096    else
17097      # We're on a unix platform. Hooray! :)
17098      # First separate the path from the arguments. This will split at the first
17099      # space.
17100      complete="$FOUND_MAKE"
17101      path="${complete%% *}"
17102      tmp="$complete EOL"
17103      arguments="${tmp#* }"
17104
17105      # Cannot rely on the command "which" here since it doesn't always work.
17106      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17107      if test -z "$is_absolute_path"; then
17108        # Path to executable is not absolute. Find it.
17109        IFS_save="$IFS"
17110        IFS=:
17111        for p in $PATH; do
17112          if test -f "$p/$path" && test -x "$p/$path"; then
17113            new_path="$p/$path"
17114            break
17115          fi
17116        done
17117        IFS="$IFS_save"
17118      else
17119        # This is an absolute path, we can use it without further modifications.
17120        new_path="$path"
17121      fi
17122
17123      if test "x$new_path" = x; then
17124        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17125$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17126        has_space=`$ECHO "$complete" | $GREP " "`
17127        if test "x$has_space" != x; then
17128          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17129$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17130        fi
17131        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17132      fi
17133    fi
17134
17135    # Now join together the path and the arguments once again
17136    if test "x$arguments" != xEOL; then
17137      new_complete="$new_path ${arguments% *}"
17138    else
17139      new_complete="$new_path"
17140    fi
17141
17142    if test "x$complete" != "x$new_complete"; then
17143      FOUND_MAKE="$new_complete"
17144      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17145$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17146    fi
17147  fi
17148
17149        fi
17150      fi
17151    fi
17152  fi
17153
17154        if test "x$FOUND_MAKE" = x; then
17155          for ac_prog in make
17156do
17157  # Extract the first word of "$ac_prog", so it can be a program name with args.
17158set dummy $ac_prog; ac_word=$2
17159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17160$as_echo_n "checking for $ac_word... " >&6; }
17161if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
17162  $as_echo_n "(cached) " >&6
17163else
17164  case $CHECK_TOOLSDIR_MAKE in
17165  [\\/]* | ?:[\\/]*)
17166  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
17167  ;;
17168  *)
17169  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17170for as_dir in $PATH
17171do
17172  IFS=$as_save_IFS
17173  test -z "$as_dir" && as_dir=.
17174    for ac_exec_ext in '' $ac_executable_extensions; do
17175  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17176    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
17177    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17178    break 2
17179  fi
17180done
17181  done
17182IFS=$as_save_IFS
17183
17184  ;;
17185esac
17186fi
17187CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
17188if test -n "$CHECK_TOOLSDIR_MAKE"; then
17189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
17190$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
17191else
17192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17193$as_echo "no" >&6; }
17194fi
17195
17196
17197  test -n "$CHECK_TOOLSDIR_MAKE" && break
17198done
17199
17200
17201  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
17202  DESCRIPTION="make in tools-dir"
17203
17204  # On Cygwin, we require a newer version of make than on other platforms
17205  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17206    MAKE_VERSION_EXPR="-e 4\."
17207    MAKE_REQUIRED_VERSION="4.0"
17208   else
17209    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17210    MAKE_REQUIRED_VERSION="3.81"
17211  fi
17212
17213  if test "x$MAKE_CANDIDATE" != x; then
17214    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17215$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17216    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17217    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17218    if test "x$IS_GNU_MAKE" = x; then
17219      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17220$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17221    else
17222      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17223      if test "x$IS_MODERN_MAKE" = x; then
17224        { $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
17225$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;}
17226      else
17227        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17228          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17229            MAKE_EXPECTED_ENV='cygwin'
17230          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17231            MAKE_EXPECTED_ENV='msys'
17232          else
17233            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17234          fi
17235          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17236          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17237        else
17238          # Not relevant for non-Windows
17239          IS_MAKE_CORRECT_ENV=true
17240        fi
17241        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17242          { $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
17243$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;}
17244        else
17245          FOUND_MAKE=$MAKE_CANDIDATE
17246
17247  # Only process if variable expands to non-empty
17248
17249  if test "x$FOUND_MAKE" != x; then
17250    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17251
17252  # First separate the path from the arguments. This will split at the first
17253  # space.
17254  complete="$FOUND_MAKE"
17255  path="${complete%% *}"
17256  tmp="$complete EOL"
17257  arguments="${tmp#* }"
17258
17259  # Input might be given as Windows format, start by converting to
17260  # unix format.
17261  new_path=`$CYGPATH -u "$path"`
17262
17263  # Now try to locate executable using which
17264  new_path=`$WHICH "$new_path" 2> /dev/null`
17265  # bat and cmd files are not always considered executable in cygwin causing which
17266  # to not find them
17267  if test "x$new_path" = x \
17268      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17269      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17270    new_path=`$CYGPATH -u "$path"`
17271  fi
17272  if test "x$new_path" = x; then
17273    # Oops. Which didn't find the executable.
17274    # The splitting of arguments from the executable at a space might have been incorrect,
17275    # since paths with space are more likely in Windows. Give it another try with the whole
17276    # argument.
17277    path="$complete"
17278    arguments="EOL"
17279    new_path=`$CYGPATH -u "$path"`
17280    new_path=`$WHICH "$new_path" 2> /dev/null`
17281    # bat and cmd files are not always considered executable in cygwin causing which
17282    # to not find them
17283    if test "x$new_path" = x \
17284        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17285        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17286      new_path=`$CYGPATH -u "$path"`
17287    fi
17288    if test "x$new_path" = x; then
17289      # It's still not found. Now this is an unrecoverable error.
17290      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17291$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17292      has_space=`$ECHO "$complete" | $GREP " "`
17293      if test "x$has_space" != x; then
17294        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17295$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17296      fi
17297      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17298    fi
17299  fi
17300
17301  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17302  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17303  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17304  # "foo.exe" is OK but "foo" is an error.
17305  #
17306  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17307  # It is also a way to make sure we got the proper file name for the real test later on.
17308  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17309  if test "x$test_shortpath" = x; then
17310    # Short path failed, file does not exist as specified.
17311    # Try adding .exe or .cmd
17312    if test -f "${new_path}.exe"; then
17313      input_to_shortpath="${new_path}.exe"
17314    elif test -f "${new_path}.cmd"; then
17315      input_to_shortpath="${new_path}.cmd"
17316    else
17317      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17318$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17319      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17320$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17321      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17322    fi
17323  else
17324    input_to_shortpath="$new_path"
17325  fi
17326
17327  # Call helper function which possibly converts this using DOS-style short mode.
17328  # If so, the updated path is stored in $new_path.
17329  new_path="$input_to_shortpath"
17330
17331  input_path="$input_to_shortpath"
17332  # Check if we need to convert this using DOS-style short mode. If the path
17333  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17334  # take no chances and rewrite it.
17335  # Note: m4 eats our [], so we need to use [ and ] instead.
17336  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17337  if test "x$has_forbidden_chars" != x; then
17338    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17339    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17340    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17341    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17342      # Going to short mode and back again did indeed matter. Since short mode is
17343      # case insensitive, let's make it lowercase to improve readability.
17344      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17345      # Now convert it back to Unix-style (cygpath)
17346      input_path=`$CYGPATH -u "$shortmode_path"`
17347      new_path="$input_path"
17348    fi
17349  fi
17350
17351  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17352  if test "x$test_cygdrive_prefix" = x; then
17353    # As a simple fix, exclude /usr/bin since it's not a real path.
17354    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17355      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17356      # a path prefixed by /cygdrive for fixpath to work.
17357      new_path="$CYGWIN_ROOT_PATH$input_path"
17358    fi
17359  fi
17360
17361  # remove trailing .exe if any
17362  new_path="${new_path/%.exe/}"
17363
17364    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17365
17366  # First separate the path from the arguments. This will split at the first
17367  # space.
17368  complete="$FOUND_MAKE"
17369  path="${complete%% *}"
17370  tmp="$complete EOL"
17371  arguments="${tmp#* }"
17372
17373  # Input might be given as Windows format, start by converting to
17374  # unix format.
17375  new_path="$path"
17376
17377  windows_path="$new_path"
17378  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17379    unix_path=`$CYGPATH -u "$windows_path"`
17380    new_path="$unix_path"
17381  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17382    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17383    new_path="$unix_path"
17384  fi
17385
17386
17387  # Now try to locate executable using which
17388  new_path=`$WHICH "$new_path" 2> /dev/null`
17389
17390  if test "x$new_path" = x; then
17391    # Oops. Which didn't find the executable.
17392    # The splitting of arguments from the executable at a space might have been incorrect,
17393    # since paths with space are more likely in Windows. Give it another try with the whole
17394    # argument.
17395    path="$complete"
17396    arguments="EOL"
17397    new_path="$path"
17398
17399  windows_path="$new_path"
17400  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17401    unix_path=`$CYGPATH -u "$windows_path"`
17402    new_path="$unix_path"
17403  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17404    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17405    new_path="$unix_path"
17406  fi
17407
17408
17409    new_path=`$WHICH "$new_path" 2> /dev/null`
17410    # bat and cmd files are not always considered executable in MSYS causing which
17411    # to not find them
17412    if test "x$new_path" = x \
17413        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17414        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17415      new_path="$path"
17416
17417  windows_path="$new_path"
17418  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17419    unix_path=`$CYGPATH -u "$windows_path"`
17420    new_path="$unix_path"
17421  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17422    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17423    new_path="$unix_path"
17424  fi
17425
17426    fi
17427
17428    if test "x$new_path" = x; then
17429      # It's still not found. Now this is an unrecoverable error.
17430      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17431$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17432      has_space=`$ECHO "$complete" | $GREP " "`
17433      if test "x$has_space" != x; then
17434        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17435$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17436      fi
17437      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17438    fi
17439  fi
17440
17441  # Now new_path has a complete unix path to the binary
17442  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17443    # Keep paths in /bin as-is, but remove trailing .exe if any
17444    new_path="${new_path/%.exe/}"
17445    # Do not save /bin paths to all_fixpath_prefixes!
17446  else
17447    # Not in mixed or Windows style, start by that.
17448    new_path=`cmd //c echo $new_path`
17449
17450  input_path="$new_path"
17451  # Check if we need to convert this using DOS-style short mode. If the path
17452  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17453  # take no chances and rewrite it.
17454  # Note: m4 eats our [], so we need to use [ and ] instead.
17455  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17456  if test "x$has_forbidden_chars" != x; then
17457    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17458    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17459  fi
17460
17461    # Output is in $new_path
17462
17463  windows_path="$new_path"
17464  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17465    unix_path=`$CYGPATH -u "$windows_path"`
17466    new_path="$unix_path"
17467  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17468    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17469    new_path="$unix_path"
17470  fi
17471
17472    # remove trailing .exe if any
17473    new_path="${new_path/%.exe/}"
17474
17475    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17476    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17477  fi
17478
17479    else
17480      # We're on a unix platform. Hooray! :)
17481      # First separate the path from the arguments. This will split at the first
17482      # space.
17483      complete="$FOUND_MAKE"
17484      path="${complete%% *}"
17485      tmp="$complete EOL"
17486      arguments="${tmp#* }"
17487
17488      # Cannot rely on the command "which" here since it doesn't always work.
17489      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17490      if test -z "$is_absolute_path"; then
17491        # Path to executable is not absolute. Find it.
17492        IFS_save="$IFS"
17493        IFS=:
17494        for p in $PATH; do
17495          if test -f "$p/$path" && test -x "$p/$path"; then
17496            new_path="$p/$path"
17497            break
17498          fi
17499        done
17500        IFS="$IFS_save"
17501      else
17502        # This is an absolute path, we can use it without further modifications.
17503        new_path="$path"
17504      fi
17505
17506      if test "x$new_path" = x; then
17507        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17508$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17509        has_space=`$ECHO "$complete" | $GREP " "`
17510        if test "x$has_space" != x; then
17511          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17512$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17513        fi
17514        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17515      fi
17516    fi
17517
17518    # Now join together the path and the arguments once again
17519    if test "x$arguments" != xEOL; then
17520      new_complete="$new_path ${arguments% *}"
17521    else
17522      new_complete="$new_path"
17523    fi
17524
17525    if test "x$complete" != "x$new_complete"; then
17526      FOUND_MAKE="$new_complete"
17527      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17528$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17529    fi
17530  fi
17531
17532        fi
17533      fi
17534    fi
17535  fi
17536
17537        fi
17538        PATH=$OLD_PATH
17539      fi
17540    fi
17541
17542    if test "x$FOUND_MAKE" = x; then
17543      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
17544    fi
17545  fi
17546
17547  MAKE=$FOUND_MAKE
17548
17549  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
17550$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
17551
17552
17553  # Check if make supports the output sync option and if so, setup using it.
17554  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
17555$as_echo_n "checking if make --output-sync is supported... " >&6; }
17556  if $MAKE --version -O > /dev/null 2>&1; then
17557    OUTPUT_SYNC_SUPPORTED=true
17558    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17559$as_echo "yes" >&6; }
17560    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
17561$as_echo_n "checking for output-sync value... " >&6; }
17562
17563# Check whether --with-output-sync was given.
17564if test "${with_output_sync+set}" = set; then :
17565  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
17566fi
17567
17568    if test "x$OUTPUT_SYNC" = "x"; then
17569      OUTPUT_SYNC=none
17570    fi
17571    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
17572$as_echo "$OUTPUT_SYNC" >&6; }
17573    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
17574      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
17575    fi
17576  else
17577    OUTPUT_SYNC_SUPPORTED=false
17578    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17579$as_echo "no" >&6; }
17580  fi
17581
17582
17583
17584
17585
17586
17587  # Test if find supports -delete
17588  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
17589$as_echo_n "checking if find supports -delete... " >&6; }
17590  FIND_DELETE="-delete"
17591
17592  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
17593
17594  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
17595
17596  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
17597  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
17598    # No, it does not.
17599    rm $DELETEDIR/TestIfFindSupportsDelete
17600    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
17601      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
17602      FIND_DELETE="-print | xargs rm"
17603    else
17604      FIND_DELETE="-exec rm \{\} \+"
17605    fi
17606    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17607$as_echo "no" >&6; }
17608  else
17609    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17610$as_echo "yes" >&6; }
17611  fi
17612  rmdir $DELETEDIR
17613
17614
17615
17616  # These tools might not be installed by default,
17617  # need hint on how to install them.
17618
17619
17620
17621  # Publish this variable in the help.
17622
17623
17624  if test "x$UNZIP" = x; then
17625    # The variable is not set by user, try to locate tool using the code snippet
17626    for ac_prog in unzip
17627do
17628  # Extract the first word of "$ac_prog", so it can be a program name with args.
17629set dummy $ac_prog; ac_word=$2
17630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17631$as_echo_n "checking for $ac_word... " >&6; }
17632if ${ac_cv_path_UNZIP+:} false; then :
17633  $as_echo_n "(cached) " >&6
17634else
17635  case $UNZIP in
17636  [\\/]* | ?:[\\/]*)
17637  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17638  ;;
17639  *)
17640  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17641for as_dir in $PATH
17642do
17643  IFS=$as_save_IFS
17644  test -z "$as_dir" && as_dir=.
17645    for ac_exec_ext in '' $ac_executable_extensions; do
17646  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17647    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17648    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17649    break 2
17650  fi
17651done
17652  done
17653IFS=$as_save_IFS
17654
17655  ;;
17656esac
17657fi
17658UNZIP=$ac_cv_path_UNZIP
17659if test -n "$UNZIP"; then
17660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17661$as_echo "$UNZIP" >&6; }
17662else
17663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17664$as_echo "no" >&6; }
17665fi
17666
17667
17668  test -n "$UNZIP" && break
17669done
17670
17671  else
17672    # The variable is set, but is it from the command line or the environment?
17673
17674    # Try to remove the string !UNZIP! from our list.
17675    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
17676    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17677      # If it failed, the variable was not from the command line. Ignore it,
17678      # but warn the user (except for BASH, which is always set by the calling BASH).
17679      if test "xUNZIP" != xBASH; then
17680        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
17681$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
17682      fi
17683      # Try to locate tool using the code snippet
17684      for ac_prog in unzip
17685do
17686  # Extract the first word of "$ac_prog", so it can be a program name with args.
17687set dummy $ac_prog; ac_word=$2
17688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17689$as_echo_n "checking for $ac_word... " >&6; }
17690if ${ac_cv_path_UNZIP+:} false; then :
17691  $as_echo_n "(cached) " >&6
17692else
17693  case $UNZIP in
17694  [\\/]* | ?:[\\/]*)
17695  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17696  ;;
17697  *)
17698  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17699for as_dir in $PATH
17700do
17701  IFS=$as_save_IFS
17702  test -z "$as_dir" && as_dir=.
17703    for ac_exec_ext in '' $ac_executable_extensions; do
17704  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17705    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17706    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17707    break 2
17708  fi
17709done
17710  done
17711IFS=$as_save_IFS
17712
17713  ;;
17714esac
17715fi
17716UNZIP=$ac_cv_path_UNZIP
17717if test -n "$UNZIP"; then
17718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17719$as_echo "$UNZIP" >&6; }
17720else
17721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17722$as_echo "no" >&6; }
17723fi
17724
17725
17726  test -n "$UNZIP" && break
17727done
17728
17729    else
17730      # If it succeeded, then it was overridden by the user. We will use it
17731      # for the tool.
17732
17733      # First remove it from the list of overridden variables, so we can test
17734      # for unknown variables in the end.
17735      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17736
17737      # Check if the provided tool contains a complete path.
17738      tool_specified="$UNZIP"
17739      tool_basename="${tool_specified##*/}"
17740      if test "x$tool_basename" = "x$tool_specified"; then
17741        # A command without a complete path is provided, search $PATH.
17742        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
17743$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
17744        # Extract the first word of "$tool_basename", so it can be a program name with args.
17745set dummy $tool_basename; ac_word=$2
17746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17747$as_echo_n "checking for $ac_word... " >&6; }
17748if ${ac_cv_path_UNZIP+:} false; then :
17749  $as_echo_n "(cached) " >&6
17750else
17751  case $UNZIP in
17752  [\\/]* | ?:[\\/]*)
17753  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17754  ;;
17755  *)
17756  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17757for as_dir in $PATH
17758do
17759  IFS=$as_save_IFS
17760  test -z "$as_dir" && as_dir=.
17761    for ac_exec_ext in '' $ac_executable_extensions; do
17762  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17763    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17764    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17765    break 2
17766  fi
17767done
17768  done
17769IFS=$as_save_IFS
17770
17771  ;;
17772esac
17773fi
17774UNZIP=$ac_cv_path_UNZIP
17775if test -n "$UNZIP"; then
17776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17777$as_echo "$UNZIP" >&6; }
17778else
17779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17780$as_echo "no" >&6; }
17781fi
17782
17783
17784        if test "x$UNZIP" = x; then
17785          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17786        fi
17787      else
17788        # Otherwise we believe it is a complete path. Use it as it is.
17789        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
17790$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
17791        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
17792$as_echo_n "checking for UNZIP... " >&6; }
17793        if test ! -x "$tool_specified"; then
17794          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17795$as_echo "not found" >&6; }
17796          as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17797        fi
17798        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17799$as_echo "$tool_specified" >&6; }
17800      fi
17801    fi
17802  fi
17803
17804
17805
17806  if test "x$UNZIP" = x; then
17807    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
17808  fi
17809
17810
17811
17812
17813
17814  # Publish this variable in the help.
17815
17816
17817  if test "x$ZIP" = x; then
17818    # The variable is not set by user, try to locate tool using the code snippet
17819    for ac_prog in zip
17820do
17821  # Extract the first word of "$ac_prog", so it can be a program name with args.
17822set dummy $ac_prog; ac_word=$2
17823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17824$as_echo_n "checking for $ac_word... " >&6; }
17825if ${ac_cv_path_ZIP+:} false; then :
17826  $as_echo_n "(cached) " >&6
17827else
17828  case $ZIP in
17829  [\\/]* | ?:[\\/]*)
17830  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17831  ;;
17832  *)
17833  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17834for as_dir in $PATH
17835do
17836  IFS=$as_save_IFS
17837  test -z "$as_dir" && as_dir=.
17838    for ac_exec_ext in '' $ac_executable_extensions; do
17839  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17840    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17841    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17842    break 2
17843  fi
17844done
17845  done
17846IFS=$as_save_IFS
17847
17848  ;;
17849esac
17850fi
17851ZIP=$ac_cv_path_ZIP
17852if test -n "$ZIP"; then
17853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17854$as_echo "$ZIP" >&6; }
17855else
17856  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17857$as_echo "no" >&6; }
17858fi
17859
17860
17861  test -n "$ZIP" && break
17862done
17863
17864  else
17865    # The variable is set, but is it from the command line or the environment?
17866
17867    # Try to remove the string !ZIP! from our list.
17868    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
17869    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17870      # If it failed, the variable was not from the command line. Ignore it,
17871      # but warn the user (except for BASH, which is always set by the calling BASH).
17872      if test "xZIP" != xBASH; then
17873        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
17874$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
17875      fi
17876      # Try to locate tool using the code snippet
17877      for ac_prog in zip
17878do
17879  # Extract the first word of "$ac_prog", so it can be a program name with args.
17880set dummy $ac_prog; ac_word=$2
17881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17882$as_echo_n "checking for $ac_word... " >&6; }
17883if ${ac_cv_path_ZIP+:} false; then :
17884  $as_echo_n "(cached) " >&6
17885else
17886  case $ZIP in
17887  [\\/]* | ?:[\\/]*)
17888  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17889  ;;
17890  *)
17891  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17892for as_dir in $PATH
17893do
17894  IFS=$as_save_IFS
17895  test -z "$as_dir" && as_dir=.
17896    for ac_exec_ext in '' $ac_executable_extensions; do
17897  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17898    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17899    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17900    break 2
17901  fi
17902done
17903  done
17904IFS=$as_save_IFS
17905
17906  ;;
17907esac
17908fi
17909ZIP=$ac_cv_path_ZIP
17910if test -n "$ZIP"; then
17911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17912$as_echo "$ZIP" >&6; }
17913else
17914  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17915$as_echo "no" >&6; }
17916fi
17917
17918
17919  test -n "$ZIP" && break
17920done
17921
17922    else
17923      # If it succeeded, then it was overridden by the user. We will use it
17924      # for the tool.
17925
17926      # First remove it from the list of overridden variables, so we can test
17927      # for unknown variables in the end.
17928      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17929
17930      # Check if the provided tool contains a complete path.
17931      tool_specified="$ZIP"
17932      tool_basename="${tool_specified##*/}"
17933      if test "x$tool_basename" = "x$tool_specified"; then
17934        # A command without a complete path is provided, search $PATH.
17935        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
17936$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
17937        # Extract the first word of "$tool_basename", so it can be a program name with args.
17938set dummy $tool_basename; ac_word=$2
17939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17940$as_echo_n "checking for $ac_word... " >&6; }
17941if ${ac_cv_path_ZIP+:} false; then :
17942  $as_echo_n "(cached) " >&6
17943else
17944  case $ZIP in
17945  [\\/]* | ?:[\\/]*)
17946  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17947  ;;
17948  *)
17949  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17950for as_dir in $PATH
17951do
17952  IFS=$as_save_IFS
17953  test -z "$as_dir" && as_dir=.
17954    for ac_exec_ext in '' $ac_executable_extensions; do
17955  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17956    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17957    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17958    break 2
17959  fi
17960done
17961  done
17962IFS=$as_save_IFS
17963
17964  ;;
17965esac
17966fi
17967ZIP=$ac_cv_path_ZIP
17968if test -n "$ZIP"; then
17969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17970$as_echo "$ZIP" >&6; }
17971else
17972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17973$as_echo "no" >&6; }
17974fi
17975
17976
17977        if test "x$ZIP" = x; then
17978          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17979        fi
17980      else
17981        # Otherwise we believe it is a complete path. Use it as it is.
17982        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
17983$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
17984        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
17985$as_echo_n "checking for ZIP... " >&6; }
17986        if test ! -x "$tool_specified"; then
17987          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17988$as_echo "not found" >&6; }
17989          as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17990        fi
17991        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17992$as_echo "$tool_specified" >&6; }
17993      fi
17994    fi
17995  fi
17996
17997
17998
17999  if test "x$ZIP" = x; then
18000    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
18001  fi
18002
18003
18004
18005  # Non-required basic tools
18006
18007
18008
18009  # Publish this variable in the help.
18010
18011
18012  if test "x$LDD" = x; then
18013    # The variable is not set by user, try to locate tool using the code snippet
18014    for ac_prog in ldd
18015do
18016  # Extract the first word of "$ac_prog", so it can be a program name with args.
18017set dummy $ac_prog; ac_word=$2
18018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18019$as_echo_n "checking for $ac_word... " >&6; }
18020if ${ac_cv_path_LDD+:} false; then :
18021  $as_echo_n "(cached) " >&6
18022else
18023  case $LDD in
18024  [\\/]* | ?:[\\/]*)
18025  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
18026  ;;
18027  *)
18028  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18029for as_dir in $PATH
18030do
18031  IFS=$as_save_IFS
18032  test -z "$as_dir" && as_dir=.
18033    for ac_exec_ext in '' $ac_executable_extensions; do
18034  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18035    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
18036    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18037    break 2
18038  fi
18039done
18040  done
18041IFS=$as_save_IFS
18042
18043  ;;
18044esac
18045fi
18046LDD=$ac_cv_path_LDD
18047if test -n "$LDD"; then
18048  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
18049$as_echo "$LDD" >&6; }
18050else
18051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18052$as_echo "no" >&6; }
18053fi
18054
18055
18056  test -n "$LDD" && break
18057done
18058
18059  else
18060    # The variable is set, but is it from the command line or the environment?
18061
18062    # Try to remove the string !LDD! from our list.
18063    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
18064    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18065      # If it failed, the variable was not from the command line. Ignore it,
18066      # but warn the user (except for BASH, which is always set by the calling BASH).
18067      if test "xLDD" != xBASH; then
18068        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
18069$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
18070      fi
18071      # Try to locate tool using the code snippet
18072      for ac_prog in ldd
18073do
18074  # Extract the first word of "$ac_prog", so it can be a program name with args.
18075set dummy $ac_prog; ac_word=$2
18076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18077$as_echo_n "checking for $ac_word... " >&6; }
18078if ${ac_cv_path_LDD+:} false; then :
18079  $as_echo_n "(cached) " >&6
18080else
18081  case $LDD in
18082  [\\/]* | ?:[\\/]*)
18083  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
18084  ;;
18085  *)
18086  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18087for as_dir in $PATH
18088do
18089  IFS=$as_save_IFS
18090  test -z "$as_dir" && as_dir=.
18091    for ac_exec_ext in '' $ac_executable_extensions; do
18092  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18093    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
18094    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18095    break 2
18096  fi
18097done
18098  done
18099IFS=$as_save_IFS
18100
18101  ;;
18102esac
18103fi
18104LDD=$ac_cv_path_LDD
18105if test -n "$LDD"; then
18106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
18107$as_echo "$LDD" >&6; }
18108else
18109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18110$as_echo "no" >&6; }
18111fi
18112
18113
18114  test -n "$LDD" && break
18115done
18116
18117    else
18118      # If it succeeded, then it was overridden by the user. We will use it
18119      # for the tool.
18120
18121      # First remove it from the list of overridden variables, so we can test
18122      # for unknown variables in the end.
18123      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18124
18125      # Check if the provided tool contains a complete path.
18126      tool_specified="$LDD"
18127      tool_basename="${tool_specified##*/}"
18128      if test "x$tool_basename" = "x$tool_specified"; then
18129        # A command without a complete path is provided, search $PATH.
18130        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
18131$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
18132        # Extract the first word of "$tool_basename", so it can be a program name with args.
18133set dummy $tool_basename; ac_word=$2
18134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18135$as_echo_n "checking for $ac_word... " >&6; }
18136if ${ac_cv_path_LDD+:} false; then :
18137  $as_echo_n "(cached) " >&6
18138else
18139  case $LDD in
18140  [\\/]* | ?:[\\/]*)
18141  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
18142  ;;
18143  *)
18144  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18145for as_dir in $PATH
18146do
18147  IFS=$as_save_IFS
18148  test -z "$as_dir" && as_dir=.
18149    for ac_exec_ext in '' $ac_executable_extensions; do
18150  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18151    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
18152    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18153    break 2
18154  fi
18155done
18156  done
18157IFS=$as_save_IFS
18158
18159  ;;
18160esac
18161fi
18162LDD=$ac_cv_path_LDD
18163if test -n "$LDD"; then
18164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
18165$as_echo "$LDD" >&6; }
18166else
18167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18168$as_echo "no" >&6; }
18169fi
18170
18171
18172        if test "x$LDD" = x; then
18173          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18174        fi
18175      else
18176        # Otherwise we believe it is a complete path. Use it as it is.
18177        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
18178$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
18179        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
18180$as_echo_n "checking for LDD... " >&6; }
18181        if test ! -x "$tool_specified"; then
18182          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18183$as_echo "not found" >&6; }
18184          as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
18185        fi
18186        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18187$as_echo "$tool_specified" >&6; }
18188      fi
18189    fi
18190  fi
18191
18192
18193  if test "x$LDD" = "x"; then
18194    # List shared lib dependencies is used for
18195    # debug output and checking for forbidden dependencies.
18196    # We can build without it.
18197    LDD="true"
18198  fi
18199
18200
18201  # Publish this variable in the help.
18202
18203
18204  if test "x$OTOOL" = x; then
18205    # The variable is not set by user, try to locate tool using the code snippet
18206    for ac_prog in otool
18207do
18208  # Extract the first word of "$ac_prog", so it can be a program name with args.
18209set dummy $ac_prog; ac_word=$2
18210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18211$as_echo_n "checking for $ac_word... " >&6; }
18212if ${ac_cv_path_OTOOL+:} false; then :
18213  $as_echo_n "(cached) " >&6
18214else
18215  case $OTOOL in
18216  [\\/]* | ?:[\\/]*)
18217  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
18218  ;;
18219  *)
18220  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18221for as_dir in $PATH
18222do
18223  IFS=$as_save_IFS
18224  test -z "$as_dir" && as_dir=.
18225    for ac_exec_ext in '' $ac_executable_extensions; do
18226  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18227    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18228    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18229    break 2
18230  fi
18231done
18232  done
18233IFS=$as_save_IFS
18234
18235  ;;
18236esac
18237fi
18238OTOOL=$ac_cv_path_OTOOL
18239if test -n "$OTOOL"; then
18240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18241$as_echo "$OTOOL" >&6; }
18242else
18243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18244$as_echo "no" >&6; }
18245fi
18246
18247
18248  test -n "$OTOOL" && break
18249done
18250
18251  else
18252    # The variable is set, but is it from the command line or the environment?
18253
18254    # Try to remove the string !OTOOL! from our list.
18255    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
18256    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18257      # If it failed, the variable was not from the command line. Ignore it,
18258      # but warn the user (except for BASH, which is always set by the calling BASH).
18259      if test "xOTOOL" != xBASH; then
18260        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
18261$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
18262      fi
18263      # Try to locate tool using the code snippet
18264      for ac_prog in otool
18265do
18266  # Extract the first word of "$ac_prog", so it can be a program name with args.
18267set dummy $ac_prog; ac_word=$2
18268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18269$as_echo_n "checking for $ac_word... " >&6; }
18270if ${ac_cv_path_OTOOL+:} false; then :
18271  $as_echo_n "(cached) " >&6
18272else
18273  case $OTOOL in
18274  [\\/]* | ?:[\\/]*)
18275  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
18276  ;;
18277  *)
18278  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18279for as_dir in $PATH
18280do
18281  IFS=$as_save_IFS
18282  test -z "$as_dir" && as_dir=.
18283    for ac_exec_ext in '' $ac_executable_extensions; do
18284  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18285    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18286    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18287    break 2
18288  fi
18289done
18290  done
18291IFS=$as_save_IFS
18292
18293  ;;
18294esac
18295fi
18296OTOOL=$ac_cv_path_OTOOL
18297if test -n "$OTOOL"; then
18298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18299$as_echo "$OTOOL" >&6; }
18300else
18301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18302$as_echo "no" >&6; }
18303fi
18304
18305
18306  test -n "$OTOOL" && break
18307done
18308
18309    else
18310      # If it succeeded, then it was overridden by the user. We will use it
18311      # for the tool.
18312
18313      # First remove it from the list of overridden variables, so we can test
18314      # for unknown variables in the end.
18315      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18316
18317      # Check if the provided tool contains a complete path.
18318      tool_specified="$OTOOL"
18319      tool_basename="${tool_specified##*/}"
18320      if test "x$tool_basename" = "x$tool_specified"; then
18321        # A command without a complete path is provided, search $PATH.
18322        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
18323$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
18324        # Extract the first word of "$tool_basename", so it can be a program name with args.
18325set dummy $tool_basename; ac_word=$2
18326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18327$as_echo_n "checking for $ac_word... " >&6; }
18328if ${ac_cv_path_OTOOL+:} false; then :
18329  $as_echo_n "(cached) " >&6
18330else
18331  case $OTOOL in
18332  [\\/]* | ?:[\\/]*)
18333  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
18334  ;;
18335  *)
18336  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18337for as_dir in $PATH
18338do
18339  IFS=$as_save_IFS
18340  test -z "$as_dir" && as_dir=.
18341    for ac_exec_ext in '' $ac_executable_extensions; do
18342  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18343    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18344    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18345    break 2
18346  fi
18347done
18348  done
18349IFS=$as_save_IFS
18350
18351  ;;
18352esac
18353fi
18354OTOOL=$ac_cv_path_OTOOL
18355if test -n "$OTOOL"; then
18356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18357$as_echo "$OTOOL" >&6; }
18358else
18359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18360$as_echo "no" >&6; }
18361fi
18362
18363
18364        if test "x$OTOOL" = x; then
18365          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18366        fi
18367      else
18368        # Otherwise we believe it is a complete path. Use it as it is.
18369        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
18370$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
18371        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
18372$as_echo_n "checking for OTOOL... " >&6; }
18373        if test ! -x "$tool_specified"; then
18374          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18375$as_echo "not found" >&6; }
18376          as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
18377        fi
18378        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18379$as_echo "$tool_specified" >&6; }
18380      fi
18381    fi
18382  fi
18383
18384
18385  if test "x$OTOOL" = "x"; then
18386    OTOOL="true"
18387  fi
18388
18389
18390  # Publish this variable in the help.
18391
18392
18393  if test "x$READELF" = x; then
18394    # The variable is not set by user, try to locate tool using the code snippet
18395    for ac_prog in greadelf readelf
18396do
18397  # Extract the first word of "$ac_prog", so it can be a program name with args.
18398set dummy $ac_prog; ac_word=$2
18399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18400$as_echo_n "checking for $ac_word... " >&6; }
18401if ${ac_cv_path_READELF+:} false; then :
18402  $as_echo_n "(cached) " >&6
18403else
18404  case $READELF in
18405  [\\/]* | ?:[\\/]*)
18406  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18407  ;;
18408  *)
18409  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18410for as_dir in $PATH
18411do
18412  IFS=$as_save_IFS
18413  test -z "$as_dir" && as_dir=.
18414    for ac_exec_ext in '' $ac_executable_extensions; do
18415  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18416    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18417    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18418    break 2
18419  fi
18420done
18421  done
18422IFS=$as_save_IFS
18423
18424  ;;
18425esac
18426fi
18427READELF=$ac_cv_path_READELF
18428if test -n "$READELF"; then
18429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18430$as_echo "$READELF" >&6; }
18431else
18432  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18433$as_echo "no" >&6; }
18434fi
18435
18436
18437  test -n "$READELF" && break
18438done
18439
18440  else
18441    # The variable is set, but is it from the command line or the environment?
18442
18443    # Try to remove the string !READELF! from our list.
18444    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
18445    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18446      # If it failed, the variable was not from the command line. Ignore it,
18447      # but warn the user (except for BASH, which is always set by the calling BASH).
18448      if test "xREADELF" != xBASH; then
18449        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
18450$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
18451      fi
18452      # Try to locate tool using the code snippet
18453      for ac_prog in greadelf readelf
18454do
18455  # Extract the first word of "$ac_prog", so it can be a program name with args.
18456set dummy $ac_prog; ac_word=$2
18457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18458$as_echo_n "checking for $ac_word... " >&6; }
18459if ${ac_cv_path_READELF+:} false; then :
18460  $as_echo_n "(cached) " >&6
18461else
18462  case $READELF in
18463  [\\/]* | ?:[\\/]*)
18464  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18465  ;;
18466  *)
18467  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18468for as_dir in $PATH
18469do
18470  IFS=$as_save_IFS
18471  test -z "$as_dir" && as_dir=.
18472    for ac_exec_ext in '' $ac_executable_extensions; do
18473  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18474    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18475    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18476    break 2
18477  fi
18478done
18479  done
18480IFS=$as_save_IFS
18481
18482  ;;
18483esac
18484fi
18485READELF=$ac_cv_path_READELF
18486if test -n "$READELF"; then
18487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18488$as_echo "$READELF" >&6; }
18489else
18490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18491$as_echo "no" >&6; }
18492fi
18493
18494
18495  test -n "$READELF" && break
18496done
18497
18498    else
18499      # If it succeeded, then it was overridden by the user. We will use it
18500      # for the tool.
18501
18502      # First remove it from the list of overridden variables, so we can test
18503      # for unknown variables in the end.
18504      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18505
18506      # Check if the provided tool contains a complete path.
18507      tool_specified="$READELF"
18508      tool_basename="${tool_specified##*/}"
18509      if test "x$tool_basename" = "x$tool_specified"; then
18510        # A command without a complete path is provided, search $PATH.
18511        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
18512$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
18513        # Extract the first word of "$tool_basename", so it can be a program name with args.
18514set dummy $tool_basename; ac_word=$2
18515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18516$as_echo_n "checking for $ac_word... " >&6; }
18517if ${ac_cv_path_READELF+:} false; then :
18518  $as_echo_n "(cached) " >&6
18519else
18520  case $READELF in
18521  [\\/]* | ?:[\\/]*)
18522  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18523  ;;
18524  *)
18525  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18526for as_dir in $PATH
18527do
18528  IFS=$as_save_IFS
18529  test -z "$as_dir" && as_dir=.
18530    for ac_exec_ext in '' $ac_executable_extensions; do
18531  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18532    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18533    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18534    break 2
18535  fi
18536done
18537  done
18538IFS=$as_save_IFS
18539
18540  ;;
18541esac
18542fi
18543READELF=$ac_cv_path_READELF
18544if test -n "$READELF"; then
18545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18546$as_echo "$READELF" >&6; }
18547else
18548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18549$as_echo "no" >&6; }
18550fi
18551
18552
18553        if test "x$READELF" = x; then
18554          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18555        fi
18556      else
18557        # Otherwise we believe it is a complete path. Use it as it is.
18558        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
18559$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
18560        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
18561$as_echo_n "checking for READELF... " >&6; }
18562        if test ! -x "$tool_specified"; then
18563          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18564$as_echo "not found" >&6; }
18565          as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
18566        fi
18567        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18568$as_echo "$tool_specified" >&6; }
18569      fi
18570    fi
18571  fi
18572
18573
18574
18575
18576  # Publish this variable in the help.
18577
18578
18579  if test "x$HG" = x; then
18580    # The variable is not set by user, try to locate tool using the code snippet
18581    for ac_prog in hg
18582do
18583  # Extract the first word of "$ac_prog", so it can be a program name with args.
18584set dummy $ac_prog; ac_word=$2
18585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18586$as_echo_n "checking for $ac_word... " >&6; }
18587if ${ac_cv_path_HG+:} false; then :
18588  $as_echo_n "(cached) " >&6
18589else
18590  case $HG in
18591  [\\/]* | ?:[\\/]*)
18592  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18593  ;;
18594  *)
18595  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18596for as_dir in $PATH
18597do
18598  IFS=$as_save_IFS
18599  test -z "$as_dir" && as_dir=.
18600    for ac_exec_ext in '' $ac_executable_extensions; do
18601  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18602    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18603    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18604    break 2
18605  fi
18606done
18607  done
18608IFS=$as_save_IFS
18609
18610  ;;
18611esac
18612fi
18613HG=$ac_cv_path_HG
18614if test -n "$HG"; then
18615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18616$as_echo "$HG" >&6; }
18617else
18618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18619$as_echo "no" >&6; }
18620fi
18621
18622
18623  test -n "$HG" && break
18624done
18625
18626  else
18627    # The variable is set, but is it from the command line or the environment?
18628
18629    # Try to remove the string !HG! from our list.
18630    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
18631    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18632      # If it failed, the variable was not from the command line. Ignore it,
18633      # but warn the user (except for BASH, which is always set by the calling BASH).
18634      if test "xHG" != xBASH; then
18635        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
18636$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
18637      fi
18638      # Try to locate tool using the code snippet
18639      for ac_prog in hg
18640do
18641  # Extract the first word of "$ac_prog", so it can be a program name with args.
18642set dummy $ac_prog; ac_word=$2
18643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18644$as_echo_n "checking for $ac_word... " >&6; }
18645if ${ac_cv_path_HG+:} false; then :
18646  $as_echo_n "(cached) " >&6
18647else
18648  case $HG in
18649  [\\/]* | ?:[\\/]*)
18650  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18651  ;;
18652  *)
18653  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18654for as_dir in $PATH
18655do
18656  IFS=$as_save_IFS
18657  test -z "$as_dir" && as_dir=.
18658    for ac_exec_ext in '' $ac_executable_extensions; do
18659  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18660    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18661    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18662    break 2
18663  fi
18664done
18665  done
18666IFS=$as_save_IFS
18667
18668  ;;
18669esac
18670fi
18671HG=$ac_cv_path_HG
18672if test -n "$HG"; then
18673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18674$as_echo "$HG" >&6; }
18675else
18676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18677$as_echo "no" >&6; }
18678fi
18679
18680
18681  test -n "$HG" && break
18682done
18683
18684    else
18685      # If it succeeded, then it was overridden by the user. We will use it
18686      # for the tool.
18687
18688      # First remove it from the list of overridden variables, so we can test
18689      # for unknown variables in the end.
18690      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18691
18692      # Check if the provided tool contains a complete path.
18693      tool_specified="$HG"
18694      tool_basename="${tool_specified##*/}"
18695      if test "x$tool_basename" = "x$tool_specified"; then
18696        # A command without a complete path is provided, search $PATH.
18697        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
18698$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
18699        # Extract the first word of "$tool_basename", so it can be a program name with args.
18700set dummy $tool_basename; ac_word=$2
18701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18702$as_echo_n "checking for $ac_word... " >&6; }
18703if ${ac_cv_path_HG+:} false; then :
18704  $as_echo_n "(cached) " >&6
18705else
18706  case $HG in
18707  [\\/]* | ?:[\\/]*)
18708  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18709  ;;
18710  *)
18711  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18712for as_dir in $PATH
18713do
18714  IFS=$as_save_IFS
18715  test -z "$as_dir" && as_dir=.
18716    for ac_exec_ext in '' $ac_executable_extensions; do
18717  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18718    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18719    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18720    break 2
18721  fi
18722done
18723  done
18724IFS=$as_save_IFS
18725
18726  ;;
18727esac
18728fi
18729HG=$ac_cv_path_HG
18730if test -n "$HG"; then
18731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18732$as_echo "$HG" >&6; }
18733else
18734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18735$as_echo "no" >&6; }
18736fi
18737
18738
18739        if test "x$HG" = x; then
18740          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18741        fi
18742      else
18743        # Otherwise we believe it is a complete path. Use it as it is.
18744        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
18745$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
18746        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
18747$as_echo_n "checking for HG... " >&6; }
18748        if test ! -x "$tool_specified"; then
18749          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18750$as_echo "not found" >&6; }
18751          as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
18752        fi
18753        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18754$as_echo "$tool_specified" >&6; }
18755      fi
18756    fi
18757  fi
18758
18759
18760
18761
18762  # Publish this variable in the help.
18763
18764
18765  if test "x$STAT" = x; then
18766    # The variable is not set by user, try to locate tool using the code snippet
18767    for ac_prog in stat
18768do
18769  # Extract the first word of "$ac_prog", so it can be a program name with args.
18770set dummy $ac_prog; ac_word=$2
18771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18772$as_echo_n "checking for $ac_word... " >&6; }
18773if ${ac_cv_path_STAT+:} false; then :
18774  $as_echo_n "(cached) " >&6
18775else
18776  case $STAT in
18777  [\\/]* | ?:[\\/]*)
18778  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18779  ;;
18780  *)
18781  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18782for as_dir in $PATH
18783do
18784  IFS=$as_save_IFS
18785  test -z "$as_dir" && as_dir=.
18786    for ac_exec_ext in '' $ac_executable_extensions; do
18787  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18788    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18789    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18790    break 2
18791  fi
18792done
18793  done
18794IFS=$as_save_IFS
18795
18796  ;;
18797esac
18798fi
18799STAT=$ac_cv_path_STAT
18800if test -n "$STAT"; then
18801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18802$as_echo "$STAT" >&6; }
18803else
18804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18805$as_echo "no" >&6; }
18806fi
18807
18808
18809  test -n "$STAT" && break
18810done
18811
18812  else
18813    # The variable is set, but is it from the command line or the environment?
18814
18815    # Try to remove the string !STAT! from our list.
18816    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
18817    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18818      # If it failed, the variable was not from the command line. Ignore it,
18819      # but warn the user (except for BASH, which is always set by the calling BASH).
18820      if test "xSTAT" != xBASH; then
18821        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
18822$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
18823      fi
18824      # Try to locate tool using the code snippet
18825      for ac_prog in stat
18826do
18827  # Extract the first word of "$ac_prog", so it can be a program name with args.
18828set dummy $ac_prog; ac_word=$2
18829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18830$as_echo_n "checking for $ac_word... " >&6; }
18831if ${ac_cv_path_STAT+:} false; then :
18832  $as_echo_n "(cached) " >&6
18833else
18834  case $STAT in
18835  [\\/]* | ?:[\\/]*)
18836  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18837  ;;
18838  *)
18839  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18840for as_dir in $PATH
18841do
18842  IFS=$as_save_IFS
18843  test -z "$as_dir" && as_dir=.
18844    for ac_exec_ext in '' $ac_executable_extensions; do
18845  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18846    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18847    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18848    break 2
18849  fi
18850done
18851  done
18852IFS=$as_save_IFS
18853
18854  ;;
18855esac
18856fi
18857STAT=$ac_cv_path_STAT
18858if test -n "$STAT"; then
18859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18860$as_echo "$STAT" >&6; }
18861else
18862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18863$as_echo "no" >&6; }
18864fi
18865
18866
18867  test -n "$STAT" && break
18868done
18869
18870    else
18871      # If it succeeded, then it was overridden by the user. We will use it
18872      # for the tool.
18873
18874      # First remove it from the list of overridden variables, so we can test
18875      # for unknown variables in the end.
18876      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18877
18878      # Check if the provided tool contains a complete path.
18879      tool_specified="$STAT"
18880      tool_basename="${tool_specified##*/}"
18881      if test "x$tool_basename" = "x$tool_specified"; then
18882        # A command without a complete path is provided, search $PATH.
18883        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
18884$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
18885        # Extract the first word of "$tool_basename", so it can be a program name with args.
18886set dummy $tool_basename; ac_word=$2
18887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18888$as_echo_n "checking for $ac_word... " >&6; }
18889if ${ac_cv_path_STAT+:} false; then :
18890  $as_echo_n "(cached) " >&6
18891else
18892  case $STAT in
18893  [\\/]* | ?:[\\/]*)
18894  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18895  ;;
18896  *)
18897  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18898for as_dir in $PATH
18899do
18900  IFS=$as_save_IFS
18901  test -z "$as_dir" && as_dir=.
18902    for ac_exec_ext in '' $ac_executable_extensions; do
18903  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18904    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18905    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18906    break 2
18907  fi
18908done
18909  done
18910IFS=$as_save_IFS
18911
18912  ;;
18913esac
18914fi
18915STAT=$ac_cv_path_STAT
18916if test -n "$STAT"; then
18917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18918$as_echo "$STAT" >&6; }
18919else
18920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18921$as_echo "no" >&6; }
18922fi
18923
18924
18925        if test "x$STAT" = x; then
18926          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18927        fi
18928      else
18929        # Otherwise we believe it is a complete path. Use it as it is.
18930        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
18931$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
18932        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
18933$as_echo_n "checking for STAT... " >&6; }
18934        if test ! -x "$tool_specified"; then
18935          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18936$as_echo "not found" >&6; }
18937          as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
18938        fi
18939        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18940$as_echo "$tool_specified" >&6; }
18941      fi
18942    fi
18943  fi
18944
18945
18946
18947
18948  # Publish this variable in the help.
18949
18950
18951  if test "x$TIME" = x; then
18952    # The variable is not set by user, try to locate tool using the code snippet
18953    for ac_prog in time
18954do
18955  # Extract the first word of "$ac_prog", so it can be a program name with args.
18956set dummy $ac_prog; ac_word=$2
18957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18958$as_echo_n "checking for $ac_word... " >&6; }
18959if ${ac_cv_path_TIME+:} false; then :
18960  $as_echo_n "(cached) " >&6
18961else
18962  case $TIME in
18963  [\\/]* | ?:[\\/]*)
18964  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18965  ;;
18966  *)
18967  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18968for as_dir in $PATH
18969do
18970  IFS=$as_save_IFS
18971  test -z "$as_dir" && as_dir=.
18972    for ac_exec_ext in '' $ac_executable_extensions; do
18973  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18974    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18975    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18976    break 2
18977  fi
18978done
18979  done
18980IFS=$as_save_IFS
18981
18982  ;;
18983esac
18984fi
18985TIME=$ac_cv_path_TIME
18986if test -n "$TIME"; then
18987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18988$as_echo "$TIME" >&6; }
18989else
18990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18991$as_echo "no" >&6; }
18992fi
18993
18994
18995  test -n "$TIME" && break
18996done
18997
18998  else
18999    # The variable is set, but is it from the command line or the environment?
19000
19001    # Try to remove the string !TIME! from our list.
19002    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
19003    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19004      # If it failed, the variable was not from the command line. Ignore it,
19005      # but warn the user (except for BASH, which is always set by the calling BASH).
19006      if test "xTIME" != xBASH; then
19007        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
19008$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
19009      fi
19010      # Try to locate tool using the code snippet
19011      for ac_prog in time
19012do
19013  # Extract the first word of "$ac_prog", so it can be a program name with args.
19014set dummy $ac_prog; ac_word=$2
19015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19016$as_echo_n "checking for $ac_word... " >&6; }
19017if ${ac_cv_path_TIME+:} false; then :
19018  $as_echo_n "(cached) " >&6
19019else
19020  case $TIME in
19021  [\\/]* | ?:[\\/]*)
19022  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
19023  ;;
19024  *)
19025  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19026for as_dir in $PATH
19027do
19028  IFS=$as_save_IFS
19029  test -z "$as_dir" && as_dir=.
19030    for ac_exec_ext in '' $ac_executable_extensions; do
19031  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19032    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
19033    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19034    break 2
19035  fi
19036done
19037  done
19038IFS=$as_save_IFS
19039
19040  ;;
19041esac
19042fi
19043TIME=$ac_cv_path_TIME
19044if test -n "$TIME"; then
19045  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
19046$as_echo "$TIME" >&6; }
19047else
19048  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19049$as_echo "no" >&6; }
19050fi
19051
19052
19053  test -n "$TIME" && break
19054done
19055
19056    else
19057      # If it succeeded, then it was overridden by the user. We will use it
19058      # for the tool.
19059
19060      # First remove it from the list of overridden variables, so we can test
19061      # for unknown variables in the end.
19062      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19063
19064      # Check if the provided tool contains a complete path.
19065      tool_specified="$TIME"
19066      tool_basename="${tool_specified##*/}"
19067      if test "x$tool_basename" = "x$tool_specified"; then
19068        # A command without a complete path is provided, search $PATH.
19069        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
19070$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
19071        # Extract the first word of "$tool_basename", so it can be a program name with args.
19072set dummy $tool_basename; ac_word=$2
19073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19074$as_echo_n "checking for $ac_word... " >&6; }
19075if ${ac_cv_path_TIME+:} false; then :
19076  $as_echo_n "(cached) " >&6
19077else
19078  case $TIME in
19079  [\\/]* | ?:[\\/]*)
19080  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
19081  ;;
19082  *)
19083  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19084for as_dir in $PATH
19085do
19086  IFS=$as_save_IFS
19087  test -z "$as_dir" && as_dir=.
19088    for ac_exec_ext in '' $ac_executable_extensions; do
19089  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19090    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
19091    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19092    break 2
19093  fi
19094done
19095  done
19096IFS=$as_save_IFS
19097
19098  ;;
19099esac
19100fi
19101TIME=$ac_cv_path_TIME
19102if test -n "$TIME"; then
19103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
19104$as_echo "$TIME" >&6; }
19105else
19106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19107$as_echo "no" >&6; }
19108fi
19109
19110
19111        if test "x$TIME" = x; then
19112          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19113        fi
19114      else
19115        # Otherwise we believe it is a complete path. Use it as it is.
19116        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
19117$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
19118        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
19119$as_echo_n "checking for TIME... " >&6; }
19120        if test ! -x "$tool_specified"; then
19121          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19122$as_echo "not found" >&6; }
19123          as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
19124        fi
19125        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19126$as_echo "$tool_specified" >&6; }
19127      fi
19128    fi
19129  fi
19130
19131
19132  # Check if it's GNU time
19133  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
19134  if test "x$IS_GNU_TIME" != x; then
19135    IS_GNU_TIME=yes
19136  else
19137    IS_GNU_TIME=no
19138  fi
19139
19140
19141  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
19142
19143
19144
19145  # Publish this variable in the help.
19146
19147
19148  if test "x$DSYMUTIL" = x; then
19149    # The variable is not set by user, try to locate tool using the code snippet
19150    for ac_prog in dsymutil
19151do
19152  # Extract the first word of "$ac_prog", so it can be a program name with args.
19153set dummy $ac_prog; ac_word=$2
19154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19155$as_echo_n "checking for $ac_word... " >&6; }
19156if ${ac_cv_path_DSYMUTIL+:} false; then :
19157  $as_echo_n "(cached) " >&6
19158else
19159  case $DSYMUTIL in
19160  [\\/]* | ?:[\\/]*)
19161  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19162  ;;
19163  *)
19164  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19165for as_dir in $PATH
19166do
19167  IFS=$as_save_IFS
19168  test -z "$as_dir" && as_dir=.
19169    for ac_exec_ext in '' $ac_executable_extensions; do
19170  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19171    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19172    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19173    break 2
19174  fi
19175done
19176  done
19177IFS=$as_save_IFS
19178
19179  ;;
19180esac
19181fi
19182DSYMUTIL=$ac_cv_path_DSYMUTIL
19183if test -n "$DSYMUTIL"; then
19184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19185$as_echo "$DSYMUTIL" >&6; }
19186else
19187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19188$as_echo "no" >&6; }
19189fi
19190
19191
19192  test -n "$DSYMUTIL" && break
19193done
19194
19195  else
19196    # The variable is set, but is it from the command line or the environment?
19197
19198    # Try to remove the string !DSYMUTIL! from our list.
19199    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
19200    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19201      # If it failed, the variable was not from the command line. Ignore it,
19202      # but warn the user (except for BASH, which is always set by the calling BASH).
19203      if test "xDSYMUTIL" != xBASH; then
19204        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
19205$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
19206      fi
19207      # Try to locate tool using the code snippet
19208      for ac_prog in dsymutil
19209do
19210  # Extract the first word of "$ac_prog", so it can be a program name with args.
19211set dummy $ac_prog; ac_word=$2
19212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19213$as_echo_n "checking for $ac_word... " >&6; }
19214if ${ac_cv_path_DSYMUTIL+:} false; then :
19215  $as_echo_n "(cached) " >&6
19216else
19217  case $DSYMUTIL in
19218  [\\/]* | ?:[\\/]*)
19219  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19220  ;;
19221  *)
19222  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19223for as_dir in $PATH
19224do
19225  IFS=$as_save_IFS
19226  test -z "$as_dir" && as_dir=.
19227    for ac_exec_ext in '' $ac_executable_extensions; do
19228  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19229    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19230    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19231    break 2
19232  fi
19233done
19234  done
19235IFS=$as_save_IFS
19236
19237  ;;
19238esac
19239fi
19240DSYMUTIL=$ac_cv_path_DSYMUTIL
19241if test -n "$DSYMUTIL"; then
19242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19243$as_echo "$DSYMUTIL" >&6; }
19244else
19245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19246$as_echo "no" >&6; }
19247fi
19248
19249
19250  test -n "$DSYMUTIL" && break
19251done
19252
19253    else
19254      # If it succeeded, then it was overridden by the user. We will use it
19255      # for the tool.
19256
19257      # First remove it from the list of overridden variables, so we can test
19258      # for unknown variables in the end.
19259      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19260
19261      # Check if the provided tool contains a complete path.
19262      tool_specified="$DSYMUTIL"
19263      tool_basename="${tool_specified##*/}"
19264      if test "x$tool_basename" = "x$tool_specified"; then
19265        # A command without a complete path is provided, search $PATH.
19266        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
19267$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
19268        # Extract the first word of "$tool_basename", so it can be a program name with args.
19269set dummy $tool_basename; ac_word=$2
19270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19271$as_echo_n "checking for $ac_word... " >&6; }
19272if ${ac_cv_path_DSYMUTIL+:} false; then :
19273  $as_echo_n "(cached) " >&6
19274else
19275  case $DSYMUTIL in
19276  [\\/]* | ?:[\\/]*)
19277  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19278  ;;
19279  *)
19280  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19281for as_dir in $PATH
19282do
19283  IFS=$as_save_IFS
19284  test -z "$as_dir" && as_dir=.
19285    for ac_exec_ext in '' $ac_executable_extensions; do
19286  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19287    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19288    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19289    break 2
19290  fi
19291done
19292  done
19293IFS=$as_save_IFS
19294
19295  ;;
19296esac
19297fi
19298DSYMUTIL=$ac_cv_path_DSYMUTIL
19299if test -n "$DSYMUTIL"; then
19300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19301$as_echo "$DSYMUTIL" >&6; }
19302else
19303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19304$as_echo "no" >&6; }
19305fi
19306
19307
19308        if test "x$DSYMUTIL" = x; then
19309          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19310        fi
19311      else
19312        # Otherwise we believe it is a complete path. Use it as it is.
19313        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
19314$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
19315        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
19316$as_echo_n "checking for DSYMUTIL... " >&6; }
19317        if test ! -x "$tool_specified"; then
19318          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19319$as_echo "not found" >&6; }
19320          as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
19321        fi
19322        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19323$as_echo "$tool_specified" >&6; }
19324      fi
19325    fi
19326  fi
19327
19328
19329
19330  if test "x$DSYMUTIL" = x; then
19331    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
19332  fi
19333
19334
19335
19336
19337
19338  # Publish this variable in the help.
19339
19340
19341  if test "x$XATTR" = x; then
19342    # The variable is not set by user, try to locate tool using the code snippet
19343    for ac_prog in xattr
19344do
19345  # Extract the first word of "$ac_prog", so it can be a program name with args.
19346set dummy $ac_prog; ac_word=$2
19347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19348$as_echo_n "checking for $ac_word... " >&6; }
19349if ${ac_cv_path_XATTR+:} false; then :
19350  $as_echo_n "(cached) " >&6
19351else
19352  case $XATTR in
19353  [\\/]* | ?:[\\/]*)
19354  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19355  ;;
19356  *)
19357  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19358for as_dir in $PATH
19359do
19360  IFS=$as_save_IFS
19361  test -z "$as_dir" && as_dir=.
19362    for ac_exec_ext in '' $ac_executable_extensions; do
19363  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19364    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19365    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19366    break 2
19367  fi
19368done
19369  done
19370IFS=$as_save_IFS
19371
19372  ;;
19373esac
19374fi
19375XATTR=$ac_cv_path_XATTR
19376if test -n "$XATTR"; then
19377  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19378$as_echo "$XATTR" >&6; }
19379else
19380  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19381$as_echo "no" >&6; }
19382fi
19383
19384
19385  test -n "$XATTR" && break
19386done
19387
19388  else
19389    # The variable is set, but is it from the command line or the environment?
19390
19391    # Try to remove the string !XATTR! from our list.
19392    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
19393    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19394      # If it failed, the variable was not from the command line. Ignore it,
19395      # but warn the user (except for BASH, which is always set by the calling BASH).
19396      if test "xXATTR" != xBASH; then
19397        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
19398$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
19399      fi
19400      # Try to locate tool using the code snippet
19401      for ac_prog in xattr
19402do
19403  # Extract the first word of "$ac_prog", so it can be a program name with args.
19404set dummy $ac_prog; ac_word=$2
19405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19406$as_echo_n "checking for $ac_word... " >&6; }
19407if ${ac_cv_path_XATTR+:} false; then :
19408  $as_echo_n "(cached) " >&6
19409else
19410  case $XATTR in
19411  [\\/]* | ?:[\\/]*)
19412  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19413  ;;
19414  *)
19415  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19416for as_dir in $PATH
19417do
19418  IFS=$as_save_IFS
19419  test -z "$as_dir" && as_dir=.
19420    for ac_exec_ext in '' $ac_executable_extensions; do
19421  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19422    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19423    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19424    break 2
19425  fi
19426done
19427  done
19428IFS=$as_save_IFS
19429
19430  ;;
19431esac
19432fi
19433XATTR=$ac_cv_path_XATTR
19434if test -n "$XATTR"; then
19435  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19436$as_echo "$XATTR" >&6; }
19437else
19438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19439$as_echo "no" >&6; }
19440fi
19441
19442
19443  test -n "$XATTR" && break
19444done
19445
19446    else
19447      # If it succeeded, then it was overridden by the user. We will use it
19448      # for the tool.
19449
19450      # First remove it from the list of overridden variables, so we can test
19451      # for unknown variables in the end.
19452      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19453
19454      # Check if the provided tool contains a complete path.
19455      tool_specified="$XATTR"
19456      tool_basename="${tool_specified##*/}"
19457      if test "x$tool_basename" = "x$tool_specified"; then
19458        # A command without a complete path is provided, search $PATH.
19459        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
19460$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
19461        # Extract the first word of "$tool_basename", so it can be a program name with args.
19462set dummy $tool_basename; ac_word=$2
19463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19464$as_echo_n "checking for $ac_word... " >&6; }
19465if ${ac_cv_path_XATTR+:} false; then :
19466  $as_echo_n "(cached) " >&6
19467else
19468  case $XATTR in
19469  [\\/]* | ?:[\\/]*)
19470  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19471  ;;
19472  *)
19473  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19474for as_dir in $PATH
19475do
19476  IFS=$as_save_IFS
19477  test -z "$as_dir" && as_dir=.
19478    for ac_exec_ext in '' $ac_executable_extensions; do
19479  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19480    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19481    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19482    break 2
19483  fi
19484done
19485  done
19486IFS=$as_save_IFS
19487
19488  ;;
19489esac
19490fi
19491XATTR=$ac_cv_path_XATTR
19492if test -n "$XATTR"; then
19493  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19494$as_echo "$XATTR" >&6; }
19495else
19496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19497$as_echo "no" >&6; }
19498fi
19499
19500
19501        if test "x$XATTR" = x; then
19502          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19503        fi
19504      else
19505        # Otherwise we believe it is a complete path. Use it as it is.
19506        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
19507$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
19508        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
19509$as_echo_n "checking for XATTR... " >&6; }
19510        if test ! -x "$tool_specified"; then
19511          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19512$as_echo "not found" >&6; }
19513          as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
19514        fi
19515        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19516$as_echo "$tool_specified" >&6; }
19517      fi
19518    fi
19519  fi
19520
19521
19522
19523  if test "x$XATTR" = x; then
19524    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
19525  fi
19526
19527
19528
19529
19530  # Publish this variable in the help.
19531
19532
19533  if test "x$CODESIGN" = x; then
19534    # The variable is not set by user, try to locate tool using the code snippet
19535    for ac_prog in codesign
19536do
19537  # Extract the first word of "$ac_prog", so it can be a program name with args.
19538set dummy $ac_prog; ac_word=$2
19539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19540$as_echo_n "checking for $ac_word... " >&6; }
19541if ${ac_cv_path_CODESIGN+:} false; then :
19542  $as_echo_n "(cached) " >&6
19543else
19544  case $CODESIGN in
19545  [\\/]* | ?:[\\/]*)
19546  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19547  ;;
19548  *)
19549  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19550for as_dir in $PATH
19551do
19552  IFS=$as_save_IFS
19553  test -z "$as_dir" && as_dir=.
19554    for ac_exec_ext in '' $ac_executable_extensions; do
19555  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19556    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19557    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19558    break 2
19559  fi
19560done
19561  done
19562IFS=$as_save_IFS
19563
19564  ;;
19565esac
19566fi
19567CODESIGN=$ac_cv_path_CODESIGN
19568if test -n "$CODESIGN"; then
19569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19570$as_echo "$CODESIGN" >&6; }
19571else
19572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19573$as_echo "no" >&6; }
19574fi
19575
19576
19577  test -n "$CODESIGN" && break
19578done
19579
19580  else
19581    # The variable is set, but is it from the command line or the environment?
19582
19583    # Try to remove the string !CODESIGN! from our list.
19584    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
19585    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19586      # If it failed, the variable was not from the command line. Ignore it,
19587      # but warn the user (except for BASH, which is always set by the calling BASH).
19588      if test "xCODESIGN" != xBASH; then
19589        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
19590$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
19591      fi
19592      # Try to locate tool using the code snippet
19593      for ac_prog in codesign
19594do
19595  # Extract the first word of "$ac_prog", so it can be a program name with args.
19596set dummy $ac_prog; ac_word=$2
19597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19598$as_echo_n "checking for $ac_word... " >&6; }
19599if ${ac_cv_path_CODESIGN+:} false; then :
19600  $as_echo_n "(cached) " >&6
19601else
19602  case $CODESIGN in
19603  [\\/]* | ?:[\\/]*)
19604  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19605  ;;
19606  *)
19607  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19608for as_dir in $PATH
19609do
19610  IFS=$as_save_IFS
19611  test -z "$as_dir" && as_dir=.
19612    for ac_exec_ext in '' $ac_executable_extensions; do
19613  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19614    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19615    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19616    break 2
19617  fi
19618done
19619  done
19620IFS=$as_save_IFS
19621
19622  ;;
19623esac
19624fi
19625CODESIGN=$ac_cv_path_CODESIGN
19626if test -n "$CODESIGN"; then
19627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19628$as_echo "$CODESIGN" >&6; }
19629else
19630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19631$as_echo "no" >&6; }
19632fi
19633
19634
19635  test -n "$CODESIGN" && break
19636done
19637
19638    else
19639      # If it succeeded, then it was overridden by the user. We will use it
19640      # for the tool.
19641
19642      # First remove it from the list of overridden variables, so we can test
19643      # for unknown variables in the end.
19644      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19645
19646      # Check if the provided tool contains a complete path.
19647      tool_specified="$CODESIGN"
19648      tool_basename="${tool_specified##*/}"
19649      if test "x$tool_basename" = "x$tool_specified"; then
19650        # A command without a complete path is provided, search $PATH.
19651        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
19652$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
19653        # Extract the first word of "$tool_basename", so it can be a program name with args.
19654set dummy $tool_basename; ac_word=$2
19655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19656$as_echo_n "checking for $ac_word... " >&6; }
19657if ${ac_cv_path_CODESIGN+:} false; then :
19658  $as_echo_n "(cached) " >&6
19659else
19660  case $CODESIGN in
19661  [\\/]* | ?:[\\/]*)
19662  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19663  ;;
19664  *)
19665  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19666for as_dir in $PATH
19667do
19668  IFS=$as_save_IFS
19669  test -z "$as_dir" && as_dir=.
19670    for ac_exec_ext in '' $ac_executable_extensions; do
19671  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19672    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19673    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19674    break 2
19675  fi
19676done
19677  done
19678IFS=$as_save_IFS
19679
19680  ;;
19681esac
19682fi
19683CODESIGN=$ac_cv_path_CODESIGN
19684if test -n "$CODESIGN"; then
19685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19686$as_echo "$CODESIGN" >&6; }
19687else
19688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19689$as_echo "no" >&6; }
19690fi
19691
19692
19693        if test "x$CODESIGN" = x; then
19694          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19695        fi
19696      else
19697        # Otherwise we believe it is a complete path. Use it as it is.
19698        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
19699$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
19700        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
19701$as_echo_n "checking for CODESIGN... " >&6; }
19702        if test ! -x "$tool_specified"; then
19703          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19704$as_echo "not found" >&6; }
19705          as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
19706        fi
19707        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19708$as_echo "$tool_specified" >&6; }
19709      fi
19710    fi
19711  fi
19712
19713
19714    if test "x$CODESIGN" != "x"; then
19715      # Verify that the openjdk_codesign certificate is present
19716      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
19717$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
19718      rm -f codesign-testfile
19719      touch codesign-testfile
19720      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
19721      rm -f codesign-testfile
19722      if test "x$CODESIGN" = x; then
19723        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19724$as_echo "no" >&6; }
19725      else
19726        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19727$as_echo "yes" >&6; }
19728      fi
19729    fi
19730  fi
19731
19732
19733  # Test if bash supports pipefail.
19734  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
19735$as_echo_n "checking if bash supports pipefail... " >&6; }
19736  if ${BASH} -c 'set -o pipefail'; then
19737    BASH_ARGS="$BASH_ARGS -o pipefail"
19738    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19739$as_echo "yes" >&6; }
19740  else
19741    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19742$as_echo "no" >&6; }
19743  fi
19744
19745  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
19746$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
19747  if ${BASH} -e -c 'true'; then
19748    BASH_ARGS="$BASH_ARGS -e"
19749    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19750$as_echo "yes" >&6; }
19751  else
19752    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19753$as_echo "no" >&6; }
19754  fi
19755
19756
19757
19758
19759# Check if pkg-config is available.
19760
19761
19762if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
19763	if test -n "$ac_tool_prefix"; then
19764  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
19765set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
19766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19767$as_echo_n "checking for $ac_word... " >&6; }
19768if ${ac_cv_path_PKG_CONFIG+:} false; then :
19769  $as_echo_n "(cached) " >&6
19770else
19771  case $PKG_CONFIG in
19772  [\\/]* | ?:[\\/]*)
19773  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
19774  ;;
19775  *)
19776  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19777for as_dir in $PATH
19778do
19779  IFS=$as_save_IFS
19780  test -z "$as_dir" && as_dir=.
19781    for ac_exec_ext in '' $ac_executable_extensions; do
19782  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19783    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19784    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19785    break 2
19786  fi
19787done
19788  done
19789IFS=$as_save_IFS
19790
19791  ;;
19792esac
19793fi
19794PKG_CONFIG=$ac_cv_path_PKG_CONFIG
19795if test -n "$PKG_CONFIG"; then
19796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
19797$as_echo "$PKG_CONFIG" >&6; }
19798else
19799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19800$as_echo "no" >&6; }
19801fi
19802
19803
19804fi
19805if test -z "$ac_cv_path_PKG_CONFIG"; then
19806  ac_pt_PKG_CONFIG=$PKG_CONFIG
19807  # Extract the first word of "pkg-config", so it can be a program name with args.
19808set dummy pkg-config; ac_word=$2
19809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19810$as_echo_n "checking for $ac_word... " >&6; }
19811if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
19812  $as_echo_n "(cached) " >&6
19813else
19814  case $ac_pt_PKG_CONFIG in
19815  [\\/]* | ?:[\\/]*)
19816  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
19817  ;;
19818  *)
19819  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19820for as_dir in $PATH
19821do
19822  IFS=$as_save_IFS
19823  test -z "$as_dir" && as_dir=.
19824    for ac_exec_ext in '' $ac_executable_extensions; do
19825  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19826    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19827    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19828    break 2
19829  fi
19830done
19831  done
19832IFS=$as_save_IFS
19833
19834  ;;
19835esac
19836fi
19837ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
19838if test -n "$ac_pt_PKG_CONFIG"; then
19839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
19840$as_echo "$ac_pt_PKG_CONFIG" >&6; }
19841else
19842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19843$as_echo "no" >&6; }
19844fi
19845
19846  if test "x$ac_pt_PKG_CONFIG" = x; then
19847    PKG_CONFIG=""
19848  else
19849    case $cross_compiling:$ac_tool_warned in
19850yes:)
19851{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19852$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19853ac_tool_warned=yes ;;
19854esac
19855    PKG_CONFIG=$ac_pt_PKG_CONFIG
19856  fi
19857else
19858  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
19859fi
19860
19861fi
19862if test -n "$PKG_CONFIG"; then
19863	_pkg_min_version=0.9.0
19864	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
19865$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
19866	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
19867		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19868$as_echo "yes" >&6; }
19869	else
19870		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19871$as_echo "no" >&6; }
19872		PKG_CONFIG=""
19873	fi
19874
19875fi
19876
19877# After basic tools have been setup, we can check build os specific details.
19878
19879  ###############################################################################
19880
19881  # Note that this is the build platform OS version!
19882
19883  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
19884  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
19885  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
19886  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
19887
19888
19889
19890
19891
19892# Setup builddeps, for automatic downloading of tools we need.
19893# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
19894# boot-jdk setup, but we need to have basic tools setup first.
19895
19896
19897# Check whether --with-builddeps-conf was given.
19898if test "${with_builddeps_conf+set}" = set; then :
19899  withval=$with_builddeps_conf;
19900fi
19901
19902
19903
19904# Check whether --with-builddeps-server was given.
19905if test "${with_builddeps_server+set}" = set; then :
19906  withval=$with_builddeps_server;
19907fi
19908
19909
19910
19911# Check whether --with-builddeps-dir was given.
19912if test "${with_builddeps_dir+set}" = set; then :
19913  withval=$with_builddeps_dir;
19914else
19915  with_builddeps_dir=/localhome/builddeps
19916fi
19917
19918
19919
19920# Check whether --with-builddeps-group was given.
19921if test "${with_builddeps_group+set}" = set; then :
19922  withval=$with_builddeps_group;
19923fi
19924
19925
19926
19927
19928  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
19929    if test "x$with_builddeps_conf" != x; then
19930      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
19931$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
19932      builddepsfile=$with_builddeps_conf
19933      if test -s $builddepsfile; then
19934        . $builddepsfile
19935        { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
19936$as_echo "loaded!" >&6; }
19937      else
19938        as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
19939      fi
19940    else
19941      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
19942$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
19943      builddepsfile=`mktemp`
19944      touch $builddepsfile
19945      # Put all found confs into a single file.
19946      find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
19947      # Source the file to acquire the variables
19948      if test -s $builddepsfile; then
19949        . $builddepsfile
19950        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
19951$as_echo "found at least one!" >&6; }
19952      else
19953        as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
19954      fi
19955    fi
19956    # Create build and target names that use _ instead of "-" and ".".
19957    # This is necessary to use them in variable names.
19958    build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19959    target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19960    # Extract rewrite information for build and target
19961    eval rewritten_build=\${REWRITE_${build_var}}
19962    if test "x$rewritten_build" = x; then
19963      rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
19964      echo Build stays the same $rewritten_build
19965    else
19966      echo Rewriting build for builddeps into $rewritten_build
19967    fi
19968    eval rewritten_target=\${REWRITE_${target_var}}
19969    if test "x$rewritten_target" = x; then
19970      rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
19971      echo Target stays the same $rewritten_target
19972    else
19973      echo Rewriting target for builddeps into $rewritten_target
19974    fi
19975    rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
19976    rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
19977  fi
19978  for ac_prog in 7z unzip
19979do
19980  # Extract the first word of "$ac_prog", so it can be a program name with args.
19981set dummy $ac_prog; ac_word=$2
19982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19983$as_echo_n "checking for $ac_word... " >&6; }
19984if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
19985  $as_echo_n "(cached) " >&6
19986else
19987  if test -n "$BDEPS_UNZIP"; then
19988  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
19989else
19990as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19991for as_dir in $PATH
19992do
19993  IFS=$as_save_IFS
19994  test -z "$as_dir" && as_dir=.
19995    for ac_exec_ext in '' $ac_executable_extensions; do
19996  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19997    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
19998    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19999    break 2
20000  fi
20001done
20002  done
20003IFS=$as_save_IFS
20004
20005fi
20006fi
20007BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
20008if test -n "$BDEPS_UNZIP"; then
20009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
20010$as_echo "$BDEPS_UNZIP" >&6; }
20011else
20012  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20013$as_echo "no" >&6; }
20014fi
20015
20016
20017  test -n "$BDEPS_UNZIP" && break
20018done
20019
20020  if test "x$BDEPS_UNZIP" = x7z; then
20021    BDEPS_UNZIP="7z x"
20022  fi
20023
20024  for ac_prog in wget lftp ftp
20025do
20026  # Extract the first word of "$ac_prog", so it can be a program name with args.
20027set dummy $ac_prog; ac_word=$2
20028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20029$as_echo_n "checking for $ac_word... " >&6; }
20030if ${ac_cv_prog_BDEPS_FTP+:} false; then :
20031  $as_echo_n "(cached) " >&6
20032else
20033  if test -n "$BDEPS_FTP"; then
20034  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
20035else
20036as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20037for as_dir in $PATH
20038do
20039  IFS=$as_save_IFS
20040  test -z "$as_dir" && as_dir=.
20041    for ac_exec_ext in '' $ac_executable_extensions; do
20042  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20043    ac_cv_prog_BDEPS_FTP="$ac_prog"
20044    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20045    break 2
20046  fi
20047done
20048  done
20049IFS=$as_save_IFS
20050
20051fi
20052fi
20053BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
20054if test -n "$BDEPS_FTP"; then
20055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
20056$as_echo "$BDEPS_FTP" >&6; }
20057else
20058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20059$as_echo "no" >&6; }
20060fi
20061
20062
20063  test -n "$BDEPS_FTP" && break
20064done
20065
20066
20067
20068###############################################################################
20069#
20070# Determine OpenJDK variants, options and version numbers.
20071#
20072###############################################################################
20073
20074# We need build & target for this.
20075
20076
20077  ###############################################################################
20078  #
20079  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
20080  # We always build headless support.
20081  #
20082  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
20083$as_echo_n "checking headful support... " >&6; }
20084  # Check whether --enable-headful was given.
20085if test "${enable_headful+set}" = set; then :
20086  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
20087else
20088  SUPPORT_HEADFUL=yes
20089fi
20090
20091
20092  SUPPORT_HEADLESS=yes
20093  BUILD_HEADLESS="BUILD_HEADLESS:=true"
20094
20095  if test "x$SUPPORT_HEADFUL" = xyes; then
20096    # We are building both headful and headless.
20097    headful_msg="include support for both headful and headless"
20098  fi
20099
20100  if test "x$SUPPORT_HEADFUL" = xno; then
20101    # Thus we are building headless only.
20102    BUILD_HEADLESS="BUILD_HEADLESS:=true"
20103    headful_msg="headless only"
20104  fi
20105
20106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
20107$as_echo "$headful_msg" >&6; }
20108
20109
20110
20111
20112
20113  # Control wether Hotspot runs Queens test after build.
20114  # Check whether --enable-hotspot-test-in-build was given.
20115if test "${enable_hotspot_test_in_build+set}" = set; then :
20116  enableval=$enable_hotspot_test_in_build;
20117else
20118  enable_hotspot_test_in_build=no
20119fi
20120
20121  if test "x$enable_hotspot_test_in_build" = "xyes"; then
20122    TEST_IN_BUILD=true
20123  else
20124    TEST_IN_BUILD=false
20125  fi
20126
20127
20128  ###############################################################################
20129  #
20130  # Choose cacerts source file
20131  #
20132
20133# Check whether --with-cacerts-file was given.
20134if test "${with_cacerts_file+set}" = set; then :
20135  withval=$with_cacerts_file;
20136fi
20137
20138  if test "x$with_cacerts_file" != x; then
20139    CACERTS_FILE=$with_cacerts_file
20140  fi
20141
20142
20143  ###############################################################################
20144  #
20145  # Enable or disable unlimited crypto
20146  #
20147  # Check whether --enable-unlimited-crypto was given.
20148if test "${enable_unlimited_crypto+set}" = set; then :
20149  enableval=$enable_unlimited_crypto;
20150else
20151  enable_unlimited_crypto=no
20152fi
20153
20154  if test "x$enable_unlimited_crypto" = "xyes"; then
20155    UNLIMITED_CRYPTO=true
20156  else
20157    UNLIMITED_CRYPTO=false
20158  fi
20159
20160
20161  ###############################################################################
20162  #
20163  # --enable-rmiconnector-iiop
20164  #
20165  # Check whether --enable-rmiconnector-iiop was given.
20166if test "${enable_rmiconnector_iiop+set}" = set; then :
20167  enableval=$enable_rmiconnector_iiop;
20168fi
20169
20170  if test "x$enable_rmiconnector_iiop" = "xyes"; then
20171    RMICONNECTOR_IIOP=true
20172  else
20173    RMICONNECTOR_IIOP=false
20174  fi
20175
20176
20177  ###############################################################################
20178  #
20179  # Compress jars
20180  #
20181  COMPRESS_JARS=false
20182
20183
20184
20185  # Setup default copyright year. Mostly overridden when building close to a new year.
20186
20187# Check whether --with-copyright-year was given.
20188if test "${with_copyright_year+set}" = set; then :
20189  withval=$with_copyright_year;
20190fi
20191
20192  if test "x$with_copyright_year" = xyes; then
20193    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
20194  elif test "x$with_copyright_year" != x; then
20195    COPYRIGHT_YEAR="$with_copyright_year"
20196  else
20197    COPYRIGHT_YEAR=`date +'%Y'`
20198  fi
20199
20200
20201
20202  # Warn user that old version arguments are deprecated.
20203
20204
20205# Check whether --with-milestone was given.
20206if test "${with_milestone+set}" = set; then :
20207  withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
20208$as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
20209fi
20210
20211
20212
20213
20214# Check whether --with-update-version was given.
20215if test "${with_update_version+set}" = set; then :
20216  withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
20217$as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
20218fi
20219
20220
20221
20222
20223# Check whether --with-user-release-suffix was given.
20224if test "${with_user_release_suffix+set}" = set; then :
20225  withval=$with_user_release_suffix; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&5
20226$as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
20227fi
20228
20229
20230
20231
20232# Check whether --with-build-number was given.
20233if test "${with_build_number+set}" = set; then :
20234  withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
20235$as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
20236fi
20237
20238
20239
20240  # Source the version numbers file
20241  . $AUTOCONF_DIR/version-numbers
20242
20243  # Some non-version number information is set in that file
20244
20245
20246
20247
20248
20249
20250
20251
20252  # Override version from arguments
20253
20254  # If --with-version-string is set, process it first. It is possible to
20255  # override parts with more specific flags, since these are processed later.
20256
20257# Check whether --with-version-string was given.
20258if test "${with_version_string+set}" = set; then :
20259  withval=$with_version_string;
20260fi
20261
20262  if test "x$with_version_string" = xyes; then
20263    as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
20264  elif test "x$with_version_string" != x; then
20265    # Additional [] needed to keep m4 from mangling shell constructs.
20266    if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?(\.([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
20267      VERSION_MAJOR=${BASH_REMATCH[1]}
20268      VERSION_MINOR=${BASH_REMATCH[3]}
20269      VERSION_SECURITY=${BASH_REMATCH[5]}
20270      VERSION_PATCH=${BASH_REMATCH[7]}
20271      VERSION_PRE_BASE=${BASH_REMATCH[9]}
20272      VERSION_PRE_DEBUGLEVEL=${BASH_REMATCH[11]}
20273      version_plus_separator=${BASH_REMATCH[13]}
20274      VERSION_BUILD=${BASH_REMATCH[14]}
20275      VERSION_OPT=${BASH_REMATCH[16]}
20276      # Unspecified numerical fields are interpreted as 0.
20277      if test "x$VERSION_MINOR" = x; then
20278        VERSION_MINOR=0
20279      fi
20280      if test "x$VERSION_SECURITY" = x; then
20281        VERSION_SECURITY=0
20282      fi
20283      if test "x$VERSION_PATCH" = x; then
20284        VERSION_PATCH=0
20285      fi
20286      if test "x$version_plus_separator" != x && test "x$VERSION_BUILD$VERSION_OPT" = x; then
20287        as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
20288      fi
20289      # Stop the version part process from setting default values.
20290      # We still allow them to explicitely override though.
20291      NO_DEFAULT_VERSION_PARTS=true
20292    else
20293      as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
20294    fi
20295  fi
20296
20297
20298# Check whether --with-version-pre-base was given.
20299if test "${with_version_pre_base+set}" = set; then :
20300  withval=$with_version_pre_base; with_version_pre_base_present=true
20301else
20302  with_version_pre_base_present=false
20303fi
20304
20305
20306  if test "x$with_version_pre_base_present" = xtrue; then
20307    if test "x$with_version_pre_base" = xyes; then
20308      as_fn_error $? "--with-version-pre-base must have a value" "$LINENO" 5
20309    elif test "x$with_version_pre_base" = xno; then
20310      # Interpret --without-* as empty string instead of the literal "no"
20311      VERSION_PRE_BASE=
20312    else
20313      # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
20314       VERSION_PRE_BASE=`$ECHO "$with_version_pre_base" | $TR -c -d '[a-z][A-Z]'`
20315      if test "x$VERSION_PRE_BASE" != "x$with_version_pre_base"; then
20316        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre-base value has been sanitized from '$with_version_pre_base' to '$VERSION_PRE_BASE'" >&5
20317$as_echo "$as_me: WARNING: --with-version-pre-base value has been sanitized from '$with_version_pre_base' to '$VERSION_PRE_BASE'" >&2;}
20318      fi
20319    fi
20320  else
20321    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
20322      # Default is to use "internal" as pre
20323      VERSION_PRE_BASE="internal"
20324    fi
20325  fi
20326
20327
20328# Check whether --with-version-pre-debuglevel was given.
20329if test "${with_version_pre_debuglevel+set}" = set; then :
20330  withval=$with_version_pre_debuglevel; with_version_pre_debuglevel_present=true
20331else
20332  with_version_pre_debuglevel_present=false
20333fi
20334
20335
20336  if test "x$with_version_pre_debuglevel_present" = xtrue; then
20337    if test "x$with_version_pre_debuglevel" = xyes; then
20338      as_fn_error $? "--with-version-pre-debuglevel must have a value" "$LINENO" 5
20339    elif test "x$with_version_pre_debuglevel" = xno; then
20340      # Interpret --without-* as empty string instead of the literal "no"
20341      VERSION_PRE_DEBUGLEVEL=
20342    else
20343      # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
20344       VERSION_PRE_DEBUGLEVEL=`$ECHO "$with_version_pre_debuglevel" | $TR -c -d '[a-z][A-Z]'`
20345      if test "x$VERSION_PRE_DEBUGLEVEL" != "x$with_version_pre_debuglevel"; then
20346        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre-debuglevel value has been sanitized from '$with_version_pre_debuglevel' to '$VERSION_PRE_DEBUGLEVEL'" >&5
20347$as_echo "$as_me: WARNING: --with-version-pre-debuglevel value has been sanitized from '$with_version_pre_debuglevel' to '$VERSION_PRE_DEBUGLEVEL'" >&2;}
20348      fi
20349    fi
20350  else
20351    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
20352      # Default is to use the debug level name, except for release which is empty.
20353      if test "x$DEBUG_LEVEL" != "xrelease"; then
20354        VERSION_PRE_DEBUGLEVEL="$DEBUG_LEVEL"
20355      else
20356        VERSION_PRE_DEBUGLEVEL=""
20357      fi
20358    fi
20359  fi
20360
20361
20362# Check whether --with-version-opt was given.
20363if test "${with_version_opt+set}" = set; then :
20364  withval=$with_version_opt; with_version_opt_present=true
20365else
20366  with_version_opt_present=false
20367fi
20368
20369
20370  if test "x$with_version_opt_present" = xtrue; then
20371    if test "x$with_version_opt" = xyes; then
20372      as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
20373    elif test "x$with_version_opt" = xno; then
20374      # Interpret --without-* as empty string instead of the literal "no"
20375      VERSION_OPT=
20376    else
20377      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
20378       VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
20379      if test "x$VERSION_OPT" != "x$with_version_opt"; then
20380        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
20381$as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
20382      fi
20383    fi
20384  else
20385    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
20386      # Default is to calculate a string like this <timestamp>.<username>.<base dir name>
20387      timestamp=`$DATE '+%Y-%m-%d-%H%M%S'`
20388      # Outer [ ] to quote m4.
20389       username=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
20390       basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
20391      VERSION_OPT="$timestamp.$username.$basedirname"
20392    fi
20393  fi
20394
20395
20396# Check whether --with-version-build was given.
20397if test "${with_version_build+set}" = set; then :
20398  withval=$with_version_build; with_version_build_present=true
20399else
20400  with_version_build_present=false
20401fi
20402
20403
20404  if test "x$with_version_build_present" = xtrue; then
20405    if test "x$with_version_build" = xyes; then
20406      as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
20407    elif test "x$with_version_build" = xno; then
20408      # Interpret --without-* as empty string instead of the literal "no"
20409      VERSION_BUILD=
20410    elif test "x$with_version_build" = x; then
20411      VERSION_BUILD=
20412    else
20413
20414  # Additional [] needed to keep m4 from mangling shell constructs.
20415  if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
20416    as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
20417  fi
20418  # Extract the version number without leading zeros.
20419  cleaned_value=${BASH_REMATCH[1]}
20420  if test "x$cleaned_value" = x; then
20421    # Special case for zero
20422    cleaned_value=${BASH_REMATCH[2]}
20423  fi
20424
20425  if test $cleaned_value -gt 255; then
20426    as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
20427  fi
20428  if test "x$cleaned_value" != "x$with_version_build"; then
20429    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
20430$as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
20431  fi
20432  VERSION_BUILD=$cleaned_value
20433
20434    fi
20435  else
20436    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
20437      # Default is to not have a build number.
20438      VERSION_BUILD=""
20439      # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
20440      VERSION_BUILD=0
20441    fi
20442  fi
20443
20444
20445# Check whether --with-version-major was given.
20446if test "${with_version_major+set}" = set; then :
20447  withval=$with_version_major; with_version_major_present=true
20448else
20449  with_version_major_present=false
20450fi
20451
20452
20453  if test "x$with_version_major_present" = xtrue; then
20454    if test "x$with_version_major" = xyes; then
20455      as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
20456    else
20457
20458  # Additional [] needed to keep m4 from mangling shell constructs.
20459  if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
20460    as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
20461  fi
20462  # Extract the version number without leading zeros.
20463  cleaned_value=${BASH_REMATCH[1]}
20464  if test "x$cleaned_value" = x; then
20465    # Special case for zero
20466    cleaned_value=${BASH_REMATCH[2]}
20467  fi
20468
20469  if test $cleaned_value -gt 255; then
20470    as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
20471  fi
20472  if test "x$cleaned_value" != "x$with_version_major"; then
20473    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
20474$as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
20475  fi
20476  VERSION_MAJOR=$cleaned_value
20477
20478    fi
20479  else
20480    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
20481      # Default is to get value from version-numbers
20482      VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
20483    fi
20484  fi
20485
20486
20487# Check whether --with-version-minor was given.
20488if test "${with_version_minor+set}" = set; then :
20489  withval=$with_version_minor; with_version_minor_present=true
20490else
20491  with_version_minor_present=false
20492fi
20493
20494
20495  if test "x$with_version_minor_present" = xtrue; then
20496    if test "x$with_version_minor" = xyes; then
20497      as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
20498    elif test "x$with_version_minor" = xno; then
20499      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
20500      VERSION_MINOR=0
20501    elif test "x$with_version_minor" = x; then
20502      VERSION_MINOR=0
20503    else
20504
20505  # Additional [] needed to keep m4 from mangling shell constructs.
20506  if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
20507    as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
20508  fi
20509  # Extract the version number without leading zeros.
20510  cleaned_value=${BASH_REMATCH[1]}
20511  if test "x$cleaned_value" = x; then
20512    # Special case for zero
20513    cleaned_value=${BASH_REMATCH[2]}
20514  fi
20515
20516  if test $cleaned_value -gt 255; then
20517    as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
20518  fi
20519  if test "x$cleaned_value" != "x$with_version_minor"; then
20520    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
20521$as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
20522  fi
20523  VERSION_MINOR=$cleaned_value
20524
20525    fi
20526  else
20527    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
20528      # Default is 0, if unspecified
20529      VERSION_MINOR=0
20530    fi
20531  fi
20532
20533
20534# Check whether --with-version-security was given.
20535if test "${with_version_security+set}" = set; then :
20536  withval=$with_version_security; with_version_security_present=true
20537else
20538  with_version_security_present=false
20539fi
20540
20541
20542  if test "x$with_version_security_present" = xtrue; then
20543    if test "x$with_version_security" = xyes; then
20544      as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
20545    elif test "x$with_version_security" = xno; then
20546      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
20547      VERSION_SECURITY=0
20548    elif test "x$with_version_security" = x; then
20549      VERSION_SECURITY=0
20550    else
20551
20552  # Additional [] needed to keep m4 from mangling shell constructs.
20553  if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
20554    as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
20555  fi
20556  # Extract the version number without leading zeros.
20557  cleaned_value=${BASH_REMATCH[1]}
20558  if test "x$cleaned_value" = x; then
20559    # Special case for zero
20560    cleaned_value=${BASH_REMATCH[2]}
20561  fi
20562
20563  if test $cleaned_value -gt 255; then
20564    as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
20565  fi
20566  if test "x$cleaned_value" != "x$with_version_security"; then
20567    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
20568$as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
20569  fi
20570  VERSION_SECURITY=$cleaned_value
20571
20572    fi
20573  else
20574    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
20575      # Default is 0, if unspecified
20576      VERSION_SECURITY=0
20577    fi
20578  fi
20579
20580
20581# Check whether --with-version-patch was given.
20582if test "${with_version_patch+set}" = set; then :
20583  withval=$with_version_patch; with_version_patch_present=true
20584else
20585  with_version_patch_present=false
20586fi
20587
20588
20589  if test "x$with_version_patch_present" = xtrue; then
20590    if test "x$with_version_patch" = xyes; then
20591      as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
20592    elif test "x$with_version_patch" = xno; then
20593      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
20594      VERSION_PATCH=0
20595    elif test "x$with_version_patch" = x; then
20596      VERSION_PATCH=0
20597    else
20598
20599  # Additional [] needed to keep m4 from mangling shell constructs.
20600  if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
20601    as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
20602  fi
20603  # Extract the version number without leading zeros.
20604  cleaned_value=${BASH_REMATCH[1]}
20605  if test "x$cleaned_value" = x; then
20606    # Special case for zero
20607    cleaned_value=${BASH_REMATCH[2]}
20608  fi
20609
20610  if test $cleaned_value -gt 255; then
20611    as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
20612  fi
20613  if test "x$cleaned_value" != "x$with_version_patch"; then
20614    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
20615$as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
20616  fi
20617  VERSION_PATCH=$cleaned_value
20618
20619    fi
20620  else
20621    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
20622      # Default is 0, if unspecified
20623      VERSION_PATCH=0
20624    fi
20625  fi
20626
20627  # Calculate derived version properties
20628
20629  # Set pre to "pre-base" if debug level is empty (i.e. release), or
20630  # "pre-base.debug-level" otherwise.
20631  if test "x$VERSION_PRE_BASE" = x && test "x$VERSION_PRE_DEBUGLEVEL" != x; then
20632    as_fn_error $? "Cannot set version-pre-debuglevel when version-pre-base is empty" "$LINENO" 5
20633  fi
20634  VERSION_PRE=$VERSION_PRE_BASE${VERSION_PRE_DEBUGLEVEL:+.$VERSION_PRE_DEBUGLEVEL}
20635
20636  # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
20637  VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
20638
20639  stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
20640  # Strip trailing zeroes from stripped_version_number
20641  for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
20642  VERSION_NUMBER=$stripped_version_number
20643
20644  # The complete version string, with additional build information
20645  if test "x$VERSION_BUILD$VERSION_OPT" = x; then
20646    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
20647  else
20648    # If either build or opt is set, we need a + separator
20649    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
20650  fi
20651
20652  # The short version string, just VERSION_NUMBER and PRE, if present.
20653  VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
20654
20655  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
20656$as_echo_n "checking for version string... " >&6; }
20657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
20658$as_echo "$VERSION_STRING" >&6; }
20659
20660
20661
20662
20663
20664
20665
20666
20667
20668
20669
20670
20671
20672
20673###############################################################################
20674#
20675# Setup BootJDK, used to bootstrap the build.
20676#
20677###############################################################################
20678
20679
20680  BOOT_JDK_FOUND=no
20681
20682# Check whether --with-boot-jdk was given.
20683if test "${with_boot_jdk+set}" = set; then :
20684  withval=$with_boot_jdk;
20685fi
20686
20687
20688  # We look for the Boot JDK through various means, going from more certain to
20689  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
20690  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
20691  # must check if this is indeed valid; otherwise we'll continue looking.
20692
20693  # Test: Is bootjdk explicitely set by command line arguments?
20694
20695  if test "x$BOOT_JDK_FOUND" = xno; then
20696    # Now execute the test
20697
20698  if test "x$with_boot_jdk" != x; then
20699    BOOT_JDK=$with_boot_jdk
20700    BOOT_JDK_FOUND=maybe
20701    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
20702$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
20703  fi
20704
20705
20706    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20707    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20708      # Do we have a bin/java?
20709      if test ! -x "$BOOT_JDK/bin/java"; then
20710        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20711$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20712        BOOT_JDK_FOUND=no
20713      else
20714        # Do we have a bin/javac?
20715        if test ! -x "$BOOT_JDK/bin/javac"; then
20716          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20717$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20718          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20719$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20720          BOOT_JDK_FOUND=no
20721        else
20722          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20723          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20724
20725          # Extra M4 quote needed to protect [] in grep expression.
20726          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20727          if test "x$FOUND_CORRECT_VERSION" = x; then
20728            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20729$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20730            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20731$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20732            BOOT_JDK_FOUND=no
20733          else
20734            # We're done! :-)
20735            BOOT_JDK_FOUND=yes
20736
20737  # Only process if variable expands to non-empty
20738
20739  if test "x$BOOT_JDK" != x; then
20740    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20741
20742  # Input might be given as Windows format, start by converting to
20743  # unix format.
20744  path="$BOOT_JDK"
20745  new_path=`$CYGPATH -u "$path"`
20746
20747  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20748  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20749  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20750  # "foo.exe" is OK but "foo" is an error.
20751  #
20752  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20753  # It is also a way to make sure we got the proper file name for the real test later on.
20754  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20755  if test "x$test_shortpath" = x; then
20756    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20757$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20758    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20759  fi
20760
20761  # Call helper function which possibly converts this using DOS-style short mode.
20762  # If so, the updated path is stored in $new_path.
20763
20764  input_path="$new_path"
20765  # Check if we need to convert this using DOS-style short mode. If the path
20766  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20767  # take no chances and rewrite it.
20768  # Note: m4 eats our [], so we need to use [ and ] instead.
20769  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20770  if test "x$has_forbidden_chars" != x; then
20771    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20772    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20773    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20774    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20775      # Going to short mode and back again did indeed matter. Since short mode is
20776      # case insensitive, let's make it lowercase to improve readability.
20777      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20778      # Now convert it back to Unix-style (cygpath)
20779      input_path=`$CYGPATH -u "$shortmode_path"`
20780      new_path="$input_path"
20781    fi
20782  fi
20783
20784  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20785  if test "x$test_cygdrive_prefix" = x; then
20786    # As a simple fix, exclude /usr/bin since it's not a real path.
20787    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20788      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20789      # a path prefixed by /cygdrive for fixpath to work.
20790      new_path="$CYGWIN_ROOT_PATH$input_path"
20791    fi
20792  fi
20793
20794
20795  if test "x$path" != "x$new_path"; then
20796    BOOT_JDK="$new_path"
20797    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20798$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20799  fi
20800
20801    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20802
20803  path="$BOOT_JDK"
20804  has_colon=`$ECHO $path | $GREP ^.:`
20805  new_path="$path"
20806  if test "x$has_colon" = x; then
20807    # Not in mixed or Windows style, start by that.
20808    new_path=`cmd //c echo $path`
20809  fi
20810
20811
20812  input_path="$new_path"
20813  # Check if we need to convert this using DOS-style short mode. If the path
20814  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20815  # take no chances and rewrite it.
20816  # Note: m4 eats our [], so we need to use [ and ] instead.
20817  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20818  if test "x$has_forbidden_chars" != x; then
20819    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20820    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20821  fi
20822
20823
20824  windows_path="$new_path"
20825  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20826    unix_path=`$CYGPATH -u "$windows_path"`
20827    new_path="$unix_path"
20828  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20829    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20830    new_path="$unix_path"
20831  fi
20832
20833  if test "x$path" != "x$new_path"; then
20834    BOOT_JDK="$new_path"
20835    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20836$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20837  fi
20838
20839  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20840  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20841
20842    else
20843      # We're on a unix platform. Hooray! :)
20844      path="$BOOT_JDK"
20845      has_space=`$ECHO "$path" | $GREP " "`
20846      if test "x$has_space" != x; then
20847        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20848$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20849        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20850      fi
20851
20852      # Use eval to expand a potential ~
20853      eval path="$path"
20854      if test ! -f "$path" && test ! -d "$path"; then
20855        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20856      fi
20857
20858      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20859    fi
20860  fi
20861
20862            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20863$as_echo_n "checking for Boot JDK... " >&6; }
20864            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20865$as_echo "$BOOT_JDK" >&6; }
20866            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20867$as_echo_n "checking Boot JDK version... " >&6; }
20868            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20869            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20870$as_echo "$BOOT_JDK_VERSION" >&6; }
20871          fi # end check jdk version
20872        fi # end check javac
20873      fi # end check java
20874    fi # end check boot jdk found
20875  fi
20876
20877  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
20878    # Having specified an argument which is incorrect will produce an instant failure;
20879    # we should not go on looking
20880    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
20881  fi
20882
20883  # Test: Is bootjdk available from builddeps?
20884
20885  if test "x$BOOT_JDK_FOUND" = xno; then
20886    # Now execute the test
20887
20888
20889
20890  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
20891    # Source the builddeps file again, to make sure it uses the latest variables!
20892    . $builddepsfile
20893    # Look for a target and build machine specific resource!
20894    eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
20895    if test "x$resource" = x; then
20896      # Ok, lets instead look for a target specific resource
20897      eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
20898    fi
20899    if test "x$resource" = x; then
20900      # Ok, lets instead look for a build specific resource
20901      eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
20902    fi
20903    if test "x$resource" = x; then
20904      # Ok, lets instead look for a generic resource
20905      # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
20906      resource=${builddep_bootjdk}
20907    fi
20908    if test "x$resource" != x; then
20909      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
20910$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
20911      # If the resource in the builddeps.conf file is an existing directory,
20912      # for example /java/linux/cups
20913      if test -d ${resource}; then
20914        depdir=${resource}
20915      else
20916
20917  # bootjdk is for example mymodule
20918  # $resource is for example libs/general/libmymod_1_2_3.zip
20919  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
20920  # $with_builddeps_dir is for example /localhome/builddeps
20921  # depdir is the name of the variable into which we store the depdir, eg MYMOD
20922  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
20923  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
20924  filename=`basename $resource`
20925  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
20926  filebase=${filename%%.*}
20927  extension=${filename#*.}
20928  installdir=$with_builddeps_dir/$filebase
20929  if test ! -f $installdir/$filename.unpacked; then
20930    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
20931$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
20932    if test ! -d $installdir; then
20933      mkdir -p $installdir
20934    fi
20935    if test ! -d $installdir; then
20936      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
20937    fi
20938    tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
20939    touch $tmpfile
20940    if test ! -f $tmpfile; then
20941      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
20942    fi
20943
20944  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
20945  # $tmpfile is the local file name for the downloaded file.
20946  VALID_TOOL=no
20947  if test "x$BDEPS_FTP" = xwget; then
20948    VALID_TOOL=yes
20949    wget -O $tmpfile $with_builddeps_server/$resource
20950  fi
20951  if test "x$BDEPS_FTP" = xlftp; then
20952    VALID_TOOL=yes
20953    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
20954  fi
20955  if test "x$BDEPS_FTP" = xftp; then
20956    VALID_TOOL=yes
20957    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
20958    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
20959    FTPUSERPWD=${FTPSERVER%%@*}
20960    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
20961      FTPUSER=${userpwd%%:*}
20962      FTPPWD=${userpwd#*@}
20963      FTPSERVER=${FTPSERVER#*@}
20964    else
20965      FTPUSER=ftp
20966      FTPPWD=ftp
20967    fi
20968    # the "pass" command does not work on some
20969    # ftp clients (read ftp.exe) but if it works,
20970    # passive mode is better!
20971    ( \
20972        echo "user $FTPUSER $FTPPWD"        ; \
20973        echo "pass"                         ; \
20974        echo "bin"                          ; \
20975        echo "get $FTPPATH $tmpfile"              ; \
20976    ) | ftp -in $FTPSERVER
20977  fi
20978  if test "x$VALID_TOOL" != xyes; then
20979    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
20980  fi
20981
20982    mv $tmpfile $installdir/$filename
20983    if test ! -s $installdir/$filename; then
20984      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
20985    fi
20986    case "$extension" in
20987      zip)  echo "Unzipping $installdir/$filename..."
20988        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
20989        ;;
20990      tar.gz) echo "Untaring $installdir/$filename..."
20991        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20992        ;;
20993      tgz) echo "Untaring $installdir/$filename..."
20994        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20995        ;;
20996      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
20997        ;;
20998    esac
20999  fi
21000  if test -f $installdir/$filename.unpacked; then
21001    depdir=$installdir
21002  fi
21003
21004      fi
21005      # Source the builddeps file again, because in the previous command, the depdir
21006      # was updated to point at the current build dependency install directory.
21007      . $builddepsfile
21008      # Now extract variables from the builddeps.conf files.
21009      theroot=${builddep_bootjdk_ROOT}
21010      thecflags=${builddep_bootjdk_CFLAGS}
21011      thelibs=${builddep_bootjdk_LIBS}
21012      if test "x$depdir" = x; then
21013        as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
21014      fi
21015      BOOT_JDK=$depdir
21016      if test "x$theroot" != x; then
21017        BOOT_JDK="$theroot"
21018      fi
21019      if test "x$thecflags" != x; then
21020        BOOT_JDK_CFLAGS="$thecflags"
21021      fi
21022      if test "x$thelibs" != x; then
21023        BOOT_JDK_LIBS="$thelibs"
21024      fi
21025      BOOT_JDK_FOUND=maybe
21026      else BOOT_JDK_FOUND=no
21027
21028    fi
21029    else BOOT_JDK_FOUND=no
21030
21031  fi
21032
21033
21034
21035    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21036    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21037      # Do we have a bin/java?
21038      if test ! -x "$BOOT_JDK/bin/java"; then
21039        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21040$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21041        BOOT_JDK_FOUND=no
21042      else
21043        # Do we have a bin/javac?
21044        if test ! -x "$BOOT_JDK/bin/javac"; then
21045          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21046$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21047          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21048$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21049          BOOT_JDK_FOUND=no
21050        else
21051          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21052          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21053
21054          # Extra M4 quote needed to protect [] in grep expression.
21055          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21056          if test "x$FOUND_CORRECT_VERSION" = x; then
21057            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21058$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21059            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21060$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21061            BOOT_JDK_FOUND=no
21062          else
21063            # We're done! :-)
21064            BOOT_JDK_FOUND=yes
21065
21066  # Only process if variable expands to non-empty
21067
21068  if test "x$BOOT_JDK" != x; then
21069    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21070
21071  # Input might be given as Windows format, start by converting to
21072  # unix format.
21073  path="$BOOT_JDK"
21074  new_path=`$CYGPATH -u "$path"`
21075
21076  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21077  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21078  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21079  # "foo.exe" is OK but "foo" is an error.
21080  #
21081  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21082  # It is also a way to make sure we got the proper file name for the real test later on.
21083  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21084  if test "x$test_shortpath" = x; then
21085    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21086$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21087    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21088  fi
21089
21090  # Call helper function which possibly converts this using DOS-style short mode.
21091  # If so, the updated path is stored in $new_path.
21092
21093  input_path="$new_path"
21094  # Check if we need to convert this using DOS-style short mode. If the path
21095  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21096  # take no chances and rewrite it.
21097  # Note: m4 eats our [], so we need to use [ and ] instead.
21098  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21099  if test "x$has_forbidden_chars" != x; then
21100    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21101    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21102    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21103    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21104      # Going to short mode and back again did indeed matter. Since short mode is
21105      # case insensitive, let's make it lowercase to improve readability.
21106      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21107      # Now convert it back to Unix-style (cygpath)
21108      input_path=`$CYGPATH -u "$shortmode_path"`
21109      new_path="$input_path"
21110    fi
21111  fi
21112
21113  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21114  if test "x$test_cygdrive_prefix" = x; then
21115    # As a simple fix, exclude /usr/bin since it's not a real path.
21116    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21117      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21118      # a path prefixed by /cygdrive for fixpath to work.
21119      new_path="$CYGWIN_ROOT_PATH$input_path"
21120    fi
21121  fi
21122
21123
21124  if test "x$path" != "x$new_path"; then
21125    BOOT_JDK="$new_path"
21126    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21127$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21128  fi
21129
21130    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21131
21132  path="$BOOT_JDK"
21133  has_colon=`$ECHO $path | $GREP ^.:`
21134  new_path="$path"
21135  if test "x$has_colon" = x; then
21136    # Not in mixed or Windows style, start by that.
21137    new_path=`cmd //c echo $path`
21138  fi
21139
21140
21141  input_path="$new_path"
21142  # Check if we need to convert this using DOS-style short mode. If the path
21143  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21144  # take no chances and rewrite it.
21145  # Note: m4 eats our [], so we need to use [ and ] instead.
21146  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21147  if test "x$has_forbidden_chars" != x; then
21148    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21149    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21150  fi
21151
21152
21153  windows_path="$new_path"
21154  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21155    unix_path=`$CYGPATH -u "$windows_path"`
21156    new_path="$unix_path"
21157  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21158    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21159    new_path="$unix_path"
21160  fi
21161
21162  if test "x$path" != "x$new_path"; then
21163    BOOT_JDK="$new_path"
21164    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21165$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21166  fi
21167
21168  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21169  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21170
21171    else
21172      # We're on a unix platform. Hooray! :)
21173      path="$BOOT_JDK"
21174      has_space=`$ECHO "$path" | $GREP " "`
21175      if test "x$has_space" != x; then
21176        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21177$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21178        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21179      fi
21180
21181      # Use eval to expand a potential ~
21182      eval path="$path"
21183      if test ! -f "$path" && test ! -d "$path"; then
21184        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21185      fi
21186
21187      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21188    fi
21189  fi
21190
21191            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21192$as_echo_n "checking for Boot JDK... " >&6; }
21193            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21194$as_echo "$BOOT_JDK" >&6; }
21195            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21196$as_echo_n "checking Boot JDK version... " >&6; }
21197            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21198            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21199$as_echo "$BOOT_JDK_VERSION" >&6; }
21200          fi # end check jdk version
21201        fi # end check javac
21202      fi # end check java
21203    fi # end check boot jdk found
21204  fi
21205
21206
21207  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
21208
21209  if test "x$BOOT_JDK_FOUND" = xno; then
21210    # Now execute the test
21211
21212  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
21213    # First check at user selected default
21214
21215  if test "x$BOOT_JDK_FOUND" = xno; then
21216    # Now execute the test
21217
21218  if test -x /usr/libexec/java_home; then
21219    BOOT_JDK=`/usr/libexec/java_home `
21220    BOOT_JDK_FOUND=maybe
21221    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
21222$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
21223  fi
21224
21225
21226    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21227    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21228      # Do we have a bin/java?
21229      if test ! -x "$BOOT_JDK/bin/java"; then
21230        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21231$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21232        BOOT_JDK_FOUND=no
21233      else
21234        # Do we have a bin/javac?
21235        if test ! -x "$BOOT_JDK/bin/javac"; then
21236          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21237$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21238          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21239$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21240          BOOT_JDK_FOUND=no
21241        else
21242          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21243          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21244
21245          # Extra M4 quote needed to protect [] in grep expression.
21246          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21247          if test "x$FOUND_CORRECT_VERSION" = x; then
21248            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21249$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21250            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21251$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21252            BOOT_JDK_FOUND=no
21253          else
21254            # We're done! :-)
21255            BOOT_JDK_FOUND=yes
21256
21257  # Only process if variable expands to non-empty
21258
21259  if test "x$BOOT_JDK" != x; then
21260    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21261
21262  # Input might be given as Windows format, start by converting to
21263  # unix format.
21264  path="$BOOT_JDK"
21265  new_path=`$CYGPATH -u "$path"`
21266
21267  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21268  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21269  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21270  # "foo.exe" is OK but "foo" is an error.
21271  #
21272  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21273  # It is also a way to make sure we got the proper file name for the real test later on.
21274  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21275  if test "x$test_shortpath" = x; then
21276    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21277$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21278    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21279  fi
21280
21281  # Call helper function which possibly converts this using DOS-style short mode.
21282  # If so, the updated path is stored in $new_path.
21283
21284  input_path="$new_path"
21285  # Check if we need to convert this using DOS-style short mode. If the path
21286  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21287  # take no chances and rewrite it.
21288  # Note: m4 eats our [], so we need to use [ and ] instead.
21289  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21290  if test "x$has_forbidden_chars" != x; then
21291    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21292    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21293    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21294    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21295      # Going to short mode and back again did indeed matter. Since short mode is
21296      # case insensitive, let's make it lowercase to improve readability.
21297      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21298      # Now convert it back to Unix-style (cygpath)
21299      input_path=`$CYGPATH -u "$shortmode_path"`
21300      new_path="$input_path"
21301    fi
21302  fi
21303
21304  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21305  if test "x$test_cygdrive_prefix" = x; then
21306    # As a simple fix, exclude /usr/bin since it's not a real path.
21307    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21308      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21309      # a path prefixed by /cygdrive for fixpath to work.
21310      new_path="$CYGWIN_ROOT_PATH$input_path"
21311    fi
21312  fi
21313
21314
21315  if test "x$path" != "x$new_path"; then
21316    BOOT_JDK="$new_path"
21317    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21318$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21319  fi
21320
21321    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21322
21323  path="$BOOT_JDK"
21324  has_colon=`$ECHO $path | $GREP ^.:`
21325  new_path="$path"
21326  if test "x$has_colon" = x; then
21327    # Not in mixed or Windows style, start by that.
21328    new_path=`cmd //c echo $path`
21329  fi
21330
21331
21332  input_path="$new_path"
21333  # Check if we need to convert this using DOS-style short mode. If the path
21334  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21335  # take no chances and rewrite it.
21336  # Note: m4 eats our [], so we need to use [ and ] instead.
21337  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21338  if test "x$has_forbidden_chars" != x; then
21339    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21340    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21341  fi
21342
21343
21344  windows_path="$new_path"
21345  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21346    unix_path=`$CYGPATH -u "$windows_path"`
21347    new_path="$unix_path"
21348  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21349    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21350    new_path="$unix_path"
21351  fi
21352
21353  if test "x$path" != "x$new_path"; then
21354    BOOT_JDK="$new_path"
21355    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21356$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21357  fi
21358
21359  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21360  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21361
21362    else
21363      # We're on a unix platform. Hooray! :)
21364      path="$BOOT_JDK"
21365      has_space=`$ECHO "$path" | $GREP " "`
21366      if test "x$has_space" != x; then
21367        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21368$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21369        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21370      fi
21371
21372      # Use eval to expand a potential ~
21373      eval path="$path"
21374      if test ! -f "$path" && test ! -d "$path"; then
21375        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21376      fi
21377
21378      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21379    fi
21380  fi
21381
21382            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21383$as_echo_n "checking for Boot JDK... " >&6; }
21384            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21385$as_echo "$BOOT_JDK" >&6; }
21386            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21387$as_echo_n "checking Boot JDK version... " >&6; }
21388            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21389            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21390$as_echo "$BOOT_JDK_VERSION" >&6; }
21391          fi # end check jdk version
21392        fi # end check javac
21393      fi # end check java
21394    fi # end check boot jdk found
21395  fi
21396
21397    # If that did not work out (e.g. too old), try explicit versions instead
21398
21399  if test "x$BOOT_JDK_FOUND" = xno; then
21400    # Now execute the test
21401
21402  if test -x /usr/libexec/java_home; then
21403    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
21404    BOOT_JDK_FOUND=maybe
21405    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
21406$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
21407  fi
21408
21409
21410    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21411    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21412      # Do we have a bin/java?
21413      if test ! -x "$BOOT_JDK/bin/java"; then
21414        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21415$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21416        BOOT_JDK_FOUND=no
21417      else
21418        # Do we have a bin/javac?
21419        if test ! -x "$BOOT_JDK/bin/javac"; then
21420          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21421$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21422          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21423$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21424          BOOT_JDK_FOUND=no
21425        else
21426          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21427          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21428
21429          # Extra M4 quote needed to protect [] in grep expression.
21430          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21431          if test "x$FOUND_CORRECT_VERSION" = x; then
21432            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21433$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21434            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21435$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21436            BOOT_JDK_FOUND=no
21437          else
21438            # We're done! :-)
21439            BOOT_JDK_FOUND=yes
21440
21441  # Only process if variable expands to non-empty
21442
21443  if test "x$BOOT_JDK" != x; then
21444    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21445
21446  # Input might be given as Windows format, start by converting to
21447  # unix format.
21448  path="$BOOT_JDK"
21449  new_path=`$CYGPATH -u "$path"`
21450
21451  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21452  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21453  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21454  # "foo.exe" is OK but "foo" is an error.
21455  #
21456  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21457  # It is also a way to make sure we got the proper file name for the real test later on.
21458  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21459  if test "x$test_shortpath" = x; then
21460    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21461$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21462    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21463  fi
21464
21465  # Call helper function which possibly converts this using DOS-style short mode.
21466  # If so, the updated path is stored in $new_path.
21467
21468  input_path="$new_path"
21469  # Check if we need to convert this using DOS-style short mode. If the path
21470  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21471  # take no chances and rewrite it.
21472  # Note: m4 eats our [], so we need to use [ and ] instead.
21473  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21474  if test "x$has_forbidden_chars" != x; then
21475    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21476    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21477    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21478    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21479      # Going to short mode and back again did indeed matter. Since short mode is
21480      # case insensitive, let's make it lowercase to improve readability.
21481      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21482      # Now convert it back to Unix-style (cygpath)
21483      input_path=`$CYGPATH -u "$shortmode_path"`
21484      new_path="$input_path"
21485    fi
21486  fi
21487
21488  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21489  if test "x$test_cygdrive_prefix" = x; then
21490    # As a simple fix, exclude /usr/bin since it's not a real path.
21491    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21492      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21493      # a path prefixed by /cygdrive for fixpath to work.
21494      new_path="$CYGWIN_ROOT_PATH$input_path"
21495    fi
21496  fi
21497
21498
21499  if test "x$path" != "x$new_path"; then
21500    BOOT_JDK="$new_path"
21501    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21502$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21503  fi
21504
21505    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21506
21507  path="$BOOT_JDK"
21508  has_colon=`$ECHO $path | $GREP ^.:`
21509  new_path="$path"
21510  if test "x$has_colon" = x; then
21511    # Not in mixed or Windows style, start by that.
21512    new_path=`cmd //c echo $path`
21513  fi
21514
21515
21516  input_path="$new_path"
21517  # Check if we need to convert this using DOS-style short mode. If the path
21518  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21519  # take no chances and rewrite it.
21520  # Note: m4 eats our [], so we need to use [ and ] instead.
21521  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21522  if test "x$has_forbidden_chars" != x; then
21523    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21524    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21525  fi
21526
21527
21528  windows_path="$new_path"
21529  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21530    unix_path=`$CYGPATH -u "$windows_path"`
21531    new_path="$unix_path"
21532  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21533    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21534    new_path="$unix_path"
21535  fi
21536
21537  if test "x$path" != "x$new_path"; then
21538    BOOT_JDK="$new_path"
21539    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21540$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21541  fi
21542
21543  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21544  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21545
21546    else
21547      # We're on a unix platform. Hooray! :)
21548      path="$BOOT_JDK"
21549      has_space=`$ECHO "$path" | $GREP " "`
21550      if test "x$has_space" != x; then
21551        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21552$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21553        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21554      fi
21555
21556      # Use eval to expand a potential ~
21557      eval path="$path"
21558      if test ! -f "$path" && test ! -d "$path"; then
21559        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21560      fi
21561
21562      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21563    fi
21564  fi
21565
21566            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21567$as_echo_n "checking for Boot JDK... " >&6; }
21568            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21569$as_echo "$BOOT_JDK" >&6; }
21570            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21571$as_echo_n "checking Boot JDK version... " >&6; }
21572            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21573            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21574$as_echo "$BOOT_JDK_VERSION" >&6; }
21575          fi # end check jdk version
21576        fi # end check javac
21577      fi # end check java
21578    fi # end check boot jdk found
21579  fi
21580
21581
21582  if test "x$BOOT_JDK_FOUND" = xno; then
21583    # Now execute the test
21584
21585  if test -x /usr/libexec/java_home; then
21586    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
21587    BOOT_JDK_FOUND=maybe
21588    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
21589$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
21590  fi
21591
21592
21593    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21594    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21595      # Do we have a bin/java?
21596      if test ! -x "$BOOT_JDK/bin/java"; then
21597        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21598$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21599        BOOT_JDK_FOUND=no
21600      else
21601        # Do we have a bin/javac?
21602        if test ! -x "$BOOT_JDK/bin/javac"; then
21603          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21604$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21605          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21606$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21607          BOOT_JDK_FOUND=no
21608        else
21609          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21610          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21611
21612          # Extra M4 quote needed to protect [] in grep expression.
21613          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21614          if test "x$FOUND_CORRECT_VERSION" = x; then
21615            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21616$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21617            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21618$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21619            BOOT_JDK_FOUND=no
21620          else
21621            # We're done! :-)
21622            BOOT_JDK_FOUND=yes
21623
21624  # Only process if variable expands to non-empty
21625
21626  if test "x$BOOT_JDK" != x; then
21627    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21628
21629  # Input might be given as Windows format, start by converting to
21630  # unix format.
21631  path="$BOOT_JDK"
21632  new_path=`$CYGPATH -u "$path"`
21633
21634  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21635  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21636  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21637  # "foo.exe" is OK but "foo" is an error.
21638  #
21639  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21640  # It is also a way to make sure we got the proper file name for the real test later on.
21641  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21642  if test "x$test_shortpath" = x; then
21643    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21644$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21645    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21646  fi
21647
21648  # Call helper function which possibly converts this using DOS-style short mode.
21649  # If so, the updated path is stored in $new_path.
21650
21651  input_path="$new_path"
21652  # Check if we need to convert this using DOS-style short mode. If the path
21653  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21654  # take no chances and rewrite it.
21655  # Note: m4 eats our [], so we need to use [ and ] instead.
21656  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21657  if test "x$has_forbidden_chars" != x; then
21658    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21659    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21660    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21661    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21662      # Going to short mode and back again did indeed matter. Since short mode is
21663      # case insensitive, let's make it lowercase to improve readability.
21664      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21665      # Now convert it back to Unix-style (cygpath)
21666      input_path=`$CYGPATH -u "$shortmode_path"`
21667      new_path="$input_path"
21668    fi
21669  fi
21670
21671  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21672  if test "x$test_cygdrive_prefix" = x; then
21673    # As a simple fix, exclude /usr/bin since it's not a real path.
21674    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21675      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21676      # a path prefixed by /cygdrive for fixpath to work.
21677      new_path="$CYGWIN_ROOT_PATH$input_path"
21678    fi
21679  fi
21680
21681
21682  if test "x$path" != "x$new_path"; then
21683    BOOT_JDK="$new_path"
21684    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21685$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21686  fi
21687
21688    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21689
21690  path="$BOOT_JDK"
21691  has_colon=`$ECHO $path | $GREP ^.:`
21692  new_path="$path"
21693  if test "x$has_colon" = x; then
21694    # Not in mixed or Windows style, start by that.
21695    new_path=`cmd //c echo $path`
21696  fi
21697
21698
21699  input_path="$new_path"
21700  # Check if we need to convert this using DOS-style short mode. If the path
21701  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21702  # take no chances and rewrite it.
21703  # Note: m4 eats our [], so we need to use [ and ] instead.
21704  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21705  if test "x$has_forbidden_chars" != x; then
21706    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21707    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21708  fi
21709
21710
21711  windows_path="$new_path"
21712  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21713    unix_path=`$CYGPATH -u "$windows_path"`
21714    new_path="$unix_path"
21715  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21716    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21717    new_path="$unix_path"
21718  fi
21719
21720  if test "x$path" != "x$new_path"; then
21721    BOOT_JDK="$new_path"
21722    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21723$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21724  fi
21725
21726  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21727  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21728
21729    else
21730      # We're on a unix platform. Hooray! :)
21731      path="$BOOT_JDK"
21732      has_space=`$ECHO "$path" | $GREP " "`
21733      if test "x$has_space" != x; then
21734        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21735$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21736        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21737      fi
21738
21739      # Use eval to expand a potential ~
21740      eval path="$path"
21741      if test ! -f "$path" && test ! -d "$path"; then
21742        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21743      fi
21744
21745      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21746    fi
21747  fi
21748
21749            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21750$as_echo_n "checking for Boot JDK... " >&6; }
21751            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21752$as_echo "$BOOT_JDK" >&6; }
21753            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21754$as_echo_n "checking Boot JDK version... " >&6; }
21755            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21756            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21757$as_echo "$BOOT_JDK_VERSION" >&6; }
21758          fi # end check jdk version
21759        fi # end check javac
21760      fi # end check java
21761    fi # end check boot jdk found
21762  fi
21763
21764
21765  if test "x$BOOT_JDK_FOUND" = xno; then
21766    # Now execute the test
21767
21768  if test -x /usr/libexec/java_home; then
21769    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
21770    BOOT_JDK_FOUND=maybe
21771    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
21772$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
21773  fi
21774
21775
21776    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21777    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21778      # Do we have a bin/java?
21779      if test ! -x "$BOOT_JDK/bin/java"; then
21780        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21781$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21782        BOOT_JDK_FOUND=no
21783      else
21784        # Do we have a bin/javac?
21785        if test ! -x "$BOOT_JDK/bin/javac"; then
21786          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21787$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21788          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21789$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21790          BOOT_JDK_FOUND=no
21791        else
21792          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21793          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21794
21795          # Extra M4 quote needed to protect [] in grep expression.
21796          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21797          if test "x$FOUND_CORRECT_VERSION" = x; then
21798            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21799$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21800            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21801$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21802            BOOT_JDK_FOUND=no
21803          else
21804            # We're done! :-)
21805            BOOT_JDK_FOUND=yes
21806
21807  # Only process if variable expands to non-empty
21808
21809  if test "x$BOOT_JDK" != x; then
21810    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21811
21812  # Input might be given as Windows format, start by converting to
21813  # unix format.
21814  path="$BOOT_JDK"
21815  new_path=`$CYGPATH -u "$path"`
21816
21817  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21818  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21819  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21820  # "foo.exe" is OK but "foo" is an error.
21821  #
21822  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21823  # It is also a way to make sure we got the proper file name for the real test later on.
21824  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21825  if test "x$test_shortpath" = x; then
21826    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21827$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21828    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21829  fi
21830
21831  # Call helper function which possibly converts this using DOS-style short mode.
21832  # If so, the updated path is stored in $new_path.
21833
21834  input_path="$new_path"
21835  # Check if we need to convert this using DOS-style short mode. If the path
21836  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21837  # take no chances and rewrite it.
21838  # Note: m4 eats our [], so we need to use [ and ] instead.
21839  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21840  if test "x$has_forbidden_chars" != x; then
21841    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21842    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21843    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21844    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21845      # Going to short mode and back again did indeed matter. Since short mode is
21846      # case insensitive, let's make it lowercase to improve readability.
21847      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21848      # Now convert it back to Unix-style (cygpath)
21849      input_path=`$CYGPATH -u "$shortmode_path"`
21850      new_path="$input_path"
21851    fi
21852  fi
21853
21854  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21855  if test "x$test_cygdrive_prefix" = x; then
21856    # As a simple fix, exclude /usr/bin since it's not a real path.
21857    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21858      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21859      # a path prefixed by /cygdrive for fixpath to work.
21860      new_path="$CYGWIN_ROOT_PATH$input_path"
21861    fi
21862  fi
21863
21864
21865  if test "x$path" != "x$new_path"; then
21866    BOOT_JDK="$new_path"
21867    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21868$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21869  fi
21870
21871    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21872
21873  path="$BOOT_JDK"
21874  has_colon=`$ECHO $path | $GREP ^.:`
21875  new_path="$path"
21876  if test "x$has_colon" = x; then
21877    # Not in mixed or Windows style, start by that.
21878    new_path=`cmd //c echo $path`
21879  fi
21880
21881
21882  input_path="$new_path"
21883  # Check if we need to convert this using DOS-style short mode. If the path
21884  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21885  # take no chances and rewrite it.
21886  # Note: m4 eats our [], so we need to use [ and ] instead.
21887  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21888  if test "x$has_forbidden_chars" != x; then
21889    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21890    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21891  fi
21892
21893
21894  windows_path="$new_path"
21895  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21896    unix_path=`$CYGPATH -u "$windows_path"`
21897    new_path="$unix_path"
21898  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21899    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21900    new_path="$unix_path"
21901  fi
21902
21903  if test "x$path" != "x$new_path"; then
21904    BOOT_JDK="$new_path"
21905    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21906$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21907  fi
21908
21909  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21910  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21911
21912    else
21913      # We're on a unix platform. Hooray! :)
21914      path="$BOOT_JDK"
21915      has_space=`$ECHO "$path" | $GREP " "`
21916      if test "x$has_space" != x; then
21917        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21918$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21919        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21920      fi
21921
21922      # Use eval to expand a potential ~
21923      eval path="$path"
21924      if test ! -f "$path" && test ! -d "$path"; then
21925        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21926      fi
21927
21928      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21929    fi
21930  fi
21931
21932            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21933$as_echo_n "checking for Boot JDK... " >&6; }
21934            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21935$as_echo "$BOOT_JDK" >&6; }
21936            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21937$as_echo_n "checking Boot JDK version... " >&6; }
21938            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21939            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21940$as_echo "$BOOT_JDK_VERSION" >&6; }
21941          fi # end check jdk version
21942        fi # end check javac
21943      fi # end check java
21944    fi # end check boot jdk found
21945  fi
21946
21947  fi
21948
21949
21950    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21951    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21952      # Do we have a bin/java?
21953      if test ! -x "$BOOT_JDK/bin/java"; then
21954        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21955$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21956        BOOT_JDK_FOUND=no
21957      else
21958        # Do we have a bin/javac?
21959        if test ! -x "$BOOT_JDK/bin/javac"; then
21960          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21961$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21962          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21963$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21964          BOOT_JDK_FOUND=no
21965        else
21966          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21967          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21968
21969          # Extra M4 quote needed to protect [] in grep expression.
21970          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21971          if test "x$FOUND_CORRECT_VERSION" = x; then
21972            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21973$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21974            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21975$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21976            BOOT_JDK_FOUND=no
21977          else
21978            # We're done! :-)
21979            BOOT_JDK_FOUND=yes
21980
21981  # Only process if variable expands to non-empty
21982
21983  if test "x$BOOT_JDK" != x; then
21984    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21985
21986  # Input might be given as Windows format, start by converting to
21987  # unix format.
21988  path="$BOOT_JDK"
21989  new_path=`$CYGPATH -u "$path"`
21990
21991  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21992  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21993  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21994  # "foo.exe" is OK but "foo" is an error.
21995  #
21996  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21997  # It is also a way to make sure we got the proper file name for the real test later on.
21998  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21999  if test "x$test_shortpath" = x; then
22000    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22001$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22002    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22003  fi
22004
22005  # Call helper function which possibly converts this using DOS-style short mode.
22006  # If so, the updated path is stored in $new_path.
22007
22008  input_path="$new_path"
22009  # Check if we need to convert this using DOS-style short mode. If the path
22010  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22011  # take no chances and rewrite it.
22012  # Note: m4 eats our [], so we need to use [ and ] instead.
22013  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22014  if test "x$has_forbidden_chars" != x; then
22015    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22016    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22017    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22018    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22019      # Going to short mode and back again did indeed matter. Since short mode is
22020      # case insensitive, let's make it lowercase to improve readability.
22021      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22022      # Now convert it back to Unix-style (cygpath)
22023      input_path=`$CYGPATH -u "$shortmode_path"`
22024      new_path="$input_path"
22025    fi
22026  fi
22027
22028  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22029  if test "x$test_cygdrive_prefix" = x; then
22030    # As a simple fix, exclude /usr/bin since it's not a real path.
22031    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22032      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22033      # a path prefixed by /cygdrive for fixpath to work.
22034      new_path="$CYGWIN_ROOT_PATH$input_path"
22035    fi
22036  fi
22037
22038
22039  if test "x$path" != "x$new_path"; then
22040    BOOT_JDK="$new_path"
22041    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22042$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22043  fi
22044
22045    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22046
22047  path="$BOOT_JDK"
22048  has_colon=`$ECHO $path | $GREP ^.:`
22049  new_path="$path"
22050  if test "x$has_colon" = x; then
22051    # Not in mixed or Windows style, start by that.
22052    new_path=`cmd //c echo $path`
22053  fi
22054
22055
22056  input_path="$new_path"
22057  # Check if we need to convert this using DOS-style short mode. If the path
22058  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22059  # take no chances and rewrite it.
22060  # Note: m4 eats our [], so we need to use [ and ] instead.
22061  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22062  if test "x$has_forbidden_chars" != x; then
22063    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22064    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22065  fi
22066
22067
22068  windows_path="$new_path"
22069  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22070    unix_path=`$CYGPATH -u "$windows_path"`
22071    new_path="$unix_path"
22072  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22073    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22074    new_path="$unix_path"
22075  fi
22076
22077  if test "x$path" != "x$new_path"; then
22078    BOOT_JDK="$new_path"
22079    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22080$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22081  fi
22082
22083  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22084  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22085
22086    else
22087      # We're on a unix platform. Hooray! :)
22088      path="$BOOT_JDK"
22089      has_space=`$ECHO "$path" | $GREP " "`
22090      if test "x$has_space" != x; then
22091        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22092$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22093        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22094      fi
22095
22096      # Use eval to expand a potential ~
22097      eval path="$path"
22098      if test ! -f "$path" && test ! -d "$path"; then
22099        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22100      fi
22101
22102      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22103    fi
22104  fi
22105
22106            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22107$as_echo_n "checking for Boot JDK... " >&6; }
22108            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22109$as_echo "$BOOT_JDK" >&6; }
22110            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22111$as_echo_n "checking Boot JDK version... " >&6; }
22112            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22113            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22114$as_echo "$BOOT_JDK_VERSION" >&6; }
22115          fi # end check jdk version
22116        fi # end check javac
22117      fi # end check java
22118    fi # end check boot jdk found
22119  fi
22120
22121
22122  # Test: Is $JAVA_HOME set?
22123
22124  if test "x$BOOT_JDK_FOUND" = xno; then
22125    # Now execute the test
22126
22127  if test "x$JAVA_HOME" != x; then
22128    JAVA_HOME_PROCESSED="$JAVA_HOME"
22129
22130  # Only process if variable expands to non-empty
22131
22132  if test "x$JAVA_HOME_PROCESSED" != x; then
22133    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22134
22135  # Input might be given as Windows format, start by converting to
22136  # unix format.
22137  path="$JAVA_HOME_PROCESSED"
22138  new_path=`$CYGPATH -u "$path"`
22139
22140  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22141  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22142  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22143  # "foo.exe" is OK but "foo" is an error.
22144  #
22145  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22146  # It is also a way to make sure we got the proper file name for the real test later on.
22147  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22148  if test "x$test_shortpath" = x; then
22149    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
22150$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
22151    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
22152  fi
22153
22154  # Call helper function which possibly converts this using DOS-style short mode.
22155  # If so, the updated path is stored in $new_path.
22156
22157  input_path="$new_path"
22158  # Check if we need to convert this using DOS-style short mode. If the path
22159  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22160  # take no chances and rewrite it.
22161  # Note: m4 eats our [], so we need to use [ and ] instead.
22162  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22163  if test "x$has_forbidden_chars" != x; then
22164    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22165    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22166    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22167    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22168      # Going to short mode and back again did indeed matter. Since short mode is
22169      # case insensitive, let's make it lowercase to improve readability.
22170      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22171      # Now convert it back to Unix-style (cygpath)
22172      input_path=`$CYGPATH -u "$shortmode_path"`
22173      new_path="$input_path"
22174    fi
22175  fi
22176
22177  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22178  if test "x$test_cygdrive_prefix" = x; then
22179    # As a simple fix, exclude /usr/bin since it's not a real path.
22180    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22181      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22182      # a path prefixed by /cygdrive for fixpath to work.
22183      new_path="$CYGWIN_ROOT_PATH$input_path"
22184    fi
22185  fi
22186
22187
22188  if test "x$path" != "x$new_path"; then
22189    JAVA_HOME_PROCESSED="$new_path"
22190    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
22191$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
22192  fi
22193
22194    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22195
22196  path="$JAVA_HOME_PROCESSED"
22197  has_colon=`$ECHO $path | $GREP ^.:`
22198  new_path="$path"
22199  if test "x$has_colon" = x; then
22200    # Not in mixed or Windows style, start by that.
22201    new_path=`cmd //c echo $path`
22202  fi
22203
22204
22205  input_path="$new_path"
22206  # Check if we need to convert this using DOS-style short mode. If the path
22207  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22208  # take no chances and rewrite it.
22209  # Note: m4 eats our [], so we need to use [ and ] instead.
22210  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22211  if test "x$has_forbidden_chars" != x; then
22212    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22213    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22214  fi
22215
22216
22217  windows_path="$new_path"
22218  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22219    unix_path=`$CYGPATH -u "$windows_path"`
22220    new_path="$unix_path"
22221  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22222    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22223    new_path="$unix_path"
22224  fi
22225
22226  if test "x$path" != "x$new_path"; then
22227    JAVA_HOME_PROCESSED="$new_path"
22228    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
22229$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
22230  fi
22231
22232  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22233  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22234
22235    else
22236      # We're on a unix platform. Hooray! :)
22237      path="$JAVA_HOME_PROCESSED"
22238      has_space=`$ECHO "$path" | $GREP " "`
22239      if test "x$has_space" != x; then
22240        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
22241$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
22242        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22243      fi
22244
22245      # Use eval to expand a potential ~
22246      eval path="$path"
22247      if test ! -f "$path" && test ! -d "$path"; then
22248        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
22249      fi
22250
22251      JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
22252    fi
22253  fi
22254
22255    if test ! -d "$JAVA_HOME_PROCESSED"; then
22256      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
22257$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
22258    else
22259      # Aha, the user has set a JAVA_HOME
22260      # let us use that as the Boot JDK.
22261      BOOT_JDK="$JAVA_HOME_PROCESSED"
22262      BOOT_JDK_FOUND=maybe
22263      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
22264$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
22265    fi
22266  fi
22267
22268
22269    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22270    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22271      # Do we have a bin/java?
22272      if test ! -x "$BOOT_JDK/bin/java"; then
22273        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22274$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22275        BOOT_JDK_FOUND=no
22276      else
22277        # Do we have a bin/javac?
22278        if test ! -x "$BOOT_JDK/bin/javac"; then
22279          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22280$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22281          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22282$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22283          BOOT_JDK_FOUND=no
22284        else
22285          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22286          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22287
22288          # Extra M4 quote needed to protect [] in grep expression.
22289          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22290          if test "x$FOUND_CORRECT_VERSION" = x; then
22291            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22292$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22293            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22294$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22295            BOOT_JDK_FOUND=no
22296          else
22297            # We're done! :-)
22298            BOOT_JDK_FOUND=yes
22299
22300  # Only process if variable expands to non-empty
22301
22302  if test "x$BOOT_JDK" != x; then
22303    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22304
22305  # Input might be given as Windows format, start by converting to
22306  # unix format.
22307  path="$BOOT_JDK"
22308  new_path=`$CYGPATH -u "$path"`
22309
22310  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22311  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22312  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22313  # "foo.exe" is OK but "foo" is an error.
22314  #
22315  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22316  # It is also a way to make sure we got the proper file name for the real test later on.
22317  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22318  if test "x$test_shortpath" = x; then
22319    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22320$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22321    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22322  fi
22323
22324  # Call helper function which possibly converts this using DOS-style short mode.
22325  # If so, the updated path is stored in $new_path.
22326
22327  input_path="$new_path"
22328  # Check if we need to convert this using DOS-style short mode. If the path
22329  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22330  # take no chances and rewrite it.
22331  # Note: m4 eats our [], so we need to use [ and ] instead.
22332  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22333  if test "x$has_forbidden_chars" != x; then
22334    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22335    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22336    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22337    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22338      # Going to short mode and back again did indeed matter. Since short mode is
22339      # case insensitive, let's make it lowercase to improve readability.
22340      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22341      # Now convert it back to Unix-style (cygpath)
22342      input_path=`$CYGPATH -u "$shortmode_path"`
22343      new_path="$input_path"
22344    fi
22345  fi
22346
22347  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22348  if test "x$test_cygdrive_prefix" = x; then
22349    # As a simple fix, exclude /usr/bin since it's not a real path.
22350    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22351      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22352      # a path prefixed by /cygdrive for fixpath to work.
22353      new_path="$CYGWIN_ROOT_PATH$input_path"
22354    fi
22355  fi
22356
22357
22358  if test "x$path" != "x$new_path"; then
22359    BOOT_JDK="$new_path"
22360    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22361$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22362  fi
22363
22364    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22365
22366  path="$BOOT_JDK"
22367  has_colon=`$ECHO $path | $GREP ^.:`
22368  new_path="$path"
22369  if test "x$has_colon" = x; then
22370    # Not in mixed or Windows style, start by that.
22371    new_path=`cmd //c echo $path`
22372  fi
22373
22374
22375  input_path="$new_path"
22376  # Check if we need to convert this using DOS-style short mode. If the path
22377  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22378  # take no chances and rewrite it.
22379  # Note: m4 eats our [], so we need to use [ and ] instead.
22380  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22381  if test "x$has_forbidden_chars" != x; then
22382    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22383    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22384  fi
22385
22386
22387  windows_path="$new_path"
22388  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22389    unix_path=`$CYGPATH -u "$windows_path"`
22390    new_path="$unix_path"
22391  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22392    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22393    new_path="$unix_path"
22394  fi
22395
22396  if test "x$path" != "x$new_path"; then
22397    BOOT_JDK="$new_path"
22398    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22399$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22400  fi
22401
22402  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22403  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22404
22405    else
22406      # We're on a unix platform. Hooray! :)
22407      path="$BOOT_JDK"
22408      has_space=`$ECHO "$path" | $GREP " "`
22409      if test "x$has_space" != x; then
22410        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22411$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22412        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22413      fi
22414
22415      # Use eval to expand a potential ~
22416      eval path="$path"
22417      if test ! -f "$path" && test ! -d "$path"; then
22418        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22419      fi
22420
22421      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22422    fi
22423  fi
22424
22425            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22426$as_echo_n "checking for Boot JDK... " >&6; }
22427            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22428$as_echo "$BOOT_JDK" >&6; }
22429            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22430$as_echo_n "checking Boot JDK version... " >&6; }
22431            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22432            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22433$as_echo "$BOOT_JDK_VERSION" >&6; }
22434          fi # end check jdk version
22435        fi # end check javac
22436      fi # end check java
22437    fi # end check boot jdk found
22438  fi
22439
22440
22441  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
22442
22443  if test "x$BOOT_JDK_FOUND" = xno; then
22444    # Now execute the test
22445
22446  # Extract the first word of "javac", so it can be a program name with args.
22447set dummy javac; ac_word=$2
22448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22449$as_echo_n "checking for $ac_word... " >&6; }
22450if ${ac_cv_path_JAVAC_CHECK+:} false; then :
22451  $as_echo_n "(cached) " >&6
22452else
22453  case $JAVAC_CHECK in
22454  [\\/]* | ?:[\\/]*)
22455  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
22456  ;;
22457  *)
22458  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22459for as_dir in $PATH
22460do
22461  IFS=$as_save_IFS
22462  test -z "$as_dir" && as_dir=.
22463    for ac_exec_ext in '' $ac_executable_extensions; do
22464  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22465    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
22466    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22467    break 2
22468  fi
22469done
22470  done
22471IFS=$as_save_IFS
22472
22473  ;;
22474esac
22475fi
22476JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
22477if test -n "$JAVAC_CHECK"; then
22478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
22479$as_echo "$JAVAC_CHECK" >&6; }
22480else
22481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22482$as_echo "no" >&6; }
22483fi
22484
22485
22486  # Extract the first word of "java", so it can be a program name with args.
22487set dummy java; ac_word=$2
22488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22489$as_echo_n "checking for $ac_word... " >&6; }
22490if ${ac_cv_path_JAVA_CHECK+:} false; then :
22491  $as_echo_n "(cached) " >&6
22492else
22493  case $JAVA_CHECK in
22494  [\\/]* | ?:[\\/]*)
22495  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
22496  ;;
22497  *)
22498  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22499for as_dir in $PATH
22500do
22501  IFS=$as_save_IFS
22502  test -z "$as_dir" && as_dir=.
22503    for ac_exec_ext in '' $ac_executable_extensions; do
22504  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22505    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
22506    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22507    break 2
22508  fi
22509done
22510  done
22511IFS=$as_save_IFS
22512
22513  ;;
22514esac
22515fi
22516JAVA_CHECK=$ac_cv_path_JAVA_CHECK
22517if test -n "$JAVA_CHECK"; then
22518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
22519$as_echo "$JAVA_CHECK" >&6; }
22520else
22521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22522$as_echo "no" >&6; }
22523fi
22524
22525
22526  BINARY="$JAVAC_CHECK"
22527  if test "x$JAVAC_CHECK" = x; then
22528    BINARY="$JAVA_CHECK"
22529  fi
22530  if test "x$BINARY" != x; then
22531    # So there is a java(c) binary, it might be part of a JDK.
22532    # Lets find the JDK/JRE directory by following symbolic links.
22533    # Linux/GNU systems often have links from /usr/bin/java to
22534    # /etc/alternatives/java to the real JDK binary.
22535
22536  if test "x$OPENJDK_BUILD_OS" != xwindows; then
22537    # Follow a chain of symbolic links. Use readlink
22538    # where it exists, else fall back to horribly
22539    # complicated shell code.
22540    if test "x$READLINK_TESTED" != yes; then
22541      # On MacOSX there is a readlink tool with a different
22542      # purpose than the GNU readlink tool. Check the found readlink.
22543      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
22544      if test "x$ISGNU" = x; then
22545        # A readlink that we do not know how to use.
22546        # Are there other non-GNU readlinks out there?
22547        READLINK_TESTED=yes
22548        READLINK=
22549      fi
22550    fi
22551
22552    if test "x$READLINK" != x; then
22553      BINARY=`$READLINK -f $BINARY`
22554    else
22555      # Save the current directory for restoring afterwards
22556      STARTDIR=$PWD
22557      COUNTER=0
22558      sym_link_dir=`$DIRNAME $BINARY`
22559      sym_link_file=`$BASENAME $BINARY`
22560      cd $sym_link_dir
22561      # Use -P flag to resolve symlinks in directories.
22562      cd `$THEPWDCMD -P`
22563      sym_link_dir=`$THEPWDCMD -P`
22564      # Resolve file symlinks
22565      while test $COUNTER -lt 20; do
22566        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
22567        if test "x$ISLINK" == x; then
22568          # This is not a symbolic link! We are done!
22569          break
22570        fi
22571        # Again resolve directory symlinks since the target of the just found
22572        # link could be in a different directory
22573        cd `$DIRNAME $ISLINK`
22574        sym_link_dir=`$THEPWDCMD -P`
22575        sym_link_file=`$BASENAME $ISLINK`
22576        let COUNTER=COUNTER+1
22577      done
22578      cd $STARTDIR
22579      BINARY=$sym_link_dir/$sym_link_file
22580    fi
22581  fi
22582
22583    BOOT_JDK=`dirname "$BINARY"`
22584    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
22585    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
22586      # Looks like we found ourselves an JDK
22587      BOOT_JDK_FOUND=maybe
22588      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
22589$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
22590    fi
22591  fi
22592
22593
22594    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22595    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22596      # Do we have a bin/java?
22597      if test ! -x "$BOOT_JDK/bin/java"; then
22598        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22599$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22600        BOOT_JDK_FOUND=no
22601      else
22602        # Do we have a bin/javac?
22603        if test ! -x "$BOOT_JDK/bin/javac"; then
22604          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22605$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22606          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22607$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22608          BOOT_JDK_FOUND=no
22609        else
22610          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22611          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22612
22613          # Extra M4 quote needed to protect [] in grep expression.
22614          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22615          if test "x$FOUND_CORRECT_VERSION" = x; then
22616            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22617$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22618            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22619$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22620            BOOT_JDK_FOUND=no
22621          else
22622            # We're done! :-)
22623            BOOT_JDK_FOUND=yes
22624
22625  # Only process if variable expands to non-empty
22626
22627  if test "x$BOOT_JDK" != x; then
22628    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22629
22630  # Input might be given as Windows format, start by converting to
22631  # unix format.
22632  path="$BOOT_JDK"
22633  new_path=`$CYGPATH -u "$path"`
22634
22635  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22636  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22637  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22638  # "foo.exe" is OK but "foo" is an error.
22639  #
22640  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22641  # It is also a way to make sure we got the proper file name for the real test later on.
22642  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22643  if test "x$test_shortpath" = x; then
22644    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22645$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22646    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22647  fi
22648
22649  # Call helper function which possibly converts this using DOS-style short mode.
22650  # If so, the updated path is stored in $new_path.
22651
22652  input_path="$new_path"
22653  # Check if we need to convert this using DOS-style short mode. If the path
22654  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22655  # take no chances and rewrite it.
22656  # Note: m4 eats our [], so we need to use [ and ] instead.
22657  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22658  if test "x$has_forbidden_chars" != x; then
22659    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22660    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22661    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22662    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22663      # Going to short mode and back again did indeed matter. Since short mode is
22664      # case insensitive, let's make it lowercase to improve readability.
22665      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22666      # Now convert it back to Unix-style (cygpath)
22667      input_path=`$CYGPATH -u "$shortmode_path"`
22668      new_path="$input_path"
22669    fi
22670  fi
22671
22672  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22673  if test "x$test_cygdrive_prefix" = x; then
22674    # As a simple fix, exclude /usr/bin since it's not a real path.
22675    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22676      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22677      # a path prefixed by /cygdrive for fixpath to work.
22678      new_path="$CYGWIN_ROOT_PATH$input_path"
22679    fi
22680  fi
22681
22682
22683  if test "x$path" != "x$new_path"; then
22684    BOOT_JDK="$new_path"
22685    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22686$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22687  fi
22688
22689    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22690
22691  path="$BOOT_JDK"
22692  has_colon=`$ECHO $path | $GREP ^.:`
22693  new_path="$path"
22694  if test "x$has_colon" = x; then
22695    # Not in mixed or Windows style, start by that.
22696    new_path=`cmd //c echo $path`
22697  fi
22698
22699
22700  input_path="$new_path"
22701  # Check if we need to convert this using DOS-style short mode. If the path
22702  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22703  # take no chances and rewrite it.
22704  # Note: m4 eats our [], so we need to use [ and ] instead.
22705  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22706  if test "x$has_forbidden_chars" != x; then
22707    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22708    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22709  fi
22710
22711
22712  windows_path="$new_path"
22713  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22714    unix_path=`$CYGPATH -u "$windows_path"`
22715    new_path="$unix_path"
22716  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22717    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22718    new_path="$unix_path"
22719  fi
22720
22721  if test "x$path" != "x$new_path"; then
22722    BOOT_JDK="$new_path"
22723    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22724$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22725  fi
22726
22727  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22728  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22729
22730    else
22731      # We're on a unix platform. Hooray! :)
22732      path="$BOOT_JDK"
22733      has_space=`$ECHO "$path" | $GREP " "`
22734      if test "x$has_space" != x; then
22735        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22736$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22737        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22738      fi
22739
22740      # Use eval to expand a potential ~
22741      eval path="$path"
22742      if test ! -f "$path" && test ! -d "$path"; then
22743        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22744      fi
22745
22746      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22747    fi
22748  fi
22749
22750            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22751$as_echo_n "checking for Boot JDK... " >&6; }
22752            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22753$as_echo "$BOOT_JDK" >&6; }
22754            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22755$as_echo_n "checking Boot JDK version... " >&6; }
22756            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22757            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22758$as_echo "$BOOT_JDK_VERSION" >&6; }
22759          fi # end check jdk version
22760        fi # end check javac
22761      fi # end check java
22762    fi # end check boot jdk found
22763  fi
22764
22765
22766  # Test: Is there a JDK installed in default, well-known locations?
22767
22768  if test "x$BOOT_JDK_FOUND" = xno; then
22769    # Now execute the test
22770
22771  if test "x$OPENJDK_TARGET_OS" = xwindows; then
22772
22773  if test "x$BOOT_JDK_FOUND" = xno; then
22774    # Now execute the test
22775
22776  if test "x$ProgramW6432" != x; then
22777    VIRTUAL_DIR="$ProgramW6432/Java"
22778
22779  windows_path="$VIRTUAL_DIR"
22780  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22781    unix_path=`$CYGPATH -u "$windows_path"`
22782    VIRTUAL_DIR="$unix_path"
22783  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22784    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22785    VIRTUAL_DIR="$unix_path"
22786  fi
22787
22788
22789  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22790  BOOT_JDK_SUFFIX=""
22791  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22792  if test "x$ALL_JDKS_FOUND" != x; then
22793    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22794
22795  if test "x$BOOT_JDK_FOUND" = xno; then
22796    # Now execute the test
22797
22798        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22799        if test -d "$BOOT_JDK"; then
22800          BOOT_JDK_FOUND=maybe
22801          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22802$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22803        fi
22804
22805
22806    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22807    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22808      # Do we have a bin/java?
22809      if test ! -x "$BOOT_JDK/bin/java"; then
22810        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22811$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22812        BOOT_JDK_FOUND=no
22813      else
22814        # Do we have a bin/javac?
22815        if test ! -x "$BOOT_JDK/bin/javac"; then
22816          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22817$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22818          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22819$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22820          BOOT_JDK_FOUND=no
22821        else
22822          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22823          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22824
22825          # Extra M4 quote needed to protect [] in grep expression.
22826          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22827          if test "x$FOUND_CORRECT_VERSION" = x; then
22828            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22829$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22830            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22831$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22832            BOOT_JDK_FOUND=no
22833          else
22834            # We're done! :-)
22835            BOOT_JDK_FOUND=yes
22836
22837  # Only process if variable expands to non-empty
22838
22839  if test "x$BOOT_JDK" != x; then
22840    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22841
22842  # Input might be given as Windows format, start by converting to
22843  # unix format.
22844  path="$BOOT_JDK"
22845  new_path=`$CYGPATH -u "$path"`
22846
22847  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22848  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22849  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22850  # "foo.exe" is OK but "foo" is an error.
22851  #
22852  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22853  # It is also a way to make sure we got the proper file name for the real test later on.
22854  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22855  if test "x$test_shortpath" = x; then
22856    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22857$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22858    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22859  fi
22860
22861  # Call helper function which possibly converts this using DOS-style short mode.
22862  # If so, the updated path is stored in $new_path.
22863
22864  input_path="$new_path"
22865  # Check if we need to convert this using DOS-style short mode. If the path
22866  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22867  # take no chances and rewrite it.
22868  # Note: m4 eats our [], so we need to use [ and ] instead.
22869  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22870  if test "x$has_forbidden_chars" != x; then
22871    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22872    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22873    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22874    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22875      # Going to short mode and back again did indeed matter. Since short mode is
22876      # case insensitive, let's make it lowercase to improve readability.
22877      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22878      # Now convert it back to Unix-style (cygpath)
22879      input_path=`$CYGPATH -u "$shortmode_path"`
22880      new_path="$input_path"
22881    fi
22882  fi
22883
22884  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22885  if test "x$test_cygdrive_prefix" = x; then
22886    # As a simple fix, exclude /usr/bin since it's not a real path.
22887    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22888      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22889      # a path prefixed by /cygdrive for fixpath to work.
22890      new_path="$CYGWIN_ROOT_PATH$input_path"
22891    fi
22892  fi
22893
22894
22895  if test "x$path" != "x$new_path"; then
22896    BOOT_JDK="$new_path"
22897    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22898$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22899  fi
22900
22901    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22902
22903  path="$BOOT_JDK"
22904  has_colon=`$ECHO $path | $GREP ^.:`
22905  new_path="$path"
22906  if test "x$has_colon" = x; then
22907    # Not in mixed or Windows style, start by that.
22908    new_path=`cmd //c echo $path`
22909  fi
22910
22911
22912  input_path="$new_path"
22913  # Check if we need to convert this using DOS-style short mode. If the path
22914  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22915  # take no chances and rewrite it.
22916  # Note: m4 eats our [], so we need to use [ and ] instead.
22917  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22918  if test "x$has_forbidden_chars" != x; then
22919    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22920    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22921  fi
22922
22923
22924  windows_path="$new_path"
22925  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22926    unix_path=`$CYGPATH -u "$windows_path"`
22927    new_path="$unix_path"
22928  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22929    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22930    new_path="$unix_path"
22931  fi
22932
22933  if test "x$path" != "x$new_path"; then
22934    BOOT_JDK="$new_path"
22935    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22936$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22937  fi
22938
22939  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22940  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22941
22942    else
22943      # We're on a unix platform. Hooray! :)
22944      path="$BOOT_JDK"
22945      has_space=`$ECHO "$path" | $GREP " "`
22946      if test "x$has_space" != x; then
22947        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22948$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22949        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22950      fi
22951
22952      # Use eval to expand a potential ~
22953      eval path="$path"
22954      if test ! -f "$path" && test ! -d "$path"; then
22955        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22956      fi
22957
22958      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22959    fi
22960  fi
22961
22962            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22963$as_echo_n "checking for Boot JDK... " >&6; }
22964            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22965$as_echo "$BOOT_JDK" >&6; }
22966            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22967$as_echo_n "checking Boot JDK version... " >&6; }
22968            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22969            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22970$as_echo "$BOOT_JDK_VERSION" >&6; }
22971          fi # end check jdk version
22972        fi # end check javac
22973      fi # end check java
22974    fi # end check boot jdk found
22975  fi
22976
22977    done
22978  fi
22979
22980  fi
22981
22982
22983    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22984    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22985      # Do we have a bin/java?
22986      if test ! -x "$BOOT_JDK/bin/java"; then
22987        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22988$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22989        BOOT_JDK_FOUND=no
22990      else
22991        # Do we have a bin/javac?
22992        if test ! -x "$BOOT_JDK/bin/javac"; then
22993          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22994$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22995          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22996$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22997          BOOT_JDK_FOUND=no
22998        else
22999          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23000          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23001
23002          # Extra M4 quote needed to protect [] in grep expression.
23003          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23004          if test "x$FOUND_CORRECT_VERSION" = x; then
23005            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23006$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23007            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23008$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23009            BOOT_JDK_FOUND=no
23010          else
23011            # We're done! :-)
23012            BOOT_JDK_FOUND=yes
23013
23014  # Only process if variable expands to non-empty
23015
23016  if test "x$BOOT_JDK" != x; then
23017    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23018
23019  # Input might be given as Windows format, start by converting to
23020  # unix format.
23021  path="$BOOT_JDK"
23022  new_path=`$CYGPATH -u "$path"`
23023
23024  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23025  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23026  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23027  # "foo.exe" is OK but "foo" is an error.
23028  #
23029  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23030  # It is also a way to make sure we got the proper file name for the real test later on.
23031  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23032  if test "x$test_shortpath" = x; then
23033    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23034$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23035    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23036  fi
23037
23038  # Call helper function which possibly converts this using DOS-style short mode.
23039  # If so, the updated path is stored in $new_path.
23040
23041  input_path="$new_path"
23042  # Check if we need to convert this using DOS-style short mode. If the path
23043  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23044  # take no chances and rewrite it.
23045  # Note: m4 eats our [], so we need to use [ and ] instead.
23046  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23047  if test "x$has_forbidden_chars" != x; then
23048    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23049    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23050    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23051    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23052      # Going to short mode and back again did indeed matter. Since short mode is
23053      # case insensitive, let's make it lowercase to improve readability.
23054      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23055      # Now convert it back to Unix-style (cygpath)
23056      input_path=`$CYGPATH -u "$shortmode_path"`
23057      new_path="$input_path"
23058    fi
23059  fi
23060
23061  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23062  if test "x$test_cygdrive_prefix" = x; then
23063    # As a simple fix, exclude /usr/bin since it's not a real path.
23064    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23065      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23066      # a path prefixed by /cygdrive for fixpath to work.
23067      new_path="$CYGWIN_ROOT_PATH$input_path"
23068    fi
23069  fi
23070
23071
23072  if test "x$path" != "x$new_path"; then
23073    BOOT_JDK="$new_path"
23074    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23075$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23076  fi
23077
23078    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23079
23080  path="$BOOT_JDK"
23081  has_colon=`$ECHO $path | $GREP ^.:`
23082  new_path="$path"
23083  if test "x$has_colon" = x; then
23084    # Not in mixed or Windows style, start by that.
23085    new_path=`cmd //c echo $path`
23086  fi
23087
23088
23089  input_path="$new_path"
23090  # Check if we need to convert this using DOS-style short mode. If the path
23091  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23092  # take no chances and rewrite it.
23093  # Note: m4 eats our [], so we need to use [ and ] instead.
23094  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23095  if test "x$has_forbidden_chars" != x; then
23096    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23097    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23098  fi
23099
23100
23101  windows_path="$new_path"
23102  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23103    unix_path=`$CYGPATH -u "$windows_path"`
23104    new_path="$unix_path"
23105  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23106    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23107    new_path="$unix_path"
23108  fi
23109
23110  if test "x$path" != "x$new_path"; then
23111    BOOT_JDK="$new_path"
23112    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23113$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23114  fi
23115
23116  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23117  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23118
23119    else
23120      # We're on a unix platform. Hooray! :)
23121      path="$BOOT_JDK"
23122      has_space=`$ECHO "$path" | $GREP " "`
23123      if test "x$has_space" != x; then
23124        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23125$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23126        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23127      fi
23128
23129      # Use eval to expand a potential ~
23130      eval path="$path"
23131      if test ! -f "$path" && test ! -d "$path"; then
23132        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23133      fi
23134
23135      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23136    fi
23137  fi
23138
23139            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23140$as_echo_n "checking for Boot JDK... " >&6; }
23141            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23142$as_echo "$BOOT_JDK" >&6; }
23143            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23144$as_echo_n "checking Boot JDK version... " >&6; }
23145            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23146            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23147$as_echo "$BOOT_JDK_VERSION" >&6; }
23148          fi # end check jdk version
23149        fi # end check javac
23150      fi # end check java
23151    fi # end check boot jdk found
23152  fi
23153
23154
23155  if test "x$BOOT_JDK_FOUND" = xno; then
23156    # Now execute the test
23157
23158  if test "x$PROGRAMW6432" != x; then
23159    VIRTUAL_DIR="$PROGRAMW6432/Java"
23160
23161  windows_path="$VIRTUAL_DIR"
23162  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23163    unix_path=`$CYGPATH -u "$windows_path"`
23164    VIRTUAL_DIR="$unix_path"
23165  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23166    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23167    VIRTUAL_DIR="$unix_path"
23168  fi
23169
23170
23171  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23172  BOOT_JDK_SUFFIX=""
23173  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23174  if test "x$ALL_JDKS_FOUND" != x; then
23175    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23176
23177  if test "x$BOOT_JDK_FOUND" = xno; then
23178    # Now execute the test
23179
23180        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23181        if test -d "$BOOT_JDK"; then
23182          BOOT_JDK_FOUND=maybe
23183          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23184$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23185        fi
23186
23187
23188    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23189    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23190      # Do we have a bin/java?
23191      if test ! -x "$BOOT_JDK/bin/java"; then
23192        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23193$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23194        BOOT_JDK_FOUND=no
23195      else
23196        # Do we have a bin/javac?
23197        if test ! -x "$BOOT_JDK/bin/javac"; then
23198          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23199$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23200          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23201$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23202          BOOT_JDK_FOUND=no
23203        else
23204          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23205          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23206
23207          # Extra M4 quote needed to protect [] in grep expression.
23208          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23209          if test "x$FOUND_CORRECT_VERSION" = x; then
23210            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23211$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23212            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23213$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23214            BOOT_JDK_FOUND=no
23215          else
23216            # We're done! :-)
23217            BOOT_JDK_FOUND=yes
23218
23219  # Only process if variable expands to non-empty
23220
23221  if test "x$BOOT_JDK" != x; then
23222    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23223
23224  # Input might be given as Windows format, start by converting to
23225  # unix format.
23226  path="$BOOT_JDK"
23227  new_path=`$CYGPATH -u "$path"`
23228
23229  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23230  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23231  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23232  # "foo.exe" is OK but "foo" is an error.
23233  #
23234  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23235  # It is also a way to make sure we got the proper file name for the real test later on.
23236  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23237  if test "x$test_shortpath" = x; then
23238    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23239$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23240    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23241  fi
23242
23243  # Call helper function which possibly converts this using DOS-style short mode.
23244  # If so, the updated path is stored in $new_path.
23245
23246  input_path="$new_path"
23247  # Check if we need to convert this using DOS-style short mode. If the path
23248  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23249  # take no chances and rewrite it.
23250  # Note: m4 eats our [], so we need to use [ and ] instead.
23251  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23252  if test "x$has_forbidden_chars" != x; then
23253    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23254    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23255    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23256    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23257      # Going to short mode and back again did indeed matter. Since short mode is
23258      # case insensitive, let's make it lowercase to improve readability.
23259      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23260      # Now convert it back to Unix-style (cygpath)
23261      input_path=`$CYGPATH -u "$shortmode_path"`
23262      new_path="$input_path"
23263    fi
23264  fi
23265
23266  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23267  if test "x$test_cygdrive_prefix" = x; then
23268    # As a simple fix, exclude /usr/bin since it's not a real path.
23269    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23270      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23271      # a path prefixed by /cygdrive for fixpath to work.
23272      new_path="$CYGWIN_ROOT_PATH$input_path"
23273    fi
23274  fi
23275
23276
23277  if test "x$path" != "x$new_path"; then
23278    BOOT_JDK="$new_path"
23279    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23280$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23281  fi
23282
23283    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23284
23285  path="$BOOT_JDK"
23286  has_colon=`$ECHO $path | $GREP ^.:`
23287  new_path="$path"
23288  if test "x$has_colon" = x; then
23289    # Not in mixed or Windows style, start by that.
23290    new_path=`cmd //c echo $path`
23291  fi
23292
23293
23294  input_path="$new_path"
23295  # Check if we need to convert this using DOS-style short mode. If the path
23296  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23297  # take no chances and rewrite it.
23298  # Note: m4 eats our [], so we need to use [ and ] instead.
23299  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23300  if test "x$has_forbidden_chars" != x; then
23301    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23302    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23303  fi
23304
23305
23306  windows_path="$new_path"
23307  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23308    unix_path=`$CYGPATH -u "$windows_path"`
23309    new_path="$unix_path"
23310  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23311    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23312    new_path="$unix_path"
23313  fi
23314
23315  if test "x$path" != "x$new_path"; then
23316    BOOT_JDK="$new_path"
23317    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23318$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23319  fi
23320
23321  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23322  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23323
23324    else
23325      # We're on a unix platform. Hooray! :)
23326      path="$BOOT_JDK"
23327      has_space=`$ECHO "$path" | $GREP " "`
23328      if test "x$has_space" != x; then
23329        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23330$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23331        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23332      fi
23333
23334      # Use eval to expand a potential ~
23335      eval path="$path"
23336      if test ! -f "$path" && test ! -d "$path"; then
23337        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23338      fi
23339
23340      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23341    fi
23342  fi
23343
23344            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23345$as_echo_n "checking for Boot JDK... " >&6; }
23346            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23347$as_echo "$BOOT_JDK" >&6; }
23348            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23349$as_echo_n "checking Boot JDK version... " >&6; }
23350            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23351            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23352$as_echo "$BOOT_JDK_VERSION" >&6; }
23353          fi # end check jdk version
23354        fi # end check javac
23355      fi # end check java
23356    fi # end check boot jdk found
23357  fi
23358
23359    done
23360  fi
23361
23362  fi
23363
23364
23365    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23366    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23367      # Do we have a bin/java?
23368      if test ! -x "$BOOT_JDK/bin/java"; then
23369        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23370$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23371        BOOT_JDK_FOUND=no
23372      else
23373        # Do we have a bin/javac?
23374        if test ! -x "$BOOT_JDK/bin/javac"; then
23375          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23376$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23377          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23378$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23379          BOOT_JDK_FOUND=no
23380        else
23381          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23382          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23383
23384          # Extra M4 quote needed to protect [] in grep expression.
23385          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23386          if test "x$FOUND_CORRECT_VERSION" = x; then
23387            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23388$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23389            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23390$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23391            BOOT_JDK_FOUND=no
23392          else
23393            # We're done! :-)
23394            BOOT_JDK_FOUND=yes
23395
23396  # Only process if variable expands to non-empty
23397
23398  if test "x$BOOT_JDK" != x; then
23399    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23400
23401  # Input might be given as Windows format, start by converting to
23402  # unix format.
23403  path="$BOOT_JDK"
23404  new_path=`$CYGPATH -u "$path"`
23405
23406  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23407  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23408  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23409  # "foo.exe" is OK but "foo" is an error.
23410  #
23411  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23412  # It is also a way to make sure we got the proper file name for the real test later on.
23413  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23414  if test "x$test_shortpath" = x; then
23415    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23416$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23417    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23418  fi
23419
23420  # Call helper function which possibly converts this using DOS-style short mode.
23421  # If so, the updated path is stored in $new_path.
23422
23423  input_path="$new_path"
23424  # Check if we need to convert this using DOS-style short mode. If the path
23425  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23426  # take no chances and rewrite it.
23427  # Note: m4 eats our [], so we need to use [ and ] instead.
23428  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23429  if test "x$has_forbidden_chars" != x; then
23430    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23431    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23432    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23433    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23434      # Going to short mode and back again did indeed matter. Since short mode is
23435      # case insensitive, let's make it lowercase to improve readability.
23436      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23437      # Now convert it back to Unix-style (cygpath)
23438      input_path=`$CYGPATH -u "$shortmode_path"`
23439      new_path="$input_path"
23440    fi
23441  fi
23442
23443  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23444  if test "x$test_cygdrive_prefix" = x; then
23445    # As a simple fix, exclude /usr/bin since it's not a real path.
23446    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23447      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23448      # a path prefixed by /cygdrive for fixpath to work.
23449      new_path="$CYGWIN_ROOT_PATH$input_path"
23450    fi
23451  fi
23452
23453
23454  if test "x$path" != "x$new_path"; then
23455    BOOT_JDK="$new_path"
23456    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23457$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23458  fi
23459
23460    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23461
23462  path="$BOOT_JDK"
23463  has_colon=`$ECHO $path | $GREP ^.:`
23464  new_path="$path"
23465  if test "x$has_colon" = x; then
23466    # Not in mixed or Windows style, start by that.
23467    new_path=`cmd //c echo $path`
23468  fi
23469
23470
23471  input_path="$new_path"
23472  # Check if we need to convert this using DOS-style short mode. If the path
23473  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23474  # take no chances and rewrite it.
23475  # Note: m4 eats our [], so we need to use [ and ] instead.
23476  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23477  if test "x$has_forbidden_chars" != x; then
23478    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23479    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23480  fi
23481
23482
23483  windows_path="$new_path"
23484  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23485    unix_path=`$CYGPATH -u "$windows_path"`
23486    new_path="$unix_path"
23487  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23488    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23489    new_path="$unix_path"
23490  fi
23491
23492  if test "x$path" != "x$new_path"; then
23493    BOOT_JDK="$new_path"
23494    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23495$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23496  fi
23497
23498  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23499  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23500
23501    else
23502      # We're on a unix platform. Hooray! :)
23503      path="$BOOT_JDK"
23504      has_space=`$ECHO "$path" | $GREP " "`
23505      if test "x$has_space" != x; then
23506        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23507$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23508        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23509      fi
23510
23511      # Use eval to expand a potential ~
23512      eval path="$path"
23513      if test ! -f "$path" && test ! -d "$path"; then
23514        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23515      fi
23516
23517      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23518    fi
23519  fi
23520
23521            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23522$as_echo_n "checking for Boot JDK... " >&6; }
23523            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23524$as_echo "$BOOT_JDK" >&6; }
23525            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23526$as_echo_n "checking Boot JDK version... " >&6; }
23527            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23528            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23529$as_echo "$BOOT_JDK_VERSION" >&6; }
23530          fi # end check jdk version
23531        fi # end check javac
23532      fi # end check java
23533    fi # end check boot jdk found
23534  fi
23535
23536
23537  if test "x$BOOT_JDK_FOUND" = xno; then
23538    # Now execute the test
23539
23540  if test "x$PROGRAMFILES" != x; then
23541    VIRTUAL_DIR="$PROGRAMFILES/Java"
23542
23543  windows_path="$VIRTUAL_DIR"
23544  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23545    unix_path=`$CYGPATH -u "$windows_path"`
23546    VIRTUAL_DIR="$unix_path"
23547  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23548    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23549    VIRTUAL_DIR="$unix_path"
23550  fi
23551
23552
23553  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23554  BOOT_JDK_SUFFIX=""
23555  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23556  if test "x$ALL_JDKS_FOUND" != x; then
23557    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23558
23559  if test "x$BOOT_JDK_FOUND" = xno; then
23560    # Now execute the test
23561
23562        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23563        if test -d "$BOOT_JDK"; then
23564          BOOT_JDK_FOUND=maybe
23565          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23566$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23567        fi
23568
23569
23570    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23571    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23572      # Do we have a bin/java?
23573      if test ! -x "$BOOT_JDK/bin/java"; then
23574        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23575$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23576        BOOT_JDK_FOUND=no
23577      else
23578        # Do we have a bin/javac?
23579        if test ! -x "$BOOT_JDK/bin/javac"; then
23580          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23581$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23582          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23583$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23584          BOOT_JDK_FOUND=no
23585        else
23586          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23587          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23588
23589          # Extra M4 quote needed to protect [] in grep expression.
23590          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23591          if test "x$FOUND_CORRECT_VERSION" = x; then
23592            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23593$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23594            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23595$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23596            BOOT_JDK_FOUND=no
23597          else
23598            # We're done! :-)
23599            BOOT_JDK_FOUND=yes
23600
23601  # Only process if variable expands to non-empty
23602
23603  if test "x$BOOT_JDK" != x; then
23604    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23605
23606  # Input might be given as Windows format, start by converting to
23607  # unix format.
23608  path="$BOOT_JDK"
23609  new_path=`$CYGPATH -u "$path"`
23610
23611  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23612  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23613  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23614  # "foo.exe" is OK but "foo" is an error.
23615  #
23616  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23617  # It is also a way to make sure we got the proper file name for the real test later on.
23618  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23619  if test "x$test_shortpath" = x; then
23620    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23621$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23622    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23623  fi
23624
23625  # Call helper function which possibly converts this using DOS-style short mode.
23626  # If so, the updated path is stored in $new_path.
23627
23628  input_path="$new_path"
23629  # Check if we need to convert this using DOS-style short mode. If the path
23630  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23631  # take no chances and rewrite it.
23632  # Note: m4 eats our [], so we need to use [ and ] instead.
23633  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23634  if test "x$has_forbidden_chars" != x; then
23635    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23636    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23637    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23638    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23639      # Going to short mode and back again did indeed matter. Since short mode is
23640      # case insensitive, let's make it lowercase to improve readability.
23641      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23642      # Now convert it back to Unix-style (cygpath)
23643      input_path=`$CYGPATH -u "$shortmode_path"`
23644      new_path="$input_path"
23645    fi
23646  fi
23647
23648  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23649  if test "x$test_cygdrive_prefix" = x; then
23650    # As a simple fix, exclude /usr/bin since it's not a real path.
23651    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23652      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23653      # a path prefixed by /cygdrive for fixpath to work.
23654      new_path="$CYGWIN_ROOT_PATH$input_path"
23655    fi
23656  fi
23657
23658
23659  if test "x$path" != "x$new_path"; then
23660    BOOT_JDK="$new_path"
23661    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23662$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23663  fi
23664
23665    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23666
23667  path="$BOOT_JDK"
23668  has_colon=`$ECHO $path | $GREP ^.:`
23669  new_path="$path"
23670  if test "x$has_colon" = x; then
23671    # Not in mixed or Windows style, start by that.
23672    new_path=`cmd //c echo $path`
23673  fi
23674
23675
23676  input_path="$new_path"
23677  # Check if we need to convert this using DOS-style short mode. If the path
23678  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23679  # take no chances and rewrite it.
23680  # Note: m4 eats our [], so we need to use [ and ] instead.
23681  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23682  if test "x$has_forbidden_chars" != x; then
23683    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23684    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23685  fi
23686
23687
23688  windows_path="$new_path"
23689  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23690    unix_path=`$CYGPATH -u "$windows_path"`
23691    new_path="$unix_path"
23692  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23693    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23694    new_path="$unix_path"
23695  fi
23696
23697  if test "x$path" != "x$new_path"; then
23698    BOOT_JDK="$new_path"
23699    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23700$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23701  fi
23702
23703  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23704  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23705
23706    else
23707      # We're on a unix platform. Hooray! :)
23708      path="$BOOT_JDK"
23709      has_space=`$ECHO "$path" | $GREP " "`
23710      if test "x$has_space" != x; then
23711        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23712$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23713        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23714      fi
23715
23716      # Use eval to expand a potential ~
23717      eval path="$path"
23718      if test ! -f "$path" && test ! -d "$path"; then
23719        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23720      fi
23721
23722      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23723    fi
23724  fi
23725
23726            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23727$as_echo_n "checking for Boot JDK... " >&6; }
23728            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23729$as_echo "$BOOT_JDK" >&6; }
23730            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23731$as_echo_n "checking Boot JDK version... " >&6; }
23732            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23733            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23734$as_echo "$BOOT_JDK_VERSION" >&6; }
23735          fi # end check jdk version
23736        fi # end check javac
23737      fi # end check java
23738    fi # end check boot jdk found
23739  fi
23740
23741    done
23742  fi
23743
23744  fi
23745
23746
23747    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23748    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23749      # Do we have a bin/java?
23750      if test ! -x "$BOOT_JDK/bin/java"; then
23751        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23752$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23753        BOOT_JDK_FOUND=no
23754      else
23755        # Do we have a bin/javac?
23756        if test ! -x "$BOOT_JDK/bin/javac"; then
23757          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23758$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23759          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23760$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23761          BOOT_JDK_FOUND=no
23762        else
23763          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23764          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23765
23766          # Extra M4 quote needed to protect [] in grep expression.
23767          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23768          if test "x$FOUND_CORRECT_VERSION" = x; then
23769            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23770$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23771            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23772$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23773            BOOT_JDK_FOUND=no
23774          else
23775            # We're done! :-)
23776            BOOT_JDK_FOUND=yes
23777
23778  # Only process if variable expands to non-empty
23779
23780  if test "x$BOOT_JDK" != x; then
23781    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23782
23783  # Input might be given as Windows format, start by converting to
23784  # unix format.
23785  path="$BOOT_JDK"
23786  new_path=`$CYGPATH -u "$path"`
23787
23788  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23789  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23790  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23791  # "foo.exe" is OK but "foo" is an error.
23792  #
23793  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23794  # It is also a way to make sure we got the proper file name for the real test later on.
23795  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23796  if test "x$test_shortpath" = x; then
23797    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23798$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23799    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23800  fi
23801
23802  # Call helper function which possibly converts this using DOS-style short mode.
23803  # If so, the updated path is stored in $new_path.
23804
23805  input_path="$new_path"
23806  # Check if we need to convert this using DOS-style short mode. If the path
23807  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23808  # take no chances and rewrite it.
23809  # Note: m4 eats our [], so we need to use [ and ] instead.
23810  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23811  if test "x$has_forbidden_chars" != x; then
23812    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23813    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23814    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23815    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23816      # Going to short mode and back again did indeed matter. Since short mode is
23817      # case insensitive, let's make it lowercase to improve readability.
23818      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23819      # Now convert it back to Unix-style (cygpath)
23820      input_path=`$CYGPATH -u "$shortmode_path"`
23821      new_path="$input_path"
23822    fi
23823  fi
23824
23825  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23826  if test "x$test_cygdrive_prefix" = x; then
23827    # As a simple fix, exclude /usr/bin since it's not a real path.
23828    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23829      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23830      # a path prefixed by /cygdrive for fixpath to work.
23831      new_path="$CYGWIN_ROOT_PATH$input_path"
23832    fi
23833  fi
23834
23835
23836  if test "x$path" != "x$new_path"; then
23837    BOOT_JDK="$new_path"
23838    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23839$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23840  fi
23841
23842    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23843
23844  path="$BOOT_JDK"
23845  has_colon=`$ECHO $path | $GREP ^.:`
23846  new_path="$path"
23847  if test "x$has_colon" = x; then
23848    # Not in mixed or Windows style, start by that.
23849    new_path=`cmd //c echo $path`
23850  fi
23851
23852
23853  input_path="$new_path"
23854  # Check if we need to convert this using DOS-style short mode. If the path
23855  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23856  # take no chances and rewrite it.
23857  # Note: m4 eats our [], so we need to use [ and ] instead.
23858  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23859  if test "x$has_forbidden_chars" != x; then
23860    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23861    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23862  fi
23863
23864
23865  windows_path="$new_path"
23866  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23867    unix_path=`$CYGPATH -u "$windows_path"`
23868    new_path="$unix_path"
23869  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23870    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23871    new_path="$unix_path"
23872  fi
23873
23874  if test "x$path" != "x$new_path"; then
23875    BOOT_JDK="$new_path"
23876    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23877$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23878  fi
23879
23880  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23881  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23882
23883    else
23884      # We're on a unix platform. Hooray! :)
23885      path="$BOOT_JDK"
23886      has_space=`$ECHO "$path" | $GREP " "`
23887      if test "x$has_space" != x; then
23888        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23889$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23890        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23891      fi
23892
23893      # Use eval to expand a potential ~
23894      eval path="$path"
23895      if test ! -f "$path" && test ! -d "$path"; then
23896        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23897      fi
23898
23899      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23900    fi
23901  fi
23902
23903            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23904$as_echo_n "checking for Boot JDK... " >&6; }
23905            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23906$as_echo "$BOOT_JDK" >&6; }
23907            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23908$as_echo_n "checking Boot JDK version... " >&6; }
23909            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23910            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23911$as_echo "$BOOT_JDK_VERSION" >&6; }
23912          fi # end check jdk version
23913        fi # end check javac
23914      fi # end check java
23915    fi # end check boot jdk found
23916  fi
23917
23918
23919  if test "x$BOOT_JDK_FOUND" = xno; then
23920    # Now execute the test
23921
23922  if test "x$ProgramFiles" != x; then
23923    VIRTUAL_DIR="$ProgramFiles/Java"
23924
23925  windows_path="$VIRTUAL_DIR"
23926  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23927    unix_path=`$CYGPATH -u "$windows_path"`
23928    VIRTUAL_DIR="$unix_path"
23929  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23930    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23931    VIRTUAL_DIR="$unix_path"
23932  fi
23933
23934
23935  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23936  BOOT_JDK_SUFFIX=""
23937  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23938  if test "x$ALL_JDKS_FOUND" != x; then
23939    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23940
23941  if test "x$BOOT_JDK_FOUND" = xno; then
23942    # Now execute the test
23943
23944        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23945        if test -d "$BOOT_JDK"; then
23946          BOOT_JDK_FOUND=maybe
23947          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23948$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23949        fi
23950
23951
23952    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23953    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23954      # Do we have a bin/java?
23955      if test ! -x "$BOOT_JDK/bin/java"; then
23956        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23957$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23958        BOOT_JDK_FOUND=no
23959      else
23960        # Do we have a bin/javac?
23961        if test ! -x "$BOOT_JDK/bin/javac"; then
23962          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23963$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23964          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23965$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23966          BOOT_JDK_FOUND=no
23967        else
23968          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23969          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23970
23971          # Extra M4 quote needed to protect [] in grep expression.
23972          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23973          if test "x$FOUND_CORRECT_VERSION" = x; then
23974            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23975$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23976            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23977$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23978            BOOT_JDK_FOUND=no
23979          else
23980            # We're done! :-)
23981            BOOT_JDK_FOUND=yes
23982
23983  # Only process if variable expands to non-empty
23984
23985  if test "x$BOOT_JDK" != x; then
23986    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23987
23988  # Input might be given as Windows format, start by converting to
23989  # unix format.
23990  path="$BOOT_JDK"
23991  new_path=`$CYGPATH -u "$path"`
23992
23993  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23994  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23995  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23996  # "foo.exe" is OK but "foo" is an error.
23997  #
23998  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23999  # It is also a way to make sure we got the proper file name for the real test later on.
24000  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24001  if test "x$test_shortpath" = x; then
24002    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24003$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24004    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24005  fi
24006
24007  # Call helper function which possibly converts this using DOS-style short mode.
24008  # If so, the updated path is stored in $new_path.
24009
24010  input_path="$new_path"
24011  # Check if we need to convert this using DOS-style short mode. If the path
24012  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24013  # take no chances and rewrite it.
24014  # Note: m4 eats our [], so we need to use [ and ] instead.
24015  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24016  if test "x$has_forbidden_chars" != x; then
24017    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24018    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24019    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24020    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24021      # Going to short mode and back again did indeed matter. Since short mode is
24022      # case insensitive, let's make it lowercase to improve readability.
24023      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24024      # Now convert it back to Unix-style (cygpath)
24025      input_path=`$CYGPATH -u "$shortmode_path"`
24026      new_path="$input_path"
24027    fi
24028  fi
24029
24030  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24031  if test "x$test_cygdrive_prefix" = x; then
24032    # As a simple fix, exclude /usr/bin since it's not a real path.
24033    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24034      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24035      # a path prefixed by /cygdrive for fixpath to work.
24036      new_path="$CYGWIN_ROOT_PATH$input_path"
24037    fi
24038  fi
24039
24040
24041  if test "x$path" != "x$new_path"; then
24042    BOOT_JDK="$new_path"
24043    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24044$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24045  fi
24046
24047    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24048
24049  path="$BOOT_JDK"
24050  has_colon=`$ECHO $path | $GREP ^.:`
24051  new_path="$path"
24052  if test "x$has_colon" = x; then
24053    # Not in mixed or Windows style, start by that.
24054    new_path=`cmd //c echo $path`
24055  fi
24056
24057
24058  input_path="$new_path"
24059  # Check if we need to convert this using DOS-style short mode. If the path
24060  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24061  # take no chances and rewrite it.
24062  # Note: m4 eats our [], so we need to use [ and ] instead.
24063  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24064  if test "x$has_forbidden_chars" != x; then
24065    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24066    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24067  fi
24068
24069
24070  windows_path="$new_path"
24071  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24072    unix_path=`$CYGPATH -u "$windows_path"`
24073    new_path="$unix_path"
24074  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24075    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24076    new_path="$unix_path"
24077  fi
24078
24079  if test "x$path" != "x$new_path"; then
24080    BOOT_JDK="$new_path"
24081    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24082$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24083  fi
24084
24085  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24086  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24087
24088    else
24089      # We're on a unix platform. Hooray! :)
24090      path="$BOOT_JDK"
24091      has_space=`$ECHO "$path" | $GREP " "`
24092      if test "x$has_space" != x; then
24093        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24094$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24095        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24096      fi
24097
24098      # Use eval to expand a potential ~
24099      eval path="$path"
24100      if test ! -f "$path" && test ! -d "$path"; then
24101        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24102      fi
24103
24104      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24105    fi
24106  fi
24107
24108            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24109$as_echo_n "checking for Boot JDK... " >&6; }
24110            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24111$as_echo "$BOOT_JDK" >&6; }
24112            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24113$as_echo_n "checking Boot JDK version... " >&6; }
24114            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24115            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24116$as_echo "$BOOT_JDK_VERSION" >&6; }
24117          fi # end check jdk version
24118        fi # end check javac
24119      fi # end check java
24120    fi # end check boot jdk found
24121  fi
24122
24123    done
24124  fi
24125
24126  fi
24127
24128
24129    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24130    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24131      # Do we have a bin/java?
24132      if test ! -x "$BOOT_JDK/bin/java"; then
24133        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24134$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24135        BOOT_JDK_FOUND=no
24136      else
24137        # Do we have a bin/javac?
24138        if test ! -x "$BOOT_JDK/bin/javac"; then
24139          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24140$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24141          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24142$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24143          BOOT_JDK_FOUND=no
24144        else
24145          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24146          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24147
24148          # Extra M4 quote needed to protect [] in grep expression.
24149          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24150          if test "x$FOUND_CORRECT_VERSION" = x; then
24151            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24152$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24153            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24154$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24155            BOOT_JDK_FOUND=no
24156          else
24157            # We're done! :-)
24158            BOOT_JDK_FOUND=yes
24159
24160  # Only process if variable expands to non-empty
24161
24162  if test "x$BOOT_JDK" != x; then
24163    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24164
24165  # Input might be given as Windows format, start by converting to
24166  # unix format.
24167  path="$BOOT_JDK"
24168  new_path=`$CYGPATH -u "$path"`
24169
24170  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24171  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24172  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24173  # "foo.exe" is OK but "foo" is an error.
24174  #
24175  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24176  # It is also a way to make sure we got the proper file name for the real test later on.
24177  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24178  if test "x$test_shortpath" = x; then
24179    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24180$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24181    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24182  fi
24183
24184  # Call helper function which possibly converts this using DOS-style short mode.
24185  # If so, the updated path is stored in $new_path.
24186
24187  input_path="$new_path"
24188  # Check if we need to convert this using DOS-style short mode. If the path
24189  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24190  # take no chances and rewrite it.
24191  # Note: m4 eats our [], so we need to use [ and ] instead.
24192  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24193  if test "x$has_forbidden_chars" != x; then
24194    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24195    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24196    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24197    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24198      # Going to short mode and back again did indeed matter. Since short mode is
24199      # case insensitive, let's make it lowercase to improve readability.
24200      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24201      # Now convert it back to Unix-style (cygpath)
24202      input_path=`$CYGPATH -u "$shortmode_path"`
24203      new_path="$input_path"
24204    fi
24205  fi
24206
24207  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24208  if test "x$test_cygdrive_prefix" = x; then
24209    # As a simple fix, exclude /usr/bin since it's not a real path.
24210    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24211      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24212      # a path prefixed by /cygdrive for fixpath to work.
24213      new_path="$CYGWIN_ROOT_PATH$input_path"
24214    fi
24215  fi
24216
24217
24218  if test "x$path" != "x$new_path"; then
24219    BOOT_JDK="$new_path"
24220    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24221$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24222  fi
24223
24224    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24225
24226  path="$BOOT_JDK"
24227  has_colon=`$ECHO $path | $GREP ^.:`
24228  new_path="$path"
24229  if test "x$has_colon" = x; then
24230    # Not in mixed or Windows style, start by that.
24231    new_path=`cmd //c echo $path`
24232  fi
24233
24234
24235  input_path="$new_path"
24236  # Check if we need to convert this using DOS-style short mode. If the path
24237  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24238  # take no chances and rewrite it.
24239  # Note: m4 eats our [], so we need to use [ and ] instead.
24240  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24241  if test "x$has_forbidden_chars" != x; then
24242    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24243    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24244  fi
24245
24246
24247  windows_path="$new_path"
24248  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24249    unix_path=`$CYGPATH -u "$windows_path"`
24250    new_path="$unix_path"
24251  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24252    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24253    new_path="$unix_path"
24254  fi
24255
24256  if test "x$path" != "x$new_path"; then
24257    BOOT_JDK="$new_path"
24258    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24259$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24260  fi
24261
24262  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24263  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24264
24265    else
24266      # We're on a unix platform. Hooray! :)
24267      path="$BOOT_JDK"
24268      has_space=`$ECHO "$path" | $GREP " "`
24269      if test "x$has_space" != x; then
24270        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24271$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24272        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24273      fi
24274
24275      # Use eval to expand a potential ~
24276      eval path="$path"
24277      if test ! -f "$path" && test ! -d "$path"; then
24278        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24279      fi
24280
24281      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24282    fi
24283  fi
24284
24285            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24286$as_echo_n "checking for Boot JDK... " >&6; }
24287            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24288$as_echo "$BOOT_JDK" >&6; }
24289            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24290$as_echo_n "checking Boot JDK version... " >&6; }
24291            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24292            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24293$as_echo "$BOOT_JDK_VERSION" >&6; }
24294          fi # end check jdk version
24295        fi # end check javac
24296      fi # end check java
24297    fi # end check boot jdk found
24298  fi
24299
24300
24301  if test "x$BOOT_JDK_FOUND" = xno; then
24302    # Now execute the test
24303
24304  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
24305  BOOT_JDK_SUFFIX=""
24306  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24307  if test "x$ALL_JDKS_FOUND" != x; then
24308    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24309
24310  if test "x$BOOT_JDK_FOUND" = xno; then
24311    # Now execute the test
24312
24313        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24314        if test -d "$BOOT_JDK"; then
24315          BOOT_JDK_FOUND=maybe
24316          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24317$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24318        fi
24319
24320
24321    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24322    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24323      # Do we have a bin/java?
24324      if test ! -x "$BOOT_JDK/bin/java"; then
24325        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24326$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24327        BOOT_JDK_FOUND=no
24328      else
24329        # Do we have a bin/javac?
24330        if test ! -x "$BOOT_JDK/bin/javac"; then
24331          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24332$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24333          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24334$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24335          BOOT_JDK_FOUND=no
24336        else
24337          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24338          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24339
24340          # Extra M4 quote needed to protect [] in grep expression.
24341          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24342          if test "x$FOUND_CORRECT_VERSION" = x; then
24343            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24344$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24345            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24346$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24347            BOOT_JDK_FOUND=no
24348          else
24349            # We're done! :-)
24350            BOOT_JDK_FOUND=yes
24351
24352  # Only process if variable expands to non-empty
24353
24354  if test "x$BOOT_JDK" != x; then
24355    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24356
24357  # Input might be given as Windows format, start by converting to
24358  # unix format.
24359  path="$BOOT_JDK"
24360  new_path=`$CYGPATH -u "$path"`
24361
24362  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24363  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24364  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24365  # "foo.exe" is OK but "foo" is an error.
24366  #
24367  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24368  # It is also a way to make sure we got the proper file name for the real test later on.
24369  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24370  if test "x$test_shortpath" = x; then
24371    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24372$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24373    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24374  fi
24375
24376  # Call helper function which possibly converts this using DOS-style short mode.
24377  # If so, the updated path is stored in $new_path.
24378
24379  input_path="$new_path"
24380  # Check if we need to convert this using DOS-style short mode. If the path
24381  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24382  # take no chances and rewrite it.
24383  # Note: m4 eats our [], so we need to use [ and ] instead.
24384  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24385  if test "x$has_forbidden_chars" != x; then
24386    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24387    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24388    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24389    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24390      # Going to short mode and back again did indeed matter. Since short mode is
24391      # case insensitive, let's make it lowercase to improve readability.
24392      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24393      # Now convert it back to Unix-style (cygpath)
24394      input_path=`$CYGPATH -u "$shortmode_path"`
24395      new_path="$input_path"
24396    fi
24397  fi
24398
24399  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24400  if test "x$test_cygdrive_prefix" = x; then
24401    # As a simple fix, exclude /usr/bin since it's not a real path.
24402    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24403      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24404      # a path prefixed by /cygdrive for fixpath to work.
24405      new_path="$CYGWIN_ROOT_PATH$input_path"
24406    fi
24407  fi
24408
24409
24410  if test "x$path" != "x$new_path"; then
24411    BOOT_JDK="$new_path"
24412    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24413$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24414  fi
24415
24416    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24417
24418  path="$BOOT_JDK"
24419  has_colon=`$ECHO $path | $GREP ^.:`
24420  new_path="$path"
24421  if test "x$has_colon" = x; then
24422    # Not in mixed or Windows style, start by that.
24423    new_path=`cmd //c echo $path`
24424  fi
24425
24426
24427  input_path="$new_path"
24428  # Check if we need to convert this using DOS-style short mode. If the path
24429  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24430  # take no chances and rewrite it.
24431  # Note: m4 eats our [], so we need to use [ and ] instead.
24432  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24433  if test "x$has_forbidden_chars" != x; then
24434    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24435    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24436  fi
24437
24438
24439  windows_path="$new_path"
24440  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24441    unix_path=`$CYGPATH -u "$windows_path"`
24442    new_path="$unix_path"
24443  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24444    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24445    new_path="$unix_path"
24446  fi
24447
24448  if test "x$path" != "x$new_path"; then
24449    BOOT_JDK="$new_path"
24450    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24451$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24452  fi
24453
24454  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24455  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24456
24457    else
24458      # We're on a unix platform. Hooray! :)
24459      path="$BOOT_JDK"
24460      has_space=`$ECHO "$path" | $GREP " "`
24461      if test "x$has_space" != x; then
24462        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24463$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24464        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24465      fi
24466
24467      # Use eval to expand a potential ~
24468      eval path="$path"
24469      if test ! -f "$path" && test ! -d "$path"; then
24470        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24471      fi
24472
24473      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24474    fi
24475  fi
24476
24477            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24478$as_echo_n "checking for Boot JDK... " >&6; }
24479            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24480$as_echo "$BOOT_JDK" >&6; }
24481            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24482$as_echo_n "checking Boot JDK version... " >&6; }
24483            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24484            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24485$as_echo "$BOOT_JDK_VERSION" >&6; }
24486          fi # end check jdk version
24487        fi # end check javac
24488      fi # end check java
24489    fi # end check boot jdk found
24490  fi
24491
24492    done
24493  fi
24494
24495
24496    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24497    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24498      # Do we have a bin/java?
24499      if test ! -x "$BOOT_JDK/bin/java"; then
24500        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24501$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24502        BOOT_JDK_FOUND=no
24503      else
24504        # Do we have a bin/javac?
24505        if test ! -x "$BOOT_JDK/bin/javac"; then
24506          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24507$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24508          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24509$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24510          BOOT_JDK_FOUND=no
24511        else
24512          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24513          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24514
24515          # Extra M4 quote needed to protect [] in grep expression.
24516          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24517          if test "x$FOUND_CORRECT_VERSION" = x; then
24518            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24519$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24520            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24521$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24522            BOOT_JDK_FOUND=no
24523          else
24524            # We're done! :-)
24525            BOOT_JDK_FOUND=yes
24526
24527  # Only process if variable expands to non-empty
24528
24529  if test "x$BOOT_JDK" != x; then
24530    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24531
24532  # Input might be given as Windows format, start by converting to
24533  # unix format.
24534  path="$BOOT_JDK"
24535  new_path=`$CYGPATH -u "$path"`
24536
24537  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24538  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24539  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24540  # "foo.exe" is OK but "foo" is an error.
24541  #
24542  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24543  # It is also a way to make sure we got the proper file name for the real test later on.
24544  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24545  if test "x$test_shortpath" = x; then
24546    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24547$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24548    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24549  fi
24550
24551  # Call helper function which possibly converts this using DOS-style short mode.
24552  # If so, the updated path is stored in $new_path.
24553
24554  input_path="$new_path"
24555  # Check if we need to convert this using DOS-style short mode. If the path
24556  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24557  # take no chances and rewrite it.
24558  # Note: m4 eats our [], so we need to use [ and ] instead.
24559  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24560  if test "x$has_forbidden_chars" != x; then
24561    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24562    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24563    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24564    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24565      # Going to short mode and back again did indeed matter. Since short mode is
24566      # case insensitive, let's make it lowercase to improve readability.
24567      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24568      # Now convert it back to Unix-style (cygpath)
24569      input_path=`$CYGPATH -u "$shortmode_path"`
24570      new_path="$input_path"
24571    fi
24572  fi
24573
24574  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24575  if test "x$test_cygdrive_prefix" = x; then
24576    # As a simple fix, exclude /usr/bin since it's not a real path.
24577    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24578      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24579      # a path prefixed by /cygdrive for fixpath to work.
24580      new_path="$CYGWIN_ROOT_PATH$input_path"
24581    fi
24582  fi
24583
24584
24585  if test "x$path" != "x$new_path"; then
24586    BOOT_JDK="$new_path"
24587    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24588$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24589  fi
24590
24591    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24592
24593  path="$BOOT_JDK"
24594  has_colon=`$ECHO $path | $GREP ^.:`
24595  new_path="$path"
24596  if test "x$has_colon" = x; then
24597    # Not in mixed or Windows style, start by that.
24598    new_path=`cmd //c echo $path`
24599  fi
24600
24601
24602  input_path="$new_path"
24603  # Check if we need to convert this using DOS-style short mode. If the path
24604  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24605  # take no chances and rewrite it.
24606  # Note: m4 eats our [], so we need to use [ and ] instead.
24607  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24608  if test "x$has_forbidden_chars" != x; then
24609    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24610    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24611  fi
24612
24613
24614  windows_path="$new_path"
24615  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24616    unix_path=`$CYGPATH -u "$windows_path"`
24617    new_path="$unix_path"
24618  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24619    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24620    new_path="$unix_path"
24621  fi
24622
24623  if test "x$path" != "x$new_path"; then
24624    BOOT_JDK="$new_path"
24625    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24626$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24627  fi
24628
24629  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24630  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24631
24632    else
24633      # We're on a unix platform. Hooray! :)
24634      path="$BOOT_JDK"
24635      has_space=`$ECHO "$path" | $GREP " "`
24636      if test "x$has_space" != x; then
24637        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24638$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24639        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24640      fi
24641
24642      # Use eval to expand a potential ~
24643      eval path="$path"
24644      if test ! -f "$path" && test ! -d "$path"; then
24645        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24646      fi
24647
24648      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24649    fi
24650  fi
24651
24652            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24653$as_echo_n "checking for Boot JDK... " >&6; }
24654            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24655$as_echo "$BOOT_JDK" >&6; }
24656            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24657$as_echo_n "checking Boot JDK version... " >&6; }
24658            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24659            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24660$as_echo "$BOOT_JDK_VERSION" >&6; }
24661          fi # end check jdk version
24662        fi # end check javac
24663      fi # end check java
24664    fi # end check boot jdk found
24665  fi
24666
24667  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
24668
24669  if test "x$BOOT_JDK_FOUND" = xno; then
24670    # Now execute the test
24671
24672  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
24673  BOOT_JDK_SUFFIX="/Contents/Home"
24674  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24675  if test "x$ALL_JDKS_FOUND" != x; then
24676    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24677
24678  if test "x$BOOT_JDK_FOUND" = xno; then
24679    # Now execute the test
24680
24681        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24682        if test -d "$BOOT_JDK"; then
24683          BOOT_JDK_FOUND=maybe
24684          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24685$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24686        fi
24687
24688
24689    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24690    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24691      # Do we have a bin/java?
24692      if test ! -x "$BOOT_JDK/bin/java"; then
24693        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24694$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24695        BOOT_JDK_FOUND=no
24696      else
24697        # Do we have a bin/javac?
24698        if test ! -x "$BOOT_JDK/bin/javac"; then
24699          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24700$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24701          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24702$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24703          BOOT_JDK_FOUND=no
24704        else
24705          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24706          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24707
24708          # Extra M4 quote needed to protect [] in grep expression.
24709          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24710          if test "x$FOUND_CORRECT_VERSION" = x; then
24711            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24712$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24713            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24714$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24715            BOOT_JDK_FOUND=no
24716          else
24717            # We're done! :-)
24718            BOOT_JDK_FOUND=yes
24719
24720  # Only process if variable expands to non-empty
24721
24722  if test "x$BOOT_JDK" != x; then
24723    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24724
24725  # Input might be given as Windows format, start by converting to
24726  # unix format.
24727  path="$BOOT_JDK"
24728  new_path=`$CYGPATH -u "$path"`
24729
24730  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24731  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24732  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24733  # "foo.exe" is OK but "foo" is an error.
24734  #
24735  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24736  # It is also a way to make sure we got the proper file name for the real test later on.
24737  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24738  if test "x$test_shortpath" = x; then
24739    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24740$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24741    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24742  fi
24743
24744  # Call helper function which possibly converts this using DOS-style short mode.
24745  # If so, the updated path is stored in $new_path.
24746
24747  input_path="$new_path"
24748  # Check if we need to convert this using DOS-style short mode. If the path
24749  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24750  # take no chances and rewrite it.
24751  # Note: m4 eats our [], so we need to use [ and ] instead.
24752  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24753  if test "x$has_forbidden_chars" != x; then
24754    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24755    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24756    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24757    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24758      # Going to short mode and back again did indeed matter. Since short mode is
24759      # case insensitive, let's make it lowercase to improve readability.
24760      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24761      # Now convert it back to Unix-style (cygpath)
24762      input_path=`$CYGPATH -u "$shortmode_path"`
24763      new_path="$input_path"
24764    fi
24765  fi
24766
24767  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24768  if test "x$test_cygdrive_prefix" = x; then
24769    # As a simple fix, exclude /usr/bin since it's not a real path.
24770    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24771      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24772      # a path prefixed by /cygdrive for fixpath to work.
24773      new_path="$CYGWIN_ROOT_PATH$input_path"
24774    fi
24775  fi
24776
24777
24778  if test "x$path" != "x$new_path"; then
24779    BOOT_JDK="$new_path"
24780    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24781$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24782  fi
24783
24784    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24785
24786  path="$BOOT_JDK"
24787  has_colon=`$ECHO $path | $GREP ^.:`
24788  new_path="$path"
24789  if test "x$has_colon" = x; then
24790    # Not in mixed or Windows style, start by that.
24791    new_path=`cmd //c echo $path`
24792  fi
24793
24794
24795  input_path="$new_path"
24796  # Check if we need to convert this using DOS-style short mode. If the path
24797  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24798  # take no chances and rewrite it.
24799  # Note: m4 eats our [], so we need to use [ and ] instead.
24800  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24801  if test "x$has_forbidden_chars" != x; then
24802    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24803    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24804  fi
24805
24806
24807  windows_path="$new_path"
24808  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24809    unix_path=`$CYGPATH -u "$windows_path"`
24810    new_path="$unix_path"
24811  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24812    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24813    new_path="$unix_path"
24814  fi
24815
24816  if test "x$path" != "x$new_path"; then
24817    BOOT_JDK="$new_path"
24818    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24819$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24820  fi
24821
24822  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24823  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24824
24825    else
24826      # We're on a unix platform. Hooray! :)
24827      path="$BOOT_JDK"
24828      has_space=`$ECHO "$path" | $GREP " "`
24829      if test "x$has_space" != x; then
24830        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24831$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24832        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24833      fi
24834
24835      # Use eval to expand a potential ~
24836      eval path="$path"
24837      if test ! -f "$path" && test ! -d "$path"; then
24838        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24839      fi
24840
24841      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24842    fi
24843  fi
24844
24845            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24846$as_echo_n "checking for Boot JDK... " >&6; }
24847            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24848$as_echo "$BOOT_JDK" >&6; }
24849            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24850$as_echo_n "checking Boot JDK version... " >&6; }
24851            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24852            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24853$as_echo "$BOOT_JDK_VERSION" >&6; }
24854          fi # end check jdk version
24855        fi # end check javac
24856      fi # end check java
24857    fi # end check boot jdk found
24858  fi
24859
24860    done
24861  fi
24862
24863
24864    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24865    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24866      # Do we have a bin/java?
24867      if test ! -x "$BOOT_JDK/bin/java"; then
24868        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24869$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24870        BOOT_JDK_FOUND=no
24871      else
24872        # Do we have a bin/javac?
24873        if test ! -x "$BOOT_JDK/bin/javac"; then
24874          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24875$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24876          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24877$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24878          BOOT_JDK_FOUND=no
24879        else
24880          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24881          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24882
24883          # Extra M4 quote needed to protect [] in grep expression.
24884          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24885          if test "x$FOUND_CORRECT_VERSION" = x; then
24886            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24887$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24888            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24889$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24890            BOOT_JDK_FOUND=no
24891          else
24892            # We're done! :-)
24893            BOOT_JDK_FOUND=yes
24894
24895  # Only process if variable expands to non-empty
24896
24897  if test "x$BOOT_JDK" != x; then
24898    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24899
24900  # Input might be given as Windows format, start by converting to
24901  # unix format.
24902  path="$BOOT_JDK"
24903  new_path=`$CYGPATH -u "$path"`
24904
24905  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24906  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24907  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24908  # "foo.exe" is OK but "foo" is an error.
24909  #
24910  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24911  # It is also a way to make sure we got the proper file name for the real test later on.
24912  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24913  if test "x$test_shortpath" = x; then
24914    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24915$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24916    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24917  fi
24918
24919  # Call helper function which possibly converts this using DOS-style short mode.
24920  # If so, the updated path is stored in $new_path.
24921
24922  input_path="$new_path"
24923  # Check if we need to convert this using DOS-style short mode. If the path
24924  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24925  # take no chances and rewrite it.
24926  # Note: m4 eats our [], so we need to use [ and ] instead.
24927  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24928  if test "x$has_forbidden_chars" != x; then
24929    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24930    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24931    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24932    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24933      # Going to short mode and back again did indeed matter. Since short mode is
24934      # case insensitive, let's make it lowercase to improve readability.
24935      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24936      # Now convert it back to Unix-style (cygpath)
24937      input_path=`$CYGPATH -u "$shortmode_path"`
24938      new_path="$input_path"
24939    fi
24940  fi
24941
24942  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24943  if test "x$test_cygdrive_prefix" = x; then
24944    # As a simple fix, exclude /usr/bin since it's not a real path.
24945    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24946      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24947      # a path prefixed by /cygdrive for fixpath to work.
24948      new_path="$CYGWIN_ROOT_PATH$input_path"
24949    fi
24950  fi
24951
24952
24953  if test "x$path" != "x$new_path"; then
24954    BOOT_JDK="$new_path"
24955    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24956$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24957  fi
24958
24959    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24960
24961  path="$BOOT_JDK"
24962  has_colon=`$ECHO $path | $GREP ^.:`
24963  new_path="$path"
24964  if test "x$has_colon" = x; then
24965    # Not in mixed or Windows style, start by that.
24966    new_path=`cmd //c echo $path`
24967  fi
24968
24969
24970  input_path="$new_path"
24971  # Check if we need to convert this using DOS-style short mode. If the path
24972  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24973  # take no chances and rewrite it.
24974  # Note: m4 eats our [], so we need to use [ and ] instead.
24975  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24976  if test "x$has_forbidden_chars" != x; then
24977    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24978    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24979  fi
24980
24981
24982  windows_path="$new_path"
24983  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24984    unix_path=`$CYGPATH -u "$windows_path"`
24985    new_path="$unix_path"
24986  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24987    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24988    new_path="$unix_path"
24989  fi
24990
24991  if test "x$path" != "x$new_path"; then
24992    BOOT_JDK="$new_path"
24993    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24994$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24995  fi
24996
24997  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24998  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24999
25000    else
25001      # We're on a unix platform. Hooray! :)
25002      path="$BOOT_JDK"
25003      has_space=`$ECHO "$path" | $GREP " "`
25004      if test "x$has_space" != x; then
25005        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25006$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25007        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25008      fi
25009
25010      # Use eval to expand a potential ~
25011      eval path="$path"
25012      if test ! -f "$path" && test ! -d "$path"; then
25013        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25014      fi
25015
25016      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25017    fi
25018  fi
25019
25020            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25021$as_echo_n "checking for Boot JDK... " >&6; }
25022            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25023$as_echo "$BOOT_JDK" >&6; }
25024            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25025$as_echo_n "checking Boot JDK version... " >&6; }
25026            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25027            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25028$as_echo "$BOOT_JDK_VERSION" >&6; }
25029          fi # end check jdk version
25030        fi # end check javac
25031      fi # end check java
25032    fi # end check boot jdk found
25033  fi
25034
25035
25036  if test "x$BOOT_JDK_FOUND" = xno; then
25037    # Now execute the test
25038
25039  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
25040  BOOT_JDK_SUFFIX="/Contents/Home"
25041  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
25042  if test "x$ALL_JDKS_FOUND" != x; then
25043    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
25044
25045  if test "x$BOOT_JDK_FOUND" = xno; then
25046    # Now execute the test
25047
25048        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
25049        if test -d "$BOOT_JDK"; then
25050          BOOT_JDK_FOUND=maybe
25051          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
25052$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
25053        fi
25054
25055
25056    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25057    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25058      # Do we have a bin/java?
25059      if test ! -x "$BOOT_JDK/bin/java"; then
25060        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25061$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25062        BOOT_JDK_FOUND=no
25063      else
25064        # Do we have a bin/javac?
25065        if test ! -x "$BOOT_JDK/bin/javac"; then
25066          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25067$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25068          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25069$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25070          BOOT_JDK_FOUND=no
25071        else
25072          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25073          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25074
25075          # Extra M4 quote needed to protect [] in grep expression.
25076          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25077          if test "x$FOUND_CORRECT_VERSION" = x; then
25078            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25079$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25080            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25081$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25082            BOOT_JDK_FOUND=no
25083          else
25084            # We're done! :-)
25085            BOOT_JDK_FOUND=yes
25086
25087  # Only process if variable expands to non-empty
25088
25089  if test "x$BOOT_JDK" != x; then
25090    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25091
25092  # Input might be given as Windows format, start by converting to
25093  # unix format.
25094  path="$BOOT_JDK"
25095  new_path=`$CYGPATH -u "$path"`
25096
25097  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25098  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25099  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25100  # "foo.exe" is OK but "foo" is an error.
25101  #
25102  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25103  # It is also a way to make sure we got the proper file name for the real test later on.
25104  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25105  if test "x$test_shortpath" = x; then
25106    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25107$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25108    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25109  fi
25110
25111  # Call helper function which possibly converts this using DOS-style short mode.
25112  # If so, the updated path is stored in $new_path.
25113
25114  input_path="$new_path"
25115  # Check if we need to convert this using DOS-style short mode. If the path
25116  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25117  # take no chances and rewrite it.
25118  # Note: m4 eats our [], so we need to use [ and ] instead.
25119  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25120  if test "x$has_forbidden_chars" != x; then
25121    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25122    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25123    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25124    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25125      # Going to short mode and back again did indeed matter. Since short mode is
25126      # case insensitive, let's make it lowercase to improve readability.
25127      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25128      # Now convert it back to Unix-style (cygpath)
25129      input_path=`$CYGPATH -u "$shortmode_path"`
25130      new_path="$input_path"
25131    fi
25132  fi
25133
25134  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25135  if test "x$test_cygdrive_prefix" = x; then
25136    # As a simple fix, exclude /usr/bin since it's not a real path.
25137    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25138      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25139      # a path prefixed by /cygdrive for fixpath to work.
25140      new_path="$CYGWIN_ROOT_PATH$input_path"
25141    fi
25142  fi
25143
25144
25145  if test "x$path" != "x$new_path"; then
25146    BOOT_JDK="$new_path"
25147    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25148$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25149  fi
25150
25151    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25152
25153  path="$BOOT_JDK"
25154  has_colon=`$ECHO $path | $GREP ^.:`
25155  new_path="$path"
25156  if test "x$has_colon" = x; then
25157    # Not in mixed or Windows style, start by that.
25158    new_path=`cmd //c echo $path`
25159  fi
25160
25161
25162  input_path="$new_path"
25163  # Check if we need to convert this using DOS-style short mode. If the path
25164  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25165  # take no chances and rewrite it.
25166  # Note: m4 eats our [], so we need to use [ and ] instead.
25167  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25168  if test "x$has_forbidden_chars" != x; then
25169    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25170    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25171  fi
25172
25173
25174  windows_path="$new_path"
25175  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25176    unix_path=`$CYGPATH -u "$windows_path"`
25177    new_path="$unix_path"
25178  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25179    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25180    new_path="$unix_path"
25181  fi
25182
25183  if test "x$path" != "x$new_path"; then
25184    BOOT_JDK="$new_path"
25185    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25186$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25187  fi
25188
25189  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25190  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25191
25192    else
25193      # We're on a unix platform. Hooray! :)
25194      path="$BOOT_JDK"
25195      has_space=`$ECHO "$path" | $GREP " "`
25196      if test "x$has_space" != x; then
25197        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25198$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25199        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25200      fi
25201
25202      # Use eval to expand a potential ~
25203      eval path="$path"
25204      if test ! -f "$path" && test ! -d "$path"; then
25205        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25206      fi
25207
25208      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25209    fi
25210  fi
25211
25212            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25213$as_echo_n "checking for Boot JDK... " >&6; }
25214            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25215$as_echo "$BOOT_JDK" >&6; }
25216            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25217$as_echo_n "checking Boot JDK version... " >&6; }
25218            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25219            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25220$as_echo "$BOOT_JDK_VERSION" >&6; }
25221          fi # end check jdk version
25222        fi # end check javac
25223      fi # end check java
25224    fi # end check boot jdk found
25225  fi
25226
25227    done
25228  fi
25229
25230
25231    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25232    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25233      # Do we have a bin/java?
25234      if test ! -x "$BOOT_JDK/bin/java"; then
25235        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25236$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25237        BOOT_JDK_FOUND=no
25238      else
25239        # Do we have a bin/javac?
25240        if test ! -x "$BOOT_JDK/bin/javac"; then
25241          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25242$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25243          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25244$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25245          BOOT_JDK_FOUND=no
25246        else
25247          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25248          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25249
25250          # Extra M4 quote needed to protect [] in grep expression.
25251          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25252          if test "x$FOUND_CORRECT_VERSION" = x; then
25253            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25254$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25255            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25256$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25257            BOOT_JDK_FOUND=no
25258          else
25259            # We're done! :-)
25260            BOOT_JDK_FOUND=yes
25261
25262  # Only process if variable expands to non-empty
25263
25264  if test "x$BOOT_JDK" != x; then
25265    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25266
25267  # Input might be given as Windows format, start by converting to
25268  # unix format.
25269  path="$BOOT_JDK"
25270  new_path=`$CYGPATH -u "$path"`
25271
25272  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25273  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25274  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25275  # "foo.exe" is OK but "foo" is an error.
25276  #
25277  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25278  # It is also a way to make sure we got the proper file name for the real test later on.
25279  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25280  if test "x$test_shortpath" = x; then
25281    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25282$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25283    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25284  fi
25285
25286  # Call helper function which possibly converts this using DOS-style short mode.
25287  # If so, the updated path is stored in $new_path.
25288
25289  input_path="$new_path"
25290  # Check if we need to convert this using DOS-style short mode. If the path
25291  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25292  # take no chances and rewrite it.
25293  # Note: m4 eats our [], so we need to use [ and ] instead.
25294  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25295  if test "x$has_forbidden_chars" != x; then
25296    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25297    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25298    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25299    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25300      # Going to short mode and back again did indeed matter. Since short mode is
25301      # case insensitive, let's make it lowercase to improve readability.
25302      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25303      # Now convert it back to Unix-style (cygpath)
25304      input_path=`$CYGPATH -u "$shortmode_path"`
25305      new_path="$input_path"
25306    fi
25307  fi
25308
25309  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25310  if test "x$test_cygdrive_prefix" = x; then
25311    # As a simple fix, exclude /usr/bin since it's not a real path.
25312    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25313      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25314      # a path prefixed by /cygdrive for fixpath to work.
25315      new_path="$CYGWIN_ROOT_PATH$input_path"
25316    fi
25317  fi
25318
25319
25320  if test "x$path" != "x$new_path"; then
25321    BOOT_JDK="$new_path"
25322    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25323$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25324  fi
25325
25326    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25327
25328  path="$BOOT_JDK"
25329  has_colon=`$ECHO $path | $GREP ^.:`
25330  new_path="$path"
25331  if test "x$has_colon" = x; then
25332    # Not in mixed or Windows style, start by that.
25333    new_path=`cmd //c echo $path`
25334  fi
25335
25336
25337  input_path="$new_path"
25338  # Check if we need to convert this using DOS-style short mode. If the path
25339  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25340  # take no chances and rewrite it.
25341  # Note: m4 eats our [], so we need to use [ and ] instead.
25342  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25343  if test "x$has_forbidden_chars" != x; then
25344    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25345    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25346  fi
25347
25348
25349  windows_path="$new_path"
25350  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25351    unix_path=`$CYGPATH -u "$windows_path"`
25352    new_path="$unix_path"
25353  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25354    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25355    new_path="$unix_path"
25356  fi
25357
25358  if test "x$path" != "x$new_path"; then
25359    BOOT_JDK="$new_path"
25360    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25361$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25362  fi
25363
25364  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25365  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25366
25367    else
25368      # We're on a unix platform. Hooray! :)
25369      path="$BOOT_JDK"
25370      has_space=`$ECHO "$path" | $GREP " "`
25371      if test "x$has_space" != x; then
25372        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25373$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25374        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25375      fi
25376
25377      # Use eval to expand a potential ~
25378      eval path="$path"
25379      if test ! -f "$path" && test ! -d "$path"; then
25380        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25381      fi
25382
25383      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25384    fi
25385  fi
25386
25387            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25388$as_echo_n "checking for Boot JDK... " >&6; }
25389            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25390$as_echo "$BOOT_JDK" >&6; }
25391            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25392$as_echo_n "checking Boot JDK version... " >&6; }
25393            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25394            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25395$as_echo "$BOOT_JDK_VERSION" >&6; }
25396          fi # end check jdk version
25397        fi # end check javac
25398      fi # end check java
25399    fi # end check boot jdk found
25400  fi
25401
25402  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
25403
25404  if test "x$BOOT_JDK_FOUND" = xno; then
25405    # Now execute the test
25406
25407  BOOT_JDK_PREFIX="/usr/lib/jvm"
25408  BOOT_JDK_SUFFIX=""
25409  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
25410  if test "x$ALL_JDKS_FOUND" != x; then
25411    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
25412
25413  if test "x$BOOT_JDK_FOUND" = xno; then
25414    # Now execute the test
25415
25416        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
25417        if test -d "$BOOT_JDK"; then
25418          BOOT_JDK_FOUND=maybe
25419          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
25420$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
25421        fi
25422
25423
25424    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25425    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25426      # Do we have a bin/java?
25427      if test ! -x "$BOOT_JDK/bin/java"; then
25428        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25429$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25430        BOOT_JDK_FOUND=no
25431      else
25432        # Do we have a bin/javac?
25433        if test ! -x "$BOOT_JDK/bin/javac"; then
25434          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25435$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25436          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25437$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25438          BOOT_JDK_FOUND=no
25439        else
25440          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25441          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25442
25443          # Extra M4 quote needed to protect [] in grep expression.
25444          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25445          if test "x$FOUND_CORRECT_VERSION" = x; then
25446            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25447$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25448            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25449$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25450            BOOT_JDK_FOUND=no
25451          else
25452            # We're done! :-)
25453            BOOT_JDK_FOUND=yes
25454
25455  # Only process if variable expands to non-empty
25456
25457  if test "x$BOOT_JDK" != x; then
25458    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25459
25460  # Input might be given as Windows format, start by converting to
25461  # unix format.
25462  path="$BOOT_JDK"
25463  new_path=`$CYGPATH -u "$path"`
25464
25465  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25466  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25467  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25468  # "foo.exe" is OK but "foo" is an error.
25469  #
25470  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25471  # It is also a way to make sure we got the proper file name for the real test later on.
25472  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25473  if test "x$test_shortpath" = 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 $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25477  fi
25478
25479  # Call helper function which possibly converts this using DOS-style short mode.
25480  # If so, the updated path is stored in $new_path.
25481
25482  input_path="$new_path"
25483  # Check if we need to convert this using DOS-style short mode. If the path
25484  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25485  # take no chances and rewrite it.
25486  # Note: m4 eats our [], so we need to use [ and ] instead.
25487  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25488  if test "x$has_forbidden_chars" != x; then
25489    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25490    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25491    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25492    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25493      # Going to short mode and back again did indeed matter. Since short mode is
25494      # case insensitive, let's make it lowercase to improve readability.
25495      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25496      # Now convert it back to Unix-style (cygpath)
25497      input_path=`$CYGPATH -u "$shortmode_path"`
25498      new_path="$input_path"
25499    fi
25500  fi
25501
25502  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25503  if test "x$test_cygdrive_prefix" = x; then
25504    # As a simple fix, exclude /usr/bin since it's not a real path.
25505    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25506      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25507      # a path prefixed by /cygdrive for fixpath to work.
25508      new_path="$CYGWIN_ROOT_PATH$input_path"
25509    fi
25510  fi
25511
25512
25513  if test "x$path" != "x$new_path"; then
25514    BOOT_JDK="$new_path"
25515    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25516$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25517  fi
25518
25519    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25520
25521  path="$BOOT_JDK"
25522  has_colon=`$ECHO $path | $GREP ^.:`
25523  new_path="$path"
25524  if test "x$has_colon" = x; then
25525    # Not in mixed or Windows style, start by that.
25526    new_path=`cmd //c echo $path`
25527  fi
25528
25529
25530  input_path="$new_path"
25531  # Check if we need to convert this using DOS-style short mode. If the path
25532  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25533  # take no chances and rewrite it.
25534  # Note: m4 eats our [], so we need to use [ and ] instead.
25535  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25536  if test "x$has_forbidden_chars" != x; then
25537    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25538    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25539  fi
25540
25541
25542  windows_path="$new_path"
25543  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25544    unix_path=`$CYGPATH -u "$windows_path"`
25545    new_path="$unix_path"
25546  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25547    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25548    new_path="$unix_path"
25549  fi
25550
25551  if test "x$path" != "x$new_path"; then
25552    BOOT_JDK="$new_path"
25553    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25554$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25555  fi
25556
25557  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25558  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25559
25560    else
25561      # We're on a unix platform. Hooray! :)
25562      path="$BOOT_JDK"
25563      has_space=`$ECHO "$path" | $GREP " "`
25564      if test "x$has_space" != x; then
25565        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25566$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25567        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25568      fi
25569
25570      # Use eval to expand a potential ~
25571      eval path="$path"
25572      if test ! -f "$path" && test ! -d "$path"; then
25573        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25574      fi
25575
25576      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25577    fi
25578  fi
25579
25580            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25581$as_echo_n "checking for Boot JDK... " >&6; }
25582            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25583$as_echo "$BOOT_JDK" >&6; }
25584            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25585$as_echo_n "checking Boot JDK version... " >&6; }
25586            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25587            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25588$as_echo "$BOOT_JDK_VERSION" >&6; }
25589          fi # end check jdk version
25590        fi # end check javac
25591      fi # end check java
25592    fi # end check boot jdk found
25593  fi
25594
25595    done
25596  fi
25597
25598
25599    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25600    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25601      # Do we have a bin/java?
25602      if test ! -x "$BOOT_JDK/bin/java"; then
25603        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25604$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25605        BOOT_JDK_FOUND=no
25606      else
25607        # Do we have a bin/javac?
25608        if test ! -x "$BOOT_JDK/bin/javac"; then
25609          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25610$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25611          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25612$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25613          BOOT_JDK_FOUND=no
25614        else
25615          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25616          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25617
25618          # Extra M4 quote needed to protect [] in grep expression.
25619          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25620          if test "x$FOUND_CORRECT_VERSION" = x; then
25621            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25622$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25623            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25624$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25625            BOOT_JDK_FOUND=no
25626          else
25627            # We're done! :-)
25628            BOOT_JDK_FOUND=yes
25629
25630  # Only process if variable expands to non-empty
25631
25632  if test "x$BOOT_JDK" != x; then
25633    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25634
25635  # Input might be given as Windows format, start by converting to
25636  # unix format.
25637  path="$BOOT_JDK"
25638  new_path=`$CYGPATH -u "$path"`
25639
25640  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25641  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25642  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25643  # "foo.exe" is OK but "foo" is an error.
25644  #
25645  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25646  # It is also a way to make sure we got the proper file name for the real test later on.
25647  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25648  if test "x$test_shortpath" = x; then
25649    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25650$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25651    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25652  fi
25653
25654  # Call helper function which possibly converts this using DOS-style short mode.
25655  # If so, the updated path is stored in $new_path.
25656
25657  input_path="$new_path"
25658  # Check if we need to convert this using DOS-style short mode. If the path
25659  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25660  # take no chances and rewrite it.
25661  # Note: m4 eats our [], so we need to use [ and ] instead.
25662  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25663  if test "x$has_forbidden_chars" != x; then
25664    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25665    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25666    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25667    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25668      # Going to short mode and back again did indeed matter. Since short mode is
25669      # case insensitive, let's make it lowercase to improve readability.
25670      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25671      # Now convert it back to Unix-style (cygpath)
25672      input_path=`$CYGPATH -u "$shortmode_path"`
25673      new_path="$input_path"
25674    fi
25675  fi
25676
25677  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25678  if test "x$test_cygdrive_prefix" = x; then
25679    # As a simple fix, exclude /usr/bin since it's not a real path.
25680    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25681      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25682      # a path prefixed by /cygdrive for fixpath to work.
25683      new_path="$CYGWIN_ROOT_PATH$input_path"
25684    fi
25685  fi
25686
25687
25688  if test "x$path" != "x$new_path"; then
25689    BOOT_JDK="$new_path"
25690    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25691$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25692  fi
25693
25694    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25695
25696  path="$BOOT_JDK"
25697  has_colon=`$ECHO $path | $GREP ^.:`
25698  new_path="$path"
25699  if test "x$has_colon" = x; then
25700    # Not in mixed or Windows style, start by that.
25701    new_path=`cmd //c echo $path`
25702  fi
25703
25704
25705  input_path="$new_path"
25706  # Check if we need to convert this using DOS-style short mode. If the path
25707  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25708  # take no chances and rewrite it.
25709  # Note: m4 eats our [], so we need to use [ and ] instead.
25710  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25711  if test "x$has_forbidden_chars" != x; then
25712    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25713    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25714  fi
25715
25716
25717  windows_path="$new_path"
25718  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25719    unix_path=`$CYGPATH -u "$windows_path"`
25720    new_path="$unix_path"
25721  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25722    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25723    new_path="$unix_path"
25724  fi
25725
25726  if test "x$path" != "x$new_path"; then
25727    BOOT_JDK="$new_path"
25728    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25729$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25730  fi
25731
25732  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25733  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25734
25735    else
25736      # We're on a unix platform. Hooray! :)
25737      path="$BOOT_JDK"
25738      has_space=`$ECHO "$path" | $GREP " "`
25739      if test "x$has_space" != x; then
25740        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25741$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25742        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25743      fi
25744
25745      # Use eval to expand a potential ~
25746      eval path="$path"
25747      if test ! -f "$path" && test ! -d "$path"; then
25748        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25749      fi
25750
25751      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25752    fi
25753  fi
25754
25755            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25756$as_echo_n "checking for Boot JDK... " >&6; }
25757            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25758$as_echo "$BOOT_JDK" >&6; }
25759            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25760$as_echo_n "checking Boot JDK version... " >&6; }
25761            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25762            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25763$as_echo "$BOOT_JDK_VERSION" >&6; }
25764          fi # end check jdk version
25765        fi # end check javac
25766      fi # end check java
25767    fi # end check boot jdk found
25768  fi
25769
25770  fi
25771
25772
25773    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25774    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25775      # Do we have a bin/java?
25776      if test ! -x "$BOOT_JDK/bin/java"; then
25777        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25778$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25779        BOOT_JDK_FOUND=no
25780      else
25781        # Do we have a bin/javac?
25782        if test ! -x "$BOOT_JDK/bin/javac"; then
25783          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25784$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25785          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25786$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25787          BOOT_JDK_FOUND=no
25788        else
25789          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25790          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25791
25792          # Extra M4 quote needed to protect [] in grep expression.
25793          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25794          if test "x$FOUND_CORRECT_VERSION" = x; then
25795            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25796$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25797            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25798$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25799            BOOT_JDK_FOUND=no
25800          else
25801            # We're done! :-)
25802            BOOT_JDK_FOUND=yes
25803
25804  # Only process if variable expands to non-empty
25805
25806  if test "x$BOOT_JDK" != x; then
25807    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25808
25809  # Input might be given as Windows format, start by converting to
25810  # unix format.
25811  path="$BOOT_JDK"
25812  new_path=`$CYGPATH -u "$path"`
25813
25814  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25815  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25816  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25817  # "foo.exe" is OK but "foo" is an error.
25818  #
25819  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25820  # It is also a way to make sure we got the proper file name for the real test later on.
25821  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25822  if test "x$test_shortpath" = x; then
25823    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25824$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25825    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25826  fi
25827
25828  # Call helper function which possibly converts this using DOS-style short mode.
25829  # If so, the updated path is stored in $new_path.
25830
25831  input_path="$new_path"
25832  # Check if we need to convert this using DOS-style short mode. If the path
25833  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25834  # take no chances and rewrite it.
25835  # Note: m4 eats our [], so we need to use [ and ] instead.
25836  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25837  if test "x$has_forbidden_chars" != x; then
25838    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25839    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25840    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25841    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25842      # Going to short mode and back again did indeed matter. Since short mode is
25843      # case insensitive, let's make it lowercase to improve readability.
25844      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25845      # Now convert it back to Unix-style (cygpath)
25846      input_path=`$CYGPATH -u "$shortmode_path"`
25847      new_path="$input_path"
25848    fi
25849  fi
25850
25851  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25852  if test "x$test_cygdrive_prefix" = x; then
25853    # As a simple fix, exclude /usr/bin since it's not a real path.
25854    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25855      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25856      # a path prefixed by /cygdrive for fixpath to work.
25857      new_path="$CYGWIN_ROOT_PATH$input_path"
25858    fi
25859  fi
25860
25861
25862  if test "x$path" != "x$new_path"; then
25863    BOOT_JDK="$new_path"
25864    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25865$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25866  fi
25867
25868    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25869
25870  path="$BOOT_JDK"
25871  has_colon=`$ECHO $path | $GREP ^.:`
25872  new_path="$path"
25873  if test "x$has_colon" = x; then
25874    # Not in mixed or Windows style, start by that.
25875    new_path=`cmd //c echo $path`
25876  fi
25877
25878
25879  input_path="$new_path"
25880  # Check if we need to convert this using DOS-style short mode. If the path
25881  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25882  # take no chances and rewrite it.
25883  # Note: m4 eats our [], so we need to use [ and ] instead.
25884  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25885  if test "x$has_forbidden_chars" != x; then
25886    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25887    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25888  fi
25889
25890
25891  windows_path="$new_path"
25892  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25893    unix_path=`$CYGPATH -u "$windows_path"`
25894    new_path="$unix_path"
25895  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25896    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25897    new_path="$unix_path"
25898  fi
25899
25900  if test "x$path" != "x$new_path"; then
25901    BOOT_JDK="$new_path"
25902    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25903$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25904  fi
25905
25906  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25907  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25908
25909    else
25910      # We're on a unix platform. Hooray! :)
25911      path="$BOOT_JDK"
25912      has_space=`$ECHO "$path" | $GREP " "`
25913      if test "x$has_space" != x; then
25914        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25915$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25916        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25917      fi
25918
25919      # Use eval to expand a potential ~
25920      eval path="$path"
25921      if test ! -f "$path" && test ! -d "$path"; then
25922        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25923      fi
25924
25925      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25926    fi
25927  fi
25928
25929            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25930$as_echo_n "checking for Boot JDK... " >&6; }
25931            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25932$as_echo "$BOOT_JDK" >&6; }
25933            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25934$as_echo_n "checking Boot JDK version... " >&6; }
25935            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25936            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25937$as_echo "$BOOT_JDK_VERSION" >&6; }
25938          fi # end check jdk version
25939        fi # end check javac
25940      fi # end check java
25941    fi # end check boot jdk found
25942  fi
25943
25944
25945  # If we haven't found anything yet, we've truly lost. Give up.
25946  if test "x$BOOT_JDK_FOUND" = xno; then
25947
25948  # Print a helpful message on how to acquire the necessary build dependency.
25949  # openjdk is the help tag: freetype, cups, pulse, alsa etc
25950  MISSING_DEPENDENCY=openjdk
25951
25952  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25953    cygwin_help $MISSING_DEPENDENCY
25954  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25955    msys_help $MISSING_DEPENDENCY
25956  else
25957    PKGHANDLER_COMMAND=
25958
25959    case $PKGHANDLER in
25960      apt-get)
25961        apt_help     $MISSING_DEPENDENCY ;;
25962      yum)
25963        yum_help     $MISSING_DEPENDENCY ;;
25964      port)
25965        port_help    $MISSING_DEPENDENCY ;;
25966      pkgutil)
25967        pkgutil_help $MISSING_DEPENDENCY ;;
25968      pkgadd)
25969        pkgadd_help  $MISSING_DEPENDENCY ;;
25970    esac
25971
25972    if test "x$PKGHANDLER_COMMAND" != x; then
25973      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
25974    fi
25975  fi
25976
25977    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
25978$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
25979    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
25980$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25981    as_fn_error $? "Cannot continue" "$LINENO" 5
25982  fi
25983
25984
25985
25986  # Setup tools from the Boot JDK.
25987
25988  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25989
25990  # Publish this variable in the help.
25991
25992
25993  if test "x$JAVA" = x; then
25994    # The variable is not set by user, try to locate tool using the code snippet
25995
25996      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25997$as_echo_n "checking for java in Boot JDK... " >&6; }
25998      JAVA=$BOOT_JDK/bin/java
25999      if test ! -x $JAVA; then
26000        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26001$as_echo "not found" >&6; }
26002        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26003$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26004        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
26005      fi
26006      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26007$as_echo "ok" >&6; }
26008
26009
26010  else
26011    # The variable is set, but is it from the command line or the environment?
26012
26013    # Try to remove the string !JAVA! from our list.
26014    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
26015    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26016      # If it failed, the variable was not from the command line. Ignore it,
26017      # but warn the user (except for BASH, which is always set by the calling BASH).
26018      if test "xJAVA" != xBASH; then
26019        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
26020$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
26021      fi
26022      # Try to locate tool using the code snippet
26023
26024      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
26025$as_echo_n "checking for java in Boot JDK... " >&6; }
26026      JAVA=$BOOT_JDK/bin/java
26027      if test ! -x $JAVA; then
26028        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26029$as_echo "not found" >&6; }
26030        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26031$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26032        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
26033      fi
26034      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26035$as_echo "ok" >&6; }
26036
26037
26038    else
26039      # If it succeeded, then it was overridden by the user. We will use it
26040      # for the tool.
26041
26042      # First remove it from the list of overridden variables, so we can test
26043      # for unknown variables in the end.
26044      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26045
26046      # Check if the provided tool contains a complete path.
26047      tool_specified="$JAVA"
26048      tool_basename="${tool_specified##*/}"
26049      if test "x$tool_basename" = "x$tool_specified"; then
26050        # A command without a complete path is provided, search $PATH.
26051        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
26052$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
26053        # Extract the first word of "$tool_basename", so it can be a program name with args.
26054set dummy $tool_basename; ac_word=$2
26055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26056$as_echo_n "checking for $ac_word... " >&6; }
26057if ${ac_cv_path_JAVA+:} false; then :
26058  $as_echo_n "(cached) " >&6
26059else
26060  case $JAVA in
26061  [\\/]* | ?:[\\/]*)
26062  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
26063  ;;
26064  *)
26065  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26066for as_dir in $PATH
26067do
26068  IFS=$as_save_IFS
26069  test -z "$as_dir" && as_dir=.
26070    for ac_exec_ext in '' $ac_executable_extensions; do
26071  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26072    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
26073    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26074    break 2
26075  fi
26076done
26077  done
26078IFS=$as_save_IFS
26079
26080  ;;
26081esac
26082fi
26083JAVA=$ac_cv_path_JAVA
26084if test -n "$JAVA"; then
26085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
26086$as_echo "$JAVA" >&6; }
26087else
26088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26089$as_echo "no" >&6; }
26090fi
26091
26092
26093        if test "x$JAVA" = x; then
26094          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26095        fi
26096      else
26097        # Otherwise we believe it is a complete path. Use it as it is.
26098        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
26099$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
26100        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
26101$as_echo_n "checking for JAVA... " >&6; }
26102        if test ! -x "$tool_specified"; then
26103          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26104$as_echo "not found" >&6; }
26105          as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
26106        fi
26107        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26108$as_echo "$tool_specified" >&6; }
26109      fi
26110    fi
26111  fi
26112
26113
26114
26115  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26116
26117  # Publish this variable in the help.
26118
26119
26120  if test "x$JAVAC" = x; then
26121    # The variable is not set by user, try to locate tool using the code snippet
26122
26123      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
26124$as_echo_n "checking for javac in Boot JDK... " >&6; }
26125      JAVAC=$BOOT_JDK/bin/javac
26126      if test ! -x $JAVAC; then
26127        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26128$as_echo "not found" >&6; }
26129        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26130$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26131        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
26132      fi
26133      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26134$as_echo "ok" >&6; }
26135
26136
26137  else
26138    # The variable is set, but is it from the command line or the environment?
26139
26140    # Try to remove the string !JAVAC! from our list.
26141    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
26142    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26143      # If it failed, the variable was not from the command line. Ignore it,
26144      # but warn the user (except for BASH, which is always set by the calling BASH).
26145      if test "xJAVAC" != xBASH; then
26146        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
26147$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
26148      fi
26149      # Try to locate tool using the code snippet
26150
26151      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
26152$as_echo_n "checking for javac in Boot JDK... " >&6; }
26153      JAVAC=$BOOT_JDK/bin/javac
26154      if test ! -x $JAVAC; then
26155        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26156$as_echo "not found" >&6; }
26157        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26158$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26159        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
26160      fi
26161      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26162$as_echo "ok" >&6; }
26163
26164
26165    else
26166      # If it succeeded, then it was overridden by the user. We will use it
26167      # for the tool.
26168
26169      # First remove it from the list of overridden variables, so we can test
26170      # for unknown variables in the end.
26171      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26172
26173      # Check if the provided tool contains a complete path.
26174      tool_specified="$JAVAC"
26175      tool_basename="${tool_specified##*/}"
26176      if test "x$tool_basename" = "x$tool_specified"; then
26177        # A command without a complete path is provided, search $PATH.
26178        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
26179$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
26180        # Extract the first word of "$tool_basename", so it can be a program name with args.
26181set dummy $tool_basename; ac_word=$2
26182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26183$as_echo_n "checking for $ac_word... " >&6; }
26184if ${ac_cv_path_JAVAC+:} false; then :
26185  $as_echo_n "(cached) " >&6
26186else
26187  case $JAVAC in
26188  [\\/]* | ?:[\\/]*)
26189  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
26190  ;;
26191  *)
26192  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26193for as_dir in $PATH
26194do
26195  IFS=$as_save_IFS
26196  test -z "$as_dir" && as_dir=.
26197    for ac_exec_ext in '' $ac_executable_extensions; do
26198  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26199    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
26200    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26201    break 2
26202  fi
26203done
26204  done
26205IFS=$as_save_IFS
26206
26207  ;;
26208esac
26209fi
26210JAVAC=$ac_cv_path_JAVAC
26211if test -n "$JAVAC"; then
26212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
26213$as_echo "$JAVAC" >&6; }
26214else
26215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26216$as_echo "no" >&6; }
26217fi
26218
26219
26220        if test "x$JAVAC" = x; then
26221          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26222        fi
26223      else
26224        # Otherwise we believe it is a complete path. Use it as it is.
26225        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
26226$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
26227        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
26228$as_echo_n "checking for JAVAC... " >&6; }
26229        if test ! -x "$tool_specified"; then
26230          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26231$as_echo "not found" >&6; }
26232          as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
26233        fi
26234        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26235$as_echo "$tool_specified" >&6; }
26236      fi
26237    fi
26238  fi
26239
26240
26241
26242  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26243
26244  # Publish this variable in the help.
26245
26246
26247  if test "x$JAVAH" = x; then
26248    # The variable is not set by user, try to locate tool using the code snippet
26249
26250      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
26251$as_echo_n "checking for javah in Boot JDK... " >&6; }
26252      JAVAH=$BOOT_JDK/bin/javah
26253      if test ! -x $JAVAH; then
26254        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26255$as_echo "not found" >&6; }
26256        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26257$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26258        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
26259      fi
26260      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26261$as_echo "ok" >&6; }
26262
26263
26264  else
26265    # The variable is set, but is it from the command line or the environment?
26266
26267    # Try to remove the string !JAVAH! from our list.
26268    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
26269    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26270      # If it failed, the variable was not from the command line. Ignore it,
26271      # but warn the user (except for BASH, which is always set by the calling BASH).
26272      if test "xJAVAH" != xBASH; then
26273        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
26274$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
26275      fi
26276      # Try to locate tool using the code snippet
26277
26278      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
26279$as_echo_n "checking for javah in Boot JDK... " >&6; }
26280      JAVAH=$BOOT_JDK/bin/javah
26281      if test ! -x $JAVAH; then
26282        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26283$as_echo "not found" >&6; }
26284        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26285$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26286        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
26287      fi
26288      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26289$as_echo "ok" >&6; }
26290
26291
26292    else
26293      # If it succeeded, then it was overridden by the user. We will use it
26294      # for the tool.
26295
26296      # First remove it from the list of overridden variables, so we can test
26297      # for unknown variables in the end.
26298      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26299
26300      # Check if the provided tool contains a complete path.
26301      tool_specified="$JAVAH"
26302      tool_basename="${tool_specified##*/}"
26303      if test "x$tool_basename" = "x$tool_specified"; then
26304        # A command without a complete path is provided, search $PATH.
26305        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
26306$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
26307        # Extract the first word of "$tool_basename", so it can be a program name with args.
26308set dummy $tool_basename; ac_word=$2
26309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26310$as_echo_n "checking for $ac_word... " >&6; }
26311if ${ac_cv_path_JAVAH+:} false; then :
26312  $as_echo_n "(cached) " >&6
26313else
26314  case $JAVAH in
26315  [\\/]* | ?:[\\/]*)
26316  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
26317  ;;
26318  *)
26319  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26320for as_dir in $PATH
26321do
26322  IFS=$as_save_IFS
26323  test -z "$as_dir" && as_dir=.
26324    for ac_exec_ext in '' $ac_executable_extensions; do
26325  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26326    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
26327    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26328    break 2
26329  fi
26330done
26331  done
26332IFS=$as_save_IFS
26333
26334  ;;
26335esac
26336fi
26337JAVAH=$ac_cv_path_JAVAH
26338if test -n "$JAVAH"; then
26339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
26340$as_echo "$JAVAH" >&6; }
26341else
26342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26343$as_echo "no" >&6; }
26344fi
26345
26346
26347        if test "x$JAVAH" = x; then
26348          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26349        fi
26350      else
26351        # Otherwise we believe it is a complete path. Use it as it is.
26352        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
26353$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
26354        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
26355$as_echo_n "checking for JAVAH... " >&6; }
26356        if test ! -x "$tool_specified"; then
26357          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26358$as_echo "not found" >&6; }
26359          as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
26360        fi
26361        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26362$as_echo "$tool_specified" >&6; }
26363      fi
26364    fi
26365  fi
26366
26367
26368
26369  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26370
26371  # Publish this variable in the help.
26372
26373
26374  if test "x$JAR" = x; then
26375    # The variable is not set by user, try to locate tool using the code snippet
26376
26377      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
26378$as_echo_n "checking for jar in Boot JDK... " >&6; }
26379      JAR=$BOOT_JDK/bin/jar
26380      if test ! -x $JAR; then
26381        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26382$as_echo "not found" >&6; }
26383        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26384$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26385        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
26386      fi
26387      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26388$as_echo "ok" >&6; }
26389
26390
26391  else
26392    # The variable is set, but is it from the command line or the environment?
26393
26394    # Try to remove the string !JAR! from our list.
26395    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
26396    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26397      # If it failed, the variable was not from the command line. Ignore it,
26398      # but warn the user (except for BASH, which is always set by the calling BASH).
26399      if test "xJAR" != xBASH; then
26400        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
26401$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
26402      fi
26403      # Try to locate tool using the code snippet
26404
26405      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
26406$as_echo_n "checking for jar in Boot JDK... " >&6; }
26407      JAR=$BOOT_JDK/bin/jar
26408      if test ! -x $JAR; then
26409        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26410$as_echo "not found" >&6; }
26411        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26412$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26413        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
26414      fi
26415      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26416$as_echo "ok" >&6; }
26417
26418
26419    else
26420      # If it succeeded, then it was overridden by the user. We will use it
26421      # for the tool.
26422
26423      # First remove it from the list of overridden variables, so we can test
26424      # for unknown variables in the end.
26425      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26426
26427      # Check if the provided tool contains a complete path.
26428      tool_specified="$JAR"
26429      tool_basename="${tool_specified##*/}"
26430      if test "x$tool_basename" = "x$tool_specified"; then
26431        # A command without a complete path is provided, search $PATH.
26432        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
26433$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
26434        # Extract the first word of "$tool_basename", so it can be a program name with args.
26435set dummy $tool_basename; ac_word=$2
26436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26437$as_echo_n "checking for $ac_word... " >&6; }
26438if ${ac_cv_path_JAR+:} false; then :
26439  $as_echo_n "(cached) " >&6
26440else
26441  case $JAR in
26442  [\\/]* | ?:[\\/]*)
26443  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
26444  ;;
26445  *)
26446  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26447for as_dir in $PATH
26448do
26449  IFS=$as_save_IFS
26450  test -z "$as_dir" && as_dir=.
26451    for ac_exec_ext in '' $ac_executable_extensions; do
26452  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26453    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
26454    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26455    break 2
26456  fi
26457done
26458  done
26459IFS=$as_save_IFS
26460
26461  ;;
26462esac
26463fi
26464JAR=$ac_cv_path_JAR
26465if test -n "$JAR"; then
26466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
26467$as_echo "$JAR" >&6; }
26468else
26469  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26470$as_echo "no" >&6; }
26471fi
26472
26473
26474        if test "x$JAR" = x; then
26475          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26476        fi
26477      else
26478        # Otherwise we believe it is a complete path. Use it as it is.
26479        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
26480$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
26481        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
26482$as_echo_n "checking for JAR... " >&6; }
26483        if test ! -x "$tool_specified"; then
26484          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26485$as_echo "not found" >&6; }
26486          as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
26487        fi
26488        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26489$as_echo "$tool_specified" >&6; }
26490      fi
26491    fi
26492  fi
26493
26494
26495
26496  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26497
26498  # Publish this variable in the help.
26499
26500
26501  if test "x$JARSIGNER" = x; then
26502    # The variable is not set by user, try to locate tool using the code snippet
26503
26504      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
26505$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
26506      JARSIGNER=$BOOT_JDK/bin/jarsigner
26507      if test ! -x $JARSIGNER; then
26508        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26509$as_echo "not found" >&6; }
26510        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26511$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26512        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
26513      fi
26514      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26515$as_echo "ok" >&6; }
26516
26517
26518  else
26519    # The variable is set, but is it from the command line or the environment?
26520
26521    # Try to remove the string !JARSIGNER! from our list.
26522    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
26523    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26524      # If it failed, the variable was not from the command line. Ignore it,
26525      # but warn the user (except for BASH, which is always set by the calling BASH).
26526      if test "xJARSIGNER" != xBASH; then
26527        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
26528$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
26529      fi
26530      # Try to locate tool using the code snippet
26531
26532      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
26533$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
26534      JARSIGNER=$BOOT_JDK/bin/jarsigner
26535      if test ! -x $JARSIGNER; then
26536        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26537$as_echo "not found" >&6; }
26538        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26539$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26540        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
26541      fi
26542      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26543$as_echo "ok" >&6; }
26544
26545
26546    else
26547      # If it succeeded, then it was overridden by the user. We will use it
26548      # for the tool.
26549
26550      # First remove it from the list of overridden variables, so we can test
26551      # for unknown variables in the end.
26552      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26553
26554      # Check if the provided tool contains a complete path.
26555      tool_specified="$JARSIGNER"
26556      tool_basename="${tool_specified##*/}"
26557      if test "x$tool_basename" = "x$tool_specified"; then
26558        # A command without a complete path is provided, search $PATH.
26559        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
26560$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
26561        # Extract the first word of "$tool_basename", so it can be a program name with args.
26562set dummy $tool_basename; ac_word=$2
26563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26564$as_echo_n "checking for $ac_word... " >&6; }
26565if ${ac_cv_path_JARSIGNER+:} false; then :
26566  $as_echo_n "(cached) " >&6
26567else
26568  case $JARSIGNER in
26569  [\\/]* | ?:[\\/]*)
26570  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
26571  ;;
26572  *)
26573  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26574for as_dir in $PATH
26575do
26576  IFS=$as_save_IFS
26577  test -z "$as_dir" && as_dir=.
26578    for ac_exec_ext in '' $ac_executable_extensions; do
26579  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26580    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
26581    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26582    break 2
26583  fi
26584done
26585  done
26586IFS=$as_save_IFS
26587
26588  ;;
26589esac
26590fi
26591JARSIGNER=$ac_cv_path_JARSIGNER
26592if test -n "$JARSIGNER"; then
26593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
26594$as_echo "$JARSIGNER" >&6; }
26595else
26596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26597$as_echo "no" >&6; }
26598fi
26599
26600
26601        if test "x$JARSIGNER" = x; then
26602          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26603        fi
26604      else
26605        # Otherwise we believe it is a complete path. Use it as it is.
26606        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
26607$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
26608        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
26609$as_echo_n "checking for JARSIGNER... " >&6; }
26610        if test ! -x "$tool_specified"; then
26611          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26612$as_echo "not found" >&6; }
26613          as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
26614        fi
26615        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26616$as_echo "$tool_specified" >&6; }
26617      fi
26618    fi
26619  fi
26620
26621
26622
26623  # Finally, set some other options...
26624
26625  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
26626  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
26627
26628
26629
26630
26631###############################################################################
26632#
26633# Configure the sources to use. We can add or override individual directories.
26634#
26635###############################################################################
26636
26637
26638  # Where are the sources. Any of these can be overridden
26639  # using --with-override-corba and the likes.
26640  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
26641  CORBA_TOPDIR="$SRC_ROOT/corba"
26642  JAXP_TOPDIR="$SRC_ROOT/jaxp"
26643  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
26644  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
26645  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
26646  JDK_TOPDIR="$SRC_ROOT/jdk"
26647
26648
26649
26650
26651
26652
26653
26654
26655
26656
26657  ###############################################################################
26658  #
26659  # Pickup additional source for a component from outside of the source root
26660  # or override source for a component.
26661  #
26662
26663# Check whether --with-add-source-root was given.
26664if test "${with_add_source_root+set}" = set; then :
26665  withval=$with_add_source_root;
26666fi
26667
26668
26669
26670# Check whether --with-override-source-root was given.
26671if test "${with_override_source_root+set}" = set; then :
26672  withval=$with_override_source_root;
26673fi
26674
26675
26676
26677# Check whether --with-adds-and-overrides was given.
26678if test "${with_adds_and_overrides+set}" = set; then :
26679  withval=$with_adds_and_overrides;
26680fi
26681
26682
26683  if test "x$with_adds_and_overrides" != x; then
26684    with_add_source_root="$with_adds_and_overrides/adds"
26685    with_override_source_root="$with_adds_and_overrides/overrides"
26686  fi
26687
26688  if test "x$with_add_source_root" != x; then
26689    if ! test -d $with_add_source_root; then
26690      as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
26691    fi
26692    CURDIR="$PWD"
26693    cd "$with_add_source_root"
26694    ADD_SRC_ROOT="`pwd`"
26695    cd "$CURDIR"
26696    # Verify that the addon source root does not have any root makefiles.
26697    # If it does, then it is usually an error, prevent this.
26698    if test -f $with_add_source_root/langtools/make/Makefile; then
26699      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
26700    fi
26701    if test -f $with_add_source_root/corba/make/Makefile; then
26702      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
26703    fi
26704    if test -f $with_add_source_root/jaxp/make/Makefile; then
26705      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
26706    fi
26707    if test -f $with_add_source_root/jaxws/make/Makefile; then
26708      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
26709    fi
26710    if test -f $with_add_source_root/hotspot/make/Makefile; then
26711      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
26712    fi
26713    if test -f $with_add_source_root/nashorn/make/Makefile; then
26714      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
26715    fi
26716    if test -f $with_add_source_root/jdk/make/Makefile; then
26717      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
26718    fi
26719  fi
26720
26721
26722  if test "x$with_override_source_root" != x; then
26723    if ! test -d $with_override_source_root; then
26724      as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
26725    fi
26726    CURDIR="$PWD"
26727    cd "$with_override_source_root"
26728    OVERRIDE_SRC_ROOT="`pwd`"
26729    cd "$CURDIR"
26730    if test -f $with_override_source_root/langtools/make/Makefile; then
26731      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
26732    fi
26733    if test -f $with_override_source_root/corba/make/Makefile; then
26734      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
26735    fi
26736    if test -f $with_override_source_root/jaxp/make/Makefile; then
26737      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
26738    fi
26739    if test -f $with_override_source_root/jaxws/make/Makefile; then
26740      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
26741    fi
26742    if test -f $with_override_source_root/hotspot/make/Makefile; then
26743      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
26744    fi
26745    if test -f $with_override_source_root/nashorn/make/Makefile; then
26746      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
26747    fi
26748    if test -f $with_override_source_root/jdk/make/Makefile; then
26749      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
26750    fi
26751  fi
26752
26753
26754  ###############################################################################
26755  #
26756  # Override a repo completely, this is used for example when you have 3 small
26757  # development sandboxes of the langtools sources and want to avoid having 3 full
26758  # OpenJDK sources checked out on disk.
26759  #
26760  # Assuming that the 3 langtools sandboxes are located here:
26761  # /home/fredrik/sandbox1/langtools
26762  # /home/fredrik/sandbox2/langtools
26763  # /home/fredrik/sandbox3/langtools
26764  #
26765  # From the source root you create build subdirs manually:
26766  #     mkdir -p build1 build2 build3
26767  # in each build directory run:
26768  #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
26769  #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
26770  #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
26771  #
26772
26773
26774# Check whether --with-override-langtools was given.
26775if test "${with_override_langtools+set}" = set; then :
26776  withval=$with_override_langtools;
26777fi
26778
26779
26780
26781# Check whether --with-override-corba was given.
26782if test "${with_override_corba+set}" = set; then :
26783  withval=$with_override_corba;
26784fi
26785
26786
26787
26788# Check whether --with-override-jaxp was given.
26789if test "${with_override_jaxp+set}" = set; then :
26790  withval=$with_override_jaxp;
26791fi
26792
26793
26794
26795# Check whether --with-override-jaxws was given.
26796if test "${with_override_jaxws+set}" = set; then :
26797  withval=$with_override_jaxws;
26798fi
26799
26800
26801
26802# Check whether --with-override-hotspot was given.
26803if test "${with_override_hotspot+set}" = set; then :
26804  withval=$with_override_hotspot;
26805fi
26806
26807
26808
26809# Check whether --with-override-nashorn was given.
26810if test "${with_override_nashorn+set}" = set; then :
26811  withval=$with_override_nashorn;
26812fi
26813
26814
26815
26816# Check whether --with-override-jdk was given.
26817if test "${with_override_jdk+set}" = set; then :
26818  withval=$with_override_jdk;
26819fi
26820
26821
26822  if test "x$with_override_langtools" != x; then
26823    CURDIR="$PWD"
26824    cd "$with_override_langtools"
26825    LANGTOOLS_TOPDIR="`pwd`"
26826    cd "$CURDIR"
26827    if ! test -f $LANGTOOLS_TOPDIR/make/Makefile; then
26828      as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
26829    fi
26830    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
26831$as_echo_n "checking if langtools should be overridden... " >&6; }
26832    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
26833$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
26834  fi
26835  if test "x$with_override_corba" != x; then
26836    CURDIR="$PWD"
26837    cd "$with_override_corba"
26838    CORBA_TOPDIR="`pwd`"
26839    cd "$CURDIR"
26840    if ! test -f $CORBA_TOPDIR/make/Makefile; then
26841      as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
26842    fi
26843    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
26844$as_echo_n "checking if corba should be overridden... " >&6; }
26845    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
26846$as_echo "yes with $CORBA_TOPDIR" >&6; }
26847  fi
26848  if test "x$with_override_jaxp" != x; then
26849    CURDIR="$PWD"
26850    cd "$with_override_jaxp"
26851    JAXP_TOPDIR="`pwd`"
26852    cd "$CURDIR"
26853    if ! test -f $JAXP_TOPDIR/make/Makefile; then
26854      as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
26855    fi
26856    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
26857$as_echo_n "checking if jaxp should be overridden... " >&6; }
26858    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
26859$as_echo "yes with $JAXP_TOPDIR" >&6; }
26860  fi
26861  if test "x$with_override_jaxws" != x; then
26862    CURDIR="$PWD"
26863    cd "$with_override_jaxws"
26864    JAXWS_TOPDIR="`pwd`"
26865    cd "$CURDIR"
26866    if ! test -f $JAXWS_TOPDIR/make/Makefile; then
26867      as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
26868    fi
26869    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
26870$as_echo_n "checking if jaxws should be overridden... " >&6; }
26871    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
26872$as_echo "yes with $JAXWS_TOPDIR" >&6; }
26873  fi
26874  if test "x$with_override_hotspot" != x; then
26875    CURDIR="$PWD"
26876    cd "$with_override_hotspot"
26877    HOTSPOT_TOPDIR="`pwd`"
26878    cd "$CURDIR"
26879    if ! test -f $HOTSPOT_TOPDIR/make/Makefile; then
26880      as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
26881    fi
26882    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
26883$as_echo_n "checking if hotspot should be overridden... " >&6; }
26884    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
26885$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
26886  fi
26887  if test "x$with_override_nashorn" != x; then
26888    CURDIR="$PWD"
26889    cd "$with_override_nashorn"
26890    NASHORN_TOPDIR="`pwd`"
26891    cd "$CURDIR"
26892    if ! test -f $NASHORN_TOPDIR/make/Makefile; then
26893      as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
26894    fi
26895    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
26896$as_echo_n "checking if nashorn should be overridden... " >&6; }
26897    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
26898$as_echo "yes with $NASHORN_TOPDIR" >&6; }
26899  fi
26900  if test "x$with_override_jdk" != x; then
26901    CURDIR="$PWD"
26902    cd "$with_override_jdk"
26903    JDK_TOPDIR="`pwd`"
26904    cd "$CURDIR"
26905    if ! test -f $JDK_TOPDIR/make/Makefile; then
26906      as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
26907    fi
26908    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
26909$as_echo_n "checking if JDK should be overridden... " >&6; }
26910    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
26911$as_echo "yes with $JDK_TOPDIR" >&6; }
26912  fi
26913
26914
26915  BUILD_OUTPUT="$OUTPUT_ROOT"
26916
26917
26918  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
26919  BUILD_HOTSPOT=true
26920
26921
26922
26923# Check whether --with-import-hotspot was given.
26924if test "${with_import_hotspot+set}" = set; then :
26925  withval=$with_import_hotspot;
26926fi
26927
26928  if test "x$with_import_hotspot" != x; then
26929    CURDIR="$PWD"
26930    cd "$with_import_hotspot"
26931    HOTSPOT_DIST="`pwd`"
26932    cd "$CURDIR"
26933    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
26934      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
26935    fi
26936    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
26937$as_echo_n "checking if hotspot should be imported... " >&6; }
26938    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
26939$as_echo "yes from $HOTSPOT_DIST" >&6; }
26940    BUILD_HOTSPOT=false
26941  fi
26942
26943  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
26944
26945
26946###############################################################################
26947#
26948# Setup the toolchain (compilers etc), i.e. tools used to compile and process
26949# native code.
26950#
26951###############################################################################
26952
26953# First determine the toolchain type (compiler family)
26954
26955
26956# Check whether --with-toolchain-type was given.
26957if test "${with_toolchain_type+set}" = set; then :
26958  withval=$with_toolchain_type;
26959fi
26960
26961
26962  # Use indirect variable referencing
26963  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
26964  VALID_TOOLCHAINS=${!toolchain_var_name}
26965
26966  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26967    if test -n "$XCODEBUILD"; then
26968      # On Mac OS X, default toolchain to clang after Xcode 5
26969      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
26970      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
26971      if test $? -ne 0; then
26972        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
26973      fi
26974      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
26975          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
26976          $CUT -f 1 -d .`
26977      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
26978$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
26979      if test $XCODE_MAJOR_VERSION -ge 5; then
26980          DEFAULT_TOOLCHAIN="clang"
26981      else
26982          DEFAULT_TOOLCHAIN="gcc"
26983      fi
26984    else
26985      # If Xcode is not installed, but the command line tools are
26986      # then we can't run xcodebuild. On these systems we should
26987      # default to clang
26988      DEFAULT_TOOLCHAIN="clang"
26989    fi
26990  else
26991    # First toolchain type in the list is the default
26992    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
26993  fi
26994
26995  if test "x$with_toolchain_type" = xlist; then
26996    # List all toolchains
26997    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
26998$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
26999    for toolchain in $VALID_TOOLCHAINS; do
27000      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
27001      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
27002      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
27003    done
27004
27005    exit 0
27006  elif test "x$with_toolchain_type" != x; then
27007    # User override; check that it is valid
27008    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
27009      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
27010$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
27011      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
27012$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
27013      as_fn_error $? "Cannot continue." "$LINENO" 5
27014    fi
27015    TOOLCHAIN_TYPE=$with_toolchain_type
27016  else
27017    # No flag given, use default
27018    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
27019  fi
27020
27021
27022  TOOLCHAIN_CC_BINARY_clang="clang"
27023  TOOLCHAIN_CC_BINARY_gcc="gcc"
27024  TOOLCHAIN_CC_BINARY_microsoft="cl"
27025  TOOLCHAIN_CC_BINARY_solstudio="cc"
27026  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
27027
27028  TOOLCHAIN_CXX_BINARY_clang="clang++"
27029  TOOLCHAIN_CXX_BINARY_gcc="g++"
27030  TOOLCHAIN_CXX_BINARY_microsoft="cl"
27031  TOOLCHAIN_CXX_BINARY_solstudio="CC"
27032  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
27033
27034  # Use indirect variable referencing
27035  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
27036  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
27037  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
27038  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
27039  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
27040  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
27041
27042
27043  # Define filename patterns
27044  if test "x$OPENJDK_TARGET_OS" = xwindows; then
27045    LIBRARY_PREFIX=
27046    SHARED_LIBRARY_SUFFIX='.dll'
27047    STATIC_LIBRARY_SUFFIX='.lib'
27048    SHARED_LIBRARY='$1.dll'
27049    STATIC_LIBRARY='$1.lib'
27050    OBJ_SUFFIX='.obj'
27051    EXE_SUFFIX='.exe'
27052  else
27053    LIBRARY_PREFIX=lib
27054    SHARED_LIBRARY_SUFFIX='.so'
27055    STATIC_LIBRARY_SUFFIX='.a'
27056    SHARED_LIBRARY='lib$1.so'
27057    STATIC_LIBRARY='lib$1.a'
27058    OBJ_SUFFIX='.o'
27059    EXE_SUFFIX=''
27060    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
27061      SHARED_LIBRARY='lib$1.dylib'
27062      SHARED_LIBRARY_SUFFIX='.dylib'
27063    fi
27064  fi
27065
27066
27067
27068
27069
27070
27071
27072
27073
27074
27075  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
27076    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
27077$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
27078  else
27079    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
27080$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
27081  fi
27082
27083
27084# Then detect the actual binaries needed
27085
27086  # FIXME: Is this needed?
27087  ac_ext=cpp
27088ac_cpp='$CXXCPP $CPPFLAGS'
27089ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
27090ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
27091ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
27092
27093
27094  # Store the CFLAGS etc passed to the configure script.
27095  ORG_CFLAGS="$CFLAGS"
27096  ORG_CXXFLAGS="$CXXFLAGS"
27097
27098  # autoconf magic only relies on PATH, so update it if tools dir is specified
27099  OLD_PATH="$PATH"
27100
27101  # On Windows, we need to detect the visual studio installation first.
27102  # This will change the PATH, but we need to keep that new PATH even
27103  # after toolchain detection is done, since the compiler (on x86) uses
27104  # it for DLL resolution in runtime.
27105  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
27106      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
27107
27108  # Store path to cygwin link.exe to help excluding it when searching for
27109  # VS linker. This must be done before changing the PATH when looking for VS.
27110  # Extract the first word of "link", so it can be a program name with args.
27111set dummy link; ac_word=$2
27112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27113$as_echo_n "checking for $ac_word... " >&6; }
27114if ${ac_cv_path_CYGWIN_LINK+:} false; then :
27115  $as_echo_n "(cached) " >&6
27116else
27117  case $CYGWIN_LINK in
27118  [\\/]* | ?:[\\/]*)
27119  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
27120  ;;
27121  *)
27122  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27123for as_dir in $PATH
27124do
27125  IFS=$as_save_IFS
27126  test -z "$as_dir" && as_dir=.
27127    for ac_exec_ext in '' $ac_executable_extensions; do
27128  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27129    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
27130    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27131    break 2
27132  fi
27133done
27134  done
27135IFS=$as_save_IFS
27136
27137  ;;
27138esac
27139fi
27140CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
27141if test -n "$CYGWIN_LINK"; then
27142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
27143$as_echo "$CYGWIN_LINK" >&6; }
27144else
27145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27146$as_echo "no" >&6; }
27147fi
27148
27149
27150  if test "x$CYGWIN_LINK" != x; then
27151    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
27152$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
27153    "$CYGWIN_LINK" --version > /dev/null
27154    if test $? -eq 0 ; then
27155      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
27156$as_echo "yes" >&6; }
27157    else
27158      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27159$as_echo "no" >&6; }
27160      # This might be the VS linker. Don't exclude it later on.
27161      CYGWIN_LINK=""
27162    fi
27163  fi
27164
27165  # First-hand choice is to locate and run the vsvars bat file.
27166
27167
27168# Check whether --with-toolchain-version was given.
27169if test "${with_toolchain_version+set}" = set; then :
27170  withval=$with_toolchain_version;
27171fi
27172
27173
27174  if test "x$with_toolchain_version" = xlist; then
27175    # List all toolchains
27176    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
27177$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
27178    for version in $VALID_VS_VERSIONS; do
27179      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
27180      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
27181    done
27182
27183    exit 0
27184  elif test "x$DEVKIT_VS_VERSION" != x; then
27185    VS_VERSION=$DEVKIT_VS_VERSION
27186    TOOLCHAIN_VERSION=$VS_VERSION
27187    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
27188    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
27189    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
27190    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
27191    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27192    VS_PATH="$TOOLCHAIN_PATH:$PATH"
27193
27194    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
27195    # can still be exported as INCLUDE for compiler invocations without
27196    # SYSROOT_CFLAGS
27197    OLDIFS="$IFS"
27198    IFS=";"
27199    for i in $DEVKIT_VS_INCLUDE; do
27200      ipath=$i
27201
27202  unix_path="$ipath"
27203  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27204    windows_path=`$CYGPATH -m "$unix_path"`
27205    ipath="$windows_path"
27206  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27207    windows_path=`cmd //c echo $unix_path`
27208    ipath="$windows_path"
27209  fi
27210
27211      VS_INCLUDE="$VS_INCLUDE;$ipath"
27212    done
27213    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
27214    # as LIB for compiler invocations without SYSROOT_LDFLAGS
27215    for i in $DEVKIT_VS_LIB; do
27216      libpath=$i
27217
27218  unix_path="$libpath"
27219  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27220    windows_path=`$CYGPATH -m "$unix_path"`
27221    libpath="$windows_path"
27222  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27223    windows_path=`cmd //c echo $unix_path`
27224    libpath="$windows_path"
27225  fi
27226
27227      VS_LIB="$VS_LIB;$libpath"
27228    done
27229    IFS="$OLDIFS"
27230
27231    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
27232$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
27233
27234  elif test "x$with_toolchain_version" != x; then
27235    # User override; check that it is valid
27236    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
27237      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
27238$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
27239      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
27240$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
27241      as_fn_error $? "Cannot continue." "$LINENO" 5
27242    fi
27243    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
27244  else
27245    # No flag given, use default
27246    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
27247  fi
27248
27249  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
27250
27251  VS_VERSION="$VS_VERSION"
27252  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
27253  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
27254  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
27255  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
27256
27257  # When using --with-tools-dir, assume it points to the correct and default
27258  # version of Visual Studio or that --with-toolchain-version was also set.
27259  if test "x$with_tools_dir" != x; then
27260
27261  if test "x$VS_ENV_CMD" = x; then
27262    VS_VERSION="${VS_VERSION}"
27263    VS_BASE="$with_tools_dir/../.."
27264    METHOD="--with-tools-dir"
27265
27266    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27267      VCVARSFILE="vc/bin/vcvars32.bat"
27268    else
27269      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27270    fi
27271
27272
27273  windows_path="$VS_BASE"
27274  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27275    unix_path=`$CYGPATH -u "$windows_path"`
27276    VS_BASE="$unix_path"
27277  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27278    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27279    VS_BASE="$unix_path"
27280  fi
27281
27282    if test -d "$VS_BASE"; then
27283      if test -f "$VS_BASE/$VCVARSFILE"; then
27284        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27285$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27286        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27287        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27288        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27289        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27290      else
27291        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27292$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27293        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27294$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27295      fi
27296    fi
27297  fi
27298
27299
27300  if test "x$VS_ENV_CMD" = x; then
27301    VS_VERSION="${VS_VERSION}"
27302    VS_BASE="$with_tools_dir/../../.."
27303    METHOD="--with-tools-dir"
27304
27305    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27306      VCVARSFILE="vc/bin/vcvars32.bat"
27307    else
27308      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27309    fi
27310
27311
27312  windows_path="$VS_BASE"
27313  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27314    unix_path=`$CYGPATH -u "$windows_path"`
27315    VS_BASE="$unix_path"
27316  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27317    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27318    VS_BASE="$unix_path"
27319  fi
27320
27321    if test -d "$VS_BASE"; then
27322      if test -f "$VS_BASE/$VCVARSFILE"; then
27323        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27324$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27325        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27326        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27327        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27328        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27329      else
27330        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27331$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27332        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27333$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27334      fi
27335    fi
27336  fi
27337
27338    if test "x$VS_ENV_CMD" = x; then
27339      # Having specified an argument which is incorrect will produce an instant failure;
27340      # we should not go on looking
27341      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
27342$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
27343      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
27344$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
27345      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
27346$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
27347      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
27348    fi
27349  fi
27350
27351  VS_ENV_CMD=""
27352  VS_ENV_ARGS=""
27353
27354  if test "x$VS_COMNTOOLS" != x; then
27355
27356  if test "x$VS_ENV_CMD" = x; then
27357    VS_VERSION="${VS_VERSION}"
27358    VS_BASE="$VS_COMNTOOLS/../.."
27359    METHOD="$VS_COMNTOOLS_VAR variable"
27360
27361    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27362      VCVARSFILE="vc/bin/vcvars32.bat"
27363    else
27364      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27365    fi
27366
27367
27368  windows_path="$VS_BASE"
27369  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27370    unix_path=`$CYGPATH -u "$windows_path"`
27371    VS_BASE="$unix_path"
27372  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27373    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27374    VS_BASE="$unix_path"
27375  fi
27376
27377    if test -d "$VS_BASE"; then
27378      if test -f "$VS_BASE/$VCVARSFILE"; then
27379        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27380$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27381        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27382        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27383        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27384        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27385      else
27386        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27387$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27388        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27389$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27390      fi
27391    fi
27392  fi
27393
27394  fi
27395  if test "x$PROGRAMFILES" != x; then
27396
27397  if test "x$VS_ENV_CMD" = x; then
27398    VS_VERSION="${VS_VERSION}"
27399    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
27400    METHOD="well-known name"
27401
27402    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27403      VCVARSFILE="vc/bin/vcvars32.bat"
27404    else
27405      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27406    fi
27407
27408
27409  windows_path="$VS_BASE"
27410  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27411    unix_path=`$CYGPATH -u "$windows_path"`
27412    VS_BASE="$unix_path"
27413  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27414    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27415    VS_BASE="$unix_path"
27416  fi
27417
27418    if test -d "$VS_BASE"; then
27419      if test -f "$VS_BASE/$VCVARSFILE"; then
27420        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27421$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27422        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27423        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27424        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27425        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27426      else
27427        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27428$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27429        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27430$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27431      fi
27432    fi
27433  fi
27434
27435  fi
27436  # Work around the insanely named ProgramFiles(x86) env variable
27437  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
27438  if test "x$PROGRAMFILES_X86" != x; then
27439
27440  if test "x$VS_ENV_CMD" = x; then
27441    VS_VERSION="${VS_VERSION}"
27442    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
27443    METHOD="well-known name"
27444
27445    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27446      VCVARSFILE="vc/bin/vcvars32.bat"
27447    else
27448      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27449    fi
27450
27451
27452  windows_path="$VS_BASE"
27453  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27454    unix_path=`$CYGPATH -u "$windows_path"`
27455    VS_BASE="$unix_path"
27456  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27457    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27458    VS_BASE="$unix_path"
27459  fi
27460
27461    if test -d "$VS_BASE"; then
27462      if test -f "$VS_BASE/$VCVARSFILE"; then
27463        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27464$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27465        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27466        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27467        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27468        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27469      else
27470        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27471$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27472        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27473$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27474      fi
27475    fi
27476  fi
27477
27478  fi
27479
27480  if test "x$VS_ENV_CMD" = x; then
27481    VS_VERSION="${VS_VERSION}"
27482    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
27483    METHOD="well-known name"
27484
27485    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27486      VCVARSFILE="vc/bin/vcvars32.bat"
27487    else
27488      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27489    fi
27490
27491
27492  windows_path="$VS_BASE"
27493  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27494    unix_path=`$CYGPATH -u "$windows_path"`
27495    VS_BASE="$unix_path"
27496  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27497    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27498    VS_BASE="$unix_path"
27499  fi
27500
27501    if test -d "$VS_BASE"; then
27502      if test -f "$VS_BASE/$VCVARSFILE"; then
27503        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27504$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27505        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27506        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27507        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27508        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27509      else
27510        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27511$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27512        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27513$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27514      fi
27515    fi
27516  fi
27517
27518
27519  if test "x$VS_ENV_CMD" = x; then
27520    VS_VERSION="${VS_VERSION}"
27521    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
27522    METHOD="well-known name"
27523
27524    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27525      VCVARSFILE="vc/bin/vcvars32.bat"
27526    else
27527      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27528    fi
27529
27530
27531  windows_path="$VS_BASE"
27532  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27533    unix_path=`$CYGPATH -u "$windows_path"`
27534    VS_BASE="$unix_path"
27535  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27536    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27537    VS_BASE="$unix_path"
27538  fi
27539
27540    if test -d "$VS_BASE"; then
27541      if test -f "$VS_BASE/$VCVARSFILE"; then
27542        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27543$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27544        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27545        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27546        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27547        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27548      else
27549        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27550$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27551        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27552$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27553      fi
27554    fi
27555  fi
27556
27557
27558  if test "x$SDK_INSTALL_DIR" != x; then
27559    if test "x$ProgramW6432" != x; then
27560
27561  if test "x$VS_ENV_CMD" = x; then
27562    VS_VERSION="${VS_VERSION}"
27563    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
27564    METHOD="well-known name"
27565
27566  windows_path="$WIN_SDK_BASE"
27567  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27568    unix_path=`$CYGPATH -u "$windows_path"`
27569    WIN_SDK_BASE="$unix_path"
27570  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27571    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27572    WIN_SDK_BASE="$unix_path"
27573  fi
27574
27575    if test -d "$WIN_SDK_BASE"; then
27576      # There have been cases of partial or broken SDK installations. A missing
27577      # lib dir is not going to work.
27578      if test ! -d "$WIN_SDK_BASE/lib"; then
27579        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27580$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27581        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27582$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27583      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27584        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27585$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27586        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27587        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27588          VS_ENV_ARGS="/x86"
27589        else
27590          VS_ENV_ARGS="/x64"
27591        fi
27592        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27593        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27594        # TODO: improve detection for other versions of SDK
27595        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27596      else
27597        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27598$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27599        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27600$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27601      fi
27602    fi
27603  fi
27604
27605    fi
27606    if test "x$PROGRAMW6432" != x; then
27607
27608  if test "x$VS_ENV_CMD" = x; then
27609    VS_VERSION="${VS_VERSION}"
27610    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
27611    METHOD="well-known name"
27612
27613  windows_path="$WIN_SDK_BASE"
27614  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27615    unix_path=`$CYGPATH -u "$windows_path"`
27616    WIN_SDK_BASE="$unix_path"
27617  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27618    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27619    WIN_SDK_BASE="$unix_path"
27620  fi
27621
27622    if test -d "$WIN_SDK_BASE"; then
27623      # There have been cases of partial or broken SDK installations. A missing
27624      # lib dir is not going to work.
27625      if test ! -d "$WIN_SDK_BASE/lib"; then
27626        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27627$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27628        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27629$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27630      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27631        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27632$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27633        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27634        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27635          VS_ENV_ARGS="/x86"
27636        else
27637          VS_ENV_ARGS="/x64"
27638        fi
27639        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27640        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27641        # TODO: improve detection for other versions of SDK
27642        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27643      else
27644        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27645$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27646        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27647$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27648      fi
27649    fi
27650  fi
27651
27652    fi
27653    if test "x$PROGRAMFILES" != x; then
27654
27655  if test "x$VS_ENV_CMD" = x; then
27656    VS_VERSION="${VS_VERSION}"
27657    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
27658    METHOD="well-known name"
27659
27660  windows_path="$WIN_SDK_BASE"
27661  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27662    unix_path=`$CYGPATH -u "$windows_path"`
27663    WIN_SDK_BASE="$unix_path"
27664  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27665    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27666    WIN_SDK_BASE="$unix_path"
27667  fi
27668
27669    if test -d "$WIN_SDK_BASE"; then
27670      # There have been cases of partial or broken SDK installations. A missing
27671      # lib dir is not going to work.
27672      if test ! -d "$WIN_SDK_BASE/lib"; then
27673        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27674$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27675        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27676$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27677      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27678        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27679$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27680        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27681        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27682          VS_ENV_ARGS="/x86"
27683        else
27684          VS_ENV_ARGS="/x64"
27685        fi
27686        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27687        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27688        # TODO: improve detection for other versions of SDK
27689        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27690      else
27691        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27692$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27693        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27694$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27695      fi
27696    fi
27697  fi
27698
27699    fi
27700
27701  if test "x$VS_ENV_CMD" = x; then
27702    VS_VERSION="${VS_VERSION}"
27703    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
27704    METHOD="well-known name"
27705
27706  windows_path="$WIN_SDK_BASE"
27707  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27708    unix_path=`$CYGPATH -u "$windows_path"`
27709    WIN_SDK_BASE="$unix_path"
27710  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27711    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27712    WIN_SDK_BASE="$unix_path"
27713  fi
27714
27715    if test -d "$WIN_SDK_BASE"; then
27716      # There have been cases of partial or broken SDK installations. A missing
27717      # lib dir is not going to work.
27718      if test ! -d "$WIN_SDK_BASE/lib"; then
27719        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27720$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27721        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27722$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27723      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27724        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27725$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27726        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27727        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27728          VS_ENV_ARGS="/x86"
27729        else
27730          VS_ENV_ARGS="/x64"
27731        fi
27732        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27733        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27734        # TODO: improve detection for other versions of SDK
27735        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27736      else
27737        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27738$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27739        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27740$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27741      fi
27742    fi
27743  fi
27744
27745
27746  if test "x$VS_ENV_CMD" = x; then
27747    VS_VERSION="${VS_VERSION}"
27748    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
27749    METHOD="well-known name"
27750
27751  windows_path="$WIN_SDK_BASE"
27752  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27753    unix_path=`$CYGPATH -u "$windows_path"`
27754    WIN_SDK_BASE="$unix_path"
27755  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27756    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27757    WIN_SDK_BASE="$unix_path"
27758  fi
27759
27760    if test -d "$WIN_SDK_BASE"; then
27761      # There have been cases of partial or broken SDK installations. A missing
27762      # lib dir is not going to work.
27763      if test ! -d "$WIN_SDK_BASE/lib"; then
27764        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27765$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27766        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27767$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27768      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27769        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27770$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27771        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27772        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27773          VS_ENV_ARGS="/x86"
27774        else
27775          VS_ENV_ARGS="/x64"
27776        fi
27777        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27778        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27779        # TODO: improve detection for other versions of SDK
27780        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27781      else
27782        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27783$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27784        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27785$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27786      fi
27787    fi
27788  fi
27789
27790  fi
27791
27792    if test "x$VS_ENV_CMD" != x; then
27793      TOOLCHAIN_VERSION=$VS_VERSION
27794      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
27795      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
27796      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
27797      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
27798      # The rest of the variables are already evaled while probing
27799      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
27800$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
27801      break
27802    fi
27803  done
27804
27805
27806  # If we have a devkit, skip all of the below.
27807  if test "x$DEVKIT_VS_VERSION" = x; then
27808    if test "x$VS_ENV_CMD" != x; then
27809      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
27810
27811  # Only process if variable expands to non-empty
27812
27813  if test "x$VS_ENV_CMD" != x; then
27814    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27815
27816  # First separate the path from the arguments. This will split at the first
27817  # space.
27818  complete="$VS_ENV_CMD"
27819  path="${complete%% *}"
27820  tmp="$complete EOL"
27821  arguments="${tmp#* }"
27822
27823  # Input might be given as Windows format, start by converting to
27824  # unix format.
27825  new_path=`$CYGPATH -u "$path"`
27826
27827  # Now try to locate executable using which
27828  new_path=`$WHICH "$new_path" 2> /dev/null`
27829  # bat and cmd files are not always considered executable in cygwin causing which
27830  # to not find them
27831  if test "x$new_path" = x \
27832      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27833      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27834    new_path=`$CYGPATH -u "$path"`
27835  fi
27836  if test "x$new_path" = x; then
27837    # Oops. Which didn't find the executable.
27838    # The splitting of arguments from the executable at a space might have been incorrect,
27839    # since paths with space are more likely in Windows. Give it another try with the whole
27840    # argument.
27841    path="$complete"
27842    arguments="EOL"
27843    new_path=`$CYGPATH -u "$path"`
27844    new_path=`$WHICH "$new_path" 2> /dev/null`
27845    # bat and cmd files are not always considered executable in cygwin causing which
27846    # to not find them
27847    if test "x$new_path" = x \
27848        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27849        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27850      new_path=`$CYGPATH -u "$path"`
27851    fi
27852    if test "x$new_path" = x; then
27853      # It's still not found. Now this is an unrecoverable error.
27854      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27855$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27856      has_space=`$ECHO "$complete" | $GREP " "`
27857      if test "x$has_space" != x; then
27858        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27859$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27860      fi
27861      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27862    fi
27863  fi
27864
27865  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27866  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27867  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27868  # "foo.exe" is OK but "foo" is an error.
27869  #
27870  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27871  # It is also a way to make sure we got the proper file name for the real test later on.
27872  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27873  if test "x$test_shortpath" = x; then
27874    # Short path failed, file does not exist as specified.
27875    # Try adding .exe or .cmd
27876    if test -f "${new_path}.exe"; then
27877      input_to_shortpath="${new_path}.exe"
27878    elif test -f "${new_path}.cmd"; then
27879      input_to_shortpath="${new_path}.cmd"
27880    else
27881      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
27882$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
27883      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27884$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27885      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27886    fi
27887  else
27888    input_to_shortpath="$new_path"
27889  fi
27890
27891  # Call helper function which possibly converts this using DOS-style short mode.
27892  # If so, the updated path is stored in $new_path.
27893  new_path="$input_to_shortpath"
27894
27895  input_path="$input_to_shortpath"
27896  # Check if we need to convert this using DOS-style short mode. If the path
27897  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27898  # take no chances and rewrite it.
27899  # Note: m4 eats our [], so we need to use [ and ] instead.
27900  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27901  if test "x$has_forbidden_chars" != x; then
27902    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27903    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27904    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27905    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27906      # Going to short mode and back again did indeed matter. Since short mode is
27907      # case insensitive, let's make it lowercase to improve readability.
27908      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27909      # Now convert it back to Unix-style (cygpath)
27910      input_path=`$CYGPATH -u "$shortmode_path"`
27911      new_path="$input_path"
27912    fi
27913  fi
27914
27915  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27916  if test "x$test_cygdrive_prefix" = x; then
27917    # As a simple fix, exclude /usr/bin since it's not a real path.
27918    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27919      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27920      # a path prefixed by /cygdrive for fixpath to work.
27921      new_path="$CYGWIN_ROOT_PATH$input_path"
27922    fi
27923  fi
27924
27925  # remove trailing .exe if any
27926  new_path="${new_path/%.exe/}"
27927
27928    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27929
27930  # First separate the path from the arguments. This will split at the first
27931  # space.
27932  complete="$VS_ENV_CMD"
27933  path="${complete%% *}"
27934  tmp="$complete EOL"
27935  arguments="${tmp#* }"
27936
27937  # Input might be given as Windows format, start by converting to
27938  # unix format.
27939  new_path="$path"
27940
27941  windows_path="$new_path"
27942  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27943    unix_path=`$CYGPATH -u "$windows_path"`
27944    new_path="$unix_path"
27945  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27946    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27947    new_path="$unix_path"
27948  fi
27949
27950
27951  # Now try to locate executable using which
27952  new_path=`$WHICH "$new_path" 2> /dev/null`
27953
27954  if test "x$new_path" = x; then
27955    # Oops. Which didn't find the executable.
27956    # The splitting of arguments from the executable at a space might have been incorrect,
27957    # since paths with space are more likely in Windows. Give it another try with the whole
27958    # argument.
27959    path="$complete"
27960    arguments="EOL"
27961    new_path="$path"
27962
27963  windows_path="$new_path"
27964  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27965    unix_path=`$CYGPATH -u "$windows_path"`
27966    new_path="$unix_path"
27967  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27968    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27969    new_path="$unix_path"
27970  fi
27971
27972
27973    new_path=`$WHICH "$new_path" 2> /dev/null`
27974    # bat and cmd files are not always considered executable in MSYS causing which
27975    # to not find them
27976    if test "x$new_path" = x \
27977        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27978        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27979      new_path="$path"
27980
27981  windows_path="$new_path"
27982  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27983    unix_path=`$CYGPATH -u "$windows_path"`
27984    new_path="$unix_path"
27985  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27986    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27987    new_path="$unix_path"
27988  fi
27989
27990    fi
27991
27992    if test "x$new_path" = x; then
27993      # It's still not found. Now this is an unrecoverable error.
27994      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27995$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27996      has_space=`$ECHO "$complete" | $GREP " "`
27997      if test "x$has_space" != x; then
27998        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27999$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28000      fi
28001      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
28002    fi
28003  fi
28004
28005  # Now new_path has a complete unix path to the binary
28006  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28007    # Keep paths in /bin as-is, but remove trailing .exe if any
28008    new_path="${new_path/%.exe/}"
28009    # Do not save /bin paths to all_fixpath_prefixes!
28010  else
28011    # Not in mixed or Windows style, start by that.
28012    new_path=`cmd //c echo $new_path`
28013
28014  input_path="$new_path"
28015  # Check if we need to convert this using DOS-style short mode. If the path
28016  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28017  # take no chances and rewrite it.
28018  # Note: m4 eats our [], so we need to use [ and ] instead.
28019  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28020  if test "x$has_forbidden_chars" != x; then
28021    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28022    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28023  fi
28024
28025    # Output is in $new_path
28026
28027  windows_path="$new_path"
28028  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28029    unix_path=`$CYGPATH -u "$windows_path"`
28030    new_path="$unix_path"
28031  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28032    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28033    new_path="$unix_path"
28034  fi
28035
28036    # remove trailing .exe if any
28037    new_path="${new_path/%.exe/}"
28038
28039    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28040    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28041  fi
28042
28043    else
28044      # We're on a unix platform. Hooray! :)
28045      # First separate the path from the arguments. This will split at the first
28046      # space.
28047      complete="$VS_ENV_CMD"
28048      path="${complete%% *}"
28049      tmp="$complete EOL"
28050      arguments="${tmp#* }"
28051
28052      # Cannot rely on the command "which" here since it doesn't always work.
28053      is_absolute_path=`$ECHO "$path" | $GREP ^/`
28054      if test -z "$is_absolute_path"; then
28055        # Path to executable is not absolute. Find it.
28056        IFS_save="$IFS"
28057        IFS=:
28058        for p in $PATH; do
28059          if test -f "$p/$path" && test -x "$p/$path"; then
28060            new_path="$p/$path"
28061            break
28062          fi
28063        done
28064        IFS="$IFS_save"
28065      else
28066        # This is an absolute path, we can use it without further modifications.
28067        new_path="$path"
28068      fi
28069
28070      if test "x$new_path" = x; then
28071        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
28072$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
28073        has_space=`$ECHO "$complete" | $GREP " "`
28074        if test "x$has_space" != x; then
28075          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28076$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28077        fi
28078        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
28079      fi
28080    fi
28081
28082    # Now join together the path and the arguments once again
28083    if test "x$arguments" != xEOL; then
28084      new_complete="$new_path ${arguments% *}"
28085    else
28086      new_complete="$new_path"
28087    fi
28088
28089    if test "x$complete" != "x$new_complete"; then
28090      VS_ENV_CMD="$new_complete"
28091      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
28092$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
28093    fi
28094  fi
28095
28096
28097      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
28098      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
28099$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
28100
28101      # We need to create a couple of temporary files.
28102      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
28103      $MKDIR -p $VS_ENV_TMP_DIR
28104
28105      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
28106      # Instead create a shell script which will set the relevant variables when run.
28107      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
28108
28109  unix_path="$WINPATH_VS_ENV_CMD"
28110  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28111    windows_path=`$CYGPATH -m "$unix_path"`
28112    WINPATH_VS_ENV_CMD="$windows_path"
28113  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28114    windows_path=`cmd //c echo $unix_path`
28115    WINPATH_VS_ENV_CMD="$windows_path"
28116  fi
28117
28118      WINPATH_BASH="$BASH"
28119
28120  unix_path="$WINPATH_BASH"
28121  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28122    windows_path=`$CYGPATH -m "$unix_path"`
28123    WINPATH_BASH="$windows_path"
28124  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28125    windows_path=`cmd //c echo $unix_path`
28126    WINPATH_BASH="$windows_path"
28127  fi
28128
28129
28130      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
28131      # script (executable by bash) that will setup the important variables.
28132      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
28133      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
28134      # This will end up something like:
28135      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
28136      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
28137      # These will end up something like:
28138      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
28139      # The trailing space for everyone except PATH is no typo, but is needed due
28140      # to trailing \ in the Windows paths. These will be stripped later.
28141      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
28142          >> $EXTRACT_VC_ENV_BAT_FILE
28143      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
28144          >> $EXTRACT_VC_ENV_BAT_FILE
28145      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
28146          >> $EXTRACT_VC_ENV_BAT_FILE
28147      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
28148          >> $EXTRACT_VC_ENV_BAT_FILE
28149      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
28150          >> $EXTRACT_VC_ENV_BAT_FILE
28151      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
28152          >> $EXTRACT_VC_ENV_BAT_FILE
28153
28154      # Now execute the newly created bat file.
28155      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
28156      # Change directory so we don't need to mess with Windows paths in redirects.
28157      cd $VS_ENV_TMP_DIR
28158      cmd /c extract-vs-env.bat | $CAT
28159      cd $CURDIR
28160
28161      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
28162        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
28163$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
28164        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
28165$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
28166        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
28167$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
28168        as_fn_error $? "Cannot continue" "$LINENO" 5
28169      fi
28170
28171      # Now set all paths and other env variables. This will allow the rest of
28172      # the configure script to find and run the compiler in the proper way.
28173      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
28174$as_echo "$as_me: Setting extracted environment variables" >&6;}
28175      . $VS_ENV_TMP_DIR/set-vs-env.sh
28176      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
28177      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
28178    else
28179      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
28180      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
28181$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
28182    fi
28183  fi
28184
28185  # At this point, we should have correct variables in the environment, or we can't continue.
28186  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
28187$as_echo_n "checking for Visual Studio variables... " >&6; }
28188
28189  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
28190      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
28191    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
28192      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
28193$as_echo "present but broken" >&6; }
28194      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
28195    else
28196      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28197$as_echo "ok" >&6; }
28198      # Remove any trailing "\" ";" and " " from the variables.
28199      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
28200      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
28201      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
28202      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
28203      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
28204      # Remove any paths containing # (typically F#) as that messes up make. This
28205      # is needed if visual studio was installed with F# support.
28206      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
28207
28208
28209
28210
28211
28212      # Convert VS_INCLUDE into SYSROOT_CFLAGS
28213      OLDIFS="$IFS"
28214      IFS=";"
28215      for i in $VS_INCLUDE; do
28216        ipath=$i
28217        # Only process non-empty elements
28218        if test "x$ipath" != x; then
28219          IFS="$OLDIFS"
28220          # Check that directory exists before calling fixup_path
28221          testpath=$ipath
28222
28223  windows_path="$testpath"
28224  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28225    unix_path=`$CYGPATH -u "$windows_path"`
28226    testpath="$unix_path"
28227  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28228    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28229    testpath="$unix_path"
28230  fi
28231
28232          if test -d "$testpath"; then
28233
28234  # Only process if variable expands to non-empty
28235
28236  if test "x$ipath" != x; then
28237    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28238
28239  # Input might be given as Windows format, start by converting to
28240  # unix format.
28241  path="$ipath"
28242  new_path=`$CYGPATH -u "$path"`
28243
28244  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28245  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28246  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28247  # "foo.exe" is OK but "foo" is an error.
28248  #
28249  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28250  # It is also a way to make sure we got the proper file name for the real test later on.
28251  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28252  if test "x$test_shortpath" = x; then
28253    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
28254$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
28255    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
28256  fi
28257
28258  # Call helper function which possibly converts this using DOS-style short mode.
28259  # If so, the updated path is stored in $new_path.
28260
28261  input_path="$new_path"
28262  # Check if we need to convert this using DOS-style short mode. If the path
28263  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28264  # take no chances and rewrite it.
28265  # Note: m4 eats our [], so we need to use [ and ] instead.
28266  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28267  if test "x$has_forbidden_chars" != x; then
28268    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28269    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28270    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28271    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28272      # Going to short mode and back again did indeed matter. Since short mode is
28273      # case insensitive, let's make it lowercase to improve readability.
28274      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28275      # Now convert it back to Unix-style (cygpath)
28276      input_path=`$CYGPATH -u "$shortmode_path"`
28277      new_path="$input_path"
28278    fi
28279  fi
28280
28281  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28282  if test "x$test_cygdrive_prefix" = x; then
28283    # As a simple fix, exclude /usr/bin since it's not a real path.
28284    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28285      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28286      # a path prefixed by /cygdrive for fixpath to work.
28287      new_path="$CYGWIN_ROOT_PATH$input_path"
28288    fi
28289  fi
28290
28291
28292  if test "x$path" != "x$new_path"; then
28293    ipath="$new_path"
28294    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
28295$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
28296  fi
28297
28298    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28299
28300  path="$ipath"
28301  has_colon=`$ECHO $path | $GREP ^.:`
28302  new_path="$path"
28303  if test "x$has_colon" = x; then
28304    # Not in mixed or Windows style, start by that.
28305    new_path=`cmd //c echo $path`
28306  fi
28307
28308
28309  input_path="$new_path"
28310  # Check if we need to convert this using DOS-style short mode. If the path
28311  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28312  # take no chances and rewrite it.
28313  # Note: m4 eats our [], so we need to use [ and ] instead.
28314  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28315  if test "x$has_forbidden_chars" != x; then
28316    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28317    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28318  fi
28319
28320
28321  windows_path="$new_path"
28322  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28323    unix_path=`$CYGPATH -u "$windows_path"`
28324    new_path="$unix_path"
28325  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28326    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28327    new_path="$unix_path"
28328  fi
28329
28330  if test "x$path" != "x$new_path"; then
28331    ipath="$new_path"
28332    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
28333$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
28334  fi
28335
28336  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28337  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28338
28339    else
28340      # We're on a unix platform. Hooray! :)
28341      path="$ipath"
28342      has_space=`$ECHO "$path" | $GREP " "`
28343      if test "x$has_space" != x; then
28344        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
28345$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
28346        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28347      fi
28348
28349      # Use eval to expand a potential ~
28350      eval path="$path"
28351      if test ! -f "$path" && test ! -d "$path"; then
28352        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
28353      fi
28354
28355      ipath="`cd "$path"; $THEPWDCMD -L`"
28356    fi
28357  fi
28358
28359            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
28360          fi
28361          IFS=";"
28362        fi
28363      done
28364      # Convert VS_LIB into SYSROOT_LDFLAGS
28365      for i in $VS_LIB; do
28366        libpath=$i
28367        # Only process non-empty elements
28368        if test "x$libpath" != x; then
28369          IFS="$OLDIFS"
28370          # Check that directory exists before calling fixup_path
28371          testpath=$libpath
28372
28373  windows_path="$testpath"
28374  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28375    unix_path=`$CYGPATH -u "$windows_path"`
28376    testpath="$unix_path"
28377  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28378    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28379    testpath="$unix_path"
28380  fi
28381
28382          if test -d "$testpath"; then
28383
28384  # Only process if variable expands to non-empty
28385
28386  if test "x$libpath" != x; then
28387    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28388
28389  # Input might be given as Windows format, start by converting to
28390  # unix format.
28391  path="$libpath"
28392  new_path=`$CYGPATH -u "$path"`
28393
28394  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28395  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28396  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28397  # "foo.exe" is OK but "foo" is an error.
28398  #
28399  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28400  # It is also a way to make sure we got the proper file name for the real test later on.
28401  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28402  if test "x$test_shortpath" = x; then
28403    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
28404$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
28405    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
28406  fi
28407
28408  # Call helper function which possibly converts this using DOS-style short mode.
28409  # If so, the updated path is stored in $new_path.
28410
28411  input_path="$new_path"
28412  # Check if we need to convert this using DOS-style short mode. If the path
28413  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28414  # take no chances and rewrite it.
28415  # Note: m4 eats our [], so we need to use [ and ] instead.
28416  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28417  if test "x$has_forbidden_chars" != x; then
28418    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28419    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28420    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28421    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28422      # Going to short mode and back again did indeed matter. Since short mode is
28423      # case insensitive, let's make it lowercase to improve readability.
28424      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28425      # Now convert it back to Unix-style (cygpath)
28426      input_path=`$CYGPATH -u "$shortmode_path"`
28427      new_path="$input_path"
28428    fi
28429  fi
28430
28431  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28432  if test "x$test_cygdrive_prefix" = x; then
28433    # As a simple fix, exclude /usr/bin since it's not a real path.
28434    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28435      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28436      # a path prefixed by /cygdrive for fixpath to work.
28437      new_path="$CYGWIN_ROOT_PATH$input_path"
28438    fi
28439  fi
28440
28441
28442  if test "x$path" != "x$new_path"; then
28443    libpath="$new_path"
28444    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
28445$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
28446  fi
28447
28448    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28449
28450  path="$libpath"
28451  has_colon=`$ECHO $path | $GREP ^.:`
28452  new_path="$path"
28453  if test "x$has_colon" = x; then
28454    # Not in mixed or Windows style, start by that.
28455    new_path=`cmd //c echo $path`
28456  fi
28457
28458
28459  input_path="$new_path"
28460  # Check if we need to convert this using DOS-style short mode. If the path
28461  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28462  # take no chances and rewrite it.
28463  # Note: m4 eats our [], so we need to use [ and ] instead.
28464  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28465  if test "x$has_forbidden_chars" != x; then
28466    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28467    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28468  fi
28469
28470
28471  windows_path="$new_path"
28472  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28473    unix_path=`$CYGPATH -u "$windows_path"`
28474    new_path="$unix_path"
28475  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28476    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28477    new_path="$unix_path"
28478  fi
28479
28480  if test "x$path" != "x$new_path"; then
28481    libpath="$new_path"
28482    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
28483$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
28484  fi
28485
28486  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28487  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28488
28489    else
28490      # We're on a unix platform. Hooray! :)
28491      path="$libpath"
28492      has_space=`$ECHO "$path" | $GREP " "`
28493      if test "x$has_space" != x; then
28494        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
28495$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
28496        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28497      fi
28498
28499      # Use eval to expand a potential ~
28500      eval path="$path"
28501      if test ! -f "$path" && test ! -d "$path"; then
28502        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
28503      fi
28504
28505      libpath="`cd "$path"; $THEPWDCMD -L`"
28506    fi
28507  fi
28508
28509            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
28510          fi
28511          IFS=";"
28512        fi
28513      done
28514      IFS="$OLDIFS"
28515    fi
28516  else
28517    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28518$as_echo "not found" >&6; }
28519
28520    if test "x$VS_ENV_CMD" = x; then
28521      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
28522$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
28523      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
28524$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
28525    else
28526      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
28527$as_echo "$as_me: Running the extraction script failed." >&6;}
28528    fi
28529    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
28530$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
28531    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
28532$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
28533    as_fn_error $? "Cannot continue" "$LINENO" 5
28534  fi
28535
28536    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
28537    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
28538    PATH="$VS_PATH"
28539    # The microsoft toolchain also requires INCLUDE and LIB to be set.
28540    export INCLUDE="$VS_INCLUDE"
28541    export LIB="$VS_LIB"
28542  fi
28543
28544  # For solaris we really need solaris tools, and not the GNU equivalent.
28545  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
28546  # so add that to path before starting to probe.
28547  # FIXME: This was originally only done for AS,NM,GNM,STRIP,OBJCOPY,OBJDUMP.
28548  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
28549    PATH="/usr/ccs/bin:$PATH"
28550  fi
28551
28552  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
28553  # override all other locations.
28554  if test "x$TOOLCHAIN_PATH" != x; then
28555    PATH=$TOOLCHAIN_PATH:$PATH
28556  fi
28557
28558
28559  #
28560  # Setup the compilers (CC and CXX)
28561  #
28562
28563  COMPILER_NAME=C
28564  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
28565
28566  if test "x$CC" != x; then
28567    # User has supplied compiler name already, always let that override.
28568    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
28569$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
28570    if test "x`basename $CC`" = "x$CC"; then
28571      # A command without a complete path is provided, search $PATH.
28572
28573      for ac_prog in $CC
28574do
28575  # Extract the first word of "$ac_prog", so it can be a program name with args.
28576set dummy $ac_prog; ac_word=$2
28577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28578$as_echo_n "checking for $ac_word... " >&6; }
28579if ${ac_cv_path_POTENTIAL_CC+:} false; then :
28580  $as_echo_n "(cached) " >&6
28581else
28582  case $POTENTIAL_CC in
28583  [\\/]* | ?:[\\/]*)
28584  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
28585  ;;
28586  *)
28587  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28588for as_dir in $PATH
28589do
28590  IFS=$as_save_IFS
28591  test -z "$as_dir" && as_dir=.
28592    for ac_exec_ext in '' $ac_executable_extensions; do
28593  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28594    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
28595    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28596    break 2
28597  fi
28598done
28599  done
28600IFS=$as_save_IFS
28601
28602  ;;
28603esac
28604fi
28605POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
28606if test -n "$POTENTIAL_CC"; then
28607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
28608$as_echo "$POTENTIAL_CC" >&6; }
28609else
28610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28611$as_echo "no" >&6; }
28612fi
28613
28614
28615  test -n "$POTENTIAL_CC" && break
28616done
28617
28618      if test "x$POTENTIAL_CC" != x; then
28619        CC=$POTENTIAL_CC
28620      else
28621        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
28622      fi
28623    else
28624      # Otherwise it might already be a complete path
28625      if test ! -x "$CC"; then
28626        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
28627      fi
28628    fi
28629  else
28630    # No user supplied value. Locate compiler ourselves.
28631
28632    # If we are cross compiling, assume cross compilation tools follows the
28633    # cross compilation standard where they are prefixed with the autoconf
28634    # standard name for the target. For example the binary
28635    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
28636    # If we are not cross compiling, then the default compiler name will be
28637    # used.
28638
28639    CC=
28640    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
28641    # before checking the rest of the PATH.
28642    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
28643    # step, this should not be necessary.
28644    if test -n "$TOOLCHAIN_PATH"; then
28645      PATH_save="$PATH"
28646      PATH="$TOOLCHAIN_PATH"
28647      for ac_prog in $SEARCH_LIST
28648do
28649  # Extract the first word of "$ac_prog", so it can be a program name with args.
28650set dummy $ac_prog; ac_word=$2
28651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28652$as_echo_n "checking for $ac_word... " >&6; }
28653if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
28654  $as_echo_n "(cached) " >&6
28655else
28656  case $TOOLCHAIN_PATH_CC in
28657  [\\/]* | ?:[\\/]*)
28658  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
28659  ;;
28660  *)
28661  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28662for as_dir in $PATH
28663do
28664  IFS=$as_save_IFS
28665  test -z "$as_dir" && as_dir=.
28666    for ac_exec_ext in '' $ac_executable_extensions; do
28667  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28668    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
28669    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28670    break 2
28671  fi
28672done
28673  done
28674IFS=$as_save_IFS
28675
28676  ;;
28677esac
28678fi
28679TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
28680if test -n "$TOOLCHAIN_PATH_CC"; then
28681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
28682$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
28683else
28684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28685$as_echo "no" >&6; }
28686fi
28687
28688
28689  test -n "$TOOLCHAIN_PATH_CC" && break
28690done
28691
28692      CC=$TOOLCHAIN_PATH_CC
28693      PATH="$PATH_save"
28694    fi
28695
28696    # AC_PATH_PROGS can't be run multiple times with the same variable,
28697    # so create a new name for this run.
28698    if test "x$CC" = x; then
28699      for ac_prog in $SEARCH_LIST
28700do
28701  # Extract the first word of "$ac_prog", so it can be a program name with args.
28702set dummy $ac_prog; ac_word=$2
28703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28704$as_echo_n "checking for $ac_word... " >&6; }
28705if ${ac_cv_path_POTENTIAL_CC+:} false; then :
28706  $as_echo_n "(cached) " >&6
28707else
28708  case $POTENTIAL_CC in
28709  [\\/]* | ?:[\\/]*)
28710  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
28711  ;;
28712  *)
28713  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28714for as_dir in $PATH
28715do
28716  IFS=$as_save_IFS
28717  test -z "$as_dir" && as_dir=.
28718    for ac_exec_ext in '' $ac_executable_extensions; do
28719  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28720    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
28721    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28722    break 2
28723  fi
28724done
28725  done
28726IFS=$as_save_IFS
28727
28728  ;;
28729esac
28730fi
28731POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
28732if test -n "$POTENTIAL_CC"; then
28733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
28734$as_echo "$POTENTIAL_CC" >&6; }
28735else
28736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28737$as_echo "no" >&6; }
28738fi
28739
28740
28741  test -n "$POTENTIAL_CC" && break
28742done
28743
28744      CC=$POTENTIAL_CC
28745    fi
28746
28747    if test "x$CC" = x; then
28748
28749  # Print a helpful message on how to acquire the necessary build dependency.
28750  # devkit is the help tag: freetype, cups, pulse, alsa etc
28751  MISSING_DEPENDENCY=devkit
28752
28753  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28754    cygwin_help $MISSING_DEPENDENCY
28755  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28756    msys_help $MISSING_DEPENDENCY
28757  else
28758    PKGHANDLER_COMMAND=
28759
28760    case $PKGHANDLER in
28761      apt-get)
28762        apt_help     $MISSING_DEPENDENCY ;;
28763      yum)
28764        yum_help     $MISSING_DEPENDENCY ;;
28765      port)
28766        port_help    $MISSING_DEPENDENCY ;;
28767      pkgutil)
28768        pkgutil_help $MISSING_DEPENDENCY ;;
28769      pkgadd)
28770        pkgadd_help  $MISSING_DEPENDENCY ;;
28771    esac
28772
28773    if test "x$PKGHANDLER_COMMAND" != x; then
28774      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
28775    fi
28776  fi
28777
28778      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
28779    fi
28780  fi
28781
28782  # Now we have a compiler binary in CC. Make sure it's okay.
28783
28784  # Only process if variable expands to non-empty
28785
28786  if test "x$CC" != x; then
28787    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28788
28789  # First separate the path from the arguments. This will split at the first
28790  # space.
28791  complete="$CC"
28792  path="${complete%% *}"
28793  tmp="$complete EOL"
28794  arguments="${tmp#* }"
28795
28796  # Input might be given as Windows format, start by converting to
28797  # unix format.
28798  new_path=`$CYGPATH -u "$path"`
28799
28800  # Now try to locate executable using which
28801  new_path=`$WHICH "$new_path" 2> /dev/null`
28802  # bat and cmd files are not always considered executable in cygwin causing which
28803  # to not find them
28804  if test "x$new_path" = x \
28805      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28806      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28807    new_path=`$CYGPATH -u "$path"`
28808  fi
28809  if test "x$new_path" = x; then
28810    # Oops. Which didn't find the executable.
28811    # The splitting of arguments from the executable at a space might have been incorrect,
28812    # since paths with space are more likely in Windows. Give it another try with the whole
28813    # argument.
28814    path="$complete"
28815    arguments="EOL"
28816    new_path=`$CYGPATH -u "$path"`
28817    new_path=`$WHICH "$new_path" 2> /dev/null`
28818    # bat and cmd files are not always considered executable in cygwin causing which
28819    # to not find them
28820    if test "x$new_path" = x \
28821        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28822        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28823      new_path=`$CYGPATH -u "$path"`
28824    fi
28825    if test "x$new_path" = x; then
28826      # It's still not found. Now this is an unrecoverable error.
28827      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28828$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28829      has_space=`$ECHO "$complete" | $GREP " "`
28830      if test "x$has_space" != x; then
28831        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28832$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28833      fi
28834      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28835    fi
28836  fi
28837
28838  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28839  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28840  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28841  # "foo.exe" is OK but "foo" is an error.
28842  #
28843  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28844  # It is also a way to make sure we got the proper file name for the real test later on.
28845  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28846  if test "x$test_shortpath" = x; then
28847    # Short path failed, file does not exist as specified.
28848    # Try adding .exe or .cmd
28849    if test -f "${new_path}.exe"; then
28850      input_to_shortpath="${new_path}.exe"
28851    elif test -f "${new_path}.cmd"; then
28852      input_to_shortpath="${new_path}.cmd"
28853    else
28854      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
28855$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
28856      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28857$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28858      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28859    fi
28860  else
28861    input_to_shortpath="$new_path"
28862  fi
28863
28864  # Call helper function which possibly converts this using DOS-style short mode.
28865  # If so, the updated path is stored in $new_path.
28866  new_path="$input_to_shortpath"
28867
28868  input_path="$input_to_shortpath"
28869  # Check if we need to convert this using DOS-style short mode. If the path
28870  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28871  # take no chances and rewrite it.
28872  # Note: m4 eats our [], so we need to use [ and ] instead.
28873  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28874  if test "x$has_forbidden_chars" != x; then
28875    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28876    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28877    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28878    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28879      # Going to short mode and back again did indeed matter. Since short mode is
28880      # case insensitive, let's make it lowercase to improve readability.
28881      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28882      # Now convert it back to Unix-style (cygpath)
28883      input_path=`$CYGPATH -u "$shortmode_path"`
28884      new_path="$input_path"
28885    fi
28886  fi
28887
28888  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28889  if test "x$test_cygdrive_prefix" = x; then
28890    # As a simple fix, exclude /usr/bin since it's not a real path.
28891    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28892      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28893      # a path prefixed by /cygdrive for fixpath to work.
28894      new_path="$CYGWIN_ROOT_PATH$input_path"
28895    fi
28896  fi
28897
28898  # remove trailing .exe if any
28899  new_path="${new_path/%.exe/}"
28900
28901    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28902
28903  # First separate the path from the arguments. This will split at the first
28904  # space.
28905  complete="$CC"
28906  path="${complete%% *}"
28907  tmp="$complete EOL"
28908  arguments="${tmp#* }"
28909
28910  # Input might be given as Windows format, start by converting to
28911  # unix format.
28912  new_path="$path"
28913
28914  windows_path="$new_path"
28915  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28916    unix_path=`$CYGPATH -u "$windows_path"`
28917    new_path="$unix_path"
28918  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28919    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28920    new_path="$unix_path"
28921  fi
28922
28923
28924  # Now try to locate executable using which
28925  new_path=`$WHICH "$new_path" 2> /dev/null`
28926
28927  if test "x$new_path" = x; then
28928    # Oops. Which didn't find the executable.
28929    # The splitting of arguments from the executable at a space might have been incorrect,
28930    # since paths with space are more likely in Windows. Give it another try with the whole
28931    # argument.
28932    path="$complete"
28933    arguments="EOL"
28934    new_path="$path"
28935
28936  windows_path="$new_path"
28937  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28938    unix_path=`$CYGPATH -u "$windows_path"`
28939    new_path="$unix_path"
28940  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28941    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28942    new_path="$unix_path"
28943  fi
28944
28945
28946    new_path=`$WHICH "$new_path" 2> /dev/null`
28947    # bat and cmd files are not always considered executable in MSYS causing which
28948    # to not find them
28949    if test "x$new_path" = x \
28950        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28951        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28952      new_path="$path"
28953
28954  windows_path="$new_path"
28955  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28956    unix_path=`$CYGPATH -u "$windows_path"`
28957    new_path="$unix_path"
28958  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28959    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28960    new_path="$unix_path"
28961  fi
28962
28963    fi
28964
28965    if test "x$new_path" = x; then
28966      # It's still not found. Now this is an unrecoverable error.
28967      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28968$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28969      has_space=`$ECHO "$complete" | $GREP " "`
28970      if test "x$has_space" != x; then
28971        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28972$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28973      fi
28974      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28975    fi
28976  fi
28977
28978  # Now new_path has a complete unix path to the binary
28979  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28980    # Keep paths in /bin as-is, but remove trailing .exe if any
28981    new_path="${new_path/%.exe/}"
28982    # Do not save /bin paths to all_fixpath_prefixes!
28983  else
28984    # Not in mixed or Windows style, start by that.
28985    new_path=`cmd //c echo $new_path`
28986
28987  input_path="$new_path"
28988  # Check if we need to convert this using DOS-style short mode. If the path
28989  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28990  # take no chances and rewrite it.
28991  # Note: m4 eats our [], so we need to use [ and ] instead.
28992  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28993  if test "x$has_forbidden_chars" != x; then
28994    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28995    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28996  fi
28997
28998    # Output is in $new_path
28999
29000  windows_path="$new_path"
29001  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29002    unix_path=`$CYGPATH -u "$windows_path"`
29003    new_path="$unix_path"
29004  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29005    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29006    new_path="$unix_path"
29007  fi
29008
29009    # remove trailing .exe if any
29010    new_path="${new_path/%.exe/}"
29011
29012    # Save the first 10 bytes of this path to the storage, so fixpath can work.
29013    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29014  fi
29015
29016    else
29017      # We're on a unix platform. Hooray! :)
29018      # First separate the path from the arguments. This will split at the first
29019      # space.
29020      complete="$CC"
29021      path="${complete%% *}"
29022      tmp="$complete EOL"
29023      arguments="${tmp#* }"
29024
29025      # Cannot rely on the command "which" here since it doesn't always work.
29026      is_absolute_path=`$ECHO "$path" | $GREP ^/`
29027      if test -z "$is_absolute_path"; then
29028        # Path to executable is not absolute. Find it.
29029        IFS_save="$IFS"
29030        IFS=:
29031        for p in $PATH; do
29032          if test -f "$p/$path" && test -x "$p/$path"; then
29033            new_path="$p/$path"
29034            break
29035          fi
29036        done
29037        IFS="$IFS_save"
29038      else
29039        # This is an absolute path, we can use it without further modifications.
29040        new_path="$path"
29041      fi
29042
29043      if test "x$new_path" = x; then
29044        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
29045$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
29046        has_space=`$ECHO "$complete" | $GREP " "`
29047        if test "x$has_space" != x; then
29048          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
29049$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
29050        fi
29051        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
29052      fi
29053    fi
29054
29055    # Now join together the path and the arguments once again
29056    if test "x$arguments" != xEOL; then
29057      new_complete="$new_path ${arguments% *}"
29058    else
29059      new_complete="$new_path"
29060    fi
29061
29062    if test "x$complete" != "x$new_complete"; then
29063      CC="$new_complete"
29064      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
29065$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
29066    fi
29067  fi
29068
29069  TEST_COMPILER="$CC"
29070  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
29071  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
29072  if test "x$OPENJDK_BUILD_OS" != xaix; then
29073    # FIXME: This test should not be needed anymore; we don't do that for any platform.
29074    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
29075$as_echo_n "checking resolved symbolic links for CC... " >&6; }
29076
29077  if test "x$OPENJDK_BUILD_OS" != xwindows; then
29078    # Follow a chain of symbolic links. Use readlink
29079    # where it exists, else fall back to horribly
29080    # complicated shell code.
29081    if test "x$READLINK_TESTED" != yes; then
29082      # On MacOSX there is a readlink tool with a different
29083      # purpose than the GNU readlink tool. Check the found readlink.
29084      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
29085      if test "x$ISGNU" = x; then
29086        # A readlink that we do not know how to use.
29087        # Are there other non-GNU readlinks out there?
29088        READLINK_TESTED=yes
29089        READLINK=
29090      fi
29091    fi
29092
29093    if test "x$READLINK" != x; then
29094      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
29095    else
29096      # Save the current directory for restoring afterwards
29097      STARTDIR=$PWD
29098      COUNTER=0
29099      sym_link_dir=`$DIRNAME $TEST_COMPILER`
29100      sym_link_file=`$BASENAME $TEST_COMPILER`
29101      cd $sym_link_dir
29102      # Use -P flag to resolve symlinks in directories.
29103      cd `$THEPWDCMD -P`
29104      sym_link_dir=`$THEPWDCMD -P`
29105      # Resolve file symlinks
29106      while test $COUNTER -lt 20; do
29107        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
29108        if test "x$ISLINK" == x; then
29109          # This is not a symbolic link! We are done!
29110          break
29111        fi
29112        # Again resolve directory symlinks since the target of the just found
29113        # link could be in a different directory
29114        cd `$DIRNAME $ISLINK`
29115        sym_link_dir=`$THEPWDCMD -P`
29116        sym_link_file=`$BASENAME $ISLINK`
29117        let COUNTER=COUNTER+1
29118      done
29119      cd $STARTDIR
29120      TEST_COMPILER=$sym_link_dir/$sym_link_file
29121    fi
29122  fi
29123
29124    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
29125$as_echo "$TEST_COMPILER" >&6; }
29126  fi
29127  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
29128$as_echo_n "checking if CC is disguised ccache... " >&6; }
29129
29130  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
29131  if test "x$COMPILER_BASENAME" = "xccache"; then
29132    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
29133$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
29134    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
29135    # We want to control ccache invocation ourselves, so ignore this cc and try
29136    # searching again.
29137
29138    # Remove the path to the fake ccache cc from the PATH
29139    RETRY_COMPILER_SAVED_PATH="$PATH"
29140    COMPILER_DIRNAME=`$DIRNAME $CC`
29141    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
29142
29143    # Try again looking for our compiler
29144    if test -n "$ac_tool_prefix"; then
29145  for ac_prog in $TOOLCHAIN_CC_BINARY
29146  do
29147    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
29148set dummy $ac_tool_prefix$ac_prog; ac_word=$2
29149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29150$as_echo_n "checking for $ac_word... " >&6; }
29151if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
29152  $as_echo_n "(cached) " >&6
29153else
29154  if test -n "$PROPER_COMPILER_CC"; then
29155  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
29156else
29157as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29158for as_dir in $PATH
29159do
29160  IFS=$as_save_IFS
29161  test -z "$as_dir" && as_dir=.
29162    for ac_exec_ext in '' $ac_executable_extensions; do
29163  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29164    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
29165    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29166    break 2
29167  fi
29168done
29169  done
29170IFS=$as_save_IFS
29171
29172fi
29173fi
29174PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
29175if test -n "$PROPER_COMPILER_CC"; then
29176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
29177$as_echo "$PROPER_COMPILER_CC" >&6; }
29178else
29179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29180$as_echo "no" >&6; }
29181fi
29182
29183
29184    test -n "$PROPER_COMPILER_CC" && break
29185  done
29186fi
29187if test -z "$PROPER_COMPILER_CC"; then
29188  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
29189  for ac_prog in $TOOLCHAIN_CC_BINARY
29190do
29191  # Extract the first word of "$ac_prog", so it can be a program name with args.
29192set dummy $ac_prog; ac_word=$2
29193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29194$as_echo_n "checking for $ac_word... " >&6; }
29195if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
29196  $as_echo_n "(cached) " >&6
29197else
29198  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
29199  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
29200else
29201as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29202for as_dir in $PATH
29203do
29204  IFS=$as_save_IFS
29205  test -z "$as_dir" && as_dir=.
29206    for ac_exec_ext in '' $ac_executable_extensions; do
29207  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29208    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
29209    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29210    break 2
29211  fi
29212done
29213  done
29214IFS=$as_save_IFS
29215
29216fi
29217fi
29218ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
29219if test -n "$ac_ct_PROPER_COMPILER_CC"; then
29220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
29221$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
29222else
29223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29224$as_echo "no" >&6; }
29225fi
29226
29227
29228  test -n "$ac_ct_PROPER_COMPILER_CC" && break
29229done
29230
29231  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
29232    PROPER_COMPILER_CC=""
29233  else
29234    case $cross_compiling:$ac_tool_warned in
29235yes:)
29236{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
29237$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
29238ac_tool_warned=yes ;;
29239esac
29240    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
29241  fi
29242fi
29243
29244
29245  # Only process if variable expands to non-empty
29246
29247  if test "x$PROPER_COMPILER_CC" != x; then
29248    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29249
29250  # First separate the path from the arguments. This will split at the first
29251  # space.
29252  complete="$PROPER_COMPILER_CC"
29253  path="${complete%% *}"
29254  tmp="$complete EOL"
29255  arguments="${tmp#* }"
29256
29257  # Input might be given as Windows format, start by converting to
29258  # unix format.
29259  new_path=`$CYGPATH -u "$path"`
29260
29261  # Now try to locate executable using which
29262  new_path=`$WHICH "$new_path" 2> /dev/null`
29263  # bat and cmd files are not always considered executable in cygwin causing which
29264  # to not find them
29265  if test "x$new_path" = x \
29266      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29267      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29268    new_path=`$CYGPATH -u "$path"`
29269  fi
29270  if test "x$new_path" = x; then
29271    # Oops. Which didn't find the executable.
29272    # The splitting of arguments from the executable at a space might have been incorrect,
29273    # since paths with space are more likely in Windows. Give it another try with the whole
29274    # argument.
29275    path="$complete"
29276    arguments="EOL"
29277    new_path=`$CYGPATH -u "$path"`
29278    new_path=`$WHICH "$new_path" 2> /dev/null`
29279    # bat and cmd files are not always considered executable in cygwin causing which
29280    # to not find them
29281    if test "x$new_path" = x \
29282        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29283        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29284      new_path=`$CYGPATH -u "$path"`
29285    fi
29286    if test "x$new_path" = x; then
29287      # It's still not found. Now this is an unrecoverable error.
29288      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
29289$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
29290      has_space=`$ECHO "$complete" | $GREP " "`
29291      if test "x$has_space" != x; then
29292        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29293$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29294      fi
29295      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
29296    fi
29297  fi
29298
29299  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29300  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29301  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29302  # "foo.exe" is OK but "foo" is an error.
29303  #
29304  # This test is therefore slightly more accurate than "test -f" to check for file presence.
29305  # It is also a way to make sure we got the proper file name for the real test later on.
29306  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29307  if test "x$test_shortpath" = x; then
29308    # Short path failed, file does not exist as specified.
29309    # Try adding .exe or .cmd
29310    if test -f "${new_path}.exe"; then
29311      input_to_shortpath="${new_path}.exe"
29312    elif test -f "${new_path}.cmd"; then
29313      input_to_shortpath="${new_path}.cmd"
29314    else
29315      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
29316$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
29317      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
29318$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
29319      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
29320    fi
29321  else
29322    input_to_shortpath="$new_path"
29323  fi
29324
29325  # Call helper function which possibly converts this using DOS-style short mode.
29326  # If so, the updated path is stored in $new_path.
29327  new_path="$input_to_shortpath"
29328
29329  input_path="$input_to_shortpath"
29330  # Check if we need to convert this using DOS-style short mode. If the path
29331  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29332  # take no chances and rewrite it.
29333  # Note: m4 eats our [], so we need to use [ and ] instead.
29334  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29335  if test "x$has_forbidden_chars" != x; then
29336    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29337    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29338    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29339    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29340      # Going to short mode and back again did indeed matter. Since short mode is
29341      # case insensitive, let's make it lowercase to improve readability.
29342      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29343      # Now convert it back to Unix-style (cygpath)
29344      input_path=`$CYGPATH -u "$shortmode_path"`
29345      new_path="$input_path"
29346    fi
29347  fi
29348
29349  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29350  if test "x$test_cygdrive_prefix" = x; then
29351    # As a simple fix, exclude /usr/bin since it's not a real path.
29352    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
29353      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29354      # a path prefixed by /cygdrive for fixpath to work.
29355      new_path="$CYGWIN_ROOT_PATH$input_path"
29356    fi
29357  fi
29358
29359  # remove trailing .exe if any
29360  new_path="${new_path/%.exe/}"
29361
29362    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29363
29364  # First separate the path from the arguments. This will split at the first
29365  # space.
29366  complete="$PROPER_COMPILER_CC"
29367  path="${complete%% *}"
29368  tmp="$complete EOL"
29369  arguments="${tmp#* }"
29370
29371  # Input might be given as Windows format, start by converting to
29372  # unix format.
29373  new_path="$path"
29374
29375  windows_path="$new_path"
29376  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29377    unix_path=`$CYGPATH -u "$windows_path"`
29378    new_path="$unix_path"
29379  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29380    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29381    new_path="$unix_path"
29382  fi
29383
29384
29385  # Now try to locate executable using which
29386  new_path=`$WHICH "$new_path" 2> /dev/null`
29387
29388  if test "x$new_path" = x; then
29389    # Oops. Which didn't find the executable.
29390    # The splitting of arguments from the executable at a space might have been incorrect,
29391    # since paths with space are more likely in Windows. Give it another try with the whole
29392    # argument.
29393    path="$complete"
29394    arguments="EOL"
29395    new_path="$path"
29396
29397  windows_path="$new_path"
29398  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29399    unix_path=`$CYGPATH -u "$windows_path"`
29400    new_path="$unix_path"
29401  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29402    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29403    new_path="$unix_path"
29404  fi
29405
29406
29407    new_path=`$WHICH "$new_path" 2> /dev/null`
29408    # bat and cmd files are not always considered executable in MSYS causing which
29409    # to not find them
29410    if test "x$new_path" = x \
29411        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29412        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29413      new_path="$path"
29414
29415  windows_path="$new_path"
29416  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29417    unix_path=`$CYGPATH -u "$windows_path"`
29418    new_path="$unix_path"
29419  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29420    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29421    new_path="$unix_path"
29422  fi
29423
29424    fi
29425
29426    if test "x$new_path" = x; then
29427      # It's still not found. Now this is an unrecoverable error.
29428      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
29429$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
29430      has_space=`$ECHO "$complete" | $GREP " "`
29431      if test "x$has_space" != x; then
29432        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29433$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29434      fi
29435      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
29436    fi
29437  fi
29438
29439  # Now new_path has a complete unix path to the binary
29440  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
29441    # Keep paths in /bin as-is, but remove trailing .exe if any
29442    new_path="${new_path/%.exe/}"
29443    # Do not save /bin paths to all_fixpath_prefixes!
29444  else
29445    # Not in mixed or Windows style, start by that.
29446    new_path=`cmd //c echo $new_path`
29447
29448  input_path="$new_path"
29449  # Check if we need to convert this using DOS-style short mode. If the path
29450  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29451  # take no chances and rewrite it.
29452  # Note: m4 eats our [], so we need to use [ and ] instead.
29453  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29454  if test "x$has_forbidden_chars" != x; then
29455    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29456    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29457  fi
29458
29459    # Output is in $new_path
29460
29461  windows_path="$new_path"
29462  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29463    unix_path=`$CYGPATH -u "$windows_path"`
29464    new_path="$unix_path"
29465  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29466    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29467    new_path="$unix_path"
29468  fi
29469
29470    # remove trailing .exe if any
29471    new_path="${new_path/%.exe/}"
29472
29473    # Save the first 10 bytes of this path to the storage, so fixpath can work.
29474    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29475  fi
29476
29477    else
29478      # We're on a unix platform. Hooray! :)
29479      # First separate the path from the arguments. This will split at the first
29480      # space.
29481      complete="$PROPER_COMPILER_CC"
29482      path="${complete%% *}"
29483      tmp="$complete EOL"
29484      arguments="${tmp#* }"
29485
29486      # Cannot rely on the command "which" here since it doesn't always work.
29487      is_absolute_path=`$ECHO "$path" | $GREP ^/`
29488      if test -z "$is_absolute_path"; then
29489        # Path to executable is not absolute. Find it.
29490        IFS_save="$IFS"
29491        IFS=:
29492        for p in $PATH; do
29493          if test -f "$p/$path" && test -x "$p/$path"; then
29494            new_path="$p/$path"
29495            break
29496          fi
29497        done
29498        IFS="$IFS_save"
29499      else
29500        # This is an absolute path, we can use it without further modifications.
29501        new_path="$path"
29502      fi
29503
29504      if test "x$new_path" = x; then
29505        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
29506$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
29507        has_space=`$ECHO "$complete" | $GREP " "`
29508        if test "x$has_space" != x; then
29509          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
29510$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
29511        fi
29512        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
29513      fi
29514    fi
29515
29516    # Now join together the path and the arguments once again
29517    if test "x$arguments" != xEOL; then
29518      new_complete="$new_path ${arguments% *}"
29519    else
29520      new_complete="$new_path"
29521    fi
29522
29523    if test "x$complete" != "x$new_complete"; then
29524      PROPER_COMPILER_CC="$new_complete"
29525      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
29526$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
29527    fi
29528  fi
29529
29530    PATH="$RETRY_COMPILER_SAVED_PATH"
29531
29532    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
29533$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
29534
29535  if test "x$OPENJDK_BUILD_OS" != xwindows; then
29536    # Follow a chain of symbolic links. Use readlink
29537    # where it exists, else fall back to horribly
29538    # complicated shell code.
29539    if test "x$READLINK_TESTED" != yes; then
29540      # On MacOSX there is a readlink tool with a different
29541      # purpose than the GNU readlink tool. Check the found readlink.
29542      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
29543      if test "x$ISGNU" = x; then
29544        # A readlink that we do not know how to use.
29545        # Are there other non-GNU readlinks out there?
29546        READLINK_TESTED=yes
29547        READLINK=
29548      fi
29549    fi
29550
29551    if test "x$READLINK" != x; then
29552      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
29553    else
29554      # Save the current directory for restoring afterwards
29555      STARTDIR=$PWD
29556      COUNTER=0
29557      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
29558      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
29559      cd $sym_link_dir
29560      # Use -P flag to resolve symlinks in directories.
29561      cd `$THEPWDCMD -P`
29562      sym_link_dir=`$THEPWDCMD -P`
29563      # Resolve file symlinks
29564      while test $COUNTER -lt 20; do
29565        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
29566        if test "x$ISLINK" == x; then
29567          # This is not a symbolic link! We are done!
29568          break
29569        fi
29570        # Again resolve directory symlinks since the target of the just found
29571        # link could be in a different directory
29572        cd `$DIRNAME $ISLINK`
29573        sym_link_dir=`$THEPWDCMD -P`
29574        sym_link_file=`$BASENAME $ISLINK`
29575        let COUNTER=COUNTER+1
29576      done
29577      cd $STARTDIR
29578      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
29579    fi
29580  fi
29581
29582    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
29583$as_echo "$PROPER_COMPILER_CC" >&6; }
29584    CC="$PROPER_COMPILER_CC"
29585  else
29586    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
29587$as_echo "no, keeping CC" >&6; }
29588  fi
29589
29590
29591  COMPILER=$CC
29592  COMPILER_NAME=$COMPILER_NAME
29593
29594  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
29595    # cc -V output typically looks like
29596    #     cc: Sun C 5.12 Linux_i386 2011/11/16
29597    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
29598    # Check that this is likely to be the Solaris Studio cc.
29599    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
29600    if test $? -ne 0; then
29601      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29602      { $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
29603$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29604      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29605$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29606      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
29607$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
29608      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29609    fi
29610    # Remove usage instructions (if present), and
29611    # collapse compiler output into a single line
29612    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
29613        $SED -e 's/ *[Uu]sage:.*//'`
29614    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29615        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
29616  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
29617    # xlc -qversion output typically looks like
29618    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
29619    #     Version: 11.01.0000.0015
29620    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
29621    # Check that this is likely to be the IBM XL C compiler.
29622    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
29623    if test $? -ne 0; then
29624      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29625      { $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
29626$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29627      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29628$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29629      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
29630$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
29631      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29632    fi
29633    # Collapse compiler output into a single line
29634    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
29635    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29636        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
29637  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
29638    # There is no specific version flag, but all output starts with a version string.
29639    # First line typically looks something like:
29640    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
29641    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
29642    # Check that this is likely to be Microsoft CL.EXE.
29643    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
29644    if test $? -ne 0; then
29645      { $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
29646$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29647      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29648$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29649      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29650    fi
29651    # Collapse compiler output into a single line
29652    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
29653    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29654        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
29655  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
29656    # gcc --version output typically looks like
29657    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
29658    #     Copyright (C) 2013 Free Software Foundation, Inc.
29659    #     This is free software; see the source for copying conditions.  There is NO
29660    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
29661    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29662    # Check that this is likely to be GCC.
29663    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
29664    if test $? -ne 0; then
29665      { $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
29666$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29667      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
29668$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
29669      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29670    fi
29671    # Remove Copyright and legalese from version string, and
29672    # collapse into a single line
29673    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
29674        $SED -e 's/ *Copyright .*//'`
29675    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29676        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
29677  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
29678    # clang --version output typically looks like
29679    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
29680    #    clang version 3.3 (tags/RELEASE_33/final)
29681    # or
29682    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
29683    #    Target: x86_64-pc-linux-gnu
29684    #    Thread model: posix
29685    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29686    # Check that this is likely to be clang
29687    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
29688    if test $? -ne 0; then
29689      { $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
29690$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29691      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29692$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29693      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29694    fi
29695    # Collapse compiler output into a single line
29696    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
29697    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29698        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
29699  else
29700      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
29701  fi
29702  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
29703  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
29704  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
29705  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
29706
29707  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
29708$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
29709
29710
29711  # Now that we have resolved CC ourself, let autoconf have its go at it
29712  ac_ext=c
29713ac_cpp='$CPP $CPPFLAGS'
29714ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29715ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29716ac_compiler_gnu=$ac_cv_c_compiler_gnu
29717if test -n "$ac_tool_prefix"; then
29718  for ac_prog in $CC
29719  do
29720    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
29721set dummy $ac_tool_prefix$ac_prog; ac_word=$2
29722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29723$as_echo_n "checking for $ac_word... " >&6; }
29724if ${ac_cv_prog_CC+:} false; then :
29725  $as_echo_n "(cached) " >&6
29726else
29727  if test -n "$CC"; then
29728  ac_cv_prog_CC="$CC" # Let the user override the test.
29729else
29730as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29731for as_dir in $PATH
29732do
29733  IFS=$as_save_IFS
29734  test -z "$as_dir" && as_dir=.
29735    for ac_exec_ext in '' $ac_executable_extensions; do
29736  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29737    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
29738    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29739    break 2
29740  fi
29741done
29742  done
29743IFS=$as_save_IFS
29744
29745fi
29746fi
29747CC=$ac_cv_prog_CC
29748if test -n "$CC"; then
29749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
29750$as_echo "$CC" >&6; }
29751else
29752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29753$as_echo "no" >&6; }
29754fi
29755
29756
29757    test -n "$CC" && break
29758  done
29759fi
29760if test -z "$CC"; then
29761  ac_ct_CC=$CC
29762  for ac_prog in $CC
29763do
29764  # Extract the first word of "$ac_prog", so it can be a program name with args.
29765set dummy $ac_prog; ac_word=$2
29766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29767$as_echo_n "checking for $ac_word... " >&6; }
29768if ${ac_cv_prog_ac_ct_CC+:} false; then :
29769  $as_echo_n "(cached) " >&6
29770else
29771  if test -n "$ac_ct_CC"; then
29772  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
29773else
29774as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29775for as_dir in $PATH
29776do
29777  IFS=$as_save_IFS
29778  test -z "$as_dir" && as_dir=.
29779    for ac_exec_ext in '' $ac_executable_extensions; do
29780  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29781    ac_cv_prog_ac_ct_CC="$ac_prog"
29782    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29783    break 2
29784  fi
29785done
29786  done
29787IFS=$as_save_IFS
29788
29789fi
29790fi
29791ac_ct_CC=$ac_cv_prog_ac_ct_CC
29792if test -n "$ac_ct_CC"; then
29793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
29794$as_echo "$ac_ct_CC" >&6; }
29795else
29796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29797$as_echo "no" >&6; }
29798fi
29799
29800
29801  test -n "$ac_ct_CC" && break
29802done
29803
29804  if test "x$ac_ct_CC" = x; then
29805    CC=""
29806  else
29807    case $cross_compiling:$ac_tool_warned in
29808yes:)
29809{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
29810$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
29811ac_tool_warned=yes ;;
29812esac
29813    CC=$ac_ct_CC
29814  fi
29815fi
29816
29817
29818test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29819$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29820as_fn_error $? "no acceptable C compiler found in \$PATH
29821See \`config.log' for more details" "$LINENO" 5; }
29822
29823# Provide some information about the compiler.
29824$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
29825set X $ac_compile
29826ac_compiler=$2
29827for ac_option in --version -v -V -qversion; do
29828  { { ac_try="$ac_compiler $ac_option >&5"
29829case "(($ac_try" in
29830  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29831  *) ac_try_echo=$ac_try;;
29832esac
29833eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29834$as_echo "$ac_try_echo"; } >&5
29835  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
29836  ac_status=$?
29837  if test -s conftest.err; then
29838    sed '10a\
29839... rest of stderr output deleted ...
29840         10q' conftest.err >conftest.er1
29841    cat conftest.er1 >&5
29842  fi
29843  rm -f conftest.er1 conftest.err
29844  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29845  test $ac_status = 0; }
29846done
29847
29848cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29849/* end confdefs.h.  */
29850
29851int
29852main ()
29853{
29854
29855  ;
29856  return 0;
29857}
29858_ACEOF
29859ac_clean_files_save=$ac_clean_files
29860ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
29861# Try to create an executable without -o first, disregard a.out.
29862# It will help us diagnose broken compilers, and finding out an intuition
29863# of exeext.
29864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
29865$as_echo_n "checking whether the C compiler works... " >&6; }
29866ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
29867
29868# The possible output files:
29869ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
29870
29871ac_rmfiles=
29872for ac_file in $ac_files
29873do
29874  case $ac_file in
29875    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
29876    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
29877  esac
29878done
29879rm -f $ac_rmfiles
29880
29881if { { ac_try="$ac_link_default"
29882case "(($ac_try" in
29883  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29884  *) ac_try_echo=$ac_try;;
29885esac
29886eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29887$as_echo "$ac_try_echo"; } >&5
29888  (eval "$ac_link_default") 2>&5
29889  ac_status=$?
29890  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29891  test $ac_status = 0; }; then :
29892  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
29893# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
29894# in a Makefile.  We should not override ac_cv_exeext if it was cached,
29895# so that the user can short-circuit this test for compilers unknown to
29896# Autoconf.
29897for ac_file in $ac_files ''
29898do
29899  test -f "$ac_file" || continue
29900  case $ac_file in
29901    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
29902	;;
29903    [ab].out )
29904	# We found the default executable, but exeext='' is most
29905	# certainly right.
29906	break;;
29907    *.* )
29908	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
29909	then :; else
29910	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
29911	fi
29912	# We set ac_cv_exeext here because the later test for it is not
29913	# safe: cross compilers may not add the suffix if given an `-o'
29914	# argument, so we may need to know it at that point already.
29915	# Even if this section looks crufty: it has the advantage of
29916	# actually working.
29917	break;;
29918    * )
29919	break;;
29920  esac
29921done
29922test "$ac_cv_exeext" = no && ac_cv_exeext=
29923
29924else
29925  ac_file=''
29926fi
29927if test -z "$ac_file"; then :
29928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29929$as_echo "no" >&6; }
29930$as_echo "$as_me: failed program was:" >&5
29931sed 's/^/| /' conftest.$ac_ext >&5
29932
29933{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29934$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29935as_fn_error 77 "C compiler cannot create executables
29936See \`config.log' for more details" "$LINENO" 5; }
29937else
29938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29939$as_echo "yes" >&6; }
29940fi
29941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
29942$as_echo_n "checking for C compiler default output file name... " >&6; }
29943{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
29944$as_echo "$ac_file" >&6; }
29945ac_exeext=$ac_cv_exeext
29946
29947rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
29948ac_clean_files=$ac_clean_files_save
29949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
29950$as_echo_n "checking for suffix of executables... " >&6; }
29951if { { ac_try="$ac_link"
29952case "(($ac_try" in
29953  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29954  *) ac_try_echo=$ac_try;;
29955esac
29956eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29957$as_echo "$ac_try_echo"; } >&5
29958  (eval "$ac_link") 2>&5
29959  ac_status=$?
29960  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29961  test $ac_status = 0; }; then :
29962  # If both `conftest.exe' and `conftest' are `present' (well, observable)
29963# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
29964# work properly (i.e., refer to `conftest.exe'), while it won't with
29965# `rm'.
29966for ac_file in conftest.exe conftest conftest.*; do
29967  test -f "$ac_file" || continue
29968  case $ac_file in
29969    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
29970    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
29971	  break;;
29972    * ) break;;
29973  esac
29974done
29975else
29976  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29977$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29978as_fn_error $? "cannot compute suffix of executables: cannot compile and link
29979See \`config.log' for more details" "$LINENO" 5; }
29980fi
29981rm -f conftest conftest$ac_cv_exeext
29982{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
29983$as_echo "$ac_cv_exeext" >&6; }
29984
29985rm -f conftest.$ac_ext
29986EXEEXT=$ac_cv_exeext
29987ac_exeext=$EXEEXT
29988cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29989/* end confdefs.h.  */
29990#include <stdio.h>
29991int
29992main ()
29993{
29994FILE *f = fopen ("conftest.out", "w");
29995 return ferror (f) || fclose (f) != 0;
29996
29997  ;
29998  return 0;
29999}
30000_ACEOF
30001ac_clean_files="$ac_clean_files conftest.out"
30002# Check that the compiler produces executables we can run.  If not, either
30003# the compiler is broken, or we cross compile.
30004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
30005$as_echo_n "checking whether we are cross compiling... " >&6; }
30006if test "$cross_compiling" != yes; then
30007  { { ac_try="$ac_link"
30008case "(($ac_try" in
30009  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30010  *) ac_try_echo=$ac_try;;
30011esac
30012eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30013$as_echo "$ac_try_echo"; } >&5
30014  (eval "$ac_link") 2>&5
30015  ac_status=$?
30016  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30017  test $ac_status = 0; }
30018  if { ac_try='./conftest$ac_cv_exeext'
30019  { { case "(($ac_try" in
30020  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30021  *) ac_try_echo=$ac_try;;
30022esac
30023eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30024$as_echo "$ac_try_echo"; } >&5
30025  (eval "$ac_try") 2>&5
30026  ac_status=$?
30027  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30028  test $ac_status = 0; }; }; then
30029    cross_compiling=no
30030  else
30031    if test "$cross_compiling" = maybe; then
30032	cross_compiling=yes
30033    else
30034	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30035$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30036as_fn_error $? "cannot run C compiled programs.
30037If you meant to cross compile, use \`--host'.
30038See \`config.log' for more details" "$LINENO" 5; }
30039    fi
30040  fi
30041fi
30042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
30043$as_echo "$cross_compiling" >&6; }
30044
30045rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
30046ac_clean_files=$ac_clean_files_save
30047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
30048$as_echo_n "checking for suffix of object files... " >&6; }
30049if ${ac_cv_objext+:} false; then :
30050  $as_echo_n "(cached) " >&6
30051else
30052  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30053/* end confdefs.h.  */
30054
30055int
30056main ()
30057{
30058
30059  ;
30060  return 0;
30061}
30062_ACEOF
30063rm -f conftest.o conftest.obj
30064if { { ac_try="$ac_compile"
30065case "(($ac_try" in
30066  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30067  *) ac_try_echo=$ac_try;;
30068esac
30069eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30070$as_echo "$ac_try_echo"; } >&5
30071  (eval "$ac_compile") 2>&5
30072  ac_status=$?
30073  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30074  test $ac_status = 0; }; then :
30075  for ac_file in conftest.o conftest.obj conftest.*; do
30076  test -f "$ac_file" || continue;
30077  case $ac_file in
30078    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
30079    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
30080       break;;
30081  esac
30082done
30083else
30084  $as_echo "$as_me: failed program was:" >&5
30085sed 's/^/| /' conftest.$ac_ext >&5
30086
30087{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30088$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30089as_fn_error $? "cannot compute suffix of object files: cannot compile
30090See \`config.log' for more details" "$LINENO" 5; }
30091fi
30092rm -f conftest.$ac_cv_objext conftest.$ac_ext
30093fi
30094{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
30095$as_echo "$ac_cv_objext" >&6; }
30096OBJEXT=$ac_cv_objext
30097ac_objext=$OBJEXT
30098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
30099$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
30100if ${ac_cv_c_compiler_gnu+:} false; then :
30101  $as_echo_n "(cached) " >&6
30102else
30103  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30104/* end confdefs.h.  */
30105
30106int
30107main ()
30108{
30109#ifndef __GNUC__
30110       choke me
30111#endif
30112
30113  ;
30114  return 0;
30115}
30116_ACEOF
30117if ac_fn_c_try_compile "$LINENO"; then :
30118  ac_compiler_gnu=yes
30119else
30120  ac_compiler_gnu=no
30121fi
30122rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30123ac_cv_c_compiler_gnu=$ac_compiler_gnu
30124
30125fi
30126{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
30127$as_echo "$ac_cv_c_compiler_gnu" >&6; }
30128if test $ac_compiler_gnu = yes; then
30129  GCC=yes
30130else
30131  GCC=
30132fi
30133ac_test_CFLAGS=${CFLAGS+set}
30134ac_save_CFLAGS=$CFLAGS
30135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
30136$as_echo_n "checking whether $CC accepts -g... " >&6; }
30137if ${ac_cv_prog_cc_g+:} false; then :
30138  $as_echo_n "(cached) " >&6
30139else
30140  ac_save_c_werror_flag=$ac_c_werror_flag
30141   ac_c_werror_flag=yes
30142   ac_cv_prog_cc_g=no
30143   CFLAGS="-g"
30144   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30145/* end confdefs.h.  */
30146
30147int
30148main ()
30149{
30150
30151  ;
30152  return 0;
30153}
30154_ACEOF
30155if ac_fn_c_try_compile "$LINENO"; then :
30156  ac_cv_prog_cc_g=yes
30157else
30158  CFLAGS=""
30159      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30160/* end confdefs.h.  */
30161
30162int
30163main ()
30164{
30165
30166  ;
30167  return 0;
30168}
30169_ACEOF
30170if ac_fn_c_try_compile "$LINENO"; then :
30171
30172else
30173  ac_c_werror_flag=$ac_save_c_werror_flag
30174	 CFLAGS="-g"
30175	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30176/* end confdefs.h.  */
30177
30178int
30179main ()
30180{
30181
30182  ;
30183  return 0;
30184}
30185_ACEOF
30186if ac_fn_c_try_compile "$LINENO"; then :
30187  ac_cv_prog_cc_g=yes
30188fi
30189rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30190fi
30191rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30192fi
30193rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30194   ac_c_werror_flag=$ac_save_c_werror_flag
30195fi
30196{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
30197$as_echo "$ac_cv_prog_cc_g" >&6; }
30198if test "$ac_test_CFLAGS" = set; then
30199  CFLAGS=$ac_save_CFLAGS
30200elif test $ac_cv_prog_cc_g = yes; then
30201  if test "$GCC" = yes; then
30202    CFLAGS="-g -O2"
30203  else
30204    CFLAGS="-g"
30205  fi
30206else
30207  if test "$GCC" = yes; then
30208    CFLAGS="-O2"
30209  else
30210    CFLAGS=
30211  fi
30212fi
30213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
30214$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
30215if ${ac_cv_prog_cc_c89+:} false; then :
30216  $as_echo_n "(cached) " >&6
30217else
30218  ac_cv_prog_cc_c89=no
30219ac_save_CC=$CC
30220cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30221/* end confdefs.h.  */
30222#include <stdarg.h>
30223#include <stdio.h>
30224struct stat;
30225/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
30226struct buf { int x; };
30227FILE * (*rcsopen) (struct buf *, struct stat *, int);
30228static char *e (p, i)
30229     char **p;
30230     int i;
30231{
30232  return p[i];
30233}
30234static char *f (char * (*g) (char **, int), char **p, ...)
30235{
30236  char *s;
30237  va_list v;
30238  va_start (v,p);
30239  s = g (p, va_arg (v,int));
30240  va_end (v);
30241  return s;
30242}
30243
30244/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
30245   function prototypes and stuff, but not '\xHH' hex character constants.
30246   These don't provoke an error unfortunately, instead are silently treated
30247   as 'x'.  The following induces an error, until -std is added to get
30248   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
30249   array size at least.  It's necessary to write '\x00'==0 to get something
30250   that's true only with -std.  */
30251int osf4_cc_array ['\x00' == 0 ? 1 : -1];
30252
30253/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
30254   inside strings and character constants.  */
30255#define FOO(x) 'x'
30256int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
30257
30258int test (int i, double x);
30259struct s1 {int (*f) (int a);};
30260struct s2 {int (*f) (double a);};
30261int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
30262int argc;
30263char **argv;
30264int
30265main ()
30266{
30267return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
30268  ;
30269  return 0;
30270}
30271_ACEOF
30272for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
30273	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
30274do
30275  CC="$ac_save_CC $ac_arg"
30276  if ac_fn_c_try_compile "$LINENO"; then :
30277  ac_cv_prog_cc_c89=$ac_arg
30278fi
30279rm -f core conftest.err conftest.$ac_objext
30280  test "x$ac_cv_prog_cc_c89" != "xno" && break
30281done
30282rm -f conftest.$ac_ext
30283CC=$ac_save_CC
30284
30285fi
30286# AC_CACHE_VAL
30287case "x$ac_cv_prog_cc_c89" in
30288  x)
30289    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
30290$as_echo "none needed" >&6; } ;;
30291  xno)
30292    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
30293$as_echo "unsupported" >&6; } ;;
30294  *)
30295    CC="$CC $ac_cv_prog_cc_c89"
30296    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
30297$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
30298esac
30299if test "x$ac_cv_prog_cc_c89" != xno; then :
30300
30301fi
30302
30303ac_ext=cpp
30304ac_cpp='$CXXCPP $CPPFLAGS'
30305ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30306ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30307ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30308
30309
30310
30311  COMPILER_NAME=C++
30312  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
30313
30314  if test "x$CXX" != x; then
30315    # User has supplied compiler name already, always let that override.
30316    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
30317$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
30318    if test "x`basename $CXX`" = "x$CXX"; then
30319      # A command without a complete path is provided, search $PATH.
30320
30321      for ac_prog in $CXX
30322do
30323  # Extract the first word of "$ac_prog", so it can be a program name with args.
30324set dummy $ac_prog; ac_word=$2
30325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30326$as_echo_n "checking for $ac_word... " >&6; }
30327if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
30328  $as_echo_n "(cached) " >&6
30329else
30330  case $POTENTIAL_CXX in
30331  [\\/]* | ?:[\\/]*)
30332  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
30333  ;;
30334  *)
30335  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30336for as_dir in $PATH
30337do
30338  IFS=$as_save_IFS
30339  test -z "$as_dir" && as_dir=.
30340    for ac_exec_ext in '' $ac_executable_extensions; do
30341  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30342    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
30343    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30344    break 2
30345  fi
30346done
30347  done
30348IFS=$as_save_IFS
30349
30350  ;;
30351esac
30352fi
30353POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
30354if test -n "$POTENTIAL_CXX"; then
30355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
30356$as_echo "$POTENTIAL_CXX" >&6; }
30357else
30358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30359$as_echo "no" >&6; }
30360fi
30361
30362
30363  test -n "$POTENTIAL_CXX" && break
30364done
30365
30366      if test "x$POTENTIAL_CXX" != x; then
30367        CXX=$POTENTIAL_CXX
30368      else
30369        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
30370      fi
30371    else
30372      # Otherwise it might already be a complete path
30373      if test ! -x "$CXX"; then
30374        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
30375      fi
30376    fi
30377  else
30378    # No user supplied value. Locate compiler ourselves.
30379
30380    # If we are cross compiling, assume cross compilation tools follows the
30381    # cross compilation standard where they are prefixed with the autoconf
30382    # standard name for the target. For example the binary
30383    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
30384    # If we are not cross compiling, then the default compiler name will be
30385    # used.
30386
30387    CXX=
30388    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
30389    # before checking the rest of the PATH.
30390    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
30391    # step, this should not be necessary.
30392    if test -n "$TOOLCHAIN_PATH"; then
30393      PATH_save="$PATH"
30394      PATH="$TOOLCHAIN_PATH"
30395      for ac_prog in $SEARCH_LIST
30396do
30397  # Extract the first word of "$ac_prog", so it can be a program name with args.
30398set dummy $ac_prog; ac_word=$2
30399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30400$as_echo_n "checking for $ac_word... " >&6; }
30401if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
30402  $as_echo_n "(cached) " >&6
30403else
30404  case $TOOLCHAIN_PATH_CXX in
30405  [\\/]* | ?:[\\/]*)
30406  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
30407  ;;
30408  *)
30409  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30410for as_dir in $PATH
30411do
30412  IFS=$as_save_IFS
30413  test -z "$as_dir" && as_dir=.
30414    for ac_exec_ext in '' $ac_executable_extensions; do
30415  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30416    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
30417    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30418    break 2
30419  fi
30420done
30421  done
30422IFS=$as_save_IFS
30423
30424  ;;
30425esac
30426fi
30427TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
30428if test -n "$TOOLCHAIN_PATH_CXX"; then
30429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
30430$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
30431else
30432  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30433$as_echo "no" >&6; }
30434fi
30435
30436
30437  test -n "$TOOLCHAIN_PATH_CXX" && break
30438done
30439
30440      CXX=$TOOLCHAIN_PATH_CXX
30441      PATH="$PATH_save"
30442    fi
30443
30444    # AC_PATH_PROGS can't be run multiple times with the same variable,
30445    # so create a new name for this run.
30446    if test "x$CXX" = x; then
30447      for ac_prog in $SEARCH_LIST
30448do
30449  # Extract the first word of "$ac_prog", so it can be a program name with args.
30450set dummy $ac_prog; ac_word=$2
30451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30452$as_echo_n "checking for $ac_word... " >&6; }
30453if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
30454  $as_echo_n "(cached) " >&6
30455else
30456  case $POTENTIAL_CXX in
30457  [\\/]* | ?:[\\/]*)
30458  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
30459  ;;
30460  *)
30461  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30462for as_dir in $PATH
30463do
30464  IFS=$as_save_IFS
30465  test -z "$as_dir" && as_dir=.
30466    for ac_exec_ext in '' $ac_executable_extensions; do
30467  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30468    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
30469    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30470    break 2
30471  fi
30472done
30473  done
30474IFS=$as_save_IFS
30475
30476  ;;
30477esac
30478fi
30479POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
30480if test -n "$POTENTIAL_CXX"; then
30481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
30482$as_echo "$POTENTIAL_CXX" >&6; }
30483else
30484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30485$as_echo "no" >&6; }
30486fi
30487
30488
30489  test -n "$POTENTIAL_CXX" && break
30490done
30491
30492      CXX=$POTENTIAL_CXX
30493    fi
30494
30495    if test "x$CXX" = x; then
30496
30497  # Print a helpful message on how to acquire the necessary build dependency.
30498  # devkit is the help tag: freetype, cups, pulse, alsa etc
30499  MISSING_DEPENDENCY=devkit
30500
30501  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30502    cygwin_help $MISSING_DEPENDENCY
30503  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30504    msys_help $MISSING_DEPENDENCY
30505  else
30506    PKGHANDLER_COMMAND=
30507
30508    case $PKGHANDLER in
30509      apt-get)
30510        apt_help     $MISSING_DEPENDENCY ;;
30511      yum)
30512        yum_help     $MISSING_DEPENDENCY ;;
30513      port)
30514        port_help    $MISSING_DEPENDENCY ;;
30515      pkgutil)
30516        pkgutil_help $MISSING_DEPENDENCY ;;
30517      pkgadd)
30518        pkgadd_help  $MISSING_DEPENDENCY ;;
30519    esac
30520
30521    if test "x$PKGHANDLER_COMMAND" != x; then
30522      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30523    fi
30524  fi
30525
30526      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
30527    fi
30528  fi
30529
30530  # Now we have a compiler binary in CXX. Make sure it's okay.
30531
30532  # Only process if variable expands to non-empty
30533
30534  if test "x$CXX" != x; then
30535    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30536
30537  # First separate the path from the arguments. This will split at the first
30538  # space.
30539  complete="$CXX"
30540  path="${complete%% *}"
30541  tmp="$complete EOL"
30542  arguments="${tmp#* }"
30543
30544  # Input might be given as Windows format, start by converting to
30545  # unix format.
30546  new_path=`$CYGPATH -u "$path"`
30547
30548  # Now try to locate executable using which
30549  new_path=`$WHICH "$new_path" 2> /dev/null`
30550  # bat and cmd files are not always considered executable in cygwin causing which
30551  # to not find them
30552  if test "x$new_path" = x \
30553      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30554      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30555    new_path=`$CYGPATH -u "$path"`
30556  fi
30557  if test "x$new_path" = x; then
30558    # Oops. Which didn't find the executable.
30559    # The splitting of arguments from the executable at a space might have been incorrect,
30560    # since paths with space are more likely in Windows. Give it another try with the whole
30561    # argument.
30562    path="$complete"
30563    arguments="EOL"
30564    new_path=`$CYGPATH -u "$path"`
30565    new_path=`$WHICH "$new_path" 2> /dev/null`
30566    # bat and cmd files are not always considered executable in cygwin causing which
30567    # to not find them
30568    if test "x$new_path" = x \
30569        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30570        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30571      new_path=`$CYGPATH -u "$path"`
30572    fi
30573    if test "x$new_path" = x; then
30574      # It's still not found. Now this is an unrecoverable error.
30575      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
30576$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
30577      has_space=`$ECHO "$complete" | $GREP " "`
30578      if test "x$has_space" != x; then
30579        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30580$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30581      fi
30582      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30583    fi
30584  fi
30585
30586  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30587  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30588  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30589  # "foo.exe" is OK but "foo" is an error.
30590  #
30591  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30592  # It is also a way to make sure we got the proper file name for the real test later on.
30593  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30594  if test "x$test_shortpath" = x; then
30595    # Short path failed, file does not exist as specified.
30596    # Try adding .exe or .cmd
30597    if test -f "${new_path}.exe"; then
30598      input_to_shortpath="${new_path}.exe"
30599    elif test -f "${new_path}.cmd"; then
30600      input_to_shortpath="${new_path}.cmd"
30601    else
30602      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
30603$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
30604      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30605$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30606      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30607    fi
30608  else
30609    input_to_shortpath="$new_path"
30610  fi
30611
30612  # Call helper function which possibly converts this using DOS-style short mode.
30613  # If so, the updated path is stored in $new_path.
30614  new_path="$input_to_shortpath"
30615
30616  input_path="$input_to_shortpath"
30617  # Check if we need to convert this using DOS-style short mode. If the path
30618  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30619  # take no chances and rewrite it.
30620  # Note: m4 eats our [], so we need to use [ and ] instead.
30621  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30622  if test "x$has_forbidden_chars" != x; then
30623    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30624    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30625    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30626    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30627      # Going to short mode and back again did indeed matter. Since short mode is
30628      # case insensitive, let's make it lowercase to improve readability.
30629      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30630      # Now convert it back to Unix-style (cygpath)
30631      input_path=`$CYGPATH -u "$shortmode_path"`
30632      new_path="$input_path"
30633    fi
30634  fi
30635
30636  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30637  if test "x$test_cygdrive_prefix" = x; then
30638    # As a simple fix, exclude /usr/bin since it's not a real path.
30639    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30640      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30641      # a path prefixed by /cygdrive for fixpath to work.
30642      new_path="$CYGWIN_ROOT_PATH$input_path"
30643    fi
30644  fi
30645
30646  # remove trailing .exe if any
30647  new_path="${new_path/%.exe/}"
30648
30649    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30650
30651  # First separate the path from the arguments. This will split at the first
30652  # space.
30653  complete="$CXX"
30654  path="${complete%% *}"
30655  tmp="$complete EOL"
30656  arguments="${tmp#* }"
30657
30658  # Input might be given as Windows format, start by converting to
30659  # unix format.
30660  new_path="$path"
30661
30662  windows_path="$new_path"
30663  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30664    unix_path=`$CYGPATH -u "$windows_path"`
30665    new_path="$unix_path"
30666  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30667    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30668    new_path="$unix_path"
30669  fi
30670
30671
30672  # Now try to locate executable using which
30673  new_path=`$WHICH "$new_path" 2> /dev/null`
30674
30675  if test "x$new_path" = x; then
30676    # Oops. Which didn't find the executable.
30677    # The splitting of arguments from the executable at a space might have been incorrect,
30678    # since paths with space are more likely in Windows. Give it another try with the whole
30679    # argument.
30680    path="$complete"
30681    arguments="EOL"
30682    new_path="$path"
30683
30684  windows_path="$new_path"
30685  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30686    unix_path=`$CYGPATH -u "$windows_path"`
30687    new_path="$unix_path"
30688  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30689    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30690    new_path="$unix_path"
30691  fi
30692
30693
30694    new_path=`$WHICH "$new_path" 2> /dev/null`
30695    # bat and cmd files are not always considered executable in MSYS causing which
30696    # to not find them
30697    if test "x$new_path" = x \
30698        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30699        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30700      new_path="$path"
30701
30702  windows_path="$new_path"
30703  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30704    unix_path=`$CYGPATH -u "$windows_path"`
30705    new_path="$unix_path"
30706  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30707    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30708    new_path="$unix_path"
30709  fi
30710
30711    fi
30712
30713    if test "x$new_path" = x; then
30714      # It's still not found. Now this is an unrecoverable error.
30715      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
30716$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
30717      has_space=`$ECHO "$complete" | $GREP " "`
30718      if test "x$has_space" != x; then
30719        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30720$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30721      fi
30722      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30723    fi
30724  fi
30725
30726  # Now new_path has a complete unix path to the binary
30727  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30728    # Keep paths in /bin as-is, but remove trailing .exe if any
30729    new_path="${new_path/%.exe/}"
30730    # Do not save /bin paths to all_fixpath_prefixes!
30731  else
30732    # Not in mixed or Windows style, start by that.
30733    new_path=`cmd //c echo $new_path`
30734
30735  input_path="$new_path"
30736  # Check if we need to convert this using DOS-style short mode. If the path
30737  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30738  # take no chances and rewrite it.
30739  # Note: m4 eats our [], so we need to use [ and ] instead.
30740  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30741  if test "x$has_forbidden_chars" != x; then
30742    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30743    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30744  fi
30745
30746    # Output is in $new_path
30747
30748  windows_path="$new_path"
30749  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30750    unix_path=`$CYGPATH -u "$windows_path"`
30751    new_path="$unix_path"
30752  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30753    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30754    new_path="$unix_path"
30755  fi
30756
30757    # remove trailing .exe if any
30758    new_path="${new_path/%.exe/}"
30759
30760    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30761    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30762  fi
30763
30764    else
30765      # We're on a unix platform. Hooray! :)
30766      # First separate the path from the arguments. This will split at the first
30767      # space.
30768      complete="$CXX"
30769      path="${complete%% *}"
30770      tmp="$complete EOL"
30771      arguments="${tmp#* }"
30772
30773      # Cannot rely on the command "which" here since it doesn't always work.
30774      is_absolute_path=`$ECHO "$path" | $GREP ^/`
30775      if test -z "$is_absolute_path"; then
30776        # Path to executable is not absolute. Find it.
30777        IFS_save="$IFS"
30778        IFS=:
30779        for p in $PATH; do
30780          if test -f "$p/$path" && test -x "$p/$path"; then
30781            new_path="$p/$path"
30782            break
30783          fi
30784        done
30785        IFS="$IFS_save"
30786      else
30787        # This is an absolute path, we can use it without further modifications.
30788        new_path="$path"
30789      fi
30790
30791      if test "x$new_path" = x; then
30792        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
30793$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
30794        has_space=`$ECHO "$complete" | $GREP " "`
30795        if test "x$has_space" != x; then
30796          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30797$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30798        fi
30799        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30800      fi
30801    fi
30802
30803    # Now join together the path and the arguments once again
30804    if test "x$arguments" != xEOL; then
30805      new_complete="$new_path ${arguments% *}"
30806    else
30807      new_complete="$new_path"
30808    fi
30809
30810    if test "x$complete" != "x$new_complete"; then
30811      CXX="$new_complete"
30812      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
30813$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
30814    fi
30815  fi
30816
30817  TEST_COMPILER="$CXX"
30818  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
30819  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
30820  if test "x$OPENJDK_BUILD_OS" != xaix; then
30821    # FIXME: This test should not be needed anymore; we don't do that for any platform.
30822    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
30823$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
30824
30825  if test "x$OPENJDK_BUILD_OS" != xwindows; then
30826    # Follow a chain of symbolic links. Use readlink
30827    # where it exists, else fall back to horribly
30828    # complicated shell code.
30829    if test "x$READLINK_TESTED" != yes; then
30830      # On MacOSX there is a readlink tool with a different
30831      # purpose than the GNU readlink tool. Check the found readlink.
30832      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
30833      if test "x$ISGNU" = x; then
30834        # A readlink that we do not know how to use.
30835        # Are there other non-GNU readlinks out there?
30836        READLINK_TESTED=yes
30837        READLINK=
30838      fi
30839    fi
30840
30841    if test "x$READLINK" != x; then
30842      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
30843    else
30844      # Save the current directory for restoring afterwards
30845      STARTDIR=$PWD
30846      COUNTER=0
30847      sym_link_dir=`$DIRNAME $TEST_COMPILER`
30848      sym_link_file=`$BASENAME $TEST_COMPILER`
30849      cd $sym_link_dir
30850      # Use -P flag to resolve symlinks in directories.
30851      cd `$THEPWDCMD -P`
30852      sym_link_dir=`$THEPWDCMD -P`
30853      # Resolve file symlinks
30854      while test $COUNTER -lt 20; do
30855        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
30856        if test "x$ISLINK" == x; then
30857          # This is not a symbolic link! We are done!
30858          break
30859        fi
30860        # Again resolve directory symlinks since the target of the just found
30861        # link could be in a different directory
30862        cd `$DIRNAME $ISLINK`
30863        sym_link_dir=`$THEPWDCMD -P`
30864        sym_link_file=`$BASENAME $ISLINK`
30865        let COUNTER=COUNTER+1
30866      done
30867      cd $STARTDIR
30868      TEST_COMPILER=$sym_link_dir/$sym_link_file
30869    fi
30870  fi
30871
30872    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
30873$as_echo "$TEST_COMPILER" >&6; }
30874  fi
30875  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
30876$as_echo_n "checking if CXX is disguised ccache... " >&6; }
30877
30878  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
30879  if test "x$COMPILER_BASENAME" = "xccache"; then
30880    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
30881$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
30882    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
30883    # We want to control ccache invocation ourselves, so ignore this cc and try
30884    # searching again.
30885
30886    # Remove the path to the fake ccache cc from the PATH
30887    RETRY_COMPILER_SAVED_PATH="$PATH"
30888    COMPILER_DIRNAME=`$DIRNAME $CXX`
30889    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
30890
30891    # Try again looking for our compiler
30892    if test -n "$ac_tool_prefix"; then
30893  for ac_prog in $TOOLCHAIN_CXX_BINARY
30894  do
30895    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
30896set dummy $ac_tool_prefix$ac_prog; ac_word=$2
30897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30898$as_echo_n "checking for $ac_word... " >&6; }
30899if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
30900  $as_echo_n "(cached) " >&6
30901else
30902  if test -n "$PROPER_COMPILER_CXX"; then
30903  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
30904else
30905as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30906for as_dir in $PATH
30907do
30908  IFS=$as_save_IFS
30909  test -z "$as_dir" && as_dir=.
30910    for ac_exec_ext in '' $ac_executable_extensions; do
30911  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30912    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
30913    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30914    break 2
30915  fi
30916done
30917  done
30918IFS=$as_save_IFS
30919
30920fi
30921fi
30922PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
30923if test -n "$PROPER_COMPILER_CXX"; then
30924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
30925$as_echo "$PROPER_COMPILER_CXX" >&6; }
30926else
30927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30928$as_echo "no" >&6; }
30929fi
30930
30931
30932    test -n "$PROPER_COMPILER_CXX" && break
30933  done
30934fi
30935if test -z "$PROPER_COMPILER_CXX"; then
30936  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
30937  for ac_prog in $TOOLCHAIN_CXX_BINARY
30938do
30939  # Extract the first word of "$ac_prog", so it can be a program name with args.
30940set dummy $ac_prog; ac_word=$2
30941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30942$as_echo_n "checking for $ac_word... " >&6; }
30943if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
30944  $as_echo_n "(cached) " >&6
30945else
30946  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
30947  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
30948else
30949as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30950for as_dir in $PATH
30951do
30952  IFS=$as_save_IFS
30953  test -z "$as_dir" && as_dir=.
30954    for ac_exec_ext in '' $ac_executable_extensions; do
30955  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30956    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
30957    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30958    break 2
30959  fi
30960done
30961  done
30962IFS=$as_save_IFS
30963
30964fi
30965fi
30966ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
30967if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
30968  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
30969$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
30970else
30971  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30972$as_echo "no" >&6; }
30973fi
30974
30975
30976  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
30977done
30978
30979  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
30980    PROPER_COMPILER_CXX=""
30981  else
30982    case $cross_compiling:$ac_tool_warned in
30983yes:)
30984{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30985$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30986ac_tool_warned=yes ;;
30987esac
30988    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
30989  fi
30990fi
30991
30992
30993  # Only process if variable expands to non-empty
30994
30995  if test "x$PROPER_COMPILER_CXX" != x; then
30996    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30997
30998  # First separate the path from the arguments. This will split at the first
30999  # space.
31000  complete="$PROPER_COMPILER_CXX"
31001  path="${complete%% *}"
31002  tmp="$complete EOL"
31003  arguments="${tmp#* }"
31004
31005  # Input might be given as Windows format, start by converting to
31006  # unix format.
31007  new_path=`$CYGPATH -u "$path"`
31008
31009  # Now try to locate executable using which
31010  new_path=`$WHICH "$new_path" 2> /dev/null`
31011  # bat and cmd files are not always considered executable in cygwin causing which
31012  # to not find them
31013  if test "x$new_path" = x \
31014      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31015      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31016    new_path=`$CYGPATH -u "$path"`
31017  fi
31018  if test "x$new_path" = x; then
31019    # Oops. Which didn't find the executable.
31020    # The splitting of arguments from the executable at a space might have been incorrect,
31021    # since paths with space are more likely in Windows. Give it another try with the whole
31022    # argument.
31023    path="$complete"
31024    arguments="EOL"
31025    new_path=`$CYGPATH -u "$path"`
31026    new_path=`$WHICH "$new_path" 2> /dev/null`
31027    # bat and cmd files are not always considered executable in cygwin causing which
31028    # to not find them
31029    if test "x$new_path" = x \
31030        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31031        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31032      new_path=`$CYGPATH -u "$path"`
31033    fi
31034    if test "x$new_path" = x; then
31035      # It's still not found. Now this is an unrecoverable error.
31036      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
31037$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
31038      has_space=`$ECHO "$complete" | $GREP " "`
31039      if test "x$has_space" != x; then
31040        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31041$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31042      fi
31043      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
31044    fi
31045  fi
31046
31047  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31048  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31049  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31050  # "foo.exe" is OK but "foo" is an error.
31051  #
31052  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31053  # It is also a way to make sure we got the proper file name for the real test later on.
31054  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31055  if test "x$test_shortpath" = x; then
31056    # Short path failed, file does not exist as specified.
31057    # Try adding .exe or .cmd
31058    if test -f "${new_path}.exe"; then
31059      input_to_shortpath="${new_path}.exe"
31060    elif test -f "${new_path}.cmd"; then
31061      input_to_shortpath="${new_path}.cmd"
31062    else
31063      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
31064$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
31065      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31066$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31067      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
31068    fi
31069  else
31070    input_to_shortpath="$new_path"
31071  fi
31072
31073  # Call helper function which possibly converts this using DOS-style short mode.
31074  # If so, the updated path is stored in $new_path.
31075  new_path="$input_to_shortpath"
31076
31077  input_path="$input_to_shortpath"
31078  # Check if we need to convert this using DOS-style short mode. If the path
31079  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31080  # take no chances and rewrite it.
31081  # Note: m4 eats our [], so we need to use [ and ] instead.
31082  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31083  if test "x$has_forbidden_chars" != x; then
31084    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31085    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31086    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31087    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31088      # Going to short mode and back again did indeed matter. Since short mode is
31089      # case insensitive, let's make it lowercase to improve readability.
31090      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31091      # Now convert it back to Unix-style (cygpath)
31092      input_path=`$CYGPATH -u "$shortmode_path"`
31093      new_path="$input_path"
31094    fi
31095  fi
31096
31097  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31098  if test "x$test_cygdrive_prefix" = x; then
31099    # As a simple fix, exclude /usr/bin since it's not a real path.
31100    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31101      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31102      # a path prefixed by /cygdrive for fixpath to work.
31103      new_path="$CYGWIN_ROOT_PATH$input_path"
31104    fi
31105  fi
31106
31107  # remove trailing .exe if any
31108  new_path="${new_path/%.exe/}"
31109
31110    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31111
31112  # First separate the path from the arguments. This will split at the first
31113  # space.
31114  complete="$PROPER_COMPILER_CXX"
31115  path="${complete%% *}"
31116  tmp="$complete EOL"
31117  arguments="${tmp#* }"
31118
31119  # Input might be given as Windows format, start by converting to
31120  # unix format.
31121  new_path="$path"
31122
31123  windows_path="$new_path"
31124  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31125    unix_path=`$CYGPATH -u "$windows_path"`
31126    new_path="$unix_path"
31127  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31128    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31129    new_path="$unix_path"
31130  fi
31131
31132
31133  # Now try to locate executable using which
31134  new_path=`$WHICH "$new_path" 2> /dev/null`
31135
31136  if test "x$new_path" = x; then
31137    # Oops. Which didn't find the executable.
31138    # The splitting of arguments from the executable at a space might have been incorrect,
31139    # since paths with space are more likely in Windows. Give it another try with the whole
31140    # argument.
31141    path="$complete"
31142    arguments="EOL"
31143    new_path="$path"
31144
31145  windows_path="$new_path"
31146  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31147    unix_path=`$CYGPATH -u "$windows_path"`
31148    new_path="$unix_path"
31149  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31150    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31151    new_path="$unix_path"
31152  fi
31153
31154
31155    new_path=`$WHICH "$new_path" 2> /dev/null`
31156    # bat and cmd files are not always considered executable in MSYS causing which
31157    # to not find them
31158    if test "x$new_path" = x \
31159        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31160        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31161      new_path="$path"
31162
31163  windows_path="$new_path"
31164  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31165    unix_path=`$CYGPATH -u "$windows_path"`
31166    new_path="$unix_path"
31167  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31168    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31169    new_path="$unix_path"
31170  fi
31171
31172    fi
31173
31174    if test "x$new_path" = x; then
31175      # It's still not found. Now this is an unrecoverable error.
31176      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
31177$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
31178      has_space=`$ECHO "$complete" | $GREP " "`
31179      if test "x$has_space" != x; then
31180        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31181$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31182      fi
31183      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
31184    fi
31185  fi
31186
31187  # Now new_path has a complete unix path to the binary
31188  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31189    # Keep paths in /bin as-is, but remove trailing .exe if any
31190    new_path="${new_path/%.exe/}"
31191    # Do not save /bin paths to all_fixpath_prefixes!
31192  else
31193    # Not in mixed or Windows style, start by that.
31194    new_path=`cmd //c echo $new_path`
31195
31196  input_path="$new_path"
31197  # Check if we need to convert this using DOS-style short mode. If the path
31198  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31199  # take no chances and rewrite it.
31200  # Note: m4 eats our [], so we need to use [ and ] instead.
31201  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31202  if test "x$has_forbidden_chars" != x; then
31203    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31204    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31205  fi
31206
31207    # Output is in $new_path
31208
31209  windows_path="$new_path"
31210  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31211    unix_path=`$CYGPATH -u "$windows_path"`
31212    new_path="$unix_path"
31213  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31214    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31215    new_path="$unix_path"
31216  fi
31217
31218    # remove trailing .exe if any
31219    new_path="${new_path/%.exe/}"
31220
31221    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31222    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31223  fi
31224
31225    else
31226      # We're on a unix platform. Hooray! :)
31227      # First separate the path from the arguments. This will split at the first
31228      # space.
31229      complete="$PROPER_COMPILER_CXX"
31230      path="${complete%% *}"
31231      tmp="$complete EOL"
31232      arguments="${tmp#* }"
31233
31234      # Cannot rely on the command "which" here since it doesn't always work.
31235      is_absolute_path=`$ECHO "$path" | $GREP ^/`
31236      if test -z "$is_absolute_path"; then
31237        # Path to executable is not absolute. Find it.
31238        IFS_save="$IFS"
31239        IFS=:
31240        for p in $PATH; do
31241          if test -f "$p/$path" && test -x "$p/$path"; then
31242            new_path="$p/$path"
31243            break
31244          fi
31245        done
31246        IFS="$IFS_save"
31247      else
31248        # This is an absolute path, we can use it without further modifications.
31249        new_path="$path"
31250      fi
31251
31252      if test "x$new_path" = x; then
31253        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
31254$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
31255        has_space=`$ECHO "$complete" | $GREP " "`
31256        if test "x$has_space" != x; then
31257          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31258$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31259        fi
31260        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
31261      fi
31262    fi
31263
31264    # Now join together the path and the arguments once again
31265    if test "x$arguments" != xEOL; then
31266      new_complete="$new_path ${arguments% *}"
31267    else
31268      new_complete="$new_path"
31269    fi
31270
31271    if test "x$complete" != "x$new_complete"; then
31272      PROPER_COMPILER_CXX="$new_complete"
31273      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
31274$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
31275    fi
31276  fi
31277
31278    PATH="$RETRY_COMPILER_SAVED_PATH"
31279
31280    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
31281$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
31282
31283  if test "x$OPENJDK_BUILD_OS" != xwindows; then
31284    # Follow a chain of symbolic links. Use readlink
31285    # where it exists, else fall back to horribly
31286    # complicated shell code.
31287    if test "x$READLINK_TESTED" != yes; then
31288      # On MacOSX there is a readlink tool with a different
31289      # purpose than the GNU readlink tool. Check the found readlink.
31290      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
31291      if test "x$ISGNU" = x; then
31292        # A readlink that we do not know how to use.
31293        # Are there other non-GNU readlinks out there?
31294        READLINK_TESTED=yes
31295        READLINK=
31296      fi
31297    fi
31298
31299    if test "x$READLINK" != x; then
31300      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
31301    else
31302      # Save the current directory for restoring afterwards
31303      STARTDIR=$PWD
31304      COUNTER=0
31305      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
31306      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
31307      cd $sym_link_dir
31308      # Use -P flag to resolve symlinks in directories.
31309      cd `$THEPWDCMD -P`
31310      sym_link_dir=`$THEPWDCMD -P`
31311      # Resolve file symlinks
31312      while test $COUNTER -lt 20; do
31313        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
31314        if test "x$ISLINK" == x; then
31315          # This is not a symbolic link! We are done!
31316          break
31317        fi
31318        # Again resolve directory symlinks since the target of the just found
31319        # link could be in a different directory
31320        cd `$DIRNAME $ISLINK`
31321        sym_link_dir=`$THEPWDCMD -P`
31322        sym_link_file=`$BASENAME $ISLINK`
31323        let COUNTER=COUNTER+1
31324      done
31325      cd $STARTDIR
31326      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
31327    fi
31328  fi
31329
31330    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
31331$as_echo "$PROPER_COMPILER_CXX" >&6; }
31332    CXX="$PROPER_COMPILER_CXX"
31333  else
31334    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
31335$as_echo "no, keeping CXX" >&6; }
31336  fi
31337
31338
31339  COMPILER=$CXX
31340  COMPILER_NAME=$COMPILER_NAME
31341
31342  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
31343    # cc -V output typically looks like
31344    #     cc: Sun C 5.12 Linux_i386 2011/11/16
31345    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
31346    # Check that this is likely to be the Solaris Studio cc.
31347    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
31348    if test $? -ne 0; then
31349      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31350      { $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
31351$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31352      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31353$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31354      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
31355$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
31356      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31357    fi
31358    # Remove usage instructions (if present), and
31359    # collapse compiler output into a single line
31360    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
31361        $SED -e 's/ *[Uu]sage:.*//'`
31362    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31363        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
31364  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
31365    # xlc -qversion output typically looks like
31366    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
31367    #     Version: 11.01.0000.0015
31368    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
31369    # Check that this is likely to be the IBM XL C compiler.
31370    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
31371    if test $? -ne 0; then
31372      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31373      { $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
31374$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31375      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31376$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31377      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
31378$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
31379      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31380    fi
31381    # Collapse compiler output into a single line
31382    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
31383    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31384        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
31385  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
31386    # There is no specific version flag, but all output starts with a version string.
31387    # First line typically looks something like:
31388    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
31389    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
31390    # Check that this is likely to be Microsoft CL.EXE.
31391    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
31392    if test $? -ne 0; then
31393      { $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
31394$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31395      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31396$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31397      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31398    fi
31399    # Collapse compiler output into a single line
31400    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
31401    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31402        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
31403  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
31404    # gcc --version output typically looks like
31405    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
31406    #     Copyright (C) 2013 Free Software Foundation, Inc.
31407    #     This is free software; see the source for copying conditions.  There is NO
31408    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
31409    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31410    # Check that this is likely to be GCC.
31411    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
31412    if test $? -ne 0; then
31413      { $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
31414$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31415      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
31416$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
31417      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31418    fi
31419    # Remove Copyright and legalese from version string, and
31420    # collapse into a single line
31421    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
31422        $SED -e 's/ *Copyright .*//'`
31423    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31424        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
31425  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
31426    # clang --version output typically looks like
31427    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
31428    #    clang version 3.3 (tags/RELEASE_33/final)
31429    # or
31430    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
31431    #    Target: x86_64-pc-linux-gnu
31432    #    Thread model: posix
31433    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31434    # Check that this is likely to be clang
31435    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
31436    if test $? -ne 0; then
31437      { $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
31438$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31439      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31440$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31441      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31442    fi
31443    # Collapse compiler output into a single line
31444    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
31445    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31446        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
31447  else
31448      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
31449  fi
31450  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
31451  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
31452  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
31453  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
31454
31455  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
31456$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
31457
31458
31459  # Now that we have resolved CXX ourself, let autoconf have its go at it
31460  ac_ext=cpp
31461ac_cpp='$CXXCPP $CPPFLAGS'
31462ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31463ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31464ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31465if test -z "$CXX"; then
31466  if test -n "$CCC"; then
31467    CXX=$CCC
31468  else
31469    if test -n "$ac_tool_prefix"; then
31470  for ac_prog in $CXX
31471  do
31472    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
31473set dummy $ac_tool_prefix$ac_prog; ac_word=$2
31474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31475$as_echo_n "checking for $ac_word... " >&6; }
31476if ${ac_cv_prog_CXX+:} false; then :
31477  $as_echo_n "(cached) " >&6
31478else
31479  if test -n "$CXX"; then
31480  ac_cv_prog_CXX="$CXX" # Let the user override the test.
31481else
31482as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31483for as_dir in $PATH
31484do
31485  IFS=$as_save_IFS
31486  test -z "$as_dir" && as_dir=.
31487    for ac_exec_ext in '' $ac_executable_extensions; do
31488  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31489    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
31490    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31491    break 2
31492  fi
31493done
31494  done
31495IFS=$as_save_IFS
31496
31497fi
31498fi
31499CXX=$ac_cv_prog_CXX
31500if test -n "$CXX"; then
31501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
31502$as_echo "$CXX" >&6; }
31503else
31504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31505$as_echo "no" >&6; }
31506fi
31507
31508
31509    test -n "$CXX" && break
31510  done
31511fi
31512if test -z "$CXX"; then
31513  ac_ct_CXX=$CXX
31514  for ac_prog in $CXX
31515do
31516  # Extract the first word of "$ac_prog", so it can be a program name with args.
31517set dummy $ac_prog; ac_word=$2
31518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31519$as_echo_n "checking for $ac_word... " >&6; }
31520if ${ac_cv_prog_ac_ct_CXX+:} false; then :
31521  $as_echo_n "(cached) " >&6
31522else
31523  if test -n "$ac_ct_CXX"; then
31524  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
31525else
31526as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31527for as_dir in $PATH
31528do
31529  IFS=$as_save_IFS
31530  test -z "$as_dir" && as_dir=.
31531    for ac_exec_ext in '' $ac_executable_extensions; do
31532  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31533    ac_cv_prog_ac_ct_CXX="$ac_prog"
31534    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31535    break 2
31536  fi
31537done
31538  done
31539IFS=$as_save_IFS
31540
31541fi
31542fi
31543ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
31544if test -n "$ac_ct_CXX"; then
31545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
31546$as_echo "$ac_ct_CXX" >&6; }
31547else
31548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31549$as_echo "no" >&6; }
31550fi
31551
31552
31553  test -n "$ac_ct_CXX" && break
31554done
31555
31556  if test "x$ac_ct_CXX" = x; then
31557    CXX="g++"
31558  else
31559    case $cross_compiling:$ac_tool_warned in
31560yes:)
31561{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
31562$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
31563ac_tool_warned=yes ;;
31564esac
31565    CXX=$ac_ct_CXX
31566  fi
31567fi
31568
31569  fi
31570fi
31571# Provide some information about the compiler.
31572$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
31573set X $ac_compile
31574ac_compiler=$2
31575for ac_option in --version -v -V -qversion; do
31576  { { ac_try="$ac_compiler $ac_option >&5"
31577case "(($ac_try" in
31578  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
31579  *) ac_try_echo=$ac_try;;
31580esac
31581eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
31582$as_echo "$ac_try_echo"; } >&5
31583  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
31584  ac_status=$?
31585  if test -s conftest.err; then
31586    sed '10a\
31587... rest of stderr output deleted ...
31588         10q' conftest.err >conftest.er1
31589    cat conftest.er1 >&5
31590  fi
31591  rm -f conftest.er1 conftest.err
31592  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31593  test $ac_status = 0; }
31594done
31595
31596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
31597$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
31598if ${ac_cv_cxx_compiler_gnu+:} false; then :
31599  $as_echo_n "(cached) " >&6
31600else
31601  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31602/* end confdefs.h.  */
31603
31604int
31605main ()
31606{
31607#ifndef __GNUC__
31608       choke me
31609#endif
31610
31611  ;
31612  return 0;
31613}
31614_ACEOF
31615if ac_fn_cxx_try_compile "$LINENO"; then :
31616  ac_compiler_gnu=yes
31617else
31618  ac_compiler_gnu=no
31619fi
31620rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31621ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
31622
31623fi
31624{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
31625$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
31626if test $ac_compiler_gnu = yes; then
31627  GXX=yes
31628else
31629  GXX=
31630fi
31631ac_test_CXXFLAGS=${CXXFLAGS+set}
31632ac_save_CXXFLAGS=$CXXFLAGS
31633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
31634$as_echo_n "checking whether $CXX accepts -g... " >&6; }
31635if ${ac_cv_prog_cxx_g+:} false; then :
31636  $as_echo_n "(cached) " >&6
31637else
31638  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
31639   ac_cxx_werror_flag=yes
31640   ac_cv_prog_cxx_g=no
31641   CXXFLAGS="-g"
31642   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31643/* end confdefs.h.  */
31644
31645int
31646main ()
31647{
31648
31649  ;
31650  return 0;
31651}
31652_ACEOF
31653if ac_fn_cxx_try_compile "$LINENO"; then :
31654  ac_cv_prog_cxx_g=yes
31655else
31656  CXXFLAGS=""
31657      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31658/* end confdefs.h.  */
31659
31660int
31661main ()
31662{
31663
31664  ;
31665  return 0;
31666}
31667_ACEOF
31668if ac_fn_cxx_try_compile "$LINENO"; then :
31669
31670else
31671  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
31672	 CXXFLAGS="-g"
31673	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31674/* end confdefs.h.  */
31675
31676int
31677main ()
31678{
31679
31680  ;
31681  return 0;
31682}
31683_ACEOF
31684if ac_fn_cxx_try_compile "$LINENO"; then :
31685  ac_cv_prog_cxx_g=yes
31686fi
31687rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31688fi
31689rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31690fi
31691rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31692   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
31693fi
31694{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
31695$as_echo "$ac_cv_prog_cxx_g" >&6; }
31696if test "$ac_test_CXXFLAGS" = set; then
31697  CXXFLAGS=$ac_save_CXXFLAGS
31698elif test $ac_cv_prog_cxx_g = yes; then
31699  if test "$GXX" = yes; then
31700    CXXFLAGS="-g -O2"
31701  else
31702    CXXFLAGS="-g"
31703  fi
31704else
31705  if test "$GXX" = yes; then
31706    CXXFLAGS="-O2"
31707  else
31708    CXXFLAGS=
31709  fi
31710fi
31711ac_ext=cpp
31712ac_cpp='$CXXCPP $CPPFLAGS'
31713ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31714ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31715ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31716
31717
31718  #
31719  # Setup the preprocessor (CPP and CXXCPP)
31720  #
31721  ac_ext=c
31722ac_cpp='$CPP $CPPFLAGS'
31723ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31724ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31725ac_compiler_gnu=$ac_cv_c_compiler_gnu
31726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
31727$as_echo_n "checking how to run the C preprocessor... " >&6; }
31728# On Suns, sometimes $CPP names a directory.
31729if test -n "$CPP" && test -d "$CPP"; then
31730  CPP=
31731fi
31732if test -z "$CPP"; then
31733  if ${ac_cv_prog_CPP+:} false; then :
31734  $as_echo_n "(cached) " >&6
31735else
31736      # Double quotes because CPP needs to be expanded
31737    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
31738    do
31739      ac_preproc_ok=false
31740for ac_c_preproc_warn_flag in '' yes
31741do
31742  # Use a header file that comes with gcc, so configuring glibc
31743  # with a fresh cross-compiler works.
31744  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31745  # <limits.h> exists even on freestanding compilers.
31746  # On the NeXT, cc -E runs the code through the compiler's parser,
31747  # not just through cpp. "Syntax error" is here to catch this case.
31748  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31749/* end confdefs.h.  */
31750#ifdef __STDC__
31751# include <limits.h>
31752#else
31753# include <assert.h>
31754#endif
31755		     Syntax error
31756_ACEOF
31757if ac_fn_c_try_cpp "$LINENO"; then :
31758
31759else
31760  # Broken: fails on valid input.
31761continue
31762fi
31763rm -f conftest.err conftest.i conftest.$ac_ext
31764
31765  # OK, works on sane cases.  Now check whether nonexistent headers
31766  # can be detected and how.
31767  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31768/* end confdefs.h.  */
31769#include <ac_nonexistent.h>
31770_ACEOF
31771if ac_fn_c_try_cpp "$LINENO"; then :
31772  # Broken: success on invalid input.
31773continue
31774else
31775  # Passes both tests.
31776ac_preproc_ok=:
31777break
31778fi
31779rm -f conftest.err conftest.i conftest.$ac_ext
31780
31781done
31782# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31783rm -f conftest.i conftest.err conftest.$ac_ext
31784if $ac_preproc_ok; then :
31785  break
31786fi
31787
31788    done
31789    ac_cv_prog_CPP=$CPP
31790
31791fi
31792  CPP=$ac_cv_prog_CPP
31793else
31794  ac_cv_prog_CPP=$CPP
31795fi
31796{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
31797$as_echo "$CPP" >&6; }
31798ac_preproc_ok=false
31799for ac_c_preproc_warn_flag in '' yes
31800do
31801  # Use a header file that comes with gcc, so configuring glibc
31802  # with a fresh cross-compiler works.
31803  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31804  # <limits.h> exists even on freestanding compilers.
31805  # On the NeXT, cc -E runs the code through the compiler's parser,
31806  # not just through cpp. "Syntax error" is here to catch this case.
31807  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31808/* end confdefs.h.  */
31809#ifdef __STDC__
31810# include <limits.h>
31811#else
31812# include <assert.h>
31813#endif
31814		     Syntax error
31815_ACEOF
31816if ac_fn_c_try_cpp "$LINENO"; then :
31817
31818else
31819  # Broken: fails on valid input.
31820continue
31821fi
31822rm -f conftest.err conftest.i conftest.$ac_ext
31823
31824  # OK, works on sane cases.  Now check whether nonexistent headers
31825  # can be detected and how.
31826  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31827/* end confdefs.h.  */
31828#include <ac_nonexistent.h>
31829_ACEOF
31830if ac_fn_c_try_cpp "$LINENO"; then :
31831  # Broken: success on invalid input.
31832continue
31833else
31834  # Passes both tests.
31835ac_preproc_ok=:
31836break
31837fi
31838rm -f conftest.err conftest.i conftest.$ac_ext
31839
31840done
31841# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31842rm -f conftest.i conftest.err conftest.$ac_ext
31843if $ac_preproc_ok; then :
31844
31845else
31846  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
31847$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
31848as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
31849See \`config.log' for more details" "$LINENO" 5; }
31850fi
31851
31852ac_ext=cpp
31853ac_cpp='$CXXCPP $CPPFLAGS'
31854ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31855ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31856ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31857
31858
31859  # Only process if variable expands to non-empty
31860
31861  if test "x$CPP" != x; then
31862    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31863
31864  # First separate the path from the arguments. This will split at the first
31865  # space.
31866  complete="$CPP"
31867  path="${complete%% *}"
31868  tmp="$complete EOL"
31869  arguments="${tmp#* }"
31870
31871  # Input might be given as Windows format, start by converting to
31872  # unix format.
31873  new_path=`$CYGPATH -u "$path"`
31874
31875  # Now try to locate executable using which
31876  new_path=`$WHICH "$new_path" 2> /dev/null`
31877  # bat and cmd files are not always considered executable in cygwin causing which
31878  # to not find them
31879  if test "x$new_path" = x \
31880      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31881      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31882    new_path=`$CYGPATH -u "$path"`
31883  fi
31884  if test "x$new_path" = x; then
31885    # Oops. Which didn't find the executable.
31886    # The splitting of arguments from the executable at a space might have been incorrect,
31887    # since paths with space are more likely in Windows. Give it another try with the whole
31888    # argument.
31889    path="$complete"
31890    arguments="EOL"
31891    new_path=`$CYGPATH -u "$path"`
31892    new_path=`$WHICH "$new_path" 2> /dev/null`
31893    # bat and cmd files are not always considered executable in cygwin causing which
31894    # to not find them
31895    if test "x$new_path" = x \
31896        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31897        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31898      new_path=`$CYGPATH -u "$path"`
31899    fi
31900    if test "x$new_path" = x; then
31901      # It's still not found. Now this is an unrecoverable error.
31902      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31903$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31904      has_space=`$ECHO "$complete" | $GREP " "`
31905      if test "x$has_space" != x; then
31906        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31907$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31908      fi
31909      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31910    fi
31911  fi
31912
31913  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31914  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31915  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31916  # "foo.exe" is OK but "foo" is an error.
31917  #
31918  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31919  # It is also a way to make sure we got the proper file name for the real test later on.
31920  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31921  if test "x$test_shortpath" = x; then
31922    # Short path failed, file does not exist as specified.
31923    # Try adding .exe or .cmd
31924    if test -f "${new_path}.exe"; then
31925      input_to_shortpath="${new_path}.exe"
31926    elif test -f "${new_path}.cmd"; then
31927      input_to_shortpath="${new_path}.cmd"
31928    else
31929      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
31930$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
31931      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31932$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31933      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31934    fi
31935  else
31936    input_to_shortpath="$new_path"
31937  fi
31938
31939  # Call helper function which possibly converts this using DOS-style short mode.
31940  # If so, the updated path is stored in $new_path.
31941  new_path="$input_to_shortpath"
31942
31943  input_path="$input_to_shortpath"
31944  # Check if we need to convert this using DOS-style short mode. If the path
31945  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31946  # take no chances and rewrite it.
31947  # Note: m4 eats our [], so we need to use [ and ] instead.
31948  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31949  if test "x$has_forbidden_chars" != x; then
31950    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31951    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31952    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31953    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31954      # Going to short mode and back again did indeed matter. Since short mode is
31955      # case insensitive, let's make it lowercase to improve readability.
31956      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31957      # Now convert it back to Unix-style (cygpath)
31958      input_path=`$CYGPATH -u "$shortmode_path"`
31959      new_path="$input_path"
31960    fi
31961  fi
31962
31963  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31964  if test "x$test_cygdrive_prefix" = x; then
31965    # As a simple fix, exclude /usr/bin since it's not a real path.
31966    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31967      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31968      # a path prefixed by /cygdrive for fixpath to work.
31969      new_path="$CYGWIN_ROOT_PATH$input_path"
31970    fi
31971  fi
31972
31973  # remove trailing .exe if any
31974  new_path="${new_path/%.exe/}"
31975
31976    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31977
31978  # First separate the path from the arguments. This will split at the first
31979  # space.
31980  complete="$CPP"
31981  path="${complete%% *}"
31982  tmp="$complete EOL"
31983  arguments="${tmp#* }"
31984
31985  # Input might be given as Windows format, start by converting to
31986  # unix format.
31987  new_path="$path"
31988
31989  windows_path="$new_path"
31990  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31991    unix_path=`$CYGPATH -u "$windows_path"`
31992    new_path="$unix_path"
31993  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31994    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31995    new_path="$unix_path"
31996  fi
31997
31998
31999  # Now try to locate executable using which
32000  new_path=`$WHICH "$new_path" 2> /dev/null`
32001
32002  if test "x$new_path" = x; then
32003    # Oops. Which didn't find the executable.
32004    # The splitting of arguments from the executable at a space might have been incorrect,
32005    # since paths with space are more likely in Windows. Give it another try with the whole
32006    # argument.
32007    path="$complete"
32008    arguments="EOL"
32009    new_path="$path"
32010
32011  windows_path="$new_path"
32012  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32013    unix_path=`$CYGPATH -u "$windows_path"`
32014    new_path="$unix_path"
32015  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32016    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32017    new_path="$unix_path"
32018  fi
32019
32020
32021    new_path=`$WHICH "$new_path" 2> /dev/null`
32022    # bat and cmd files are not always considered executable in MSYS causing which
32023    # to not find them
32024    if test "x$new_path" = x \
32025        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32026        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32027      new_path="$path"
32028
32029  windows_path="$new_path"
32030  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32031    unix_path=`$CYGPATH -u "$windows_path"`
32032    new_path="$unix_path"
32033  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32034    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32035    new_path="$unix_path"
32036  fi
32037
32038    fi
32039
32040    if test "x$new_path" = x; then
32041      # It's still not found. Now this is an unrecoverable error.
32042      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
32043$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
32044      has_space=`$ECHO "$complete" | $GREP " "`
32045      if test "x$has_space" != x; then
32046        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32047$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32048      fi
32049      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
32050    fi
32051  fi
32052
32053  # Now new_path has a complete unix path to the binary
32054  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32055    # Keep paths in /bin as-is, but remove trailing .exe if any
32056    new_path="${new_path/%.exe/}"
32057    # Do not save /bin paths to all_fixpath_prefixes!
32058  else
32059    # Not in mixed or Windows style, start by that.
32060    new_path=`cmd //c echo $new_path`
32061
32062  input_path="$new_path"
32063  # Check if we need to convert this using DOS-style short mode. If the path
32064  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32065  # take no chances and rewrite it.
32066  # Note: m4 eats our [], so we need to use [ and ] instead.
32067  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32068  if test "x$has_forbidden_chars" != x; then
32069    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32070    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32071  fi
32072
32073    # Output is in $new_path
32074
32075  windows_path="$new_path"
32076  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32077    unix_path=`$CYGPATH -u "$windows_path"`
32078    new_path="$unix_path"
32079  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32080    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32081    new_path="$unix_path"
32082  fi
32083
32084    # remove trailing .exe if any
32085    new_path="${new_path/%.exe/}"
32086
32087    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32088    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32089  fi
32090
32091    else
32092      # We're on a unix platform. Hooray! :)
32093      # First separate the path from the arguments. This will split at the first
32094      # space.
32095      complete="$CPP"
32096      path="${complete%% *}"
32097      tmp="$complete EOL"
32098      arguments="${tmp#* }"
32099
32100      # Cannot rely on the command "which" here since it doesn't always work.
32101      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32102      if test -z "$is_absolute_path"; then
32103        # Path to executable is not absolute. Find it.
32104        IFS_save="$IFS"
32105        IFS=:
32106        for p in $PATH; do
32107          if test -f "$p/$path" && test -x "$p/$path"; then
32108            new_path="$p/$path"
32109            break
32110          fi
32111        done
32112        IFS="$IFS_save"
32113      else
32114        # This is an absolute path, we can use it without further modifications.
32115        new_path="$path"
32116      fi
32117
32118      if test "x$new_path" = x; then
32119        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
32120$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
32121        has_space=`$ECHO "$complete" | $GREP " "`
32122        if test "x$has_space" != x; then
32123          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32124$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32125        fi
32126        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
32127      fi
32128    fi
32129
32130    # Now join together the path and the arguments once again
32131    if test "x$arguments" != xEOL; then
32132      new_complete="$new_path ${arguments% *}"
32133    else
32134      new_complete="$new_path"
32135    fi
32136
32137    if test "x$complete" != "x$new_complete"; then
32138      CPP="$new_complete"
32139      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
32140$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
32141    fi
32142  fi
32143
32144  ac_ext=cpp
32145ac_cpp='$CXXCPP $CPPFLAGS'
32146ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32147ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32148ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
32150$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
32151if test -z "$CXXCPP"; then
32152  if ${ac_cv_prog_CXXCPP+:} false; then :
32153  $as_echo_n "(cached) " >&6
32154else
32155      # Double quotes because CXXCPP needs to be expanded
32156    for CXXCPP in "$CXX -E" "/lib/cpp"
32157    do
32158      ac_preproc_ok=false
32159for ac_cxx_preproc_warn_flag in '' yes
32160do
32161  # Use a header file that comes with gcc, so configuring glibc
32162  # with a fresh cross-compiler works.
32163  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
32164  # <limits.h> exists even on freestanding compilers.
32165  # On the NeXT, cc -E runs the code through the compiler's parser,
32166  # not just through cpp. "Syntax error" is here to catch this case.
32167  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32168/* end confdefs.h.  */
32169#ifdef __STDC__
32170# include <limits.h>
32171#else
32172# include <assert.h>
32173#endif
32174		     Syntax error
32175_ACEOF
32176if ac_fn_cxx_try_cpp "$LINENO"; then :
32177
32178else
32179  # Broken: fails on valid input.
32180continue
32181fi
32182rm -f conftest.err conftest.i conftest.$ac_ext
32183
32184  # OK, works on sane cases.  Now check whether nonexistent headers
32185  # can be detected and how.
32186  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32187/* end confdefs.h.  */
32188#include <ac_nonexistent.h>
32189_ACEOF
32190if ac_fn_cxx_try_cpp "$LINENO"; then :
32191  # Broken: success on invalid input.
32192continue
32193else
32194  # Passes both tests.
32195ac_preproc_ok=:
32196break
32197fi
32198rm -f conftest.err conftest.i conftest.$ac_ext
32199
32200done
32201# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
32202rm -f conftest.i conftest.err conftest.$ac_ext
32203if $ac_preproc_ok; then :
32204  break
32205fi
32206
32207    done
32208    ac_cv_prog_CXXCPP=$CXXCPP
32209
32210fi
32211  CXXCPP=$ac_cv_prog_CXXCPP
32212else
32213  ac_cv_prog_CXXCPP=$CXXCPP
32214fi
32215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
32216$as_echo "$CXXCPP" >&6; }
32217ac_preproc_ok=false
32218for ac_cxx_preproc_warn_flag in '' yes
32219do
32220  # Use a header file that comes with gcc, so configuring glibc
32221  # with a fresh cross-compiler works.
32222  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
32223  # <limits.h> exists even on freestanding compilers.
32224  # On the NeXT, cc -E runs the code through the compiler's parser,
32225  # not just through cpp. "Syntax error" is here to catch this case.
32226  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32227/* end confdefs.h.  */
32228#ifdef __STDC__
32229# include <limits.h>
32230#else
32231# include <assert.h>
32232#endif
32233		     Syntax error
32234_ACEOF
32235if ac_fn_cxx_try_cpp "$LINENO"; then :
32236
32237else
32238  # Broken: fails on valid input.
32239continue
32240fi
32241rm -f conftest.err conftest.i conftest.$ac_ext
32242
32243  # OK, works on sane cases.  Now check whether nonexistent headers
32244  # can be detected and how.
32245  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32246/* end confdefs.h.  */
32247#include <ac_nonexistent.h>
32248_ACEOF
32249if ac_fn_cxx_try_cpp "$LINENO"; then :
32250  # Broken: success on invalid input.
32251continue
32252else
32253  # Passes both tests.
32254ac_preproc_ok=:
32255break
32256fi
32257rm -f conftest.err conftest.i conftest.$ac_ext
32258
32259done
32260# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
32261rm -f conftest.i conftest.err conftest.$ac_ext
32262if $ac_preproc_ok; then :
32263
32264else
32265  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32266$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32267as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
32268See \`config.log' for more details" "$LINENO" 5; }
32269fi
32270
32271ac_ext=cpp
32272ac_cpp='$CXXCPP $CPPFLAGS'
32273ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32274ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32275ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32276
32277
32278  # Only process if variable expands to non-empty
32279
32280  if test "x$CXXCPP" != x; then
32281    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32282
32283  # First separate the path from the arguments. This will split at the first
32284  # space.
32285  complete="$CXXCPP"
32286  path="${complete%% *}"
32287  tmp="$complete EOL"
32288  arguments="${tmp#* }"
32289
32290  # Input might be given as Windows format, start by converting to
32291  # unix format.
32292  new_path=`$CYGPATH -u "$path"`
32293
32294  # Now try to locate executable using which
32295  new_path=`$WHICH "$new_path" 2> /dev/null`
32296  # bat and cmd files are not always considered executable in cygwin causing which
32297  # to not find them
32298  if test "x$new_path" = x \
32299      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32300      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32301    new_path=`$CYGPATH -u "$path"`
32302  fi
32303  if test "x$new_path" = x; then
32304    # Oops. Which didn't find the executable.
32305    # The splitting of arguments from the executable at a space might have been incorrect,
32306    # since paths with space are more likely in Windows. Give it another try with the whole
32307    # argument.
32308    path="$complete"
32309    arguments="EOL"
32310    new_path=`$CYGPATH -u "$path"`
32311    new_path=`$WHICH "$new_path" 2> /dev/null`
32312    # bat and cmd files are not always considered executable in cygwin causing which
32313    # to not find them
32314    if test "x$new_path" = x \
32315        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32316        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32317      new_path=`$CYGPATH -u "$path"`
32318    fi
32319    if test "x$new_path" = x; then
32320      # It's still not found. Now this is an unrecoverable error.
32321      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
32322$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
32323      has_space=`$ECHO "$complete" | $GREP " "`
32324      if test "x$has_space" != x; then
32325        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32326$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32327      fi
32328      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
32329    fi
32330  fi
32331
32332  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32333  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32334  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32335  # "foo.exe" is OK but "foo" is an error.
32336  #
32337  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32338  # It is also a way to make sure we got the proper file name for the real test later on.
32339  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32340  if test "x$test_shortpath" = x; then
32341    # Short path failed, file does not exist as specified.
32342    # Try adding .exe or .cmd
32343    if test -f "${new_path}.exe"; then
32344      input_to_shortpath="${new_path}.exe"
32345    elif test -f "${new_path}.cmd"; then
32346      input_to_shortpath="${new_path}.cmd"
32347    else
32348      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
32349$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
32350      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32351$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32352      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
32353    fi
32354  else
32355    input_to_shortpath="$new_path"
32356  fi
32357
32358  # Call helper function which possibly converts this using DOS-style short mode.
32359  # If so, the updated path is stored in $new_path.
32360  new_path="$input_to_shortpath"
32361
32362  input_path="$input_to_shortpath"
32363  # Check if we need to convert this using DOS-style short mode. If the path
32364  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32365  # take no chances and rewrite it.
32366  # Note: m4 eats our [], so we need to use [ and ] instead.
32367  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32368  if test "x$has_forbidden_chars" != x; then
32369    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32370    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32371    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32372    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32373      # Going to short mode and back again did indeed matter. Since short mode is
32374      # case insensitive, let's make it lowercase to improve readability.
32375      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32376      # Now convert it back to Unix-style (cygpath)
32377      input_path=`$CYGPATH -u "$shortmode_path"`
32378      new_path="$input_path"
32379    fi
32380  fi
32381
32382  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32383  if test "x$test_cygdrive_prefix" = x; then
32384    # As a simple fix, exclude /usr/bin since it's not a real path.
32385    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32386      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32387      # a path prefixed by /cygdrive for fixpath to work.
32388      new_path="$CYGWIN_ROOT_PATH$input_path"
32389    fi
32390  fi
32391
32392  # remove trailing .exe if any
32393  new_path="${new_path/%.exe/}"
32394
32395    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32396
32397  # First separate the path from the arguments. This will split at the first
32398  # space.
32399  complete="$CXXCPP"
32400  path="${complete%% *}"
32401  tmp="$complete EOL"
32402  arguments="${tmp#* }"
32403
32404  # Input might be given as Windows format, start by converting to
32405  # unix format.
32406  new_path="$path"
32407
32408  windows_path="$new_path"
32409  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32410    unix_path=`$CYGPATH -u "$windows_path"`
32411    new_path="$unix_path"
32412  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32413    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32414    new_path="$unix_path"
32415  fi
32416
32417
32418  # Now try to locate executable using which
32419  new_path=`$WHICH "$new_path" 2> /dev/null`
32420
32421  if test "x$new_path" = x; then
32422    # Oops. Which didn't find the executable.
32423    # The splitting of arguments from the executable at a space might have been incorrect,
32424    # since paths with space are more likely in Windows. Give it another try with the whole
32425    # argument.
32426    path="$complete"
32427    arguments="EOL"
32428    new_path="$path"
32429
32430  windows_path="$new_path"
32431  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32432    unix_path=`$CYGPATH -u "$windows_path"`
32433    new_path="$unix_path"
32434  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32435    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32436    new_path="$unix_path"
32437  fi
32438
32439
32440    new_path=`$WHICH "$new_path" 2> /dev/null`
32441    # bat and cmd files are not always considered executable in MSYS causing which
32442    # to not find them
32443    if test "x$new_path" = x \
32444        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32445        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32446      new_path="$path"
32447
32448  windows_path="$new_path"
32449  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32450    unix_path=`$CYGPATH -u "$windows_path"`
32451    new_path="$unix_path"
32452  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32453    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32454    new_path="$unix_path"
32455  fi
32456
32457    fi
32458
32459    if test "x$new_path" = x; then
32460      # It's still not found. Now this is an unrecoverable error.
32461      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
32462$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
32463      has_space=`$ECHO "$complete" | $GREP " "`
32464      if test "x$has_space" != x; then
32465        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32466$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32467      fi
32468      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
32469    fi
32470  fi
32471
32472  # Now new_path has a complete unix path to the binary
32473  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32474    # Keep paths in /bin as-is, but remove trailing .exe if any
32475    new_path="${new_path/%.exe/}"
32476    # Do not save /bin paths to all_fixpath_prefixes!
32477  else
32478    # Not in mixed or Windows style, start by that.
32479    new_path=`cmd //c echo $new_path`
32480
32481  input_path="$new_path"
32482  # Check if we need to convert this using DOS-style short mode. If the path
32483  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32484  # take no chances and rewrite it.
32485  # Note: m4 eats our [], so we need to use [ and ] instead.
32486  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32487  if test "x$has_forbidden_chars" != x; then
32488    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32489    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32490  fi
32491
32492    # Output is in $new_path
32493
32494  windows_path="$new_path"
32495  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32496    unix_path=`$CYGPATH -u "$windows_path"`
32497    new_path="$unix_path"
32498  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32499    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32500    new_path="$unix_path"
32501  fi
32502
32503    # remove trailing .exe if any
32504    new_path="${new_path/%.exe/}"
32505
32506    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32507    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32508  fi
32509
32510    else
32511      # We're on a unix platform. Hooray! :)
32512      # First separate the path from the arguments. This will split at the first
32513      # space.
32514      complete="$CXXCPP"
32515      path="${complete%% *}"
32516      tmp="$complete EOL"
32517      arguments="${tmp#* }"
32518
32519      # Cannot rely on the command "which" here since it doesn't always work.
32520      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32521      if test -z "$is_absolute_path"; then
32522        # Path to executable is not absolute. Find it.
32523        IFS_save="$IFS"
32524        IFS=:
32525        for p in $PATH; do
32526          if test -f "$p/$path" && test -x "$p/$path"; then
32527            new_path="$p/$path"
32528            break
32529          fi
32530        done
32531        IFS="$IFS_save"
32532      else
32533        # This is an absolute path, we can use it without further modifications.
32534        new_path="$path"
32535      fi
32536
32537      if test "x$new_path" = x; then
32538        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
32539$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
32540        has_space=`$ECHO "$complete" | $GREP " "`
32541        if test "x$has_space" != x; then
32542          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32543$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32544        fi
32545        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
32546      fi
32547    fi
32548
32549    # Now join together the path and the arguments once again
32550    if test "x$arguments" != xEOL; then
32551      new_complete="$new_path ${arguments% *}"
32552    else
32553      new_complete="$new_path"
32554    fi
32555
32556    if test "x$complete" != "x$new_complete"; then
32557      CXXCPP="$new_complete"
32558      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
32559$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
32560    fi
32561  fi
32562
32563
32564  #
32565  # Setup the linker (LD)
32566  #
32567  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32568    # In the Microsoft toolchain we have a separate LD command "link".
32569    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
32570    # a cygwin program for something completely different.
32571    # Extract the first word of "link", so it can be a program name with args.
32572set dummy link; ac_word=$2
32573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32574$as_echo_n "checking for $ac_word... " >&6; }
32575if ${ac_cv_prog_LD+:} false; then :
32576  $as_echo_n "(cached) " >&6
32577else
32578  if test -n "$LD"; then
32579  ac_cv_prog_LD="$LD" # Let the user override the test.
32580else
32581  ac_prog_rejected=no
32582as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32583for as_dir in $PATH
32584do
32585  IFS=$as_save_IFS
32586  test -z "$as_dir" && as_dir=.
32587    for ac_exec_ext in '' $ac_executable_extensions; do
32588  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32589    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
32590       ac_prog_rejected=yes
32591       continue
32592     fi
32593    ac_cv_prog_LD="link"
32594    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32595    break 2
32596  fi
32597done
32598  done
32599IFS=$as_save_IFS
32600
32601if test $ac_prog_rejected = yes; then
32602  # We found a bogon in the path, so make sure we never use it.
32603  set dummy $ac_cv_prog_LD
32604  shift
32605  if test $# != 0; then
32606    # We chose a different compiler from the bogus one.
32607    # However, it has the same basename, so the bogon will be chosen
32608    # first if we set LD to just the basename; use the full file name.
32609    shift
32610    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
32611  fi
32612fi
32613fi
32614fi
32615LD=$ac_cv_prog_LD
32616if test -n "$LD"; then
32617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
32618$as_echo "$LD" >&6; }
32619else
32620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32621$as_echo "no" >&6; }
32622fi
32623
32624
32625
32626  # Only process if variable expands to non-empty
32627
32628  if test "x$LD" != x; then
32629    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32630
32631  # First separate the path from the arguments. This will split at the first
32632  # space.
32633  complete="$LD"
32634  path="${complete%% *}"
32635  tmp="$complete EOL"
32636  arguments="${tmp#* }"
32637
32638  # Input might be given as Windows format, start by converting to
32639  # unix format.
32640  new_path=`$CYGPATH -u "$path"`
32641
32642  # Now try to locate executable using which
32643  new_path=`$WHICH "$new_path" 2> /dev/null`
32644  # bat and cmd files are not always considered executable in cygwin causing which
32645  # to not find them
32646  if test "x$new_path" = x \
32647      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32648      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32649    new_path=`$CYGPATH -u "$path"`
32650  fi
32651  if test "x$new_path" = x; then
32652    # Oops. Which didn't find the executable.
32653    # The splitting of arguments from the executable at a space might have been incorrect,
32654    # since paths with space are more likely in Windows. Give it another try with the whole
32655    # argument.
32656    path="$complete"
32657    arguments="EOL"
32658    new_path=`$CYGPATH -u "$path"`
32659    new_path=`$WHICH "$new_path" 2> /dev/null`
32660    # bat and cmd files are not always considered executable in cygwin causing which
32661    # to not find them
32662    if test "x$new_path" = x \
32663        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32664        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32665      new_path=`$CYGPATH -u "$path"`
32666    fi
32667    if test "x$new_path" = x; then
32668      # It's still not found. Now this is an unrecoverable error.
32669      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
32670$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
32671      has_space=`$ECHO "$complete" | $GREP " "`
32672      if test "x$has_space" != x; then
32673        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32674$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32675      fi
32676      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32677    fi
32678  fi
32679
32680  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32681  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32682  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32683  # "foo.exe" is OK but "foo" is an error.
32684  #
32685  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32686  # It is also a way to make sure we got the proper file name for the real test later on.
32687  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32688  if test "x$test_shortpath" = x; then
32689    # Short path failed, file does not exist as specified.
32690    # Try adding .exe or .cmd
32691    if test -f "${new_path}.exe"; then
32692      input_to_shortpath="${new_path}.exe"
32693    elif test -f "${new_path}.cmd"; then
32694      input_to_shortpath="${new_path}.cmd"
32695    else
32696      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
32697$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
32698      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32699$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32700      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32701    fi
32702  else
32703    input_to_shortpath="$new_path"
32704  fi
32705
32706  # Call helper function which possibly converts this using DOS-style short mode.
32707  # If so, the updated path is stored in $new_path.
32708  new_path="$input_to_shortpath"
32709
32710  input_path="$input_to_shortpath"
32711  # Check if we need to convert this using DOS-style short mode. If the path
32712  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32713  # take no chances and rewrite it.
32714  # Note: m4 eats our [], so we need to use [ and ] instead.
32715  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32716  if test "x$has_forbidden_chars" != x; then
32717    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32718    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32719    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32720    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32721      # Going to short mode and back again did indeed matter. Since short mode is
32722      # case insensitive, let's make it lowercase to improve readability.
32723      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32724      # Now convert it back to Unix-style (cygpath)
32725      input_path=`$CYGPATH -u "$shortmode_path"`
32726      new_path="$input_path"
32727    fi
32728  fi
32729
32730  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32731  if test "x$test_cygdrive_prefix" = x; then
32732    # As a simple fix, exclude /usr/bin since it's not a real path.
32733    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32734      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32735      # a path prefixed by /cygdrive for fixpath to work.
32736      new_path="$CYGWIN_ROOT_PATH$input_path"
32737    fi
32738  fi
32739
32740  # remove trailing .exe if any
32741  new_path="${new_path/%.exe/}"
32742
32743    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32744
32745  # First separate the path from the arguments. This will split at the first
32746  # space.
32747  complete="$LD"
32748  path="${complete%% *}"
32749  tmp="$complete EOL"
32750  arguments="${tmp#* }"
32751
32752  # Input might be given as Windows format, start by converting to
32753  # unix format.
32754  new_path="$path"
32755
32756  windows_path="$new_path"
32757  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32758    unix_path=`$CYGPATH -u "$windows_path"`
32759    new_path="$unix_path"
32760  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32761    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32762    new_path="$unix_path"
32763  fi
32764
32765
32766  # Now try to locate executable using which
32767  new_path=`$WHICH "$new_path" 2> /dev/null`
32768
32769  if test "x$new_path" = x; then
32770    # Oops. Which didn't find the executable.
32771    # The splitting of arguments from the executable at a space might have been incorrect,
32772    # since paths with space are more likely in Windows. Give it another try with the whole
32773    # argument.
32774    path="$complete"
32775    arguments="EOL"
32776    new_path="$path"
32777
32778  windows_path="$new_path"
32779  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32780    unix_path=`$CYGPATH -u "$windows_path"`
32781    new_path="$unix_path"
32782  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32783    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32784    new_path="$unix_path"
32785  fi
32786
32787
32788    new_path=`$WHICH "$new_path" 2> /dev/null`
32789    # bat and cmd files are not always considered executable in MSYS causing which
32790    # to not find them
32791    if test "x$new_path" = x \
32792        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32793        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32794      new_path="$path"
32795
32796  windows_path="$new_path"
32797  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32798    unix_path=`$CYGPATH -u "$windows_path"`
32799    new_path="$unix_path"
32800  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32801    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32802    new_path="$unix_path"
32803  fi
32804
32805    fi
32806
32807    if test "x$new_path" = x; then
32808      # It's still not found. Now this is an unrecoverable error.
32809      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
32810$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
32811      has_space=`$ECHO "$complete" | $GREP " "`
32812      if test "x$has_space" != x; then
32813        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32814$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32815      fi
32816      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32817    fi
32818  fi
32819
32820  # Now new_path has a complete unix path to the binary
32821  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32822    # Keep paths in /bin as-is, but remove trailing .exe if any
32823    new_path="${new_path/%.exe/}"
32824    # Do not save /bin paths to all_fixpath_prefixes!
32825  else
32826    # Not in mixed or Windows style, start by that.
32827    new_path=`cmd //c echo $new_path`
32828
32829  input_path="$new_path"
32830  # Check if we need to convert this using DOS-style short mode. If the path
32831  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32832  # take no chances and rewrite it.
32833  # Note: m4 eats our [], so we need to use [ and ] instead.
32834  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32835  if test "x$has_forbidden_chars" != x; then
32836    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32837    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32838  fi
32839
32840    # Output is in $new_path
32841
32842  windows_path="$new_path"
32843  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32844    unix_path=`$CYGPATH -u "$windows_path"`
32845    new_path="$unix_path"
32846  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32847    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32848    new_path="$unix_path"
32849  fi
32850
32851    # remove trailing .exe if any
32852    new_path="${new_path/%.exe/}"
32853
32854    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32855    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32856  fi
32857
32858    else
32859      # We're on a unix platform. Hooray! :)
32860      # First separate the path from the arguments. This will split at the first
32861      # space.
32862      complete="$LD"
32863      path="${complete%% *}"
32864      tmp="$complete EOL"
32865      arguments="${tmp#* }"
32866
32867      # Cannot rely on the command "which" here since it doesn't always work.
32868      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32869      if test -z "$is_absolute_path"; then
32870        # Path to executable is not absolute. Find it.
32871        IFS_save="$IFS"
32872        IFS=:
32873        for p in $PATH; do
32874          if test -f "$p/$path" && test -x "$p/$path"; then
32875            new_path="$p/$path"
32876            break
32877          fi
32878        done
32879        IFS="$IFS_save"
32880      else
32881        # This is an absolute path, we can use it without further modifications.
32882        new_path="$path"
32883      fi
32884
32885      if test "x$new_path" = x; then
32886        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
32887$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
32888        has_space=`$ECHO "$complete" | $GREP " "`
32889        if test "x$has_space" != x; then
32890          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32891$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32892        fi
32893        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32894      fi
32895    fi
32896
32897    # Now join together the path and the arguments once again
32898    if test "x$arguments" != xEOL; then
32899      new_complete="$new_path ${arguments% *}"
32900    else
32901      new_complete="$new_path"
32902    fi
32903
32904    if test "x$complete" != "x$new_complete"; then
32905      LD="$new_complete"
32906      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
32907$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
32908    fi
32909  fi
32910
32911    # Verify that we indeed succeeded with this trick.
32912    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
32913$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
32914    "$LD" --version > /dev/null
32915    if test $? -eq 0 ; then
32916      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32917$as_echo "no" >&6; }
32918      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
32919    else
32920      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32921$as_echo "yes" >&6; }
32922    fi
32923    LDCXX="$LD"
32924  else
32925    # All other toolchains use the compiler to link.
32926    LD="$CC"
32927    LDCXX="$CXX"
32928  fi
32929
32930  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
32931
32932
32933  #
32934  # Setup the assembler (AS)
32935  #
32936  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
32937    # FIXME: should this really be solaris, or solstudio?
32938
32939
32940  # Publish this variable in the help.
32941
32942
32943  if test "x$AS" = x; then
32944    # The variable is not set by user, try to locate tool using the code snippet
32945    for ac_prog in as
32946do
32947  # Extract the first word of "$ac_prog", so it can be a program name with args.
32948set dummy $ac_prog; ac_word=$2
32949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32950$as_echo_n "checking for $ac_word... " >&6; }
32951if ${ac_cv_path_AS+:} false; then :
32952  $as_echo_n "(cached) " >&6
32953else
32954  case $AS in
32955  [\\/]* | ?:[\\/]*)
32956  ac_cv_path_AS="$AS" # Let the user override the test with a path.
32957  ;;
32958  *)
32959  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32960for as_dir in $PATH
32961do
32962  IFS=$as_save_IFS
32963  test -z "$as_dir" && as_dir=.
32964    for ac_exec_ext in '' $ac_executable_extensions; do
32965  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32966    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32967    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32968    break 2
32969  fi
32970done
32971  done
32972IFS=$as_save_IFS
32973
32974  ;;
32975esac
32976fi
32977AS=$ac_cv_path_AS
32978if test -n "$AS"; then
32979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32980$as_echo "$AS" >&6; }
32981else
32982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32983$as_echo "no" >&6; }
32984fi
32985
32986
32987  test -n "$AS" && break
32988done
32989
32990  else
32991    # The variable is set, but is it from the command line or the environment?
32992
32993    # Try to remove the string !AS! from our list.
32994    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
32995    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
32996      # If it failed, the variable was not from the command line. Ignore it,
32997      # but warn the user (except for BASH, which is always set by the calling BASH).
32998      if test "xAS" != xBASH; then
32999        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
33000$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
33001      fi
33002      # Try to locate tool using the code snippet
33003      for ac_prog in as
33004do
33005  # Extract the first word of "$ac_prog", so it can be a program name with args.
33006set dummy $ac_prog; ac_word=$2
33007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33008$as_echo_n "checking for $ac_word... " >&6; }
33009if ${ac_cv_path_AS+:} false; then :
33010  $as_echo_n "(cached) " >&6
33011else
33012  case $AS in
33013  [\\/]* | ?:[\\/]*)
33014  ac_cv_path_AS="$AS" # Let the user override the test with a path.
33015  ;;
33016  *)
33017  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33018for as_dir in $PATH
33019do
33020  IFS=$as_save_IFS
33021  test -z "$as_dir" && as_dir=.
33022    for ac_exec_ext in '' $ac_executable_extensions; do
33023  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33024    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
33025    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33026    break 2
33027  fi
33028done
33029  done
33030IFS=$as_save_IFS
33031
33032  ;;
33033esac
33034fi
33035AS=$ac_cv_path_AS
33036if test -n "$AS"; then
33037  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
33038$as_echo "$AS" >&6; }
33039else
33040  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33041$as_echo "no" >&6; }
33042fi
33043
33044
33045  test -n "$AS" && break
33046done
33047
33048    else
33049      # If it succeeded, then it was overridden by the user. We will use it
33050      # for the tool.
33051
33052      # First remove it from the list of overridden variables, so we can test
33053      # for unknown variables in the end.
33054      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33055
33056      # Check if the provided tool contains a complete path.
33057      tool_specified="$AS"
33058      tool_basename="${tool_specified##*/}"
33059      if test "x$tool_basename" = "x$tool_specified"; then
33060        # A command without a complete path is provided, search $PATH.
33061        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
33062$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
33063        # Extract the first word of "$tool_basename", so it can be a program name with args.
33064set dummy $tool_basename; ac_word=$2
33065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33066$as_echo_n "checking for $ac_word... " >&6; }
33067if ${ac_cv_path_AS+:} false; then :
33068  $as_echo_n "(cached) " >&6
33069else
33070  case $AS in
33071  [\\/]* | ?:[\\/]*)
33072  ac_cv_path_AS="$AS" # Let the user override the test with a path.
33073  ;;
33074  *)
33075  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33076for as_dir in $PATH
33077do
33078  IFS=$as_save_IFS
33079  test -z "$as_dir" && as_dir=.
33080    for ac_exec_ext in '' $ac_executable_extensions; do
33081  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33082    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
33083    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33084    break 2
33085  fi
33086done
33087  done
33088IFS=$as_save_IFS
33089
33090  ;;
33091esac
33092fi
33093AS=$ac_cv_path_AS
33094if test -n "$AS"; then
33095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
33096$as_echo "$AS" >&6; }
33097else
33098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33099$as_echo "no" >&6; }
33100fi
33101
33102
33103        if test "x$AS" = x; then
33104          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
33105        fi
33106      else
33107        # Otherwise we believe it is a complete path. Use it as it is.
33108        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
33109$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
33110        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
33111$as_echo_n "checking for AS... " >&6; }
33112        if test ! -x "$tool_specified"; then
33113          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33114$as_echo "not found" >&6; }
33115          as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
33116        fi
33117        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33118$as_echo "$tool_specified" >&6; }
33119      fi
33120    fi
33121  fi
33122
33123
33124
33125  # Only process if variable expands to non-empty
33126
33127  if test "x$AS" != x; then
33128    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33129
33130  # First separate the path from the arguments. This will split at the first
33131  # space.
33132  complete="$AS"
33133  path="${complete%% *}"
33134  tmp="$complete EOL"
33135  arguments="${tmp#* }"
33136
33137  # Input might be given as Windows format, start by converting to
33138  # unix format.
33139  new_path=`$CYGPATH -u "$path"`
33140
33141  # Now try to locate executable using which
33142  new_path=`$WHICH "$new_path" 2> /dev/null`
33143  # bat and cmd files are not always considered executable in cygwin causing which
33144  # to not find them
33145  if test "x$new_path" = x \
33146      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33147      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33148    new_path=`$CYGPATH -u "$path"`
33149  fi
33150  if test "x$new_path" = x; then
33151    # Oops. Which didn't find the executable.
33152    # The splitting of arguments from the executable at a space might have been incorrect,
33153    # since paths with space are more likely in Windows. Give it another try with the whole
33154    # argument.
33155    path="$complete"
33156    arguments="EOL"
33157    new_path=`$CYGPATH -u "$path"`
33158    new_path=`$WHICH "$new_path" 2> /dev/null`
33159    # bat and cmd files are not always considered executable in cygwin causing which
33160    # to not find them
33161    if test "x$new_path" = x \
33162        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33163        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33164      new_path=`$CYGPATH -u "$path"`
33165    fi
33166    if test "x$new_path" = x; then
33167      # It's still not found. Now this is an unrecoverable error.
33168      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
33169$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
33170      has_space=`$ECHO "$complete" | $GREP " "`
33171      if test "x$has_space" != x; then
33172        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33173$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33174      fi
33175      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
33176    fi
33177  fi
33178
33179  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33180  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33181  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33182  # "foo.exe" is OK but "foo" is an error.
33183  #
33184  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33185  # It is also a way to make sure we got the proper file name for the real test later on.
33186  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33187  if test "x$test_shortpath" = x; then
33188    # Short path failed, file does not exist as specified.
33189    # Try adding .exe or .cmd
33190    if test -f "${new_path}.exe"; then
33191      input_to_shortpath="${new_path}.exe"
33192    elif test -f "${new_path}.cmd"; then
33193      input_to_shortpath="${new_path}.cmd"
33194    else
33195      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
33196$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
33197      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33198$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33199      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
33200    fi
33201  else
33202    input_to_shortpath="$new_path"
33203  fi
33204
33205  # Call helper function which possibly converts this using DOS-style short mode.
33206  # If so, the updated path is stored in $new_path.
33207  new_path="$input_to_shortpath"
33208
33209  input_path="$input_to_shortpath"
33210  # Check if we need to convert this using DOS-style short mode. If the path
33211  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33212  # take no chances and rewrite it.
33213  # Note: m4 eats our [], so we need to use [ and ] instead.
33214  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33215  if test "x$has_forbidden_chars" != x; then
33216    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33217    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33218    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33219    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33220      # Going to short mode and back again did indeed matter. Since short mode is
33221      # case insensitive, let's make it lowercase to improve readability.
33222      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33223      # Now convert it back to Unix-style (cygpath)
33224      input_path=`$CYGPATH -u "$shortmode_path"`
33225      new_path="$input_path"
33226    fi
33227  fi
33228
33229  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33230  if test "x$test_cygdrive_prefix" = x; then
33231    # As a simple fix, exclude /usr/bin since it's not a real path.
33232    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33233      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33234      # a path prefixed by /cygdrive for fixpath to work.
33235      new_path="$CYGWIN_ROOT_PATH$input_path"
33236    fi
33237  fi
33238
33239  # remove trailing .exe if any
33240  new_path="${new_path/%.exe/}"
33241
33242    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33243
33244  # First separate the path from the arguments. This will split at the first
33245  # space.
33246  complete="$AS"
33247  path="${complete%% *}"
33248  tmp="$complete EOL"
33249  arguments="${tmp#* }"
33250
33251  # Input might be given as Windows format, start by converting to
33252  # unix format.
33253  new_path="$path"
33254
33255  windows_path="$new_path"
33256  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33257    unix_path=`$CYGPATH -u "$windows_path"`
33258    new_path="$unix_path"
33259  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33260    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33261    new_path="$unix_path"
33262  fi
33263
33264
33265  # Now try to locate executable using which
33266  new_path=`$WHICH "$new_path" 2> /dev/null`
33267
33268  if test "x$new_path" = x; then
33269    # Oops. Which didn't find the executable.
33270    # The splitting of arguments from the executable at a space might have been incorrect,
33271    # since paths with space are more likely in Windows. Give it another try with the whole
33272    # argument.
33273    path="$complete"
33274    arguments="EOL"
33275    new_path="$path"
33276
33277  windows_path="$new_path"
33278  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33279    unix_path=`$CYGPATH -u "$windows_path"`
33280    new_path="$unix_path"
33281  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33282    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33283    new_path="$unix_path"
33284  fi
33285
33286
33287    new_path=`$WHICH "$new_path" 2> /dev/null`
33288    # bat and cmd files are not always considered executable in MSYS causing which
33289    # to not find them
33290    if test "x$new_path" = x \
33291        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33292        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33293      new_path="$path"
33294
33295  windows_path="$new_path"
33296  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33297    unix_path=`$CYGPATH -u "$windows_path"`
33298    new_path="$unix_path"
33299  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33300    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33301    new_path="$unix_path"
33302  fi
33303
33304    fi
33305
33306    if test "x$new_path" = x; then
33307      # It's still not found. Now this is an unrecoverable error.
33308      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
33309$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
33310      has_space=`$ECHO "$complete" | $GREP " "`
33311      if test "x$has_space" != x; then
33312        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33313$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33314      fi
33315      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
33316    fi
33317  fi
33318
33319  # Now new_path has a complete unix path to the binary
33320  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33321    # Keep paths in /bin as-is, but remove trailing .exe if any
33322    new_path="${new_path/%.exe/}"
33323    # Do not save /bin paths to all_fixpath_prefixes!
33324  else
33325    # Not in mixed or Windows style, start by that.
33326    new_path=`cmd //c echo $new_path`
33327
33328  input_path="$new_path"
33329  # Check if we need to convert this using DOS-style short mode. If the path
33330  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33331  # take no chances and rewrite it.
33332  # Note: m4 eats our [], so we need to use [ and ] instead.
33333  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33334  if test "x$has_forbidden_chars" != x; then
33335    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33336    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33337  fi
33338
33339    # Output is in $new_path
33340
33341  windows_path="$new_path"
33342  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33343    unix_path=`$CYGPATH -u "$windows_path"`
33344    new_path="$unix_path"
33345  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33346    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33347    new_path="$unix_path"
33348  fi
33349
33350    # remove trailing .exe if any
33351    new_path="${new_path/%.exe/}"
33352
33353    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33354    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33355  fi
33356
33357    else
33358      # We're on a unix platform. Hooray! :)
33359      # First separate the path from the arguments. This will split at the first
33360      # space.
33361      complete="$AS"
33362      path="${complete%% *}"
33363      tmp="$complete EOL"
33364      arguments="${tmp#* }"
33365
33366      # Cannot rely on the command "which" here since it doesn't always work.
33367      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33368      if test -z "$is_absolute_path"; then
33369        # Path to executable is not absolute. Find it.
33370        IFS_save="$IFS"
33371        IFS=:
33372        for p in $PATH; do
33373          if test -f "$p/$path" && test -x "$p/$path"; then
33374            new_path="$p/$path"
33375            break
33376          fi
33377        done
33378        IFS="$IFS_save"
33379      else
33380        # This is an absolute path, we can use it without further modifications.
33381        new_path="$path"
33382      fi
33383
33384      if test "x$new_path" = x; then
33385        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
33386$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
33387        has_space=`$ECHO "$complete" | $GREP " "`
33388        if test "x$has_space" != x; then
33389          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33390$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33391        fi
33392        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
33393      fi
33394    fi
33395
33396    # Now join together the path and the arguments once again
33397    if test "x$arguments" != xEOL; then
33398      new_complete="$new_path ${arguments% *}"
33399    else
33400      new_complete="$new_path"
33401    fi
33402
33403    if test "x$complete" != "x$new_complete"; then
33404      AS="$new_complete"
33405      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
33406$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
33407    fi
33408  fi
33409
33410  else
33411    # FIXME: is this correct for microsoft?
33412    AS="$CC -c"
33413  fi
33414
33415
33416  #
33417  # Setup the archiver (AR)
33418  #
33419  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33420    # The corresponding ar tool is lib.exe (used to create static libraries)
33421    # Extract the first word of "lib", so it can be a program name with args.
33422set dummy lib; ac_word=$2
33423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33424$as_echo_n "checking for $ac_word... " >&6; }
33425if ${ac_cv_prog_AR+:} false; then :
33426  $as_echo_n "(cached) " >&6
33427else
33428  if test -n "$AR"; then
33429  ac_cv_prog_AR="$AR" # Let the user override the test.
33430else
33431as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33432for as_dir in $PATH
33433do
33434  IFS=$as_save_IFS
33435  test -z "$as_dir" && as_dir=.
33436    for ac_exec_ext in '' $ac_executable_extensions; do
33437  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33438    ac_cv_prog_AR="lib"
33439    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33440    break 2
33441  fi
33442done
33443  done
33444IFS=$as_save_IFS
33445
33446fi
33447fi
33448AR=$ac_cv_prog_AR
33449if test -n "$AR"; then
33450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33451$as_echo "$AR" >&6; }
33452else
33453  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33454$as_echo "no" >&6; }
33455fi
33456
33457
33458  else
33459
33460
33461  # Publish this variable in the help.
33462
33463
33464  if test "x$AR" = x; then
33465    # The variable is not set by user, try to locate tool using the code snippet
33466    if test -n "$ac_tool_prefix"; then
33467  for ac_prog in ar
33468  do
33469    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33470set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33472$as_echo_n "checking for $ac_word... " >&6; }
33473if ${ac_cv_prog_AR+:} false; then :
33474  $as_echo_n "(cached) " >&6
33475else
33476  if test -n "$AR"; then
33477  ac_cv_prog_AR="$AR" # Let the user override the test.
33478else
33479as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33480for as_dir in $PATH
33481do
33482  IFS=$as_save_IFS
33483  test -z "$as_dir" && as_dir=.
33484    for ac_exec_ext in '' $ac_executable_extensions; do
33485  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33486    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
33487    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33488    break 2
33489  fi
33490done
33491  done
33492IFS=$as_save_IFS
33493
33494fi
33495fi
33496AR=$ac_cv_prog_AR
33497if test -n "$AR"; then
33498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33499$as_echo "$AR" >&6; }
33500else
33501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33502$as_echo "no" >&6; }
33503fi
33504
33505
33506    test -n "$AR" && break
33507  done
33508fi
33509if test -z "$AR"; then
33510  ac_ct_AR=$AR
33511  for ac_prog in ar
33512do
33513  # Extract the first word of "$ac_prog", so it can be a program name with args.
33514set dummy $ac_prog; ac_word=$2
33515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33516$as_echo_n "checking for $ac_word... " >&6; }
33517if ${ac_cv_prog_ac_ct_AR+:} false; then :
33518  $as_echo_n "(cached) " >&6
33519else
33520  if test -n "$ac_ct_AR"; then
33521  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
33522else
33523as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33524for as_dir in $PATH
33525do
33526  IFS=$as_save_IFS
33527  test -z "$as_dir" && as_dir=.
33528    for ac_exec_ext in '' $ac_executable_extensions; do
33529  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33530    ac_cv_prog_ac_ct_AR="$ac_prog"
33531    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33532    break 2
33533  fi
33534done
33535  done
33536IFS=$as_save_IFS
33537
33538fi
33539fi
33540ac_ct_AR=$ac_cv_prog_ac_ct_AR
33541if test -n "$ac_ct_AR"; then
33542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
33543$as_echo "$ac_ct_AR" >&6; }
33544else
33545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33546$as_echo "no" >&6; }
33547fi
33548
33549
33550  test -n "$ac_ct_AR" && break
33551done
33552
33553  if test "x$ac_ct_AR" = x; then
33554    AR=""
33555  else
33556    case $cross_compiling:$ac_tool_warned in
33557yes:)
33558{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33559$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33560ac_tool_warned=yes ;;
33561esac
33562    AR=$ac_ct_AR
33563  fi
33564fi
33565
33566  else
33567    # The variable is set, but is it from the command line or the environment?
33568
33569    # Try to remove the string !AR! from our list.
33570    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
33571    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
33572      # If it failed, the variable was not from the command line. Ignore it,
33573      # but warn the user (except for BASH, which is always set by the calling BASH).
33574      if test "xAR" != xBASH; then
33575        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
33576$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
33577      fi
33578      # Try to locate tool using the code snippet
33579      if test -n "$ac_tool_prefix"; then
33580  for ac_prog in ar
33581  do
33582    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33583set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33585$as_echo_n "checking for $ac_word... " >&6; }
33586if ${ac_cv_prog_AR+:} false; then :
33587  $as_echo_n "(cached) " >&6
33588else
33589  if test -n "$AR"; then
33590  ac_cv_prog_AR="$AR" # Let the user override the test.
33591else
33592as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33593for as_dir in $PATH
33594do
33595  IFS=$as_save_IFS
33596  test -z "$as_dir" && as_dir=.
33597    for ac_exec_ext in '' $ac_executable_extensions; do
33598  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33599    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
33600    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33601    break 2
33602  fi
33603done
33604  done
33605IFS=$as_save_IFS
33606
33607fi
33608fi
33609AR=$ac_cv_prog_AR
33610if test -n "$AR"; then
33611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33612$as_echo "$AR" >&6; }
33613else
33614  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33615$as_echo "no" >&6; }
33616fi
33617
33618
33619    test -n "$AR" && break
33620  done
33621fi
33622if test -z "$AR"; then
33623  ac_ct_AR=$AR
33624  for ac_prog in ar
33625do
33626  # Extract the first word of "$ac_prog", so it can be a program name with args.
33627set dummy $ac_prog; ac_word=$2
33628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33629$as_echo_n "checking for $ac_word... " >&6; }
33630if ${ac_cv_prog_ac_ct_AR+:} false; then :
33631  $as_echo_n "(cached) " >&6
33632else
33633  if test -n "$ac_ct_AR"; then
33634  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
33635else
33636as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33637for as_dir in $PATH
33638do
33639  IFS=$as_save_IFS
33640  test -z "$as_dir" && as_dir=.
33641    for ac_exec_ext in '' $ac_executable_extensions; do
33642  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33643    ac_cv_prog_ac_ct_AR="$ac_prog"
33644    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33645    break 2
33646  fi
33647done
33648  done
33649IFS=$as_save_IFS
33650
33651fi
33652fi
33653ac_ct_AR=$ac_cv_prog_ac_ct_AR
33654if test -n "$ac_ct_AR"; then
33655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
33656$as_echo "$ac_ct_AR" >&6; }
33657else
33658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33659$as_echo "no" >&6; }
33660fi
33661
33662
33663  test -n "$ac_ct_AR" && break
33664done
33665
33666  if test "x$ac_ct_AR" = x; then
33667    AR=""
33668  else
33669    case $cross_compiling:$ac_tool_warned in
33670yes:)
33671{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33672$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33673ac_tool_warned=yes ;;
33674esac
33675    AR=$ac_ct_AR
33676  fi
33677fi
33678
33679    else
33680      # If it succeeded, then it was overridden by the user. We will use it
33681      # for the tool.
33682
33683      # First remove it from the list of overridden variables, so we can test
33684      # for unknown variables in the end.
33685      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33686
33687      # Check if the provided tool contains a complete path.
33688      tool_specified="$AR"
33689      tool_basename="${tool_specified##*/}"
33690      if test "x$tool_basename" = "x$tool_specified"; then
33691        # A command without a complete path is provided, search $PATH.
33692        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
33693$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
33694        # Extract the first word of "$tool_basename", so it can be a program name with args.
33695set dummy $tool_basename; ac_word=$2
33696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33697$as_echo_n "checking for $ac_word... " >&6; }
33698if ${ac_cv_path_AR+:} false; then :
33699  $as_echo_n "(cached) " >&6
33700else
33701  case $AR in
33702  [\\/]* | ?:[\\/]*)
33703  ac_cv_path_AR="$AR" # Let the user override the test with a path.
33704  ;;
33705  *)
33706  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33707for as_dir in $PATH
33708do
33709  IFS=$as_save_IFS
33710  test -z "$as_dir" && as_dir=.
33711    for ac_exec_ext in '' $ac_executable_extensions; do
33712  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33713    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
33714    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33715    break 2
33716  fi
33717done
33718  done
33719IFS=$as_save_IFS
33720
33721  ;;
33722esac
33723fi
33724AR=$ac_cv_path_AR
33725if test -n "$AR"; then
33726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33727$as_echo "$AR" >&6; }
33728else
33729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33730$as_echo "no" >&6; }
33731fi
33732
33733
33734        if test "x$AR" = x; then
33735          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
33736        fi
33737      else
33738        # Otherwise we believe it is a complete path. Use it as it is.
33739        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
33740$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
33741        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
33742$as_echo_n "checking for AR... " >&6; }
33743        if test ! -x "$tool_specified"; then
33744          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33745$as_echo "not found" >&6; }
33746          as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
33747        fi
33748        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33749$as_echo "$tool_specified" >&6; }
33750      fi
33751    fi
33752  fi
33753
33754
33755  fi
33756
33757  # Only process if variable expands to non-empty
33758
33759  if test "x$AR" != x; then
33760    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33761
33762  # First separate the path from the arguments. This will split at the first
33763  # space.
33764  complete="$AR"
33765  path="${complete%% *}"
33766  tmp="$complete EOL"
33767  arguments="${tmp#* }"
33768
33769  # Input might be given as Windows format, start by converting to
33770  # unix format.
33771  new_path=`$CYGPATH -u "$path"`
33772
33773  # Now try to locate executable using which
33774  new_path=`$WHICH "$new_path" 2> /dev/null`
33775  # bat and cmd files are not always considered executable in cygwin causing which
33776  # to not find them
33777  if test "x$new_path" = x \
33778      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33779      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33780    new_path=`$CYGPATH -u "$path"`
33781  fi
33782  if test "x$new_path" = x; then
33783    # Oops. Which didn't find the executable.
33784    # The splitting of arguments from the executable at a space might have been incorrect,
33785    # since paths with space are more likely in Windows. Give it another try with the whole
33786    # argument.
33787    path="$complete"
33788    arguments="EOL"
33789    new_path=`$CYGPATH -u "$path"`
33790    new_path=`$WHICH "$new_path" 2> /dev/null`
33791    # bat and cmd files are not always considered executable in cygwin causing which
33792    # to not find them
33793    if test "x$new_path" = x \
33794        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33795        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33796      new_path=`$CYGPATH -u "$path"`
33797    fi
33798    if test "x$new_path" = x; then
33799      # It's still not found. Now this is an unrecoverable error.
33800      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33801$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33802      has_space=`$ECHO "$complete" | $GREP " "`
33803      if test "x$has_space" != x; then
33804        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33805$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33806      fi
33807      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33808    fi
33809  fi
33810
33811  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33812  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33813  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33814  # "foo.exe" is OK but "foo" is an error.
33815  #
33816  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33817  # It is also a way to make sure we got the proper file name for the real test later on.
33818  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33819  if test "x$test_shortpath" = x; then
33820    # Short path failed, file does not exist as specified.
33821    # Try adding .exe or .cmd
33822    if test -f "${new_path}.exe"; then
33823      input_to_shortpath="${new_path}.exe"
33824    elif test -f "${new_path}.cmd"; then
33825      input_to_shortpath="${new_path}.cmd"
33826    else
33827      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
33828$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
33829      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33830$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33831      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33832    fi
33833  else
33834    input_to_shortpath="$new_path"
33835  fi
33836
33837  # Call helper function which possibly converts this using DOS-style short mode.
33838  # If so, the updated path is stored in $new_path.
33839  new_path="$input_to_shortpath"
33840
33841  input_path="$input_to_shortpath"
33842  # Check if we need to convert this using DOS-style short mode. If the path
33843  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33844  # take no chances and rewrite it.
33845  # Note: m4 eats our [], so we need to use [ and ] instead.
33846  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33847  if test "x$has_forbidden_chars" != x; then
33848    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33849    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33850    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33851    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33852      # Going to short mode and back again did indeed matter. Since short mode is
33853      # case insensitive, let's make it lowercase to improve readability.
33854      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33855      # Now convert it back to Unix-style (cygpath)
33856      input_path=`$CYGPATH -u "$shortmode_path"`
33857      new_path="$input_path"
33858    fi
33859  fi
33860
33861  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33862  if test "x$test_cygdrive_prefix" = x; then
33863    # As a simple fix, exclude /usr/bin since it's not a real path.
33864    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33865      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33866      # a path prefixed by /cygdrive for fixpath to work.
33867      new_path="$CYGWIN_ROOT_PATH$input_path"
33868    fi
33869  fi
33870
33871  # remove trailing .exe if any
33872  new_path="${new_path/%.exe/}"
33873
33874    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33875
33876  # First separate the path from the arguments. This will split at the first
33877  # space.
33878  complete="$AR"
33879  path="${complete%% *}"
33880  tmp="$complete EOL"
33881  arguments="${tmp#* }"
33882
33883  # Input might be given as Windows format, start by converting to
33884  # unix format.
33885  new_path="$path"
33886
33887  windows_path="$new_path"
33888  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33889    unix_path=`$CYGPATH -u "$windows_path"`
33890    new_path="$unix_path"
33891  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33892    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33893    new_path="$unix_path"
33894  fi
33895
33896
33897  # Now try to locate executable using which
33898  new_path=`$WHICH "$new_path" 2> /dev/null`
33899
33900  if test "x$new_path" = x; then
33901    # Oops. Which didn't find the executable.
33902    # The splitting of arguments from the executable at a space might have been incorrect,
33903    # since paths with space are more likely in Windows. Give it another try with the whole
33904    # argument.
33905    path="$complete"
33906    arguments="EOL"
33907    new_path="$path"
33908
33909  windows_path="$new_path"
33910  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33911    unix_path=`$CYGPATH -u "$windows_path"`
33912    new_path="$unix_path"
33913  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33914    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33915    new_path="$unix_path"
33916  fi
33917
33918
33919    new_path=`$WHICH "$new_path" 2> /dev/null`
33920    # bat and cmd files are not always considered executable in MSYS causing which
33921    # to not find them
33922    if test "x$new_path" = x \
33923        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33924        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33925      new_path="$path"
33926
33927  windows_path="$new_path"
33928  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33929    unix_path=`$CYGPATH -u "$windows_path"`
33930    new_path="$unix_path"
33931  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33932    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33933    new_path="$unix_path"
33934  fi
33935
33936    fi
33937
33938    if test "x$new_path" = x; then
33939      # It's still not found. Now this is an unrecoverable error.
33940      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33941$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33942      has_space=`$ECHO "$complete" | $GREP " "`
33943      if test "x$has_space" != x; then
33944        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33945$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33946      fi
33947      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33948    fi
33949  fi
33950
33951  # Now new_path has a complete unix path to the binary
33952  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33953    # Keep paths in /bin as-is, but remove trailing .exe if any
33954    new_path="${new_path/%.exe/}"
33955    # Do not save /bin paths to all_fixpath_prefixes!
33956  else
33957    # Not in mixed or Windows style, start by that.
33958    new_path=`cmd //c echo $new_path`
33959
33960  input_path="$new_path"
33961  # Check if we need to convert this using DOS-style short mode. If the path
33962  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33963  # take no chances and rewrite it.
33964  # Note: m4 eats our [], so we need to use [ and ] instead.
33965  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33966  if test "x$has_forbidden_chars" != x; then
33967    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33968    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33969  fi
33970
33971    # Output is in $new_path
33972
33973  windows_path="$new_path"
33974  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33975    unix_path=`$CYGPATH -u "$windows_path"`
33976    new_path="$unix_path"
33977  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33978    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33979    new_path="$unix_path"
33980  fi
33981
33982    # remove trailing .exe if any
33983    new_path="${new_path/%.exe/}"
33984
33985    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33986    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33987  fi
33988
33989    else
33990      # We're on a unix platform. Hooray! :)
33991      # First separate the path from the arguments. This will split at the first
33992      # space.
33993      complete="$AR"
33994      path="${complete%% *}"
33995      tmp="$complete EOL"
33996      arguments="${tmp#* }"
33997
33998      # Cannot rely on the command "which" here since it doesn't always work.
33999      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34000      if test -z "$is_absolute_path"; then
34001        # Path to executable is not absolute. Find it.
34002        IFS_save="$IFS"
34003        IFS=:
34004        for p in $PATH; do
34005          if test -f "$p/$path" && test -x "$p/$path"; then
34006            new_path="$p/$path"
34007            break
34008          fi
34009        done
34010        IFS="$IFS_save"
34011      else
34012        # This is an absolute path, we can use it without further modifications.
34013        new_path="$path"
34014      fi
34015
34016      if test "x$new_path" = x; then
34017        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
34018$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
34019        has_space=`$ECHO "$complete" | $GREP " "`
34020        if test "x$has_space" != x; then
34021          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34022$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34023        fi
34024        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
34025      fi
34026    fi
34027
34028    # Now join together the path and the arguments once again
34029    if test "x$arguments" != xEOL; then
34030      new_complete="$new_path ${arguments% *}"
34031    else
34032      new_complete="$new_path"
34033    fi
34034
34035    if test "x$complete" != "x$new_complete"; then
34036      AR="$new_complete"
34037      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
34038$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
34039    fi
34040  fi
34041
34042
34043
34044  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
34045
34046
34047  # Publish this variable in the help.
34048
34049
34050  if test "x$LIPO" = x; then
34051    # The variable is not set by user, try to locate tool using the code snippet
34052    for ac_prog in lipo
34053do
34054  # Extract the first word of "$ac_prog", so it can be a program name with args.
34055set dummy $ac_prog; ac_word=$2
34056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34057$as_echo_n "checking for $ac_word... " >&6; }
34058if ${ac_cv_path_LIPO+:} false; then :
34059  $as_echo_n "(cached) " >&6
34060else
34061  case $LIPO in
34062  [\\/]* | ?:[\\/]*)
34063  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
34064  ;;
34065  *)
34066  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34067for as_dir in $PATH
34068do
34069  IFS=$as_save_IFS
34070  test -z "$as_dir" && as_dir=.
34071    for ac_exec_ext in '' $ac_executable_extensions; do
34072  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34073    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
34074    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34075    break 2
34076  fi
34077done
34078  done
34079IFS=$as_save_IFS
34080
34081  ;;
34082esac
34083fi
34084LIPO=$ac_cv_path_LIPO
34085if test -n "$LIPO"; then
34086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
34087$as_echo "$LIPO" >&6; }
34088else
34089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34090$as_echo "no" >&6; }
34091fi
34092
34093
34094  test -n "$LIPO" && break
34095done
34096
34097  else
34098    # The variable is set, but is it from the command line or the environment?
34099
34100    # Try to remove the string !LIPO! from our list.
34101    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
34102    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
34103      # If it failed, the variable was not from the command line. Ignore it,
34104      # but warn the user (except for BASH, which is always set by the calling BASH).
34105      if test "xLIPO" != xBASH; then
34106        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
34107$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
34108      fi
34109      # Try to locate tool using the code snippet
34110      for ac_prog in lipo
34111do
34112  # Extract the first word of "$ac_prog", so it can be a program name with args.
34113set dummy $ac_prog; ac_word=$2
34114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34115$as_echo_n "checking for $ac_word... " >&6; }
34116if ${ac_cv_path_LIPO+:} false; then :
34117  $as_echo_n "(cached) " >&6
34118else
34119  case $LIPO in
34120  [\\/]* | ?:[\\/]*)
34121  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
34122  ;;
34123  *)
34124  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34125for as_dir in $PATH
34126do
34127  IFS=$as_save_IFS
34128  test -z "$as_dir" && as_dir=.
34129    for ac_exec_ext in '' $ac_executable_extensions; do
34130  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34131    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
34132    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34133    break 2
34134  fi
34135done
34136  done
34137IFS=$as_save_IFS
34138
34139  ;;
34140esac
34141fi
34142LIPO=$ac_cv_path_LIPO
34143if test -n "$LIPO"; then
34144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
34145$as_echo "$LIPO" >&6; }
34146else
34147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34148$as_echo "no" >&6; }
34149fi
34150
34151
34152  test -n "$LIPO" && break
34153done
34154
34155    else
34156      # If it succeeded, then it was overridden by the user. We will use it
34157      # for the tool.
34158
34159      # First remove it from the list of overridden variables, so we can test
34160      # for unknown variables in the end.
34161      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
34162
34163      # Check if the provided tool contains a complete path.
34164      tool_specified="$LIPO"
34165      tool_basename="${tool_specified##*/}"
34166      if test "x$tool_basename" = "x$tool_specified"; then
34167        # A command without a complete path is provided, search $PATH.
34168        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
34169$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
34170        # Extract the first word of "$tool_basename", so it can be a program name with args.
34171set dummy $tool_basename; ac_word=$2
34172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34173$as_echo_n "checking for $ac_word... " >&6; }
34174if ${ac_cv_path_LIPO+:} false; then :
34175  $as_echo_n "(cached) " >&6
34176else
34177  case $LIPO in
34178  [\\/]* | ?:[\\/]*)
34179  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
34180  ;;
34181  *)
34182  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34183for as_dir in $PATH
34184do
34185  IFS=$as_save_IFS
34186  test -z "$as_dir" && as_dir=.
34187    for ac_exec_ext in '' $ac_executable_extensions; do
34188  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34189    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
34190    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34191    break 2
34192  fi
34193done
34194  done
34195IFS=$as_save_IFS
34196
34197  ;;
34198esac
34199fi
34200LIPO=$ac_cv_path_LIPO
34201if test -n "$LIPO"; then
34202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
34203$as_echo "$LIPO" >&6; }
34204else
34205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34206$as_echo "no" >&6; }
34207fi
34208
34209
34210        if test "x$LIPO" = x; then
34211          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
34212        fi
34213      else
34214        # Otherwise we believe it is a complete path. Use it as it is.
34215        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
34216$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
34217        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
34218$as_echo_n "checking for LIPO... " >&6; }
34219        if test ! -x "$tool_specified"; then
34220          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
34221$as_echo "not found" >&6; }
34222          as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
34223        fi
34224        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
34225$as_echo "$tool_specified" >&6; }
34226      fi
34227    fi
34228  fi
34229
34230
34231
34232  # Only process if variable expands to non-empty
34233
34234  if test "x$LIPO" != x; then
34235    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34236
34237  # First separate the path from the arguments. This will split at the first
34238  # space.
34239  complete="$LIPO"
34240  path="${complete%% *}"
34241  tmp="$complete EOL"
34242  arguments="${tmp#* }"
34243
34244  # Input might be given as Windows format, start by converting to
34245  # unix format.
34246  new_path=`$CYGPATH -u "$path"`
34247
34248  # Now try to locate executable using which
34249  new_path=`$WHICH "$new_path" 2> /dev/null`
34250  # bat and cmd files are not always considered executable in cygwin causing which
34251  # to not find them
34252  if test "x$new_path" = x \
34253      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34254      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34255    new_path=`$CYGPATH -u "$path"`
34256  fi
34257  if test "x$new_path" = x; then
34258    # Oops. Which didn't find the executable.
34259    # The splitting of arguments from the executable at a space might have been incorrect,
34260    # since paths with space are more likely in Windows. Give it another try with the whole
34261    # argument.
34262    path="$complete"
34263    arguments="EOL"
34264    new_path=`$CYGPATH -u "$path"`
34265    new_path=`$WHICH "$new_path" 2> /dev/null`
34266    # bat and cmd files are not always considered executable in cygwin causing which
34267    # to not find them
34268    if test "x$new_path" = x \
34269        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34270        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34271      new_path=`$CYGPATH -u "$path"`
34272    fi
34273    if test "x$new_path" = x; then
34274      # It's still not found. Now this is an unrecoverable error.
34275      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
34276$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
34277      has_space=`$ECHO "$complete" | $GREP " "`
34278      if test "x$has_space" != x; then
34279        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34280$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34281      fi
34282      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34283    fi
34284  fi
34285
34286  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34287  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34288  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34289  # "foo.exe" is OK but "foo" is an error.
34290  #
34291  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34292  # It is also a way to make sure we got the proper file name for the real test later on.
34293  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34294  if test "x$test_shortpath" = x; then
34295    # Short path failed, file does not exist as specified.
34296    # Try adding .exe or .cmd
34297    if test -f "${new_path}.exe"; then
34298      input_to_shortpath="${new_path}.exe"
34299    elif test -f "${new_path}.cmd"; then
34300      input_to_shortpath="${new_path}.cmd"
34301    else
34302      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
34303$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
34304      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34305$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34306      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34307    fi
34308  else
34309    input_to_shortpath="$new_path"
34310  fi
34311
34312  # Call helper function which possibly converts this using DOS-style short mode.
34313  # If so, the updated path is stored in $new_path.
34314  new_path="$input_to_shortpath"
34315
34316  input_path="$input_to_shortpath"
34317  # Check if we need to convert this using DOS-style short mode. If the path
34318  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34319  # take no chances and rewrite it.
34320  # Note: m4 eats our [], so we need to use [ and ] instead.
34321  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34322  if test "x$has_forbidden_chars" != x; then
34323    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34324    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34325    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34326    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34327      # Going to short mode and back again did indeed matter. Since short mode is
34328      # case insensitive, let's make it lowercase to improve readability.
34329      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34330      # Now convert it back to Unix-style (cygpath)
34331      input_path=`$CYGPATH -u "$shortmode_path"`
34332      new_path="$input_path"
34333    fi
34334  fi
34335
34336  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34337  if test "x$test_cygdrive_prefix" = x; then
34338    # As a simple fix, exclude /usr/bin since it's not a real path.
34339    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34340      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34341      # a path prefixed by /cygdrive for fixpath to work.
34342      new_path="$CYGWIN_ROOT_PATH$input_path"
34343    fi
34344  fi
34345
34346  # remove trailing .exe if any
34347  new_path="${new_path/%.exe/}"
34348
34349    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34350
34351  # First separate the path from the arguments. This will split at the first
34352  # space.
34353  complete="$LIPO"
34354  path="${complete%% *}"
34355  tmp="$complete EOL"
34356  arguments="${tmp#* }"
34357
34358  # Input might be given as Windows format, start by converting to
34359  # unix format.
34360  new_path="$path"
34361
34362  windows_path="$new_path"
34363  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34364    unix_path=`$CYGPATH -u "$windows_path"`
34365    new_path="$unix_path"
34366  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34367    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34368    new_path="$unix_path"
34369  fi
34370
34371
34372  # Now try to locate executable using which
34373  new_path=`$WHICH "$new_path" 2> /dev/null`
34374
34375  if test "x$new_path" = x; then
34376    # Oops. Which didn't find the executable.
34377    # The splitting of arguments from the executable at a space might have been incorrect,
34378    # since paths with space are more likely in Windows. Give it another try with the whole
34379    # argument.
34380    path="$complete"
34381    arguments="EOL"
34382    new_path="$path"
34383
34384  windows_path="$new_path"
34385  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34386    unix_path=`$CYGPATH -u "$windows_path"`
34387    new_path="$unix_path"
34388  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34389    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34390    new_path="$unix_path"
34391  fi
34392
34393
34394    new_path=`$WHICH "$new_path" 2> /dev/null`
34395    # bat and cmd files are not always considered executable in MSYS causing which
34396    # to not find them
34397    if test "x$new_path" = x \
34398        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34399        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34400      new_path="$path"
34401
34402  windows_path="$new_path"
34403  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34404    unix_path=`$CYGPATH -u "$windows_path"`
34405    new_path="$unix_path"
34406  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34407    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34408    new_path="$unix_path"
34409  fi
34410
34411    fi
34412
34413    if test "x$new_path" = x; then
34414      # It's still not found. Now this is an unrecoverable error.
34415      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
34416$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
34417      has_space=`$ECHO "$complete" | $GREP " "`
34418      if test "x$has_space" != x; then
34419        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34420$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34421      fi
34422      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34423    fi
34424  fi
34425
34426  # Now new_path has a complete unix path to the binary
34427  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34428    # Keep paths in /bin as-is, but remove trailing .exe if any
34429    new_path="${new_path/%.exe/}"
34430    # Do not save /bin paths to all_fixpath_prefixes!
34431  else
34432    # Not in mixed or Windows style, start by that.
34433    new_path=`cmd //c echo $new_path`
34434
34435  input_path="$new_path"
34436  # Check if we need to convert this using DOS-style short mode. If the path
34437  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34438  # take no chances and rewrite it.
34439  # Note: m4 eats our [], so we need to use [ and ] instead.
34440  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34441  if test "x$has_forbidden_chars" != x; then
34442    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34443    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34444  fi
34445
34446    # Output is in $new_path
34447
34448  windows_path="$new_path"
34449  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34450    unix_path=`$CYGPATH -u "$windows_path"`
34451    new_path="$unix_path"
34452  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34453    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34454    new_path="$unix_path"
34455  fi
34456
34457    # remove trailing .exe if any
34458    new_path="${new_path/%.exe/}"
34459
34460    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34461    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34462  fi
34463
34464    else
34465      # We're on a unix platform. Hooray! :)
34466      # First separate the path from the arguments. This will split at the first
34467      # space.
34468      complete="$LIPO"
34469      path="${complete%% *}"
34470      tmp="$complete EOL"
34471      arguments="${tmp#* }"
34472
34473      # Cannot rely on the command "which" here since it doesn't always work.
34474      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34475      if test -z "$is_absolute_path"; then
34476        # Path to executable is not absolute. Find it.
34477        IFS_save="$IFS"
34478        IFS=:
34479        for p in $PATH; do
34480          if test -f "$p/$path" && test -x "$p/$path"; then
34481            new_path="$p/$path"
34482            break
34483          fi
34484        done
34485        IFS="$IFS_save"
34486      else
34487        # This is an absolute path, we can use it without further modifications.
34488        new_path="$path"
34489      fi
34490
34491      if test "x$new_path" = x; then
34492        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
34493$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
34494        has_space=`$ECHO "$complete" | $GREP " "`
34495        if test "x$has_space" != x; then
34496          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34497$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34498        fi
34499        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34500      fi
34501    fi
34502
34503    # Now join together the path and the arguments once again
34504    if test "x$arguments" != xEOL; then
34505      new_complete="$new_path ${arguments% *}"
34506    else
34507      new_complete="$new_path"
34508    fi
34509
34510    if test "x$complete" != "x$new_complete"; then
34511      LIPO="$new_complete"
34512      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
34513$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
34514    fi
34515  fi
34516
34517  fi
34518
34519  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34520    # Extract the first word of "mt", so it can be a program name with args.
34521set dummy mt; ac_word=$2
34522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34523$as_echo_n "checking for $ac_word... " >&6; }
34524if ${ac_cv_prog_MT+:} false; then :
34525  $as_echo_n "(cached) " >&6
34526else
34527  if test -n "$MT"; then
34528  ac_cv_prog_MT="$MT" # Let the user override the test.
34529else
34530  ac_prog_rejected=no
34531as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34532for as_dir in $PATH
34533do
34534  IFS=$as_save_IFS
34535  test -z "$as_dir" && as_dir=.
34536    for ac_exec_ext in '' $ac_executable_extensions; do
34537  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34538    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
34539       ac_prog_rejected=yes
34540       continue
34541     fi
34542    ac_cv_prog_MT="mt"
34543    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34544    break 2
34545  fi
34546done
34547  done
34548IFS=$as_save_IFS
34549
34550if test $ac_prog_rejected = yes; then
34551  # We found a bogon in the path, so make sure we never use it.
34552  set dummy $ac_cv_prog_MT
34553  shift
34554  if test $# != 0; then
34555    # We chose a different compiler from the bogus one.
34556    # However, it has the same basename, so the bogon will be chosen
34557    # first if we set MT to just the basename; use the full file name.
34558    shift
34559    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
34560  fi
34561fi
34562fi
34563fi
34564MT=$ac_cv_prog_MT
34565if test -n "$MT"; then
34566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
34567$as_echo "$MT" >&6; }
34568else
34569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34570$as_echo "no" >&6; }
34571fi
34572
34573
34574
34575  # Only process if variable expands to non-empty
34576
34577  if test "x$MT" != x; then
34578    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34579
34580  # First separate the path from the arguments. This will split at the first
34581  # space.
34582  complete="$MT"
34583  path="${complete%% *}"
34584  tmp="$complete EOL"
34585  arguments="${tmp#* }"
34586
34587  # Input might be given as Windows format, start by converting to
34588  # unix format.
34589  new_path=`$CYGPATH -u "$path"`
34590
34591  # Now try to locate executable using which
34592  new_path=`$WHICH "$new_path" 2> /dev/null`
34593  # bat and cmd files are not always considered executable in cygwin causing which
34594  # to not find them
34595  if test "x$new_path" = x \
34596      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34597      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34598    new_path=`$CYGPATH -u "$path"`
34599  fi
34600  if test "x$new_path" = x; then
34601    # Oops. Which didn't find the executable.
34602    # The splitting of arguments from the executable at a space might have been incorrect,
34603    # since paths with space are more likely in Windows. Give it another try with the whole
34604    # argument.
34605    path="$complete"
34606    arguments="EOL"
34607    new_path=`$CYGPATH -u "$path"`
34608    new_path=`$WHICH "$new_path" 2> /dev/null`
34609    # bat and cmd files are not always considered executable in cygwin causing which
34610    # to not find them
34611    if test "x$new_path" = x \
34612        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34613        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34614      new_path=`$CYGPATH -u "$path"`
34615    fi
34616    if test "x$new_path" = x; then
34617      # It's still not found. Now this is an unrecoverable error.
34618      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34619$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34620      has_space=`$ECHO "$complete" | $GREP " "`
34621      if test "x$has_space" != x; then
34622        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34623$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34624      fi
34625      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34626    fi
34627  fi
34628
34629  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34630  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34631  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34632  # "foo.exe" is OK but "foo" is an error.
34633  #
34634  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34635  # It is also a way to make sure we got the proper file name for the real test later on.
34636  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34637  if test "x$test_shortpath" = x; then
34638    # Short path failed, file does not exist as specified.
34639    # Try adding .exe or .cmd
34640    if test -f "${new_path}.exe"; then
34641      input_to_shortpath="${new_path}.exe"
34642    elif test -f "${new_path}.cmd"; then
34643      input_to_shortpath="${new_path}.cmd"
34644    else
34645      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
34646$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
34647      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34648$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34649      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34650    fi
34651  else
34652    input_to_shortpath="$new_path"
34653  fi
34654
34655  # Call helper function which possibly converts this using DOS-style short mode.
34656  # If so, the updated path is stored in $new_path.
34657  new_path="$input_to_shortpath"
34658
34659  input_path="$input_to_shortpath"
34660  # Check if we need to convert this using DOS-style short mode. If the path
34661  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34662  # take no chances and rewrite it.
34663  # Note: m4 eats our [], so we need to use [ and ] instead.
34664  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34665  if test "x$has_forbidden_chars" != x; then
34666    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34667    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34668    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34669    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34670      # Going to short mode and back again did indeed matter. Since short mode is
34671      # case insensitive, let's make it lowercase to improve readability.
34672      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34673      # Now convert it back to Unix-style (cygpath)
34674      input_path=`$CYGPATH -u "$shortmode_path"`
34675      new_path="$input_path"
34676    fi
34677  fi
34678
34679  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34680  if test "x$test_cygdrive_prefix" = x; then
34681    # As a simple fix, exclude /usr/bin since it's not a real path.
34682    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34683      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34684      # a path prefixed by /cygdrive for fixpath to work.
34685      new_path="$CYGWIN_ROOT_PATH$input_path"
34686    fi
34687  fi
34688
34689  # remove trailing .exe if any
34690  new_path="${new_path/%.exe/}"
34691
34692    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34693
34694  # First separate the path from the arguments. This will split at the first
34695  # space.
34696  complete="$MT"
34697  path="${complete%% *}"
34698  tmp="$complete EOL"
34699  arguments="${tmp#* }"
34700
34701  # Input might be given as Windows format, start by converting to
34702  # unix format.
34703  new_path="$path"
34704
34705  windows_path="$new_path"
34706  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34707    unix_path=`$CYGPATH -u "$windows_path"`
34708    new_path="$unix_path"
34709  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34710    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34711    new_path="$unix_path"
34712  fi
34713
34714
34715  # Now try to locate executable using which
34716  new_path=`$WHICH "$new_path" 2> /dev/null`
34717
34718  if test "x$new_path" = x; then
34719    # Oops. Which didn't find the executable.
34720    # The splitting of arguments from the executable at a space might have been incorrect,
34721    # since paths with space are more likely in Windows. Give it another try with the whole
34722    # argument.
34723    path="$complete"
34724    arguments="EOL"
34725    new_path="$path"
34726
34727  windows_path="$new_path"
34728  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34729    unix_path=`$CYGPATH -u "$windows_path"`
34730    new_path="$unix_path"
34731  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34732    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34733    new_path="$unix_path"
34734  fi
34735
34736
34737    new_path=`$WHICH "$new_path" 2> /dev/null`
34738    # bat and cmd files are not always considered executable in MSYS causing which
34739    # to not find them
34740    if test "x$new_path" = x \
34741        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34742        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34743      new_path="$path"
34744
34745  windows_path="$new_path"
34746  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34747    unix_path=`$CYGPATH -u "$windows_path"`
34748    new_path="$unix_path"
34749  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34750    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34751    new_path="$unix_path"
34752  fi
34753
34754    fi
34755
34756    if test "x$new_path" = x; then
34757      # It's still not found. Now this is an unrecoverable error.
34758      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34759$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34760      has_space=`$ECHO "$complete" | $GREP " "`
34761      if test "x$has_space" != x; then
34762        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34763$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34764      fi
34765      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34766    fi
34767  fi
34768
34769  # Now new_path has a complete unix path to the binary
34770  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34771    # Keep paths in /bin as-is, but remove trailing .exe if any
34772    new_path="${new_path/%.exe/}"
34773    # Do not save /bin paths to all_fixpath_prefixes!
34774  else
34775    # Not in mixed or Windows style, start by that.
34776    new_path=`cmd //c echo $new_path`
34777
34778  input_path="$new_path"
34779  # Check if we need to convert this using DOS-style short mode. If the path
34780  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34781  # take no chances and rewrite it.
34782  # Note: m4 eats our [], so we need to use [ and ] instead.
34783  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34784  if test "x$has_forbidden_chars" != x; then
34785    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34786    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34787  fi
34788
34789    # Output is in $new_path
34790
34791  windows_path="$new_path"
34792  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34793    unix_path=`$CYGPATH -u "$windows_path"`
34794    new_path="$unix_path"
34795  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34796    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34797    new_path="$unix_path"
34798  fi
34799
34800    # remove trailing .exe if any
34801    new_path="${new_path/%.exe/}"
34802
34803    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34804    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34805  fi
34806
34807    else
34808      # We're on a unix platform. Hooray! :)
34809      # First separate the path from the arguments. This will split at the first
34810      # space.
34811      complete="$MT"
34812      path="${complete%% *}"
34813      tmp="$complete EOL"
34814      arguments="${tmp#* }"
34815
34816      # Cannot rely on the command "which" here since it doesn't always work.
34817      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34818      if test -z "$is_absolute_path"; then
34819        # Path to executable is not absolute. Find it.
34820        IFS_save="$IFS"
34821        IFS=:
34822        for p in $PATH; do
34823          if test -f "$p/$path" && test -x "$p/$path"; then
34824            new_path="$p/$path"
34825            break
34826          fi
34827        done
34828        IFS="$IFS_save"
34829      else
34830        # This is an absolute path, we can use it without further modifications.
34831        new_path="$path"
34832      fi
34833
34834      if test "x$new_path" = x; then
34835        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34836$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34837        has_space=`$ECHO "$complete" | $GREP " "`
34838        if test "x$has_space" != x; then
34839          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34840$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34841        fi
34842        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34843      fi
34844    fi
34845
34846    # Now join together the path and the arguments once again
34847    if test "x$arguments" != xEOL; then
34848      new_complete="$new_path ${arguments% *}"
34849    else
34850      new_complete="$new_path"
34851    fi
34852
34853    if test "x$complete" != "x$new_complete"; then
34854      MT="$new_complete"
34855      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
34856$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
34857    fi
34858  fi
34859
34860    # Setup the resource compiler (RC)
34861    # Extract the first word of "rc", so it can be a program name with args.
34862set dummy rc; ac_word=$2
34863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34864$as_echo_n "checking for $ac_word... " >&6; }
34865if ${ac_cv_prog_RC+:} false; then :
34866  $as_echo_n "(cached) " >&6
34867else
34868  if test -n "$RC"; then
34869  ac_cv_prog_RC="$RC" # Let the user override the test.
34870else
34871  ac_prog_rejected=no
34872as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34873for as_dir in $PATH
34874do
34875  IFS=$as_save_IFS
34876  test -z "$as_dir" && as_dir=.
34877    for ac_exec_ext in '' $ac_executable_extensions; do
34878  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34879    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
34880       ac_prog_rejected=yes
34881       continue
34882     fi
34883    ac_cv_prog_RC="rc"
34884    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34885    break 2
34886  fi
34887done
34888  done
34889IFS=$as_save_IFS
34890
34891if test $ac_prog_rejected = yes; then
34892  # We found a bogon in the path, so make sure we never use it.
34893  set dummy $ac_cv_prog_RC
34894  shift
34895  if test $# != 0; then
34896    # We chose a different compiler from the bogus one.
34897    # However, it has the same basename, so the bogon will be chosen
34898    # first if we set RC to just the basename; use the full file name.
34899    shift
34900    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
34901  fi
34902fi
34903fi
34904fi
34905RC=$ac_cv_prog_RC
34906if test -n "$RC"; then
34907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
34908$as_echo "$RC" >&6; }
34909else
34910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34911$as_echo "no" >&6; }
34912fi
34913
34914
34915
34916  # Only process if variable expands to non-empty
34917
34918  if test "x$RC" != x; then
34919    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34920
34921  # First separate the path from the arguments. This will split at the first
34922  # space.
34923  complete="$RC"
34924  path="${complete%% *}"
34925  tmp="$complete EOL"
34926  arguments="${tmp#* }"
34927
34928  # Input might be given as Windows format, start by converting to
34929  # unix format.
34930  new_path=`$CYGPATH -u "$path"`
34931
34932  # Now try to locate executable using which
34933  new_path=`$WHICH "$new_path" 2> /dev/null`
34934  # bat and cmd files are not always considered executable in cygwin causing which
34935  # to not find them
34936  if test "x$new_path" = x \
34937      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34938      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34939    new_path=`$CYGPATH -u "$path"`
34940  fi
34941  if test "x$new_path" = x; then
34942    # Oops. Which didn't find the executable.
34943    # The splitting of arguments from the executable at a space might have been incorrect,
34944    # since paths with space are more likely in Windows. Give it another try with the whole
34945    # argument.
34946    path="$complete"
34947    arguments="EOL"
34948    new_path=`$CYGPATH -u "$path"`
34949    new_path=`$WHICH "$new_path" 2> /dev/null`
34950    # bat and cmd files are not always considered executable in cygwin causing which
34951    # to not find them
34952    if test "x$new_path" = x \
34953        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34954        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34955      new_path=`$CYGPATH -u "$path"`
34956    fi
34957    if test "x$new_path" = x; then
34958      # It's still not found. Now this is an unrecoverable error.
34959      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34960$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34961      has_space=`$ECHO "$complete" | $GREP " "`
34962      if test "x$has_space" != x; then
34963        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34964$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34965      fi
34966      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34967    fi
34968  fi
34969
34970  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34971  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34972  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34973  # "foo.exe" is OK but "foo" is an error.
34974  #
34975  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34976  # It is also a way to make sure we got the proper file name for the real test later on.
34977  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34978  if test "x$test_shortpath" = x; then
34979    # Short path failed, file does not exist as specified.
34980    # Try adding .exe or .cmd
34981    if test -f "${new_path}.exe"; then
34982      input_to_shortpath="${new_path}.exe"
34983    elif test -f "${new_path}.cmd"; then
34984      input_to_shortpath="${new_path}.cmd"
34985    else
34986      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
34987$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
34988      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34989$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34990      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34991    fi
34992  else
34993    input_to_shortpath="$new_path"
34994  fi
34995
34996  # Call helper function which possibly converts this using DOS-style short mode.
34997  # If so, the updated path is stored in $new_path.
34998  new_path="$input_to_shortpath"
34999
35000  input_path="$input_to_shortpath"
35001  # Check if we need to convert this using DOS-style short mode. If the path
35002  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35003  # take no chances and rewrite it.
35004  # Note: m4 eats our [], so we need to use [ and ] instead.
35005  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35006  if test "x$has_forbidden_chars" != x; then
35007    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35008    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35009    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35010    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35011      # Going to short mode and back again did indeed matter. Since short mode is
35012      # case insensitive, let's make it lowercase to improve readability.
35013      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35014      # Now convert it back to Unix-style (cygpath)
35015      input_path=`$CYGPATH -u "$shortmode_path"`
35016      new_path="$input_path"
35017    fi
35018  fi
35019
35020  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35021  if test "x$test_cygdrive_prefix" = x; then
35022    # As a simple fix, exclude /usr/bin since it's not a real path.
35023    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35024      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35025      # a path prefixed by /cygdrive for fixpath to work.
35026      new_path="$CYGWIN_ROOT_PATH$input_path"
35027    fi
35028  fi
35029
35030  # remove trailing .exe if any
35031  new_path="${new_path/%.exe/}"
35032
35033    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35034
35035  # First separate the path from the arguments. This will split at the first
35036  # space.
35037  complete="$RC"
35038  path="${complete%% *}"
35039  tmp="$complete EOL"
35040  arguments="${tmp#* }"
35041
35042  # Input might be given as Windows format, start by converting to
35043  # unix format.
35044  new_path="$path"
35045
35046  windows_path="$new_path"
35047  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35048    unix_path=`$CYGPATH -u "$windows_path"`
35049    new_path="$unix_path"
35050  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35051    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35052    new_path="$unix_path"
35053  fi
35054
35055
35056  # Now try to locate executable using which
35057  new_path=`$WHICH "$new_path" 2> /dev/null`
35058
35059  if test "x$new_path" = x; then
35060    # Oops. Which didn't find the executable.
35061    # The splitting of arguments from the executable at a space might have been incorrect,
35062    # since paths with space are more likely in Windows. Give it another try with the whole
35063    # argument.
35064    path="$complete"
35065    arguments="EOL"
35066    new_path="$path"
35067
35068  windows_path="$new_path"
35069  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35070    unix_path=`$CYGPATH -u "$windows_path"`
35071    new_path="$unix_path"
35072  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35073    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35074    new_path="$unix_path"
35075  fi
35076
35077
35078    new_path=`$WHICH "$new_path" 2> /dev/null`
35079    # bat and cmd files are not always considered executable in MSYS causing which
35080    # to not find them
35081    if test "x$new_path" = x \
35082        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35083        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35084      new_path="$path"
35085
35086  windows_path="$new_path"
35087  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35088    unix_path=`$CYGPATH -u "$windows_path"`
35089    new_path="$unix_path"
35090  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35091    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35092    new_path="$unix_path"
35093  fi
35094
35095    fi
35096
35097    if test "x$new_path" = x; then
35098      # It's still not found. Now this is an unrecoverable error.
35099      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
35100$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
35101      has_space=`$ECHO "$complete" | $GREP " "`
35102      if test "x$has_space" != x; then
35103        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35104$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35105      fi
35106      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
35107    fi
35108  fi
35109
35110  # Now new_path has a complete unix path to the binary
35111  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35112    # Keep paths in /bin as-is, but remove trailing .exe if any
35113    new_path="${new_path/%.exe/}"
35114    # Do not save /bin paths to all_fixpath_prefixes!
35115  else
35116    # Not in mixed or Windows style, start by that.
35117    new_path=`cmd //c echo $new_path`
35118
35119  input_path="$new_path"
35120  # Check if we need to convert this using DOS-style short mode. If the path
35121  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35122  # take no chances and rewrite it.
35123  # Note: m4 eats our [], so we need to use [ and ] instead.
35124  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35125  if test "x$has_forbidden_chars" != x; then
35126    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35127    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35128  fi
35129
35130    # Output is in $new_path
35131
35132  windows_path="$new_path"
35133  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35134    unix_path=`$CYGPATH -u "$windows_path"`
35135    new_path="$unix_path"
35136  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35137    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35138    new_path="$unix_path"
35139  fi
35140
35141    # remove trailing .exe if any
35142    new_path="${new_path/%.exe/}"
35143
35144    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35145    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35146  fi
35147
35148    else
35149      # We're on a unix platform. Hooray! :)
35150      # First separate the path from the arguments. This will split at the first
35151      # space.
35152      complete="$RC"
35153      path="${complete%% *}"
35154      tmp="$complete EOL"
35155      arguments="${tmp#* }"
35156
35157      # Cannot rely on the command "which" here since it doesn't always work.
35158      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35159      if test -z "$is_absolute_path"; then
35160        # Path to executable is not absolute. Find it.
35161        IFS_save="$IFS"
35162        IFS=:
35163        for p in $PATH; do
35164          if test -f "$p/$path" && test -x "$p/$path"; then
35165            new_path="$p/$path"
35166            break
35167          fi
35168        done
35169        IFS="$IFS_save"
35170      else
35171        # This is an absolute path, we can use it without further modifications.
35172        new_path="$path"
35173      fi
35174
35175      if test "x$new_path" = x; then
35176        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
35177$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
35178        has_space=`$ECHO "$complete" | $GREP " "`
35179        if test "x$has_space" != x; then
35180          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35181$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35182        fi
35183        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
35184      fi
35185    fi
35186
35187    # Now join together the path and the arguments once again
35188    if test "x$arguments" != xEOL; then
35189      new_complete="$new_path ${arguments% *}"
35190    else
35191      new_complete="$new_path"
35192    fi
35193
35194    if test "x$complete" != "x$new_complete"; then
35195      RC="$new_complete"
35196      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
35197$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
35198    fi
35199  fi
35200
35201    # Extract the first word of "dumpbin", so it can be a program name with args.
35202set dummy dumpbin; ac_word=$2
35203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35204$as_echo_n "checking for $ac_word... " >&6; }
35205if ${ac_cv_prog_DUMPBIN+:} false; then :
35206  $as_echo_n "(cached) " >&6
35207else
35208  if test -n "$DUMPBIN"; then
35209  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
35210else
35211as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35212for as_dir in $PATH
35213do
35214  IFS=$as_save_IFS
35215  test -z "$as_dir" && as_dir=.
35216    for ac_exec_ext in '' $ac_executable_extensions; do
35217  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35218    ac_cv_prog_DUMPBIN="dumpbin"
35219    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35220    break 2
35221  fi
35222done
35223  done
35224IFS=$as_save_IFS
35225
35226fi
35227fi
35228DUMPBIN=$ac_cv_prog_DUMPBIN
35229if test -n "$DUMPBIN"; then
35230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
35231$as_echo "$DUMPBIN" >&6; }
35232else
35233  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35234$as_echo "no" >&6; }
35235fi
35236
35237
35238
35239  # Only process if variable expands to non-empty
35240
35241  if test "x$DUMPBIN" != x; then
35242    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35243
35244  # First separate the path from the arguments. This will split at the first
35245  # space.
35246  complete="$DUMPBIN"
35247  path="${complete%% *}"
35248  tmp="$complete EOL"
35249  arguments="${tmp#* }"
35250
35251  # Input might be given as Windows format, start by converting to
35252  # unix format.
35253  new_path=`$CYGPATH -u "$path"`
35254
35255  # Now try to locate executable using which
35256  new_path=`$WHICH "$new_path" 2> /dev/null`
35257  # bat and cmd files are not always considered executable in cygwin causing which
35258  # to not find them
35259  if test "x$new_path" = x \
35260      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35261      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35262    new_path=`$CYGPATH -u "$path"`
35263  fi
35264  if test "x$new_path" = x; then
35265    # Oops. Which didn't find the executable.
35266    # The splitting of arguments from the executable at a space might have been incorrect,
35267    # since paths with space are more likely in Windows. Give it another try with the whole
35268    # argument.
35269    path="$complete"
35270    arguments="EOL"
35271    new_path=`$CYGPATH -u "$path"`
35272    new_path=`$WHICH "$new_path" 2> /dev/null`
35273    # bat and cmd files are not always considered executable in cygwin causing which
35274    # to not find them
35275    if test "x$new_path" = x \
35276        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35277        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35278      new_path=`$CYGPATH -u "$path"`
35279    fi
35280    if test "x$new_path" = x; then
35281      # It's still not found. Now this is an unrecoverable error.
35282      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35283$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35284      has_space=`$ECHO "$complete" | $GREP " "`
35285      if test "x$has_space" != x; then
35286        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35287$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35288      fi
35289      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35290    fi
35291  fi
35292
35293  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35294  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35295  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35296  # "foo.exe" is OK but "foo" is an error.
35297  #
35298  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35299  # It is also a way to make sure we got the proper file name for the real test later on.
35300  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35301  if test "x$test_shortpath" = x; then
35302    # Short path failed, file does not exist as specified.
35303    # Try adding .exe or .cmd
35304    if test -f "${new_path}.exe"; then
35305      input_to_shortpath="${new_path}.exe"
35306    elif test -f "${new_path}.cmd"; then
35307      input_to_shortpath="${new_path}.cmd"
35308    else
35309      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
35310$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
35311      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35312$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35313      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35314    fi
35315  else
35316    input_to_shortpath="$new_path"
35317  fi
35318
35319  # Call helper function which possibly converts this using DOS-style short mode.
35320  # If so, the updated path is stored in $new_path.
35321  new_path="$input_to_shortpath"
35322
35323  input_path="$input_to_shortpath"
35324  # Check if we need to convert this using DOS-style short mode. If the path
35325  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35326  # take no chances and rewrite it.
35327  # Note: m4 eats our [], so we need to use [ and ] instead.
35328  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35329  if test "x$has_forbidden_chars" != x; then
35330    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35331    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35332    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35333    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35334      # Going to short mode and back again did indeed matter. Since short mode is
35335      # case insensitive, let's make it lowercase to improve readability.
35336      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35337      # Now convert it back to Unix-style (cygpath)
35338      input_path=`$CYGPATH -u "$shortmode_path"`
35339      new_path="$input_path"
35340    fi
35341  fi
35342
35343  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35344  if test "x$test_cygdrive_prefix" = x; then
35345    # As a simple fix, exclude /usr/bin since it's not a real path.
35346    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35347      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35348      # a path prefixed by /cygdrive for fixpath to work.
35349      new_path="$CYGWIN_ROOT_PATH$input_path"
35350    fi
35351  fi
35352
35353  # remove trailing .exe if any
35354  new_path="${new_path/%.exe/}"
35355
35356    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35357
35358  # First separate the path from the arguments. This will split at the first
35359  # space.
35360  complete="$DUMPBIN"
35361  path="${complete%% *}"
35362  tmp="$complete EOL"
35363  arguments="${tmp#* }"
35364
35365  # Input might be given as Windows format, start by converting to
35366  # unix format.
35367  new_path="$path"
35368
35369  windows_path="$new_path"
35370  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35371    unix_path=`$CYGPATH -u "$windows_path"`
35372    new_path="$unix_path"
35373  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35374    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35375    new_path="$unix_path"
35376  fi
35377
35378
35379  # Now try to locate executable using which
35380  new_path=`$WHICH "$new_path" 2> /dev/null`
35381
35382  if test "x$new_path" = x; then
35383    # Oops. Which didn't find the executable.
35384    # The splitting of arguments from the executable at a space might have been incorrect,
35385    # since paths with space are more likely in Windows. Give it another try with the whole
35386    # argument.
35387    path="$complete"
35388    arguments="EOL"
35389    new_path="$path"
35390
35391  windows_path="$new_path"
35392  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35393    unix_path=`$CYGPATH -u "$windows_path"`
35394    new_path="$unix_path"
35395  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35396    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35397    new_path="$unix_path"
35398  fi
35399
35400
35401    new_path=`$WHICH "$new_path" 2> /dev/null`
35402    # bat and cmd files are not always considered executable in MSYS causing which
35403    # to not find them
35404    if test "x$new_path" = x \
35405        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35406        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35407      new_path="$path"
35408
35409  windows_path="$new_path"
35410  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35411    unix_path=`$CYGPATH -u "$windows_path"`
35412    new_path="$unix_path"
35413  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35414    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35415    new_path="$unix_path"
35416  fi
35417
35418    fi
35419
35420    if test "x$new_path" = x; then
35421      # It's still not found. Now this is an unrecoverable error.
35422      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35423$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35424      has_space=`$ECHO "$complete" | $GREP " "`
35425      if test "x$has_space" != x; then
35426        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35427$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35428      fi
35429      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35430    fi
35431  fi
35432
35433  # Now new_path has a complete unix path to the binary
35434  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35435    # Keep paths in /bin as-is, but remove trailing .exe if any
35436    new_path="${new_path/%.exe/}"
35437    # Do not save /bin paths to all_fixpath_prefixes!
35438  else
35439    # Not in mixed or Windows style, start by that.
35440    new_path=`cmd //c echo $new_path`
35441
35442  input_path="$new_path"
35443  # Check if we need to convert this using DOS-style short mode. If the path
35444  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35445  # take no chances and rewrite it.
35446  # Note: m4 eats our [], so we need to use [ and ] instead.
35447  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35448  if test "x$has_forbidden_chars" != x; then
35449    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35450    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35451  fi
35452
35453    # Output is in $new_path
35454
35455  windows_path="$new_path"
35456  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35457    unix_path=`$CYGPATH -u "$windows_path"`
35458    new_path="$unix_path"
35459  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35460    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35461    new_path="$unix_path"
35462  fi
35463
35464    # remove trailing .exe if any
35465    new_path="${new_path/%.exe/}"
35466
35467    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35468    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35469  fi
35470
35471    else
35472      # We're on a unix platform. Hooray! :)
35473      # First separate the path from the arguments. This will split at the first
35474      # space.
35475      complete="$DUMPBIN"
35476      path="${complete%% *}"
35477      tmp="$complete EOL"
35478      arguments="${tmp#* }"
35479
35480      # Cannot rely on the command "which" here since it doesn't always work.
35481      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35482      if test -z "$is_absolute_path"; then
35483        # Path to executable is not absolute. Find it.
35484        IFS_save="$IFS"
35485        IFS=:
35486        for p in $PATH; do
35487          if test -f "$p/$path" && test -x "$p/$path"; then
35488            new_path="$p/$path"
35489            break
35490          fi
35491        done
35492        IFS="$IFS_save"
35493      else
35494        # This is an absolute path, we can use it without further modifications.
35495        new_path="$path"
35496      fi
35497
35498      if test "x$new_path" = x; then
35499        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35500$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35501        has_space=`$ECHO "$complete" | $GREP " "`
35502        if test "x$has_space" != x; then
35503          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35504$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35505        fi
35506        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35507      fi
35508    fi
35509
35510    # Now join together the path and the arguments once again
35511    if test "x$arguments" != xEOL; then
35512      new_complete="$new_path ${arguments% *}"
35513    else
35514      new_complete="$new_path"
35515    fi
35516
35517    if test "x$complete" != "x$new_complete"; then
35518      DUMPBIN="$new_complete"
35519      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
35520$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
35521    fi
35522  fi
35523
35524    # We need to check for 'msbuild.exe' because at the place where we expect to
35525    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
35526    # won't find the 'msbuild.exe' executable in that case (and the
35527    # 'ac_executable_extensions' is unusable due to performance reasons).
35528    # Notice that we intentionally don't fix up the path to MSBUILD because we
35529    # will call it in a DOS shell during freetype detection on Windows (see
35530    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
35531    # Extract the first word of "msbuild.exe", so it can be a program name with args.
35532set dummy msbuild.exe; ac_word=$2
35533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35534$as_echo_n "checking for $ac_word... " >&6; }
35535if ${ac_cv_prog_MSBUILD+:} false; then :
35536  $as_echo_n "(cached) " >&6
35537else
35538  if test -n "$MSBUILD"; then
35539  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
35540else
35541as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35542for as_dir in $PATH
35543do
35544  IFS=$as_save_IFS
35545  test -z "$as_dir" && as_dir=.
35546    for ac_exec_ext in '' $ac_executable_extensions; do
35547  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35548    ac_cv_prog_MSBUILD="msbuild.exe"
35549    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35550    break 2
35551  fi
35552done
35553  done
35554IFS=$as_save_IFS
35555
35556fi
35557fi
35558MSBUILD=$ac_cv_prog_MSBUILD
35559if test -n "$MSBUILD"; then
35560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
35561$as_echo "$MSBUILD" >&6; }
35562else
35563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35564$as_echo "no" >&6; }
35565fi
35566
35567
35568  fi
35569
35570  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
35571
35572
35573  # Publish this variable in the help.
35574
35575
35576  if test "x$STRIP" = x; then
35577    # The variable is not set by user, try to locate tool using the code snippet
35578    for ac_prog in strip
35579do
35580  # Extract the first word of "$ac_prog", so it can be a program name with args.
35581set dummy $ac_prog; ac_word=$2
35582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35583$as_echo_n "checking for $ac_word... " >&6; }
35584if ${ac_cv_path_STRIP+:} false; then :
35585  $as_echo_n "(cached) " >&6
35586else
35587  case $STRIP in
35588  [\\/]* | ?:[\\/]*)
35589  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35590  ;;
35591  *)
35592  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35593for as_dir in $PATH
35594do
35595  IFS=$as_save_IFS
35596  test -z "$as_dir" && as_dir=.
35597    for ac_exec_ext in '' $ac_executable_extensions; do
35598  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35599    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35600    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35601    break 2
35602  fi
35603done
35604  done
35605IFS=$as_save_IFS
35606
35607  ;;
35608esac
35609fi
35610STRIP=$ac_cv_path_STRIP
35611if test -n "$STRIP"; then
35612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35613$as_echo "$STRIP" >&6; }
35614else
35615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35616$as_echo "no" >&6; }
35617fi
35618
35619
35620  test -n "$STRIP" && break
35621done
35622
35623  else
35624    # The variable is set, but is it from the command line or the environment?
35625
35626    # Try to remove the string !STRIP! from our list.
35627    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
35628    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35629      # If it failed, the variable was not from the command line. Ignore it,
35630      # but warn the user (except for BASH, which is always set by the calling BASH).
35631      if test "xSTRIP" != xBASH; then
35632        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
35633$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
35634      fi
35635      # Try to locate tool using the code snippet
35636      for ac_prog in strip
35637do
35638  # Extract the first word of "$ac_prog", so it can be a program name with args.
35639set dummy $ac_prog; ac_word=$2
35640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35641$as_echo_n "checking for $ac_word... " >&6; }
35642if ${ac_cv_path_STRIP+:} false; then :
35643  $as_echo_n "(cached) " >&6
35644else
35645  case $STRIP in
35646  [\\/]* | ?:[\\/]*)
35647  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35648  ;;
35649  *)
35650  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35651for as_dir in $PATH
35652do
35653  IFS=$as_save_IFS
35654  test -z "$as_dir" && as_dir=.
35655    for ac_exec_ext in '' $ac_executable_extensions; do
35656  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35657    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35658    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35659    break 2
35660  fi
35661done
35662  done
35663IFS=$as_save_IFS
35664
35665  ;;
35666esac
35667fi
35668STRIP=$ac_cv_path_STRIP
35669if test -n "$STRIP"; then
35670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35671$as_echo "$STRIP" >&6; }
35672else
35673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35674$as_echo "no" >&6; }
35675fi
35676
35677
35678  test -n "$STRIP" && break
35679done
35680
35681    else
35682      # If it succeeded, then it was overridden by the user. We will use it
35683      # for the tool.
35684
35685      # First remove it from the list of overridden variables, so we can test
35686      # for unknown variables in the end.
35687      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35688
35689      # Check if the provided tool contains a complete path.
35690      tool_specified="$STRIP"
35691      tool_basename="${tool_specified##*/}"
35692      if test "x$tool_basename" = "x$tool_specified"; then
35693        # A command without a complete path is provided, search $PATH.
35694        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
35695$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
35696        # Extract the first word of "$tool_basename", so it can be a program name with args.
35697set dummy $tool_basename; ac_word=$2
35698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35699$as_echo_n "checking for $ac_word... " >&6; }
35700if ${ac_cv_path_STRIP+:} false; then :
35701  $as_echo_n "(cached) " >&6
35702else
35703  case $STRIP in
35704  [\\/]* | ?:[\\/]*)
35705  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35706  ;;
35707  *)
35708  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35709for as_dir in $PATH
35710do
35711  IFS=$as_save_IFS
35712  test -z "$as_dir" && as_dir=.
35713    for ac_exec_ext in '' $ac_executable_extensions; do
35714  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35715    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35716    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35717    break 2
35718  fi
35719done
35720  done
35721IFS=$as_save_IFS
35722
35723  ;;
35724esac
35725fi
35726STRIP=$ac_cv_path_STRIP
35727if test -n "$STRIP"; then
35728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35729$as_echo "$STRIP" >&6; }
35730else
35731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35732$as_echo "no" >&6; }
35733fi
35734
35735
35736        if test "x$STRIP" = x; then
35737          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35738        fi
35739      else
35740        # Otherwise we believe it is a complete path. Use it as it is.
35741        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
35742$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
35743        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
35744$as_echo_n "checking for STRIP... " >&6; }
35745        if test ! -x "$tool_specified"; then
35746          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35747$as_echo "not found" >&6; }
35748          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
35749        fi
35750        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35751$as_echo "$tool_specified" >&6; }
35752      fi
35753    fi
35754  fi
35755
35756
35757
35758  # Only process if variable expands to non-empty
35759
35760  if test "x$STRIP" != x; then
35761    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35762
35763  # First separate the path from the arguments. This will split at the first
35764  # space.
35765  complete="$STRIP"
35766  path="${complete%% *}"
35767  tmp="$complete EOL"
35768  arguments="${tmp#* }"
35769
35770  # Input might be given as Windows format, start by converting to
35771  # unix format.
35772  new_path=`$CYGPATH -u "$path"`
35773
35774  # Now try to locate executable using which
35775  new_path=`$WHICH "$new_path" 2> /dev/null`
35776  # bat and cmd files are not always considered executable in cygwin causing which
35777  # to not find them
35778  if test "x$new_path" = x \
35779      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35780      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35781    new_path=`$CYGPATH -u "$path"`
35782  fi
35783  if test "x$new_path" = x; then
35784    # Oops. Which didn't find the executable.
35785    # The splitting of arguments from the executable at a space might have been incorrect,
35786    # since paths with space are more likely in Windows. Give it another try with the whole
35787    # argument.
35788    path="$complete"
35789    arguments="EOL"
35790    new_path=`$CYGPATH -u "$path"`
35791    new_path=`$WHICH "$new_path" 2> /dev/null`
35792    # bat and cmd files are not always considered executable in cygwin causing which
35793    # to not find them
35794    if test "x$new_path" = x \
35795        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35796        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35797      new_path=`$CYGPATH -u "$path"`
35798    fi
35799    if test "x$new_path" = x; then
35800      # It's still not found. Now this is an unrecoverable error.
35801      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35802$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35803      has_space=`$ECHO "$complete" | $GREP " "`
35804      if test "x$has_space" != x; then
35805        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35806$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35807      fi
35808      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35809    fi
35810  fi
35811
35812  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35813  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35814  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35815  # "foo.exe" is OK but "foo" is an error.
35816  #
35817  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35818  # It is also a way to make sure we got the proper file name for the real test later on.
35819  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35820  if test "x$test_shortpath" = x; then
35821    # Short path failed, file does not exist as specified.
35822    # Try adding .exe or .cmd
35823    if test -f "${new_path}.exe"; then
35824      input_to_shortpath="${new_path}.exe"
35825    elif test -f "${new_path}.cmd"; then
35826      input_to_shortpath="${new_path}.cmd"
35827    else
35828      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
35829$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
35830      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35831$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35832      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35833    fi
35834  else
35835    input_to_shortpath="$new_path"
35836  fi
35837
35838  # Call helper function which possibly converts this using DOS-style short mode.
35839  # If so, the updated path is stored in $new_path.
35840  new_path="$input_to_shortpath"
35841
35842  input_path="$input_to_shortpath"
35843  # Check if we need to convert this using DOS-style short mode. If the path
35844  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35845  # take no chances and rewrite it.
35846  # Note: m4 eats our [], so we need to use [ and ] instead.
35847  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35848  if test "x$has_forbidden_chars" != x; then
35849    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35850    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35851    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35852    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35853      # Going to short mode and back again did indeed matter. Since short mode is
35854      # case insensitive, let's make it lowercase to improve readability.
35855      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35856      # Now convert it back to Unix-style (cygpath)
35857      input_path=`$CYGPATH -u "$shortmode_path"`
35858      new_path="$input_path"
35859    fi
35860  fi
35861
35862  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35863  if test "x$test_cygdrive_prefix" = x; then
35864    # As a simple fix, exclude /usr/bin since it's not a real path.
35865    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35866      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35867      # a path prefixed by /cygdrive for fixpath to work.
35868      new_path="$CYGWIN_ROOT_PATH$input_path"
35869    fi
35870  fi
35871
35872  # remove trailing .exe if any
35873  new_path="${new_path/%.exe/}"
35874
35875    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35876
35877  # First separate the path from the arguments. This will split at the first
35878  # space.
35879  complete="$STRIP"
35880  path="${complete%% *}"
35881  tmp="$complete EOL"
35882  arguments="${tmp#* }"
35883
35884  # Input might be given as Windows format, start by converting to
35885  # unix format.
35886  new_path="$path"
35887
35888  windows_path="$new_path"
35889  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35890    unix_path=`$CYGPATH -u "$windows_path"`
35891    new_path="$unix_path"
35892  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35893    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35894    new_path="$unix_path"
35895  fi
35896
35897
35898  # Now try to locate executable using which
35899  new_path=`$WHICH "$new_path" 2> /dev/null`
35900
35901  if test "x$new_path" = x; then
35902    # Oops. Which didn't find the executable.
35903    # The splitting of arguments from the executable at a space might have been incorrect,
35904    # since paths with space are more likely in Windows. Give it another try with the whole
35905    # argument.
35906    path="$complete"
35907    arguments="EOL"
35908    new_path="$path"
35909
35910  windows_path="$new_path"
35911  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35912    unix_path=`$CYGPATH -u "$windows_path"`
35913    new_path="$unix_path"
35914  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35915    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35916    new_path="$unix_path"
35917  fi
35918
35919
35920    new_path=`$WHICH "$new_path" 2> /dev/null`
35921    # bat and cmd files are not always considered executable in MSYS causing which
35922    # to not find them
35923    if test "x$new_path" = x \
35924        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35925        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35926      new_path="$path"
35927
35928  windows_path="$new_path"
35929  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35930    unix_path=`$CYGPATH -u "$windows_path"`
35931    new_path="$unix_path"
35932  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35933    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35934    new_path="$unix_path"
35935  fi
35936
35937    fi
35938
35939    if test "x$new_path" = x; then
35940      # It's still not found. Now this is an unrecoverable error.
35941      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35942$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35943      has_space=`$ECHO "$complete" | $GREP " "`
35944      if test "x$has_space" != x; then
35945        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35946$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35947      fi
35948      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35949    fi
35950  fi
35951
35952  # Now new_path has a complete unix path to the binary
35953  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35954    # Keep paths in /bin as-is, but remove trailing .exe if any
35955    new_path="${new_path/%.exe/}"
35956    # Do not save /bin paths to all_fixpath_prefixes!
35957  else
35958    # Not in mixed or Windows style, start by that.
35959    new_path=`cmd //c echo $new_path`
35960
35961  input_path="$new_path"
35962  # Check if we need to convert this using DOS-style short mode. If the path
35963  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35964  # take no chances and rewrite it.
35965  # Note: m4 eats our [], so we need to use [ and ] instead.
35966  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35967  if test "x$has_forbidden_chars" != x; then
35968    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35969    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35970  fi
35971
35972    # Output is in $new_path
35973
35974  windows_path="$new_path"
35975  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35976    unix_path=`$CYGPATH -u "$windows_path"`
35977    new_path="$unix_path"
35978  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35979    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35980    new_path="$unix_path"
35981  fi
35982
35983    # remove trailing .exe if any
35984    new_path="${new_path/%.exe/}"
35985
35986    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35987    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35988  fi
35989
35990    else
35991      # We're on a unix platform. Hooray! :)
35992      # First separate the path from the arguments. This will split at the first
35993      # space.
35994      complete="$STRIP"
35995      path="${complete%% *}"
35996      tmp="$complete EOL"
35997      arguments="${tmp#* }"
35998
35999      # Cannot rely on the command "which" here since it doesn't always work.
36000      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36001      if test -z "$is_absolute_path"; then
36002        # Path to executable is not absolute. Find it.
36003        IFS_save="$IFS"
36004        IFS=:
36005        for p in $PATH; do
36006          if test -f "$p/$path" && test -x "$p/$path"; then
36007            new_path="$p/$path"
36008            break
36009          fi
36010        done
36011        IFS="$IFS_save"
36012      else
36013        # This is an absolute path, we can use it without further modifications.
36014        new_path="$path"
36015      fi
36016
36017      if test "x$new_path" = x; then
36018        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
36019$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
36020        has_space=`$ECHO "$complete" | $GREP " "`
36021        if test "x$has_space" != x; then
36022          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36023$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36024        fi
36025        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36026      fi
36027    fi
36028
36029    # Now join together the path and the arguments once again
36030    if test "x$arguments" != xEOL; then
36031      new_complete="$new_path ${arguments% *}"
36032    else
36033      new_complete="$new_path"
36034    fi
36035
36036    if test "x$complete" != "x$new_complete"; then
36037      STRIP="$new_complete"
36038      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
36039$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
36040    fi
36041  fi
36042
36043
36044
36045  # Publish this variable in the help.
36046
36047
36048  if test "x$NM" = x; then
36049    # The variable is not set by user, try to locate tool using the code snippet
36050    for ac_prog in nm
36051do
36052  # Extract the first word of "$ac_prog", so it can be a program name with args.
36053set dummy $ac_prog; ac_word=$2
36054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36055$as_echo_n "checking for $ac_word... " >&6; }
36056if ${ac_cv_path_NM+:} false; then :
36057  $as_echo_n "(cached) " >&6
36058else
36059  case $NM in
36060  [\\/]* | ?:[\\/]*)
36061  ac_cv_path_NM="$NM" # Let the user override the test with a path.
36062  ;;
36063  *)
36064  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36065for as_dir in $PATH
36066do
36067  IFS=$as_save_IFS
36068  test -z "$as_dir" && as_dir=.
36069    for ac_exec_ext in '' $ac_executable_extensions; do
36070  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36071    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
36072    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36073    break 2
36074  fi
36075done
36076  done
36077IFS=$as_save_IFS
36078
36079  ;;
36080esac
36081fi
36082NM=$ac_cv_path_NM
36083if test -n "$NM"; then
36084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
36085$as_echo "$NM" >&6; }
36086else
36087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36088$as_echo "no" >&6; }
36089fi
36090
36091
36092  test -n "$NM" && break
36093done
36094
36095  else
36096    # The variable is set, but is it from the command line or the environment?
36097
36098    # Try to remove the string !NM! from our list.
36099    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
36100    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36101      # If it failed, the variable was not from the command line. Ignore it,
36102      # but warn the user (except for BASH, which is always set by the calling BASH).
36103      if test "xNM" != xBASH; then
36104        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
36105$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
36106      fi
36107      # Try to locate tool using the code snippet
36108      for ac_prog in nm
36109do
36110  # Extract the first word of "$ac_prog", so it can be a program name with args.
36111set dummy $ac_prog; ac_word=$2
36112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36113$as_echo_n "checking for $ac_word... " >&6; }
36114if ${ac_cv_path_NM+:} false; then :
36115  $as_echo_n "(cached) " >&6
36116else
36117  case $NM in
36118  [\\/]* | ?:[\\/]*)
36119  ac_cv_path_NM="$NM" # Let the user override the test with a path.
36120  ;;
36121  *)
36122  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36123for as_dir in $PATH
36124do
36125  IFS=$as_save_IFS
36126  test -z "$as_dir" && as_dir=.
36127    for ac_exec_ext in '' $ac_executable_extensions; do
36128  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36129    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
36130    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36131    break 2
36132  fi
36133done
36134  done
36135IFS=$as_save_IFS
36136
36137  ;;
36138esac
36139fi
36140NM=$ac_cv_path_NM
36141if test -n "$NM"; then
36142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
36143$as_echo "$NM" >&6; }
36144else
36145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36146$as_echo "no" >&6; }
36147fi
36148
36149
36150  test -n "$NM" && break
36151done
36152
36153    else
36154      # If it succeeded, then it was overridden by the user. We will use it
36155      # for the tool.
36156
36157      # First remove it from the list of overridden variables, so we can test
36158      # for unknown variables in the end.
36159      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36160
36161      # Check if the provided tool contains a complete path.
36162      tool_specified="$NM"
36163      tool_basename="${tool_specified##*/}"
36164      if test "x$tool_basename" = "x$tool_specified"; then
36165        # A command without a complete path is provided, search $PATH.
36166        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
36167$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
36168        # Extract the first word of "$tool_basename", so it can be a program name with args.
36169set dummy $tool_basename; ac_word=$2
36170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36171$as_echo_n "checking for $ac_word... " >&6; }
36172if ${ac_cv_path_NM+:} false; then :
36173  $as_echo_n "(cached) " >&6
36174else
36175  case $NM in
36176  [\\/]* | ?:[\\/]*)
36177  ac_cv_path_NM="$NM" # Let the user override the test with a path.
36178  ;;
36179  *)
36180  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36181for as_dir in $PATH
36182do
36183  IFS=$as_save_IFS
36184  test -z "$as_dir" && as_dir=.
36185    for ac_exec_ext in '' $ac_executable_extensions; do
36186  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36187    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
36188    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36189    break 2
36190  fi
36191done
36192  done
36193IFS=$as_save_IFS
36194
36195  ;;
36196esac
36197fi
36198NM=$ac_cv_path_NM
36199if test -n "$NM"; then
36200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
36201$as_echo "$NM" >&6; }
36202else
36203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36204$as_echo "no" >&6; }
36205fi
36206
36207
36208        if test "x$NM" = x; then
36209          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36210        fi
36211      else
36212        # Otherwise we believe it is a complete path. Use it as it is.
36213        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
36214$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
36215        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
36216$as_echo_n "checking for NM... " >&6; }
36217        if test ! -x "$tool_specified"; then
36218          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36219$as_echo "not found" >&6; }
36220          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
36221        fi
36222        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36223$as_echo "$tool_specified" >&6; }
36224      fi
36225    fi
36226  fi
36227
36228
36229
36230  # Only process if variable expands to non-empty
36231
36232  if test "x$NM" != x; then
36233    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36234
36235  # First separate the path from the arguments. This will split at the first
36236  # space.
36237  complete="$NM"
36238  path="${complete%% *}"
36239  tmp="$complete EOL"
36240  arguments="${tmp#* }"
36241
36242  # Input might be given as Windows format, start by converting to
36243  # unix format.
36244  new_path=`$CYGPATH -u "$path"`
36245
36246  # Now try to locate executable using which
36247  new_path=`$WHICH "$new_path" 2> /dev/null`
36248  # bat and cmd files are not always considered executable in cygwin causing which
36249  # to not find them
36250  if test "x$new_path" = x \
36251      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36252      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36253    new_path=`$CYGPATH -u "$path"`
36254  fi
36255  if test "x$new_path" = x; then
36256    # Oops. Which didn't find the executable.
36257    # The splitting of arguments from the executable at a space might have been incorrect,
36258    # since paths with space are more likely in Windows. Give it another try with the whole
36259    # argument.
36260    path="$complete"
36261    arguments="EOL"
36262    new_path=`$CYGPATH -u "$path"`
36263    new_path=`$WHICH "$new_path" 2> /dev/null`
36264    # bat and cmd files are not always considered executable in cygwin causing which
36265    # to not find them
36266    if test "x$new_path" = x \
36267        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36268        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36269      new_path=`$CYGPATH -u "$path"`
36270    fi
36271    if test "x$new_path" = x; then
36272      # It's still not found. Now this is an unrecoverable error.
36273      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36274$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36275      has_space=`$ECHO "$complete" | $GREP " "`
36276      if test "x$has_space" != x; then
36277        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36278$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36279      fi
36280      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36281    fi
36282  fi
36283
36284  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36285  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36286  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36287  # "foo.exe" is OK but "foo" is an error.
36288  #
36289  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36290  # It is also a way to make sure we got the proper file name for the real test later on.
36291  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36292  if test "x$test_shortpath" = x; then
36293    # Short path failed, file does not exist as specified.
36294    # Try adding .exe or .cmd
36295    if test -f "${new_path}.exe"; then
36296      input_to_shortpath="${new_path}.exe"
36297    elif test -f "${new_path}.cmd"; then
36298      input_to_shortpath="${new_path}.cmd"
36299    else
36300      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
36301$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
36302      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36303$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36304      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36305    fi
36306  else
36307    input_to_shortpath="$new_path"
36308  fi
36309
36310  # Call helper function which possibly converts this using DOS-style short mode.
36311  # If so, the updated path is stored in $new_path.
36312  new_path="$input_to_shortpath"
36313
36314  input_path="$input_to_shortpath"
36315  # Check if we need to convert this using DOS-style short mode. If the path
36316  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36317  # take no chances and rewrite it.
36318  # Note: m4 eats our [], so we need to use [ and ] instead.
36319  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36320  if test "x$has_forbidden_chars" != x; then
36321    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36322    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36323    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36324    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36325      # Going to short mode and back again did indeed matter. Since short mode is
36326      # case insensitive, let's make it lowercase to improve readability.
36327      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36328      # Now convert it back to Unix-style (cygpath)
36329      input_path=`$CYGPATH -u "$shortmode_path"`
36330      new_path="$input_path"
36331    fi
36332  fi
36333
36334  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36335  if test "x$test_cygdrive_prefix" = x; then
36336    # As a simple fix, exclude /usr/bin since it's not a real path.
36337    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36338      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36339      # a path prefixed by /cygdrive for fixpath to work.
36340      new_path="$CYGWIN_ROOT_PATH$input_path"
36341    fi
36342  fi
36343
36344  # remove trailing .exe if any
36345  new_path="${new_path/%.exe/}"
36346
36347    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36348
36349  # First separate the path from the arguments. This will split at the first
36350  # space.
36351  complete="$NM"
36352  path="${complete%% *}"
36353  tmp="$complete EOL"
36354  arguments="${tmp#* }"
36355
36356  # Input might be given as Windows format, start by converting to
36357  # unix format.
36358  new_path="$path"
36359
36360  windows_path="$new_path"
36361  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36362    unix_path=`$CYGPATH -u "$windows_path"`
36363    new_path="$unix_path"
36364  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36365    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36366    new_path="$unix_path"
36367  fi
36368
36369
36370  # Now try to locate executable using which
36371  new_path=`$WHICH "$new_path" 2> /dev/null`
36372
36373  if test "x$new_path" = x; then
36374    # Oops. Which didn't find the executable.
36375    # The splitting of arguments from the executable at a space might have been incorrect,
36376    # since paths with space are more likely in Windows. Give it another try with the whole
36377    # argument.
36378    path="$complete"
36379    arguments="EOL"
36380    new_path="$path"
36381
36382  windows_path="$new_path"
36383  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36384    unix_path=`$CYGPATH -u "$windows_path"`
36385    new_path="$unix_path"
36386  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36387    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36388    new_path="$unix_path"
36389  fi
36390
36391
36392    new_path=`$WHICH "$new_path" 2> /dev/null`
36393    # bat and cmd files are not always considered executable in MSYS causing which
36394    # to not find them
36395    if test "x$new_path" = x \
36396        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36397        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36398      new_path="$path"
36399
36400  windows_path="$new_path"
36401  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36402    unix_path=`$CYGPATH -u "$windows_path"`
36403    new_path="$unix_path"
36404  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36405    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36406    new_path="$unix_path"
36407  fi
36408
36409    fi
36410
36411    if test "x$new_path" = x; then
36412      # It's still not found. Now this is an unrecoverable error.
36413      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36414$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36415      has_space=`$ECHO "$complete" | $GREP " "`
36416      if test "x$has_space" != x; then
36417        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36418$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36419      fi
36420      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36421    fi
36422  fi
36423
36424  # Now new_path has a complete unix path to the binary
36425  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36426    # Keep paths in /bin as-is, but remove trailing .exe if any
36427    new_path="${new_path/%.exe/}"
36428    # Do not save /bin paths to all_fixpath_prefixes!
36429  else
36430    # Not in mixed or Windows style, start by that.
36431    new_path=`cmd //c echo $new_path`
36432
36433  input_path="$new_path"
36434  # Check if we need to convert this using DOS-style short mode. If the path
36435  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36436  # take no chances and rewrite it.
36437  # Note: m4 eats our [], so we need to use [ and ] instead.
36438  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36439  if test "x$has_forbidden_chars" != x; then
36440    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36441    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36442  fi
36443
36444    # Output is in $new_path
36445
36446  windows_path="$new_path"
36447  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36448    unix_path=`$CYGPATH -u "$windows_path"`
36449    new_path="$unix_path"
36450  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36451    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36452    new_path="$unix_path"
36453  fi
36454
36455    # remove trailing .exe if any
36456    new_path="${new_path/%.exe/}"
36457
36458    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36459    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36460  fi
36461
36462    else
36463      # We're on a unix platform. Hooray! :)
36464      # First separate the path from the arguments. This will split at the first
36465      # space.
36466      complete="$NM"
36467      path="${complete%% *}"
36468      tmp="$complete EOL"
36469      arguments="${tmp#* }"
36470
36471      # Cannot rely on the command "which" here since it doesn't always work.
36472      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36473      if test -z "$is_absolute_path"; then
36474        # Path to executable is not absolute. Find it.
36475        IFS_save="$IFS"
36476        IFS=:
36477        for p in $PATH; do
36478          if test -f "$p/$path" && test -x "$p/$path"; then
36479            new_path="$p/$path"
36480            break
36481          fi
36482        done
36483        IFS="$IFS_save"
36484      else
36485        # This is an absolute path, we can use it without further modifications.
36486        new_path="$path"
36487      fi
36488
36489      if test "x$new_path" = x; then
36490        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36491$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36492        has_space=`$ECHO "$complete" | $GREP " "`
36493        if test "x$has_space" != x; then
36494          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36495$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36496        fi
36497        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36498      fi
36499    fi
36500
36501    # Now join together the path and the arguments once again
36502    if test "x$arguments" != xEOL; then
36503      new_complete="$new_path ${arguments% *}"
36504    else
36505      new_complete="$new_path"
36506    fi
36507
36508    if test "x$complete" != "x$new_complete"; then
36509      NM="$new_complete"
36510      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
36511$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
36512    fi
36513  fi
36514
36515
36516
36517  # Publish this variable in the help.
36518
36519
36520  if test "x$GNM" = x; then
36521    # The variable is not set by user, try to locate tool using the code snippet
36522    for ac_prog in gnm
36523do
36524  # Extract the first word of "$ac_prog", so it can be a program name with args.
36525set dummy $ac_prog; ac_word=$2
36526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36527$as_echo_n "checking for $ac_word... " >&6; }
36528if ${ac_cv_path_GNM+:} false; then :
36529  $as_echo_n "(cached) " >&6
36530else
36531  case $GNM in
36532  [\\/]* | ?:[\\/]*)
36533  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36534  ;;
36535  *)
36536  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36537for as_dir in $PATH
36538do
36539  IFS=$as_save_IFS
36540  test -z "$as_dir" && as_dir=.
36541    for ac_exec_ext in '' $ac_executable_extensions; do
36542  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36543    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36544    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36545    break 2
36546  fi
36547done
36548  done
36549IFS=$as_save_IFS
36550
36551  ;;
36552esac
36553fi
36554GNM=$ac_cv_path_GNM
36555if test -n "$GNM"; then
36556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36557$as_echo "$GNM" >&6; }
36558else
36559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36560$as_echo "no" >&6; }
36561fi
36562
36563
36564  test -n "$GNM" && break
36565done
36566
36567  else
36568    # The variable is set, but is it from the command line or the environment?
36569
36570    # Try to remove the string !GNM! from our list.
36571    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
36572    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36573      # If it failed, the variable was not from the command line. Ignore it,
36574      # but warn the user (except for BASH, which is always set by the calling BASH).
36575      if test "xGNM" != xBASH; then
36576        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
36577$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
36578      fi
36579      # Try to locate tool using the code snippet
36580      for ac_prog in gnm
36581do
36582  # Extract the first word of "$ac_prog", so it can be a program name with args.
36583set dummy $ac_prog; ac_word=$2
36584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36585$as_echo_n "checking for $ac_word... " >&6; }
36586if ${ac_cv_path_GNM+:} false; then :
36587  $as_echo_n "(cached) " >&6
36588else
36589  case $GNM in
36590  [\\/]* | ?:[\\/]*)
36591  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36592  ;;
36593  *)
36594  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36595for as_dir in $PATH
36596do
36597  IFS=$as_save_IFS
36598  test -z "$as_dir" && as_dir=.
36599    for ac_exec_ext in '' $ac_executable_extensions; do
36600  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36601    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36602    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36603    break 2
36604  fi
36605done
36606  done
36607IFS=$as_save_IFS
36608
36609  ;;
36610esac
36611fi
36612GNM=$ac_cv_path_GNM
36613if test -n "$GNM"; then
36614  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36615$as_echo "$GNM" >&6; }
36616else
36617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36618$as_echo "no" >&6; }
36619fi
36620
36621
36622  test -n "$GNM" && break
36623done
36624
36625    else
36626      # If it succeeded, then it was overridden by the user. We will use it
36627      # for the tool.
36628
36629      # First remove it from the list of overridden variables, so we can test
36630      # for unknown variables in the end.
36631      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36632
36633      # Check if the provided tool contains a complete path.
36634      tool_specified="$GNM"
36635      tool_basename="${tool_specified##*/}"
36636      if test "x$tool_basename" = "x$tool_specified"; then
36637        # A command without a complete path is provided, search $PATH.
36638        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
36639$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
36640        # Extract the first word of "$tool_basename", so it can be a program name with args.
36641set dummy $tool_basename; ac_word=$2
36642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36643$as_echo_n "checking for $ac_word... " >&6; }
36644if ${ac_cv_path_GNM+:} false; then :
36645  $as_echo_n "(cached) " >&6
36646else
36647  case $GNM in
36648  [\\/]* | ?:[\\/]*)
36649  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36650  ;;
36651  *)
36652  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36653for as_dir in $PATH
36654do
36655  IFS=$as_save_IFS
36656  test -z "$as_dir" && as_dir=.
36657    for ac_exec_ext in '' $ac_executable_extensions; do
36658  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36659    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36660    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36661    break 2
36662  fi
36663done
36664  done
36665IFS=$as_save_IFS
36666
36667  ;;
36668esac
36669fi
36670GNM=$ac_cv_path_GNM
36671if test -n "$GNM"; then
36672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36673$as_echo "$GNM" >&6; }
36674else
36675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36676$as_echo "no" >&6; }
36677fi
36678
36679
36680        if test "x$GNM" = x; then
36681          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36682        fi
36683      else
36684        # Otherwise we believe it is a complete path. Use it as it is.
36685        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
36686$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
36687        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
36688$as_echo_n "checking for GNM... " >&6; }
36689        if test ! -x "$tool_specified"; then
36690          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36691$as_echo "not found" >&6; }
36692          as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
36693        fi
36694        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36695$as_echo "$tool_specified" >&6; }
36696      fi
36697    fi
36698  fi
36699
36700
36701
36702  # Only process if variable expands to non-empty
36703
36704  if test "x$GNM" != x; then
36705    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36706
36707  # First separate the path from the arguments. This will split at the first
36708  # space.
36709  complete="$GNM"
36710  path="${complete%% *}"
36711  tmp="$complete EOL"
36712  arguments="${tmp#* }"
36713
36714  # Input might be given as Windows format, start by converting to
36715  # unix format.
36716  new_path=`$CYGPATH -u "$path"`
36717
36718  # Now try to locate executable using which
36719  new_path=`$WHICH "$new_path" 2> /dev/null`
36720  # bat and cmd files are not always considered executable in cygwin causing which
36721  # to not find them
36722  if test "x$new_path" = x \
36723      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36724      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36725    new_path=`$CYGPATH -u "$path"`
36726  fi
36727  if test "x$new_path" = x; then
36728    # Oops. Which didn't find the executable.
36729    # The splitting of arguments from the executable at a space might have been incorrect,
36730    # since paths with space are more likely in Windows. Give it another try with the whole
36731    # argument.
36732    path="$complete"
36733    arguments="EOL"
36734    new_path=`$CYGPATH -u "$path"`
36735    new_path=`$WHICH "$new_path" 2> /dev/null`
36736    # bat and cmd files are not always considered executable in cygwin causing which
36737    # to not find them
36738    if test "x$new_path" = x \
36739        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36740        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36741      new_path=`$CYGPATH -u "$path"`
36742    fi
36743    if test "x$new_path" = x; then
36744      # It's still not found. Now this is an unrecoverable error.
36745      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36746$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36747      has_space=`$ECHO "$complete" | $GREP " "`
36748      if test "x$has_space" != x; then
36749        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36750$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36751      fi
36752      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36753    fi
36754  fi
36755
36756  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36757  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36758  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36759  # "foo.exe" is OK but "foo" is an error.
36760  #
36761  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36762  # It is also a way to make sure we got the proper file name for the real test later on.
36763  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36764  if test "x$test_shortpath" = x; then
36765    # Short path failed, file does not exist as specified.
36766    # Try adding .exe or .cmd
36767    if test -f "${new_path}.exe"; then
36768      input_to_shortpath="${new_path}.exe"
36769    elif test -f "${new_path}.cmd"; then
36770      input_to_shortpath="${new_path}.cmd"
36771    else
36772      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
36773$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
36774      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36775$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36776      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36777    fi
36778  else
36779    input_to_shortpath="$new_path"
36780  fi
36781
36782  # Call helper function which possibly converts this using DOS-style short mode.
36783  # If so, the updated path is stored in $new_path.
36784  new_path="$input_to_shortpath"
36785
36786  input_path="$input_to_shortpath"
36787  # Check if we need to convert this using DOS-style short mode. If the path
36788  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36789  # take no chances and rewrite it.
36790  # Note: m4 eats our [], so we need to use [ and ] instead.
36791  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36792  if test "x$has_forbidden_chars" != x; then
36793    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36794    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36795    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36796    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36797      # Going to short mode and back again did indeed matter. Since short mode is
36798      # case insensitive, let's make it lowercase to improve readability.
36799      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36800      # Now convert it back to Unix-style (cygpath)
36801      input_path=`$CYGPATH -u "$shortmode_path"`
36802      new_path="$input_path"
36803    fi
36804  fi
36805
36806  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36807  if test "x$test_cygdrive_prefix" = x; then
36808    # As a simple fix, exclude /usr/bin since it's not a real path.
36809    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36810      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36811      # a path prefixed by /cygdrive for fixpath to work.
36812      new_path="$CYGWIN_ROOT_PATH$input_path"
36813    fi
36814  fi
36815
36816  # remove trailing .exe if any
36817  new_path="${new_path/%.exe/}"
36818
36819    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36820
36821  # First separate the path from the arguments. This will split at the first
36822  # space.
36823  complete="$GNM"
36824  path="${complete%% *}"
36825  tmp="$complete EOL"
36826  arguments="${tmp#* }"
36827
36828  # Input might be given as Windows format, start by converting to
36829  # unix format.
36830  new_path="$path"
36831
36832  windows_path="$new_path"
36833  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36834    unix_path=`$CYGPATH -u "$windows_path"`
36835    new_path="$unix_path"
36836  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36837    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36838    new_path="$unix_path"
36839  fi
36840
36841
36842  # Now try to locate executable using which
36843  new_path=`$WHICH "$new_path" 2> /dev/null`
36844
36845  if test "x$new_path" = x; then
36846    # Oops. Which didn't find the executable.
36847    # The splitting of arguments from the executable at a space might have been incorrect,
36848    # since paths with space are more likely in Windows. Give it another try with the whole
36849    # argument.
36850    path="$complete"
36851    arguments="EOL"
36852    new_path="$path"
36853
36854  windows_path="$new_path"
36855  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36856    unix_path=`$CYGPATH -u "$windows_path"`
36857    new_path="$unix_path"
36858  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36859    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36860    new_path="$unix_path"
36861  fi
36862
36863
36864    new_path=`$WHICH "$new_path" 2> /dev/null`
36865    # bat and cmd files are not always considered executable in MSYS causing which
36866    # to not find them
36867    if test "x$new_path" = x \
36868        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36869        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36870      new_path="$path"
36871
36872  windows_path="$new_path"
36873  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36874    unix_path=`$CYGPATH -u "$windows_path"`
36875    new_path="$unix_path"
36876  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36877    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36878    new_path="$unix_path"
36879  fi
36880
36881    fi
36882
36883    if test "x$new_path" = x; then
36884      # It's still not found. Now this is an unrecoverable error.
36885      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36886$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36887      has_space=`$ECHO "$complete" | $GREP " "`
36888      if test "x$has_space" != x; then
36889        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36890$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36891      fi
36892      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36893    fi
36894  fi
36895
36896  # Now new_path has a complete unix path to the binary
36897  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36898    # Keep paths in /bin as-is, but remove trailing .exe if any
36899    new_path="${new_path/%.exe/}"
36900    # Do not save /bin paths to all_fixpath_prefixes!
36901  else
36902    # Not in mixed or Windows style, start by that.
36903    new_path=`cmd //c echo $new_path`
36904
36905  input_path="$new_path"
36906  # Check if we need to convert this using DOS-style short mode. If the path
36907  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36908  # take no chances and rewrite it.
36909  # Note: m4 eats our [], so we need to use [ and ] instead.
36910  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36911  if test "x$has_forbidden_chars" != x; then
36912    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36913    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36914  fi
36915
36916    # Output is in $new_path
36917
36918  windows_path="$new_path"
36919  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36920    unix_path=`$CYGPATH -u "$windows_path"`
36921    new_path="$unix_path"
36922  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36923    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36924    new_path="$unix_path"
36925  fi
36926
36927    # remove trailing .exe if any
36928    new_path="${new_path/%.exe/}"
36929
36930    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36931    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36932  fi
36933
36934    else
36935      # We're on a unix platform. Hooray! :)
36936      # First separate the path from the arguments. This will split at the first
36937      # space.
36938      complete="$GNM"
36939      path="${complete%% *}"
36940      tmp="$complete EOL"
36941      arguments="${tmp#* }"
36942
36943      # Cannot rely on the command "which" here since it doesn't always work.
36944      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36945      if test -z "$is_absolute_path"; then
36946        # Path to executable is not absolute. Find it.
36947        IFS_save="$IFS"
36948        IFS=:
36949        for p in $PATH; do
36950          if test -f "$p/$path" && test -x "$p/$path"; then
36951            new_path="$p/$path"
36952            break
36953          fi
36954        done
36955        IFS="$IFS_save"
36956      else
36957        # This is an absolute path, we can use it without further modifications.
36958        new_path="$path"
36959      fi
36960
36961      if test "x$new_path" = x; then
36962        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36963$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36964        has_space=`$ECHO "$complete" | $GREP " "`
36965        if test "x$has_space" != x; then
36966          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36967$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36968        fi
36969        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36970      fi
36971    fi
36972
36973    # Now join together the path and the arguments once again
36974    if test "x$arguments" != xEOL; then
36975      new_complete="$new_path ${arguments% *}"
36976    else
36977      new_complete="$new_path"
36978    fi
36979
36980    if test "x$complete" != "x$new_complete"; then
36981      GNM="$new_complete"
36982      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
36983$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
36984    fi
36985  fi
36986
36987  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
36988    # FIXME: we should unify this with the solaris case above.
36989
36990
36991  # Publish this variable in the help.
36992
36993
36994  if test "x$STRIP" = x; then
36995    # The variable is not set by user, try to locate tool using the code snippet
36996    if test -n "$ac_tool_prefix"; then
36997  for ac_prog in strip
36998  do
36999    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37000set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37002$as_echo_n "checking for $ac_word... " >&6; }
37003if ${ac_cv_prog_STRIP+:} false; then :
37004  $as_echo_n "(cached) " >&6
37005else
37006  if test -n "$STRIP"; then
37007  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
37008else
37009as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37010for as_dir in $PATH
37011do
37012  IFS=$as_save_IFS
37013  test -z "$as_dir" && as_dir=.
37014    for ac_exec_ext in '' $ac_executable_extensions; do
37015  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37016    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
37017    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37018    break 2
37019  fi
37020done
37021  done
37022IFS=$as_save_IFS
37023
37024fi
37025fi
37026STRIP=$ac_cv_prog_STRIP
37027if test -n "$STRIP"; then
37028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37029$as_echo "$STRIP" >&6; }
37030else
37031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37032$as_echo "no" >&6; }
37033fi
37034
37035
37036    test -n "$STRIP" && break
37037  done
37038fi
37039if test -z "$STRIP"; then
37040  ac_ct_STRIP=$STRIP
37041  for ac_prog in strip
37042do
37043  # Extract the first word of "$ac_prog", so it can be a program name with args.
37044set dummy $ac_prog; ac_word=$2
37045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37046$as_echo_n "checking for $ac_word... " >&6; }
37047if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
37048  $as_echo_n "(cached) " >&6
37049else
37050  if test -n "$ac_ct_STRIP"; then
37051  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
37052else
37053as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37054for as_dir in $PATH
37055do
37056  IFS=$as_save_IFS
37057  test -z "$as_dir" && as_dir=.
37058    for ac_exec_ext in '' $ac_executable_extensions; do
37059  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37060    ac_cv_prog_ac_ct_STRIP="$ac_prog"
37061    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37062    break 2
37063  fi
37064done
37065  done
37066IFS=$as_save_IFS
37067
37068fi
37069fi
37070ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
37071if test -n "$ac_ct_STRIP"; then
37072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
37073$as_echo "$ac_ct_STRIP" >&6; }
37074else
37075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37076$as_echo "no" >&6; }
37077fi
37078
37079
37080  test -n "$ac_ct_STRIP" && break
37081done
37082
37083  if test "x$ac_ct_STRIP" = x; then
37084    STRIP=""
37085  else
37086    case $cross_compiling:$ac_tool_warned in
37087yes:)
37088{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37089$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37090ac_tool_warned=yes ;;
37091esac
37092    STRIP=$ac_ct_STRIP
37093  fi
37094fi
37095
37096  else
37097    # The variable is set, but is it from the command line or the environment?
37098
37099    # Try to remove the string !STRIP! from our list.
37100    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
37101    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37102      # If it failed, the variable was not from the command line. Ignore it,
37103      # but warn the user (except for BASH, which is always set by the calling BASH).
37104      if test "xSTRIP" != xBASH; then
37105        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
37106$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
37107      fi
37108      # Try to locate tool using the code snippet
37109      if test -n "$ac_tool_prefix"; then
37110  for ac_prog in strip
37111  do
37112    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37113set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37115$as_echo_n "checking for $ac_word... " >&6; }
37116if ${ac_cv_prog_STRIP+:} false; then :
37117  $as_echo_n "(cached) " >&6
37118else
37119  if test -n "$STRIP"; then
37120  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
37121else
37122as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37123for as_dir in $PATH
37124do
37125  IFS=$as_save_IFS
37126  test -z "$as_dir" && as_dir=.
37127    for ac_exec_ext in '' $ac_executable_extensions; do
37128  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37129    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
37130    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37131    break 2
37132  fi
37133done
37134  done
37135IFS=$as_save_IFS
37136
37137fi
37138fi
37139STRIP=$ac_cv_prog_STRIP
37140if test -n "$STRIP"; then
37141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37142$as_echo "$STRIP" >&6; }
37143else
37144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37145$as_echo "no" >&6; }
37146fi
37147
37148
37149    test -n "$STRIP" && break
37150  done
37151fi
37152if test -z "$STRIP"; then
37153  ac_ct_STRIP=$STRIP
37154  for ac_prog in strip
37155do
37156  # Extract the first word of "$ac_prog", so it can be a program name with args.
37157set dummy $ac_prog; ac_word=$2
37158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37159$as_echo_n "checking for $ac_word... " >&6; }
37160if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
37161  $as_echo_n "(cached) " >&6
37162else
37163  if test -n "$ac_ct_STRIP"; then
37164  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
37165else
37166as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37167for as_dir in $PATH
37168do
37169  IFS=$as_save_IFS
37170  test -z "$as_dir" && as_dir=.
37171    for ac_exec_ext in '' $ac_executable_extensions; do
37172  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37173    ac_cv_prog_ac_ct_STRIP="$ac_prog"
37174    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37175    break 2
37176  fi
37177done
37178  done
37179IFS=$as_save_IFS
37180
37181fi
37182fi
37183ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
37184if test -n "$ac_ct_STRIP"; then
37185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
37186$as_echo "$ac_ct_STRIP" >&6; }
37187else
37188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37189$as_echo "no" >&6; }
37190fi
37191
37192
37193  test -n "$ac_ct_STRIP" && break
37194done
37195
37196  if test "x$ac_ct_STRIP" = x; then
37197    STRIP=""
37198  else
37199    case $cross_compiling:$ac_tool_warned in
37200yes:)
37201{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37202$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37203ac_tool_warned=yes ;;
37204esac
37205    STRIP=$ac_ct_STRIP
37206  fi
37207fi
37208
37209    else
37210      # If it succeeded, then it was overridden by the user. We will use it
37211      # for the tool.
37212
37213      # First remove it from the list of overridden variables, so we can test
37214      # for unknown variables in the end.
37215      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37216
37217      # Check if the provided tool contains a complete path.
37218      tool_specified="$STRIP"
37219      tool_basename="${tool_specified##*/}"
37220      if test "x$tool_basename" = "x$tool_specified"; then
37221        # A command without a complete path is provided, search $PATH.
37222        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
37223$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
37224        # Extract the first word of "$tool_basename", so it can be a program name with args.
37225set dummy $tool_basename; ac_word=$2
37226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37227$as_echo_n "checking for $ac_word... " >&6; }
37228if ${ac_cv_path_STRIP+:} false; then :
37229  $as_echo_n "(cached) " >&6
37230else
37231  case $STRIP in
37232  [\\/]* | ?:[\\/]*)
37233  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
37234  ;;
37235  *)
37236  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37237for as_dir in $PATH
37238do
37239  IFS=$as_save_IFS
37240  test -z "$as_dir" && as_dir=.
37241    for ac_exec_ext in '' $ac_executable_extensions; do
37242  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37243    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
37244    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37245    break 2
37246  fi
37247done
37248  done
37249IFS=$as_save_IFS
37250
37251  ;;
37252esac
37253fi
37254STRIP=$ac_cv_path_STRIP
37255if test -n "$STRIP"; then
37256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37257$as_echo "$STRIP" >&6; }
37258else
37259  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37260$as_echo "no" >&6; }
37261fi
37262
37263
37264        if test "x$STRIP" = x; then
37265          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37266        fi
37267      else
37268        # Otherwise we believe it is a complete path. Use it as it is.
37269        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
37270$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
37271        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
37272$as_echo_n "checking for STRIP... " >&6; }
37273        if test ! -x "$tool_specified"; then
37274          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37275$as_echo "not found" >&6; }
37276          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
37277        fi
37278        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37279$as_echo "$tool_specified" >&6; }
37280      fi
37281    fi
37282  fi
37283
37284
37285
37286  # Only process if variable expands to non-empty
37287
37288  if test "x$STRIP" != x; then
37289    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37290
37291  # First separate the path from the arguments. This will split at the first
37292  # space.
37293  complete="$STRIP"
37294  path="${complete%% *}"
37295  tmp="$complete EOL"
37296  arguments="${tmp#* }"
37297
37298  # Input might be given as Windows format, start by converting to
37299  # unix format.
37300  new_path=`$CYGPATH -u "$path"`
37301
37302  # Now try to locate executable using which
37303  new_path=`$WHICH "$new_path" 2> /dev/null`
37304  # bat and cmd files are not always considered executable in cygwin causing which
37305  # to not find them
37306  if test "x$new_path" = x \
37307      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37308      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37309    new_path=`$CYGPATH -u "$path"`
37310  fi
37311  if test "x$new_path" = x; then
37312    # Oops. Which didn't find the executable.
37313    # The splitting of arguments from the executable at a space might have been incorrect,
37314    # since paths with space are more likely in Windows. Give it another try with the whole
37315    # argument.
37316    path="$complete"
37317    arguments="EOL"
37318    new_path=`$CYGPATH -u "$path"`
37319    new_path=`$WHICH "$new_path" 2> /dev/null`
37320    # bat and cmd files are not always considered executable in cygwin causing which
37321    # to not find them
37322    if test "x$new_path" = x \
37323        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37324        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37325      new_path=`$CYGPATH -u "$path"`
37326    fi
37327    if test "x$new_path" = x; then
37328      # It's still not found. Now this is an unrecoverable error.
37329      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37330$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37331      has_space=`$ECHO "$complete" | $GREP " "`
37332      if test "x$has_space" != x; then
37333        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37334$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37335      fi
37336      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37337    fi
37338  fi
37339
37340  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37341  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37342  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37343  # "foo.exe" is OK but "foo" is an error.
37344  #
37345  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37346  # It is also a way to make sure we got the proper file name for the real test later on.
37347  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37348  if test "x$test_shortpath" = x; then
37349    # Short path failed, file does not exist as specified.
37350    # Try adding .exe or .cmd
37351    if test -f "${new_path}.exe"; then
37352      input_to_shortpath="${new_path}.exe"
37353    elif test -f "${new_path}.cmd"; then
37354      input_to_shortpath="${new_path}.cmd"
37355    else
37356      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
37357$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
37358      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37359$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37360      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37361    fi
37362  else
37363    input_to_shortpath="$new_path"
37364  fi
37365
37366  # Call helper function which possibly converts this using DOS-style short mode.
37367  # If so, the updated path is stored in $new_path.
37368  new_path="$input_to_shortpath"
37369
37370  input_path="$input_to_shortpath"
37371  # Check if we need to convert this using DOS-style short mode. If the path
37372  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37373  # take no chances and rewrite it.
37374  # Note: m4 eats our [], so we need to use [ and ] instead.
37375  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37376  if test "x$has_forbidden_chars" != x; then
37377    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37378    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37379    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37380    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37381      # Going to short mode and back again did indeed matter. Since short mode is
37382      # case insensitive, let's make it lowercase to improve readability.
37383      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37384      # Now convert it back to Unix-style (cygpath)
37385      input_path=`$CYGPATH -u "$shortmode_path"`
37386      new_path="$input_path"
37387    fi
37388  fi
37389
37390  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37391  if test "x$test_cygdrive_prefix" = x; then
37392    # As a simple fix, exclude /usr/bin since it's not a real path.
37393    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37394      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37395      # a path prefixed by /cygdrive for fixpath to work.
37396      new_path="$CYGWIN_ROOT_PATH$input_path"
37397    fi
37398  fi
37399
37400  # remove trailing .exe if any
37401  new_path="${new_path/%.exe/}"
37402
37403    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37404
37405  # First separate the path from the arguments. This will split at the first
37406  # space.
37407  complete="$STRIP"
37408  path="${complete%% *}"
37409  tmp="$complete EOL"
37410  arguments="${tmp#* }"
37411
37412  # Input might be given as Windows format, start by converting to
37413  # unix format.
37414  new_path="$path"
37415
37416  windows_path="$new_path"
37417  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37418    unix_path=`$CYGPATH -u "$windows_path"`
37419    new_path="$unix_path"
37420  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37421    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37422    new_path="$unix_path"
37423  fi
37424
37425
37426  # Now try to locate executable using which
37427  new_path=`$WHICH "$new_path" 2> /dev/null`
37428
37429  if test "x$new_path" = x; then
37430    # Oops. Which didn't find the executable.
37431    # The splitting of arguments from the executable at a space might have been incorrect,
37432    # since paths with space are more likely in Windows. Give it another try with the whole
37433    # argument.
37434    path="$complete"
37435    arguments="EOL"
37436    new_path="$path"
37437
37438  windows_path="$new_path"
37439  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37440    unix_path=`$CYGPATH -u "$windows_path"`
37441    new_path="$unix_path"
37442  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37443    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37444    new_path="$unix_path"
37445  fi
37446
37447
37448    new_path=`$WHICH "$new_path" 2> /dev/null`
37449    # bat and cmd files are not always considered executable in MSYS causing which
37450    # to not find them
37451    if test "x$new_path" = x \
37452        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37453        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37454      new_path="$path"
37455
37456  windows_path="$new_path"
37457  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37458    unix_path=`$CYGPATH -u "$windows_path"`
37459    new_path="$unix_path"
37460  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37461    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37462    new_path="$unix_path"
37463  fi
37464
37465    fi
37466
37467    if test "x$new_path" = x; then
37468      # It's still not found. Now this is an unrecoverable error.
37469      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37470$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37471      has_space=`$ECHO "$complete" | $GREP " "`
37472      if test "x$has_space" != x; then
37473        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37474$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37475      fi
37476      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37477    fi
37478  fi
37479
37480  # Now new_path has a complete unix path to the binary
37481  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37482    # Keep paths in /bin as-is, but remove trailing .exe if any
37483    new_path="${new_path/%.exe/}"
37484    # Do not save /bin paths to all_fixpath_prefixes!
37485  else
37486    # Not in mixed or Windows style, start by that.
37487    new_path=`cmd //c echo $new_path`
37488
37489  input_path="$new_path"
37490  # Check if we need to convert this using DOS-style short mode. If the path
37491  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37492  # take no chances and rewrite it.
37493  # Note: m4 eats our [], so we need to use [ and ] instead.
37494  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37495  if test "x$has_forbidden_chars" != x; then
37496    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37497    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37498  fi
37499
37500    # Output is in $new_path
37501
37502  windows_path="$new_path"
37503  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37504    unix_path=`$CYGPATH -u "$windows_path"`
37505    new_path="$unix_path"
37506  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37507    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37508    new_path="$unix_path"
37509  fi
37510
37511    # remove trailing .exe if any
37512    new_path="${new_path/%.exe/}"
37513
37514    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37515    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37516  fi
37517
37518    else
37519      # We're on a unix platform. Hooray! :)
37520      # First separate the path from the arguments. This will split at the first
37521      # space.
37522      complete="$STRIP"
37523      path="${complete%% *}"
37524      tmp="$complete EOL"
37525      arguments="${tmp#* }"
37526
37527      # Cannot rely on the command "which" here since it doesn't always work.
37528      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37529      if test -z "$is_absolute_path"; then
37530        # Path to executable is not absolute. Find it.
37531        IFS_save="$IFS"
37532        IFS=:
37533        for p in $PATH; do
37534          if test -f "$p/$path" && test -x "$p/$path"; then
37535            new_path="$p/$path"
37536            break
37537          fi
37538        done
37539        IFS="$IFS_save"
37540      else
37541        # This is an absolute path, we can use it without further modifications.
37542        new_path="$path"
37543      fi
37544
37545      if test "x$new_path" = x; then
37546        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37547$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37548        has_space=`$ECHO "$complete" | $GREP " "`
37549        if test "x$has_space" != x; then
37550          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37551$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37552        fi
37553        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37554      fi
37555    fi
37556
37557    # Now join together the path and the arguments once again
37558    if test "x$arguments" != xEOL; then
37559      new_complete="$new_path ${arguments% *}"
37560    else
37561      new_complete="$new_path"
37562    fi
37563
37564    if test "x$complete" != "x$new_complete"; then
37565      STRIP="$new_complete"
37566      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
37567$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
37568    fi
37569  fi
37570
37571
37572
37573  # Publish this variable in the help.
37574
37575
37576  if test "x$NM" = x; then
37577    # The variable is not set by user, try to locate tool using the code snippet
37578    if test -n "$ac_tool_prefix"; then
37579  for ac_prog in nm
37580  do
37581    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37582set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37584$as_echo_n "checking for $ac_word... " >&6; }
37585if ${ac_cv_prog_NM+:} false; then :
37586  $as_echo_n "(cached) " >&6
37587else
37588  if test -n "$NM"; then
37589  ac_cv_prog_NM="$NM" # Let the user override the test.
37590else
37591as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37592for as_dir in $PATH
37593do
37594  IFS=$as_save_IFS
37595  test -z "$as_dir" && as_dir=.
37596    for ac_exec_ext in '' $ac_executable_extensions; do
37597  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37598    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37599    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37600    break 2
37601  fi
37602done
37603  done
37604IFS=$as_save_IFS
37605
37606fi
37607fi
37608NM=$ac_cv_prog_NM
37609if test -n "$NM"; then
37610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37611$as_echo "$NM" >&6; }
37612else
37613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37614$as_echo "no" >&6; }
37615fi
37616
37617
37618    test -n "$NM" && break
37619  done
37620fi
37621if test -z "$NM"; then
37622  ac_ct_NM=$NM
37623  for ac_prog in nm
37624do
37625  # Extract the first word of "$ac_prog", so it can be a program name with args.
37626set dummy $ac_prog; ac_word=$2
37627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37628$as_echo_n "checking for $ac_word... " >&6; }
37629if ${ac_cv_prog_ac_ct_NM+:} false; then :
37630  $as_echo_n "(cached) " >&6
37631else
37632  if test -n "$ac_ct_NM"; then
37633  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37634else
37635as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37636for as_dir in $PATH
37637do
37638  IFS=$as_save_IFS
37639  test -z "$as_dir" && as_dir=.
37640    for ac_exec_ext in '' $ac_executable_extensions; do
37641  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37642    ac_cv_prog_ac_ct_NM="$ac_prog"
37643    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37644    break 2
37645  fi
37646done
37647  done
37648IFS=$as_save_IFS
37649
37650fi
37651fi
37652ac_ct_NM=$ac_cv_prog_ac_ct_NM
37653if test -n "$ac_ct_NM"; then
37654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37655$as_echo "$ac_ct_NM" >&6; }
37656else
37657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37658$as_echo "no" >&6; }
37659fi
37660
37661
37662  test -n "$ac_ct_NM" && break
37663done
37664
37665  if test "x$ac_ct_NM" = x; then
37666    NM=""
37667  else
37668    case $cross_compiling:$ac_tool_warned in
37669yes:)
37670{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37671$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37672ac_tool_warned=yes ;;
37673esac
37674    NM=$ac_ct_NM
37675  fi
37676fi
37677
37678  else
37679    # The variable is set, but is it from the command line or the environment?
37680
37681    # Try to remove the string !NM! from our list.
37682    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
37683    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37684      # If it failed, the variable was not from the command line. Ignore it,
37685      # but warn the user (except for BASH, which is always set by the calling BASH).
37686      if test "xNM" != xBASH; then
37687        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
37688$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
37689      fi
37690      # Try to locate tool using the code snippet
37691      if test -n "$ac_tool_prefix"; then
37692  for ac_prog in nm
37693  do
37694    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37695set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37697$as_echo_n "checking for $ac_word... " >&6; }
37698if ${ac_cv_prog_NM+:} false; then :
37699  $as_echo_n "(cached) " >&6
37700else
37701  if test -n "$NM"; then
37702  ac_cv_prog_NM="$NM" # Let the user override the test.
37703else
37704as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37705for as_dir in $PATH
37706do
37707  IFS=$as_save_IFS
37708  test -z "$as_dir" && as_dir=.
37709    for ac_exec_ext in '' $ac_executable_extensions; do
37710  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37711    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37712    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37713    break 2
37714  fi
37715done
37716  done
37717IFS=$as_save_IFS
37718
37719fi
37720fi
37721NM=$ac_cv_prog_NM
37722if test -n "$NM"; then
37723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37724$as_echo "$NM" >&6; }
37725else
37726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37727$as_echo "no" >&6; }
37728fi
37729
37730
37731    test -n "$NM" && break
37732  done
37733fi
37734if test -z "$NM"; then
37735  ac_ct_NM=$NM
37736  for ac_prog in nm
37737do
37738  # Extract the first word of "$ac_prog", so it can be a program name with args.
37739set dummy $ac_prog; ac_word=$2
37740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37741$as_echo_n "checking for $ac_word... " >&6; }
37742if ${ac_cv_prog_ac_ct_NM+:} false; then :
37743  $as_echo_n "(cached) " >&6
37744else
37745  if test -n "$ac_ct_NM"; then
37746  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37747else
37748as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37749for as_dir in $PATH
37750do
37751  IFS=$as_save_IFS
37752  test -z "$as_dir" && as_dir=.
37753    for ac_exec_ext in '' $ac_executable_extensions; do
37754  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37755    ac_cv_prog_ac_ct_NM="$ac_prog"
37756    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37757    break 2
37758  fi
37759done
37760  done
37761IFS=$as_save_IFS
37762
37763fi
37764fi
37765ac_ct_NM=$ac_cv_prog_ac_ct_NM
37766if test -n "$ac_ct_NM"; then
37767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37768$as_echo "$ac_ct_NM" >&6; }
37769else
37770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37771$as_echo "no" >&6; }
37772fi
37773
37774
37775  test -n "$ac_ct_NM" && break
37776done
37777
37778  if test "x$ac_ct_NM" = x; then
37779    NM=""
37780  else
37781    case $cross_compiling:$ac_tool_warned in
37782yes:)
37783{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37784$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37785ac_tool_warned=yes ;;
37786esac
37787    NM=$ac_ct_NM
37788  fi
37789fi
37790
37791    else
37792      # If it succeeded, then it was overridden by the user. We will use it
37793      # for the tool.
37794
37795      # First remove it from the list of overridden variables, so we can test
37796      # for unknown variables in the end.
37797      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37798
37799      # Check if the provided tool contains a complete path.
37800      tool_specified="$NM"
37801      tool_basename="${tool_specified##*/}"
37802      if test "x$tool_basename" = "x$tool_specified"; then
37803        # A command without a complete path is provided, search $PATH.
37804        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
37805$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
37806        # Extract the first word of "$tool_basename", so it can be a program name with args.
37807set dummy $tool_basename; ac_word=$2
37808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37809$as_echo_n "checking for $ac_word... " >&6; }
37810if ${ac_cv_path_NM+:} false; then :
37811  $as_echo_n "(cached) " >&6
37812else
37813  case $NM in
37814  [\\/]* | ?:[\\/]*)
37815  ac_cv_path_NM="$NM" # Let the user override the test with a path.
37816  ;;
37817  *)
37818  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37819for as_dir in $PATH
37820do
37821  IFS=$as_save_IFS
37822  test -z "$as_dir" && as_dir=.
37823    for ac_exec_ext in '' $ac_executable_extensions; do
37824  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37825    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
37826    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37827    break 2
37828  fi
37829done
37830  done
37831IFS=$as_save_IFS
37832
37833  ;;
37834esac
37835fi
37836NM=$ac_cv_path_NM
37837if test -n "$NM"; then
37838  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37839$as_echo "$NM" >&6; }
37840else
37841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37842$as_echo "no" >&6; }
37843fi
37844
37845
37846        if test "x$NM" = x; then
37847          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37848        fi
37849      else
37850        # Otherwise we believe it is a complete path. Use it as it is.
37851        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
37852$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
37853        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
37854$as_echo_n "checking for NM... " >&6; }
37855        if test ! -x "$tool_specified"; then
37856          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37857$as_echo "not found" >&6; }
37858          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
37859        fi
37860        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37861$as_echo "$tool_specified" >&6; }
37862      fi
37863    fi
37864  fi
37865
37866
37867
37868  # Only process if variable expands to non-empty
37869
37870  if test "x$NM" != x; then
37871    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37872
37873  # First separate the path from the arguments. This will split at the first
37874  # space.
37875  complete="$NM"
37876  path="${complete%% *}"
37877  tmp="$complete EOL"
37878  arguments="${tmp#* }"
37879
37880  # Input might be given as Windows format, start by converting to
37881  # unix format.
37882  new_path=`$CYGPATH -u "$path"`
37883
37884  # Now try to locate executable using which
37885  new_path=`$WHICH "$new_path" 2> /dev/null`
37886  # bat and cmd files are not always considered executable in cygwin causing which
37887  # to not find them
37888  if test "x$new_path" = x \
37889      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37890      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37891    new_path=`$CYGPATH -u "$path"`
37892  fi
37893  if test "x$new_path" = x; then
37894    # Oops. Which didn't find the executable.
37895    # The splitting of arguments from the executable at a space might have been incorrect,
37896    # since paths with space are more likely in Windows. Give it another try with the whole
37897    # argument.
37898    path="$complete"
37899    arguments="EOL"
37900    new_path=`$CYGPATH -u "$path"`
37901    new_path=`$WHICH "$new_path" 2> /dev/null`
37902    # bat and cmd files are not always considered executable in cygwin causing which
37903    # to not find them
37904    if test "x$new_path" = x \
37905        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37906        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37907      new_path=`$CYGPATH -u "$path"`
37908    fi
37909    if test "x$new_path" = x; then
37910      # It's still not found. Now this is an unrecoverable error.
37911      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37912$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37913      has_space=`$ECHO "$complete" | $GREP " "`
37914      if test "x$has_space" != x; then
37915        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37916$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37917      fi
37918      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37919    fi
37920  fi
37921
37922  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37923  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37924  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37925  # "foo.exe" is OK but "foo" is an error.
37926  #
37927  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37928  # It is also a way to make sure we got the proper file name for the real test later on.
37929  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37930  if test "x$test_shortpath" = x; then
37931    # Short path failed, file does not exist as specified.
37932    # Try adding .exe or .cmd
37933    if test -f "${new_path}.exe"; then
37934      input_to_shortpath="${new_path}.exe"
37935    elif test -f "${new_path}.cmd"; then
37936      input_to_shortpath="${new_path}.cmd"
37937    else
37938      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
37939$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
37940      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37941$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37942      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37943    fi
37944  else
37945    input_to_shortpath="$new_path"
37946  fi
37947
37948  # Call helper function which possibly converts this using DOS-style short mode.
37949  # If so, the updated path is stored in $new_path.
37950  new_path="$input_to_shortpath"
37951
37952  input_path="$input_to_shortpath"
37953  # Check if we need to convert this using DOS-style short mode. If the path
37954  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37955  # take no chances and rewrite it.
37956  # Note: m4 eats our [], so we need to use [ and ] instead.
37957  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37958  if test "x$has_forbidden_chars" != x; then
37959    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37960    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37961    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37962    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37963      # Going to short mode and back again did indeed matter. Since short mode is
37964      # case insensitive, let's make it lowercase to improve readability.
37965      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37966      # Now convert it back to Unix-style (cygpath)
37967      input_path=`$CYGPATH -u "$shortmode_path"`
37968      new_path="$input_path"
37969    fi
37970  fi
37971
37972  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37973  if test "x$test_cygdrive_prefix" = x; then
37974    # As a simple fix, exclude /usr/bin since it's not a real path.
37975    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37976      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37977      # a path prefixed by /cygdrive for fixpath to work.
37978      new_path="$CYGWIN_ROOT_PATH$input_path"
37979    fi
37980  fi
37981
37982  # remove trailing .exe if any
37983  new_path="${new_path/%.exe/}"
37984
37985    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37986
37987  # First separate the path from the arguments. This will split at the first
37988  # space.
37989  complete="$NM"
37990  path="${complete%% *}"
37991  tmp="$complete EOL"
37992  arguments="${tmp#* }"
37993
37994  # Input might be given as Windows format, start by converting to
37995  # unix format.
37996  new_path="$path"
37997
37998  windows_path="$new_path"
37999  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38000    unix_path=`$CYGPATH -u "$windows_path"`
38001    new_path="$unix_path"
38002  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38003    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38004    new_path="$unix_path"
38005  fi
38006
38007
38008  # Now try to locate executable using which
38009  new_path=`$WHICH "$new_path" 2> /dev/null`
38010
38011  if test "x$new_path" = x; then
38012    # Oops. Which didn't find the executable.
38013    # The splitting of arguments from the executable at a space might have been incorrect,
38014    # since paths with space are more likely in Windows. Give it another try with the whole
38015    # argument.
38016    path="$complete"
38017    arguments="EOL"
38018    new_path="$path"
38019
38020  windows_path="$new_path"
38021  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38022    unix_path=`$CYGPATH -u "$windows_path"`
38023    new_path="$unix_path"
38024  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38025    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38026    new_path="$unix_path"
38027  fi
38028
38029
38030    new_path=`$WHICH "$new_path" 2> /dev/null`
38031    # bat and cmd files are not always considered executable in MSYS causing which
38032    # to not find them
38033    if test "x$new_path" = x \
38034        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38035        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38036      new_path="$path"
38037
38038  windows_path="$new_path"
38039  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38040    unix_path=`$CYGPATH -u "$windows_path"`
38041    new_path="$unix_path"
38042  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38043    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38044    new_path="$unix_path"
38045  fi
38046
38047    fi
38048
38049    if test "x$new_path" = x; then
38050      # It's still not found. Now this is an unrecoverable error.
38051      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38052$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38053      has_space=`$ECHO "$complete" | $GREP " "`
38054      if test "x$has_space" != x; then
38055        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38056$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38057      fi
38058      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38059    fi
38060  fi
38061
38062  # Now new_path has a complete unix path to the binary
38063  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38064    # Keep paths in /bin as-is, but remove trailing .exe if any
38065    new_path="${new_path/%.exe/}"
38066    # Do not save /bin paths to all_fixpath_prefixes!
38067  else
38068    # Not in mixed or Windows style, start by that.
38069    new_path=`cmd //c echo $new_path`
38070
38071  input_path="$new_path"
38072  # Check if we need to convert this using DOS-style short mode. If the path
38073  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38074  # take no chances and rewrite it.
38075  # Note: m4 eats our [], so we need to use [ and ] instead.
38076  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38077  if test "x$has_forbidden_chars" != x; then
38078    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38079    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38080  fi
38081
38082    # Output is in $new_path
38083
38084  windows_path="$new_path"
38085  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38086    unix_path=`$CYGPATH -u "$windows_path"`
38087    new_path="$unix_path"
38088  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38089    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38090    new_path="$unix_path"
38091  fi
38092
38093    # remove trailing .exe if any
38094    new_path="${new_path/%.exe/}"
38095
38096    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38097    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38098  fi
38099
38100    else
38101      # We're on a unix platform. Hooray! :)
38102      # First separate the path from the arguments. This will split at the first
38103      # space.
38104      complete="$NM"
38105      path="${complete%% *}"
38106      tmp="$complete EOL"
38107      arguments="${tmp#* }"
38108
38109      # Cannot rely on the command "which" here since it doesn't always work.
38110      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38111      if test -z "$is_absolute_path"; then
38112        # Path to executable is not absolute. Find it.
38113        IFS_save="$IFS"
38114        IFS=:
38115        for p in $PATH; do
38116          if test -f "$p/$path" && test -x "$p/$path"; then
38117            new_path="$p/$path"
38118            break
38119          fi
38120        done
38121        IFS="$IFS_save"
38122      else
38123        # This is an absolute path, we can use it without further modifications.
38124        new_path="$path"
38125      fi
38126
38127      if test "x$new_path" = x; then
38128        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38129$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38130        has_space=`$ECHO "$complete" | $GREP " "`
38131        if test "x$has_space" != x; then
38132          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38133$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38134        fi
38135        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38136      fi
38137    fi
38138
38139    # Now join together the path and the arguments once again
38140    if test "x$arguments" != xEOL; then
38141      new_complete="$new_path ${arguments% *}"
38142    else
38143      new_complete="$new_path"
38144    fi
38145
38146    if test "x$complete" != "x$new_complete"; then
38147      NM="$new_complete"
38148      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
38149$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
38150    fi
38151  fi
38152
38153    GNM="$NM"
38154
38155  fi
38156
38157  # objcopy is used for moving debug symbols to separate files when
38158  # full debug symbols are enabled.
38159  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
38160
38161
38162  # Publish this variable in the help.
38163
38164
38165  if test "x$OBJCOPY" = x; then
38166    # The variable is not set by user, try to locate tool using the code snippet
38167    if test -n "$ac_tool_prefix"; then
38168  for ac_prog in gobjcopy objcopy
38169  do
38170    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38171set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38173$as_echo_n "checking for $ac_word... " >&6; }
38174if ${ac_cv_prog_OBJCOPY+:} false; then :
38175  $as_echo_n "(cached) " >&6
38176else
38177  if test -n "$OBJCOPY"; then
38178  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
38179else
38180as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38181for as_dir in $PATH
38182do
38183  IFS=$as_save_IFS
38184  test -z "$as_dir" && as_dir=.
38185    for ac_exec_ext in '' $ac_executable_extensions; do
38186  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38187    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
38188    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38189    break 2
38190  fi
38191done
38192  done
38193IFS=$as_save_IFS
38194
38195fi
38196fi
38197OBJCOPY=$ac_cv_prog_OBJCOPY
38198if test -n "$OBJCOPY"; then
38199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38200$as_echo "$OBJCOPY" >&6; }
38201else
38202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38203$as_echo "no" >&6; }
38204fi
38205
38206
38207    test -n "$OBJCOPY" && break
38208  done
38209fi
38210if test -z "$OBJCOPY"; then
38211  ac_ct_OBJCOPY=$OBJCOPY
38212  for ac_prog in gobjcopy objcopy
38213do
38214  # Extract the first word of "$ac_prog", so it can be a program name with args.
38215set dummy $ac_prog; ac_word=$2
38216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38217$as_echo_n "checking for $ac_word... " >&6; }
38218if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
38219  $as_echo_n "(cached) " >&6
38220else
38221  if test -n "$ac_ct_OBJCOPY"; then
38222  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
38223else
38224as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38225for as_dir in $PATH
38226do
38227  IFS=$as_save_IFS
38228  test -z "$as_dir" && as_dir=.
38229    for ac_exec_ext in '' $ac_executable_extensions; do
38230  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38231    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
38232    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38233    break 2
38234  fi
38235done
38236  done
38237IFS=$as_save_IFS
38238
38239fi
38240fi
38241ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
38242if test -n "$ac_ct_OBJCOPY"; then
38243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
38244$as_echo "$ac_ct_OBJCOPY" >&6; }
38245else
38246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38247$as_echo "no" >&6; }
38248fi
38249
38250
38251  test -n "$ac_ct_OBJCOPY" && break
38252done
38253
38254  if test "x$ac_ct_OBJCOPY" = x; then
38255    OBJCOPY=""
38256  else
38257    case $cross_compiling:$ac_tool_warned in
38258yes:)
38259{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38260$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38261ac_tool_warned=yes ;;
38262esac
38263    OBJCOPY=$ac_ct_OBJCOPY
38264  fi
38265fi
38266
38267  else
38268    # The variable is set, but is it from the command line or the environment?
38269
38270    # Try to remove the string !OBJCOPY! from our list.
38271    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
38272    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38273      # If it failed, the variable was not from the command line. Ignore it,
38274      # but warn the user (except for BASH, which is always set by the calling BASH).
38275      if test "xOBJCOPY" != xBASH; then
38276        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
38277$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
38278      fi
38279      # Try to locate tool using the code snippet
38280      if test -n "$ac_tool_prefix"; then
38281  for ac_prog in gobjcopy objcopy
38282  do
38283    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38284set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38286$as_echo_n "checking for $ac_word... " >&6; }
38287if ${ac_cv_prog_OBJCOPY+:} false; then :
38288  $as_echo_n "(cached) " >&6
38289else
38290  if test -n "$OBJCOPY"; then
38291  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
38292else
38293as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38294for as_dir in $PATH
38295do
38296  IFS=$as_save_IFS
38297  test -z "$as_dir" && as_dir=.
38298    for ac_exec_ext in '' $ac_executable_extensions; do
38299  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38300    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
38301    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38302    break 2
38303  fi
38304done
38305  done
38306IFS=$as_save_IFS
38307
38308fi
38309fi
38310OBJCOPY=$ac_cv_prog_OBJCOPY
38311if test -n "$OBJCOPY"; then
38312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38313$as_echo "$OBJCOPY" >&6; }
38314else
38315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38316$as_echo "no" >&6; }
38317fi
38318
38319
38320    test -n "$OBJCOPY" && break
38321  done
38322fi
38323if test -z "$OBJCOPY"; then
38324  ac_ct_OBJCOPY=$OBJCOPY
38325  for ac_prog in gobjcopy objcopy
38326do
38327  # Extract the first word of "$ac_prog", so it can be a program name with args.
38328set dummy $ac_prog; ac_word=$2
38329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38330$as_echo_n "checking for $ac_word... " >&6; }
38331if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
38332  $as_echo_n "(cached) " >&6
38333else
38334  if test -n "$ac_ct_OBJCOPY"; then
38335  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
38336else
38337as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38338for as_dir in $PATH
38339do
38340  IFS=$as_save_IFS
38341  test -z "$as_dir" && as_dir=.
38342    for ac_exec_ext in '' $ac_executable_extensions; do
38343  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38344    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
38345    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38346    break 2
38347  fi
38348done
38349  done
38350IFS=$as_save_IFS
38351
38352fi
38353fi
38354ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
38355if test -n "$ac_ct_OBJCOPY"; then
38356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
38357$as_echo "$ac_ct_OBJCOPY" >&6; }
38358else
38359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38360$as_echo "no" >&6; }
38361fi
38362
38363
38364  test -n "$ac_ct_OBJCOPY" && break
38365done
38366
38367  if test "x$ac_ct_OBJCOPY" = x; then
38368    OBJCOPY=""
38369  else
38370    case $cross_compiling:$ac_tool_warned in
38371yes:)
38372{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38373$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38374ac_tool_warned=yes ;;
38375esac
38376    OBJCOPY=$ac_ct_OBJCOPY
38377  fi
38378fi
38379
38380    else
38381      # If it succeeded, then it was overridden by the user. We will use it
38382      # for the tool.
38383
38384      # First remove it from the list of overridden variables, so we can test
38385      # for unknown variables in the end.
38386      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38387
38388      # Check if the provided tool contains a complete path.
38389      tool_specified="$OBJCOPY"
38390      tool_basename="${tool_specified##*/}"
38391      if test "x$tool_basename" = "x$tool_specified"; then
38392        # A command without a complete path is provided, search $PATH.
38393        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
38394$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
38395        # Extract the first word of "$tool_basename", so it can be a program name with args.
38396set dummy $tool_basename; ac_word=$2
38397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38398$as_echo_n "checking for $ac_word... " >&6; }
38399if ${ac_cv_path_OBJCOPY+:} false; then :
38400  $as_echo_n "(cached) " >&6
38401else
38402  case $OBJCOPY in
38403  [\\/]* | ?:[\\/]*)
38404  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
38405  ;;
38406  *)
38407  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38408for as_dir in $PATH
38409do
38410  IFS=$as_save_IFS
38411  test -z "$as_dir" && as_dir=.
38412    for ac_exec_ext in '' $ac_executable_extensions; do
38413  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38414    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
38415    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38416    break 2
38417  fi
38418done
38419  done
38420IFS=$as_save_IFS
38421
38422  ;;
38423esac
38424fi
38425OBJCOPY=$ac_cv_path_OBJCOPY
38426if test -n "$OBJCOPY"; then
38427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38428$as_echo "$OBJCOPY" >&6; }
38429else
38430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38431$as_echo "no" >&6; }
38432fi
38433
38434
38435        if test "x$OBJCOPY" = x; then
38436          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38437        fi
38438      else
38439        # Otherwise we believe it is a complete path. Use it as it is.
38440        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
38441$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
38442        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
38443$as_echo_n "checking for OBJCOPY... " >&6; }
38444        if test ! -x "$tool_specified"; then
38445          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38446$as_echo "not found" >&6; }
38447          as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
38448        fi
38449        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38450$as_echo "$tool_specified" >&6; }
38451      fi
38452    fi
38453  fi
38454
38455
38456    # Only call fixup if objcopy was found.
38457    if test -n "$OBJCOPY"; then
38458
38459  # Only process if variable expands to non-empty
38460
38461  if test "x$OBJCOPY" != x; then
38462    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38463
38464  # First separate the path from the arguments. This will split at the first
38465  # space.
38466  complete="$OBJCOPY"
38467  path="${complete%% *}"
38468  tmp="$complete EOL"
38469  arguments="${tmp#* }"
38470
38471  # Input might be given as Windows format, start by converting to
38472  # unix format.
38473  new_path=`$CYGPATH -u "$path"`
38474
38475  # Now try to locate executable using which
38476  new_path=`$WHICH "$new_path" 2> /dev/null`
38477  # bat and cmd files are not always considered executable in cygwin causing which
38478  # to not find them
38479  if test "x$new_path" = x \
38480      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38481      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38482    new_path=`$CYGPATH -u "$path"`
38483  fi
38484  if test "x$new_path" = x; then
38485    # Oops. Which didn't find the executable.
38486    # The splitting of arguments from the executable at a space might have been incorrect,
38487    # since paths with space are more likely in Windows. Give it another try with the whole
38488    # argument.
38489    path="$complete"
38490    arguments="EOL"
38491    new_path=`$CYGPATH -u "$path"`
38492    new_path=`$WHICH "$new_path" 2> /dev/null`
38493    # bat and cmd files are not always considered executable in cygwin causing which
38494    # to not find them
38495    if test "x$new_path" = x \
38496        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38497        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38498      new_path=`$CYGPATH -u "$path"`
38499    fi
38500    if test "x$new_path" = x; then
38501      # It's still not found. Now this is an unrecoverable error.
38502      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38503$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38504      has_space=`$ECHO "$complete" | $GREP " "`
38505      if test "x$has_space" != x; then
38506        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38507$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38508      fi
38509      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38510    fi
38511  fi
38512
38513  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38514  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38515  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38516  # "foo.exe" is OK but "foo" is an error.
38517  #
38518  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38519  # It is also a way to make sure we got the proper file name for the real test later on.
38520  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38521  if test "x$test_shortpath" = x; then
38522    # Short path failed, file does not exist as specified.
38523    # Try adding .exe or .cmd
38524    if test -f "${new_path}.exe"; then
38525      input_to_shortpath="${new_path}.exe"
38526    elif test -f "${new_path}.cmd"; then
38527      input_to_shortpath="${new_path}.cmd"
38528    else
38529      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
38530$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
38531      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38532$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38533      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38534    fi
38535  else
38536    input_to_shortpath="$new_path"
38537  fi
38538
38539  # Call helper function which possibly converts this using DOS-style short mode.
38540  # If so, the updated path is stored in $new_path.
38541  new_path="$input_to_shortpath"
38542
38543  input_path="$input_to_shortpath"
38544  # Check if we need to convert this using DOS-style short mode. If the path
38545  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38546  # take no chances and rewrite it.
38547  # Note: m4 eats our [], so we need to use [ and ] instead.
38548  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38549  if test "x$has_forbidden_chars" != x; then
38550    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38551    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38552    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38553    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38554      # Going to short mode and back again did indeed matter. Since short mode is
38555      # case insensitive, let's make it lowercase to improve readability.
38556      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38557      # Now convert it back to Unix-style (cygpath)
38558      input_path=`$CYGPATH -u "$shortmode_path"`
38559      new_path="$input_path"
38560    fi
38561  fi
38562
38563  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38564  if test "x$test_cygdrive_prefix" = x; then
38565    # As a simple fix, exclude /usr/bin since it's not a real path.
38566    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38567      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38568      # a path prefixed by /cygdrive for fixpath to work.
38569      new_path="$CYGWIN_ROOT_PATH$input_path"
38570    fi
38571  fi
38572
38573  # remove trailing .exe if any
38574  new_path="${new_path/%.exe/}"
38575
38576    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38577
38578  # First separate the path from the arguments. This will split at the first
38579  # space.
38580  complete="$OBJCOPY"
38581  path="${complete%% *}"
38582  tmp="$complete EOL"
38583  arguments="${tmp#* }"
38584
38585  # Input might be given as Windows format, start by converting to
38586  # unix format.
38587  new_path="$path"
38588
38589  windows_path="$new_path"
38590  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38591    unix_path=`$CYGPATH -u "$windows_path"`
38592    new_path="$unix_path"
38593  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38594    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38595    new_path="$unix_path"
38596  fi
38597
38598
38599  # Now try to locate executable using which
38600  new_path=`$WHICH "$new_path" 2> /dev/null`
38601
38602  if test "x$new_path" = x; then
38603    # Oops. Which didn't find the executable.
38604    # The splitting of arguments from the executable at a space might have been incorrect,
38605    # since paths with space are more likely in Windows. Give it another try with the whole
38606    # argument.
38607    path="$complete"
38608    arguments="EOL"
38609    new_path="$path"
38610
38611  windows_path="$new_path"
38612  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38613    unix_path=`$CYGPATH -u "$windows_path"`
38614    new_path="$unix_path"
38615  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38616    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38617    new_path="$unix_path"
38618  fi
38619
38620
38621    new_path=`$WHICH "$new_path" 2> /dev/null`
38622    # bat and cmd files are not always considered executable in MSYS causing which
38623    # to not find them
38624    if test "x$new_path" = x \
38625        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38626        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38627      new_path="$path"
38628
38629  windows_path="$new_path"
38630  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38631    unix_path=`$CYGPATH -u "$windows_path"`
38632    new_path="$unix_path"
38633  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38634    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38635    new_path="$unix_path"
38636  fi
38637
38638    fi
38639
38640    if test "x$new_path" = x; then
38641      # It's still not found. Now this is an unrecoverable error.
38642      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38643$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38644      has_space=`$ECHO "$complete" | $GREP " "`
38645      if test "x$has_space" != x; then
38646        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38647$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38648      fi
38649      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38650    fi
38651  fi
38652
38653  # Now new_path has a complete unix path to the binary
38654  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38655    # Keep paths in /bin as-is, but remove trailing .exe if any
38656    new_path="${new_path/%.exe/}"
38657    # Do not save /bin paths to all_fixpath_prefixes!
38658  else
38659    # Not in mixed or Windows style, start by that.
38660    new_path=`cmd //c echo $new_path`
38661
38662  input_path="$new_path"
38663  # Check if we need to convert this using DOS-style short mode. If the path
38664  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38665  # take no chances and rewrite it.
38666  # Note: m4 eats our [], so we need to use [ and ] instead.
38667  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38668  if test "x$has_forbidden_chars" != x; then
38669    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38670    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38671  fi
38672
38673    # Output is in $new_path
38674
38675  windows_path="$new_path"
38676  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38677    unix_path=`$CYGPATH -u "$windows_path"`
38678    new_path="$unix_path"
38679  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38680    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38681    new_path="$unix_path"
38682  fi
38683
38684    # remove trailing .exe if any
38685    new_path="${new_path/%.exe/}"
38686
38687    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38688    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38689  fi
38690
38691    else
38692      # We're on a unix platform. Hooray! :)
38693      # First separate the path from the arguments. This will split at the first
38694      # space.
38695      complete="$OBJCOPY"
38696      path="${complete%% *}"
38697      tmp="$complete EOL"
38698      arguments="${tmp#* }"
38699
38700      # Cannot rely on the command "which" here since it doesn't always work.
38701      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38702      if test -z "$is_absolute_path"; then
38703        # Path to executable is not absolute. Find it.
38704        IFS_save="$IFS"
38705        IFS=:
38706        for p in $PATH; do
38707          if test -f "$p/$path" && test -x "$p/$path"; then
38708            new_path="$p/$path"
38709            break
38710          fi
38711        done
38712        IFS="$IFS_save"
38713      else
38714        # This is an absolute path, we can use it without further modifications.
38715        new_path="$path"
38716      fi
38717
38718      if test "x$new_path" = x; then
38719        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38720$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38721        has_space=`$ECHO "$complete" | $GREP " "`
38722        if test "x$has_space" != x; then
38723          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38724$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38725        fi
38726        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38727      fi
38728    fi
38729
38730    # Now join together the path and the arguments once again
38731    if test "x$arguments" != xEOL; then
38732      new_complete="$new_path ${arguments% *}"
38733    else
38734      new_complete="$new_path"
38735    fi
38736
38737    if test "x$complete" != "x$new_complete"; then
38738      OBJCOPY="$new_complete"
38739      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
38740$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
38741    fi
38742  fi
38743
38744    fi
38745  fi
38746
38747
38748
38749  # Publish this variable in the help.
38750
38751
38752  if test "x$OBJDUMP" = x; then
38753    # The variable is not set by user, try to locate tool using the code snippet
38754    if test -n "$ac_tool_prefix"; then
38755  for ac_prog in gobjdump objdump
38756  do
38757    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38758set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38760$as_echo_n "checking for $ac_word... " >&6; }
38761if ${ac_cv_prog_OBJDUMP+:} false; then :
38762  $as_echo_n "(cached) " >&6
38763else
38764  if test -n "$OBJDUMP"; then
38765  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38766else
38767as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38768for as_dir in $PATH
38769do
38770  IFS=$as_save_IFS
38771  test -z "$as_dir" && as_dir=.
38772    for ac_exec_ext in '' $ac_executable_extensions; do
38773  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38774    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38775    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38776    break 2
38777  fi
38778done
38779  done
38780IFS=$as_save_IFS
38781
38782fi
38783fi
38784OBJDUMP=$ac_cv_prog_OBJDUMP
38785if test -n "$OBJDUMP"; then
38786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38787$as_echo "$OBJDUMP" >&6; }
38788else
38789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38790$as_echo "no" >&6; }
38791fi
38792
38793
38794    test -n "$OBJDUMP" && break
38795  done
38796fi
38797if test -z "$OBJDUMP"; then
38798  ac_ct_OBJDUMP=$OBJDUMP
38799  for ac_prog in gobjdump objdump
38800do
38801  # Extract the first word of "$ac_prog", so it can be a program name with args.
38802set dummy $ac_prog; ac_word=$2
38803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38804$as_echo_n "checking for $ac_word... " >&6; }
38805if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38806  $as_echo_n "(cached) " >&6
38807else
38808  if test -n "$ac_ct_OBJDUMP"; then
38809  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38810else
38811as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38812for as_dir in $PATH
38813do
38814  IFS=$as_save_IFS
38815  test -z "$as_dir" && as_dir=.
38816    for ac_exec_ext in '' $ac_executable_extensions; do
38817  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38818    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38819    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38820    break 2
38821  fi
38822done
38823  done
38824IFS=$as_save_IFS
38825
38826fi
38827fi
38828ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38829if test -n "$ac_ct_OBJDUMP"; then
38830  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38831$as_echo "$ac_ct_OBJDUMP" >&6; }
38832else
38833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38834$as_echo "no" >&6; }
38835fi
38836
38837
38838  test -n "$ac_ct_OBJDUMP" && break
38839done
38840
38841  if test "x$ac_ct_OBJDUMP" = x; then
38842    OBJDUMP=""
38843  else
38844    case $cross_compiling:$ac_tool_warned in
38845yes:)
38846{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38847$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38848ac_tool_warned=yes ;;
38849esac
38850    OBJDUMP=$ac_ct_OBJDUMP
38851  fi
38852fi
38853
38854  else
38855    # The variable is set, but is it from the command line or the environment?
38856
38857    # Try to remove the string !OBJDUMP! from our list.
38858    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
38859    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38860      # If it failed, the variable was not from the command line. Ignore it,
38861      # but warn the user (except for BASH, which is always set by the calling BASH).
38862      if test "xOBJDUMP" != xBASH; then
38863        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
38864$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
38865      fi
38866      # Try to locate tool using the code snippet
38867      if test -n "$ac_tool_prefix"; then
38868  for ac_prog in gobjdump objdump
38869  do
38870    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38871set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38873$as_echo_n "checking for $ac_word... " >&6; }
38874if ${ac_cv_prog_OBJDUMP+:} false; then :
38875  $as_echo_n "(cached) " >&6
38876else
38877  if test -n "$OBJDUMP"; then
38878  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38879else
38880as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38881for as_dir in $PATH
38882do
38883  IFS=$as_save_IFS
38884  test -z "$as_dir" && as_dir=.
38885    for ac_exec_ext in '' $ac_executable_extensions; do
38886  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38887    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38888    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38889    break 2
38890  fi
38891done
38892  done
38893IFS=$as_save_IFS
38894
38895fi
38896fi
38897OBJDUMP=$ac_cv_prog_OBJDUMP
38898if test -n "$OBJDUMP"; then
38899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38900$as_echo "$OBJDUMP" >&6; }
38901else
38902  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38903$as_echo "no" >&6; }
38904fi
38905
38906
38907    test -n "$OBJDUMP" && break
38908  done
38909fi
38910if test -z "$OBJDUMP"; then
38911  ac_ct_OBJDUMP=$OBJDUMP
38912  for ac_prog in gobjdump objdump
38913do
38914  # Extract the first word of "$ac_prog", so it can be a program name with args.
38915set dummy $ac_prog; ac_word=$2
38916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38917$as_echo_n "checking for $ac_word... " >&6; }
38918if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38919  $as_echo_n "(cached) " >&6
38920else
38921  if test -n "$ac_ct_OBJDUMP"; then
38922  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38923else
38924as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38925for as_dir in $PATH
38926do
38927  IFS=$as_save_IFS
38928  test -z "$as_dir" && as_dir=.
38929    for ac_exec_ext in '' $ac_executable_extensions; do
38930  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38931    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38932    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38933    break 2
38934  fi
38935done
38936  done
38937IFS=$as_save_IFS
38938
38939fi
38940fi
38941ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38942if test -n "$ac_ct_OBJDUMP"; then
38943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38944$as_echo "$ac_ct_OBJDUMP" >&6; }
38945else
38946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38947$as_echo "no" >&6; }
38948fi
38949
38950
38951  test -n "$ac_ct_OBJDUMP" && break
38952done
38953
38954  if test "x$ac_ct_OBJDUMP" = x; then
38955    OBJDUMP=""
38956  else
38957    case $cross_compiling:$ac_tool_warned in
38958yes:)
38959{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38960$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38961ac_tool_warned=yes ;;
38962esac
38963    OBJDUMP=$ac_ct_OBJDUMP
38964  fi
38965fi
38966
38967    else
38968      # If it succeeded, then it was overridden by the user. We will use it
38969      # for the tool.
38970
38971      # First remove it from the list of overridden variables, so we can test
38972      # for unknown variables in the end.
38973      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38974
38975      # Check if the provided tool contains a complete path.
38976      tool_specified="$OBJDUMP"
38977      tool_basename="${tool_specified##*/}"
38978      if test "x$tool_basename" = "x$tool_specified"; then
38979        # A command without a complete path is provided, search $PATH.
38980        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
38981$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
38982        # Extract the first word of "$tool_basename", so it can be a program name with args.
38983set dummy $tool_basename; ac_word=$2
38984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38985$as_echo_n "checking for $ac_word... " >&6; }
38986if ${ac_cv_path_OBJDUMP+:} false; then :
38987  $as_echo_n "(cached) " >&6
38988else
38989  case $OBJDUMP in
38990  [\\/]* | ?:[\\/]*)
38991  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
38992  ;;
38993  *)
38994  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38995for as_dir in $PATH
38996do
38997  IFS=$as_save_IFS
38998  test -z "$as_dir" && as_dir=.
38999    for ac_exec_ext in '' $ac_executable_extensions; do
39000  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39001    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
39002    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39003    break 2
39004  fi
39005done
39006  done
39007IFS=$as_save_IFS
39008
39009  ;;
39010esac
39011fi
39012OBJDUMP=$ac_cv_path_OBJDUMP
39013if test -n "$OBJDUMP"; then
39014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
39015$as_echo "$OBJDUMP" >&6; }
39016else
39017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39018$as_echo "no" >&6; }
39019fi
39020
39021
39022        if test "x$OBJDUMP" = x; then
39023          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39024        fi
39025      else
39026        # Otherwise we believe it is a complete path. Use it as it is.
39027        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
39028$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
39029        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
39030$as_echo_n "checking for OBJDUMP... " >&6; }
39031        if test ! -x "$tool_specified"; then
39032          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39033$as_echo "not found" >&6; }
39034          as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
39035        fi
39036        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39037$as_echo "$tool_specified" >&6; }
39038      fi
39039    fi
39040  fi
39041
39042
39043  if test "x$OBJDUMP" != x; then
39044    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
39045    # bails if argument is missing.
39046
39047  # Only process if variable expands to non-empty
39048
39049  if test "x$OBJDUMP" != x; then
39050    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39051
39052  # First separate the path from the arguments. This will split at the first
39053  # space.
39054  complete="$OBJDUMP"
39055  path="${complete%% *}"
39056  tmp="$complete EOL"
39057  arguments="${tmp#* }"
39058
39059  # Input might be given as Windows format, start by converting to
39060  # unix format.
39061  new_path=`$CYGPATH -u "$path"`
39062
39063  # Now try to locate executable using which
39064  new_path=`$WHICH "$new_path" 2> /dev/null`
39065  # bat and cmd files are not always considered executable in cygwin causing which
39066  # to not find them
39067  if test "x$new_path" = x \
39068      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39069      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39070    new_path=`$CYGPATH -u "$path"`
39071  fi
39072  if test "x$new_path" = x; then
39073    # Oops. Which didn't find the executable.
39074    # The splitting of arguments from the executable at a space might have been incorrect,
39075    # since paths with space are more likely in Windows. Give it another try with the whole
39076    # argument.
39077    path="$complete"
39078    arguments="EOL"
39079    new_path=`$CYGPATH -u "$path"`
39080    new_path=`$WHICH "$new_path" 2> /dev/null`
39081    # bat and cmd files are not always considered executable in cygwin causing which
39082    # to not find them
39083    if test "x$new_path" = x \
39084        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39085        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39086      new_path=`$CYGPATH -u "$path"`
39087    fi
39088    if test "x$new_path" = x; then
39089      # It's still not found. Now this is an unrecoverable error.
39090      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39091$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39092      has_space=`$ECHO "$complete" | $GREP " "`
39093      if test "x$has_space" != x; then
39094        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39095$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39096      fi
39097      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39098    fi
39099  fi
39100
39101  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39102  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39103  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39104  # "foo.exe" is OK but "foo" is an error.
39105  #
39106  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39107  # It is also a way to make sure we got the proper file name for the real test later on.
39108  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39109  if test "x$test_shortpath" = x; then
39110    # Short path failed, file does not exist as specified.
39111    # Try adding .exe or .cmd
39112    if test -f "${new_path}.exe"; then
39113      input_to_shortpath="${new_path}.exe"
39114    elif test -f "${new_path}.cmd"; then
39115      input_to_shortpath="${new_path}.cmd"
39116    else
39117      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
39118$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
39119      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39120$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39121      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39122    fi
39123  else
39124    input_to_shortpath="$new_path"
39125  fi
39126
39127  # Call helper function which possibly converts this using DOS-style short mode.
39128  # If so, the updated path is stored in $new_path.
39129  new_path="$input_to_shortpath"
39130
39131  input_path="$input_to_shortpath"
39132  # Check if we need to convert this using DOS-style short mode. If the path
39133  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39134  # take no chances and rewrite it.
39135  # Note: m4 eats our [], so we need to use [ and ] instead.
39136  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39137  if test "x$has_forbidden_chars" != x; then
39138    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39139    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39140    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39141    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39142      # Going to short mode and back again did indeed matter. Since short mode is
39143      # case insensitive, let's make it lowercase to improve readability.
39144      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39145      # Now convert it back to Unix-style (cygpath)
39146      input_path=`$CYGPATH -u "$shortmode_path"`
39147      new_path="$input_path"
39148    fi
39149  fi
39150
39151  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39152  if test "x$test_cygdrive_prefix" = x; then
39153    # As a simple fix, exclude /usr/bin since it's not a real path.
39154    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39155      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39156      # a path prefixed by /cygdrive for fixpath to work.
39157      new_path="$CYGWIN_ROOT_PATH$input_path"
39158    fi
39159  fi
39160
39161  # remove trailing .exe if any
39162  new_path="${new_path/%.exe/}"
39163
39164    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39165
39166  # First separate the path from the arguments. This will split at the first
39167  # space.
39168  complete="$OBJDUMP"
39169  path="${complete%% *}"
39170  tmp="$complete EOL"
39171  arguments="${tmp#* }"
39172
39173  # Input might be given as Windows format, start by converting to
39174  # unix format.
39175  new_path="$path"
39176
39177  windows_path="$new_path"
39178  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39179    unix_path=`$CYGPATH -u "$windows_path"`
39180    new_path="$unix_path"
39181  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39182    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39183    new_path="$unix_path"
39184  fi
39185
39186
39187  # Now try to locate executable using which
39188  new_path=`$WHICH "$new_path" 2> /dev/null`
39189
39190  if test "x$new_path" = x; then
39191    # Oops. Which didn't find the executable.
39192    # The splitting of arguments from the executable at a space might have been incorrect,
39193    # since paths with space are more likely in Windows. Give it another try with the whole
39194    # argument.
39195    path="$complete"
39196    arguments="EOL"
39197    new_path="$path"
39198
39199  windows_path="$new_path"
39200  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39201    unix_path=`$CYGPATH -u "$windows_path"`
39202    new_path="$unix_path"
39203  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39204    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39205    new_path="$unix_path"
39206  fi
39207
39208
39209    new_path=`$WHICH "$new_path" 2> /dev/null`
39210    # bat and cmd files are not always considered executable in MSYS causing which
39211    # to not find them
39212    if test "x$new_path" = x \
39213        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39214        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39215      new_path="$path"
39216
39217  windows_path="$new_path"
39218  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39219    unix_path=`$CYGPATH -u "$windows_path"`
39220    new_path="$unix_path"
39221  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39222    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39223    new_path="$unix_path"
39224  fi
39225
39226    fi
39227
39228    if test "x$new_path" = x; then
39229      # It's still not found. Now this is an unrecoverable error.
39230      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39231$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39232      has_space=`$ECHO "$complete" | $GREP " "`
39233      if test "x$has_space" != x; then
39234        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39235$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39236      fi
39237      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39238    fi
39239  fi
39240
39241  # Now new_path has a complete unix path to the binary
39242  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39243    # Keep paths in /bin as-is, but remove trailing .exe if any
39244    new_path="${new_path/%.exe/}"
39245    # Do not save /bin paths to all_fixpath_prefixes!
39246  else
39247    # Not in mixed or Windows style, start by that.
39248    new_path=`cmd //c echo $new_path`
39249
39250  input_path="$new_path"
39251  # Check if we need to convert this using DOS-style short mode. If the path
39252  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39253  # take no chances and rewrite it.
39254  # Note: m4 eats our [], so we need to use [ and ] instead.
39255  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39256  if test "x$has_forbidden_chars" != x; then
39257    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39258    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39259  fi
39260
39261    # Output is in $new_path
39262
39263  windows_path="$new_path"
39264  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39265    unix_path=`$CYGPATH -u "$windows_path"`
39266    new_path="$unix_path"
39267  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39268    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39269    new_path="$unix_path"
39270  fi
39271
39272    # remove trailing .exe if any
39273    new_path="${new_path/%.exe/}"
39274
39275    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39276    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39277  fi
39278
39279    else
39280      # We're on a unix platform. Hooray! :)
39281      # First separate the path from the arguments. This will split at the first
39282      # space.
39283      complete="$OBJDUMP"
39284      path="${complete%% *}"
39285      tmp="$complete EOL"
39286      arguments="${tmp#* }"
39287
39288      # Cannot rely on the command "which" here since it doesn't always work.
39289      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39290      if test -z "$is_absolute_path"; then
39291        # Path to executable is not absolute. Find it.
39292        IFS_save="$IFS"
39293        IFS=:
39294        for p in $PATH; do
39295          if test -f "$p/$path" && test -x "$p/$path"; then
39296            new_path="$p/$path"
39297            break
39298          fi
39299        done
39300        IFS="$IFS_save"
39301      else
39302        # This is an absolute path, we can use it without further modifications.
39303        new_path="$path"
39304      fi
39305
39306      if test "x$new_path" = x; then
39307        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39308$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39309        has_space=`$ECHO "$complete" | $GREP " "`
39310        if test "x$has_space" != x; then
39311          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39312$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39313        fi
39314        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39315      fi
39316    fi
39317
39318    # Now join together the path and the arguments once again
39319    if test "x$arguments" != xEOL; then
39320      new_complete="$new_path ${arguments% *}"
39321    else
39322      new_complete="$new_path"
39323    fi
39324
39325    if test "x$complete" != "x$new_complete"; then
39326      OBJDUMP="$new_complete"
39327      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
39328$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
39329    fi
39330  fi
39331
39332  fi
39333
39334
39335  # Restore old path.
39336  PATH="$OLD_PATH"
39337
39338  # Restore the flags to the user specified values.
39339  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
39340  CFLAGS="$ORG_CFLAGS"
39341  CXXFLAGS="$ORG_CXXFLAGS"
39342
39343
39344# Finally do some processing after the detection phase
39345
39346  if test "x$COMPILE_TYPE" = "xcross"; then
39347    # Now we need to find a C/C++ compiler that can build executables for the
39348    # build platform. We can't use the AC_PROG_CC macro, since it can only be
39349    # used once. Also, we need to do this without adding a tools dir to the
39350    # path, otherwise we might pick up cross-compilers which don't use standard
39351    # naming.
39352
39353    # FIXME: we should list the discovered compilers as an exclude pattern!
39354    # If we do that, we can do this detection before POST_DETECTION, and still
39355    # find the build compilers in the tools dir, if needed.
39356
39357
39358  # Publish this variable in the help.
39359
39360
39361  if test "x$BUILD_CC" = x; then
39362    # The variable is not set by user, try to locate tool using the code snippet
39363    for ac_prog in cl cc gcc
39364do
39365  # Extract the first word of "$ac_prog", so it can be a program name with args.
39366set dummy $ac_prog; ac_word=$2
39367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39368$as_echo_n "checking for $ac_word... " >&6; }
39369if ${ac_cv_path_BUILD_CC+:} false; then :
39370  $as_echo_n "(cached) " >&6
39371else
39372  case $BUILD_CC in
39373  [\\/]* | ?:[\\/]*)
39374  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39375  ;;
39376  *)
39377  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39378for as_dir in $PATH
39379do
39380  IFS=$as_save_IFS
39381  test -z "$as_dir" && as_dir=.
39382    for ac_exec_ext in '' $ac_executable_extensions; do
39383  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39384    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39385    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39386    break 2
39387  fi
39388done
39389  done
39390IFS=$as_save_IFS
39391
39392  ;;
39393esac
39394fi
39395BUILD_CC=$ac_cv_path_BUILD_CC
39396if test -n "$BUILD_CC"; then
39397  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39398$as_echo "$BUILD_CC" >&6; }
39399else
39400  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39401$as_echo "no" >&6; }
39402fi
39403
39404
39405  test -n "$BUILD_CC" && break
39406done
39407
39408  else
39409    # The variable is set, but is it from the command line or the environment?
39410
39411    # Try to remove the string !BUILD_CC! from our list.
39412    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
39413    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39414      # If it failed, the variable was not from the command line. Ignore it,
39415      # but warn the user (except for BASH, which is always set by the calling BASH).
39416      if test "xBUILD_CC" != xBASH; then
39417        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
39418$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
39419      fi
39420      # Try to locate tool using the code snippet
39421      for ac_prog in cl cc gcc
39422do
39423  # Extract the first word of "$ac_prog", so it can be a program name with args.
39424set dummy $ac_prog; ac_word=$2
39425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39426$as_echo_n "checking for $ac_word... " >&6; }
39427if ${ac_cv_path_BUILD_CC+:} false; then :
39428  $as_echo_n "(cached) " >&6
39429else
39430  case $BUILD_CC in
39431  [\\/]* | ?:[\\/]*)
39432  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39433  ;;
39434  *)
39435  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39436for as_dir in $PATH
39437do
39438  IFS=$as_save_IFS
39439  test -z "$as_dir" && as_dir=.
39440    for ac_exec_ext in '' $ac_executable_extensions; do
39441  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39442    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39443    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39444    break 2
39445  fi
39446done
39447  done
39448IFS=$as_save_IFS
39449
39450  ;;
39451esac
39452fi
39453BUILD_CC=$ac_cv_path_BUILD_CC
39454if test -n "$BUILD_CC"; then
39455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39456$as_echo "$BUILD_CC" >&6; }
39457else
39458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39459$as_echo "no" >&6; }
39460fi
39461
39462
39463  test -n "$BUILD_CC" && break
39464done
39465
39466    else
39467      # If it succeeded, then it was overridden by the user. We will use it
39468      # for the tool.
39469
39470      # First remove it from the list of overridden variables, so we can test
39471      # for unknown variables in the end.
39472      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39473
39474      # Check if the provided tool contains a complete path.
39475      tool_specified="$BUILD_CC"
39476      tool_basename="${tool_specified##*/}"
39477      if test "x$tool_basename" = "x$tool_specified"; then
39478        # A command without a complete path is provided, search $PATH.
39479        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
39480$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
39481        # Extract the first word of "$tool_basename", so it can be a program name with args.
39482set dummy $tool_basename; ac_word=$2
39483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39484$as_echo_n "checking for $ac_word... " >&6; }
39485if ${ac_cv_path_BUILD_CC+:} false; then :
39486  $as_echo_n "(cached) " >&6
39487else
39488  case $BUILD_CC in
39489  [\\/]* | ?:[\\/]*)
39490  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39491  ;;
39492  *)
39493  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39494for as_dir in $PATH
39495do
39496  IFS=$as_save_IFS
39497  test -z "$as_dir" && as_dir=.
39498    for ac_exec_ext in '' $ac_executable_extensions; do
39499  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39500    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39501    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39502    break 2
39503  fi
39504done
39505  done
39506IFS=$as_save_IFS
39507
39508  ;;
39509esac
39510fi
39511BUILD_CC=$ac_cv_path_BUILD_CC
39512if test -n "$BUILD_CC"; then
39513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39514$as_echo "$BUILD_CC" >&6; }
39515else
39516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39517$as_echo "no" >&6; }
39518fi
39519
39520
39521        if test "x$BUILD_CC" = x; then
39522          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39523        fi
39524      else
39525        # Otherwise we believe it is a complete path. Use it as it is.
39526        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
39527$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
39528        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
39529$as_echo_n "checking for BUILD_CC... " >&6; }
39530        if test ! -x "$tool_specified"; then
39531          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39532$as_echo "not found" >&6; }
39533          as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
39534        fi
39535        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39536$as_echo "$tool_specified" >&6; }
39537      fi
39538    fi
39539  fi
39540
39541
39542
39543  # Only process if variable expands to non-empty
39544
39545  if test "x$BUILD_CC" != x; then
39546    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39547
39548  # First separate the path from the arguments. This will split at the first
39549  # space.
39550  complete="$BUILD_CC"
39551  path="${complete%% *}"
39552  tmp="$complete EOL"
39553  arguments="${tmp#* }"
39554
39555  # Input might be given as Windows format, start by converting to
39556  # unix format.
39557  new_path=`$CYGPATH -u "$path"`
39558
39559  # Now try to locate executable using which
39560  new_path=`$WHICH "$new_path" 2> /dev/null`
39561  # bat and cmd files are not always considered executable in cygwin causing which
39562  # to not find them
39563  if test "x$new_path" = x \
39564      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39565      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39566    new_path=`$CYGPATH -u "$path"`
39567  fi
39568  if test "x$new_path" = x; then
39569    # Oops. Which didn't find the executable.
39570    # The splitting of arguments from the executable at a space might have been incorrect,
39571    # since paths with space are more likely in Windows. Give it another try with the whole
39572    # argument.
39573    path="$complete"
39574    arguments="EOL"
39575    new_path=`$CYGPATH -u "$path"`
39576    new_path=`$WHICH "$new_path" 2> /dev/null`
39577    # bat and cmd files are not always considered executable in cygwin causing which
39578    # to not find them
39579    if test "x$new_path" = x \
39580        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39581        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39582      new_path=`$CYGPATH -u "$path"`
39583    fi
39584    if test "x$new_path" = x; then
39585      # It's still not found. Now this is an unrecoverable error.
39586      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39587$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39588      has_space=`$ECHO "$complete" | $GREP " "`
39589      if test "x$has_space" != x; then
39590        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39591$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39592      fi
39593      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39594    fi
39595  fi
39596
39597  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39598  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39599  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39600  # "foo.exe" is OK but "foo" is an error.
39601  #
39602  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39603  # It is also a way to make sure we got the proper file name for the real test later on.
39604  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39605  if test "x$test_shortpath" = x; then
39606    # Short path failed, file does not exist as specified.
39607    # Try adding .exe or .cmd
39608    if test -f "${new_path}.exe"; then
39609      input_to_shortpath="${new_path}.exe"
39610    elif test -f "${new_path}.cmd"; then
39611      input_to_shortpath="${new_path}.cmd"
39612    else
39613      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
39614$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
39615      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39616$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39617      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39618    fi
39619  else
39620    input_to_shortpath="$new_path"
39621  fi
39622
39623  # Call helper function which possibly converts this using DOS-style short mode.
39624  # If so, the updated path is stored in $new_path.
39625  new_path="$input_to_shortpath"
39626
39627  input_path="$input_to_shortpath"
39628  # Check if we need to convert this using DOS-style short mode. If the path
39629  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39630  # take no chances and rewrite it.
39631  # Note: m4 eats our [], so we need to use [ and ] instead.
39632  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39633  if test "x$has_forbidden_chars" != x; then
39634    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39635    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39636    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39637    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39638      # Going to short mode and back again did indeed matter. Since short mode is
39639      # case insensitive, let's make it lowercase to improve readability.
39640      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39641      # Now convert it back to Unix-style (cygpath)
39642      input_path=`$CYGPATH -u "$shortmode_path"`
39643      new_path="$input_path"
39644    fi
39645  fi
39646
39647  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39648  if test "x$test_cygdrive_prefix" = x; then
39649    # As a simple fix, exclude /usr/bin since it's not a real path.
39650    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39651      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39652      # a path prefixed by /cygdrive for fixpath to work.
39653      new_path="$CYGWIN_ROOT_PATH$input_path"
39654    fi
39655  fi
39656
39657  # remove trailing .exe if any
39658  new_path="${new_path/%.exe/}"
39659
39660    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39661
39662  # First separate the path from the arguments. This will split at the first
39663  # space.
39664  complete="$BUILD_CC"
39665  path="${complete%% *}"
39666  tmp="$complete EOL"
39667  arguments="${tmp#* }"
39668
39669  # Input might be given as Windows format, start by converting to
39670  # unix format.
39671  new_path="$path"
39672
39673  windows_path="$new_path"
39674  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39675    unix_path=`$CYGPATH -u "$windows_path"`
39676    new_path="$unix_path"
39677  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39678    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39679    new_path="$unix_path"
39680  fi
39681
39682
39683  # Now try to locate executable using which
39684  new_path=`$WHICH "$new_path" 2> /dev/null`
39685
39686  if test "x$new_path" = x; then
39687    # Oops. Which didn't find the executable.
39688    # The splitting of arguments from the executable at a space might have been incorrect,
39689    # since paths with space are more likely in Windows. Give it another try with the whole
39690    # argument.
39691    path="$complete"
39692    arguments="EOL"
39693    new_path="$path"
39694
39695  windows_path="$new_path"
39696  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39697    unix_path=`$CYGPATH -u "$windows_path"`
39698    new_path="$unix_path"
39699  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39700    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39701    new_path="$unix_path"
39702  fi
39703
39704
39705    new_path=`$WHICH "$new_path" 2> /dev/null`
39706    # bat and cmd files are not always considered executable in MSYS causing which
39707    # to not find them
39708    if test "x$new_path" = x \
39709        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39710        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39711      new_path="$path"
39712
39713  windows_path="$new_path"
39714  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39715    unix_path=`$CYGPATH -u "$windows_path"`
39716    new_path="$unix_path"
39717  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39718    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39719    new_path="$unix_path"
39720  fi
39721
39722    fi
39723
39724    if test "x$new_path" = x; then
39725      # It's still not found. Now this is an unrecoverable error.
39726      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39727$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39728      has_space=`$ECHO "$complete" | $GREP " "`
39729      if test "x$has_space" != x; then
39730        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39731$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39732      fi
39733      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39734    fi
39735  fi
39736
39737  # Now new_path has a complete unix path to the binary
39738  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39739    # Keep paths in /bin as-is, but remove trailing .exe if any
39740    new_path="${new_path/%.exe/}"
39741    # Do not save /bin paths to all_fixpath_prefixes!
39742  else
39743    # Not in mixed or Windows style, start by that.
39744    new_path=`cmd //c echo $new_path`
39745
39746  input_path="$new_path"
39747  # Check if we need to convert this using DOS-style short mode. If the path
39748  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39749  # take no chances and rewrite it.
39750  # Note: m4 eats our [], so we need to use [ and ] instead.
39751  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39752  if test "x$has_forbidden_chars" != x; then
39753    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39754    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39755  fi
39756
39757    # Output is in $new_path
39758
39759  windows_path="$new_path"
39760  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39761    unix_path=`$CYGPATH -u "$windows_path"`
39762    new_path="$unix_path"
39763  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39764    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39765    new_path="$unix_path"
39766  fi
39767
39768    # remove trailing .exe if any
39769    new_path="${new_path/%.exe/}"
39770
39771    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39772    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39773  fi
39774
39775    else
39776      # We're on a unix platform. Hooray! :)
39777      # First separate the path from the arguments. This will split at the first
39778      # space.
39779      complete="$BUILD_CC"
39780      path="${complete%% *}"
39781      tmp="$complete EOL"
39782      arguments="${tmp#* }"
39783
39784      # Cannot rely on the command "which" here since it doesn't always work.
39785      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39786      if test -z "$is_absolute_path"; then
39787        # Path to executable is not absolute. Find it.
39788        IFS_save="$IFS"
39789        IFS=:
39790        for p in $PATH; do
39791          if test -f "$p/$path" && test -x "$p/$path"; then
39792            new_path="$p/$path"
39793            break
39794          fi
39795        done
39796        IFS="$IFS_save"
39797      else
39798        # This is an absolute path, we can use it without further modifications.
39799        new_path="$path"
39800      fi
39801
39802      if test "x$new_path" = x; then
39803        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39804$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39805        has_space=`$ECHO "$complete" | $GREP " "`
39806        if test "x$has_space" != x; then
39807          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39808$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39809        fi
39810        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39811      fi
39812    fi
39813
39814    # Now join together the path and the arguments once again
39815    if test "x$arguments" != xEOL; then
39816      new_complete="$new_path ${arguments% *}"
39817    else
39818      new_complete="$new_path"
39819    fi
39820
39821    if test "x$complete" != "x$new_complete"; then
39822      BUILD_CC="$new_complete"
39823      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
39824$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
39825    fi
39826  fi
39827
39828
39829
39830  # Publish this variable in the help.
39831
39832
39833  if test "x$BUILD_CXX" = x; then
39834    # The variable is not set by user, try to locate tool using the code snippet
39835    for ac_prog in cl CC g++
39836do
39837  # Extract the first word of "$ac_prog", so it can be a program name with args.
39838set dummy $ac_prog; ac_word=$2
39839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39840$as_echo_n "checking for $ac_word... " >&6; }
39841if ${ac_cv_path_BUILD_CXX+:} false; then :
39842  $as_echo_n "(cached) " >&6
39843else
39844  case $BUILD_CXX in
39845  [\\/]* | ?:[\\/]*)
39846  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39847  ;;
39848  *)
39849  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39850for as_dir in $PATH
39851do
39852  IFS=$as_save_IFS
39853  test -z "$as_dir" && as_dir=.
39854    for ac_exec_ext in '' $ac_executable_extensions; do
39855  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39856    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39857    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39858    break 2
39859  fi
39860done
39861  done
39862IFS=$as_save_IFS
39863
39864  ;;
39865esac
39866fi
39867BUILD_CXX=$ac_cv_path_BUILD_CXX
39868if test -n "$BUILD_CXX"; then
39869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39870$as_echo "$BUILD_CXX" >&6; }
39871else
39872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39873$as_echo "no" >&6; }
39874fi
39875
39876
39877  test -n "$BUILD_CXX" && break
39878done
39879
39880  else
39881    # The variable is set, but is it from the command line or the environment?
39882
39883    # Try to remove the string !BUILD_CXX! from our list.
39884    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
39885    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39886      # If it failed, the variable was not from the command line. Ignore it,
39887      # but warn the user (except for BASH, which is always set by the calling BASH).
39888      if test "xBUILD_CXX" != xBASH; then
39889        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
39890$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
39891      fi
39892      # Try to locate tool using the code snippet
39893      for ac_prog in cl CC g++
39894do
39895  # Extract the first word of "$ac_prog", so it can be a program name with args.
39896set dummy $ac_prog; ac_word=$2
39897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39898$as_echo_n "checking for $ac_word... " >&6; }
39899if ${ac_cv_path_BUILD_CXX+:} false; then :
39900  $as_echo_n "(cached) " >&6
39901else
39902  case $BUILD_CXX in
39903  [\\/]* | ?:[\\/]*)
39904  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39905  ;;
39906  *)
39907  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39908for as_dir in $PATH
39909do
39910  IFS=$as_save_IFS
39911  test -z "$as_dir" && as_dir=.
39912    for ac_exec_ext in '' $ac_executable_extensions; do
39913  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39914    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39915    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39916    break 2
39917  fi
39918done
39919  done
39920IFS=$as_save_IFS
39921
39922  ;;
39923esac
39924fi
39925BUILD_CXX=$ac_cv_path_BUILD_CXX
39926if test -n "$BUILD_CXX"; then
39927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39928$as_echo "$BUILD_CXX" >&6; }
39929else
39930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39931$as_echo "no" >&6; }
39932fi
39933
39934
39935  test -n "$BUILD_CXX" && break
39936done
39937
39938    else
39939      # If it succeeded, then it was overridden by the user. We will use it
39940      # for the tool.
39941
39942      # First remove it from the list of overridden variables, so we can test
39943      # for unknown variables in the end.
39944      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39945
39946      # Check if the provided tool contains a complete path.
39947      tool_specified="$BUILD_CXX"
39948      tool_basename="${tool_specified##*/}"
39949      if test "x$tool_basename" = "x$tool_specified"; then
39950        # A command without a complete path is provided, search $PATH.
39951        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
39952$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
39953        # Extract the first word of "$tool_basename", so it can be a program name with args.
39954set dummy $tool_basename; ac_word=$2
39955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39956$as_echo_n "checking for $ac_word... " >&6; }
39957if ${ac_cv_path_BUILD_CXX+:} false; then :
39958  $as_echo_n "(cached) " >&6
39959else
39960  case $BUILD_CXX in
39961  [\\/]* | ?:[\\/]*)
39962  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39963  ;;
39964  *)
39965  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39966for as_dir in $PATH
39967do
39968  IFS=$as_save_IFS
39969  test -z "$as_dir" && as_dir=.
39970    for ac_exec_ext in '' $ac_executable_extensions; do
39971  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39972    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39973    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39974    break 2
39975  fi
39976done
39977  done
39978IFS=$as_save_IFS
39979
39980  ;;
39981esac
39982fi
39983BUILD_CXX=$ac_cv_path_BUILD_CXX
39984if test -n "$BUILD_CXX"; then
39985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39986$as_echo "$BUILD_CXX" >&6; }
39987else
39988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39989$as_echo "no" >&6; }
39990fi
39991
39992
39993        if test "x$BUILD_CXX" = x; then
39994          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39995        fi
39996      else
39997        # Otherwise we believe it is a complete path. Use it as it is.
39998        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
39999$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
40000        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
40001$as_echo_n "checking for BUILD_CXX... " >&6; }
40002        if test ! -x "$tool_specified"; then
40003          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40004$as_echo "not found" >&6; }
40005          as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
40006        fi
40007        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40008$as_echo "$tool_specified" >&6; }
40009      fi
40010    fi
40011  fi
40012
40013
40014
40015  # Only process if variable expands to non-empty
40016
40017  if test "x$BUILD_CXX" != x; then
40018    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40019
40020  # First separate the path from the arguments. This will split at the first
40021  # space.
40022  complete="$BUILD_CXX"
40023  path="${complete%% *}"
40024  tmp="$complete EOL"
40025  arguments="${tmp#* }"
40026
40027  # Input might be given as Windows format, start by converting to
40028  # unix format.
40029  new_path=`$CYGPATH -u "$path"`
40030
40031  # Now try to locate executable using which
40032  new_path=`$WHICH "$new_path" 2> /dev/null`
40033  # bat and cmd files are not always considered executable in cygwin causing which
40034  # to not find them
40035  if test "x$new_path" = x \
40036      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40037      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40038    new_path=`$CYGPATH -u "$path"`
40039  fi
40040  if test "x$new_path" = x; then
40041    # Oops. Which didn't find the executable.
40042    # The splitting of arguments from the executable at a space might have been incorrect,
40043    # since paths with space are more likely in Windows. Give it another try with the whole
40044    # argument.
40045    path="$complete"
40046    arguments="EOL"
40047    new_path=`$CYGPATH -u "$path"`
40048    new_path=`$WHICH "$new_path" 2> /dev/null`
40049    # bat and cmd files are not always considered executable in cygwin causing which
40050    # to not find them
40051    if test "x$new_path" = x \
40052        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40053        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40054      new_path=`$CYGPATH -u "$path"`
40055    fi
40056    if test "x$new_path" = x; then
40057      # It's still not found. Now this is an unrecoverable error.
40058      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40059$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40060      has_space=`$ECHO "$complete" | $GREP " "`
40061      if test "x$has_space" != x; then
40062        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40063$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40064      fi
40065      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40066    fi
40067  fi
40068
40069  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40070  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40071  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40072  # "foo.exe" is OK but "foo" is an error.
40073  #
40074  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40075  # It is also a way to make sure we got the proper file name for the real test later on.
40076  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40077  if test "x$test_shortpath" = x; then
40078    # Short path failed, file does not exist as specified.
40079    # Try adding .exe or .cmd
40080    if test -f "${new_path}.exe"; then
40081      input_to_shortpath="${new_path}.exe"
40082    elif test -f "${new_path}.cmd"; then
40083      input_to_shortpath="${new_path}.cmd"
40084    else
40085      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
40086$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
40087      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40088$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40089      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40090    fi
40091  else
40092    input_to_shortpath="$new_path"
40093  fi
40094
40095  # Call helper function which possibly converts this using DOS-style short mode.
40096  # If so, the updated path is stored in $new_path.
40097  new_path="$input_to_shortpath"
40098
40099  input_path="$input_to_shortpath"
40100  # Check if we need to convert this using DOS-style short mode. If the path
40101  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40102  # take no chances and rewrite it.
40103  # Note: m4 eats our [], so we need to use [ and ] instead.
40104  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40105  if test "x$has_forbidden_chars" != x; then
40106    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40107    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40108    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40109    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40110      # Going to short mode and back again did indeed matter. Since short mode is
40111      # case insensitive, let's make it lowercase to improve readability.
40112      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40113      # Now convert it back to Unix-style (cygpath)
40114      input_path=`$CYGPATH -u "$shortmode_path"`
40115      new_path="$input_path"
40116    fi
40117  fi
40118
40119  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40120  if test "x$test_cygdrive_prefix" = x; then
40121    # As a simple fix, exclude /usr/bin since it's not a real path.
40122    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40123      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40124      # a path prefixed by /cygdrive for fixpath to work.
40125      new_path="$CYGWIN_ROOT_PATH$input_path"
40126    fi
40127  fi
40128
40129  # remove trailing .exe if any
40130  new_path="${new_path/%.exe/}"
40131
40132    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40133
40134  # First separate the path from the arguments. This will split at the first
40135  # space.
40136  complete="$BUILD_CXX"
40137  path="${complete%% *}"
40138  tmp="$complete EOL"
40139  arguments="${tmp#* }"
40140
40141  # Input might be given as Windows format, start by converting to
40142  # unix format.
40143  new_path="$path"
40144
40145  windows_path="$new_path"
40146  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40147    unix_path=`$CYGPATH -u "$windows_path"`
40148    new_path="$unix_path"
40149  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40150    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40151    new_path="$unix_path"
40152  fi
40153
40154
40155  # Now try to locate executable using which
40156  new_path=`$WHICH "$new_path" 2> /dev/null`
40157
40158  if test "x$new_path" = x; then
40159    # Oops. Which didn't find the executable.
40160    # The splitting of arguments from the executable at a space might have been incorrect,
40161    # since paths with space are more likely in Windows. Give it another try with the whole
40162    # argument.
40163    path="$complete"
40164    arguments="EOL"
40165    new_path="$path"
40166
40167  windows_path="$new_path"
40168  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40169    unix_path=`$CYGPATH -u "$windows_path"`
40170    new_path="$unix_path"
40171  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40172    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40173    new_path="$unix_path"
40174  fi
40175
40176
40177    new_path=`$WHICH "$new_path" 2> /dev/null`
40178    # bat and cmd files are not always considered executable in MSYS causing which
40179    # to not find them
40180    if test "x$new_path" = x \
40181        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40182        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40183      new_path="$path"
40184
40185  windows_path="$new_path"
40186  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40187    unix_path=`$CYGPATH -u "$windows_path"`
40188    new_path="$unix_path"
40189  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40190    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40191    new_path="$unix_path"
40192  fi
40193
40194    fi
40195
40196    if test "x$new_path" = x; then
40197      # It's still not found. Now this is an unrecoverable error.
40198      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40199$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40200      has_space=`$ECHO "$complete" | $GREP " "`
40201      if test "x$has_space" != x; then
40202        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40203$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40204      fi
40205      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40206    fi
40207  fi
40208
40209  # Now new_path has a complete unix path to the binary
40210  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40211    # Keep paths in /bin as-is, but remove trailing .exe if any
40212    new_path="${new_path/%.exe/}"
40213    # Do not save /bin paths to all_fixpath_prefixes!
40214  else
40215    # Not in mixed or Windows style, start by that.
40216    new_path=`cmd //c echo $new_path`
40217
40218  input_path="$new_path"
40219  # Check if we need to convert this using DOS-style short mode. If the path
40220  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40221  # take no chances and rewrite it.
40222  # Note: m4 eats our [], so we need to use [ and ] instead.
40223  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40224  if test "x$has_forbidden_chars" != x; then
40225    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40226    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40227  fi
40228
40229    # Output is in $new_path
40230
40231  windows_path="$new_path"
40232  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40233    unix_path=`$CYGPATH -u "$windows_path"`
40234    new_path="$unix_path"
40235  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40236    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40237    new_path="$unix_path"
40238  fi
40239
40240    # remove trailing .exe if any
40241    new_path="${new_path/%.exe/}"
40242
40243    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40244    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40245  fi
40246
40247    else
40248      # We're on a unix platform. Hooray! :)
40249      # First separate the path from the arguments. This will split at the first
40250      # space.
40251      complete="$BUILD_CXX"
40252      path="${complete%% *}"
40253      tmp="$complete EOL"
40254      arguments="${tmp#* }"
40255
40256      # Cannot rely on the command "which" here since it doesn't always work.
40257      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40258      if test -z "$is_absolute_path"; then
40259        # Path to executable is not absolute. Find it.
40260        IFS_save="$IFS"
40261        IFS=:
40262        for p in $PATH; do
40263          if test -f "$p/$path" && test -x "$p/$path"; then
40264            new_path="$p/$path"
40265            break
40266          fi
40267        done
40268        IFS="$IFS_save"
40269      else
40270        # This is an absolute path, we can use it without further modifications.
40271        new_path="$path"
40272      fi
40273
40274      if test "x$new_path" = x; then
40275        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40276$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40277        has_space=`$ECHO "$complete" | $GREP " "`
40278        if test "x$has_space" != x; then
40279          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40280$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40281        fi
40282        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40283      fi
40284    fi
40285
40286    # Now join together the path and the arguments once again
40287    if test "x$arguments" != xEOL; then
40288      new_complete="$new_path ${arguments% *}"
40289    else
40290      new_complete="$new_path"
40291    fi
40292
40293    if test "x$complete" != "x$new_complete"; then
40294      BUILD_CXX="$new_complete"
40295      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
40296$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
40297    fi
40298  fi
40299
40300
40301
40302  # Publish this variable in the help.
40303
40304
40305  if test "x$BUILD_LD" = x; then
40306    # The variable is not set by user, try to locate tool using the code snippet
40307    for ac_prog in ld
40308do
40309  # Extract the first word of "$ac_prog", so it can be a program name with args.
40310set dummy $ac_prog; ac_word=$2
40311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40312$as_echo_n "checking for $ac_word... " >&6; }
40313if ${ac_cv_path_BUILD_LD+:} false; then :
40314  $as_echo_n "(cached) " >&6
40315else
40316  case $BUILD_LD in
40317  [\\/]* | ?:[\\/]*)
40318  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40319  ;;
40320  *)
40321  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40322for as_dir in $PATH
40323do
40324  IFS=$as_save_IFS
40325  test -z "$as_dir" && as_dir=.
40326    for ac_exec_ext in '' $ac_executable_extensions; do
40327  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40328    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40329    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40330    break 2
40331  fi
40332done
40333  done
40334IFS=$as_save_IFS
40335
40336  ;;
40337esac
40338fi
40339BUILD_LD=$ac_cv_path_BUILD_LD
40340if test -n "$BUILD_LD"; then
40341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40342$as_echo "$BUILD_LD" >&6; }
40343else
40344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40345$as_echo "no" >&6; }
40346fi
40347
40348
40349  test -n "$BUILD_LD" && break
40350done
40351
40352  else
40353    # The variable is set, but is it from the command line or the environment?
40354
40355    # Try to remove the string !BUILD_LD! from our list.
40356    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_LD!/}
40357    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40358      # If it failed, the variable was not from the command line. Ignore it,
40359      # but warn the user (except for BASH, which is always set by the calling BASH).
40360      if test "xBUILD_LD" != xBASH; then
40361        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&5
40362$as_echo "$as_me: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&2;}
40363      fi
40364      # Try to locate tool using the code snippet
40365      for ac_prog in ld
40366do
40367  # Extract the first word of "$ac_prog", so it can be a program name with args.
40368set dummy $ac_prog; ac_word=$2
40369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40370$as_echo_n "checking for $ac_word... " >&6; }
40371if ${ac_cv_path_BUILD_LD+:} false; then :
40372  $as_echo_n "(cached) " >&6
40373else
40374  case $BUILD_LD in
40375  [\\/]* | ?:[\\/]*)
40376  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40377  ;;
40378  *)
40379  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40380for as_dir in $PATH
40381do
40382  IFS=$as_save_IFS
40383  test -z "$as_dir" && as_dir=.
40384    for ac_exec_ext in '' $ac_executable_extensions; do
40385  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40386    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40387    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40388    break 2
40389  fi
40390done
40391  done
40392IFS=$as_save_IFS
40393
40394  ;;
40395esac
40396fi
40397BUILD_LD=$ac_cv_path_BUILD_LD
40398if test -n "$BUILD_LD"; then
40399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40400$as_echo "$BUILD_LD" >&6; }
40401else
40402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40403$as_echo "no" >&6; }
40404fi
40405
40406
40407  test -n "$BUILD_LD" && break
40408done
40409
40410    else
40411      # If it succeeded, then it was overridden by the user. We will use it
40412      # for the tool.
40413
40414      # First remove it from the list of overridden variables, so we can test
40415      # for unknown variables in the end.
40416      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40417
40418      # Check if the provided tool contains a complete path.
40419      tool_specified="$BUILD_LD"
40420      tool_basename="${tool_specified##*/}"
40421      if test "x$tool_basename" = "x$tool_specified"; then
40422        # A command without a complete path is provided, search $PATH.
40423        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_LD=$tool_basename" >&5
40424$as_echo "$as_me: Will search for user supplied tool BUILD_LD=$tool_basename" >&6;}
40425        # Extract the first word of "$tool_basename", so it can be a program name with args.
40426set dummy $tool_basename; ac_word=$2
40427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40428$as_echo_n "checking for $ac_word... " >&6; }
40429if ${ac_cv_path_BUILD_LD+:} false; then :
40430  $as_echo_n "(cached) " >&6
40431else
40432  case $BUILD_LD in
40433  [\\/]* | ?:[\\/]*)
40434  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40435  ;;
40436  *)
40437  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40438for as_dir in $PATH
40439do
40440  IFS=$as_save_IFS
40441  test -z "$as_dir" && as_dir=.
40442    for ac_exec_ext in '' $ac_executable_extensions; do
40443  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40444    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40445    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40446    break 2
40447  fi
40448done
40449  done
40450IFS=$as_save_IFS
40451
40452  ;;
40453esac
40454fi
40455BUILD_LD=$ac_cv_path_BUILD_LD
40456if test -n "$BUILD_LD"; then
40457  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40458$as_echo "$BUILD_LD" >&6; }
40459else
40460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40461$as_echo "no" >&6; }
40462fi
40463
40464
40465        if test "x$BUILD_LD" = x; then
40466          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40467        fi
40468      else
40469        # Otherwise we believe it is a complete path. Use it as it is.
40470        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_LD=$tool_specified" >&5
40471$as_echo "$as_me: Will use user supplied tool BUILD_LD=$tool_specified" >&6;}
40472        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_LD" >&5
40473$as_echo_n "checking for BUILD_LD... " >&6; }
40474        if test ! -x "$tool_specified"; then
40475          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40476$as_echo "not found" >&6; }
40477          as_fn_error $? "User supplied tool BUILD_LD=$tool_specified does not exist or is not executable" "$LINENO" 5
40478        fi
40479        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40480$as_echo "$tool_specified" >&6; }
40481      fi
40482    fi
40483  fi
40484
40485
40486
40487  # Only process if variable expands to non-empty
40488
40489  if test "x$BUILD_LD" != x; then
40490    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40491
40492  # First separate the path from the arguments. This will split at the first
40493  # space.
40494  complete="$BUILD_LD"
40495  path="${complete%% *}"
40496  tmp="$complete EOL"
40497  arguments="${tmp#* }"
40498
40499  # Input might be given as Windows format, start by converting to
40500  # unix format.
40501  new_path=`$CYGPATH -u "$path"`
40502
40503  # Now try to locate executable using which
40504  new_path=`$WHICH "$new_path" 2> /dev/null`
40505  # bat and cmd files are not always considered executable in cygwin causing which
40506  # to not find them
40507  if test "x$new_path" = x \
40508      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40509      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40510    new_path=`$CYGPATH -u "$path"`
40511  fi
40512  if test "x$new_path" = x; then
40513    # Oops. Which didn't find the executable.
40514    # The splitting of arguments from the executable at a space might have been incorrect,
40515    # since paths with space are more likely in Windows. Give it another try with the whole
40516    # argument.
40517    path="$complete"
40518    arguments="EOL"
40519    new_path=`$CYGPATH -u "$path"`
40520    new_path=`$WHICH "$new_path" 2> /dev/null`
40521    # bat and cmd files are not always considered executable in cygwin causing which
40522    # to not find them
40523    if test "x$new_path" = x \
40524        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40525        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40526      new_path=`$CYGPATH -u "$path"`
40527    fi
40528    if test "x$new_path" = x; then
40529      # It's still not found. Now this is an unrecoverable error.
40530      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40531$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40532      has_space=`$ECHO "$complete" | $GREP " "`
40533      if test "x$has_space" != x; then
40534        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40535$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40536      fi
40537      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40538    fi
40539  fi
40540
40541  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40542  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40543  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40544  # "foo.exe" is OK but "foo" is an error.
40545  #
40546  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40547  # It is also a way to make sure we got the proper file name for the real test later on.
40548  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40549  if test "x$test_shortpath" = x; then
40550    # Short path failed, file does not exist as specified.
40551    # Try adding .exe or .cmd
40552    if test -f "${new_path}.exe"; then
40553      input_to_shortpath="${new_path}.exe"
40554    elif test -f "${new_path}.cmd"; then
40555      input_to_shortpath="${new_path}.cmd"
40556    else
40557      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
40558$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
40559      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40560$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40561      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40562    fi
40563  else
40564    input_to_shortpath="$new_path"
40565  fi
40566
40567  # Call helper function which possibly converts this using DOS-style short mode.
40568  # If so, the updated path is stored in $new_path.
40569  new_path="$input_to_shortpath"
40570
40571  input_path="$input_to_shortpath"
40572  # Check if we need to convert this using DOS-style short mode. If the path
40573  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40574  # take no chances and rewrite it.
40575  # Note: m4 eats our [], so we need to use [ and ] instead.
40576  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40577  if test "x$has_forbidden_chars" != x; then
40578    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40579    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40580    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40581    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40582      # Going to short mode and back again did indeed matter. Since short mode is
40583      # case insensitive, let's make it lowercase to improve readability.
40584      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40585      # Now convert it back to Unix-style (cygpath)
40586      input_path=`$CYGPATH -u "$shortmode_path"`
40587      new_path="$input_path"
40588    fi
40589  fi
40590
40591  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40592  if test "x$test_cygdrive_prefix" = x; then
40593    # As a simple fix, exclude /usr/bin since it's not a real path.
40594    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40595      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40596      # a path prefixed by /cygdrive for fixpath to work.
40597      new_path="$CYGWIN_ROOT_PATH$input_path"
40598    fi
40599  fi
40600
40601  # remove trailing .exe if any
40602  new_path="${new_path/%.exe/}"
40603
40604    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40605
40606  # First separate the path from the arguments. This will split at the first
40607  # space.
40608  complete="$BUILD_LD"
40609  path="${complete%% *}"
40610  tmp="$complete EOL"
40611  arguments="${tmp#* }"
40612
40613  # Input might be given as Windows format, start by converting to
40614  # unix format.
40615  new_path="$path"
40616
40617  windows_path="$new_path"
40618  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40619    unix_path=`$CYGPATH -u "$windows_path"`
40620    new_path="$unix_path"
40621  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40622    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40623    new_path="$unix_path"
40624  fi
40625
40626
40627  # Now try to locate executable using which
40628  new_path=`$WHICH "$new_path" 2> /dev/null`
40629
40630  if test "x$new_path" = x; then
40631    # Oops. Which didn't find the executable.
40632    # The splitting of arguments from the executable at a space might have been incorrect,
40633    # since paths with space are more likely in Windows. Give it another try with the whole
40634    # argument.
40635    path="$complete"
40636    arguments="EOL"
40637    new_path="$path"
40638
40639  windows_path="$new_path"
40640  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40641    unix_path=`$CYGPATH -u "$windows_path"`
40642    new_path="$unix_path"
40643  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40644    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40645    new_path="$unix_path"
40646  fi
40647
40648
40649    new_path=`$WHICH "$new_path" 2> /dev/null`
40650    # bat and cmd files are not always considered executable in MSYS causing which
40651    # to not find them
40652    if test "x$new_path" = x \
40653        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40654        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40655      new_path="$path"
40656
40657  windows_path="$new_path"
40658  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40659    unix_path=`$CYGPATH -u "$windows_path"`
40660    new_path="$unix_path"
40661  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40662    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40663    new_path="$unix_path"
40664  fi
40665
40666    fi
40667
40668    if test "x$new_path" = x; then
40669      # It's still not found. Now this is an unrecoverable error.
40670      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40671$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40672      has_space=`$ECHO "$complete" | $GREP " "`
40673      if test "x$has_space" != x; then
40674        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40675$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40676      fi
40677      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40678    fi
40679  fi
40680
40681  # Now new_path has a complete unix path to the binary
40682  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40683    # Keep paths in /bin as-is, but remove trailing .exe if any
40684    new_path="${new_path/%.exe/}"
40685    # Do not save /bin paths to all_fixpath_prefixes!
40686  else
40687    # Not in mixed or Windows style, start by that.
40688    new_path=`cmd //c echo $new_path`
40689
40690  input_path="$new_path"
40691  # Check if we need to convert this using DOS-style short mode. If the path
40692  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40693  # take no chances and rewrite it.
40694  # Note: m4 eats our [], so we need to use [ and ] instead.
40695  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40696  if test "x$has_forbidden_chars" != x; then
40697    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40698    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40699  fi
40700
40701    # Output is in $new_path
40702
40703  windows_path="$new_path"
40704  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40705    unix_path=`$CYGPATH -u "$windows_path"`
40706    new_path="$unix_path"
40707  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40708    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40709    new_path="$unix_path"
40710  fi
40711
40712    # remove trailing .exe if any
40713    new_path="${new_path/%.exe/}"
40714
40715    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40716    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40717  fi
40718
40719    else
40720      # We're on a unix platform. Hooray! :)
40721      # First separate the path from the arguments. This will split at the first
40722      # space.
40723      complete="$BUILD_LD"
40724      path="${complete%% *}"
40725      tmp="$complete EOL"
40726      arguments="${tmp#* }"
40727
40728      # Cannot rely on the command "which" here since it doesn't always work.
40729      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40730      if test -z "$is_absolute_path"; then
40731        # Path to executable is not absolute. Find it.
40732        IFS_save="$IFS"
40733        IFS=:
40734        for p in $PATH; do
40735          if test -f "$p/$path" && test -x "$p/$path"; then
40736            new_path="$p/$path"
40737            break
40738          fi
40739        done
40740        IFS="$IFS_save"
40741      else
40742        # This is an absolute path, we can use it without further modifications.
40743        new_path="$path"
40744      fi
40745
40746      if test "x$new_path" = x; then
40747        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40748$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40749        has_space=`$ECHO "$complete" | $GREP " "`
40750        if test "x$has_space" != x; then
40751          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40752$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40753        fi
40754        as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40755      fi
40756    fi
40757
40758    # Now join together the path and the arguments once again
40759    if test "x$arguments" != xEOL; then
40760      new_complete="$new_path ${arguments% *}"
40761    else
40762      new_complete="$new_path"
40763    fi
40764
40765    if test "x$complete" != "x$new_complete"; then
40766      BUILD_LD="$new_complete"
40767      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
40768$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
40769    fi
40770  fi
40771
40772  else
40773    # If we are not cross compiling, use the normal target compilers for
40774    # building the build platform executables.
40775    BUILD_CC="$CC"
40776    BUILD_CXX="$CXX"
40777    BUILD_LD="$LD"
40778  fi
40779
40780
40781
40782
40783
40784
40785  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40786    # For hotspot, we need these in Windows mixed path,
40787    # so rewrite them all. Need added .exe suffix.
40788    HOTSPOT_CXX="$CXX.exe"
40789    HOTSPOT_LD="$LD.exe"
40790    HOTSPOT_MT="$MT.exe"
40791    HOTSPOT_RC="$RC.exe"
40792
40793  unix_path="$HOTSPOT_CXX"
40794  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40795    windows_path=`$CYGPATH -m "$unix_path"`
40796    HOTSPOT_CXX="$windows_path"
40797  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40798    windows_path=`cmd //c echo $unix_path`
40799    HOTSPOT_CXX="$windows_path"
40800  fi
40801
40802
40803  unix_path="$HOTSPOT_LD"
40804  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40805    windows_path=`$CYGPATH -m "$unix_path"`
40806    HOTSPOT_LD="$windows_path"
40807  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40808    windows_path=`cmd //c echo $unix_path`
40809    HOTSPOT_LD="$windows_path"
40810  fi
40811
40812
40813  unix_path="$HOTSPOT_MT"
40814  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40815    windows_path=`$CYGPATH -m "$unix_path"`
40816    HOTSPOT_MT="$windows_path"
40817  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40818    windows_path=`cmd //c echo $unix_path`
40819    HOTSPOT_MT="$windows_path"
40820  fi
40821
40822
40823  unix_path="$HOTSPOT_RC"
40824  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40825    windows_path=`$CYGPATH -m "$unix_path"`
40826    HOTSPOT_RC="$windows_path"
40827  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40828    windows_path=`cmd //c echo $unix_path`
40829    HOTSPOT_RC="$windows_path"
40830  fi
40831
40832
40833
40834  else
40835    HOTSPOT_CXX="$CXX"
40836    HOTSPOT_LD="$LD"
40837  fi
40838
40839
40840
40841  if test  "x$TOOLCHAIN_TYPE" = xclang; then
40842    USE_CLANG=true
40843  fi
40844
40845
40846
40847
40848
40849  # The package path is used only on macosx?
40850  # FIXME: clean this up, and/or move it elsewhere.
40851  PACKAGE_PATH=/opt/local
40852
40853
40854  # Check for extra potential brokenness.
40855  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40856    # On Windows, double-check that we got the right compiler.
40857    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
40858    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
40859    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
40860      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
40861        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
40862      fi
40863    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
40864      if test "x$COMPILER_CPU_TEST" != "xx64"; then
40865        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
40866      fi
40867    fi
40868  fi
40869
40870  if test "x$TOOLCHAIN_TYPE" = xgcc; then
40871    # If this is a --hash-style=gnu system, use --hash-style=both, why?
40872    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
40873    # This is later checked when setting flags.
40874
40875    # "-Og" suppported for GCC 4.8 and later
40876    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
40877
40878  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
40879$as_echo_n "checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
40880  supports=yes
40881
40882  saved_cflags="$CFLAGS"
40883  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
40884  ac_ext=c
40885ac_cpp='$CPP $CPPFLAGS'
40886ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40887ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40888ac_compiler_gnu=$ac_cv_c_compiler_gnu
40889
40890  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40891/* end confdefs.h.  */
40892int i;
40893_ACEOF
40894if ac_fn_c_try_compile "$LINENO"; then :
40895
40896else
40897  supports=no
40898fi
40899rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40900  ac_ext=cpp
40901ac_cpp='$CXXCPP $CPPFLAGS'
40902ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40903ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40904ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40905
40906  CFLAGS="$saved_cflags"
40907
40908  saved_cxxflags="$CXXFLAGS"
40909  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
40910  ac_ext=cpp
40911ac_cpp='$CXXCPP $CPPFLAGS'
40912ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40913ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40914ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40915
40916  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40917/* end confdefs.h.  */
40918int i;
40919_ACEOF
40920if ac_fn_cxx_try_compile "$LINENO"; then :
40921
40922else
40923  supports=no
40924fi
40925rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40926  ac_ext=cpp
40927ac_cpp='$CXXCPP $CPPFLAGS'
40928ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40929ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40930ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40931
40932  CXXFLAGS="$saved_cxxflags"
40933
40934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40935$as_echo "$supports" >&6; }
40936  if test "x$supports" = "xyes" ; then
40937    HAS_CFLAG_OPTIMIZE_DEBUG=true
40938  else
40939    HAS_CFLAG_OPTIMIZE_DEBUG=false
40940  fi
40941
40942
40943    # "-z relro" supported in GNU binutils 2.17 and later
40944    LINKER_RELRO_FLAG="-Xlinker -z -Xlinker relro"
40945
40946  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
40947$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
40948  supports=yes
40949
40950  saved_ldflags="$LDFLAGS"
40951  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
40952  ac_ext=c
40953ac_cpp='$CPP $CPPFLAGS'
40954ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40955ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40956ac_compiler_gnu=$ac_cv_c_compiler_gnu
40957
40958  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40959/* end confdefs.h.  */
40960
40961int
40962main ()
40963{
40964
40965  ;
40966  return 0;
40967}
40968_ACEOF
40969if ac_fn_c_try_link "$LINENO"; then :
40970
40971else
40972  supports=no
40973fi
40974rm -f core conftest.err conftest.$ac_objext \
40975    conftest$ac_exeext conftest.$ac_ext
40976  ac_ext=cpp
40977ac_cpp='$CXXCPP $CPPFLAGS'
40978ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40979ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40980ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40981
40982  LDFLAGS="$saved_ldflags"
40983
40984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40985$as_echo "$supports" >&6; }
40986  if test "x$supports" = "xyes" ; then
40987    HAS_LINKER_RELRO=true
40988  else
40989    HAS_LINKER_RELRO=false
40990  fi
40991
40992
40993    # "-z now" supported in GNU binutils 2.11 and later
40994    LINKER_NOW_FLAG="-Xlinker -z -Xlinker now"
40995
40996  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
40997$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
40998  supports=yes
40999
41000  saved_ldflags="$LDFLAGS"
41001  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
41002  ac_ext=c
41003ac_cpp='$CPP $CPPFLAGS'
41004ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41005ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41006ac_compiler_gnu=$ac_cv_c_compiler_gnu
41007
41008  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41009/* end confdefs.h.  */
41010
41011int
41012main ()
41013{
41014
41015  ;
41016  return 0;
41017}
41018_ACEOF
41019if ac_fn_c_try_link "$LINENO"; then :
41020
41021else
41022  supports=no
41023fi
41024rm -f core conftest.err conftest.$ac_objext \
41025    conftest$ac_exeext conftest.$ac_ext
41026  ac_ext=cpp
41027ac_cpp='$CXXCPP $CPPFLAGS'
41028ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41029ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41030ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41031
41032  LDFLAGS="$saved_ldflags"
41033
41034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41035$as_echo "$supports" >&6; }
41036  if test "x$supports" = "xyes" ; then
41037    HAS_LINKER_NOW=true
41038  else
41039    HAS_LINKER_NOW=false
41040  fi
41041
41042  fi
41043
41044  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
41045  # in executable.'
41046  USING_BROKEN_SUSE_LD=no
41047  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
41048    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
41049$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
41050    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
41051    $ECHO "int main() { }" > main.c
41052    if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
41053      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41054$as_echo "no" >&6; }
41055      USING_BROKEN_SUSE_LD=no
41056    else
41057      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41058$as_echo "yes" >&6; }
41059      USING_BROKEN_SUSE_LD=yes
41060    fi
41061    rm -rf version-script.map main.c a.out
41062  fi
41063
41064
41065
41066# Setup the JTReg Regression Test Harness.
41067
41068
41069# Check whether --with-jtreg was given.
41070if test "${with_jtreg+set}" = set; then :
41071  withval=$with_jtreg;
41072else
41073  with_jtreg=no
41074fi
41075
41076
41077  if test "x$with_jtreg" = xno; then
41078    # jtreg disabled
41079    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
41080$as_echo_n "checking for jtreg... " >&6; }
41081    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41082$as_echo "no" >&6; }
41083  else
41084    if test "x$with_jtreg" != xyes; then
41085      # with path specified.
41086      JT_HOME="$with_jtreg"
41087    fi
41088
41089    if test "x$JT_HOME" != x; then
41090      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
41091$as_echo_n "checking for jtreg... " >&6; }
41092
41093      # use JT_HOME enviroment var.
41094
41095  # Only process if variable expands to non-empty
41096
41097  if test "x$JT_HOME" != x; then
41098    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41099
41100  # Input might be given as Windows format, start by converting to
41101  # unix format.
41102  path="$JT_HOME"
41103  new_path=`$CYGPATH -u "$path"`
41104
41105  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41106  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41107  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41108  # "foo.exe" is OK but "foo" is an error.
41109  #
41110  # This test is therefore slightly more accurate than "test -f" to check for file precense.
41111  # It is also a way to make sure we got the proper file name for the real test later on.
41112  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41113  if test "x$test_shortpath" = x; then
41114    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
41115$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
41116    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
41117  fi
41118
41119  # Call helper function which possibly converts this using DOS-style short mode.
41120  # If so, the updated path is stored in $new_path.
41121
41122  input_path="$new_path"
41123  # Check if we need to convert this using DOS-style short mode. If the path
41124  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41125  # take no chances and rewrite it.
41126  # Note: m4 eats our [], so we need to use [ and ] instead.
41127  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41128  if test "x$has_forbidden_chars" != x; then
41129    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41130    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41131    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41132    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41133      # Going to short mode and back again did indeed matter. Since short mode is
41134      # case insensitive, let's make it lowercase to improve readability.
41135      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41136      # Now convert it back to Unix-style (cygpath)
41137      input_path=`$CYGPATH -u "$shortmode_path"`
41138      new_path="$input_path"
41139    fi
41140  fi
41141
41142  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41143  if test "x$test_cygdrive_prefix" = x; then
41144    # As a simple fix, exclude /usr/bin since it's not a real path.
41145    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
41146      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41147      # a path prefixed by /cygdrive for fixpath to work.
41148      new_path="$CYGWIN_ROOT_PATH$input_path"
41149    fi
41150  fi
41151
41152
41153  if test "x$path" != "x$new_path"; then
41154    JT_HOME="$new_path"
41155    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
41156$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
41157  fi
41158
41159    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41160
41161  path="$JT_HOME"
41162  has_colon=`$ECHO $path | $GREP ^.:`
41163  new_path="$path"
41164  if test "x$has_colon" = x; then
41165    # Not in mixed or Windows style, start by that.
41166    new_path=`cmd //c echo $path`
41167  fi
41168
41169
41170  input_path="$new_path"
41171  # Check if we need to convert this using DOS-style short mode. If the path
41172  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41173  # take no chances and rewrite it.
41174  # Note: m4 eats our [], so we need to use [ and ] instead.
41175  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41176  if test "x$has_forbidden_chars" != x; then
41177    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41178    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41179  fi
41180
41181
41182  windows_path="$new_path"
41183  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41184    unix_path=`$CYGPATH -u "$windows_path"`
41185    new_path="$unix_path"
41186  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41187    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41188    new_path="$unix_path"
41189  fi
41190
41191  if test "x$path" != "x$new_path"; then
41192    JT_HOME="$new_path"
41193    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
41194$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
41195  fi
41196
41197  # Save the first 10 bytes of this path to the storage, so fixpath can work.
41198  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41199
41200    else
41201      # We're on a unix platform. Hooray! :)
41202      path="$JT_HOME"
41203      has_space=`$ECHO "$path" | $GREP " "`
41204      if test "x$has_space" != x; then
41205        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
41206$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
41207        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
41208      fi
41209
41210      # Use eval to expand a potential ~
41211      eval path="$path"
41212      if test ! -f "$path" && test ! -d "$path"; then
41213        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
41214      fi
41215
41216      JT_HOME="`cd "$path"; $THEPWDCMD -L`"
41217    fi
41218  fi
41219
41220
41221      # jtreg win32 script works for everybody
41222      JTREGEXE="$JT_HOME/bin/jtreg"
41223
41224      if test ! -f "$JTREGEXE"; then
41225        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
41226      fi
41227
41228      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41229$as_echo "$JTREGEXE" >&6; }
41230    else
41231      # try to find jtreg on path
41232
41233
41234
41235  # Publish this variable in the help.
41236
41237
41238  if test "x$JTREGEXE" = x; then
41239    # The variable is not set by user, try to locate tool using the code snippet
41240    for ac_prog in jtreg
41241do
41242  # Extract the first word of "$ac_prog", so it can be a program name with args.
41243set dummy $ac_prog; ac_word=$2
41244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41245$as_echo_n "checking for $ac_word... " >&6; }
41246if ${ac_cv_path_JTREGEXE+:} false; then :
41247  $as_echo_n "(cached) " >&6
41248else
41249  case $JTREGEXE in
41250  [\\/]* | ?:[\\/]*)
41251  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41252  ;;
41253  *)
41254  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41255for as_dir in $PATH
41256do
41257  IFS=$as_save_IFS
41258  test -z "$as_dir" && as_dir=.
41259    for ac_exec_ext in '' $ac_executable_extensions; do
41260  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41261    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41262    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41263    break 2
41264  fi
41265done
41266  done
41267IFS=$as_save_IFS
41268
41269  ;;
41270esac
41271fi
41272JTREGEXE=$ac_cv_path_JTREGEXE
41273if test -n "$JTREGEXE"; then
41274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41275$as_echo "$JTREGEXE" >&6; }
41276else
41277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41278$as_echo "no" >&6; }
41279fi
41280
41281
41282  test -n "$JTREGEXE" && break
41283done
41284
41285  else
41286    # The variable is set, but is it from the command line or the environment?
41287
41288    # Try to remove the string !JTREGEXE! from our list.
41289    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
41290    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41291      # If it failed, the variable was not from the command line. Ignore it,
41292      # but warn the user (except for BASH, which is always set by the calling BASH).
41293      if test "xJTREGEXE" != xBASH; then
41294        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
41295$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
41296      fi
41297      # Try to locate tool using the code snippet
41298      for ac_prog in jtreg
41299do
41300  # Extract the first word of "$ac_prog", so it can be a program name with args.
41301set dummy $ac_prog; ac_word=$2
41302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41303$as_echo_n "checking for $ac_word... " >&6; }
41304if ${ac_cv_path_JTREGEXE+:} false; then :
41305  $as_echo_n "(cached) " >&6
41306else
41307  case $JTREGEXE in
41308  [\\/]* | ?:[\\/]*)
41309  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41310  ;;
41311  *)
41312  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41313for as_dir in $PATH
41314do
41315  IFS=$as_save_IFS
41316  test -z "$as_dir" && as_dir=.
41317    for ac_exec_ext in '' $ac_executable_extensions; do
41318  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41319    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41320    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41321    break 2
41322  fi
41323done
41324  done
41325IFS=$as_save_IFS
41326
41327  ;;
41328esac
41329fi
41330JTREGEXE=$ac_cv_path_JTREGEXE
41331if test -n "$JTREGEXE"; then
41332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41333$as_echo "$JTREGEXE" >&6; }
41334else
41335  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41336$as_echo "no" >&6; }
41337fi
41338
41339
41340  test -n "$JTREGEXE" && break
41341done
41342
41343    else
41344      # If it succeeded, then it was overridden by the user. We will use it
41345      # for the tool.
41346
41347      # First remove it from the list of overridden variables, so we can test
41348      # for unknown variables in the end.
41349      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41350
41351      # Check if the provided tool contains a complete path.
41352      tool_specified="$JTREGEXE"
41353      tool_basename="${tool_specified##*/}"
41354      if test "x$tool_basename" = "x$tool_specified"; then
41355        # A command without a complete path is provided, search $PATH.
41356        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
41357$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
41358        # Extract the first word of "$tool_basename", so it can be a program name with args.
41359set dummy $tool_basename; ac_word=$2
41360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41361$as_echo_n "checking for $ac_word... " >&6; }
41362if ${ac_cv_path_JTREGEXE+:} false; then :
41363  $as_echo_n "(cached) " >&6
41364else
41365  case $JTREGEXE in
41366  [\\/]* | ?:[\\/]*)
41367  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41368  ;;
41369  *)
41370  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41371for as_dir in $PATH
41372do
41373  IFS=$as_save_IFS
41374  test -z "$as_dir" && as_dir=.
41375    for ac_exec_ext in '' $ac_executable_extensions; do
41376  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41377    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41378    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41379    break 2
41380  fi
41381done
41382  done
41383IFS=$as_save_IFS
41384
41385  ;;
41386esac
41387fi
41388JTREGEXE=$ac_cv_path_JTREGEXE
41389if test -n "$JTREGEXE"; then
41390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41391$as_echo "$JTREGEXE" >&6; }
41392else
41393  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41394$as_echo "no" >&6; }
41395fi
41396
41397
41398        if test "x$JTREGEXE" = x; then
41399          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41400        fi
41401      else
41402        # Otherwise we believe it is a complete path. Use it as it is.
41403        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
41404$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
41405        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
41406$as_echo_n "checking for JTREGEXE... " >&6; }
41407        if test ! -x "$tool_specified"; then
41408          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41409$as_echo "not found" >&6; }
41410          as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
41411        fi
41412        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41413$as_echo "$tool_specified" >&6; }
41414      fi
41415    fi
41416  fi
41417
41418
41419
41420  if test "x$JTREGEXE" = x; then
41421    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
41422  fi
41423
41424
41425      JT_HOME="`$DIRNAME $JTREGEXE`"
41426    fi
41427  fi
41428
41429
41430
41431
41432
41433
41434  # Option used to tell the compiler whether to create 32- or 64-bit executables
41435  if test "x$TOOLCHAIN_TYPE" = xxlc; then
41436    COMPILER_TARGET_BITS_FLAG="-q"
41437  else
41438    COMPILER_TARGET_BITS_FLAG="-m"
41439  fi
41440
41441
41442  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
41443  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41444    ARFLAGS="-r"
41445  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41446    ARFLAGS="-X64"
41447  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
41448    # lib.exe is used as AR to create static libraries.
41449    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
41450  else
41451    ARFLAGS=""
41452  fi
41453
41454
41455  ## Setup strip.
41456  # FIXME: should this really be per platform, or should it be per toolchain type?
41457  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
41458  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
41459  if test "x$OPENJDK_TARGET_OS" = xlinux; then
41460    STRIPFLAGS="-g"
41461  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
41462    STRIPFLAGS="-x"
41463  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41464    STRIPFLAGS="-S"
41465  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41466    STRIPFLAGS="-X32_64"
41467  fi
41468
41469  if test "x$OPENJDK_TARGET_OS" != xwindows; then
41470    POST_STRIP_CMD="$STRIP $STRIPFLAGS"
41471  fi
41472
41473
41474  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41475    CC_OUT_OPTION=-Fo
41476    EXE_OUT_OPTION=-out:
41477    LD_OUT_OPTION=-out:
41478    AR_OUT_OPTION=-out:
41479  else
41480    # The option used to specify the target .o,.a or .so file.
41481    # When compiling, how to specify the to be created object file.
41482    CC_OUT_OPTION='-o$(SPACE)'
41483    # When linking, how to specify the to be created executable.
41484    EXE_OUT_OPTION='-o$(SPACE)'
41485    # When linking, how to specify the to be created dynamically linkable library.
41486    LD_OUT_OPTION='-o$(SPACE)'
41487    # When archiving, how to specify the to be create static archive for object files.
41488    AR_OUT_OPTION='rcs$(SPACE)'
41489  fi
41490
41491
41492
41493
41494
41495  # On Windows, we need to set RC flags.
41496  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41497    RC_FLAGS="-nologo -l0x409"
41498    if test "x$VARIANT" = xOPT; then
41499      RC_FLAGS="$RC_FLAGS -DNDEBUG"
41500    fi
41501
41502    # The version variables used to create RC_FLAGS may be overridden
41503    # in a custom configure script, or possibly the command line.
41504    # Let those variables be expanded at make time in spec.gmk.
41505    # The \$ are escaped to the shell, and the $(...) variables
41506    # are evaluated by make.
41507    RC_FLAGS="$RC_FLAGS \
41508        -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
41509        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
41510        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
41511        -D\"JDK_VER=\$(VERSION_NUMBER_FOUR_POSITIONS)\" \
41512        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
41513        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
41514        -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
41515  fi
41516
41517
41518  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41519    # silence copyright notice and other headers.
41520    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
41521  fi
41522
41523  if test "x$SYSROOT" != "x"; then
41524    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41525      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41526        # Solaris Studio does not have a concept of sysroot. Instead we must
41527        # make sure the default include and lib dirs are appended to each
41528        # compile and link command line.
41529        SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
41530        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
41531            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
41532            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
41533      fi
41534    elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41535      # Apple only wants -isysroot <path>, but we also need -iframework<path>/System/Library/Frameworks
41536      SYSROOT_CFLAGS="-isysroot \"$SYSROOT\" -iframework\"$SYSROOT/System/Library/Frameworks\""
41537      SYSROOT_LDFLAGS=$SYSROOT_CFLAGS
41538    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
41539      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
41540      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
41541    elif test "x$TOOLCHAIN_TYPE" = xclang; then
41542      SYSROOT_CFLAGS="-isysroot \"$SYSROOT\""
41543      SYSROOT_LDFLAGS="-isysroot \"$SYSROOT\""
41544    fi
41545    # Propagate the sysroot args to hotspot
41546    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
41547    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
41548    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
41549  fi
41550
41551  # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
41552  # set this here so it doesn't have to be peppered throughout the forest
41553  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41554    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
41555    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
41556  fi
41557
41558
41559
41560
41561
41562# FIXME: Currently we must test this after toolchain but before flags. Fix!
41563
41564# Now we can test some aspects on the target using configure macros.
41565
41566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
41567$as_echo_n "checking for ANSI C header files... " >&6; }
41568if ${ac_cv_header_stdc+:} false; then :
41569  $as_echo_n "(cached) " >&6
41570else
41571  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41572/* end confdefs.h.  */
41573#include <stdlib.h>
41574#include <stdarg.h>
41575#include <string.h>
41576#include <float.h>
41577
41578int
41579main ()
41580{
41581
41582  ;
41583  return 0;
41584}
41585_ACEOF
41586if ac_fn_cxx_try_compile "$LINENO"; then :
41587  ac_cv_header_stdc=yes
41588else
41589  ac_cv_header_stdc=no
41590fi
41591rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41592
41593if test $ac_cv_header_stdc = yes; then
41594  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
41595  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41596/* end confdefs.h.  */
41597#include <string.h>
41598
41599_ACEOF
41600if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41601  $EGREP "memchr" >/dev/null 2>&1; then :
41602
41603else
41604  ac_cv_header_stdc=no
41605fi
41606rm -f conftest*
41607
41608fi
41609
41610if test $ac_cv_header_stdc = yes; then
41611  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
41612  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41613/* end confdefs.h.  */
41614#include <stdlib.h>
41615
41616_ACEOF
41617if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41618  $EGREP "free" >/dev/null 2>&1; then :
41619
41620else
41621  ac_cv_header_stdc=no
41622fi
41623rm -f conftest*
41624
41625fi
41626
41627if test $ac_cv_header_stdc = yes; then
41628  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
41629  if test "$cross_compiling" = yes; then :
41630  :
41631else
41632  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41633/* end confdefs.h.  */
41634#include <ctype.h>
41635#include <stdlib.h>
41636#if ((' ' & 0x0FF) == 0x020)
41637# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
41638# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
41639#else
41640# define ISLOWER(c) \
41641		   (('a' <= (c) && (c) <= 'i') \
41642		     || ('j' <= (c) && (c) <= 'r') \
41643		     || ('s' <= (c) && (c) <= 'z'))
41644# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
41645#endif
41646
41647#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
41648int
41649main ()
41650{
41651  int i;
41652  for (i = 0; i < 256; i++)
41653    if (XOR (islower (i), ISLOWER (i))
41654	|| toupper (i) != TOUPPER (i))
41655      return 2;
41656  return 0;
41657}
41658_ACEOF
41659if ac_fn_cxx_try_run "$LINENO"; then :
41660
41661else
41662  ac_cv_header_stdc=no
41663fi
41664rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41665  conftest.$ac_objext conftest.beam conftest.$ac_ext
41666fi
41667
41668fi
41669fi
41670{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
41671$as_echo "$ac_cv_header_stdc" >&6; }
41672if test $ac_cv_header_stdc = yes; then
41673
41674$as_echo "#define STDC_HEADERS 1" >>confdefs.h
41675
41676fi
41677
41678# On IRIX 5.3, sys/types and inttypes.h are conflicting.
41679for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
41680		  inttypes.h stdint.h unistd.h
41681do :
41682  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
41683ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
41684"
41685if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
41686  cat >>confdefs.h <<_ACEOF
41687#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
41688_ACEOF
41689
41690fi
41691
41692done
41693
41694
41695
41696  ###############################################################################
41697  #
41698  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
41699  # (The JVM can use 32 or 64 bit Java pointers but that decision
41700  # is made at runtime.)
41701  #
41702
41703  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
41704    # Always specify -m flag on Solaris
41705    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
41706
41707  # When we add flags to the "official" CFLAGS etc, we need to
41708  # keep track of these additions in ADDED_CFLAGS etc. These
41709  # will later be checked to make sure only controlled additions
41710  # have been made to CFLAGS etc.
41711  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41712  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41713  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41714
41715  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41716  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41717  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41718
41719  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41720  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41721  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41722
41723  elif test "x$COMPILE_TYPE" = xreduced; then
41724    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
41725      # Specify -m if running reduced on unix platforms
41726
41727  # When we add flags to the "official" CFLAGS etc, we need to
41728  # keep track of these additions in ADDED_CFLAGS etc. These
41729  # will later be checked to make sure only controlled additions
41730  # have been made to CFLAGS etc.
41731  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41732  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41733  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41734
41735  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41736  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41737  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41738
41739  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41740  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41741  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41742
41743    fi
41744  fi
41745
41746  # Make compilation sanity check
41747  for ac_header in stdio.h
41748do :
41749  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
41750if test "x$ac_cv_header_stdio_h" = xyes; then :
41751  cat >>confdefs.h <<_ACEOF
41752#define HAVE_STDIO_H 1
41753_ACEOF
41754
41755else
41756
41757    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
41758$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
41759    if test "x$COMPILE_TYPE" = xreduced; then
41760      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
41761$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
41762    elif test "x$COMPILE_TYPE" = xcross; then
41763      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
41764$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
41765    fi
41766    as_fn_error $? "Cannot continue." "$LINENO" 5
41767
41768fi
41769
41770done
41771
41772
41773  # The cast to long int works around a bug in the HP C Compiler
41774# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41775# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41776# This bug is HP SR number 8606223364.
41777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41778$as_echo_n "checking size of int *... " >&6; }
41779if ${ac_cv_sizeof_int_p+:} false; then :
41780  $as_echo_n "(cached) " >&6
41781else
41782  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41783
41784else
41785  if test "$ac_cv_type_int_p" = yes; then
41786     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41787$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41788as_fn_error 77 "cannot compute sizeof (int *)
41789See \`config.log' for more details" "$LINENO" 5; }
41790   else
41791     ac_cv_sizeof_int_p=0
41792   fi
41793fi
41794
41795fi
41796{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41797$as_echo "$ac_cv_sizeof_int_p" >&6; }
41798
41799
41800
41801cat >>confdefs.h <<_ACEOF
41802#define SIZEOF_INT_P $ac_cv_sizeof_int_p
41803_ACEOF
41804
41805
41806
41807  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
41808  if test "x$ac_cv_sizeof_int_p" = x; then
41809    # The test failed, lets stick to the assumed value.
41810    { $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
41811$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
41812  else
41813    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41814
41815    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41816      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
41817      # Let's try to implicitely set the compilers target architecture and retry the test
41818      { $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
41819$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;}
41820      { $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
41821$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;}
41822
41823  # When we add flags to the "official" CFLAGS etc, we need to
41824  # keep track of these additions in ADDED_CFLAGS etc. These
41825  # will later be checked to make sure only controlled additions
41826  # have been made to CFLAGS etc.
41827  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41828  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41829  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41830
41831  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41832  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41833  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41834
41835  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41836  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41837  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41838
41839
41840      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
41841      unset ac_cv_sizeof_int_p
41842      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
41843      cat >>confdefs.h <<_ACEOF
41844#undef SIZEOF_INT_P
41845_ACEOF
41846
41847      # The cast to long int works around a bug in the HP C Compiler
41848# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41849# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41850# This bug is HP SR number 8606223364.
41851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41852$as_echo_n "checking size of int *... " >&6; }
41853if ${ac_cv_sizeof_int_p+:} false; then :
41854  $as_echo_n "(cached) " >&6
41855else
41856  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41857
41858else
41859  if test "$ac_cv_type_int_p" = yes; then
41860     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41861$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41862as_fn_error 77 "cannot compute sizeof (int *)
41863See \`config.log' for more details" "$LINENO" 5; }
41864   else
41865     ac_cv_sizeof_int_p=0
41866   fi
41867fi
41868
41869fi
41870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41871$as_echo "$ac_cv_sizeof_int_p" >&6; }
41872
41873
41874
41875cat >>confdefs.h <<_ACEOF
41876#define SIZEOF_INT_P $ac_cv_sizeof_int_p
41877_ACEOF
41878
41879
41880
41881      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41882
41883      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41884        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
41885      fi
41886    fi
41887  fi
41888
41889  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
41890$as_echo_n "checking for target address size... " >&6; }
41891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
41892$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
41893
41894
41895  ###############################################################################
41896  #
41897  # Is the target little of big endian?
41898  #
41899   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
41900$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
41901if ${ac_cv_c_bigendian+:} false; then :
41902  $as_echo_n "(cached) " >&6
41903else
41904  ac_cv_c_bigendian=unknown
41905    # See if we're dealing with a universal compiler.
41906    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41907/* end confdefs.h.  */
41908#ifndef __APPLE_CC__
41909	       not a universal capable compiler
41910	     #endif
41911	     typedef int dummy;
41912
41913_ACEOF
41914if ac_fn_cxx_try_compile "$LINENO"; then :
41915
41916	# Check for potential -arch flags.  It is not universal unless
41917	# there are at least two -arch flags with different values.
41918	ac_arch=
41919	ac_prev=
41920	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
41921	 if test -n "$ac_prev"; then
41922	   case $ac_word in
41923	     i?86 | x86_64 | ppc | ppc64)
41924	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
41925		 ac_arch=$ac_word
41926	       else
41927		 ac_cv_c_bigendian=universal
41928		 break
41929	       fi
41930	       ;;
41931	   esac
41932	   ac_prev=
41933	 elif test "x$ac_word" = "x-arch"; then
41934	   ac_prev=arch
41935	 fi
41936       done
41937fi
41938rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41939    if test $ac_cv_c_bigendian = unknown; then
41940      # See if sys/param.h defines the BYTE_ORDER macro.
41941      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41942/* end confdefs.h.  */
41943#include <sys/types.h>
41944	     #include <sys/param.h>
41945
41946int
41947main ()
41948{
41949#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
41950		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
41951		     && LITTLE_ENDIAN)
41952	      bogus endian macros
41953	     #endif
41954
41955  ;
41956  return 0;
41957}
41958_ACEOF
41959if ac_fn_cxx_try_compile "$LINENO"; then :
41960  # It does; now see whether it defined to BIG_ENDIAN or not.
41961	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41962/* end confdefs.h.  */
41963#include <sys/types.h>
41964		#include <sys/param.h>
41965
41966int
41967main ()
41968{
41969#if BYTE_ORDER != BIG_ENDIAN
41970		 not big endian
41971		#endif
41972
41973  ;
41974  return 0;
41975}
41976_ACEOF
41977if ac_fn_cxx_try_compile "$LINENO"; then :
41978  ac_cv_c_bigendian=yes
41979else
41980  ac_cv_c_bigendian=no
41981fi
41982rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41983fi
41984rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41985    fi
41986    if test $ac_cv_c_bigendian = unknown; then
41987      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
41988      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41989/* end confdefs.h.  */
41990#include <limits.h>
41991
41992int
41993main ()
41994{
41995#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
41996	      bogus endian macros
41997	     #endif
41998
41999  ;
42000  return 0;
42001}
42002_ACEOF
42003if ac_fn_cxx_try_compile "$LINENO"; then :
42004  # It does; now see whether it defined to _BIG_ENDIAN or not.
42005	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42006/* end confdefs.h.  */
42007#include <limits.h>
42008
42009int
42010main ()
42011{
42012#ifndef _BIG_ENDIAN
42013		 not big endian
42014		#endif
42015
42016  ;
42017  return 0;
42018}
42019_ACEOF
42020if ac_fn_cxx_try_compile "$LINENO"; then :
42021  ac_cv_c_bigendian=yes
42022else
42023  ac_cv_c_bigendian=no
42024fi
42025rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42026fi
42027rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42028    fi
42029    if test $ac_cv_c_bigendian = unknown; then
42030      # Compile a test program.
42031      if test "$cross_compiling" = yes; then :
42032  # Try to guess by grepping values from an object file.
42033	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42034/* end confdefs.h.  */
42035short int ascii_mm[] =
42036		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
42037		short int ascii_ii[] =
42038		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
42039		int use_ascii (int i) {
42040		  return ascii_mm[i] + ascii_ii[i];
42041		}
42042		short int ebcdic_ii[] =
42043		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
42044		short int ebcdic_mm[] =
42045		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
42046		int use_ebcdic (int i) {
42047		  return ebcdic_mm[i] + ebcdic_ii[i];
42048		}
42049		extern int foo;
42050
42051int
42052main ()
42053{
42054return use_ascii (foo) == use_ebcdic (foo);
42055  ;
42056  return 0;
42057}
42058_ACEOF
42059if ac_fn_cxx_try_compile "$LINENO"; then :
42060  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
42061	      ac_cv_c_bigendian=yes
42062	    fi
42063	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
42064	      if test "$ac_cv_c_bigendian" = unknown; then
42065		ac_cv_c_bigendian=no
42066	      else
42067		# finding both strings is unlikely to happen, but who knows?
42068		ac_cv_c_bigendian=unknown
42069	      fi
42070	    fi
42071fi
42072rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42073else
42074  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42075/* end confdefs.h.  */
42076$ac_includes_default
42077int
42078main ()
42079{
42080
42081	     /* Are we little or big endian?  From Harbison&Steele.  */
42082	     union
42083	     {
42084	       long int l;
42085	       char c[sizeof (long int)];
42086	     } u;
42087	     u.l = 1;
42088	     return u.c[sizeof (long int) - 1] == 1;
42089
42090  ;
42091  return 0;
42092}
42093_ACEOF
42094if ac_fn_cxx_try_run "$LINENO"; then :
42095  ac_cv_c_bigendian=no
42096else
42097  ac_cv_c_bigendian=yes
42098fi
42099rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
42100  conftest.$ac_objext conftest.beam conftest.$ac_ext
42101fi
42102
42103    fi
42104fi
42105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
42106$as_echo "$ac_cv_c_bigendian" >&6; }
42107 case $ac_cv_c_bigendian in #(
42108   yes)
42109     ENDIAN="big";; #(
42110   no)
42111     ENDIAN="little" ;; #(
42112   universal)
42113     ENDIAN="universal_endianness"
42114     ;; #(
42115   *)
42116     ENDIAN="unknown" ;;
42117 esac
42118
42119
42120  if test "x$ENDIAN" = xuniversal_endianness; then
42121    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
42122  fi
42123  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
42124    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
42125  fi
42126
42127
42128# Configure flags for the tools
42129
42130  ###############################################################################
42131  #
42132  # How to compile shared libraries.
42133  #
42134
42135  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42136    PICFLAG="-fPIC"
42137    C_FLAG_REORDER=''
42138    CXX_FLAG_REORDER=''
42139
42140    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42141      # Linking is different on MacOSX
42142      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
42143      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
42144      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42145      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
42146      SET_SHARED_LIBRARY_MAPFILE=''
42147    else
42148      # Default works for linux, might work on other platforms as well.
42149      SHARED_LIBRARY_FLAGS='-shared'
42150      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
42151      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
42152      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
42153      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
42154    fi
42155  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42156    PICFLAG=''
42157    C_FLAG_REORDER=''
42158    CXX_FLAG_REORDER=''
42159
42160    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42161      # Linking is different on MacOSX
42162      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
42163      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
42164      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42165      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
42166      SET_SHARED_LIBRARY_MAPFILE=''
42167    else
42168      # Default works for linux, might work on other platforms as well.
42169      SHARED_LIBRARY_FLAGS='-shared'
42170      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
42171      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
42172      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
42173      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
42174    fi
42175  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42176    PICFLAG="-KPIC"
42177    C_FLAG_REORDER='-xF'
42178    CXX_FLAG_REORDER='-xF'
42179    SHARED_LIBRARY_FLAGS="-G"
42180    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
42181    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42182    SET_SHARED_LIBRARY_NAME=''
42183    SET_SHARED_LIBRARY_MAPFILE='-M$1'
42184  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42185    PICFLAG="-qpic=large"
42186    C_FLAG_REORDER=''
42187    CXX_FLAG_REORDER=''
42188    SHARED_LIBRARY_FLAGS="-qmkshrobj"
42189    SET_EXECUTABLE_ORIGIN=""
42190    SET_SHARED_LIBRARY_ORIGIN=''
42191    SET_SHARED_LIBRARY_NAME=''
42192    SET_SHARED_LIBRARY_MAPFILE=''
42193  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42194    PICFLAG=""
42195    C_FLAG_REORDER=''
42196    CXX_FLAG_REORDER=''
42197    SHARED_LIBRARY_FLAGS="-LD"
42198    SET_EXECUTABLE_ORIGIN=''
42199    SET_SHARED_LIBRARY_ORIGIN=''
42200    SET_SHARED_LIBRARY_NAME=''
42201    SET_SHARED_LIBRARY_MAPFILE=''
42202  fi
42203
42204
42205
42206
42207
42208
42209
42210
42211  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42212    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
42213    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
42214    CFLAGS_JDKLIB_EXTRA='-xstrconst'
42215  fi
42216  # The (cross) compiler is now configured, we can now test capabilities
42217  # of the target platform.
42218
42219
42220
42221  ###############################################################################
42222  #
42223  # Setup the opt flags for different compilers
42224  # and different operating systems.
42225  #
42226
42227  # FIXME: this was indirectly the old default, but just inherited.
42228  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42229  #   C_FLAG_DEPS="-MMD -MF"
42230  # fi
42231
42232  # Generate make dependency files
42233  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42234    C_FLAG_DEPS="-MMD -MF"
42235  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42236    C_FLAG_DEPS="-MMD -MF"
42237  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42238    C_FLAG_DEPS="-xMMD -xMF"
42239  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42240    C_FLAG_DEPS="-qmakedep=gcc -MF"
42241  fi
42242  CXX_FLAG_DEPS="$C_FLAG_DEPS"
42243
42244
42245
42246  # Debug symbols
42247  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42248    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
42249      # reduce from default "-g2" option to save space
42250      CFLAGS_DEBUG_SYMBOLS="-g1"
42251      CXXFLAGS_DEBUG_SYMBOLS="-g1"
42252    else
42253      CFLAGS_DEBUG_SYMBOLS="-g"
42254      CXXFLAGS_DEBUG_SYMBOLS="-g"
42255    fi
42256  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42257    CFLAGS_DEBUG_SYMBOLS="-g"
42258    CXXFLAGS_DEBUG_SYMBOLS="-g"
42259  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42260    CFLAGS_DEBUG_SYMBOLS="-g -xs"
42261    # FIXME: likely a bug, this disables debug symbols rather than enables them
42262    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
42263  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42264    CFLAGS_DEBUG_SYMBOLS="-g"
42265    CXXFLAGS_DEBUG_SYMBOLS="-g"
42266  fi
42267
42268
42269
42270  # bounds, memory and behavior checking options
42271  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42272    case $DEBUG_LEVEL in
42273    release )
42274      # no adjustment
42275      ;;
42276    fastdebug )
42277      # no adjustment
42278      ;;
42279    slowdebug )
42280      # Add runtime stack smashing and undefined behavior checks
42281      CFLAGS_DEBUG_OPTIONS="-fstack-protector-all --param ssp-buffer-size=1"
42282      CXXFLAGS_DEBUG_OPTIONS="-fstack-protector-all --param ssp-buffer-size=1"
42283      ;;
42284    esac
42285  fi
42286
42287
42288
42289  # Optimization levels
42290  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42291    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
42292
42293    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
42294      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
42295      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
42296      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
42297      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
42298      C_O_FLAG_DEBUG="-xregs=no%frameptr"
42299      C_O_FLAG_NONE="-xregs=no%frameptr"
42300      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
42301      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
42302      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
42303      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
42304      CXX_O_FLAG_NONE="-xregs=no%frameptr"
42305      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
42306        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
42307        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
42308      fi
42309    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
42310      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
42311      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
42312      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
42313      C_O_FLAG_DEBUG=""
42314      C_O_FLAG_NONE=""
42315      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
42316      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
42317      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
42318      C_O_FLAG_DEBUG=""
42319      CXX_O_FLAG_NONE=""
42320    fi
42321  else
42322    # The remaining toolchains share opt flags between CC and CXX;
42323    # setup for C and duplicate afterwards.
42324    if test "x$TOOLCHAIN_TYPE" = xgcc; then
42325      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42326        # On MacOSX we optimize for size, something
42327        # we should do for all platforms?
42328        C_O_FLAG_HIGHEST="-Os"
42329        C_O_FLAG_HI="-Os"
42330        C_O_FLAG_NORM="-Os"
42331      else
42332        C_O_FLAG_HIGHEST="-O3"
42333        C_O_FLAG_HI="-O3"
42334        C_O_FLAG_NORM="-O2"
42335      fi
42336      C_O_FLAG_DEBUG="-O0"
42337      C_O_FLAG_NONE="-O0"
42338    elif test "x$TOOLCHAIN_TYPE" = xclang; then
42339      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42340        # On MacOSX we optimize for size, something
42341        # we should do for all platforms?
42342        C_O_FLAG_HIGHEST="-Os"
42343        C_O_FLAG_HI="-Os"
42344        C_O_FLAG_NORM="-Os"
42345      else
42346        C_O_FLAG_HIGHEST="-O3"
42347        C_O_FLAG_HI="-O3"
42348        C_O_FLAG_NORM="-O2"
42349      fi
42350      C_O_FLAG_DEBUG="-O0"
42351      C_O_FLAG_NONE="-O0"
42352    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42353      C_O_FLAG_HIGHEST="-O3"
42354      C_O_FLAG_HI="-O3 -qstrict"
42355      C_O_FLAG_NORM="-O2"
42356      C_O_FLAG_DEBUG="-qnoopt"
42357      C_O_FLAG_NONE="-qnoop"
42358    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42359      C_O_FLAG_HIGHEST="-O2"
42360      C_O_FLAG_HI="-O1"
42361      C_O_FLAG_NORM="-O1"
42362      C_O_FLAG_DEBUG="-Od"
42363      C_O_FLAG_NONE="-Od"
42364    fi
42365    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
42366    CXX_O_FLAG_HI="$C_O_FLAG_HI"
42367    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
42368    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
42369    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
42370  fi
42371
42372  # Adjust optimization flags according to debug level.
42373  case $DEBUG_LEVEL in
42374    release )
42375      # no adjustment
42376      ;;
42377    fastdebug )
42378      # Not quite so much optimization
42379      C_O_FLAG_HI="$C_O_FLAG_NORM"
42380      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
42381      ;;
42382    slowdebug )
42383      # Disable optimization
42384      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
42385      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
42386      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
42387      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
42388      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
42389      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
42390      ;;
42391  esac
42392
42393
42394
42395
42396
42397
42398
42399
42400
42401
42402
42403
42404
42405  # Special extras...
42406  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42407    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
42408      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
42409      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
42410    fi
42411    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
42412    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
42413  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42414    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
42415    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
42416  fi
42417
42418  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
42419    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
42420$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
42421  fi
42422
42423  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
42424    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
42425$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
42426  fi
42427
42428  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
42429    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
42430$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
42431  fi
42432
42433
42434# Check whether --with-extra-cflags was given.
42435if test "${with_extra_cflags+set}" = set; then :
42436  withval=$with_extra_cflags;
42437fi
42438
42439
42440
42441# Check whether --with-extra-cxxflags was given.
42442if test "${with_extra_cxxflags+set}" = set; then :
42443  withval=$with_extra_cxxflags;
42444fi
42445
42446
42447
42448# Check whether --with-extra-ldflags was given.
42449if test "${with_extra_ldflags+set}" = set; then :
42450  withval=$with_extra_ldflags;
42451fi
42452
42453
42454  CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
42455  CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
42456  LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
42457
42458  # Hotspot needs these set in their legacy form
42459  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $with_extra_cflags"
42460  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $with_extra_cxxflags"
42461  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $with_extra_ldflags"
42462
42463
42464
42465
42466
42467  ###############################################################################
42468  #
42469  # Now setup the CFLAGS and LDFLAGS for the JDK build.
42470  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
42471  #
42472
42473  # Setup compiler/platform specific flags into
42474  #    CFLAGS_JDK    - C Compiler flags
42475  #    CXXFLAGS_JDK  - C++ Compiler flags
42476  #    COMMON_CCXXFLAGS_JDK - common to C and C++
42477  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42478    if test "x$OPENJDK_TARGET_CPU" = xx86; then
42479      # Force compatibility with i586 on 32 bit intel platforms.
42480      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
42481    fi
42482    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
42483        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
42484    case $OPENJDK_TARGET_CPU_ARCH in
42485      arm )
42486        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42487        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42488        ;;
42489      ppc )
42490        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42491        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42492        ;;
42493      * )
42494        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
42495        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42496        ;;
42497    esac
42498  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42499    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
42500    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
42501      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
42502    fi
42503
42504    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
42505    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
42506  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42507    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42508    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42509  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42510    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
42511        -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
42512        -DWIN32_LEAN_AND_MEAN \
42513        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
42514        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
42515        -DWIN32 -DIAL"
42516    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
42517      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
42518    else
42519      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
42520    fi
42521    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
42522    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
42523    # studio.
42524    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
42525      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
42526          -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
42527    fi
42528  fi
42529
42530  ###############################################################################
42531
42532  # Adjust flags according to debug level.
42533  case $DEBUG_LEVEL in
42534    fastdebug | slowdebug )
42535      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
42536      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
42537      JAVAC_FLAGS="$JAVAC_FLAGS -g"
42538      ;;
42539    release )
42540      ;;
42541    * )
42542      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42543      ;;
42544  esac
42545
42546  # Setup LP64
42547  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $ADD_LP64"
42548
42549  # Set some common defines. These works for all compilers, but assume
42550  # -D is universally accepted.
42551
42552  # Setup endianness
42553  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
42554    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
42555    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
42556    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
42557    #   Note: -Dmacro         is the same as    #define macro 1
42558    #         -Dmacro=        is the same as    #define macro
42559    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42560      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
42561    else
42562      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
42563    fi
42564  else
42565    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
42566    # are defined in the system?
42567    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42568      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
42569    else
42570      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
42571    fi
42572  fi
42573
42574  # Setup target OS define. Use OS target name but in upper case.
42575  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
42576  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
42577
42578  # Setup target CPU
42579  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
42580
42581  # Setup debug/release defines
42582  if test "x$DEBUG_LEVEL" = xrelease; then
42583    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
42584    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42585      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
42586    fi
42587  else
42588    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
42589  fi
42590
42591  # Set some additional per-OS defines.
42592  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42593    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
42594  elif test "x$OPENJDK_TARGET_OS" = xaix; then
42595    # FIXME: PPC64 should not be here.
42596    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DPPC64"
42597  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
42598    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
42599  fi
42600
42601  # Additional macosx handling
42602  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42603    # Setting these parameters makes it an error to link to macosx APIs that are
42604    # newer than the given OS version and makes the linked binaries compatible
42605    # even if built on a newer version of the OS.
42606    # The expected format is X.Y.Z
42607    MACOSX_VERSION_MIN=10.7.0
42608
42609
42610    # The macro takes the version with no dots, ex: 1070
42611    # Let the flags variables get resolved in make for easier override on make
42612    # command line.
42613    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42614    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42615  fi
42616
42617  # Setup some hard coded includes
42618  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
42619      -I${JDK_TOPDIR}/src/java.base/share/native/include \
42620      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
42621      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include"
42622
42623  # The shared libraries are compiled using the picflag.
42624  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
42625  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
42626
42627  # Executable flags
42628  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
42629  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
42630
42631
42632
42633
42634
42635
42636  # Flags for compiling test libraries
42637  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
42638  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
42639
42640  # Flags for compiling test executables
42641  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
42642  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
42643
42644
42645
42646
42647
42648
42649  # Setup LDFLAGS et al.
42650  #
42651
42652  # Now this is odd. The JDK native libraries have to link against libjvm.so
42653  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
42654  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
42655  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
42656  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
42657  # libraries will link to whatever is in memory. Yuck.
42658  #
42659  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
42660  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42661    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
42662    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
42663      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
42664    fi
42665    # TODO: make -debug optional "--disable-full-debug-symbols"
42666    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
42667  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
42668    # If this is a --hash-style=gnu system, use --hash-style=both, why?
42669    # We have previously set HAS_GNU_HASH if this is the case
42670    if test -n "$HAS_GNU_HASH"; then
42671      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both"
42672    fi
42673    if test "x$OPENJDK_TARGET_OS" = xlinux; then
42674      # And since we now know that the linker is gnu, then add -z defs, to forbid
42675      # undefined symbols in object files.
42676      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
42677      case $DEBUG_LEVEL in
42678        release )
42679          # tell linker to optimize libraries.
42680          # Should this be supplied to the OSS linker as well?
42681          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
42682          ;;
42683        slowdebug )
42684          if test "x$HAS_LINKER_NOW" = "xtrue"; then
42685            # do relocations at load
42686            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
42687            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
42688          fi
42689          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42690            # mark relocations read only
42691            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42692            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42693          fi
42694          ;;
42695        fastdebug )
42696          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42697            # mark relocations read only
42698            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42699            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42700          fi
42701          ;;
42702        * )
42703          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42704          ;;
42705        esac
42706    fi
42707  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42708    LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
42709    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
42710  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42711    LDFLAGS_JDK="${LDFLAGS_JDK} -brtl -bnolibpath -liconv -bexpall -bernotok"
42712  fi
42713
42714  # Customize LDFLAGS for executables
42715
42716  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
42717
42718  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42719    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
42720      LDFLAGS_STACK_SIZE=1048576
42721    else
42722      LDFLAGS_STACK_SIZE=327680
42723    fi
42724    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
42725  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
42726    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
42727  fi
42728
42729  # Customize LDFLAGS for libs
42730  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
42731
42732  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42733    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -dll -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
42734    LDFLAGS_JDKLIB_SUFFIX=""
42735  else
42736    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB}  ${SHARED_LIBRARY_FLAGS} \
42737        -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}"
42738
42739    # On some platforms (mac) the linker warns about non existing -L dirs.
42740    # Add server first if available. Linking aginst client does not always produce the same results.
42741    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
42742    # Default to server for other variants.
42743    if test "x$JVM_VARIANT_SERVER" = xtrue; then
42744      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
42745    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
42746      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/client"
42747    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
42748      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
42749    else
42750      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
42751    fi
42752
42753    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
42754    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42755      LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
42756    fi
42757  fi
42758
42759
42760
42761
42762
42763
42764
42765  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
42766  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE"
42767  LDFLAGS_TESTLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX"
42768  LDFLAGS_TESTEXE_SUFFIX="$LDFLAGS_JDKEXE_SUFFIX"
42769
42770
42771
42772
42773
42774
42775
42776  # Some Zero and Shark settings.
42777  # ZERO_ARCHFLAG tells the compiler which mode to build for
42778  case "${OPENJDK_TARGET_CPU}" in
42779    s390)
42780      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
42781      ;;
42782    *)
42783      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42784  esac
42785
42786  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
42787$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
42788  supports=yes
42789
42790  saved_cflags="$CFLAGS"
42791  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
42792  ac_ext=c
42793ac_cpp='$CPP $CPPFLAGS'
42794ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42795ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42796ac_compiler_gnu=$ac_cv_c_compiler_gnu
42797
42798  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42799/* end confdefs.h.  */
42800int i;
42801_ACEOF
42802if ac_fn_c_try_compile "$LINENO"; then :
42803
42804else
42805  supports=no
42806fi
42807rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42808  ac_ext=cpp
42809ac_cpp='$CXXCPP $CPPFLAGS'
42810ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42811ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42812ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42813
42814  CFLAGS="$saved_cflags"
42815
42816  saved_cxxflags="$CXXFLAGS"
42817  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
42818  ac_ext=cpp
42819ac_cpp='$CXXCPP $CPPFLAGS'
42820ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42821ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42822ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42823
42824  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42825/* end confdefs.h.  */
42826int i;
42827_ACEOF
42828if ac_fn_cxx_try_compile "$LINENO"; then :
42829
42830else
42831  supports=no
42832fi
42833rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42834  ac_ext=cpp
42835ac_cpp='$CXXCPP $CPPFLAGS'
42836ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42837ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42838ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42839
42840  CXXFLAGS="$saved_cxxflags"
42841
42842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42843$as_echo "$supports" >&6; }
42844  if test "x$supports" = "xyes" ; then
42845    :
42846  else
42847    ZERO_ARCHFLAG=""
42848  fi
42849
42850
42851
42852  # Check that the compiler supports -mX (or -qX on AIX) flags
42853  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
42854
42855  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
42856$as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
42857  supports=yes
42858
42859  saved_cflags="$CFLAGS"
42860  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42861  ac_ext=c
42862ac_cpp='$CPP $CPPFLAGS'
42863ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42864ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42865ac_compiler_gnu=$ac_cv_c_compiler_gnu
42866
42867  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42868/* end confdefs.h.  */
42869int i;
42870_ACEOF
42871if ac_fn_c_try_compile "$LINENO"; then :
42872
42873else
42874  supports=no
42875fi
42876rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42877  ac_ext=cpp
42878ac_cpp='$CXXCPP $CPPFLAGS'
42879ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42880ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42881ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42882
42883  CFLAGS="$saved_cflags"
42884
42885  saved_cxxflags="$CXXFLAGS"
42886  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42887  ac_ext=cpp
42888ac_cpp='$CXXCPP $CPPFLAGS'
42889ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42890ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42891ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42892
42893  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42894/* end confdefs.h.  */
42895int i;
42896_ACEOF
42897if ac_fn_cxx_try_compile "$LINENO"; then :
42898
42899else
42900  supports=no
42901fi
42902rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42903  ac_ext=cpp
42904ac_cpp='$CXXCPP $CPPFLAGS'
42905ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42906ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42907ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42908
42909  CXXFLAGS="$saved_cxxflags"
42910
42911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42912$as_echo "$supports" >&6; }
42913  if test "x$supports" = "xyes" ; then
42914    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
42915  else
42916    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
42917  fi
42918
42919
42920
42921  # Check whether --enable-warnings-as-errors was given.
42922if test "${enable_warnings_as_errors+set}" = set; then :
42923  enableval=$enable_warnings_as_errors;
42924fi
42925
42926
42927  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
42928$as_echo_n "checking if native warnings are errors... " >&6; }
42929  if test "x$enable_warnings_as_errors" = "xyes"; then
42930    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitely set)" >&5
42931$as_echo "yes (explicitely set)" >&6; }
42932    WARNINGS_AS_ERRORS=true
42933  elif test "x$enable_warnings_as_errors" = "xno"; then
42934    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42935$as_echo "no" >&6; }
42936    WARNINGS_AS_ERRORS=false
42937  elif test "x$enable_warnings_as_errors" = "x"; then
42938    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
42939$as_echo "yes (default)" >&6; }
42940    WARNINGS_AS_ERRORS=true
42941  else
42942    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
42943  fi
42944
42945
42946  case "${TOOLCHAIN_TYPE}" in
42947    microsoft)
42948      DISABLE_WARNING_PREFIX="-wd"
42949      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
42950      ;;
42951    solstudio)
42952      DISABLE_WARNING_PREFIX="-erroff="
42953      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
42954      ;;
42955    gcc)
42956      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
42957
42958  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
42959$as_echo_n "checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
42960  supports=yes
42961
42962  saved_cflags="$CFLAGS"
42963  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
42964  ac_ext=c
42965ac_cpp='$CPP $CPPFLAGS'
42966ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42967ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42968ac_compiler_gnu=$ac_cv_c_compiler_gnu
42969
42970  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42971/* end confdefs.h.  */
42972int i;
42973_ACEOF
42974if ac_fn_c_try_compile "$LINENO"; then :
42975
42976else
42977  supports=no
42978fi
42979rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42980  ac_ext=cpp
42981ac_cpp='$CXXCPP $CPPFLAGS'
42982ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42983ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42984ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42985
42986  CFLAGS="$saved_cflags"
42987
42988  saved_cxxflags="$CXXFLAGS"
42989  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
42990  ac_ext=cpp
42991ac_cpp='$CXXCPP $CPPFLAGS'
42992ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42993ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42994ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42995
42996  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42997/* end confdefs.h.  */
42998int i;
42999_ACEOF
43000if ac_fn_cxx_try_compile "$LINENO"; then :
43001
43002else
43003  supports=no
43004fi
43005rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43006  ac_ext=cpp
43007ac_cpp='$CXXCPP $CPPFLAGS'
43008ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43009ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43010ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43011
43012  CXXFLAGS="$saved_cxxflags"
43013
43014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
43015$as_echo "$supports" >&6; }
43016  if test "x$supports" = "xyes" ; then
43017    GCC_CAN_DISABLE_WARNINGS=true
43018  else
43019    GCC_CAN_DISABLE_WARNINGS=false
43020
43021  fi
43022
43023      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
43024        DISABLE_WARNING_PREFIX="-Wno-"
43025      else
43026        DISABLE_WARNING_PREFIX=
43027      fi
43028      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
43029      ;;
43030    clang)
43031      DISABLE_WARNING_PREFIX="-Wno-"
43032      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
43033      ;;
43034  esac
43035
43036
43037
43038
43039# Setup debug symbols (need objcopy from the toolchain for that)
43040
43041  #
43042  # ENABLE_DEBUG_SYMBOLS
43043  # This must be done after the toolchain is setup, since we're looking at objcopy.
43044  #
43045  # Check whether --enable-debug-symbols was given.
43046if test "${enable_debug_symbols+set}" = set; then :
43047  enableval=$enable_debug_symbols;
43048fi
43049
43050
43051  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
43052$as_echo_n "checking if we should generate debug symbols... " >&6; }
43053
43054  if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
43055    # explicit enabling of enable-debug-symbols and can't find objcopy
43056    #   this is an error
43057    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
43058  fi
43059
43060  if test "x$enable_debug_symbols" = "xyes"; then
43061    ENABLE_DEBUG_SYMBOLS=true
43062  elif test "x$enable_debug_symbols" = "xno"; then
43063    ENABLE_DEBUG_SYMBOLS=false
43064  else
43065    # Default is on if objcopy is found
43066    if test "x$OBJCOPY" != x; then
43067      ENABLE_DEBUG_SYMBOLS=true
43068    # MacOS X and Windows don't use objcopy but default is on for those OSes
43069    elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
43070      ENABLE_DEBUG_SYMBOLS=true
43071    else
43072      ENABLE_DEBUG_SYMBOLS=false
43073    fi
43074  fi
43075
43076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
43077$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
43078
43079  #
43080  # ZIP_DEBUGINFO_FILES
43081  #
43082  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
43083$as_echo_n "checking if we should zip debug-info files... " >&6; }
43084  # Check whether --enable-zip-debug-info was given.
43085if test "${enable_zip_debug_info+set}" = set; then :
43086  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
43087else
43088  enable_zip_debug_info="yes"
43089fi
43090
43091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
43092$as_echo "${enable_zip_debug_info}" >&6; }
43093
43094  if test "x${enable_zip_debug_info}" = "xno"; then
43095    ZIP_DEBUGINFO_FILES=false
43096  else
43097    ZIP_DEBUGINFO_FILES=true
43098  fi
43099
43100
43101
43102
43103
43104  # Check whether --enable-native-coverage was given.
43105if test "${enable_native_coverage+set}" = set; then :
43106  enableval=$enable_native_coverage;
43107fi
43108
43109  GCOV_ENABLED="false"
43110  if test "x$enable_native_coverage" = "xyes"; then
43111    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
43112      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
43113$as_echo_n "checking if native coverage is enabled... " >&6; }
43114      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43115$as_echo "yes" >&6; }
43116      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
43117      GCOV_LDFLAGS="-fprofile-arcs"
43118      LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
43119      LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
43120      LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
43121      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
43122      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
43123      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
43124      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
43125      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
43126      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
43127      GCOV_ENABLED="true"
43128    else
43129      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
43130    fi
43131  elif test "x$enable_native_coverage" = "xno"; then
43132    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
43133$as_echo_n "checking if native coverage is enabled... " >&6; }
43134    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43135$as_echo "no" >&6; }
43136  elif test "x$enable_native_coverage" != "x"; then
43137    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
43138  fi
43139
43140
43141
43142
43143###############################################################################
43144#
43145# Check dependencies for external and internal libraries.
43146#
43147###############################################################################
43148
43149# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
43150
43151  # When using cygwin or msys, we need a wrapper binary that renames
43152  # /cygdrive/c/ arguments into c:/ arguments and peeks into
43153  # @files and rewrites these too! This wrapper binary is
43154  # called fixpath.
43155  FIXPATH=
43156  if test "x$OPENJDK_BUILD_OS" = xwindows; then
43157    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
43158$as_echo_n "checking if fixpath can be created... " >&6; }
43159    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
43160    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
43161    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
43162    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
43163      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
43164      FIXPATH="$FIXPATH_BIN -c"
43165    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
43166      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
43167      # @ was chosen as separator to minimize risk of other tools messing around with it
43168      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
43169          | tr ' ' '\n' | grep '^/./' | sort | uniq`
43170      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
43171      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
43172    fi
43173    FIXPATH_SRC_W="$FIXPATH_SRC"
43174    FIXPATH_BIN_W="$FIXPATH_BIN"
43175
43176  unix_path="$FIXPATH_SRC_W"
43177  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43178    windows_path=`$CYGPATH -m "$unix_path"`
43179    FIXPATH_SRC_W="$windows_path"
43180  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43181    windows_path=`cmd //c echo $unix_path`
43182    FIXPATH_SRC_W="$windows_path"
43183  fi
43184
43185
43186  unix_path="$FIXPATH_BIN_W"
43187  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43188    windows_path=`$CYGPATH -m "$unix_path"`
43189    FIXPATH_BIN_W="$windows_path"
43190  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43191    windows_path=`cmd //c echo $unix_path`
43192    FIXPATH_BIN_W="$windows_path"
43193  fi
43194
43195    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
43196    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
43197    cd $FIXPATH_DIR
43198    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
43199    cd $CURDIR
43200
43201    if test ! -x $FIXPATH_BIN; then
43202      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43203$as_echo "no" >&6; }
43204      cat $FIXPATH_DIR/fixpath1.log
43205      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
43206    fi
43207    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43208$as_echo "yes" >&6; }
43209    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
43210$as_echo_n "checking if fixpath.exe works... " >&6; }
43211    cd $FIXPATH_DIR
43212    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
43213        > $FIXPATH_DIR/fixpath2.log 2>&1
43214    cd $CURDIR
43215    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
43216      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43217$as_echo "no" >&6; }
43218      cat $FIXPATH_DIR/fixpath2.log
43219      as_fn_error $? "fixpath did not work!" "$LINENO" 5
43220    fi
43221    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43222$as_echo "yes" >&6; }
43223  fi
43224
43225
43226
43227
43228
43229
43230  ###############################################################################
43231  #
43232  # OS specific settings that we never will need to probe.
43233  #
43234  if test "x$OPENJDK_TARGET_OS" = xlinux; then
43235    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
43236$as_echo_n "checking what is not needed on Linux?... " >&6; }
43237    PULSE_NOT_NEEDED=yes
43238    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
43239$as_echo "pulse" >&6; }
43240  fi
43241
43242  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43243    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
43244$as_echo_n "checking what is not needed on Solaris?... " >&6; }
43245    ALSA_NOT_NEEDED=yes
43246    PULSE_NOT_NEEDED=yes
43247    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
43248$as_echo "alsa pulse" >&6; }
43249  fi
43250
43251  if test "x$OPENJDK_TARGET_OS" = xaix; then
43252    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on AIX?" >&5
43253$as_echo_n "checking what is not needed on AIX?... " >&6; }
43254    ALSA_NOT_NEEDED=yes
43255    PULSE_NOT_NEEDED=yes
43256    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
43257$as_echo "alsa pulse" >&6; }
43258  fi
43259
43260
43261  if test "x$OPENJDK_TARGET_OS" = xwindows; then
43262    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
43263$as_echo_n "checking what is not needed on Windows?... " >&6; }
43264    CUPS_NOT_NEEDED=yes
43265    ALSA_NOT_NEEDED=yes
43266    PULSE_NOT_NEEDED=yes
43267    X11_NOT_NEEDED=yes
43268    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
43269$as_echo "alsa cups pulse x11" >&6; }
43270  fi
43271
43272  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
43273    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
43274$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
43275    ALSA_NOT_NEEDED=yes
43276    PULSE_NOT_NEEDED=yes
43277    X11_NOT_NEEDED=yes
43278    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
43279$as_echo "alsa pulse x11" >&6; }
43280  fi
43281
43282  if test "x$OPENJDK_TARGET_OS" = xbsd; then
43283    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
43284$as_echo_n "checking what is not needed on bsd?... " >&6; }
43285    ALSA_NOT_NEEDED=yes
43286    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
43287$as_echo "alsa" >&6; }
43288  fi
43289
43290  if test "x$OPENJDK" = "xfalse"; then
43291    FREETYPE_NOT_NEEDED=yes
43292  fi
43293
43294  if test "x$SUPPORT_HEADFUL" = xno; then
43295    X11_NOT_NEEDED=yes
43296  fi
43297
43298
43299
43300  ###############################################################################
43301  #
43302  # Check for X Windows
43303  #
43304
43305  if test "x$X11_NOT_NEEDED" = xyes; then
43306    if test "x${with_x}" != x; then
43307      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
43308$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
43309    fi
43310    X_CFLAGS=
43311    X_LIBS=
43312  else
43313    # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
43314    # Make a simple check for the libraries at the sysroot, and setup --x-includes and
43315    # --x-libraries for the sysroot, if that seems to be correct.
43316    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
43317      if test "x$SYSROOT" != "x"; then
43318        if test "x$x_includes" = xNONE; then
43319          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
43320            x_includes="$SYSROOT/usr/X11R6/include"
43321          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
43322            x_includes="$SYSROOT/usr/include"
43323          fi
43324        fi
43325        if test "x$x_libraries" = xNONE; then
43326          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
43327            x_libraries="$SYSROOT/usr/X11R6/lib"
43328          elif test "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
43329            x_libraries="$SYSROOT/usr/lib64"
43330          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
43331            x_libraries="$SYSROOT/usr/lib"
43332          fi
43333        fi
43334      fi
43335    fi
43336
43337    # Now let autoconf do it's magic
43338    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
43339$as_echo_n "checking for X... " >&6; }
43340
43341
43342# Check whether --with-x was given.
43343if test "${with_x+set}" = set; then :
43344  withval=$with_x;
43345fi
43346
43347# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
43348if test "x$with_x" = xno; then
43349  # The user explicitly disabled X.
43350  have_x=disabled
43351else
43352  case $x_includes,$x_libraries in #(
43353    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
43354    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
43355  $as_echo_n "(cached) " >&6
43356else
43357  # One or both of the vars are not set, and there is no cached value.
43358ac_x_includes=no ac_x_libraries=no
43359rm -f -r conftest.dir
43360if mkdir conftest.dir; then
43361  cd conftest.dir
43362  cat >Imakefile <<'_ACEOF'
43363incroot:
43364	@echo incroot='${INCROOT}'
43365usrlibdir:
43366	@echo usrlibdir='${USRLIBDIR}'
43367libdir:
43368	@echo libdir='${LIBDIR}'
43369_ACEOF
43370  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
43371    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
43372    for ac_var in incroot usrlibdir libdir; do
43373      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
43374    done
43375    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
43376    for ac_extension in a so sl dylib la dll; do
43377      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
43378	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
43379	ac_im_usrlibdir=$ac_im_libdir; break
43380      fi
43381    done
43382    # Screen out bogus values from the imake configuration.  They are
43383    # bogus both because they are the default anyway, and because
43384    # using them would break gcc on systems where it needs fixed includes.
43385    case $ac_im_incroot in
43386	/usr/include) ac_x_includes= ;;
43387	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
43388    esac
43389    case $ac_im_usrlibdir in
43390	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
43391	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
43392    esac
43393  fi
43394  cd ..
43395  rm -f -r conftest.dir
43396fi
43397
43398# Standard set of common directories for X headers.
43399# Check X11 before X11Rn because it is often a symlink to the current release.
43400ac_x_header_dirs='
43401/usr/X11/include
43402/usr/X11R7/include
43403/usr/X11R6/include
43404/usr/X11R5/include
43405/usr/X11R4/include
43406
43407/usr/include/X11
43408/usr/include/X11R7
43409/usr/include/X11R6
43410/usr/include/X11R5
43411/usr/include/X11R4
43412
43413/usr/local/X11/include
43414/usr/local/X11R7/include
43415/usr/local/X11R6/include
43416/usr/local/X11R5/include
43417/usr/local/X11R4/include
43418
43419/usr/local/include/X11
43420/usr/local/include/X11R7
43421/usr/local/include/X11R6
43422/usr/local/include/X11R5
43423/usr/local/include/X11R4
43424
43425/usr/X386/include
43426/usr/x386/include
43427/usr/XFree86/include/X11
43428
43429/usr/include
43430/usr/local/include
43431/usr/unsupported/include
43432/usr/athena/include
43433/usr/local/x11r5/include
43434/usr/lpp/Xamples/include
43435
43436/usr/openwin/include
43437/usr/openwin/share/include'
43438
43439if test "$ac_x_includes" = no; then
43440  # Guess where to find include files, by looking for Xlib.h.
43441  # First, try using that file with no special directory specified.
43442  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43443/* end confdefs.h.  */
43444#include <X11/Xlib.h>
43445_ACEOF
43446if ac_fn_cxx_try_cpp "$LINENO"; then :
43447  # We can compile using X headers with no special include directory.
43448ac_x_includes=
43449else
43450  for ac_dir in $ac_x_header_dirs; do
43451  if test -r "$ac_dir/X11/Xlib.h"; then
43452    ac_x_includes=$ac_dir
43453    break
43454  fi
43455done
43456fi
43457rm -f conftest.err conftest.i conftest.$ac_ext
43458fi # $ac_x_includes = no
43459
43460if test "$ac_x_libraries" = no; then
43461  # Check for the libraries.
43462  # See if we find them without any special options.
43463  # Don't add to $LIBS permanently.
43464  ac_save_LIBS=$LIBS
43465  LIBS="-lX11 $LIBS"
43466  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43467/* end confdefs.h.  */
43468#include <X11/Xlib.h>
43469int
43470main ()
43471{
43472XrmInitialize ()
43473  ;
43474  return 0;
43475}
43476_ACEOF
43477if ac_fn_cxx_try_link "$LINENO"; then :
43478  LIBS=$ac_save_LIBS
43479# We can link X programs with no special library path.
43480ac_x_libraries=
43481else
43482  LIBS=$ac_save_LIBS
43483for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
43484do
43485  # Don't even attempt the hair of trying to link an X program!
43486  for ac_extension in a so sl dylib la dll; do
43487    if test -r "$ac_dir/libX11.$ac_extension"; then
43488      ac_x_libraries=$ac_dir
43489      break 2
43490    fi
43491  done
43492done
43493fi
43494rm -f core conftest.err conftest.$ac_objext \
43495    conftest$ac_exeext conftest.$ac_ext
43496fi # $ac_x_libraries = no
43497
43498case $ac_x_includes,$ac_x_libraries in #(
43499  no,* | *,no | *\'*)
43500    # Didn't find X, or a directory has "'" in its name.
43501    ac_cv_have_x="have_x=no";; #(
43502  *)
43503    # Record where we found X for the cache.
43504    ac_cv_have_x="have_x=yes\
43505	ac_x_includes='$ac_x_includes'\
43506	ac_x_libraries='$ac_x_libraries'"
43507esac
43508fi
43509;; #(
43510    *) have_x=yes;;
43511  esac
43512  eval "$ac_cv_have_x"
43513fi # $with_x != no
43514
43515if test "$have_x" != yes; then
43516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
43517$as_echo "$have_x" >&6; }
43518  no_x=yes
43519else
43520  # If each of the values was on the command line, it overrides each guess.
43521  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
43522  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
43523  # Update the cache value to reflect the command line values.
43524  ac_cv_have_x="have_x=yes\
43525	ac_x_includes='$x_includes'\
43526	ac_x_libraries='$x_libraries'"
43527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
43528$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
43529fi
43530
43531    if test "$no_x" = yes; then
43532  # Not all programs may use this symbol, but it does not hurt to define it.
43533
43534$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
43535
43536  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
43537else
43538  if test -n "$x_includes"; then
43539    X_CFLAGS="$X_CFLAGS -I$x_includes"
43540  fi
43541
43542  # It would also be nice to do this for all -L options, not just this one.
43543  if test -n "$x_libraries"; then
43544    X_LIBS="$X_LIBS -L$x_libraries"
43545    # For Solaris; some versions of Sun CC require a space after -R and
43546    # others require no space.  Words are not sufficient . . . .
43547    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
43548$as_echo_n "checking whether -R must be followed by a space... " >&6; }
43549    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
43550    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
43551    ac_cxx_werror_flag=yes
43552    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43553/* end confdefs.h.  */
43554
43555int
43556main ()
43557{
43558
43559  ;
43560  return 0;
43561}
43562_ACEOF
43563if ac_fn_cxx_try_link "$LINENO"; then :
43564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43565$as_echo "no" >&6; }
43566       X_LIBS="$X_LIBS -R$x_libraries"
43567else
43568  LIBS="$ac_xsave_LIBS -R $x_libraries"
43569       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43570/* end confdefs.h.  */
43571
43572int
43573main ()
43574{
43575
43576  ;
43577  return 0;
43578}
43579_ACEOF
43580if ac_fn_cxx_try_link "$LINENO"; then :
43581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43582$as_echo "yes" >&6; }
43583	  X_LIBS="$X_LIBS -R $x_libraries"
43584else
43585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
43586$as_echo "neither works" >&6; }
43587fi
43588rm -f core conftest.err conftest.$ac_objext \
43589    conftest$ac_exeext conftest.$ac_ext
43590fi
43591rm -f core conftest.err conftest.$ac_objext \
43592    conftest$ac_exeext conftest.$ac_ext
43593    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
43594    LIBS=$ac_xsave_LIBS
43595  fi
43596
43597  # Check for system-dependent libraries X programs must link with.
43598  # Do this before checking for the system-independent R6 libraries
43599  # (-lICE), since we may need -lsocket or whatever for X linking.
43600
43601  if test "$ISC" = yes; then
43602    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
43603  else
43604    # Martyn Johnson says this is needed for Ultrix, if the X
43605    # libraries were built with DECnet support.  And Karl Berry says
43606    # the Alpha needs dnet_stub (dnet does not exist).
43607    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
43608    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43609/* end confdefs.h.  */
43610
43611/* Override any GCC internal prototype to avoid an error.
43612   Use char because int might match the return type of a GCC
43613   builtin and then its argument prototype would still apply.  */
43614#ifdef __cplusplus
43615extern "C"
43616#endif
43617char XOpenDisplay ();
43618int
43619main ()
43620{
43621return XOpenDisplay ();
43622  ;
43623  return 0;
43624}
43625_ACEOF
43626if ac_fn_cxx_try_link "$LINENO"; then :
43627
43628else
43629  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
43630$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
43631if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
43632  $as_echo_n "(cached) " >&6
43633else
43634  ac_check_lib_save_LIBS=$LIBS
43635LIBS="-ldnet  $LIBS"
43636cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43637/* end confdefs.h.  */
43638
43639/* Override any GCC internal prototype to avoid an error.
43640   Use char because int might match the return type of a GCC
43641   builtin and then its argument prototype would still apply.  */
43642#ifdef __cplusplus
43643extern "C"
43644#endif
43645char dnet_ntoa ();
43646int
43647main ()
43648{
43649return dnet_ntoa ();
43650  ;
43651  return 0;
43652}
43653_ACEOF
43654if ac_fn_cxx_try_link "$LINENO"; then :
43655  ac_cv_lib_dnet_dnet_ntoa=yes
43656else
43657  ac_cv_lib_dnet_dnet_ntoa=no
43658fi
43659rm -f core conftest.err conftest.$ac_objext \
43660    conftest$ac_exeext conftest.$ac_ext
43661LIBS=$ac_check_lib_save_LIBS
43662fi
43663{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
43664$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
43665if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
43666  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
43667fi
43668
43669    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
43670      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
43671$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
43672if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
43673  $as_echo_n "(cached) " >&6
43674else
43675  ac_check_lib_save_LIBS=$LIBS
43676LIBS="-ldnet_stub  $LIBS"
43677cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43678/* end confdefs.h.  */
43679
43680/* Override any GCC internal prototype to avoid an error.
43681   Use char because int might match the return type of a GCC
43682   builtin and then its argument prototype would still apply.  */
43683#ifdef __cplusplus
43684extern "C"
43685#endif
43686char dnet_ntoa ();
43687int
43688main ()
43689{
43690return dnet_ntoa ();
43691  ;
43692  return 0;
43693}
43694_ACEOF
43695if ac_fn_cxx_try_link "$LINENO"; then :
43696  ac_cv_lib_dnet_stub_dnet_ntoa=yes
43697else
43698  ac_cv_lib_dnet_stub_dnet_ntoa=no
43699fi
43700rm -f core conftest.err conftest.$ac_objext \
43701    conftest$ac_exeext conftest.$ac_ext
43702LIBS=$ac_check_lib_save_LIBS
43703fi
43704{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
43705$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
43706if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
43707  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
43708fi
43709
43710    fi
43711fi
43712rm -f core conftest.err conftest.$ac_objext \
43713    conftest$ac_exeext conftest.$ac_ext
43714    LIBS="$ac_xsave_LIBS"
43715
43716    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
43717    # to get the SysV transport functions.
43718    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
43719    # needs -lnsl.
43720    # The nsl library prevents programs from opening the X display
43721    # on Irix 5.2, according to T.E. Dickey.
43722    # The functions gethostbyname, getservbyname, and inet_addr are
43723    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
43724    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
43725if test "x$ac_cv_func_gethostbyname" = xyes; then :
43726
43727fi
43728
43729    if test $ac_cv_func_gethostbyname = no; then
43730      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
43731$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
43732if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
43733  $as_echo_n "(cached) " >&6
43734else
43735  ac_check_lib_save_LIBS=$LIBS
43736LIBS="-lnsl  $LIBS"
43737cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43738/* end confdefs.h.  */
43739
43740/* Override any GCC internal prototype to avoid an error.
43741   Use char because int might match the return type of a GCC
43742   builtin and then its argument prototype would still apply.  */
43743#ifdef __cplusplus
43744extern "C"
43745#endif
43746char gethostbyname ();
43747int
43748main ()
43749{
43750return gethostbyname ();
43751  ;
43752  return 0;
43753}
43754_ACEOF
43755if ac_fn_cxx_try_link "$LINENO"; then :
43756  ac_cv_lib_nsl_gethostbyname=yes
43757else
43758  ac_cv_lib_nsl_gethostbyname=no
43759fi
43760rm -f core conftest.err conftest.$ac_objext \
43761    conftest$ac_exeext conftest.$ac_ext
43762LIBS=$ac_check_lib_save_LIBS
43763fi
43764{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
43765$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
43766if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
43767  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
43768fi
43769
43770      if test $ac_cv_lib_nsl_gethostbyname = no; then
43771	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
43772$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
43773if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
43774  $as_echo_n "(cached) " >&6
43775else
43776  ac_check_lib_save_LIBS=$LIBS
43777LIBS="-lbsd  $LIBS"
43778cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43779/* end confdefs.h.  */
43780
43781/* Override any GCC internal prototype to avoid an error.
43782   Use char because int might match the return type of a GCC
43783   builtin and then its argument prototype would still apply.  */
43784#ifdef __cplusplus
43785extern "C"
43786#endif
43787char gethostbyname ();
43788int
43789main ()
43790{
43791return gethostbyname ();
43792  ;
43793  return 0;
43794}
43795_ACEOF
43796if ac_fn_cxx_try_link "$LINENO"; then :
43797  ac_cv_lib_bsd_gethostbyname=yes
43798else
43799  ac_cv_lib_bsd_gethostbyname=no
43800fi
43801rm -f core conftest.err conftest.$ac_objext \
43802    conftest$ac_exeext conftest.$ac_ext
43803LIBS=$ac_check_lib_save_LIBS
43804fi
43805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
43806$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
43807if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
43808  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
43809fi
43810
43811      fi
43812    fi
43813
43814    # lieder@skyler.mavd.honeywell.com says without -lsocket,
43815    # socket/setsockopt and other routines are undefined under SCO ODT
43816    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
43817    # on later versions), says Simon Leinen: it contains gethostby*
43818    # variants that don't use the name server (or something).  -lsocket
43819    # must be given before -lnsl if both are needed.  We assume that
43820    # if connect needs -lnsl, so does gethostbyname.
43821    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
43822if test "x$ac_cv_func_connect" = xyes; then :
43823
43824fi
43825
43826    if test $ac_cv_func_connect = no; then
43827      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
43828$as_echo_n "checking for connect in -lsocket... " >&6; }
43829if ${ac_cv_lib_socket_connect+:} false; then :
43830  $as_echo_n "(cached) " >&6
43831else
43832  ac_check_lib_save_LIBS=$LIBS
43833LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
43834cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43835/* end confdefs.h.  */
43836
43837/* Override any GCC internal prototype to avoid an error.
43838   Use char because int might match the return type of a GCC
43839   builtin and then its argument prototype would still apply.  */
43840#ifdef __cplusplus
43841extern "C"
43842#endif
43843char connect ();
43844int
43845main ()
43846{
43847return connect ();
43848  ;
43849  return 0;
43850}
43851_ACEOF
43852if ac_fn_cxx_try_link "$LINENO"; then :
43853  ac_cv_lib_socket_connect=yes
43854else
43855  ac_cv_lib_socket_connect=no
43856fi
43857rm -f core conftest.err conftest.$ac_objext \
43858    conftest$ac_exeext conftest.$ac_ext
43859LIBS=$ac_check_lib_save_LIBS
43860fi
43861{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
43862$as_echo "$ac_cv_lib_socket_connect" >&6; }
43863if test "x$ac_cv_lib_socket_connect" = xyes; then :
43864  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
43865fi
43866
43867    fi
43868
43869    # Guillermo Gomez says -lposix is necessary on A/UX.
43870    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
43871if test "x$ac_cv_func_remove" = xyes; then :
43872
43873fi
43874
43875    if test $ac_cv_func_remove = no; then
43876      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
43877$as_echo_n "checking for remove in -lposix... " >&6; }
43878if ${ac_cv_lib_posix_remove+:} false; then :
43879  $as_echo_n "(cached) " >&6
43880else
43881  ac_check_lib_save_LIBS=$LIBS
43882LIBS="-lposix  $LIBS"
43883cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43884/* end confdefs.h.  */
43885
43886/* Override any GCC internal prototype to avoid an error.
43887   Use char because int might match the return type of a GCC
43888   builtin and then its argument prototype would still apply.  */
43889#ifdef __cplusplus
43890extern "C"
43891#endif
43892char remove ();
43893int
43894main ()
43895{
43896return remove ();
43897  ;
43898  return 0;
43899}
43900_ACEOF
43901if ac_fn_cxx_try_link "$LINENO"; then :
43902  ac_cv_lib_posix_remove=yes
43903else
43904  ac_cv_lib_posix_remove=no
43905fi
43906rm -f core conftest.err conftest.$ac_objext \
43907    conftest$ac_exeext conftest.$ac_ext
43908LIBS=$ac_check_lib_save_LIBS
43909fi
43910{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
43911$as_echo "$ac_cv_lib_posix_remove" >&6; }
43912if test "x$ac_cv_lib_posix_remove" = xyes; then :
43913  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
43914fi
43915
43916    fi
43917
43918    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
43919    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
43920if test "x$ac_cv_func_shmat" = xyes; then :
43921
43922fi
43923
43924    if test $ac_cv_func_shmat = no; then
43925      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
43926$as_echo_n "checking for shmat in -lipc... " >&6; }
43927if ${ac_cv_lib_ipc_shmat+:} false; then :
43928  $as_echo_n "(cached) " >&6
43929else
43930  ac_check_lib_save_LIBS=$LIBS
43931LIBS="-lipc  $LIBS"
43932cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43933/* end confdefs.h.  */
43934
43935/* Override any GCC internal prototype to avoid an error.
43936   Use char because int might match the return type of a GCC
43937   builtin and then its argument prototype would still apply.  */
43938#ifdef __cplusplus
43939extern "C"
43940#endif
43941char shmat ();
43942int
43943main ()
43944{
43945return shmat ();
43946  ;
43947  return 0;
43948}
43949_ACEOF
43950if ac_fn_cxx_try_link "$LINENO"; then :
43951  ac_cv_lib_ipc_shmat=yes
43952else
43953  ac_cv_lib_ipc_shmat=no
43954fi
43955rm -f core conftest.err conftest.$ac_objext \
43956    conftest$ac_exeext conftest.$ac_ext
43957LIBS=$ac_check_lib_save_LIBS
43958fi
43959{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
43960$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
43961if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
43962  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
43963fi
43964
43965    fi
43966  fi
43967
43968  # Check for libraries that X11R6 Xt/Xaw programs need.
43969  ac_save_LDFLAGS=$LDFLAGS
43970  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
43971  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
43972  # check for ICE first), but we must link in the order -lSM -lICE or
43973  # we get undefined symbols.  So assume we have SM if we have ICE.
43974  # These have to be linked with before -lX11, unlike the other
43975  # libraries we check for below, so use a different variable.
43976  # John Interrante, Karl Berry
43977  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
43978$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
43979if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
43980  $as_echo_n "(cached) " >&6
43981else
43982  ac_check_lib_save_LIBS=$LIBS
43983LIBS="-lICE $X_EXTRA_LIBS $LIBS"
43984cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43985/* end confdefs.h.  */
43986
43987/* Override any GCC internal prototype to avoid an error.
43988   Use char because int might match the return type of a GCC
43989   builtin and then its argument prototype would still apply.  */
43990#ifdef __cplusplus
43991extern "C"
43992#endif
43993char IceConnectionNumber ();
43994int
43995main ()
43996{
43997return IceConnectionNumber ();
43998  ;
43999  return 0;
44000}
44001_ACEOF
44002if ac_fn_cxx_try_link "$LINENO"; then :
44003  ac_cv_lib_ICE_IceConnectionNumber=yes
44004else
44005  ac_cv_lib_ICE_IceConnectionNumber=no
44006fi
44007rm -f core conftest.err conftest.$ac_objext \
44008    conftest$ac_exeext conftest.$ac_ext
44009LIBS=$ac_check_lib_save_LIBS
44010fi
44011{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
44012$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
44013if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
44014  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
44015fi
44016
44017  LDFLAGS=$ac_save_LDFLAGS
44018
44019fi
44020
44021
44022    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
44023    # this doesn't make sense so we remove it.
44024    if test "x$COMPILE_TYPE" = xcross; then
44025      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
44026    fi
44027
44028    if test "x$no_x" = xyes; then
44029
44030  # Print a helpful message on how to acquire the necessary build dependency.
44031  # x11 is the help tag: freetype, cups, pulse, alsa etc
44032  MISSING_DEPENDENCY=x11
44033
44034  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44035    cygwin_help $MISSING_DEPENDENCY
44036  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44037    msys_help $MISSING_DEPENDENCY
44038  else
44039    PKGHANDLER_COMMAND=
44040
44041    case $PKGHANDLER in
44042      apt-get)
44043        apt_help     $MISSING_DEPENDENCY ;;
44044      yum)
44045        yum_help     $MISSING_DEPENDENCY ;;
44046      port)
44047        port_help    $MISSING_DEPENDENCY ;;
44048      pkgutil)
44049        pkgutil_help $MISSING_DEPENDENCY ;;
44050      pkgadd)
44051        pkgadd_help  $MISSING_DEPENDENCY ;;
44052    esac
44053
44054    if test "x$PKGHANDLER_COMMAND" != x; then
44055      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44056    fi
44057  fi
44058
44059      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
44060    fi
44061
44062    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
44063      OPENWIN_HOME="/usr/openwin"
44064      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
44065      X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
44066          -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
44067          -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
44068          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
44069    fi
44070
44071    ac_ext=c
44072ac_cpp='$CPP $CPPFLAGS'
44073ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44074ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44075ac_compiler_gnu=$ac_cv_c_compiler_gnu
44076
44077    OLD_CFLAGS="$CFLAGS"
44078    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
44079
44080    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
44081    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
44082do :
44083  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
44084ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
44085          # include <X11/Xlib.h>
44086          # include <X11/Xutil.h>
44087
44088
44089"
44090if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
44091  cat >>confdefs.h <<_ACEOF
44092#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
44093_ACEOF
44094 X11_HEADERS_OK=yes
44095else
44096  X11_HEADERS_OK=no; break
44097fi
44098
44099done
44100
44101
44102    if test "x$X11_HEADERS_OK" = xno; then
44103
44104  # Print a helpful message on how to acquire the necessary build dependency.
44105  # x11 is the help tag: freetype, cups, pulse, alsa etc
44106  MISSING_DEPENDENCY=x11
44107
44108  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44109    cygwin_help $MISSING_DEPENDENCY
44110  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44111    msys_help $MISSING_DEPENDENCY
44112  else
44113    PKGHANDLER_COMMAND=
44114
44115    case $PKGHANDLER in
44116      apt-get)
44117        apt_help     $MISSING_DEPENDENCY ;;
44118      yum)
44119        yum_help     $MISSING_DEPENDENCY ;;
44120      port)
44121        port_help    $MISSING_DEPENDENCY ;;
44122      pkgutil)
44123        pkgutil_help $MISSING_DEPENDENCY ;;
44124      pkgadd)
44125        pkgadd_help  $MISSING_DEPENDENCY ;;
44126    esac
44127
44128    if test "x$PKGHANDLER_COMMAND" != x; then
44129      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44130    fi
44131  fi
44132
44133      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
44134    fi
44135
44136    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
44137    # defined in libawt_xawt.
44138    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
44139$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
44140    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44141/* end confdefs.h.  */
44142#include <X11/extensions/Xrender.h>
44143int
44144main ()
44145{
44146XLinearGradient x;
44147  ;
44148  return 0;
44149}
44150_ACEOF
44151if ac_fn_c_try_compile "$LINENO"; then :
44152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
44153$as_echo "yes" >&6; }
44154else
44155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44156$as_echo "no" >&6; }
44157         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
44158fi
44159rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44160
44161    CFLAGS="$OLD_CFLAGS"
44162    ac_ext=cpp
44163ac_cpp='$CXXCPP $CPPFLAGS'
44164ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44165ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44166ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44167
44168  fi # X11_NOT_NEEDED
44169
44170
44171
44172
44173
44174
44175  ###############################################################################
44176  #
44177  # The common unix printing system cups is used to print from java.
44178  #
44179
44180# Check whether --with-cups was given.
44181if test "${with_cups+set}" = set; then :
44182  withval=$with_cups;
44183fi
44184
44185
44186# Check whether --with-cups-include was given.
44187if test "${with_cups_include+set}" = set; then :
44188  withval=$with_cups_include;
44189fi
44190
44191
44192  if test "x$CUPS_NOT_NEEDED" = xyes; then
44193    if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
44194      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
44195$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
44196    fi
44197    CUPS_CFLAGS=
44198  else
44199    CUPS_FOUND=no
44200
44201    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
44202      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
44203    fi
44204
44205    if test "x${with_cups}" != x; then
44206      CUPS_CFLAGS="-I${with_cups}/include"
44207      CUPS_FOUND=yes
44208    fi
44209    if test "x${with_cups_include}" != x; then
44210      CUPS_CFLAGS="-I${with_cups_include}"
44211      CUPS_FOUND=yes
44212    fi
44213    if test "x$CUPS_FOUND" = xno; then
44214
44215
44216  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
44217    # Source the builddeps file again, to make sure it uses the latest variables!
44218    . $builddepsfile
44219    # Look for a target and build machine specific resource!
44220    eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
44221    if test "x$resource" = x; then
44222      # Ok, lets instead look for a target specific resource
44223      eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
44224    fi
44225    if test "x$resource" = x; then
44226      # Ok, lets instead look for a build specific resource
44227      eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
44228    fi
44229    if test "x$resource" = x; then
44230      # Ok, lets instead look for a generic resource
44231      # (The cups comes from M4 and not the shell, thus no need for eval here.)
44232      resource=${builddep_cups}
44233    fi
44234    if test "x$resource" != x; then
44235      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
44236$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
44237      # If the resource in the builddeps.conf file is an existing directory,
44238      # for example /java/linux/cups
44239      if test -d ${resource}; then
44240        depdir=${resource}
44241      else
44242
44243  # cups is for example mymodule
44244  # $resource is for example libs/general/libmymod_1_2_3.zip
44245  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
44246  # $with_builddeps_dir is for example /localhome/builddeps
44247  # depdir is the name of the variable into which we store the depdir, eg MYMOD
44248  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
44249  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
44250  filename=`basename $resource`
44251  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
44252  filebase=${filename%%.*}
44253  extension=${filename#*.}
44254  installdir=$with_builddeps_dir/$filebase
44255  if test ! -f $installdir/$filename.unpacked; then
44256    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
44257$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
44258    if test ! -d $installdir; then
44259      mkdir -p $installdir
44260    fi
44261    if test ! -d $installdir; then
44262      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
44263    fi
44264    tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
44265    touch $tmpfile
44266    if test ! -f $tmpfile; then
44267      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
44268    fi
44269
44270  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
44271  # $tmpfile is the local file name for the downloaded file.
44272  VALID_TOOL=no
44273  if test "x$BDEPS_FTP" = xwget; then
44274    VALID_TOOL=yes
44275    wget -O $tmpfile $with_builddeps_server/$resource
44276  fi
44277  if test "x$BDEPS_FTP" = xlftp; then
44278    VALID_TOOL=yes
44279    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
44280  fi
44281  if test "x$BDEPS_FTP" = xftp; then
44282    VALID_TOOL=yes
44283    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
44284    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
44285    FTPUSERPWD=${FTPSERVER%%@*}
44286    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
44287      FTPUSER=${userpwd%%:*}
44288      FTPPWD=${userpwd#*@}
44289      FTPSERVER=${FTPSERVER#*@}
44290    else
44291      FTPUSER=ftp
44292      FTPPWD=ftp
44293    fi
44294    # the "pass" command does not work on some
44295    # ftp clients (read ftp.exe) but if it works,
44296    # passive mode is better!
44297    ( \
44298        echo "user $FTPUSER $FTPPWD"        ; \
44299        echo "pass"                         ; \
44300        echo "bin"                          ; \
44301        echo "get $FTPPATH $tmpfile"              ; \
44302    ) | ftp -in $FTPSERVER
44303  fi
44304  if test "x$VALID_TOOL" != xyes; then
44305    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
44306  fi
44307
44308    mv $tmpfile $installdir/$filename
44309    if test ! -s $installdir/$filename; then
44310      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
44311    fi
44312    case "$extension" in
44313      zip)  echo "Unzipping $installdir/$filename..."
44314        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
44315        ;;
44316      tar.gz) echo "Untaring $installdir/$filename..."
44317        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44318        ;;
44319      tgz) echo "Untaring $installdir/$filename..."
44320        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44321        ;;
44322      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
44323        ;;
44324    esac
44325  fi
44326  if test -f $installdir/$filename.unpacked; then
44327    depdir=$installdir
44328  fi
44329
44330      fi
44331      # Source the builddeps file again, because in the previous command, the depdir
44332      # was updated to point at the current build dependency install directory.
44333      . $builddepsfile
44334      # Now extract variables from the builddeps.conf files.
44335      theroot=${builddep_cups_ROOT}
44336      thecflags=${builddep_cups_CFLAGS}
44337      thelibs=${builddep_cups_LIBS}
44338      if test "x$depdir" = x; then
44339        as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
44340      fi
44341      CUPS=$depdir
44342      if test "x$theroot" != x; then
44343        CUPS="$theroot"
44344      fi
44345      if test "x$thecflags" != x; then
44346        CUPS_CFLAGS="$thecflags"
44347      fi
44348      if test "x$thelibs" != x; then
44349        CUPS_LIBS="$thelibs"
44350      fi
44351      CUPS_FOUND=yes
44352
44353    fi
44354
44355  fi
44356
44357    fi
44358    if test "x$CUPS_FOUND" = xno; then
44359      # Are the cups headers installed in the default /usr/include location?
44360      for ac_header in cups/cups.h cups/ppd.h
44361do :
44362  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
44363ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
44364if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
44365  cat >>confdefs.h <<_ACEOF
44366#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
44367_ACEOF
44368
44369            CUPS_FOUND=yes
44370            CUPS_CFLAGS=
44371            DEFAULT_CUPS=yes
44372
44373
44374fi
44375
44376done
44377
44378    fi
44379    if test "x$CUPS_FOUND" = xno; then
44380      # Getting nervous now? Lets poke around for standard Solaris third-party
44381      # package installation locations.
44382      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
44383$as_echo_n "checking for cups headers... " >&6; }
44384      if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
44385        # An SFW package seems to be installed!
44386        CUPS_FOUND=yes
44387        CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
44388      elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
44389        # A CSW package seems to be installed!
44390        CUPS_FOUND=yes
44391        CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
44392      fi
44393      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
44394$as_echo "$CUPS_FOUND" >&6; }
44395    fi
44396    if test "x$CUPS_FOUND" = xno; then
44397
44398  # Print a helpful message on how to acquire the necessary build dependency.
44399  # cups is the help tag: freetype, cups, pulse, alsa etc
44400  MISSING_DEPENDENCY=cups
44401
44402  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44403    cygwin_help $MISSING_DEPENDENCY
44404  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44405    msys_help $MISSING_DEPENDENCY
44406  else
44407    PKGHANDLER_COMMAND=
44408
44409    case $PKGHANDLER in
44410      apt-get)
44411        apt_help     $MISSING_DEPENDENCY ;;
44412      yum)
44413        yum_help     $MISSING_DEPENDENCY ;;
44414      port)
44415        port_help    $MISSING_DEPENDENCY ;;
44416      pkgutil)
44417        pkgutil_help $MISSING_DEPENDENCY ;;
44418      pkgadd)
44419        pkgadd_help  $MISSING_DEPENDENCY ;;
44420    esac
44421
44422    if test "x$PKGHANDLER_COMMAND" != x; then
44423      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44424    fi
44425  fi
44426
44427      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
44428    fi
44429  fi
44430
44431
44432
44433
44434
44435
44436  ###############################################################################
44437  #
44438  # The ubiquitous freetype library is used to render fonts.
44439  #
44440
44441# Check whether --with-freetype was given.
44442if test "${with_freetype+set}" = set; then :
44443  withval=$with_freetype;
44444fi
44445
44446
44447# Check whether --with-freetype-include was given.
44448if test "${with_freetype_include+set}" = set; then :
44449  withval=$with_freetype_include;
44450fi
44451
44452
44453# Check whether --with-freetype-lib was given.
44454if test "${with_freetype_lib+set}" = set; then :
44455  withval=$with_freetype_lib;
44456fi
44457
44458
44459# Check whether --with-freetype-src was given.
44460if test "${with_freetype_src+set}" = set; then :
44461  withval=$with_freetype_src;
44462fi
44463
44464  # Check whether --enable-freetype-bundling was given.
44465if test "${enable_freetype_bundling+set}" = set; then :
44466  enableval=$enable_freetype_bundling;
44467fi
44468
44469
44470  # Need to specify explicitly since it needs to be overridden on some versions of macosx
44471  FREETYPE_BASE_NAME=freetype
44472  FREETYPE_CFLAGS=
44473  FREETYPE_LIBS=
44474  FREETYPE_BUNDLE_LIB_PATH=
44475
44476  if test "x$FREETYPE_NOT_NEEDED" = xyes; then
44477    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
44478      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
44479$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
44480    fi
44481    if test "x$enable_freetype_bundling" != x; then
44482      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
44483$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
44484    fi
44485  else
44486    # freetype is needed to build; go get it!
44487
44488    BUNDLE_FREETYPE="$enable_freetype_bundling"
44489
44490    if  test "x$with_freetype_src" != x; then
44491      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44492        # Try to build freetype if --with-freetype-src was given on Windows
44493
44494  FREETYPE_SRC_PATH="$with_freetype_src"
44495  BUILD_FREETYPE=yes
44496
44497  # Check if the freetype sources are acessible..
44498  if ! test -d $FREETYPE_SRC_PATH; then
44499    { $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
44500$as_echo "$as_me: WARNING: --with-freetype-src specified, but can't find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
44501    BUILD_FREETYPE=no
44502  fi
44503  # ..and contain a vc2010 project file
44504  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
44505  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
44506    { $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
44507$as_echo "$as_me: WARNING: Can't find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
44508    BUILD_FREETYPE=no
44509  fi
44510  # Now check if configure found a version of 'msbuild.exe'
44511  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
44512    { $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
44513$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;}
44514    BUILD_FREETYPE=no
44515  fi
44516
44517  # Ready to go..
44518  if test "x$BUILD_FREETYPE" = xyes; then
44519
44520    # msbuild requires trailing slashes for output directories
44521    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
44522    freetype_lib_path_unix="$freetype_lib_path"
44523    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
44524
44525  unix_path="$vcxproj_path"
44526  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44527    windows_path=`$CYGPATH -m "$unix_path"`
44528    vcxproj_path="$windows_path"
44529  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44530    windows_path=`cmd //c echo $unix_path`
44531    vcxproj_path="$windows_path"
44532  fi
44533
44534
44535  unix_path="$freetype_lib_path"
44536  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44537    windows_path=`$CYGPATH -m "$unix_path"`
44538    freetype_lib_path="$windows_path"
44539  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44540    windows_path=`cmd //c echo $unix_path`
44541    freetype_lib_path="$windows_path"
44542  fi
44543
44544
44545  unix_path="$freetype_obj_path"
44546  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44547    windows_path=`$CYGPATH -m "$unix_path"`
44548    freetype_obj_path="$windows_path"
44549  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44550    windows_path=`cmd //c echo $unix_path`
44551    freetype_obj_path="$windows_path"
44552  fi
44553
44554    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
44555      freetype_platform=x64
44556    else
44557      freetype_platform=win32
44558    fi
44559
44560    # The original freetype project file is for VS 2010 (i.e. 'v100'),
44561    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
44562    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
44563    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
44564    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
44565$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
44566
44567    # First we try to build the freetype.dll
44568    $ECHO -e "@echo off\n"\
44569	     "$MSBUILD $vcxproj_path "\
44570		       "/p:PlatformToolset=$PLATFORM_TOOLSET "\
44571		       "/p:Configuration=\"Release Multithreaded\" "\
44572		       "/p:Platform=$freetype_platform "\
44573		       "/p:ConfigurationType=DynamicLibrary "\
44574		       "/p:TargetName=freetype "\
44575		       "/p:OutDir=\"$freetype_lib_path\" "\
44576		       "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
44577    cmd /c freetype.bat
44578
44579    if test -s "$freetype_lib_path_unix/freetype.dll"; then
44580      # If that succeeds we also build freetype.lib
44581      $ECHO -e "@echo off\n"\
44582	       "$MSBUILD $vcxproj_path "\
44583			 "/p:PlatformToolset=$PLATFORM_TOOLSET "\
44584			 "/p:Configuration=\"Release Multithreaded\" "\
44585			 "/p:Platform=$freetype_platform "\
44586			 "/p:ConfigurationType=StaticLibrary "\
44587			 "/p:TargetName=freetype "\
44588			 "/p:OutDir=\"$freetype_lib_path\" "\
44589			 "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
44590      cmd /c freetype.bat
44591
44592      if test -s "$freetype_lib_path_unix/freetype.lib"; then
44593	# Once we build both, lib and dll, set freetype lib and include path appropriately
44594	POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
44595	POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
44596	{ $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
44597$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
44598      else
44599	BUILD_FREETYPE=no
44600      fi
44601    else
44602      BUILD_FREETYPE=no
44603    fi
44604  fi
44605
44606        if test "x$BUILD_FREETYPE" = xyes; then
44607          # Okay, we built it. Check that it works.
44608
44609  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44610  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44611  METHOD="--with-freetype-src"
44612
44613  # Let's start with an optimistic view of the world :-)
44614  FOUND_FREETYPE=yes
44615
44616  # First look for the canonical freetype main include file ft2build.h.
44617  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44618    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
44619    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
44620    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44621      # Fail.
44622      FOUND_FREETYPE=no
44623    fi
44624  fi
44625
44626  if test "x$FOUND_FREETYPE" = xyes; then
44627    # Include file found, let's continue the sanity check.
44628    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44629$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44630
44631    # Reset to default value
44632    FREETYPE_BASE_NAME=freetype
44633    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44634    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44635      if test "x$OPENJDK_TARGET_OS" = xmacosx \
44636          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
44637        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
44638        # for the .6 version explicitly.
44639        FREETYPE_BASE_NAME=freetype.6
44640        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44641        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
44642$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
44643      else
44644        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44645$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44646        FOUND_FREETYPE=no
44647      fi
44648    else
44649      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44650        # On Windows, we will need both .lib and .dll file.
44651        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
44652          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
44653$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
44654          FOUND_FREETYPE=no
44655        fi
44656      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
44657          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
44658        # Found lib in isa dir, use that instead.
44659        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
44660        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
44661$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
44662      fi
44663    fi
44664  fi
44665
44666  if test "x$FOUND_FREETYPE" = xyes; then
44667
44668  # Only process if variable expands to non-empty
44669
44670  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
44671    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44672
44673  # Input might be given as Windows format, start by converting to
44674  # unix format.
44675  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44676  new_path=`$CYGPATH -u "$path"`
44677
44678  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44679  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44680  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44681  # "foo.exe" is OK but "foo" is an error.
44682  #
44683  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44684  # It is also a way to make sure we got the proper file name for the real test later on.
44685  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44686  if test "x$test_shortpath" = x; then
44687    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44688$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44689    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44690  fi
44691
44692  # Call helper function which possibly converts this using DOS-style short mode.
44693  # If so, the updated path is stored in $new_path.
44694
44695  input_path="$new_path"
44696  # Check if we need to convert this using DOS-style short mode. If the path
44697  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44698  # take no chances and rewrite it.
44699  # Note: m4 eats our [], so we need to use [ and ] instead.
44700  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44701  if test "x$has_forbidden_chars" != x; then
44702    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44703    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44704    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44705    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44706      # Going to short mode and back again did indeed matter. Since short mode is
44707      # case insensitive, let's make it lowercase to improve readability.
44708      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44709      # Now convert it back to Unix-style (cygpath)
44710      input_path=`$CYGPATH -u "$shortmode_path"`
44711      new_path="$input_path"
44712    fi
44713  fi
44714
44715  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44716  if test "x$test_cygdrive_prefix" = x; then
44717    # As a simple fix, exclude /usr/bin since it's not a real path.
44718    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44719      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44720      # a path prefixed by /cygdrive for fixpath to work.
44721      new_path="$CYGWIN_ROOT_PATH$input_path"
44722    fi
44723  fi
44724
44725
44726  if test "x$path" != "x$new_path"; then
44727    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44728    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44729$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44730  fi
44731
44732    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44733
44734  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44735  has_colon=`$ECHO $path | $GREP ^.:`
44736  new_path="$path"
44737  if test "x$has_colon" = x; then
44738    # Not in mixed or Windows style, start by that.
44739    new_path=`cmd //c echo $path`
44740  fi
44741
44742
44743  input_path="$new_path"
44744  # Check if we need to convert this using DOS-style short mode. If the path
44745  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44746  # take no chances and rewrite it.
44747  # Note: m4 eats our [], so we need to use [ and ] instead.
44748  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44749  if test "x$has_forbidden_chars" != x; then
44750    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44751    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44752  fi
44753
44754
44755  windows_path="$new_path"
44756  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44757    unix_path=`$CYGPATH -u "$windows_path"`
44758    new_path="$unix_path"
44759  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44760    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44761    new_path="$unix_path"
44762  fi
44763
44764  if test "x$path" != "x$new_path"; then
44765    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44766    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44767$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44768  fi
44769
44770  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44771  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44772
44773    else
44774      # We're on a unix platform. Hooray! :)
44775      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44776      has_space=`$ECHO "$path" | $GREP " "`
44777      if test "x$has_space" != x; then
44778        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44779$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44780        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44781      fi
44782
44783      # Use eval to expand a potential ~
44784      eval path="$path"
44785      if test ! -f "$path" && test ! -d "$path"; then
44786        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44787      fi
44788
44789      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44790    fi
44791  fi
44792
44793
44794  # Only process if variable expands to non-empty
44795
44796  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
44797    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44798
44799  # Input might be given as Windows format, start by converting to
44800  # unix format.
44801  path="$POTENTIAL_FREETYPE_LIB_PATH"
44802  new_path=`$CYGPATH -u "$path"`
44803
44804  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44805  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44806  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44807  # "foo.exe" is OK but "foo" is an error.
44808  #
44809  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44810  # It is also a way to make sure we got the proper file name for the real test later on.
44811  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44812  if test "x$test_shortpath" = x; then
44813    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44814$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44815    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44816  fi
44817
44818  # Call helper function which possibly converts this using DOS-style short mode.
44819  # If so, the updated path is stored in $new_path.
44820
44821  input_path="$new_path"
44822  # Check if we need to convert this using DOS-style short mode. If the path
44823  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44824  # take no chances and rewrite it.
44825  # Note: m4 eats our [], so we need to use [ and ] instead.
44826  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44827  if test "x$has_forbidden_chars" != x; then
44828    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44829    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44830    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44831    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44832      # Going to short mode and back again did indeed matter. Since short mode is
44833      # case insensitive, let's make it lowercase to improve readability.
44834      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44835      # Now convert it back to Unix-style (cygpath)
44836      input_path=`$CYGPATH -u "$shortmode_path"`
44837      new_path="$input_path"
44838    fi
44839  fi
44840
44841  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44842  if test "x$test_cygdrive_prefix" = x; then
44843    # As a simple fix, exclude /usr/bin since it's not a real path.
44844    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44845      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44846      # a path prefixed by /cygdrive for fixpath to work.
44847      new_path="$CYGWIN_ROOT_PATH$input_path"
44848    fi
44849  fi
44850
44851
44852  if test "x$path" != "x$new_path"; then
44853    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44854    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44855$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44856  fi
44857
44858    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44859
44860  path="$POTENTIAL_FREETYPE_LIB_PATH"
44861  has_colon=`$ECHO $path | $GREP ^.:`
44862  new_path="$path"
44863  if test "x$has_colon" = x; then
44864    # Not in mixed or Windows style, start by that.
44865    new_path=`cmd //c echo $path`
44866  fi
44867
44868
44869  input_path="$new_path"
44870  # Check if we need to convert this using DOS-style short mode. If the path
44871  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44872  # take no chances and rewrite it.
44873  # Note: m4 eats our [], so we need to use [ and ] instead.
44874  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44875  if test "x$has_forbidden_chars" != x; then
44876    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44877    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44878  fi
44879
44880
44881  windows_path="$new_path"
44882  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44883    unix_path=`$CYGPATH -u "$windows_path"`
44884    new_path="$unix_path"
44885  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44886    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44887    new_path="$unix_path"
44888  fi
44889
44890  if test "x$path" != "x$new_path"; then
44891    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44892    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44893$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44894  fi
44895
44896  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44897  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44898
44899    else
44900      # We're on a unix platform. Hooray! :)
44901      path="$POTENTIAL_FREETYPE_LIB_PATH"
44902      has_space=`$ECHO "$path" | $GREP " "`
44903      if test "x$has_space" != x; then
44904        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44905$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44906        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44907      fi
44908
44909      # Use eval to expand a potential ~
44910      eval path="$path"
44911      if test ! -f "$path" && test ! -d "$path"; then
44912        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44913      fi
44914
44915      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44916    fi
44917  fi
44918
44919
44920    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44921    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44922$as_echo_n "checking for freetype includes... " >&6; }
44923    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44924$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44925    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44926    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44927$as_echo_n "checking for freetype libraries... " >&6; }
44928    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44929$as_echo "$FREETYPE_LIB_PATH" >&6; }
44930  fi
44931
44932          if test "x$FOUND_FREETYPE" != xyes; then
44933            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
44934          fi
44935        else
44936          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
44937$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
44938          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
44939        fi
44940      else
44941        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
44942$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
44943      fi
44944    fi
44945
44946    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
44947      # User has specified settings
44948
44949      if test "x$BUNDLE_FREETYPE" = x; then
44950        # If not specified, default is to bundle freetype
44951        BUNDLE_FREETYPE=yes
44952      fi
44953
44954      if test "x$with_freetype" != x; then
44955        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
44956        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
44957      fi
44958
44959      # Allow --with-freetype-lib and --with-freetype-include to override
44960      if test "x$with_freetype_include" != x; then
44961        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
44962      fi
44963      if test "x$with_freetype_lib" != x; then
44964        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
44965      fi
44966
44967      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
44968        # Okay, we got it. Check that it works.
44969
44970  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44971  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44972  METHOD="--with-freetype"
44973
44974  # Let's start with an optimistic view of the world :-)
44975  FOUND_FREETYPE=yes
44976
44977  # First look for the canonical freetype main include file ft2build.h.
44978  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44979    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
44980    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
44981    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44982      # Fail.
44983      FOUND_FREETYPE=no
44984    fi
44985  fi
44986
44987  if test "x$FOUND_FREETYPE" = xyes; then
44988    # Include file found, let's continue the sanity check.
44989    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44990$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44991
44992    # Reset to default value
44993    FREETYPE_BASE_NAME=freetype
44994    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44995    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44996      if test "x$OPENJDK_TARGET_OS" = xmacosx \
44997          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
44998        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
44999        # for the .6 version explicitly.
45000        FREETYPE_BASE_NAME=freetype.6
45001        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45002        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45003$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45004      else
45005        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45006$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45007        FOUND_FREETYPE=no
45008      fi
45009    else
45010      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45011        # On Windows, we will need both .lib and .dll file.
45012        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45013          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45014$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45015          FOUND_FREETYPE=no
45016        fi
45017      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45018          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45019        # Found lib in isa dir, use that instead.
45020        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45021        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45022$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45023      fi
45024    fi
45025  fi
45026
45027  if test "x$FOUND_FREETYPE" = xyes; then
45028
45029  # Only process if variable expands to non-empty
45030
45031  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
45032    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45033
45034  # Input might be given as Windows format, start by converting to
45035  # unix format.
45036  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45037  new_path=`$CYGPATH -u "$path"`
45038
45039  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45040  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45041  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45042  # "foo.exe" is OK but "foo" is an error.
45043  #
45044  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45045  # It is also a way to make sure we got the proper file name for the real test later on.
45046  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45047  if test "x$test_shortpath" = x; then
45048    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45049$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45050    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45051  fi
45052
45053  # Call helper function which possibly converts this using DOS-style short mode.
45054  # If so, the updated path is stored in $new_path.
45055
45056  input_path="$new_path"
45057  # Check if we need to convert this using DOS-style short mode. If the path
45058  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45059  # take no chances and rewrite it.
45060  # Note: m4 eats our [], so we need to use [ and ] instead.
45061  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45062  if test "x$has_forbidden_chars" != x; then
45063    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45064    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45065    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45066    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45067      # Going to short mode and back again did indeed matter. Since short mode is
45068      # case insensitive, let's make it lowercase to improve readability.
45069      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45070      # Now convert it back to Unix-style (cygpath)
45071      input_path=`$CYGPATH -u "$shortmode_path"`
45072      new_path="$input_path"
45073    fi
45074  fi
45075
45076  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45077  if test "x$test_cygdrive_prefix" = x; then
45078    # As a simple fix, exclude /usr/bin since it's not a real path.
45079    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45080      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45081      # a path prefixed by /cygdrive for fixpath to work.
45082      new_path="$CYGWIN_ROOT_PATH$input_path"
45083    fi
45084  fi
45085
45086
45087  if test "x$path" != "x$new_path"; then
45088    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45089    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45090$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45091  fi
45092
45093    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45094
45095  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45096  has_colon=`$ECHO $path | $GREP ^.:`
45097  new_path="$path"
45098  if test "x$has_colon" = x; then
45099    # Not in mixed or Windows style, start by that.
45100    new_path=`cmd //c echo $path`
45101  fi
45102
45103
45104  input_path="$new_path"
45105  # Check if we need to convert this using DOS-style short mode. If the path
45106  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45107  # take no chances and rewrite it.
45108  # Note: m4 eats our [], so we need to use [ and ] instead.
45109  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45110  if test "x$has_forbidden_chars" != x; then
45111    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45112    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45113  fi
45114
45115
45116  windows_path="$new_path"
45117  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45118    unix_path=`$CYGPATH -u "$windows_path"`
45119    new_path="$unix_path"
45120  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45121    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45122    new_path="$unix_path"
45123  fi
45124
45125  if test "x$path" != "x$new_path"; then
45126    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45127    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45128$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45129  fi
45130
45131  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45132  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45133
45134    else
45135      # We're on a unix platform. Hooray! :)
45136      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45137      has_space=`$ECHO "$path" | $GREP " "`
45138      if test "x$has_space" != x; then
45139        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45140$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45141        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45142      fi
45143
45144      # Use eval to expand a potential ~
45145      eval path="$path"
45146      if test ! -f "$path" && test ! -d "$path"; then
45147        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45148      fi
45149
45150      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45151    fi
45152  fi
45153
45154
45155  # Only process if variable expands to non-empty
45156
45157  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
45158    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45159
45160  # Input might be given as Windows format, start by converting to
45161  # unix format.
45162  path="$POTENTIAL_FREETYPE_LIB_PATH"
45163  new_path=`$CYGPATH -u "$path"`
45164
45165  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45166  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45167  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45168  # "foo.exe" is OK but "foo" is an error.
45169  #
45170  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45171  # It is also a way to make sure we got the proper file name for the real test later on.
45172  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45173  if test "x$test_shortpath" = x; then
45174    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45175$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45176    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45177  fi
45178
45179  # Call helper function which possibly converts this using DOS-style short mode.
45180  # If so, the updated path is stored in $new_path.
45181
45182  input_path="$new_path"
45183  # Check if we need to convert this using DOS-style short mode. If the path
45184  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45185  # take no chances and rewrite it.
45186  # Note: m4 eats our [], so we need to use [ and ] instead.
45187  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45188  if test "x$has_forbidden_chars" != x; then
45189    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45190    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45191    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45192    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45193      # Going to short mode and back again did indeed matter. Since short mode is
45194      # case insensitive, let's make it lowercase to improve readability.
45195      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45196      # Now convert it back to Unix-style (cygpath)
45197      input_path=`$CYGPATH -u "$shortmode_path"`
45198      new_path="$input_path"
45199    fi
45200  fi
45201
45202  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45203  if test "x$test_cygdrive_prefix" = x; then
45204    # As a simple fix, exclude /usr/bin since it's not a real path.
45205    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45206      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45207      # a path prefixed by /cygdrive for fixpath to work.
45208      new_path="$CYGWIN_ROOT_PATH$input_path"
45209    fi
45210  fi
45211
45212
45213  if test "x$path" != "x$new_path"; then
45214    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45215    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45216$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45217  fi
45218
45219    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45220
45221  path="$POTENTIAL_FREETYPE_LIB_PATH"
45222  has_colon=`$ECHO $path | $GREP ^.:`
45223  new_path="$path"
45224  if test "x$has_colon" = x; then
45225    # Not in mixed or Windows style, start by that.
45226    new_path=`cmd //c echo $path`
45227  fi
45228
45229
45230  input_path="$new_path"
45231  # Check if we need to convert this using DOS-style short mode. If the path
45232  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45233  # take no chances and rewrite it.
45234  # Note: m4 eats our [], so we need to use [ and ] instead.
45235  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45236  if test "x$has_forbidden_chars" != x; then
45237    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45238    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45239  fi
45240
45241
45242  windows_path="$new_path"
45243  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45244    unix_path=`$CYGPATH -u "$windows_path"`
45245    new_path="$unix_path"
45246  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45247    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45248    new_path="$unix_path"
45249  fi
45250
45251  if test "x$path" != "x$new_path"; then
45252    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45253    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45254$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45255  fi
45256
45257  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45258  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45259
45260    else
45261      # We're on a unix platform. Hooray! :)
45262      path="$POTENTIAL_FREETYPE_LIB_PATH"
45263      has_space=`$ECHO "$path" | $GREP " "`
45264      if test "x$has_space" != x; then
45265        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45266$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45267        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45268      fi
45269
45270      # Use eval to expand a potential ~
45271      eval path="$path"
45272      if test ! -f "$path" && test ! -d "$path"; then
45273        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45274      fi
45275
45276      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45277    fi
45278  fi
45279
45280
45281    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45282    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45283$as_echo_n "checking for freetype includes... " >&6; }
45284    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45285$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45286    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45287    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45288$as_echo_n "checking for freetype libraries... " >&6; }
45289    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45290$as_echo "$FREETYPE_LIB_PATH" >&6; }
45291  fi
45292
45293        if test "x$FOUND_FREETYPE" != xyes; then
45294          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
45295        fi
45296      else
45297        # User specified only one of lib or include. This is an error.
45298        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
45299          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
45300$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
45301          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
45302        else
45303          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
45304$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
45305          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
45306        fi
45307      fi
45308    else
45309      # User did not specify settings, but we need freetype. Try to locate it.
45310
45311      if test "x$BUNDLE_FREETYPE" = x; then
45312        # If not specified, default is to bundle freetype only on windows
45313        if test "x$OPENJDK_TARGET_OS" = xwindows; then
45314          BUNDLE_FREETYPE=yes
45315        else
45316          BUNDLE_FREETYPE=no
45317        fi
45318      fi
45319
45320      if test "x$FOUND_FREETYPE" != xyes; then
45321        # Check builddeps
45322
45323
45324  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
45325    # Source the builddeps file again, to make sure it uses the latest variables!
45326    . $builddepsfile
45327    # Look for a target and build machine specific resource!
45328    eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
45329    if test "x$resource" = x; then
45330      # Ok, lets instead look for a target specific resource
45331      eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
45332    fi
45333    if test "x$resource" = x; then
45334      # Ok, lets instead look for a build specific resource
45335      eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
45336    fi
45337    if test "x$resource" = x; then
45338      # Ok, lets instead look for a generic resource
45339      # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
45340      resource=${builddep_freetype2}
45341    fi
45342    if test "x$resource" != x; then
45343      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
45344$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
45345      # If the resource in the builddeps.conf file is an existing directory,
45346      # for example /java/linux/cups
45347      if test -d ${resource}; then
45348        depdir=${resource}
45349      else
45350
45351  # freetype2 is for example mymodule
45352  # $resource is for example libs/general/libmymod_1_2_3.zip
45353  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
45354  # $with_builddeps_dir is for example /localhome/builddeps
45355  # depdir is the name of the variable into which we store the depdir, eg MYMOD
45356  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
45357  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
45358  filename=`basename $resource`
45359  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
45360  filebase=${filename%%.*}
45361  extension=${filename#*.}
45362  installdir=$with_builddeps_dir/$filebase
45363  if test ! -f $installdir/$filename.unpacked; then
45364    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
45365$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
45366    if test ! -d $installdir; then
45367      mkdir -p $installdir
45368    fi
45369    if test ! -d $installdir; then
45370      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
45371    fi
45372    tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
45373    touch $tmpfile
45374    if test ! -f $tmpfile; then
45375      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
45376    fi
45377
45378  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
45379  # $tmpfile is the local file name for the downloaded file.
45380  VALID_TOOL=no
45381  if test "x$BDEPS_FTP" = xwget; then
45382    VALID_TOOL=yes
45383    wget -O $tmpfile $with_builddeps_server/$resource
45384  fi
45385  if test "x$BDEPS_FTP" = xlftp; then
45386    VALID_TOOL=yes
45387    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
45388  fi
45389  if test "x$BDEPS_FTP" = xftp; then
45390    VALID_TOOL=yes
45391    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
45392    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
45393    FTPUSERPWD=${FTPSERVER%%@*}
45394    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
45395      FTPUSER=${userpwd%%:*}
45396      FTPPWD=${userpwd#*@}
45397      FTPSERVER=${FTPSERVER#*@}
45398    else
45399      FTPUSER=ftp
45400      FTPPWD=ftp
45401    fi
45402    # the "pass" command does not work on some
45403    # ftp clients (read ftp.exe) but if it works,
45404    # passive mode is better!
45405    ( \
45406        echo "user $FTPUSER $FTPPWD"        ; \
45407        echo "pass"                         ; \
45408        echo "bin"                          ; \
45409        echo "get $FTPPATH $tmpfile"              ; \
45410    ) | ftp -in $FTPSERVER
45411  fi
45412  if test "x$VALID_TOOL" != xyes; then
45413    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
45414  fi
45415
45416    mv $tmpfile $installdir/$filename
45417    if test ! -s $installdir/$filename; then
45418      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
45419    fi
45420    case "$extension" in
45421      zip)  echo "Unzipping $installdir/$filename..."
45422        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
45423        ;;
45424      tar.gz) echo "Untaring $installdir/$filename..."
45425        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
45426        ;;
45427      tgz) echo "Untaring $installdir/$filename..."
45428        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
45429        ;;
45430      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
45431        ;;
45432    esac
45433  fi
45434  if test -f $installdir/$filename.unpacked; then
45435    depdir=$installdir
45436  fi
45437
45438      fi
45439      # Source the builddeps file again, because in the previous command, the depdir
45440      # was updated to point at the current build dependency install directory.
45441      . $builddepsfile
45442      # Now extract variables from the builddeps.conf files.
45443      theroot=${builddep_freetype2_ROOT}
45444      thecflags=${builddep_freetype2_CFLAGS}
45445      thelibs=${builddep_freetype2_LIBS}
45446      if test "x$depdir" = x; then
45447        as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
45448      fi
45449      FREETYPE=$depdir
45450      if test "x$theroot" != x; then
45451        FREETYPE="$theroot"
45452      fi
45453      if test "x$thecflags" != x; then
45454        FREETYPE_CFLAGS="$thecflags"
45455      fi
45456      if test "x$thelibs" != x; then
45457        FREETYPE_LIBS="$thelibs"
45458      fi
45459      FOUND_FREETYPE=yes
45460      else FOUND_FREETYPE=no
45461
45462    fi
45463    else FOUND_FREETYPE=no
45464
45465  fi
45466
45467        # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
45468        if test "x$FOUND_FREETYPE" = xyes; then
45469          if test "x$BUNDLE_FREETYPE" = xyes; then
45470            { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
45471$as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
45472            FOUND_FREETYPE=no
45473          else
45474            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
45475$as_echo_n "checking for freetype... " >&6; }
45476            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
45477$as_echo "yes (using builddeps)" >&6; }
45478          fi
45479        fi
45480      fi
45481
45482      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
45483      if test "x$SYSROOT" = x; then
45484        if test "x$FOUND_FREETYPE" != xyes; then
45485          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
45486          if test "x$PKG_CONFIG" != x; then
45487
45488pkg_failed=no
45489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
45490$as_echo_n "checking for FREETYPE... " >&6; }
45491
45492if test -n "$FREETYPE_CFLAGS"; then
45493    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
45494 elif test -n "$PKG_CONFIG"; then
45495    if test -n "$PKG_CONFIG" && \
45496    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
45497  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
45498  ac_status=$?
45499  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45500  test $ac_status = 0; }; then
45501  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
45502else
45503  pkg_failed=yes
45504fi
45505 else
45506    pkg_failed=untried
45507fi
45508if test -n "$FREETYPE_LIBS"; then
45509    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
45510 elif test -n "$PKG_CONFIG"; then
45511    if test -n "$PKG_CONFIG" && \
45512    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
45513  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
45514  ac_status=$?
45515  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45516  test $ac_status = 0; }; then
45517  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
45518else
45519  pkg_failed=yes
45520fi
45521 else
45522    pkg_failed=untried
45523fi
45524
45525
45526
45527if test $pkg_failed = yes; then
45528
45529if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
45530        _pkg_short_errors_supported=yes
45531else
45532        _pkg_short_errors_supported=no
45533fi
45534        if test $_pkg_short_errors_supported = yes; then
45535	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
45536        else
45537	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
45538        fi
45539	# Put the nasty error message in config.log where it belongs
45540	echo "$FREETYPE_PKG_ERRORS" >&5
45541
45542	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45543$as_echo "no" >&6; }
45544                FOUND_FREETYPE=no
45545elif test $pkg_failed = untried; then
45546	FOUND_FREETYPE=no
45547else
45548	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
45549	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
45550        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45551$as_echo "yes" >&6; }
45552	FOUND_FREETYPE=yes
45553fi
45554            if test "x$FOUND_FREETYPE" = xyes; then
45555              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
45556              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
45557              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
45558              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
45559                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
45560              fi
45561              # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
45562              if test "x$BUNDLE_FREETYPE" = xyes; then
45563                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
45564$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
45565                FOUND_FREETYPE=no
45566              else
45567                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
45568$as_echo_n "checking for freetype... " >&6; }
45569                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
45570$as_echo "yes (using pkg-config)" >&6; }
45571              fi
45572            fi
45573          fi
45574        fi
45575      fi
45576
45577      if test "x$FOUND_FREETYPE" != xyes; then
45578        # Check in well-known locations
45579        if test "x$OPENJDK_TARGET_OS" = xwindows; then
45580          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
45581
45582  windows_path="$FREETYPE_BASE_DIR"
45583  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45584    unix_path=`$CYGPATH -u "$windows_path"`
45585    FREETYPE_BASE_DIR="$unix_path"
45586  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45587    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45588    FREETYPE_BASE_DIR="$unix_path"
45589  fi
45590
45591
45592  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45593  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45594  METHOD="well-known location"
45595
45596  # Let's start with an optimistic view of the world :-)
45597  FOUND_FREETYPE=yes
45598
45599  # First look for the canonical freetype main include file ft2build.h.
45600  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45601    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45602    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45603    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45604      # Fail.
45605      FOUND_FREETYPE=no
45606    fi
45607  fi
45608
45609  if test "x$FOUND_FREETYPE" = xyes; then
45610    # Include file found, let's continue the sanity check.
45611    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45612$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45613
45614    # Reset to default value
45615    FREETYPE_BASE_NAME=freetype
45616    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45617    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45618      if test "x$OPENJDK_TARGET_OS" = xmacosx \
45619          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45620        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45621        # for the .6 version explicitly.
45622        FREETYPE_BASE_NAME=freetype.6
45623        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45624        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45625$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45626      else
45627        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45628$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45629        FOUND_FREETYPE=no
45630      fi
45631    else
45632      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45633        # On Windows, we will need both .lib and .dll file.
45634        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45635          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45636$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45637          FOUND_FREETYPE=no
45638        fi
45639      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45640          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45641        # Found lib in isa dir, use that instead.
45642        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45643        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45644$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45645      fi
45646    fi
45647  fi
45648
45649  if test "x$FOUND_FREETYPE" = xyes; then
45650
45651  # Only process if variable expands to non-empty
45652
45653  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
45654    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45655
45656  # Input might be given as Windows format, start by converting to
45657  # unix format.
45658  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45659  new_path=`$CYGPATH -u "$path"`
45660
45661  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45662  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45663  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45664  # "foo.exe" is OK but "foo" is an error.
45665  #
45666  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45667  # It is also a way to make sure we got the proper file name for the real test later on.
45668  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45669  if test "x$test_shortpath" = x; then
45670    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45671$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45672    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45673  fi
45674
45675  # Call helper function which possibly converts this using DOS-style short mode.
45676  # If so, the updated path is stored in $new_path.
45677
45678  input_path="$new_path"
45679  # Check if we need to convert this using DOS-style short mode. If the path
45680  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45681  # take no chances and rewrite it.
45682  # Note: m4 eats our [], so we need to use [ and ] instead.
45683  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45684  if test "x$has_forbidden_chars" != x; then
45685    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45686    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45687    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45688    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45689      # Going to short mode and back again did indeed matter. Since short mode is
45690      # case insensitive, let's make it lowercase to improve readability.
45691      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45692      # Now convert it back to Unix-style (cygpath)
45693      input_path=`$CYGPATH -u "$shortmode_path"`
45694      new_path="$input_path"
45695    fi
45696  fi
45697
45698  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45699  if test "x$test_cygdrive_prefix" = x; then
45700    # As a simple fix, exclude /usr/bin since it's not a real path.
45701    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45702      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45703      # a path prefixed by /cygdrive for fixpath to work.
45704      new_path="$CYGWIN_ROOT_PATH$input_path"
45705    fi
45706  fi
45707
45708
45709  if test "x$path" != "x$new_path"; then
45710    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45711    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45712$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45713  fi
45714
45715    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45716
45717  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45718  has_colon=`$ECHO $path | $GREP ^.:`
45719  new_path="$path"
45720  if test "x$has_colon" = x; then
45721    # Not in mixed or Windows style, start by that.
45722    new_path=`cmd //c echo $path`
45723  fi
45724
45725
45726  input_path="$new_path"
45727  # Check if we need to convert this using DOS-style short mode. If the path
45728  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45729  # take no chances and rewrite it.
45730  # Note: m4 eats our [], so we need to use [ and ] instead.
45731  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45732  if test "x$has_forbidden_chars" != x; then
45733    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45734    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45735  fi
45736
45737
45738  windows_path="$new_path"
45739  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45740    unix_path=`$CYGPATH -u "$windows_path"`
45741    new_path="$unix_path"
45742  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45743    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45744    new_path="$unix_path"
45745  fi
45746
45747  if test "x$path" != "x$new_path"; then
45748    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45749    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45750$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45751  fi
45752
45753  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45754  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45755
45756    else
45757      # We're on a unix platform. Hooray! :)
45758      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45759      has_space=`$ECHO "$path" | $GREP " "`
45760      if test "x$has_space" != x; then
45761        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45762$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45763        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45764      fi
45765
45766      # Use eval to expand a potential ~
45767      eval path="$path"
45768      if test ! -f "$path" && test ! -d "$path"; then
45769        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45770      fi
45771
45772      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45773    fi
45774  fi
45775
45776
45777  # Only process if variable expands to non-empty
45778
45779  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
45780    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45781
45782  # Input might be given as Windows format, start by converting to
45783  # unix format.
45784  path="$POTENTIAL_FREETYPE_LIB_PATH"
45785  new_path=`$CYGPATH -u "$path"`
45786
45787  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45788  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45789  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45790  # "foo.exe" is OK but "foo" is an error.
45791  #
45792  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45793  # It is also a way to make sure we got the proper file name for the real test later on.
45794  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45795  if test "x$test_shortpath" = x; then
45796    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45797$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45798    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45799  fi
45800
45801  # Call helper function which possibly converts this using DOS-style short mode.
45802  # If so, the updated path is stored in $new_path.
45803
45804  input_path="$new_path"
45805  # Check if we need to convert this using DOS-style short mode. If the path
45806  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45807  # take no chances and rewrite it.
45808  # Note: m4 eats our [], so we need to use [ and ] instead.
45809  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45810  if test "x$has_forbidden_chars" != x; then
45811    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45812    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45813    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45814    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45815      # Going to short mode and back again did indeed matter. Since short mode is
45816      # case insensitive, let's make it lowercase to improve readability.
45817      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45818      # Now convert it back to Unix-style (cygpath)
45819      input_path=`$CYGPATH -u "$shortmode_path"`
45820      new_path="$input_path"
45821    fi
45822  fi
45823
45824  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45825  if test "x$test_cygdrive_prefix" = x; then
45826    # As a simple fix, exclude /usr/bin since it's not a real path.
45827    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45828      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45829      # a path prefixed by /cygdrive for fixpath to work.
45830      new_path="$CYGWIN_ROOT_PATH$input_path"
45831    fi
45832  fi
45833
45834
45835  if test "x$path" != "x$new_path"; then
45836    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45837    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45838$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45839  fi
45840
45841    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45842
45843  path="$POTENTIAL_FREETYPE_LIB_PATH"
45844  has_colon=`$ECHO $path | $GREP ^.:`
45845  new_path="$path"
45846  if test "x$has_colon" = x; then
45847    # Not in mixed or Windows style, start by that.
45848    new_path=`cmd //c echo $path`
45849  fi
45850
45851
45852  input_path="$new_path"
45853  # Check if we need to convert this using DOS-style short mode. If the path
45854  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45855  # take no chances and rewrite it.
45856  # Note: m4 eats our [], so we need to use [ and ] instead.
45857  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45858  if test "x$has_forbidden_chars" != x; then
45859    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45860    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45861  fi
45862
45863
45864  windows_path="$new_path"
45865  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45866    unix_path=`$CYGPATH -u "$windows_path"`
45867    new_path="$unix_path"
45868  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45869    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45870    new_path="$unix_path"
45871  fi
45872
45873  if test "x$path" != "x$new_path"; then
45874    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45875    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45876$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45877  fi
45878
45879  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45880  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45881
45882    else
45883      # We're on a unix platform. Hooray! :)
45884      path="$POTENTIAL_FREETYPE_LIB_PATH"
45885      has_space=`$ECHO "$path" | $GREP " "`
45886      if test "x$has_space" != x; then
45887        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45888$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45889        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45890      fi
45891
45892      # Use eval to expand a potential ~
45893      eval path="$path"
45894      if test ! -f "$path" && test ! -d "$path"; then
45895        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45896      fi
45897
45898      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45899    fi
45900  fi
45901
45902
45903    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45904    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45905$as_echo_n "checking for freetype includes... " >&6; }
45906    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45907$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45908    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45909    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45910$as_echo_n "checking for freetype libraries... " >&6; }
45911    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45912$as_echo "$FREETYPE_LIB_PATH" >&6; }
45913  fi
45914
45915          if test "x$FOUND_FREETYPE" != xyes; then
45916            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
45917
45918  windows_path="$FREETYPE_BASE_DIR"
45919  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45920    unix_path=`$CYGPATH -u "$windows_path"`
45921    FREETYPE_BASE_DIR="$unix_path"
45922  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45923    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45924    FREETYPE_BASE_DIR="$unix_path"
45925  fi
45926
45927
45928  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45929  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45930  METHOD="well-known location"
45931
45932  # Let's start with an optimistic view of the world :-)
45933  FOUND_FREETYPE=yes
45934
45935  # First look for the canonical freetype main include file ft2build.h.
45936  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45937    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45938    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45939    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45940      # Fail.
45941      FOUND_FREETYPE=no
45942    fi
45943  fi
45944
45945  if test "x$FOUND_FREETYPE" = xyes; then
45946    # Include file found, let's continue the sanity check.
45947    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45948$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45949
45950    # Reset to default value
45951    FREETYPE_BASE_NAME=freetype
45952    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45953    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45954      if test "x$OPENJDK_TARGET_OS" = xmacosx \
45955          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45956        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45957        # for the .6 version explicitly.
45958        FREETYPE_BASE_NAME=freetype.6
45959        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45960        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45961$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45962      else
45963        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45964$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45965        FOUND_FREETYPE=no
45966      fi
45967    else
45968      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45969        # On Windows, we will need both .lib and .dll file.
45970        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45971          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45972$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45973          FOUND_FREETYPE=no
45974        fi
45975      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45976          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45977        # Found lib in isa dir, use that instead.
45978        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45979        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45980$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45981      fi
45982    fi
45983  fi
45984
45985  if test "x$FOUND_FREETYPE" = xyes; then
45986
45987  # Only process if variable expands to non-empty
45988
45989  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
45990    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45991
45992  # Input might be given as Windows format, start by converting to
45993  # unix format.
45994  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45995  new_path=`$CYGPATH -u "$path"`
45996
45997  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45998  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45999  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46000  # "foo.exe" is OK but "foo" is an error.
46001  #
46002  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46003  # It is also a way to make sure we got the proper file name for the real test later on.
46004  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46005  if test "x$test_shortpath" = x; then
46006    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46007$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46008    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46009  fi
46010
46011  # Call helper function which possibly converts this using DOS-style short mode.
46012  # If so, the updated path is stored in $new_path.
46013
46014  input_path="$new_path"
46015  # Check if we need to convert this using DOS-style short mode. If the path
46016  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46017  # take no chances and rewrite it.
46018  # Note: m4 eats our [], so we need to use [ and ] instead.
46019  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46020  if test "x$has_forbidden_chars" != x; then
46021    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46022    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46023    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46024    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46025      # Going to short mode and back again did indeed matter. Since short mode is
46026      # case insensitive, let's make it lowercase to improve readability.
46027      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46028      # Now convert it back to Unix-style (cygpath)
46029      input_path=`$CYGPATH -u "$shortmode_path"`
46030      new_path="$input_path"
46031    fi
46032  fi
46033
46034  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46035  if test "x$test_cygdrive_prefix" = x; then
46036    # As a simple fix, exclude /usr/bin since it's not a real path.
46037    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46038      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46039      # a path prefixed by /cygdrive for fixpath to work.
46040      new_path="$CYGWIN_ROOT_PATH$input_path"
46041    fi
46042  fi
46043
46044
46045  if test "x$path" != "x$new_path"; then
46046    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46047    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46048$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46049  fi
46050
46051    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46052
46053  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46054  has_colon=`$ECHO $path | $GREP ^.:`
46055  new_path="$path"
46056  if test "x$has_colon" = x; then
46057    # Not in mixed or Windows style, start by that.
46058    new_path=`cmd //c echo $path`
46059  fi
46060
46061
46062  input_path="$new_path"
46063  # Check if we need to convert this using DOS-style short mode. If the path
46064  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46065  # take no chances and rewrite it.
46066  # Note: m4 eats our [], so we need to use [ and ] instead.
46067  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46068  if test "x$has_forbidden_chars" != x; then
46069    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46070    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46071  fi
46072
46073
46074  windows_path="$new_path"
46075  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46076    unix_path=`$CYGPATH -u "$windows_path"`
46077    new_path="$unix_path"
46078  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46079    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46080    new_path="$unix_path"
46081  fi
46082
46083  if test "x$path" != "x$new_path"; then
46084    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46085    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46086$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46087  fi
46088
46089  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46090  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46091
46092    else
46093      # We're on a unix platform. Hooray! :)
46094      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46095      has_space=`$ECHO "$path" | $GREP " "`
46096      if test "x$has_space" != x; then
46097        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46098$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46099        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46100      fi
46101
46102      # Use eval to expand a potential ~
46103      eval path="$path"
46104      if test ! -f "$path" && test ! -d "$path"; then
46105        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46106      fi
46107
46108      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46109    fi
46110  fi
46111
46112
46113  # Only process if variable expands to non-empty
46114
46115  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
46116    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46117
46118  # Input might be given as Windows format, start by converting to
46119  # unix format.
46120  path="$POTENTIAL_FREETYPE_LIB_PATH"
46121  new_path=`$CYGPATH -u "$path"`
46122
46123  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46124  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46125  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46126  # "foo.exe" is OK but "foo" is an error.
46127  #
46128  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46129  # It is also a way to make sure we got the proper file name for the real test later on.
46130  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46131  if test "x$test_shortpath" = x; then
46132    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46133$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46134    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46135  fi
46136
46137  # Call helper function which possibly converts this using DOS-style short mode.
46138  # If so, the updated path is stored in $new_path.
46139
46140  input_path="$new_path"
46141  # Check if we need to convert this using DOS-style short mode. If the path
46142  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46143  # take no chances and rewrite it.
46144  # Note: m4 eats our [], so we need to use [ and ] instead.
46145  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46146  if test "x$has_forbidden_chars" != x; then
46147    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46148    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46149    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46150    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46151      # Going to short mode and back again did indeed matter. Since short mode is
46152      # case insensitive, let's make it lowercase to improve readability.
46153      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46154      # Now convert it back to Unix-style (cygpath)
46155      input_path=`$CYGPATH -u "$shortmode_path"`
46156      new_path="$input_path"
46157    fi
46158  fi
46159
46160  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46161  if test "x$test_cygdrive_prefix" = x; then
46162    # As a simple fix, exclude /usr/bin since it's not a real path.
46163    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46164      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46165      # a path prefixed by /cygdrive for fixpath to work.
46166      new_path="$CYGWIN_ROOT_PATH$input_path"
46167    fi
46168  fi
46169
46170
46171  if test "x$path" != "x$new_path"; then
46172    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46173    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46174$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46175  fi
46176
46177    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46178
46179  path="$POTENTIAL_FREETYPE_LIB_PATH"
46180  has_colon=`$ECHO $path | $GREP ^.:`
46181  new_path="$path"
46182  if test "x$has_colon" = x; then
46183    # Not in mixed or Windows style, start by that.
46184    new_path=`cmd //c echo $path`
46185  fi
46186
46187
46188  input_path="$new_path"
46189  # Check if we need to convert this using DOS-style short mode. If the path
46190  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46191  # take no chances and rewrite it.
46192  # Note: m4 eats our [], so we need to use [ and ] instead.
46193  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46194  if test "x$has_forbidden_chars" != x; then
46195    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46196    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46197  fi
46198
46199
46200  windows_path="$new_path"
46201  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46202    unix_path=`$CYGPATH -u "$windows_path"`
46203    new_path="$unix_path"
46204  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46205    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46206    new_path="$unix_path"
46207  fi
46208
46209  if test "x$path" != "x$new_path"; then
46210    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46211    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46212$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46213  fi
46214
46215  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46216  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46217
46218    else
46219      # We're on a unix platform. Hooray! :)
46220      path="$POTENTIAL_FREETYPE_LIB_PATH"
46221      has_space=`$ECHO "$path" | $GREP " "`
46222      if test "x$has_space" != x; then
46223        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46224$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46225        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46226      fi
46227
46228      # Use eval to expand a potential ~
46229      eval path="$path"
46230      if test ! -f "$path" && test ! -d "$path"; then
46231        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46232      fi
46233
46234      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46235    fi
46236  fi
46237
46238
46239    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46240    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46241$as_echo_n "checking for freetype includes... " >&6; }
46242    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46243$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46244    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46245    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46246$as_echo_n "checking for freetype libraries... " >&6; }
46247    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46248$as_echo "$FREETYPE_LIB_PATH" >&6; }
46249  fi
46250
46251          fi
46252        else
46253          FREETYPE_BASE_DIR="$SYSROOT/usr"
46254
46255  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46256  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46257  METHOD="well-known location"
46258
46259  # Let's start with an optimistic view of the world :-)
46260  FOUND_FREETYPE=yes
46261
46262  # First look for the canonical freetype main include file ft2build.h.
46263  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46264    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46265    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46266    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46267      # Fail.
46268      FOUND_FREETYPE=no
46269    fi
46270  fi
46271
46272  if test "x$FOUND_FREETYPE" = xyes; then
46273    # Include file found, let's continue the sanity check.
46274    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46275$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46276
46277    # Reset to default value
46278    FREETYPE_BASE_NAME=freetype
46279    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46280    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46281      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46282          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46283        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46284        # for the .6 version explicitly.
46285        FREETYPE_BASE_NAME=freetype.6
46286        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46287        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46288$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46289      else
46290        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46291$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46292        FOUND_FREETYPE=no
46293      fi
46294    else
46295      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46296        # On Windows, we will need both .lib and .dll file.
46297        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46298          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46299$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46300          FOUND_FREETYPE=no
46301        fi
46302      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46303          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46304        # Found lib in isa dir, use that instead.
46305        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46306        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46307$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46308      fi
46309    fi
46310  fi
46311
46312  if test "x$FOUND_FREETYPE" = xyes; then
46313
46314  # Only process if variable expands to non-empty
46315
46316  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
46317    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46318
46319  # Input might be given as Windows format, start by converting to
46320  # unix format.
46321  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46322  new_path=`$CYGPATH -u "$path"`
46323
46324  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46325  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46326  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46327  # "foo.exe" is OK but "foo" is an error.
46328  #
46329  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46330  # It is also a way to make sure we got the proper file name for the real test later on.
46331  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46332  if test "x$test_shortpath" = x; then
46333    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46334$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46335    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46336  fi
46337
46338  # Call helper function which possibly converts this using DOS-style short mode.
46339  # If so, the updated path is stored in $new_path.
46340
46341  input_path="$new_path"
46342  # Check if we need to convert this using DOS-style short mode. If the path
46343  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46344  # take no chances and rewrite it.
46345  # Note: m4 eats our [], so we need to use [ and ] instead.
46346  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46347  if test "x$has_forbidden_chars" != x; then
46348    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46349    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46350    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46351    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46352      # Going to short mode and back again did indeed matter. Since short mode is
46353      # case insensitive, let's make it lowercase to improve readability.
46354      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46355      # Now convert it back to Unix-style (cygpath)
46356      input_path=`$CYGPATH -u "$shortmode_path"`
46357      new_path="$input_path"
46358    fi
46359  fi
46360
46361  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46362  if test "x$test_cygdrive_prefix" = x; then
46363    # As a simple fix, exclude /usr/bin since it's not a real path.
46364    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46365      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46366      # a path prefixed by /cygdrive for fixpath to work.
46367      new_path="$CYGWIN_ROOT_PATH$input_path"
46368    fi
46369  fi
46370
46371
46372  if test "x$path" != "x$new_path"; then
46373    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46374    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46375$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46376  fi
46377
46378    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46379
46380  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46381  has_colon=`$ECHO $path | $GREP ^.:`
46382  new_path="$path"
46383  if test "x$has_colon" = x; then
46384    # Not in mixed or Windows style, start by that.
46385    new_path=`cmd //c echo $path`
46386  fi
46387
46388
46389  input_path="$new_path"
46390  # Check if we need to convert this using DOS-style short mode. If the path
46391  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46392  # take no chances and rewrite it.
46393  # Note: m4 eats our [], so we need to use [ and ] instead.
46394  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46395  if test "x$has_forbidden_chars" != x; then
46396    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46397    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46398  fi
46399
46400
46401  windows_path="$new_path"
46402  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46403    unix_path=`$CYGPATH -u "$windows_path"`
46404    new_path="$unix_path"
46405  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46406    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46407    new_path="$unix_path"
46408  fi
46409
46410  if test "x$path" != "x$new_path"; then
46411    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46412    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46413$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46414  fi
46415
46416  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46417  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46418
46419    else
46420      # We're on a unix platform. Hooray! :)
46421      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46422      has_space=`$ECHO "$path" | $GREP " "`
46423      if test "x$has_space" != x; then
46424        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46425$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46426        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46427      fi
46428
46429      # Use eval to expand a potential ~
46430      eval path="$path"
46431      if test ! -f "$path" && test ! -d "$path"; then
46432        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46433      fi
46434
46435      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46436    fi
46437  fi
46438
46439
46440  # Only process if variable expands to non-empty
46441
46442  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
46443    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46444
46445  # Input might be given as Windows format, start by converting to
46446  # unix format.
46447  path="$POTENTIAL_FREETYPE_LIB_PATH"
46448  new_path=`$CYGPATH -u "$path"`
46449
46450  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46451  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46452  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46453  # "foo.exe" is OK but "foo" is an error.
46454  #
46455  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46456  # It is also a way to make sure we got the proper file name for the real test later on.
46457  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46458  if test "x$test_shortpath" = x; then
46459    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46460$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46461    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46462  fi
46463
46464  # Call helper function which possibly converts this using DOS-style short mode.
46465  # If so, the updated path is stored in $new_path.
46466
46467  input_path="$new_path"
46468  # Check if we need to convert this using DOS-style short mode. If the path
46469  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46470  # take no chances and rewrite it.
46471  # Note: m4 eats our [], so we need to use [ and ] instead.
46472  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46473  if test "x$has_forbidden_chars" != x; then
46474    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46475    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46476    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46477    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46478      # Going to short mode and back again did indeed matter. Since short mode is
46479      # case insensitive, let's make it lowercase to improve readability.
46480      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46481      # Now convert it back to Unix-style (cygpath)
46482      input_path=`$CYGPATH -u "$shortmode_path"`
46483      new_path="$input_path"
46484    fi
46485  fi
46486
46487  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46488  if test "x$test_cygdrive_prefix" = x; then
46489    # As a simple fix, exclude /usr/bin since it's not a real path.
46490    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46491      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46492      # a path prefixed by /cygdrive for fixpath to work.
46493      new_path="$CYGWIN_ROOT_PATH$input_path"
46494    fi
46495  fi
46496
46497
46498  if test "x$path" != "x$new_path"; then
46499    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46500    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46501$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46502  fi
46503
46504    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46505
46506  path="$POTENTIAL_FREETYPE_LIB_PATH"
46507  has_colon=`$ECHO $path | $GREP ^.:`
46508  new_path="$path"
46509  if test "x$has_colon" = x; then
46510    # Not in mixed or Windows style, start by that.
46511    new_path=`cmd //c echo $path`
46512  fi
46513
46514
46515  input_path="$new_path"
46516  # Check if we need to convert this using DOS-style short mode. If the path
46517  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46518  # take no chances and rewrite it.
46519  # Note: m4 eats our [], so we need to use [ and ] instead.
46520  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46521  if test "x$has_forbidden_chars" != x; then
46522    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46523    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46524  fi
46525
46526
46527  windows_path="$new_path"
46528  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46529    unix_path=`$CYGPATH -u "$windows_path"`
46530    new_path="$unix_path"
46531  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46532    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46533    new_path="$unix_path"
46534  fi
46535
46536  if test "x$path" != "x$new_path"; then
46537    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46538    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46539$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46540  fi
46541
46542  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46543  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46544
46545    else
46546      # We're on a unix platform. Hooray! :)
46547      path="$POTENTIAL_FREETYPE_LIB_PATH"
46548      has_space=`$ECHO "$path" | $GREP " "`
46549      if test "x$has_space" != x; then
46550        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46551$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46552        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46553      fi
46554
46555      # Use eval to expand a potential ~
46556      eval path="$path"
46557      if test ! -f "$path" && test ! -d "$path"; then
46558        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46559      fi
46560
46561      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46562    fi
46563  fi
46564
46565
46566    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46567    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46568$as_echo_n "checking for freetype includes... " >&6; }
46569    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46570$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46571    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46572    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46573$as_echo_n "checking for freetype libraries... " >&6; }
46574    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46575$as_echo "$FREETYPE_LIB_PATH" >&6; }
46576  fi
46577
46578
46579          if test "x$FOUND_FREETYPE" != xyes; then
46580            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
46581
46582  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46583  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46584  METHOD="well-known location"
46585
46586  # Let's start with an optimistic view of the world :-)
46587  FOUND_FREETYPE=yes
46588
46589  # First look for the canonical freetype main include file ft2build.h.
46590  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46591    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46592    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46593    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46594      # Fail.
46595      FOUND_FREETYPE=no
46596    fi
46597  fi
46598
46599  if test "x$FOUND_FREETYPE" = xyes; then
46600    # Include file found, let's continue the sanity check.
46601    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46602$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46603
46604    # Reset to default value
46605    FREETYPE_BASE_NAME=freetype
46606    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46607    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46608      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46609          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46610        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46611        # for the .6 version explicitly.
46612        FREETYPE_BASE_NAME=freetype.6
46613        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46614        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46615$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46616      else
46617        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46618$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46619        FOUND_FREETYPE=no
46620      fi
46621    else
46622      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46623        # On Windows, we will need both .lib and .dll file.
46624        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46625          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46626$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46627          FOUND_FREETYPE=no
46628        fi
46629      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46630          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46631        # Found lib in isa dir, use that instead.
46632        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46633        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46634$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46635      fi
46636    fi
46637  fi
46638
46639  if test "x$FOUND_FREETYPE" = xyes; then
46640
46641  # Only process if variable expands to non-empty
46642
46643  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
46644    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46645
46646  # Input might be given as Windows format, start by converting to
46647  # unix format.
46648  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46649  new_path=`$CYGPATH -u "$path"`
46650
46651  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46652  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46653  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46654  # "foo.exe" is OK but "foo" is an error.
46655  #
46656  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46657  # It is also a way to make sure we got the proper file name for the real test later on.
46658  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46659  if test "x$test_shortpath" = x; then
46660    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46661$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46662    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46663  fi
46664
46665  # Call helper function which possibly converts this using DOS-style short mode.
46666  # If so, the updated path is stored in $new_path.
46667
46668  input_path="$new_path"
46669  # Check if we need to convert this using DOS-style short mode. If the path
46670  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46671  # take no chances and rewrite it.
46672  # Note: m4 eats our [], so we need to use [ and ] instead.
46673  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46674  if test "x$has_forbidden_chars" != x; then
46675    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46676    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46677    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46678    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46679      # Going to short mode and back again did indeed matter. Since short mode is
46680      # case insensitive, let's make it lowercase to improve readability.
46681      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46682      # Now convert it back to Unix-style (cygpath)
46683      input_path=`$CYGPATH -u "$shortmode_path"`
46684      new_path="$input_path"
46685    fi
46686  fi
46687
46688  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46689  if test "x$test_cygdrive_prefix" = x; then
46690    # As a simple fix, exclude /usr/bin since it's not a real path.
46691    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46692      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46693      # a path prefixed by /cygdrive for fixpath to work.
46694      new_path="$CYGWIN_ROOT_PATH$input_path"
46695    fi
46696  fi
46697
46698
46699  if test "x$path" != "x$new_path"; then
46700    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46701    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46702$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46703  fi
46704
46705    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46706
46707  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46708  has_colon=`$ECHO $path | $GREP ^.:`
46709  new_path="$path"
46710  if test "x$has_colon" = x; then
46711    # Not in mixed or Windows style, start by that.
46712    new_path=`cmd //c echo $path`
46713  fi
46714
46715
46716  input_path="$new_path"
46717  # Check if we need to convert this using DOS-style short mode. If the path
46718  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46719  # take no chances and rewrite it.
46720  # Note: m4 eats our [], so we need to use [ and ] instead.
46721  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46722  if test "x$has_forbidden_chars" != x; then
46723    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46724    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46725  fi
46726
46727
46728  windows_path="$new_path"
46729  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46730    unix_path=`$CYGPATH -u "$windows_path"`
46731    new_path="$unix_path"
46732  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46733    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46734    new_path="$unix_path"
46735  fi
46736
46737  if test "x$path" != "x$new_path"; then
46738    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46739    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46740$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46741  fi
46742
46743  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46744  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46745
46746    else
46747      # We're on a unix platform. Hooray! :)
46748      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46749      has_space=`$ECHO "$path" | $GREP " "`
46750      if test "x$has_space" != x; then
46751        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46752$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46753        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46754      fi
46755
46756      # Use eval to expand a potential ~
46757      eval path="$path"
46758      if test ! -f "$path" && test ! -d "$path"; then
46759        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46760      fi
46761
46762      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46763    fi
46764  fi
46765
46766
46767  # Only process if variable expands to non-empty
46768
46769  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
46770    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46771
46772  # Input might be given as Windows format, start by converting to
46773  # unix format.
46774  path="$POTENTIAL_FREETYPE_LIB_PATH"
46775  new_path=`$CYGPATH -u "$path"`
46776
46777  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46778  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46779  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46780  # "foo.exe" is OK but "foo" is an error.
46781  #
46782  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46783  # It is also a way to make sure we got the proper file name for the real test later on.
46784  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46785  if test "x$test_shortpath" = x; then
46786    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46787$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46788    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46789  fi
46790
46791  # Call helper function which possibly converts this using DOS-style short mode.
46792  # If so, the updated path is stored in $new_path.
46793
46794  input_path="$new_path"
46795  # Check if we need to convert this using DOS-style short mode. If the path
46796  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46797  # take no chances and rewrite it.
46798  # Note: m4 eats our [], so we need to use [ and ] instead.
46799  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46800  if test "x$has_forbidden_chars" != x; then
46801    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46802    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46803    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46804    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46805      # Going to short mode and back again did indeed matter. Since short mode is
46806      # case insensitive, let's make it lowercase to improve readability.
46807      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46808      # Now convert it back to Unix-style (cygpath)
46809      input_path=`$CYGPATH -u "$shortmode_path"`
46810      new_path="$input_path"
46811    fi
46812  fi
46813
46814  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46815  if test "x$test_cygdrive_prefix" = x; then
46816    # As a simple fix, exclude /usr/bin since it's not a real path.
46817    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46818      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46819      # a path prefixed by /cygdrive for fixpath to work.
46820      new_path="$CYGWIN_ROOT_PATH$input_path"
46821    fi
46822  fi
46823
46824
46825  if test "x$path" != "x$new_path"; then
46826    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46827    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46828$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46829  fi
46830
46831    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46832
46833  path="$POTENTIAL_FREETYPE_LIB_PATH"
46834  has_colon=`$ECHO $path | $GREP ^.:`
46835  new_path="$path"
46836  if test "x$has_colon" = x; then
46837    # Not in mixed or Windows style, start by that.
46838    new_path=`cmd //c echo $path`
46839  fi
46840
46841
46842  input_path="$new_path"
46843  # Check if we need to convert this using DOS-style short mode. If the path
46844  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46845  # take no chances and rewrite it.
46846  # Note: m4 eats our [], so we need to use [ and ] instead.
46847  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46848  if test "x$has_forbidden_chars" != x; then
46849    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46850    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46851  fi
46852
46853
46854  windows_path="$new_path"
46855  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46856    unix_path=`$CYGPATH -u "$windows_path"`
46857    new_path="$unix_path"
46858  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46859    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46860    new_path="$unix_path"
46861  fi
46862
46863  if test "x$path" != "x$new_path"; then
46864    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46865    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46866$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46867  fi
46868
46869  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46870  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46871
46872    else
46873      # We're on a unix platform. Hooray! :)
46874      path="$POTENTIAL_FREETYPE_LIB_PATH"
46875      has_space=`$ECHO "$path" | $GREP " "`
46876      if test "x$has_space" != x; then
46877        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46878$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46879        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46880      fi
46881
46882      # Use eval to expand a potential ~
46883      eval path="$path"
46884      if test ! -f "$path" && test ! -d "$path"; then
46885        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46886      fi
46887
46888      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46889    fi
46890  fi
46891
46892
46893    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46894    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46895$as_echo_n "checking for freetype includes... " >&6; }
46896    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46897$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46898    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46899    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46900$as_echo_n "checking for freetype libraries... " >&6; }
46901    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46902$as_echo "$FREETYPE_LIB_PATH" >&6; }
46903  fi
46904
46905          fi
46906
46907          if test "x$FOUND_FREETYPE" != xyes; then
46908            FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
46909
46910  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46911  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46912  METHOD="well-known location"
46913
46914  # Let's start with an optimistic view of the world :-)
46915  FOUND_FREETYPE=yes
46916
46917  # First look for the canonical freetype main include file ft2build.h.
46918  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46919    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46920    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46921    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46922      # Fail.
46923      FOUND_FREETYPE=no
46924    fi
46925  fi
46926
46927  if test "x$FOUND_FREETYPE" = xyes; then
46928    # Include file found, let's continue the sanity check.
46929    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46930$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46931
46932    # Reset to default value
46933    FREETYPE_BASE_NAME=freetype
46934    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46935    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46936      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46937          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46938        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46939        # for the .6 version explicitly.
46940        FREETYPE_BASE_NAME=freetype.6
46941        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46942        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46943$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46944      else
46945        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46946$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46947        FOUND_FREETYPE=no
46948      fi
46949    else
46950      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46951        # On Windows, we will need both .lib and .dll file.
46952        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46953          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46954$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46955          FOUND_FREETYPE=no
46956        fi
46957      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46958          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46959        # Found lib in isa dir, use that instead.
46960        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46961        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46962$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46963      fi
46964    fi
46965  fi
46966
46967  if test "x$FOUND_FREETYPE" = xyes; then
46968
46969  # Only process if variable expands to non-empty
46970
46971  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
46972    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46973
46974  # Input might be given as Windows format, start by converting to
46975  # unix format.
46976  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46977  new_path=`$CYGPATH -u "$path"`
46978
46979  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46980  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46981  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46982  # "foo.exe" is OK but "foo" is an error.
46983  #
46984  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46985  # It is also a way to make sure we got the proper file name for the real test later on.
46986  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46987  if test "x$test_shortpath" = x; then
46988    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46989$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46990    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46991  fi
46992
46993  # Call helper function which possibly converts this using DOS-style short mode.
46994  # If so, the updated path is stored in $new_path.
46995
46996  input_path="$new_path"
46997  # Check if we need to convert this using DOS-style short mode. If the path
46998  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46999  # take no chances and rewrite it.
47000  # Note: m4 eats our [], so we need to use [ and ] instead.
47001  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47002  if test "x$has_forbidden_chars" != x; then
47003    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47004    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47005    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47006    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47007      # Going to short mode and back again did indeed matter. Since short mode is
47008      # case insensitive, let's make it lowercase to improve readability.
47009      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47010      # Now convert it back to Unix-style (cygpath)
47011      input_path=`$CYGPATH -u "$shortmode_path"`
47012      new_path="$input_path"
47013    fi
47014  fi
47015
47016  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47017  if test "x$test_cygdrive_prefix" = x; then
47018    # As a simple fix, exclude /usr/bin since it's not a real path.
47019    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47020      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47021      # a path prefixed by /cygdrive for fixpath to work.
47022      new_path="$CYGWIN_ROOT_PATH$input_path"
47023    fi
47024  fi
47025
47026
47027  if test "x$path" != "x$new_path"; then
47028    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47029    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47030$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47031  fi
47032
47033    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47034
47035  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47036  has_colon=`$ECHO $path | $GREP ^.:`
47037  new_path="$path"
47038  if test "x$has_colon" = x; then
47039    # Not in mixed or Windows style, start by that.
47040    new_path=`cmd //c echo $path`
47041  fi
47042
47043
47044  input_path="$new_path"
47045  # Check if we need to convert this using DOS-style short mode. If the path
47046  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47047  # take no chances and rewrite it.
47048  # Note: m4 eats our [], so we need to use [ and ] instead.
47049  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47050  if test "x$has_forbidden_chars" != x; then
47051    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47052    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47053  fi
47054
47055
47056  windows_path="$new_path"
47057  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47058    unix_path=`$CYGPATH -u "$windows_path"`
47059    new_path="$unix_path"
47060  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47061    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47062    new_path="$unix_path"
47063  fi
47064
47065  if test "x$path" != "x$new_path"; then
47066    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47067    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47068$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47069  fi
47070
47071  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47072  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47073
47074    else
47075      # We're on a unix platform. Hooray! :)
47076      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47077      has_space=`$ECHO "$path" | $GREP " "`
47078      if test "x$has_space" != x; then
47079        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47080$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47081        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47082      fi
47083
47084      # Use eval to expand a potential ~
47085      eval path="$path"
47086      if test ! -f "$path" && test ! -d "$path"; then
47087        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47088      fi
47089
47090      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47091    fi
47092  fi
47093
47094
47095  # Only process if variable expands to non-empty
47096
47097  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
47098    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47099
47100  # Input might be given as Windows format, start by converting to
47101  # unix format.
47102  path="$POTENTIAL_FREETYPE_LIB_PATH"
47103  new_path=`$CYGPATH -u "$path"`
47104
47105  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47106  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47107  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47108  # "foo.exe" is OK but "foo" is an error.
47109  #
47110  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47111  # It is also a way to make sure we got the proper file name for the real test later on.
47112  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47113  if test "x$test_shortpath" = x; then
47114    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47115$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47116    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47117  fi
47118
47119  # Call helper function which possibly converts this using DOS-style short mode.
47120  # If so, the updated path is stored in $new_path.
47121
47122  input_path="$new_path"
47123  # Check if we need to convert this using DOS-style short mode. If the path
47124  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47125  # take no chances and rewrite it.
47126  # Note: m4 eats our [], so we need to use [ and ] instead.
47127  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47128  if test "x$has_forbidden_chars" != x; then
47129    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47130    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47131    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47132    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47133      # Going to short mode and back again did indeed matter. Since short mode is
47134      # case insensitive, let's make it lowercase to improve readability.
47135      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47136      # Now convert it back to Unix-style (cygpath)
47137      input_path=`$CYGPATH -u "$shortmode_path"`
47138      new_path="$input_path"
47139    fi
47140  fi
47141
47142  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47143  if test "x$test_cygdrive_prefix" = x; then
47144    # As a simple fix, exclude /usr/bin since it's not a real path.
47145    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47146      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47147      # a path prefixed by /cygdrive for fixpath to work.
47148      new_path="$CYGWIN_ROOT_PATH$input_path"
47149    fi
47150  fi
47151
47152
47153  if test "x$path" != "x$new_path"; then
47154    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47155    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47156$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47157  fi
47158
47159    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47160
47161  path="$POTENTIAL_FREETYPE_LIB_PATH"
47162  has_colon=`$ECHO $path | $GREP ^.:`
47163  new_path="$path"
47164  if test "x$has_colon" = x; then
47165    # Not in mixed or Windows style, start by that.
47166    new_path=`cmd //c echo $path`
47167  fi
47168
47169
47170  input_path="$new_path"
47171  # Check if we need to convert this using DOS-style short mode. If the path
47172  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47173  # take no chances and rewrite it.
47174  # Note: m4 eats our [], so we need to use [ and ] instead.
47175  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47176  if test "x$has_forbidden_chars" != x; then
47177    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47178    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47179  fi
47180
47181
47182  windows_path="$new_path"
47183  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47184    unix_path=`$CYGPATH -u "$windows_path"`
47185    new_path="$unix_path"
47186  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47187    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47188    new_path="$unix_path"
47189  fi
47190
47191  if test "x$path" != "x$new_path"; then
47192    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47193    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47194$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47195  fi
47196
47197  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47198  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47199
47200    else
47201      # We're on a unix platform. Hooray! :)
47202      path="$POTENTIAL_FREETYPE_LIB_PATH"
47203      has_space=`$ECHO "$path" | $GREP " "`
47204      if test "x$has_space" != x; then
47205        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47206$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47207        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47208      fi
47209
47210      # Use eval to expand a potential ~
47211      eval path="$path"
47212      if test ! -f "$path" && test ! -d "$path"; then
47213        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47214      fi
47215
47216      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47217    fi
47218  fi
47219
47220
47221    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47222    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47223$as_echo_n "checking for freetype includes... " >&6; }
47224    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47225$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47226    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47227    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47228$as_echo_n "checking for freetype libraries... " >&6; }
47229    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47230$as_echo "$FREETYPE_LIB_PATH" >&6; }
47231  fi
47232
47233          fi
47234
47235          if test "x$FOUND_FREETYPE" != xyes; then
47236            FREETYPE_BASE_DIR="$SYSROOT/usr"
47237            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
47238
47239  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47240  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
47241  METHOD="well-known location"
47242
47243  # Let's start with an optimistic view of the world :-)
47244  FOUND_FREETYPE=yes
47245
47246  # First look for the canonical freetype main include file ft2build.h.
47247  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47248    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47249    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47250    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47251      # Fail.
47252      FOUND_FREETYPE=no
47253    fi
47254  fi
47255
47256  if test "x$FOUND_FREETYPE" = xyes; then
47257    # Include file found, let's continue the sanity check.
47258    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47259$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47260
47261    # Reset to default value
47262    FREETYPE_BASE_NAME=freetype
47263    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47264    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47265      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47266          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47267        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47268        # for the .6 version explicitly.
47269        FREETYPE_BASE_NAME=freetype.6
47270        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47271        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47272$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47273      else
47274        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47275$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47276        FOUND_FREETYPE=no
47277      fi
47278    else
47279      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47280        # On Windows, we will need both .lib and .dll file.
47281        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47282          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47283$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47284          FOUND_FREETYPE=no
47285        fi
47286      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47287          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47288        # Found lib in isa dir, use that instead.
47289        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47290        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47291$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47292      fi
47293    fi
47294  fi
47295
47296  if test "x$FOUND_FREETYPE" = xyes; then
47297
47298  # Only process if variable expands to non-empty
47299
47300  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
47301    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47302
47303  # Input might be given as Windows format, start by converting to
47304  # unix format.
47305  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47306  new_path=`$CYGPATH -u "$path"`
47307
47308  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47309  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47310  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47311  # "foo.exe" is OK but "foo" is an error.
47312  #
47313  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47314  # It is also a way to make sure we got the proper file name for the real test later on.
47315  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47316  if test "x$test_shortpath" = x; then
47317    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47318$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47319    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47320  fi
47321
47322  # Call helper function which possibly converts this using DOS-style short mode.
47323  # If so, the updated path is stored in $new_path.
47324
47325  input_path="$new_path"
47326  # Check if we need to convert this using DOS-style short mode. If the path
47327  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47328  # take no chances and rewrite it.
47329  # Note: m4 eats our [], so we need to use [ and ] instead.
47330  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47331  if test "x$has_forbidden_chars" != x; then
47332    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47333    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47334    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47335    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47336      # Going to short mode and back again did indeed matter. Since short mode is
47337      # case insensitive, let's make it lowercase to improve readability.
47338      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47339      # Now convert it back to Unix-style (cygpath)
47340      input_path=`$CYGPATH -u "$shortmode_path"`
47341      new_path="$input_path"
47342    fi
47343  fi
47344
47345  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47346  if test "x$test_cygdrive_prefix" = x; then
47347    # As a simple fix, exclude /usr/bin since it's not a real path.
47348    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47349      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47350      # a path prefixed by /cygdrive for fixpath to work.
47351      new_path="$CYGWIN_ROOT_PATH$input_path"
47352    fi
47353  fi
47354
47355
47356  if test "x$path" != "x$new_path"; then
47357    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47358    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47359$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47360  fi
47361
47362    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47363
47364  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47365  has_colon=`$ECHO $path | $GREP ^.:`
47366  new_path="$path"
47367  if test "x$has_colon" = x; then
47368    # Not in mixed or Windows style, start by that.
47369    new_path=`cmd //c echo $path`
47370  fi
47371
47372
47373  input_path="$new_path"
47374  # Check if we need to convert this using DOS-style short mode. If the path
47375  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47376  # take no chances and rewrite it.
47377  # Note: m4 eats our [], so we need to use [ and ] instead.
47378  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47379  if test "x$has_forbidden_chars" != x; then
47380    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47381    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47382  fi
47383
47384
47385  windows_path="$new_path"
47386  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47387    unix_path=`$CYGPATH -u "$windows_path"`
47388    new_path="$unix_path"
47389  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47390    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47391    new_path="$unix_path"
47392  fi
47393
47394  if test "x$path" != "x$new_path"; then
47395    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47396    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47397$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47398  fi
47399
47400  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47401  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47402
47403    else
47404      # We're on a unix platform. Hooray! :)
47405      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47406      has_space=`$ECHO "$path" | $GREP " "`
47407      if test "x$has_space" != x; then
47408        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47409$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47410        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47411      fi
47412
47413      # Use eval to expand a potential ~
47414      eval path="$path"
47415      if test ! -f "$path" && test ! -d "$path"; then
47416        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47417      fi
47418
47419      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47420    fi
47421  fi
47422
47423
47424  # Only process if variable expands to non-empty
47425
47426  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
47427    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47428
47429  # Input might be given as Windows format, start by converting to
47430  # unix format.
47431  path="$POTENTIAL_FREETYPE_LIB_PATH"
47432  new_path=`$CYGPATH -u "$path"`
47433
47434  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47435  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47436  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47437  # "foo.exe" is OK but "foo" is an error.
47438  #
47439  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47440  # It is also a way to make sure we got the proper file name for the real test later on.
47441  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47442  if test "x$test_shortpath" = x; then
47443    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47444$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47445    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47446  fi
47447
47448  # Call helper function which possibly converts this using DOS-style short mode.
47449  # If so, the updated path is stored in $new_path.
47450
47451  input_path="$new_path"
47452  # Check if we need to convert this using DOS-style short mode. If the path
47453  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47454  # take no chances and rewrite it.
47455  # Note: m4 eats our [], so we need to use [ and ] instead.
47456  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47457  if test "x$has_forbidden_chars" != x; then
47458    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47459    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47460    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47461    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47462      # Going to short mode and back again did indeed matter. Since short mode is
47463      # case insensitive, let's make it lowercase to improve readability.
47464      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47465      # Now convert it back to Unix-style (cygpath)
47466      input_path=`$CYGPATH -u "$shortmode_path"`
47467      new_path="$input_path"
47468    fi
47469  fi
47470
47471  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47472  if test "x$test_cygdrive_prefix" = x; then
47473    # As a simple fix, exclude /usr/bin since it's not a real path.
47474    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47475      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47476      # a path prefixed by /cygdrive for fixpath to work.
47477      new_path="$CYGWIN_ROOT_PATH$input_path"
47478    fi
47479  fi
47480
47481
47482  if test "x$path" != "x$new_path"; then
47483    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47484    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47485$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47486  fi
47487
47488    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47489
47490  path="$POTENTIAL_FREETYPE_LIB_PATH"
47491  has_colon=`$ECHO $path | $GREP ^.:`
47492  new_path="$path"
47493  if test "x$has_colon" = x; then
47494    # Not in mixed or Windows style, start by that.
47495    new_path=`cmd //c echo $path`
47496  fi
47497
47498
47499  input_path="$new_path"
47500  # Check if we need to convert this using DOS-style short mode. If the path
47501  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47502  # take no chances and rewrite it.
47503  # Note: m4 eats our [], so we need to use [ and ] instead.
47504  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47505  if test "x$has_forbidden_chars" != x; then
47506    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47507    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47508  fi
47509
47510
47511  windows_path="$new_path"
47512  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47513    unix_path=`$CYGPATH -u "$windows_path"`
47514    new_path="$unix_path"
47515  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47516    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47517    new_path="$unix_path"
47518  fi
47519
47520  if test "x$path" != "x$new_path"; then
47521    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47522    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47523$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47524  fi
47525
47526  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47527  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47528
47529    else
47530      # We're on a unix platform. Hooray! :)
47531      path="$POTENTIAL_FREETYPE_LIB_PATH"
47532      has_space=`$ECHO "$path" | $GREP " "`
47533      if test "x$has_space" != x; then
47534        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47535$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47536        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47537      fi
47538
47539      # Use eval to expand a potential ~
47540      eval path="$path"
47541      if test ! -f "$path" && test ! -d "$path"; then
47542        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47543      fi
47544
47545      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47546    fi
47547  fi
47548
47549
47550    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47551    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47552$as_echo_n "checking for freetype includes... " >&6; }
47553    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47554$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47555    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47556    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47557$as_echo_n "checking for freetype libraries... " >&6; }
47558    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47559$as_echo "$FREETYPE_LIB_PATH" >&6; }
47560  fi
47561
47562            else
47563
47564  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47565  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
47566  METHOD="well-known location"
47567
47568  # Let's start with an optimistic view of the world :-)
47569  FOUND_FREETYPE=yes
47570
47571  # First look for the canonical freetype main include file ft2build.h.
47572  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47573    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47574    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47575    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47576      # Fail.
47577      FOUND_FREETYPE=no
47578    fi
47579  fi
47580
47581  if test "x$FOUND_FREETYPE" = xyes; then
47582    # Include file found, let's continue the sanity check.
47583    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47584$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47585
47586    # Reset to default value
47587    FREETYPE_BASE_NAME=freetype
47588    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47589    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47590      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47591          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47592        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47593        # for the .6 version explicitly.
47594        FREETYPE_BASE_NAME=freetype.6
47595        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47596        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47597$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47598      else
47599        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47600$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47601        FOUND_FREETYPE=no
47602      fi
47603    else
47604      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47605        # On Windows, we will need both .lib and .dll file.
47606        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47607          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47608$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47609          FOUND_FREETYPE=no
47610        fi
47611      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47612          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47613        # Found lib in isa dir, use that instead.
47614        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47615        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47616$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47617      fi
47618    fi
47619  fi
47620
47621  if test "x$FOUND_FREETYPE" = xyes; then
47622
47623  # Only process if variable expands to non-empty
47624
47625  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
47626    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47627
47628  # Input might be given as Windows format, start by converting to
47629  # unix format.
47630  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47631  new_path=`$CYGPATH -u "$path"`
47632
47633  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47634  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47635  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47636  # "foo.exe" is OK but "foo" is an error.
47637  #
47638  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47639  # It is also a way to make sure we got the proper file name for the real test later on.
47640  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47641  if test "x$test_shortpath" = x; then
47642    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47643$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47644    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47645  fi
47646
47647  # Call helper function which possibly converts this using DOS-style short mode.
47648  # If so, the updated path is stored in $new_path.
47649
47650  input_path="$new_path"
47651  # Check if we need to convert this using DOS-style short mode. If the path
47652  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47653  # take no chances and rewrite it.
47654  # Note: m4 eats our [], so we need to use [ and ] instead.
47655  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47656  if test "x$has_forbidden_chars" != x; then
47657    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47658    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47659    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47660    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47661      # Going to short mode and back again did indeed matter. Since short mode is
47662      # case insensitive, let's make it lowercase to improve readability.
47663      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47664      # Now convert it back to Unix-style (cygpath)
47665      input_path=`$CYGPATH -u "$shortmode_path"`
47666      new_path="$input_path"
47667    fi
47668  fi
47669
47670  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47671  if test "x$test_cygdrive_prefix" = x; then
47672    # As a simple fix, exclude /usr/bin since it's not a real path.
47673    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47674      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47675      # a path prefixed by /cygdrive for fixpath to work.
47676      new_path="$CYGWIN_ROOT_PATH$input_path"
47677    fi
47678  fi
47679
47680
47681  if test "x$path" != "x$new_path"; then
47682    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47683    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47684$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47685  fi
47686
47687    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47688
47689  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47690  has_colon=`$ECHO $path | $GREP ^.:`
47691  new_path="$path"
47692  if test "x$has_colon" = x; then
47693    # Not in mixed or Windows style, start by that.
47694    new_path=`cmd //c echo $path`
47695  fi
47696
47697
47698  input_path="$new_path"
47699  # Check if we need to convert this using DOS-style short mode. If the path
47700  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47701  # take no chances and rewrite it.
47702  # Note: m4 eats our [], so we need to use [ and ] instead.
47703  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47704  if test "x$has_forbidden_chars" != x; then
47705    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47706    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47707  fi
47708
47709
47710  windows_path="$new_path"
47711  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47712    unix_path=`$CYGPATH -u "$windows_path"`
47713    new_path="$unix_path"
47714  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47715    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47716    new_path="$unix_path"
47717  fi
47718
47719  if test "x$path" != "x$new_path"; then
47720    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47721    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47722$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47723  fi
47724
47725  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47726  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47727
47728    else
47729      # We're on a unix platform. Hooray! :)
47730      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47731      has_space=`$ECHO "$path" | $GREP " "`
47732      if test "x$has_space" != x; then
47733        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47734$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47735        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47736      fi
47737
47738      # Use eval to expand a potential ~
47739      eval path="$path"
47740      if test ! -f "$path" && test ! -d "$path"; then
47741        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47742      fi
47743
47744      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47745    fi
47746  fi
47747
47748
47749  # Only process if variable expands to non-empty
47750
47751  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
47752    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47753
47754  # Input might be given as Windows format, start by converting to
47755  # unix format.
47756  path="$POTENTIAL_FREETYPE_LIB_PATH"
47757  new_path=`$CYGPATH -u "$path"`
47758
47759  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47760  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47761  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47762  # "foo.exe" is OK but "foo" is an error.
47763  #
47764  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47765  # It is also a way to make sure we got the proper file name for the real test later on.
47766  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47767  if test "x$test_shortpath" = x; then
47768    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47769$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47770    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47771  fi
47772
47773  # Call helper function which possibly converts this using DOS-style short mode.
47774  # If so, the updated path is stored in $new_path.
47775
47776  input_path="$new_path"
47777  # Check if we need to convert this using DOS-style short mode. If the path
47778  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47779  # take no chances and rewrite it.
47780  # Note: m4 eats our [], so we need to use [ and ] instead.
47781  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47782  if test "x$has_forbidden_chars" != x; then
47783    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47784    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47785    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47786    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47787      # Going to short mode and back again did indeed matter. Since short mode is
47788      # case insensitive, let's make it lowercase to improve readability.
47789      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47790      # Now convert it back to Unix-style (cygpath)
47791      input_path=`$CYGPATH -u "$shortmode_path"`
47792      new_path="$input_path"
47793    fi
47794  fi
47795
47796  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47797  if test "x$test_cygdrive_prefix" = x; then
47798    # As a simple fix, exclude /usr/bin since it's not a real path.
47799    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47800      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47801      # a path prefixed by /cygdrive for fixpath to work.
47802      new_path="$CYGWIN_ROOT_PATH$input_path"
47803    fi
47804  fi
47805
47806
47807  if test "x$path" != "x$new_path"; then
47808    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47809    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47810$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47811  fi
47812
47813    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47814
47815  path="$POTENTIAL_FREETYPE_LIB_PATH"
47816  has_colon=`$ECHO $path | $GREP ^.:`
47817  new_path="$path"
47818  if test "x$has_colon" = x; then
47819    # Not in mixed or Windows style, start by that.
47820    new_path=`cmd //c echo $path`
47821  fi
47822
47823
47824  input_path="$new_path"
47825  # Check if we need to convert this using DOS-style short mode. If the path
47826  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47827  # take no chances and rewrite it.
47828  # Note: m4 eats our [], so we need to use [ and ] instead.
47829  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47830  if test "x$has_forbidden_chars" != x; then
47831    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47832    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47833  fi
47834
47835
47836  windows_path="$new_path"
47837  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47838    unix_path=`$CYGPATH -u "$windows_path"`
47839    new_path="$unix_path"
47840  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47841    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47842    new_path="$unix_path"
47843  fi
47844
47845  if test "x$path" != "x$new_path"; then
47846    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47847    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47848$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47849  fi
47850
47851  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47852  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47853
47854    else
47855      # We're on a unix platform. Hooray! :)
47856      path="$POTENTIAL_FREETYPE_LIB_PATH"
47857      has_space=`$ECHO "$path" | $GREP " "`
47858      if test "x$has_space" != x; then
47859        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47860$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47861        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47862      fi
47863
47864      # Use eval to expand a potential ~
47865      eval path="$path"
47866      if test ! -f "$path" && test ! -d "$path"; then
47867        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47868      fi
47869
47870      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47871    fi
47872  fi
47873
47874
47875    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47876    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47877$as_echo_n "checking for freetype includes... " >&6; }
47878    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47879$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47880    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47881    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47882$as_echo_n "checking for freetype libraries... " >&6; }
47883    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47884$as_echo "$FREETYPE_LIB_PATH" >&6; }
47885  fi
47886
47887              if test "x$FOUND_FREETYPE" != xyes; then
47888
47889  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47890  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
47891  METHOD="well-known location"
47892
47893  # Let's start with an optimistic view of the world :-)
47894  FOUND_FREETYPE=yes
47895
47896  # First look for the canonical freetype main include file ft2build.h.
47897  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47898    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47899    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47900    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47901      # Fail.
47902      FOUND_FREETYPE=no
47903    fi
47904  fi
47905
47906  if test "x$FOUND_FREETYPE" = xyes; then
47907    # Include file found, let's continue the sanity check.
47908    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47909$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47910
47911    # Reset to default value
47912    FREETYPE_BASE_NAME=freetype
47913    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47914    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47915      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47916          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47917        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47918        # for the .6 version explicitly.
47919        FREETYPE_BASE_NAME=freetype.6
47920        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47921        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47922$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47923      else
47924        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47925$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47926        FOUND_FREETYPE=no
47927      fi
47928    else
47929      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47930        # On Windows, we will need both .lib and .dll file.
47931        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47932          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47933$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47934          FOUND_FREETYPE=no
47935        fi
47936      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47937          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47938        # Found lib in isa dir, use that instead.
47939        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47940        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47941$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47942      fi
47943    fi
47944  fi
47945
47946  if test "x$FOUND_FREETYPE" = xyes; then
47947
47948  # Only process if variable expands to non-empty
47949
47950  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
47951    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47952
47953  # Input might be given as Windows format, start by converting to
47954  # unix format.
47955  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47956  new_path=`$CYGPATH -u "$path"`
47957
47958  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47959  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47960  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47961  # "foo.exe" is OK but "foo" is an error.
47962  #
47963  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47964  # It is also a way to make sure we got the proper file name for the real test later on.
47965  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47966  if test "x$test_shortpath" = x; then
47967    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47968$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47969    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47970  fi
47971
47972  # Call helper function which possibly converts this using DOS-style short mode.
47973  # If so, the updated path is stored in $new_path.
47974
47975  input_path="$new_path"
47976  # Check if we need to convert this using DOS-style short mode. If the path
47977  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47978  # take no chances and rewrite it.
47979  # Note: m4 eats our [], so we need to use [ and ] instead.
47980  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47981  if test "x$has_forbidden_chars" != x; then
47982    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47983    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47984    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47985    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47986      # Going to short mode and back again did indeed matter. Since short mode is
47987      # case insensitive, let's make it lowercase to improve readability.
47988      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47989      # Now convert it back to Unix-style (cygpath)
47990      input_path=`$CYGPATH -u "$shortmode_path"`
47991      new_path="$input_path"
47992    fi
47993  fi
47994
47995  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47996  if test "x$test_cygdrive_prefix" = x; then
47997    # As a simple fix, exclude /usr/bin since it's not a real path.
47998    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47999      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48000      # a path prefixed by /cygdrive for fixpath to work.
48001      new_path="$CYGWIN_ROOT_PATH$input_path"
48002    fi
48003  fi
48004
48005
48006  if test "x$path" != "x$new_path"; then
48007    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
48008    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48009$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48010  fi
48011
48012    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48013
48014  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48015  has_colon=`$ECHO $path | $GREP ^.:`
48016  new_path="$path"
48017  if test "x$has_colon" = x; then
48018    # Not in mixed or Windows style, start by that.
48019    new_path=`cmd //c echo $path`
48020  fi
48021
48022
48023  input_path="$new_path"
48024  # Check if we need to convert this using DOS-style short mode. If the path
48025  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48026  # take no chances and rewrite it.
48027  # Note: m4 eats our [], so we need to use [ and ] instead.
48028  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48029  if test "x$has_forbidden_chars" != x; then
48030    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48031    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48032  fi
48033
48034
48035  windows_path="$new_path"
48036  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48037    unix_path=`$CYGPATH -u "$windows_path"`
48038    new_path="$unix_path"
48039  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48040    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48041    new_path="$unix_path"
48042  fi
48043
48044  if test "x$path" != "x$new_path"; then
48045    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
48046    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48047$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48048  fi
48049
48050  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48051  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48052
48053    else
48054      # We're on a unix platform. Hooray! :)
48055      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48056      has_space=`$ECHO "$path" | $GREP " "`
48057      if test "x$has_space" != x; then
48058        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48059$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48060        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48061      fi
48062
48063      # Use eval to expand a potential ~
48064      eval path="$path"
48065      if test ! -f "$path" && test ! -d "$path"; then
48066        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48067      fi
48068
48069      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
48070    fi
48071  fi
48072
48073
48074  # Only process if variable expands to non-empty
48075
48076  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
48077    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48078
48079  # Input might be given as Windows format, start by converting to
48080  # unix format.
48081  path="$POTENTIAL_FREETYPE_LIB_PATH"
48082  new_path=`$CYGPATH -u "$path"`
48083
48084  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48085  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48086  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48087  # "foo.exe" is OK but "foo" is an error.
48088  #
48089  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48090  # It is also a way to make sure we got the proper file name for the real test later on.
48091  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48092  if test "x$test_shortpath" = x; then
48093    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48094$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48095    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
48096  fi
48097
48098  # Call helper function which possibly converts this using DOS-style short mode.
48099  # If so, the updated path is stored in $new_path.
48100
48101  input_path="$new_path"
48102  # Check if we need to convert this using DOS-style short mode. If the path
48103  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48104  # take no chances and rewrite it.
48105  # Note: m4 eats our [], so we need to use [ and ] instead.
48106  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48107  if test "x$has_forbidden_chars" != x; then
48108    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48109    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48110    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48111    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48112      # Going to short mode and back again did indeed matter. Since short mode is
48113      # case insensitive, let's make it lowercase to improve readability.
48114      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48115      # Now convert it back to Unix-style (cygpath)
48116      input_path=`$CYGPATH -u "$shortmode_path"`
48117      new_path="$input_path"
48118    fi
48119  fi
48120
48121  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48122  if test "x$test_cygdrive_prefix" = x; then
48123    # As a simple fix, exclude /usr/bin since it's not a real path.
48124    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48125      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48126      # a path prefixed by /cygdrive for fixpath to work.
48127      new_path="$CYGWIN_ROOT_PATH$input_path"
48128    fi
48129  fi
48130
48131
48132  if test "x$path" != "x$new_path"; then
48133    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
48134    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
48135$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48136  fi
48137
48138    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48139
48140  path="$POTENTIAL_FREETYPE_LIB_PATH"
48141  has_colon=`$ECHO $path | $GREP ^.:`
48142  new_path="$path"
48143  if test "x$has_colon" = x; then
48144    # Not in mixed or Windows style, start by that.
48145    new_path=`cmd //c echo $path`
48146  fi
48147
48148
48149  input_path="$new_path"
48150  # Check if we need to convert this using DOS-style short mode. If the path
48151  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48152  # take no chances and rewrite it.
48153  # Note: m4 eats our [], so we need to use [ and ] instead.
48154  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48155  if test "x$has_forbidden_chars" != x; then
48156    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48157    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48158  fi
48159
48160
48161  windows_path="$new_path"
48162  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48163    unix_path=`$CYGPATH -u "$windows_path"`
48164    new_path="$unix_path"
48165  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48166    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48167    new_path="$unix_path"
48168  fi
48169
48170  if test "x$path" != "x$new_path"; then
48171    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
48172    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
48173$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48174  fi
48175
48176  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48177  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48178
48179    else
48180      # We're on a unix platform. Hooray! :)
48181      path="$POTENTIAL_FREETYPE_LIB_PATH"
48182      has_space=`$ECHO "$path" | $GREP " "`
48183      if test "x$has_space" != x; then
48184        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48185$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48186        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48187      fi
48188
48189      # Use eval to expand a potential ~
48190      eval path="$path"
48191      if test ! -f "$path" && test ! -d "$path"; then
48192        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48193      fi
48194
48195      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
48196    fi
48197  fi
48198
48199
48200    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48201    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
48202$as_echo_n "checking for freetype includes... " >&6; }
48203    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
48204$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
48205    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
48206    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
48207$as_echo_n "checking for freetype libraries... " >&6; }
48208    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
48209$as_echo "$FREETYPE_LIB_PATH" >&6; }
48210  fi
48211
48212              fi
48213            fi
48214          fi
48215        fi
48216      fi # end check in well-known locations
48217
48218      if test "x$FOUND_FREETYPE" != xyes; then
48219
48220  # Print a helpful message on how to acquire the necessary build dependency.
48221  # freetype is the help tag: freetype, cups, pulse, alsa etc
48222  MISSING_DEPENDENCY=freetype
48223
48224  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48225    cygwin_help $MISSING_DEPENDENCY
48226  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48227    msys_help $MISSING_DEPENDENCY
48228  else
48229    PKGHANDLER_COMMAND=
48230
48231    case $PKGHANDLER in
48232      apt-get)
48233        apt_help     $MISSING_DEPENDENCY ;;
48234      yum)
48235        yum_help     $MISSING_DEPENDENCY ;;
48236      port)
48237        port_help    $MISSING_DEPENDENCY ;;
48238      pkgutil)
48239        pkgutil_help $MISSING_DEPENDENCY ;;
48240      pkgadd)
48241        pkgadd_help  $MISSING_DEPENDENCY ;;
48242    esac
48243
48244    if test "x$PKGHANDLER_COMMAND" != x; then
48245      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48246    fi
48247  fi
48248
48249        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
48250      fi
48251    fi # end user specified settings
48252
48253    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
48254    if test "x$FREETYPE_CFLAGS" = x; then
48255
48256  # Only process if variable expands to non-empty
48257
48258  if test "x$FREETYPE_INCLUDE_PATH" != x; then
48259    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48260
48261  # Input might be given as Windows format, start by converting to
48262  # unix format.
48263  path="$FREETYPE_INCLUDE_PATH"
48264  new_path=`$CYGPATH -u "$path"`
48265
48266  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48267  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48268  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48269  # "foo.exe" is OK but "foo" is an error.
48270  #
48271  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48272  # It is also a way to make sure we got the proper file name for the real test later on.
48273  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48274  if test "x$test_shortpath" = x; then
48275    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48276$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48277    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
48278  fi
48279
48280  # Call helper function which possibly converts this using DOS-style short mode.
48281  # If so, the updated path is stored in $new_path.
48282
48283  input_path="$new_path"
48284  # Check if we need to convert this using DOS-style short mode. If the path
48285  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48286  # take no chances and rewrite it.
48287  # Note: m4 eats our [], so we need to use [ and ] instead.
48288  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48289  if test "x$has_forbidden_chars" != x; then
48290    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48291    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48292    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48293    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48294      # Going to short mode and back again did indeed matter. Since short mode is
48295      # case insensitive, let's make it lowercase to improve readability.
48296      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48297      # Now convert it back to Unix-style (cygpath)
48298      input_path=`$CYGPATH -u "$shortmode_path"`
48299      new_path="$input_path"
48300    fi
48301  fi
48302
48303  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48304  if test "x$test_cygdrive_prefix" = x; then
48305    # As a simple fix, exclude /usr/bin since it's not a real path.
48306    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48307      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48308      # a path prefixed by /cygdrive for fixpath to work.
48309      new_path="$CYGWIN_ROOT_PATH$input_path"
48310    fi
48311  fi
48312
48313
48314  if test "x$path" != "x$new_path"; then
48315    FREETYPE_INCLUDE_PATH="$new_path"
48316    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48317$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48318  fi
48319
48320    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48321
48322  path="$FREETYPE_INCLUDE_PATH"
48323  has_colon=`$ECHO $path | $GREP ^.:`
48324  new_path="$path"
48325  if test "x$has_colon" = x; then
48326    # Not in mixed or Windows style, start by that.
48327    new_path=`cmd //c echo $path`
48328  fi
48329
48330
48331  input_path="$new_path"
48332  # Check if we need to convert this using DOS-style short mode. If the path
48333  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48334  # take no chances and rewrite it.
48335  # Note: m4 eats our [], so we need to use [ and ] instead.
48336  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48337  if test "x$has_forbidden_chars" != x; then
48338    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48339    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48340  fi
48341
48342
48343  windows_path="$new_path"
48344  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48345    unix_path=`$CYGPATH -u "$windows_path"`
48346    new_path="$unix_path"
48347  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48348    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48349    new_path="$unix_path"
48350  fi
48351
48352  if test "x$path" != "x$new_path"; then
48353    FREETYPE_INCLUDE_PATH="$new_path"
48354    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48355$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48356  fi
48357
48358  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48359  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48360
48361    else
48362      # We're on a unix platform. Hooray! :)
48363      path="$FREETYPE_INCLUDE_PATH"
48364      has_space=`$ECHO "$path" | $GREP " "`
48365      if test "x$has_space" != x; then
48366        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48367$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48368        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48369      fi
48370
48371      # Use eval to expand a potential ~
48372      eval path="$path"
48373      if test ! -f "$path" && test ! -d "$path"; then
48374        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48375      fi
48376
48377      FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
48378    fi
48379  fi
48380
48381      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
48382        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
48383      else
48384        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
48385      fi
48386    fi
48387
48388    if test "x$FREETYPE_LIBS" = x; then
48389
48390  # Only process if variable expands to non-empty
48391
48392  if test "x$FREETYPE_LIB_PATH" != x; then
48393    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48394
48395  # Input might be given as Windows format, start by converting to
48396  # unix format.
48397  path="$FREETYPE_LIB_PATH"
48398  new_path=`$CYGPATH -u "$path"`
48399
48400  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48401  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48402  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48403  # "foo.exe" is OK but "foo" is an error.
48404  #
48405  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48406  # It is also a way to make sure we got the proper file name for the real test later on.
48407  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48408  if test "x$test_shortpath" = x; then
48409    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48410$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48411    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
48412  fi
48413
48414  # Call helper function which possibly converts this using DOS-style short mode.
48415  # If so, the updated path is stored in $new_path.
48416
48417  input_path="$new_path"
48418  # Check if we need to convert this using DOS-style short mode. If the path
48419  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48420  # take no chances and rewrite it.
48421  # Note: m4 eats our [], so we need to use [ and ] instead.
48422  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48423  if test "x$has_forbidden_chars" != x; then
48424    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48425    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48426    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48427    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48428      # Going to short mode and back again did indeed matter. Since short mode is
48429      # case insensitive, let's make it lowercase to improve readability.
48430      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48431      # Now convert it back to Unix-style (cygpath)
48432      input_path=`$CYGPATH -u "$shortmode_path"`
48433      new_path="$input_path"
48434    fi
48435  fi
48436
48437  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48438  if test "x$test_cygdrive_prefix" = x; then
48439    # As a simple fix, exclude /usr/bin since it's not a real path.
48440    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48441      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48442      # a path prefixed by /cygdrive for fixpath to work.
48443      new_path="$CYGWIN_ROOT_PATH$input_path"
48444    fi
48445  fi
48446
48447
48448  if test "x$path" != "x$new_path"; then
48449    FREETYPE_LIB_PATH="$new_path"
48450    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
48451$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48452  fi
48453
48454    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48455
48456  path="$FREETYPE_LIB_PATH"
48457  has_colon=`$ECHO $path | $GREP ^.:`
48458  new_path="$path"
48459  if test "x$has_colon" = x; then
48460    # Not in mixed or Windows style, start by that.
48461    new_path=`cmd //c echo $path`
48462  fi
48463
48464
48465  input_path="$new_path"
48466  # Check if we need to convert this using DOS-style short mode. If the path
48467  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48468  # take no chances and rewrite it.
48469  # Note: m4 eats our [], so we need to use [ and ] instead.
48470  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48471  if test "x$has_forbidden_chars" != x; then
48472    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48473    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48474  fi
48475
48476
48477  windows_path="$new_path"
48478  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48479    unix_path=`$CYGPATH -u "$windows_path"`
48480    new_path="$unix_path"
48481  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48482    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48483    new_path="$unix_path"
48484  fi
48485
48486  if test "x$path" != "x$new_path"; then
48487    FREETYPE_LIB_PATH="$new_path"
48488    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
48489$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48490  fi
48491
48492  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48493  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48494
48495    else
48496      # We're on a unix platform. Hooray! :)
48497      path="$FREETYPE_LIB_PATH"
48498      has_space=`$ECHO "$path" | $GREP " "`
48499      if test "x$has_space" != x; then
48500        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48501$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48502        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48503      fi
48504
48505      # Use eval to expand a potential ~
48506      eval path="$path"
48507      if test ! -f "$path" && test ! -d "$path"; then
48508        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48509      fi
48510
48511      FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
48512    fi
48513  fi
48514
48515      if test "x$OPENJDK_TARGET_OS" = xwindows; then
48516        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
48517      else
48518        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
48519      fi
48520    fi
48521
48522    # Try to compile it
48523    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
48524$as_echo_n "checking if we can compile and link with freetype... " >&6; }
48525    ac_ext=cpp
48526ac_cpp='$CXXCPP $CPPFLAGS'
48527ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48528ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48529ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48530
48531    PREV_CXXCFLAGS="$CXXFLAGS"
48532    PREV_LIBS="$LIBS"
48533    PREV_CXX="$CXX"
48534    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
48535    LIBS="$LIBS $FREETYPE_LIBS"
48536    CXX="$FIXPATH $CXX"
48537    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48538/* end confdefs.h.  */
48539
48540          #include<ft2build.h>
48541          #include FT_FREETYPE_H
48542          int main () {
48543            FT_Init_FreeType(NULL);
48544            return 0;
48545          }
48546
48547_ACEOF
48548if ac_fn_cxx_try_link "$LINENO"; then :
48549
48550          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48551$as_echo "yes" >&6; }
48552
48553else
48554
48555          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48556$as_echo "no" >&6; }
48557          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
48558$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
48559          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
48560$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
48561
48562
48563  # Print a helpful message on how to acquire the necessary build dependency.
48564  # freetype is the help tag: freetype, cups, pulse, alsa etc
48565  MISSING_DEPENDENCY=freetype
48566
48567  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48568    cygwin_help $MISSING_DEPENDENCY
48569  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48570    msys_help $MISSING_DEPENDENCY
48571  else
48572    PKGHANDLER_COMMAND=
48573
48574    case $PKGHANDLER in
48575      apt-get)
48576        apt_help     $MISSING_DEPENDENCY ;;
48577      yum)
48578        yum_help     $MISSING_DEPENDENCY ;;
48579      port)
48580        port_help    $MISSING_DEPENDENCY ;;
48581      pkgutil)
48582        pkgutil_help $MISSING_DEPENDENCY ;;
48583      pkgadd)
48584        pkgadd_help  $MISSING_DEPENDENCY ;;
48585    esac
48586
48587    if test "x$PKGHANDLER_COMMAND" != x; then
48588      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48589    fi
48590  fi
48591
48592
48593          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
48594
48595
48596fi
48597rm -f core conftest.err conftest.$ac_objext \
48598    conftest$ac_exeext conftest.$ac_ext
48599    CXXCFLAGS="$PREV_CXXFLAGS"
48600    LIBS="$PREV_LIBS"
48601    CXX="$PREV_CXX"
48602    ac_ext=cpp
48603ac_cpp='$CXXCPP $CPPFLAGS'
48604ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48605ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48606ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48607
48608
48609    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
48610$as_echo_n "checking if we should bundle freetype... " >&6; }
48611    if test "x$BUNDLE_FREETYPE" = xyes; then
48612      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
48613    fi
48614    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
48615$as_echo "$BUNDLE_FREETYPE" >&6; }
48616
48617  fi # end freetype needed
48618
48619
48620
48621
48622
48623
48624
48625  ###############################################################################
48626  #
48627  # Check for alsa headers and libraries. Used on Linux/GNU systems.
48628  #
48629
48630# Check whether --with-alsa was given.
48631if test "${with_alsa+set}" = set; then :
48632  withval=$with_alsa;
48633fi
48634
48635
48636# Check whether --with-alsa-include was given.
48637if test "${with_alsa_include+set}" = set; then :
48638  withval=$with_alsa_include;
48639fi
48640
48641
48642# Check whether --with-alsa-lib was given.
48643if test "${with_alsa_lib+set}" = set; then :
48644  withval=$with_alsa_lib;
48645fi
48646
48647
48648  if test "x$ALSA_NOT_NEEDED" = xyes; then
48649    if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
48650      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
48651$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
48652    fi
48653    ALSA_CFLAGS=
48654    ALSA_LIBS=
48655  else
48656    ALSA_FOUND=no
48657
48658    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
48659      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
48660    fi
48661
48662    if test "x${with_alsa}" != x; then
48663      ALSA_LIBS="-L${with_alsa}/lib -lasound"
48664      ALSA_CFLAGS="-I${with_alsa}/include"
48665      ALSA_FOUND=yes
48666    fi
48667    if test "x${with_alsa_include}" != x; then
48668      ALSA_CFLAGS="-I${with_alsa_include}"
48669      ALSA_FOUND=yes
48670    fi
48671    if test "x${with_alsa_lib}" != x; then
48672      ALSA_LIBS="-L${with_alsa_lib} -lasound"
48673      ALSA_FOUND=yes
48674    fi
48675    if test "x$ALSA_FOUND" = xno; then
48676
48677
48678  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
48679    # Source the builddeps file again, to make sure it uses the latest variables!
48680    . $builddepsfile
48681    # Look for a target and build machine specific resource!
48682    eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
48683    if test "x$resource" = x; then
48684      # Ok, lets instead look for a target specific resource
48685      eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
48686    fi
48687    if test "x$resource" = x; then
48688      # Ok, lets instead look for a build specific resource
48689      eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
48690    fi
48691    if test "x$resource" = x; then
48692      # Ok, lets instead look for a generic resource
48693      # (The alsa comes from M4 and not the shell, thus no need for eval here.)
48694      resource=${builddep_alsa}
48695    fi
48696    if test "x$resource" != x; then
48697      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
48698$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
48699      # If the resource in the builddeps.conf file is an existing directory,
48700      # for example /java/linux/cups
48701      if test -d ${resource}; then
48702        depdir=${resource}
48703      else
48704
48705  # alsa is for example mymodule
48706  # $resource is for example libs/general/libmymod_1_2_3.zip
48707  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
48708  # $with_builddeps_dir is for example /localhome/builddeps
48709  # depdir is the name of the variable into which we store the depdir, eg MYMOD
48710  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
48711  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
48712  filename=`basename $resource`
48713  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
48714  filebase=${filename%%.*}
48715  extension=${filename#*.}
48716  installdir=$with_builddeps_dir/$filebase
48717  if test ! -f $installdir/$filename.unpacked; then
48718    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
48719$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
48720    if test ! -d $installdir; then
48721      mkdir -p $installdir
48722    fi
48723    if test ! -d $installdir; then
48724      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
48725    fi
48726    tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
48727    touch $tmpfile
48728    if test ! -f $tmpfile; then
48729      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
48730    fi
48731
48732  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
48733  # $tmpfile is the local file name for the downloaded file.
48734  VALID_TOOL=no
48735  if test "x$BDEPS_FTP" = xwget; then
48736    VALID_TOOL=yes
48737    wget -O $tmpfile $with_builddeps_server/$resource
48738  fi
48739  if test "x$BDEPS_FTP" = xlftp; then
48740    VALID_TOOL=yes
48741    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
48742  fi
48743  if test "x$BDEPS_FTP" = xftp; then
48744    VALID_TOOL=yes
48745    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
48746    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
48747    FTPUSERPWD=${FTPSERVER%%@*}
48748    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
48749      FTPUSER=${userpwd%%:*}
48750      FTPPWD=${userpwd#*@}
48751      FTPSERVER=${FTPSERVER#*@}
48752    else
48753      FTPUSER=ftp
48754      FTPPWD=ftp
48755    fi
48756    # the "pass" command does not work on some
48757    # ftp clients (read ftp.exe) but if it works,
48758    # passive mode is better!
48759    ( \
48760        echo "user $FTPUSER $FTPPWD"        ; \
48761        echo "pass"                         ; \
48762        echo "bin"                          ; \
48763        echo "get $FTPPATH $tmpfile"              ; \
48764    ) | ftp -in $FTPSERVER
48765  fi
48766  if test "x$VALID_TOOL" != xyes; then
48767    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
48768  fi
48769
48770    mv $tmpfile $installdir/$filename
48771    if test ! -s $installdir/$filename; then
48772      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
48773    fi
48774    case "$extension" in
48775      zip)  echo "Unzipping $installdir/$filename..."
48776        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
48777        ;;
48778      tar.gz) echo "Untaring $installdir/$filename..."
48779        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
48780        ;;
48781      tgz) echo "Untaring $installdir/$filename..."
48782        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
48783        ;;
48784      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
48785        ;;
48786    esac
48787  fi
48788  if test -f $installdir/$filename.unpacked; then
48789    depdir=$installdir
48790  fi
48791
48792      fi
48793      # Source the builddeps file again, because in the previous command, the depdir
48794      # was updated to point at the current build dependency install directory.
48795      . $builddepsfile
48796      # Now extract variables from the builddeps.conf files.
48797      theroot=${builddep_alsa_ROOT}
48798      thecflags=${builddep_alsa_CFLAGS}
48799      thelibs=${builddep_alsa_LIBS}
48800      if test "x$depdir" = x; then
48801        as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
48802      fi
48803      ALSA=$depdir
48804      if test "x$theroot" != x; then
48805        ALSA="$theroot"
48806      fi
48807      if test "x$thecflags" != x; then
48808        ALSA_CFLAGS="$thecflags"
48809      fi
48810      if test "x$thelibs" != x; then
48811        ALSA_LIBS="$thelibs"
48812      fi
48813      ALSA_FOUND=yes
48814      else ALSA_FOUND=no
48815
48816    fi
48817    else ALSA_FOUND=no
48818
48819  fi
48820
48821    fi
48822    # Do not try pkg-config if we have a sysroot set.
48823    if test "x$SYSROOT" = x; then
48824      if test "x$ALSA_FOUND" = xno; then
48825
48826pkg_failed=no
48827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
48828$as_echo_n "checking for ALSA... " >&6; }
48829
48830if test -n "$ALSA_CFLAGS"; then
48831    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
48832 elif test -n "$PKG_CONFIG"; then
48833    if test -n "$PKG_CONFIG" && \
48834    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
48835  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
48836  ac_status=$?
48837  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48838  test $ac_status = 0; }; then
48839  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
48840else
48841  pkg_failed=yes
48842fi
48843 else
48844    pkg_failed=untried
48845fi
48846if test -n "$ALSA_LIBS"; then
48847    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
48848 elif test -n "$PKG_CONFIG"; then
48849    if test -n "$PKG_CONFIG" && \
48850    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
48851  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
48852  ac_status=$?
48853  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48854  test $ac_status = 0; }; then
48855  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
48856else
48857  pkg_failed=yes
48858fi
48859 else
48860    pkg_failed=untried
48861fi
48862
48863
48864
48865if test $pkg_failed = yes; then
48866
48867if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48868        _pkg_short_errors_supported=yes
48869else
48870        _pkg_short_errors_supported=no
48871fi
48872        if test $_pkg_short_errors_supported = yes; then
48873	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
48874        else
48875	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
48876        fi
48877	# Put the nasty error message in config.log where it belongs
48878	echo "$ALSA_PKG_ERRORS" >&5
48879
48880	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48881$as_echo "no" >&6; }
48882                ALSA_FOUND=no
48883elif test $pkg_failed = untried; then
48884	ALSA_FOUND=no
48885else
48886	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
48887	ALSA_LIBS=$pkg_cv_ALSA_LIBS
48888        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48889$as_echo "yes" >&6; }
48890	ALSA_FOUND=yes
48891fi
48892      fi
48893    fi
48894    if test "x$ALSA_FOUND" = xno; then
48895      for ac_header in alsa/asoundlib.h
48896do :
48897  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
48898if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
48899  cat >>confdefs.h <<_ACEOF
48900#define HAVE_ALSA_ASOUNDLIB_H 1
48901_ACEOF
48902
48903            ALSA_FOUND=yes
48904            ALSA_CFLAGS=-Iignoreme
48905            ALSA_LIBS=-lasound
48906            DEFAULT_ALSA=yes
48907
48908else
48909  ALSA_FOUND=no
48910fi
48911
48912done
48913
48914    fi
48915    if test "x$ALSA_FOUND" = xno; then
48916
48917  # Print a helpful message on how to acquire the necessary build dependency.
48918  # alsa is the help tag: freetype, cups, pulse, alsa etc
48919  MISSING_DEPENDENCY=alsa
48920
48921  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48922    cygwin_help $MISSING_DEPENDENCY
48923  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48924    msys_help $MISSING_DEPENDENCY
48925  else
48926    PKGHANDLER_COMMAND=
48927
48928    case $PKGHANDLER in
48929      apt-get)
48930        apt_help     $MISSING_DEPENDENCY ;;
48931      yum)
48932        yum_help     $MISSING_DEPENDENCY ;;
48933      port)
48934        port_help    $MISSING_DEPENDENCY ;;
48935      pkgutil)
48936        pkgutil_help $MISSING_DEPENDENCY ;;
48937      pkgadd)
48938        pkgadd_help  $MISSING_DEPENDENCY ;;
48939    esac
48940
48941    if test "x$PKGHANDLER_COMMAND" != x; then
48942      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48943    fi
48944  fi
48945
48946      as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
48947    fi
48948  fi
48949
48950
48951
48952
48953
48954
48955  ###############################################################################
48956  #
48957  # Check for the jpeg library
48958  #
48959
48960
48961# Check whether --with-libjpeg was given.
48962if test "${with_libjpeg+set}" = set; then :
48963  withval=$with_libjpeg;
48964fi
48965
48966
48967  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
48968$as_echo_n "checking for which libjpeg to use... " >&6; }
48969
48970  # default is bundled
48971  DEFAULT_LIBJPEG=bundled
48972
48973  #
48974  # if user didn't specify, use DEFAULT_LIBJPEG
48975  #
48976  if test "x${with_libjpeg}" = "x"; then
48977    with_libjpeg=${DEFAULT_LIBJPEG}
48978  fi
48979
48980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
48981$as_echo "${with_libjpeg}" >&6; }
48982
48983  if test "x${with_libjpeg}" = "xbundled"; then
48984    USE_EXTERNAL_LIBJPEG=false
48985  elif test "x${with_libjpeg}" = "xsystem"; then
48986    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
48987if test "x$ac_cv_header_jpeglib_h" = xyes; then :
48988
48989else
48990   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
48991fi
48992
48993
48994    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
48995$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
48996if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
48997  $as_echo_n "(cached) " >&6
48998else
48999  ac_check_lib_save_LIBS=$LIBS
49000LIBS="-ljpeg  $LIBS"
49001cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49002/* end confdefs.h.  */
49003
49004/* Override any GCC internal prototype to avoid an error.
49005   Use char because int might match the return type of a GCC
49006   builtin and then its argument prototype would still apply.  */
49007#ifdef __cplusplus
49008extern "C"
49009#endif
49010char jpeg_CreateDecompress ();
49011int
49012main ()
49013{
49014return jpeg_CreateDecompress ();
49015  ;
49016  return 0;
49017}
49018_ACEOF
49019if ac_fn_cxx_try_link "$LINENO"; then :
49020  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
49021else
49022  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
49023fi
49024rm -f core conftest.err conftest.$ac_objext \
49025    conftest$ac_exeext conftest.$ac_ext
49026LIBS=$ac_check_lib_save_LIBS
49027fi
49028{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
49029$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
49030if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
49031  cat >>confdefs.h <<_ACEOF
49032#define HAVE_LIBJPEG 1
49033_ACEOF
49034
49035  LIBS="-ljpeg $LIBS"
49036
49037else
49038   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
49039fi
49040
49041
49042    USE_EXTERNAL_LIBJPEG=true
49043  else
49044    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
49045  fi
49046
49047
49048
49049  ###############################################################################
49050  #
49051  # Check for the gif library
49052  #
49053
49054
49055# Check whether --with-giflib was given.
49056if test "${with_giflib+set}" = set; then :
49057  withval=$with_giflib;
49058fi
49059
49060
49061
49062  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
49063$as_echo_n "checking for which giflib to use... " >&6; }
49064
49065  # default is bundled
49066  DEFAULT_GIFLIB=bundled
49067
49068  #
49069  # if user didn't specify, use DEFAULT_GIFLIB
49070  #
49071  if test "x${with_giflib}" = "x"; then
49072    with_giflib=${DEFAULT_GIFLIB}
49073  fi
49074
49075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
49076$as_echo "${with_giflib}" >&6; }
49077
49078  if test "x${with_giflib}" = "xbundled"; then
49079    USE_EXTERNAL_LIBGIF=false
49080  elif test "x${with_giflib}" = "xsystem"; then
49081    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
49082if test "x$ac_cv_header_gif_lib_h" = xyes; then :
49083
49084else
49085   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
49086fi
49087
49088
49089    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
49090$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
49091if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
49092  $as_echo_n "(cached) " >&6
49093else
49094  ac_check_lib_save_LIBS=$LIBS
49095LIBS="-lgif  $LIBS"
49096cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49097/* end confdefs.h.  */
49098
49099/* Override any GCC internal prototype to avoid an error.
49100   Use char because int might match the return type of a GCC
49101   builtin and then its argument prototype would still apply.  */
49102#ifdef __cplusplus
49103extern "C"
49104#endif
49105char DGifGetCode ();
49106int
49107main ()
49108{
49109return DGifGetCode ();
49110  ;
49111  return 0;
49112}
49113_ACEOF
49114if ac_fn_cxx_try_link "$LINENO"; then :
49115  ac_cv_lib_gif_DGifGetCode=yes
49116else
49117  ac_cv_lib_gif_DGifGetCode=no
49118fi
49119rm -f core conftest.err conftest.$ac_objext \
49120    conftest$ac_exeext conftest.$ac_ext
49121LIBS=$ac_check_lib_save_LIBS
49122fi
49123{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
49124$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
49125if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
49126  cat >>confdefs.h <<_ACEOF
49127#define HAVE_LIBGIF 1
49128_ACEOF
49129
49130  LIBS="-lgif $LIBS"
49131
49132else
49133   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
49134fi
49135
49136
49137    USE_EXTERNAL_LIBGIF=true
49138  else
49139    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
49140  fi
49141
49142
49143  ###############################################################################
49144  #
49145  # Check for the lcms2 library
49146  #
49147
49148
49149# Check whether --with-lcms was given.
49150if test "${with_lcms+set}" = set; then :
49151  withval=$with_lcms;
49152fi
49153
49154
49155  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
49156$as_echo_n "checking for which lcms to use... " >&6; }
49157
49158  DEFAULT_LCMS=bundled
49159
49160  #
49161  # If user didn't specify, use DEFAULT_LCMS
49162  #
49163  if test "x${with_lcms}" = "x"; then
49164      with_lcms=${DEFAULT_LCMS}
49165  fi
49166
49167  if test "x${with_lcms}" = "xbundled"; then
49168    USE_EXTERNAL_LCMS=false
49169    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
49170$as_echo "bundled" >&6; }
49171  elif test "x${with_lcms}" = "xsystem"; then
49172    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49173$as_echo "system" >&6; }
49174
49175pkg_failed=no
49176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
49177$as_echo_n "checking for LCMS... " >&6; }
49178
49179if test -n "$LCMS_CFLAGS"; then
49180    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
49181 elif test -n "$PKG_CONFIG"; then
49182    if test -n "$PKG_CONFIG" && \
49183    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
49184  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
49185  ac_status=$?
49186  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49187  test $ac_status = 0; }; then
49188  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
49189else
49190  pkg_failed=yes
49191fi
49192 else
49193    pkg_failed=untried
49194fi
49195if test -n "$LCMS_LIBS"; then
49196    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
49197 elif test -n "$PKG_CONFIG"; then
49198    if test -n "$PKG_CONFIG" && \
49199    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
49200  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
49201  ac_status=$?
49202  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49203  test $ac_status = 0; }; then
49204  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
49205else
49206  pkg_failed=yes
49207fi
49208 else
49209    pkg_failed=untried
49210fi
49211
49212
49213
49214if test $pkg_failed = yes; then
49215
49216if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49217        _pkg_short_errors_supported=yes
49218else
49219        _pkg_short_errors_supported=no
49220fi
49221        if test $_pkg_short_errors_supported = yes; then
49222	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
49223        else
49224	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
49225        fi
49226	# Put the nasty error message in config.log where it belongs
49227	echo "$LCMS_PKG_ERRORS" >&5
49228
49229	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49230$as_echo "no" >&6; }
49231                LCMS_FOUND=no
49232elif test $pkg_failed = untried; then
49233	LCMS_FOUND=no
49234else
49235	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
49236	LCMS_LIBS=$pkg_cv_LCMS_LIBS
49237        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49238$as_echo "yes" >&6; }
49239	LCMS_FOUND=yes
49240fi
49241    if test "x${LCMS_FOUND}" = "xyes"; then
49242      USE_EXTERNAL_LCMS=true
49243    else
49244      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
49245    fi
49246  else
49247    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
49248  fi
49249
49250
49251
49252  ###############################################################################
49253  #
49254  # Check for the png library
49255  #
49256
49257
49258# Check whether --with-libpng was given.
49259if test "${with_libpng+set}" = set; then :
49260  withval=$with_libpng;
49261fi
49262
49263
49264
49265  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
49266$as_echo_n "checking for which libpng to use... " >&6; }
49267
49268  # default is bundled
49269  DEFAULT_LIBPNG=bundled
49270
49271  #
49272  # if user didn't specify, use DEFAULT_LIBPNG
49273  #
49274  if test "x${with_libpng}" = "x"; then
49275      with_libpng=${DEFAULT_LIBPNG}
49276  fi
49277
49278  if test "x${with_libpng}" = "xbundled"; then
49279      USE_EXTERNAL_LIBPNG=false
49280      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
49281$as_echo "bundled" >&6; }
49282  elif test "x${with_libpng}" = "xsystem"; then
49283
49284pkg_failed=no
49285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
49286$as_echo_n "checking for PNG... " >&6; }
49287
49288if test -n "$PNG_CFLAGS"; then
49289    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
49290 elif test -n "$PKG_CONFIG"; then
49291    if test -n "$PKG_CONFIG" && \
49292    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
49293  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
49294  ac_status=$?
49295  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49296  test $ac_status = 0; }; then
49297  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
49298else
49299  pkg_failed=yes
49300fi
49301 else
49302    pkg_failed=untried
49303fi
49304if test -n "$PNG_LIBS"; then
49305    pkg_cv_PNG_LIBS="$PNG_LIBS"
49306 elif test -n "$PKG_CONFIG"; then
49307    if test -n "$PKG_CONFIG" && \
49308    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
49309  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
49310  ac_status=$?
49311  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49312  test $ac_status = 0; }; then
49313  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
49314else
49315  pkg_failed=yes
49316fi
49317 else
49318    pkg_failed=untried
49319fi
49320
49321
49322
49323if test $pkg_failed = yes; then
49324
49325if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49326        _pkg_short_errors_supported=yes
49327else
49328        _pkg_short_errors_supported=no
49329fi
49330        if test $_pkg_short_errors_supported = yes; then
49331	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
49332        else
49333	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
49334        fi
49335	# Put the nasty error message in config.log where it belongs
49336	echo "$PNG_PKG_ERRORS" >&5
49337
49338	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49339$as_echo "no" >&6; }
49340                 LIBPNG_FOUND=no
49341elif test $pkg_failed = untried; then
49342	 LIBPNG_FOUND=no
49343else
49344	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
49345	PNG_LIBS=$pkg_cv_PNG_LIBS
49346        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49347$as_echo "yes" >&6; }
49348	 LIBPNG_FOUND=yes
49349fi
49350      if test "x${LIBPNG_FOUND}" = "xyes"; then
49351          USE_EXTERNAL_LIBPNG=true
49352          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49353$as_echo "system" >&6; }
49354      else
49355          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
49356$as_echo "system not found" >&6; }
49357          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
49358      fi
49359  else
49360      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
49361  fi
49362
49363
49364  ###############################################################################
49365  #
49366  # Check for the zlib library
49367  #
49368
49369
49370# Check whether --with-zlib was given.
49371if test "${with_zlib+set}" = set; then :
49372  withval=$with_zlib;
49373fi
49374
49375
49376  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
49377$as_echo_n "checking for compress in -lz... " >&6; }
49378if ${ac_cv_lib_z_compress+:} false; then :
49379  $as_echo_n "(cached) " >&6
49380else
49381  ac_check_lib_save_LIBS=$LIBS
49382LIBS="-lz  $LIBS"
49383cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49384/* end confdefs.h.  */
49385
49386/* Override any GCC internal prototype to avoid an error.
49387   Use char because int might match the return type of a GCC
49388   builtin and then its argument prototype would still apply.  */
49389#ifdef __cplusplus
49390extern "C"
49391#endif
49392char compress ();
49393int
49394main ()
49395{
49396return compress ();
49397  ;
49398  return 0;
49399}
49400_ACEOF
49401if ac_fn_cxx_try_link "$LINENO"; then :
49402  ac_cv_lib_z_compress=yes
49403else
49404  ac_cv_lib_z_compress=no
49405fi
49406rm -f core conftest.err conftest.$ac_objext \
49407    conftest$ac_exeext conftest.$ac_ext
49408LIBS=$ac_check_lib_save_LIBS
49409fi
49410{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
49411$as_echo "$ac_cv_lib_z_compress" >&6; }
49412if test "x$ac_cv_lib_z_compress" = xyes; then :
49413   ZLIB_FOUND=yes
49414else
49415   ZLIB_FOUND=no
49416fi
49417
49418
49419  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
49420$as_echo_n "checking for which zlib to use... " >&6; }
49421
49422  DEFAULT_ZLIB=bundled
49423  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49424    #
49425    # On macosx default is system...on others default is
49426    #
49427    DEFAULT_ZLIB=system
49428  fi
49429
49430  if test "x${ZLIB_FOUND}" != "xyes"; then
49431    #
49432    # If we don't find any system...set default to bundled
49433    #
49434    DEFAULT_ZLIB=bundled
49435  fi
49436
49437  #
49438  # If user didn't specify, use DEFAULT_ZLIB
49439  #
49440  if test "x${with_zlib}" = "x"; then
49441    with_zlib=${DEFAULT_ZLIB}
49442  fi
49443
49444  if test "x${with_zlib}" = "xbundled"; then
49445    USE_EXTERNAL_LIBZ=false
49446    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
49447$as_echo "bundled" >&6; }
49448  elif test "x${with_zlib}" = "xsystem"; then
49449    if test "x${ZLIB_FOUND}" = "xyes"; then
49450      USE_EXTERNAL_LIBZ=true
49451      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49452$as_echo "system" >&6; }
49453    else
49454      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
49455$as_echo "system not found" >&6; }
49456      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
49457    fi
49458  else
49459    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
49460  fi
49461
49462
49463
49464  ###############################################################################
49465  LIBZIP_CAN_USE_MMAP=true
49466
49467
49468
49469  ###############################################################################
49470  #
49471  # Check if altzone exists in time.h
49472  #
49473
49474  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49475/* end confdefs.h.  */
49476#include <time.h>
49477int
49478main ()
49479{
49480return (int)altzone;
49481  ;
49482  return 0;
49483}
49484_ACEOF
49485if ac_fn_cxx_try_link "$LINENO"; then :
49486  has_altzone=yes
49487else
49488  has_altzone=no
49489fi
49490rm -f core conftest.err conftest.$ac_objext \
49491    conftest$ac_exeext conftest.$ac_ext
49492  if test "x$has_altzone" = xyes; then
49493
49494$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
49495
49496  fi
49497
49498  ###############################################################################
49499  #
49500  # Check the maths library
49501  #
49502
49503  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
49504$as_echo_n "checking for cos in -lm... " >&6; }
49505if ${ac_cv_lib_m_cos+:} false; then :
49506  $as_echo_n "(cached) " >&6
49507else
49508  ac_check_lib_save_LIBS=$LIBS
49509LIBS="-lm  $LIBS"
49510cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49511/* end confdefs.h.  */
49512
49513/* Override any GCC internal prototype to avoid an error.
49514   Use char because int might match the return type of a GCC
49515   builtin and then its argument prototype would still apply.  */
49516#ifdef __cplusplus
49517extern "C"
49518#endif
49519char cos ();
49520int
49521main ()
49522{
49523return cos ();
49524  ;
49525  return 0;
49526}
49527_ACEOF
49528if ac_fn_cxx_try_link "$LINENO"; then :
49529  ac_cv_lib_m_cos=yes
49530else
49531  ac_cv_lib_m_cos=no
49532fi
49533rm -f core conftest.err conftest.$ac_objext \
49534    conftest$ac_exeext conftest.$ac_ext
49535LIBS=$ac_check_lib_save_LIBS
49536fi
49537{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
49538$as_echo "$ac_cv_lib_m_cos" >&6; }
49539if test "x$ac_cv_lib_m_cos" = xyes; then :
49540  cat >>confdefs.h <<_ACEOF
49541#define HAVE_LIBM 1
49542_ACEOF
49543
49544  LIBS="-lm $LIBS"
49545
49546else
49547
49548        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
49549$as_echo "$as_me: Maths library was not found" >&6;}
49550
49551
49552fi
49553
49554
49555
49556  ###############################################################################
49557  #
49558  # Check for libdl.so
49559
49560  save_LIBS="$LIBS"
49561  LIBS=""
49562  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
49563$as_echo_n "checking for dlopen in -ldl... " >&6; }
49564if ${ac_cv_lib_dl_dlopen+:} false; then :
49565  $as_echo_n "(cached) " >&6
49566else
49567  ac_check_lib_save_LIBS=$LIBS
49568LIBS="-ldl  $LIBS"
49569cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49570/* end confdefs.h.  */
49571
49572/* Override any GCC internal prototype to avoid an error.
49573   Use char because int might match the return type of a GCC
49574   builtin and then its argument prototype would still apply.  */
49575#ifdef __cplusplus
49576extern "C"
49577#endif
49578char dlopen ();
49579int
49580main ()
49581{
49582return dlopen ();
49583  ;
49584  return 0;
49585}
49586_ACEOF
49587if ac_fn_cxx_try_link "$LINENO"; then :
49588  ac_cv_lib_dl_dlopen=yes
49589else
49590  ac_cv_lib_dl_dlopen=no
49591fi
49592rm -f core conftest.err conftest.$ac_objext \
49593    conftest$ac_exeext conftest.$ac_ext
49594LIBS=$ac_check_lib_save_LIBS
49595fi
49596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
49597$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
49598if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
49599  cat >>confdefs.h <<_ACEOF
49600#define HAVE_LIBDL 1
49601_ACEOF
49602
49603  LIBS="-ldl $LIBS"
49604
49605fi
49606
49607  LIBDL="$LIBS"
49608
49609  LIBS="$save_LIBS"
49610
49611
49612  ###############################################################################
49613  #
49614  # statically link libstdc++ before C++ ABI is stablized on Linux unless
49615  # dynamic build is configured on command line.
49616  #
49617
49618# Check whether --with-stdc++lib was given.
49619if test "${with_stdc__lib+set}" = set; then :
49620  withval=$with_stdc__lib;
49621        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
49622                && test "x$with_stdc__lib" != xdefault; then
49623          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
49624        fi
49625
49626else
49627  with_stdc__lib=default
49628
49629fi
49630
49631
49632  if test "x$OPENJDK_TARGET_OS" = xlinux; then
49633    # Test if -lstdc++ works.
49634    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
49635$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
49636    ac_ext=cpp
49637ac_cpp='$CXXCPP $CPPFLAGS'
49638ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49639ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49640ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49641
49642    OLD_CXXFLAGS="$CXXFLAGS"
49643    CXXFLAGS="$CXXFLAGS -lstdc++"
49644    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49645/* end confdefs.h.  */
49646
49647int
49648main ()
49649{
49650return 0;
49651  ;
49652  return 0;
49653}
49654_ACEOF
49655if ac_fn_cxx_try_link "$LINENO"; then :
49656  has_dynamic_libstdcxx=yes
49657else
49658  has_dynamic_libstdcxx=no
49659fi
49660rm -f core conftest.err conftest.$ac_objext \
49661    conftest$ac_exeext conftest.$ac_ext
49662    CXXFLAGS="$OLD_CXXFLAGS"
49663    ac_ext=cpp
49664ac_cpp='$CXXCPP $CPPFLAGS'
49665ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49666ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49667ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49668
49669    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
49670$as_echo "$has_dynamic_libstdcxx" >&6; }
49671
49672    # Test if stdc++ can be linked statically.
49673    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
49674$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
49675    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
49676    ac_ext=cpp
49677ac_cpp='$CXXCPP $CPPFLAGS'
49678ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49679ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49680ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49681
49682    OLD_LIBS="$LIBS"
49683    OLD_CXX="$CXX"
49684    LIBS="$STATIC_STDCXX_FLAGS"
49685    CXX="$CC"
49686    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49687/* end confdefs.h.  */
49688
49689int
49690main ()
49691{
49692return 0;
49693  ;
49694  return 0;
49695}
49696_ACEOF
49697if ac_fn_cxx_try_link "$LINENO"; then :
49698  has_static_libstdcxx=yes
49699else
49700  has_static_libstdcxx=no
49701fi
49702rm -f core conftest.err conftest.$ac_objext \
49703    conftest$ac_exeext conftest.$ac_ext
49704    LIBS="$OLD_LIBS"
49705    CXX="$OLD_CXX"
49706    ac_ext=cpp
49707ac_cpp='$CXXCPP $CPPFLAGS'
49708ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49709ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49710ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49711
49712    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
49713$as_echo "$has_static_libstdcxx" >&6; }
49714
49715    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
49716      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
49717    fi
49718
49719    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
49720      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
49721    fi
49722
49723    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
49724      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
49725    fi
49726
49727    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
49728$as_echo_n "checking how to link with libstdc++... " >&6; }
49729    # If dynamic was requested, it's available since it would fail above otherwise.
49730    # If dynamic wasn't requested, go with static unless it isn't available.
49731    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49732      LIBCXX="$LIBCXX -lstdc++"
49733      LDCXX="$CXX"
49734      STATIC_CXX_SETTING="STATIC_CXX=false"
49735      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
49736$as_echo "dynamic" >&6; }
49737    else
49738      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
49739      LDCXX="$CC"
49740      STATIC_CXX_SETTING="STATIC_CXX=true"
49741      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
49742$as_echo "static" >&6; }
49743    fi
49744  fi
49745
49746
49747  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49748    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
49749
49750pkg_failed=no
49751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
49752$as_echo_n "checking for LIBFFI... " >&6; }
49753
49754if test -n "$LIBFFI_CFLAGS"; then
49755    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
49756 elif test -n "$PKG_CONFIG"; then
49757    if test -n "$PKG_CONFIG" && \
49758    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
49759  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
49760  ac_status=$?
49761  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49762  test $ac_status = 0; }; then
49763  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
49764else
49765  pkg_failed=yes
49766fi
49767 else
49768    pkg_failed=untried
49769fi
49770if test -n "$LIBFFI_LIBS"; then
49771    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
49772 elif test -n "$PKG_CONFIG"; then
49773    if test -n "$PKG_CONFIG" && \
49774    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
49775  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
49776  ac_status=$?
49777  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49778  test $ac_status = 0; }; then
49779  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
49780else
49781  pkg_failed=yes
49782fi
49783 else
49784    pkg_failed=untried
49785fi
49786
49787
49788
49789if test $pkg_failed = yes; then
49790
49791if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49792        _pkg_short_errors_supported=yes
49793else
49794        _pkg_short_errors_supported=no
49795fi
49796        if test $_pkg_short_errors_supported = yes; then
49797	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
49798        else
49799	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
49800        fi
49801	# Put the nasty error message in config.log where it belongs
49802	echo "$LIBFFI_PKG_ERRORS" >&5
49803
49804	as_fn_error $? "Package requirements (libffi) were not met:
49805
49806$LIBFFI_PKG_ERRORS
49807
49808Consider adjusting the PKG_CONFIG_PATH environment variable if you
49809installed software in a non-standard prefix.
49810
49811Alternatively, you may set the environment variables LIBFFI_CFLAGS
49812and LIBFFI_LIBS to avoid the need to call pkg-config.
49813See the pkg-config man page for more details.
49814" "$LINENO" 5
49815elif test $pkg_failed = untried; then
49816	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
49817$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
49818as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
49819is in your PATH or set the PKG_CONFIG environment variable to the full
49820path to pkg-config.
49821
49822Alternatively, you may set the environment variables LIBFFI_CFLAGS
49823and LIBFFI_LIBS to avoid the need to call pkg-config.
49824See the pkg-config man page for more details.
49825
49826To get pkg-config, see <http://pkg-config.freedesktop.org/>.
49827See \`config.log' for more details" "$LINENO" 5; }
49828else
49829	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
49830	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
49831        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49832$as_echo "yes" >&6; }
49833	:
49834fi
49835
49836  fi
49837
49838  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49839    # Extract the first word of "llvm-config", so it can be a program name with args.
49840set dummy llvm-config; ac_word=$2
49841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
49842$as_echo_n "checking for $ac_word... " >&6; }
49843if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
49844  $as_echo_n "(cached) " >&6
49845else
49846  if test -n "$LLVM_CONFIG"; then
49847  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
49848else
49849as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49850for as_dir in $PATH
49851do
49852  IFS=$as_save_IFS
49853  test -z "$as_dir" && as_dir=.
49854    for ac_exec_ext in '' $ac_executable_extensions; do
49855  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
49856    ac_cv_prog_LLVM_CONFIG="llvm-config"
49857    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
49858    break 2
49859  fi
49860done
49861  done
49862IFS=$as_save_IFS
49863
49864fi
49865fi
49866LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
49867if test -n "$LLVM_CONFIG"; then
49868  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
49869$as_echo "$LLVM_CONFIG" >&6; }
49870else
49871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49872$as_echo "no" >&6; }
49873fi
49874
49875
49876
49877    if test "x$LLVM_CONFIG" != xllvm-config; then
49878      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
49879    fi
49880
49881    llvm_components="jit mcjit engine nativecodegen native"
49882    unset LLVM_CFLAGS
49883    for flag in $("$LLVM_CONFIG" --cxxflags); do
49884      if echo "${flag}" | grep -q '^-[ID]'; then
49885        if test "${flag}" != "-D_DEBUG" ; then
49886          if test "${LLVM_CFLAGS}" != "" ; then
49887            LLVM_CFLAGS="${LLVM_CFLAGS} "
49888          fi
49889          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
49890        fi
49891      fi
49892    done
49893    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
49894    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
49895
49896    unset LLVM_LDFLAGS
49897    for flag in $("${LLVM_CONFIG}" --ldflags); do
49898      if echo "${flag}" | grep -q '^-L'; then
49899        if test "${LLVM_LDFLAGS}" != ""; then
49900          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
49901        fi
49902        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
49903      fi
49904    done
49905
49906    unset LLVM_LIBS
49907    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
49908      if echo "${flag}" | grep -q '^-l'; then
49909        if test "${LLVM_LIBS}" != ""; then
49910          LLVM_LIBS="${LLVM_LIBS} "
49911        fi
49912        LLVM_LIBS="${LLVM_LIBS}${flag}"
49913      fi
49914    done
49915
49916
49917
49918
49919  fi
49920
49921  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
49922  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
49923    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
49924  fi
49925
49926  # TODO better (platform agnostic) test
49927  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
49928    LIBCXX="-lstdc++"
49929  fi
49930
49931
49932
49933
49934  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
49935
49936
49937# Check whether --with-msvcr-dll was given.
49938if test "${with_msvcr_dll+set}" = set; then :
49939  withval=$with_msvcr_dll;
49940fi
49941
49942
49943  if test "x$with_msvcr_dll" != x; then
49944    # If given explicitely by user, do not probe. If not present, fail directly.
49945
49946  DLL_NAME="$MSVCR_NAME"
49947  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
49948  METHOD="--with-msvcr-dll"
49949  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49950    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49951$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49952
49953    # Need to check if the found msvcr is correct architecture
49954    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49955$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49956    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49957    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49958      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49959      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49960      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49961        CORRECT_MSVCR_ARCH="PE32 executable"
49962      else
49963        CORRECT_MSVCR_ARCH="PE32+ executable"
49964      fi
49965    else
49966      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49967        CORRECT_MSVCR_ARCH=386
49968      else
49969        CORRECT_MSVCR_ARCH=x86-64
49970      fi
49971    fi
49972    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49973      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49974$as_echo "ok" >&6; }
49975      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49976
49977  # Only process if variable expands to non-empty
49978
49979  if test "x$MSVC_DLL" != x; then
49980    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49981
49982  # Input might be given as Windows format, start by converting to
49983  # unix format.
49984  path="$MSVC_DLL"
49985  new_path=`$CYGPATH -u "$path"`
49986
49987  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49988  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49989  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49990  # "foo.exe" is OK but "foo" is an error.
49991  #
49992  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49993  # It is also a way to make sure we got the proper file name for the real test later on.
49994  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49995  if test "x$test_shortpath" = x; then
49996    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49997$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49998    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49999  fi
50000
50001  # Call helper function which possibly converts this using DOS-style short mode.
50002  # If so, the updated path is stored in $new_path.
50003
50004  input_path="$new_path"
50005  # Check if we need to convert this using DOS-style short mode. If the path
50006  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50007  # take no chances and rewrite it.
50008  # Note: m4 eats our [], so we need to use [ and ] instead.
50009  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50010  if test "x$has_forbidden_chars" != x; then
50011    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50012    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50013    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50014    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50015      # Going to short mode and back again did indeed matter. Since short mode is
50016      # case insensitive, let's make it lowercase to improve readability.
50017      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50018      # Now convert it back to Unix-style (cygpath)
50019      input_path=`$CYGPATH -u "$shortmode_path"`
50020      new_path="$input_path"
50021    fi
50022  fi
50023
50024  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50025  if test "x$test_cygdrive_prefix" = x; then
50026    # As a simple fix, exclude /usr/bin since it's not a real path.
50027    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50028      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50029      # a path prefixed by /cygdrive for fixpath to work.
50030      new_path="$CYGWIN_ROOT_PATH$input_path"
50031    fi
50032  fi
50033
50034
50035  if test "x$path" != "x$new_path"; then
50036    MSVC_DLL="$new_path"
50037    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50038$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50039  fi
50040
50041    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50042
50043  path="$MSVC_DLL"
50044  has_colon=`$ECHO $path | $GREP ^.:`
50045  new_path="$path"
50046  if test "x$has_colon" = x; then
50047    # Not in mixed or Windows style, start by that.
50048    new_path=`cmd //c echo $path`
50049  fi
50050
50051
50052  input_path="$new_path"
50053  # Check if we need to convert this using DOS-style short mode. If the path
50054  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50055  # take no chances and rewrite it.
50056  # Note: m4 eats our [], so we need to use [ and ] instead.
50057  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50058  if test "x$has_forbidden_chars" != x; then
50059    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50060    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50061  fi
50062
50063
50064  windows_path="$new_path"
50065  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50066    unix_path=`$CYGPATH -u "$windows_path"`
50067    new_path="$unix_path"
50068  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50069    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50070    new_path="$unix_path"
50071  fi
50072
50073  if test "x$path" != "x$new_path"; then
50074    MSVC_DLL="$new_path"
50075    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50076$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50077  fi
50078
50079  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50080  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50081
50082    else
50083      # We're on a unix platform. Hooray! :)
50084      path="$MSVC_DLL"
50085      has_space=`$ECHO "$path" | $GREP " "`
50086      if test "x$has_space" != x; then
50087        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50088$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50089        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50090      fi
50091
50092      # Use eval to expand a potential ~
50093      eval path="$path"
50094      if test ! -f "$path" && test ! -d "$path"; then
50095        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50096      fi
50097
50098      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50099    fi
50100  fi
50101
50102      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50103$as_echo_n "checking for $DLL_NAME... " >&6; }
50104      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50105$as_echo "$MSVC_DLL" >&6; }
50106    else
50107      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50108$as_echo "incorrect, ignoring" >&6; }
50109      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50110$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50111    fi
50112  fi
50113
50114    if test "x$MSVC_DLL" = x; then
50115      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
50116    fi
50117    MSVCR_DLL="$MSVC_DLL"
50118  elif test "x$DEVKIT_MSVCR_DLL" != x; then
50119
50120  DLL_NAME="$MSVCR_NAME"
50121  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
50122  METHOD="devkit"
50123  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50124    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50125$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50126
50127    # Need to check if the found msvcr is correct architecture
50128    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50129$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50130    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50131    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50132      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50133      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50134      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50135        CORRECT_MSVCR_ARCH="PE32 executable"
50136      else
50137        CORRECT_MSVCR_ARCH="PE32+ executable"
50138      fi
50139    else
50140      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50141        CORRECT_MSVCR_ARCH=386
50142      else
50143        CORRECT_MSVCR_ARCH=x86-64
50144      fi
50145    fi
50146    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50147      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50148$as_echo "ok" >&6; }
50149      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50150
50151  # Only process if variable expands to non-empty
50152
50153  if test "x$MSVC_DLL" != x; then
50154    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50155
50156  # Input might be given as Windows format, start by converting to
50157  # unix format.
50158  path="$MSVC_DLL"
50159  new_path=`$CYGPATH -u "$path"`
50160
50161  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50162  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50163  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50164  # "foo.exe" is OK but "foo" is an error.
50165  #
50166  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50167  # It is also a way to make sure we got the proper file name for the real test later on.
50168  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50169  if test "x$test_shortpath" = x; then
50170    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50171$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50172    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50173  fi
50174
50175  # Call helper function which possibly converts this using DOS-style short mode.
50176  # If so, the updated path is stored in $new_path.
50177
50178  input_path="$new_path"
50179  # Check if we need to convert this using DOS-style short mode. If the path
50180  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50181  # take no chances and rewrite it.
50182  # Note: m4 eats our [], so we need to use [ and ] instead.
50183  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50184  if test "x$has_forbidden_chars" != x; then
50185    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50186    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50187    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50188    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50189      # Going to short mode and back again did indeed matter. Since short mode is
50190      # case insensitive, let's make it lowercase to improve readability.
50191      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50192      # Now convert it back to Unix-style (cygpath)
50193      input_path=`$CYGPATH -u "$shortmode_path"`
50194      new_path="$input_path"
50195    fi
50196  fi
50197
50198  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50199  if test "x$test_cygdrive_prefix" = x; then
50200    # As a simple fix, exclude /usr/bin since it's not a real path.
50201    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50202      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50203      # a path prefixed by /cygdrive for fixpath to work.
50204      new_path="$CYGWIN_ROOT_PATH$input_path"
50205    fi
50206  fi
50207
50208
50209  if test "x$path" != "x$new_path"; then
50210    MSVC_DLL="$new_path"
50211    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50212$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50213  fi
50214
50215    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50216
50217  path="$MSVC_DLL"
50218  has_colon=`$ECHO $path | $GREP ^.:`
50219  new_path="$path"
50220  if test "x$has_colon" = x; then
50221    # Not in mixed or Windows style, start by that.
50222    new_path=`cmd //c echo $path`
50223  fi
50224
50225
50226  input_path="$new_path"
50227  # Check if we need to convert this using DOS-style short mode. If the path
50228  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50229  # take no chances and rewrite it.
50230  # Note: m4 eats our [], so we need to use [ and ] instead.
50231  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50232  if test "x$has_forbidden_chars" != x; then
50233    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50234    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50235  fi
50236
50237
50238  windows_path="$new_path"
50239  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50240    unix_path=`$CYGPATH -u "$windows_path"`
50241    new_path="$unix_path"
50242  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50243    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50244    new_path="$unix_path"
50245  fi
50246
50247  if test "x$path" != "x$new_path"; then
50248    MSVC_DLL="$new_path"
50249    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50250$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50251  fi
50252
50253  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50254  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50255
50256    else
50257      # We're on a unix platform. Hooray! :)
50258      path="$MSVC_DLL"
50259      has_space=`$ECHO "$path" | $GREP " "`
50260      if test "x$has_space" != x; then
50261        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50262$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50263        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50264      fi
50265
50266      # Use eval to expand a potential ~
50267      eval path="$path"
50268      if test ! -f "$path" && test ! -d "$path"; then
50269        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50270      fi
50271
50272      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50273    fi
50274  fi
50275
50276      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50277$as_echo_n "checking for $DLL_NAME... " >&6; }
50278      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50279$as_echo "$MSVC_DLL" >&6; }
50280    else
50281      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50282$as_echo "incorrect, ignoring" >&6; }
50283      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50284$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50285    fi
50286  fi
50287
50288    if test "x$MSVC_DLL" = x; then
50289      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
50290    fi
50291    MSVCR_DLL="$MSVC_DLL"
50292  else
50293
50294  DLL_NAME="${MSVCR_NAME}"
50295  MSVC_DLL=
50296
50297  if test "x$MSVC_DLL" = x; then
50298    # Probe: Using well-known location from Visual Studio 10.0
50299    if test "x$VCINSTALLDIR" != x; then
50300      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
50301
50302  windows_path="$CYGWIN_VC_INSTALL_DIR"
50303  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50304    unix_path=`$CYGPATH -u "$windows_path"`
50305    CYGWIN_VC_INSTALL_DIR="$unix_path"
50306  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50307    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50308    CYGWIN_VC_INSTALL_DIR="$unix_path"
50309  fi
50310
50311      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50312        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
50313      else
50314        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
50315      fi
50316      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
50317
50318  DLL_NAME="$DLL_NAME"
50319  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50320  METHOD="well-known location in VCINSTALLDIR"
50321  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50322    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50323$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50324
50325    # Need to check if the found msvcr is correct architecture
50326    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50327$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50328    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50329    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50330      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50331      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50332      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50333        CORRECT_MSVCR_ARCH="PE32 executable"
50334      else
50335        CORRECT_MSVCR_ARCH="PE32+ executable"
50336      fi
50337    else
50338      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50339        CORRECT_MSVCR_ARCH=386
50340      else
50341        CORRECT_MSVCR_ARCH=x86-64
50342      fi
50343    fi
50344    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50345      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50346$as_echo "ok" >&6; }
50347      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50348
50349  # Only process if variable expands to non-empty
50350
50351  if test "x$MSVC_DLL" != x; then
50352    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50353
50354  # Input might be given as Windows format, start by converting to
50355  # unix format.
50356  path="$MSVC_DLL"
50357  new_path=`$CYGPATH -u "$path"`
50358
50359  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50360  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50361  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50362  # "foo.exe" is OK but "foo" is an error.
50363  #
50364  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50365  # It is also a way to make sure we got the proper file name for the real test later on.
50366  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50367  if test "x$test_shortpath" = x; then
50368    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50369$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50370    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50371  fi
50372
50373  # Call helper function which possibly converts this using DOS-style short mode.
50374  # If so, the updated path is stored in $new_path.
50375
50376  input_path="$new_path"
50377  # Check if we need to convert this using DOS-style short mode. If the path
50378  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50379  # take no chances and rewrite it.
50380  # Note: m4 eats our [], so we need to use [ and ] instead.
50381  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50382  if test "x$has_forbidden_chars" != x; then
50383    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50384    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50385    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50386    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50387      # Going to short mode and back again did indeed matter. Since short mode is
50388      # case insensitive, let's make it lowercase to improve readability.
50389      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50390      # Now convert it back to Unix-style (cygpath)
50391      input_path=`$CYGPATH -u "$shortmode_path"`
50392      new_path="$input_path"
50393    fi
50394  fi
50395
50396  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50397  if test "x$test_cygdrive_prefix" = x; then
50398    # As a simple fix, exclude /usr/bin since it's not a real path.
50399    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50400      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50401      # a path prefixed by /cygdrive for fixpath to work.
50402      new_path="$CYGWIN_ROOT_PATH$input_path"
50403    fi
50404  fi
50405
50406
50407  if test "x$path" != "x$new_path"; then
50408    MSVC_DLL="$new_path"
50409    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50410$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50411  fi
50412
50413    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50414
50415  path="$MSVC_DLL"
50416  has_colon=`$ECHO $path | $GREP ^.:`
50417  new_path="$path"
50418  if test "x$has_colon" = x; then
50419    # Not in mixed or Windows style, start by that.
50420    new_path=`cmd //c echo $path`
50421  fi
50422
50423
50424  input_path="$new_path"
50425  # Check if we need to convert this using DOS-style short mode. If the path
50426  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50427  # take no chances and rewrite it.
50428  # Note: m4 eats our [], so we need to use [ and ] instead.
50429  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50430  if test "x$has_forbidden_chars" != x; then
50431    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50432    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50433  fi
50434
50435
50436  windows_path="$new_path"
50437  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50438    unix_path=`$CYGPATH -u "$windows_path"`
50439    new_path="$unix_path"
50440  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50441    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50442    new_path="$unix_path"
50443  fi
50444
50445  if test "x$path" != "x$new_path"; then
50446    MSVC_DLL="$new_path"
50447    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50448$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50449  fi
50450
50451  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50452  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50453
50454    else
50455      # We're on a unix platform. Hooray! :)
50456      path="$MSVC_DLL"
50457      has_space=`$ECHO "$path" | $GREP " "`
50458      if test "x$has_space" != x; then
50459        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50460$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50461        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50462      fi
50463
50464      # Use eval to expand a potential ~
50465      eval path="$path"
50466      if test ! -f "$path" && test ! -d "$path"; then
50467        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50468      fi
50469
50470      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50471    fi
50472  fi
50473
50474      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50475$as_echo_n "checking for $DLL_NAME... " >&6; }
50476      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50477$as_echo "$MSVC_DLL" >&6; }
50478    else
50479      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50480$as_echo "incorrect, ignoring" >&6; }
50481      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50482$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50483    fi
50484  fi
50485
50486    fi
50487  fi
50488
50489  if test "x$MSVC_DLL" = x; then
50490    # Probe: Check in the Boot JDK directory.
50491    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
50492
50493  DLL_NAME="$DLL_NAME"
50494  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50495  METHOD="well-known location in Boot JDK"
50496  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50497    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50498$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50499
50500    # Need to check if the found msvcr is correct architecture
50501    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50502$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50503    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50504    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50505      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50506      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50507      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50508        CORRECT_MSVCR_ARCH="PE32 executable"
50509      else
50510        CORRECT_MSVCR_ARCH="PE32+ executable"
50511      fi
50512    else
50513      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50514        CORRECT_MSVCR_ARCH=386
50515      else
50516        CORRECT_MSVCR_ARCH=x86-64
50517      fi
50518    fi
50519    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50520      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50521$as_echo "ok" >&6; }
50522      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50523
50524  # Only process if variable expands to non-empty
50525
50526  if test "x$MSVC_DLL" != x; then
50527    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50528
50529  # Input might be given as Windows format, start by converting to
50530  # unix format.
50531  path="$MSVC_DLL"
50532  new_path=`$CYGPATH -u "$path"`
50533
50534  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50535  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50536  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50537  # "foo.exe" is OK but "foo" is an error.
50538  #
50539  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50540  # It is also a way to make sure we got the proper file name for the real test later on.
50541  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50542  if test "x$test_shortpath" = x; then
50543    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50544$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50545    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50546  fi
50547
50548  # Call helper function which possibly converts this using DOS-style short mode.
50549  # If so, the updated path is stored in $new_path.
50550
50551  input_path="$new_path"
50552  # Check if we need to convert this using DOS-style short mode. If the path
50553  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50554  # take no chances and rewrite it.
50555  # Note: m4 eats our [], so we need to use [ and ] instead.
50556  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50557  if test "x$has_forbidden_chars" != x; then
50558    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50559    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50560    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50561    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50562      # Going to short mode and back again did indeed matter. Since short mode is
50563      # case insensitive, let's make it lowercase to improve readability.
50564      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50565      # Now convert it back to Unix-style (cygpath)
50566      input_path=`$CYGPATH -u "$shortmode_path"`
50567      new_path="$input_path"
50568    fi
50569  fi
50570
50571  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50572  if test "x$test_cygdrive_prefix" = x; then
50573    # As a simple fix, exclude /usr/bin since it's not a real path.
50574    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50575      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50576      # a path prefixed by /cygdrive for fixpath to work.
50577      new_path="$CYGWIN_ROOT_PATH$input_path"
50578    fi
50579  fi
50580
50581
50582  if test "x$path" != "x$new_path"; then
50583    MSVC_DLL="$new_path"
50584    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50585$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50586  fi
50587
50588    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50589
50590  path="$MSVC_DLL"
50591  has_colon=`$ECHO $path | $GREP ^.:`
50592  new_path="$path"
50593  if test "x$has_colon" = x; then
50594    # Not in mixed or Windows style, start by that.
50595    new_path=`cmd //c echo $path`
50596  fi
50597
50598
50599  input_path="$new_path"
50600  # Check if we need to convert this using DOS-style short mode. If the path
50601  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50602  # take no chances and rewrite it.
50603  # Note: m4 eats our [], so we need to use [ and ] instead.
50604  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50605  if test "x$has_forbidden_chars" != x; then
50606    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50607    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50608  fi
50609
50610
50611  windows_path="$new_path"
50612  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50613    unix_path=`$CYGPATH -u "$windows_path"`
50614    new_path="$unix_path"
50615  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50616    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50617    new_path="$unix_path"
50618  fi
50619
50620  if test "x$path" != "x$new_path"; then
50621    MSVC_DLL="$new_path"
50622    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50623$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50624  fi
50625
50626  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50627  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50628
50629    else
50630      # We're on a unix platform. Hooray! :)
50631      path="$MSVC_DLL"
50632      has_space=`$ECHO "$path" | $GREP " "`
50633      if test "x$has_space" != x; then
50634        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50635$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50636        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50637      fi
50638
50639      # Use eval to expand a potential ~
50640      eval path="$path"
50641      if test ! -f "$path" && test ! -d "$path"; then
50642        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50643      fi
50644
50645      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50646    fi
50647  fi
50648
50649      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50650$as_echo_n "checking for $DLL_NAME... " >&6; }
50651      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50652$as_echo "$MSVC_DLL" >&6; }
50653    else
50654      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50655$as_echo "incorrect, ignoring" >&6; }
50656      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50657$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50658    fi
50659  fi
50660
50661  fi
50662
50663  if test "x$MSVC_DLL" = x; then
50664    # Probe: Look in the Windows system32 directory
50665    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
50666
50667  windows_path="$CYGWIN_SYSTEMROOT"
50668  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50669    unix_path=`$CYGPATH -u "$windows_path"`
50670    CYGWIN_SYSTEMROOT="$unix_path"
50671  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50672    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50673    CYGWIN_SYSTEMROOT="$unix_path"
50674  fi
50675
50676    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
50677
50678  DLL_NAME="$DLL_NAME"
50679  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50680  METHOD="well-known location in SYSTEMROOT"
50681  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50682    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50683$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50684
50685    # Need to check if the found msvcr is correct architecture
50686    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50687$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50688    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50689    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50690      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50691      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50692      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50693        CORRECT_MSVCR_ARCH="PE32 executable"
50694      else
50695        CORRECT_MSVCR_ARCH="PE32+ executable"
50696      fi
50697    else
50698      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50699        CORRECT_MSVCR_ARCH=386
50700      else
50701        CORRECT_MSVCR_ARCH=x86-64
50702      fi
50703    fi
50704    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50705      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50706$as_echo "ok" >&6; }
50707      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50708
50709  # Only process if variable expands to non-empty
50710
50711  if test "x$MSVC_DLL" != x; then
50712    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50713
50714  # Input might be given as Windows format, start by converting to
50715  # unix format.
50716  path="$MSVC_DLL"
50717  new_path=`$CYGPATH -u "$path"`
50718
50719  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50720  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50721  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50722  # "foo.exe" is OK but "foo" is an error.
50723  #
50724  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50725  # It is also a way to make sure we got the proper file name for the real test later on.
50726  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50727  if test "x$test_shortpath" = x; then
50728    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50729$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50730    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50731  fi
50732
50733  # Call helper function which possibly converts this using DOS-style short mode.
50734  # If so, the updated path is stored in $new_path.
50735
50736  input_path="$new_path"
50737  # Check if we need to convert this using DOS-style short mode. If the path
50738  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50739  # take no chances and rewrite it.
50740  # Note: m4 eats our [], so we need to use [ and ] instead.
50741  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50742  if test "x$has_forbidden_chars" != x; then
50743    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50744    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50745    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50746    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50747      # Going to short mode and back again did indeed matter. Since short mode is
50748      # case insensitive, let's make it lowercase to improve readability.
50749      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50750      # Now convert it back to Unix-style (cygpath)
50751      input_path=`$CYGPATH -u "$shortmode_path"`
50752      new_path="$input_path"
50753    fi
50754  fi
50755
50756  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50757  if test "x$test_cygdrive_prefix" = x; then
50758    # As a simple fix, exclude /usr/bin since it's not a real path.
50759    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50760      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50761      # a path prefixed by /cygdrive for fixpath to work.
50762      new_path="$CYGWIN_ROOT_PATH$input_path"
50763    fi
50764  fi
50765
50766
50767  if test "x$path" != "x$new_path"; then
50768    MSVC_DLL="$new_path"
50769    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50770$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50771  fi
50772
50773    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50774
50775  path="$MSVC_DLL"
50776  has_colon=`$ECHO $path | $GREP ^.:`
50777  new_path="$path"
50778  if test "x$has_colon" = x; then
50779    # Not in mixed or Windows style, start by that.
50780    new_path=`cmd //c echo $path`
50781  fi
50782
50783
50784  input_path="$new_path"
50785  # Check if we need to convert this using DOS-style short mode. If the path
50786  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50787  # take no chances and rewrite it.
50788  # Note: m4 eats our [], so we need to use [ and ] instead.
50789  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50790  if test "x$has_forbidden_chars" != x; then
50791    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50792    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50793  fi
50794
50795
50796  windows_path="$new_path"
50797  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50798    unix_path=`$CYGPATH -u "$windows_path"`
50799    new_path="$unix_path"
50800  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50801    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50802    new_path="$unix_path"
50803  fi
50804
50805  if test "x$path" != "x$new_path"; then
50806    MSVC_DLL="$new_path"
50807    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50808$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50809  fi
50810
50811  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50812  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50813
50814    else
50815      # We're on a unix platform. Hooray! :)
50816      path="$MSVC_DLL"
50817      has_space=`$ECHO "$path" | $GREP " "`
50818      if test "x$has_space" != x; then
50819        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50820$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50821        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50822      fi
50823
50824      # Use eval to expand a potential ~
50825      eval path="$path"
50826      if test ! -f "$path" && test ! -d "$path"; then
50827        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50828      fi
50829
50830      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50831    fi
50832  fi
50833
50834      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50835$as_echo_n "checking for $DLL_NAME... " >&6; }
50836      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50837$as_echo "$MSVC_DLL" >&6; }
50838    else
50839      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50840$as_echo "incorrect, ignoring" >&6; }
50841      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50842$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50843    fi
50844  fi
50845
50846  fi
50847
50848  if test "x$MSVC_DLL" = x; then
50849    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
50850    if test "x$VS100COMNTOOLS" != x; then
50851      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
50852
50853  windows_path="$CYGWIN_VS_TOOLS_DIR"
50854  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50855    unix_path=`$CYGPATH -u "$windows_path"`
50856    CYGWIN_VS_TOOLS_DIR="$unix_path"
50857  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50858    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50859    CYGWIN_VS_TOOLS_DIR="$unix_path"
50860  fi
50861
50862      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50863        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50864	    | $GREP -i /x64/ | $HEAD --lines 1`
50865      else
50866        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50867	    | $GREP -i /x86/ | $HEAD --lines 1`
50868      fi
50869
50870  DLL_NAME="$DLL_NAME"
50871  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50872  METHOD="search of VS100COMNTOOLS"
50873  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50874    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50875$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50876
50877    # Need to check if the found msvcr is correct architecture
50878    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50879$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50880    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50881    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50882      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50883      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50884      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50885        CORRECT_MSVCR_ARCH="PE32 executable"
50886      else
50887        CORRECT_MSVCR_ARCH="PE32+ executable"
50888      fi
50889    else
50890      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50891        CORRECT_MSVCR_ARCH=386
50892      else
50893        CORRECT_MSVCR_ARCH=x86-64
50894      fi
50895    fi
50896    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50897      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50898$as_echo "ok" >&6; }
50899      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50900
50901  # Only process if variable expands to non-empty
50902
50903  if test "x$MSVC_DLL" != x; then
50904    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50905
50906  # Input might be given as Windows format, start by converting to
50907  # unix format.
50908  path="$MSVC_DLL"
50909  new_path=`$CYGPATH -u "$path"`
50910
50911  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50912  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50913  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50914  # "foo.exe" is OK but "foo" is an error.
50915  #
50916  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50917  # It is also a way to make sure we got the proper file name for the real test later on.
50918  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50919  if test "x$test_shortpath" = x; then
50920    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50921$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50922    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50923  fi
50924
50925  # Call helper function which possibly converts this using DOS-style short mode.
50926  # If so, the updated path is stored in $new_path.
50927
50928  input_path="$new_path"
50929  # Check if we need to convert this using DOS-style short mode. If the path
50930  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50931  # take no chances and rewrite it.
50932  # Note: m4 eats our [], so we need to use [ and ] instead.
50933  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50934  if test "x$has_forbidden_chars" != x; then
50935    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50936    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50937    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50938    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50939      # Going to short mode and back again did indeed matter. Since short mode is
50940      # case insensitive, let's make it lowercase to improve readability.
50941      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50942      # Now convert it back to Unix-style (cygpath)
50943      input_path=`$CYGPATH -u "$shortmode_path"`
50944      new_path="$input_path"
50945    fi
50946  fi
50947
50948  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50949  if test "x$test_cygdrive_prefix" = x; then
50950    # As a simple fix, exclude /usr/bin since it's not a real path.
50951    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50952      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50953      # a path prefixed by /cygdrive for fixpath to work.
50954      new_path="$CYGWIN_ROOT_PATH$input_path"
50955    fi
50956  fi
50957
50958
50959  if test "x$path" != "x$new_path"; then
50960    MSVC_DLL="$new_path"
50961    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50962$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50963  fi
50964
50965    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50966
50967  path="$MSVC_DLL"
50968  has_colon=`$ECHO $path | $GREP ^.:`
50969  new_path="$path"
50970  if test "x$has_colon" = x; then
50971    # Not in mixed or Windows style, start by that.
50972    new_path=`cmd //c echo $path`
50973  fi
50974
50975
50976  input_path="$new_path"
50977  # Check if we need to convert this using DOS-style short mode. If the path
50978  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50979  # take no chances and rewrite it.
50980  # Note: m4 eats our [], so we need to use [ and ] instead.
50981  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50982  if test "x$has_forbidden_chars" != x; then
50983    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50984    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50985  fi
50986
50987
50988  windows_path="$new_path"
50989  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50990    unix_path=`$CYGPATH -u "$windows_path"`
50991    new_path="$unix_path"
50992  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50993    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50994    new_path="$unix_path"
50995  fi
50996
50997  if test "x$path" != "x$new_path"; then
50998    MSVC_DLL="$new_path"
50999    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51000$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51001  fi
51002
51003  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51004  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51005
51006    else
51007      # We're on a unix platform. Hooray! :)
51008      path="$MSVC_DLL"
51009      has_space=`$ECHO "$path" | $GREP " "`
51010      if test "x$has_space" != x; then
51011        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51012$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51013        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51014      fi
51015
51016      # Use eval to expand a potential ~
51017      eval path="$path"
51018      if test ! -f "$path" && test ! -d "$path"; then
51019        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51020      fi
51021
51022      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51023    fi
51024  fi
51025
51026      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51027$as_echo_n "checking for $DLL_NAME... " >&6; }
51028      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51029$as_echo "$MSVC_DLL" >&6; }
51030    else
51031      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51032$as_echo "incorrect, ignoring" >&6; }
51033      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51034$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51035    fi
51036  fi
51037
51038    fi
51039  fi
51040
51041  if test "x$MSVC_DLL" = x; then
51042    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
51043    # (This was the original behaviour; kept since it might turn something up)
51044    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
51045      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51046        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
51047	    | $GREP x64 | $HEAD --lines 1`
51048      else
51049        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
51050	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
51051        if test "x$POSSIBLE_MSVC_DLL" = x; then
51052          # We're grasping at straws now...
51053          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
51054	      | $HEAD --lines 1`
51055        fi
51056      fi
51057
51058
51059  DLL_NAME="$DLL_NAME"
51060  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51061  METHOD="search of VCINSTALLDIR"
51062  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51063    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51064$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51065
51066    # Need to check if the found msvcr is correct architecture
51067    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51068$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51069    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51070    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51071      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51072      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51073      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51074        CORRECT_MSVCR_ARCH="PE32 executable"
51075      else
51076        CORRECT_MSVCR_ARCH="PE32+ executable"
51077      fi
51078    else
51079      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51080        CORRECT_MSVCR_ARCH=386
51081      else
51082        CORRECT_MSVCR_ARCH=x86-64
51083      fi
51084    fi
51085    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51086      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51087$as_echo "ok" >&6; }
51088      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51089
51090  # Only process if variable expands to non-empty
51091
51092  if test "x$MSVC_DLL" != x; then
51093    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51094
51095  # Input might be given as Windows format, start by converting to
51096  # unix format.
51097  path="$MSVC_DLL"
51098  new_path=`$CYGPATH -u "$path"`
51099
51100  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51101  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51102  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51103  # "foo.exe" is OK but "foo" is an error.
51104  #
51105  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51106  # It is also a way to make sure we got the proper file name for the real test later on.
51107  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51108  if test "x$test_shortpath" = x; then
51109    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51110$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51111    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51112  fi
51113
51114  # Call helper function which possibly converts this using DOS-style short mode.
51115  # If so, the updated path is stored in $new_path.
51116
51117  input_path="$new_path"
51118  # Check if we need to convert this using DOS-style short mode. If the path
51119  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51120  # take no chances and rewrite it.
51121  # Note: m4 eats our [], so we need to use [ and ] instead.
51122  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51123  if test "x$has_forbidden_chars" != x; then
51124    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51125    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51126    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51127    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51128      # Going to short mode and back again did indeed matter. Since short mode is
51129      # case insensitive, let's make it lowercase to improve readability.
51130      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51131      # Now convert it back to Unix-style (cygpath)
51132      input_path=`$CYGPATH -u "$shortmode_path"`
51133      new_path="$input_path"
51134    fi
51135  fi
51136
51137  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51138  if test "x$test_cygdrive_prefix" = x; then
51139    # As a simple fix, exclude /usr/bin since it's not a real path.
51140    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51141      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51142      # a path prefixed by /cygdrive for fixpath to work.
51143      new_path="$CYGWIN_ROOT_PATH$input_path"
51144    fi
51145  fi
51146
51147
51148  if test "x$path" != "x$new_path"; then
51149    MSVC_DLL="$new_path"
51150    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51151$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51152  fi
51153
51154    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51155
51156  path="$MSVC_DLL"
51157  has_colon=`$ECHO $path | $GREP ^.:`
51158  new_path="$path"
51159  if test "x$has_colon" = x; then
51160    # Not in mixed or Windows style, start by that.
51161    new_path=`cmd //c echo $path`
51162  fi
51163
51164
51165  input_path="$new_path"
51166  # Check if we need to convert this using DOS-style short mode. If the path
51167  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51168  # take no chances and rewrite it.
51169  # Note: m4 eats our [], so we need to use [ and ] instead.
51170  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51171  if test "x$has_forbidden_chars" != x; then
51172    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51173    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51174  fi
51175
51176
51177  windows_path="$new_path"
51178  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51179    unix_path=`$CYGPATH -u "$windows_path"`
51180    new_path="$unix_path"
51181  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51182    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51183    new_path="$unix_path"
51184  fi
51185
51186  if test "x$path" != "x$new_path"; then
51187    MSVC_DLL="$new_path"
51188    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51189$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51190  fi
51191
51192  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51193  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51194
51195    else
51196      # We're on a unix platform. Hooray! :)
51197      path="$MSVC_DLL"
51198      has_space=`$ECHO "$path" | $GREP " "`
51199      if test "x$has_space" != x; then
51200        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51201$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51202        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51203      fi
51204
51205      # Use eval to expand a potential ~
51206      eval path="$path"
51207      if test ! -f "$path" && test ! -d "$path"; then
51208        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51209      fi
51210
51211      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51212    fi
51213  fi
51214
51215      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51216$as_echo_n "checking for $DLL_NAME... " >&6; }
51217      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51218$as_echo "$MSVC_DLL" >&6; }
51219    else
51220      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51221$as_echo "incorrect, ignoring" >&6; }
51222      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51223$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51224    fi
51225  fi
51226
51227    fi
51228  fi
51229
51230  if test "x$MSVC_DLL" = x; then
51231    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51232$as_echo_n "checking for $DLL_NAME... " >&6; }
51233    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51234$as_echo "no" >&6; }
51235    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
51236  fi
51237
51238    MSVCR_DLL="$MSVC_DLL"
51239  fi
51240
51241
51242
51243# Check whether --with-msvcp-dll was given.
51244if test "${with_msvcp_dll+set}" = set; then :
51245  withval=$with_msvcp_dll;
51246fi
51247
51248
51249  if test "x$MSVCP_NAME" != "x"; then
51250    if test "x$with_msvcp_dll" != x; then
51251      # If given explicitely by user, do not probe. If not present, fail directly.
51252
51253  DLL_NAME="$MSVCP_NAME"
51254  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
51255  METHOD="--with-msvcp-dll"
51256  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51257    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51258$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51259
51260    # Need to check if the found msvcr is correct architecture
51261    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51262$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51263    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51264    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51265      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51266      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51267      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51268        CORRECT_MSVCR_ARCH="PE32 executable"
51269      else
51270        CORRECT_MSVCR_ARCH="PE32+ executable"
51271      fi
51272    else
51273      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51274        CORRECT_MSVCR_ARCH=386
51275      else
51276        CORRECT_MSVCR_ARCH=x86-64
51277      fi
51278    fi
51279    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51280      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51281$as_echo "ok" >&6; }
51282      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51283
51284  # Only process if variable expands to non-empty
51285
51286  if test "x$MSVC_DLL" != x; then
51287    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51288
51289  # Input might be given as Windows format, start by converting to
51290  # unix format.
51291  path="$MSVC_DLL"
51292  new_path=`$CYGPATH -u "$path"`
51293
51294  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51295  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51296  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51297  # "foo.exe" is OK but "foo" is an error.
51298  #
51299  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51300  # It is also a way to make sure we got the proper file name for the real test later on.
51301  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51302  if test "x$test_shortpath" = x; then
51303    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51304$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51305    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51306  fi
51307
51308  # Call helper function which possibly converts this using DOS-style short mode.
51309  # If so, the updated path is stored in $new_path.
51310
51311  input_path="$new_path"
51312  # Check if we need to convert this using DOS-style short mode. If the path
51313  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51314  # take no chances and rewrite it.
51315  # Note: m4 eats our [], so we need to use [ and ] instead.
51316  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51317  if test "x$has_forbidden_chars" != x; then
51318    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51319    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51320    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51321    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51322      # Going to short mode and back again did indeed matter. Since short mode is
51323      # case insensitive, let's make it lowercase to improve readability.
51324      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51325      # Now convert it back to Unix-style (cygpath)
51326      input_path=`$CYGPATH -u "$shortmode_path"`
51327      new_path="$input_path"
51328    fi
51329  fi
51330
51331  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51332  if test "x$test_cygdrive_prefix" = x; then
51333    # As a simple fix, exclude /usr/bin since it's not a real path.
51334    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51335      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51336      # a path prefixed by /cygdrive for fixpath to work.
51337      new_path="$CYGWIN_ROOT_PATH$input_path"
51338    fi
51339  fi
51340
51341
51342  if test "x$path" != "x$new_path"; then
51343    MSVC_DLL="$new_path"
51344    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51345$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51346  fi
51347
51348    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51349
51350  path="$MSVC_DLL"
51351  has_colon=`$ECHO $path | $GREP ^.:`
51352  new_path="$path"
51353  if test "x$has_colon" = x; then
51354    # Not in mixed or Windows style, start by that.
51355    new_path=`cmd //c echo $path`
51356  fi
51357
51358
51359  input_path="$new_path"
51360  # Check if we need to convert this using DOS-style short mode. If the path
51361  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51362  # take no chances and rewrite it.
51363  # Note: m4 eats our [], so we need to use [ and ] instead.
51364  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51365  if test "x$has_forbidden_chars" != x; then
51366    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51367    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51368  fi
51369
51370
51371  windows_path="$new_path"
51372  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51373    unix_path=`$CYGPATH -u "$windows_path"`
51374    new_path="$unix_path"
51375  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51376    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51377    new_path="$unix_path"
51378  fi
51379
51380  if test "x$path" != "x$new_path"; then
51381    MSVC_DLL="$new_path"
51382    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51383$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51384  fi
51385
51386  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51387  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51388
51389    else
51390      # We're on a unix platform. Hooray! :)
51391      path="$MSVC_DLL"
51392      has_space=`$ECHO "$path" | $GREP " "`
51393      if test "x$has_space" != x; then
51394        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51395$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51396        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51397      fi
51398
51399      # Use eval to expand a potential ~
51400      eval path="$path"
51401      if test ! -f "$path" && test ! -d "$path"; then
51402        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51403      fi
51404
51405      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51406    fi
51407  fi
51408
51409      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51410$as_echo_n "checking for $DLL_NAME... " >&6; }
51411      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51412$as_echo "$MSVC_DLL" >&6; }
51413    else
51414      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51415$as_echo "incorrect, ignoring" >&6; }
51416      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51417$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51418    fi
51419  fi
51420
51421      if test "x$MSVC_DLL" = x; then
51422        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
51423      fi
51424      MSVCP_DLL="$MSVC_DLL"
51425    elif test "x$DEVKIT_MSVCP_DLL" != x; then
51426
51427  DLL_NAME="$MSVCP_NAME"
51428  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
51429  METHOD="devkit"
51430  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51431    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51432$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51433
51434    # Need to check if the found msvcr is correct architecture
51435    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51436$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51437    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51438    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51439      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51440      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51441      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51442        CORRECT_MSVCR_ARCH="PE32 executable"
51443      else
51444        CORRECT_MSVCR_ARCH="PE32+ executable"
51445      fi
51446    else
51447      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51448        CORRECT_MSVCR_ARCH=386
51449      else
51450        CORRECT_MSVCR_ARCH=x86-64
51451      fi
51452    fi
51453    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51454      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51455$as_echo "ok" >&6; }
51456      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51457
51458  # Only process if variable expands to non-empty
51459
51460  if test "x$MSVC_DLL" != x; then
51461    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51462
51463  # Input might be given as Windows format, start by converting to
51464  # unix format.
51465  path="$MSVC_DLL"
51466  new_path=`$CYGPATH -u "$path"`
51467
51468  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51469  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51470  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51471  # "foo.exe" is OK but "foo" is an error.
51472  #
51473  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51474  # It is also a way to make sure we got the proper file name for the real test later on.
51475  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51476  if test "x$test_shortpath" = x; then
51477    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51478$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51479    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51480  fi
51481
51482  # Call helper function which possibly converts this using DOS-style short mode.
51483  # If so, the updated path is stored in $new_path.
51484
51485  input_path="$new_path"
51486  # Check if we need to convert this using DOS-style short mode. If the path
51487  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51488  # take no chances and rewrite it.
51489  # Note: m4 eats our [], so we need to use [ and ] instead.
51490  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51491  if test "x$has_forbidden_chars" != x; then
51492    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51493    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51494    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51495    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51496      # Going to short mode and back again did indeed matter. Since short mode is
51497      # case insensitive, let's make it lowercase to improve readability.
51498      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51499      # Now convert it back to Unix-style (cygpath)
51500      input_path=`$CYGPATH -u "$shortmode_path"`
51501      new_path="$input_path"
51502    fi
51503  fi
51504
51505  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51506  if test "x$test_cygdrive_prefix" = x; then
51507    # As a simple fix, exclude /usr/bin since it's not a real path.
51508    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51509      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51510      # a path prefixed by /cygdrive for fixpath to work.
51511      new_path="$CYGWIN_ROOT_PATH$input_path"
51512    fi
51513  fi
51514
51515
51516  if test "x$path" != "x$new_path"; then
51517    MSVC_DLL="$new_path"
51518    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51519$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51520  fi
51521
51522    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51523
51524  path="$MSVC_DLL"
51525  has_colon=`$ECHO $path | $GREP ^.:`
51526  new_path="$path"
51527  if test "x$has_colon" = x; then
51528    # Not in mixed or Windows style, start by that.
51529    new_path=`cmd //c echo $path`
51530  fi
51531
51532
51533  input_path="$new_path"
51534  # Check if we need to convert this using DOS-style short mode. If the path
51535  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51536  # take no chances and rewrite it.
51537  # Note: m4 eats our [], so we need to use [ and ] instead.
51538  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51539  if test "x$has_forbidden_chars" != x; then
51540    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51541    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51542  fi
51543
51544
51545  windows_path="$new_path"
51546  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51547    unix_path=`$CYGPATH -u "$windows_path"`
51548    new_path="$unix_path"
51549  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51550    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51551    new_path="$unix_path"
51552  fi
51553
51554  if test "x$path" != "x$new_path"; then
51555    MSVC_DLL="$new_path"
51556    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51557$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51558  fi
51559
51560  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51561  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51562
51563    else
51564      # We're on a unix platform. Hooray! :)
51565      path="$MSVC_DLL"
51566      has_space=`$ECHO "$path" | $GREP " "`
51567      if test "x$has_space" != x; then
51568        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51569$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51570        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51571      fi
51572
51573      # Use eval to expand a potential ~
51574      eval path="$path"
51575      if test ! -f "$path" && test ! -d "$path"; then
51576        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51577      fi
51578
51579      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51580    fi
51581  fi
51582
51583      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51584$as_echo_n "checking for $DLL_NAME... " >&6; }
51585      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51586$as_echo "$MSVC_DLL" >&6; }
51587    else
51588      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51589$as_echo "incorrect, ignoring" >&6; }
51590      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51591$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51592    fi
51593  fi
51594
51595      if test "x$MSVC_DLL" = x; then
51596        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
51597      fi
51598      MSVCP_DLL="$MSVC_DLL"
51599    else
51600
51601  DLL_NAME="${MSVCP_NAME}"
51602  MSVC_DLL=
51603
51604  if test "x$MSVC_DLL" = x; then
51605    # Probe: Using well-known location from Visual Studio 10.0
51606    if test "x$VCINSTALLDIR" != x; then
51607      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
51608
51609  windows_path="$CYGWIN_VC_INSTALL_DIR"
51610  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51611    unix_path=`$CYGPATH -u "$windows_path"`
51612    CYGWIN_VC_INSTALL_DIR="$unix_path"
51613  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51614    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51615    CYGWIN_VC_INSTALL_DIR="$unix_path"
51616  fi
51617
51618      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51619        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
51620      else
51621        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
51622      fi
51623      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
51624
51625  DLL_NAME="$DLL_NAME"
51626  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51627  METHOD="well-known location in VCINSTALLDIR"
51628  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51629    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51630$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51631
51632    # Need to check if the found msvcr is correct architecture
51633    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51634$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51635    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51636    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51637      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51638      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51639      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51640        CORRECT_MSVCR_ARCH="PE32 executable"
51641      else
51642        CORRECT_MSVCR_ARCH="PE32+ executable"
51643      fi
51644    else
51645      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51646        CORRECT_MSVCR_ARCH=386
51647      else
51648        CORRECT_MSVCR_ARCH=x86-64
51649      fi
51650    fi
51651    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51652      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51653$as_echo "ok" >&6; }
51654      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51655
51656  # Only process if variable expands to non-empty
51657
51658  if test "x$MSVC_DLL" != x; then
51659    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51660
51661  # Input might be given as Windows format, start by converting to
51662  # unix format.
51663  path="$MSVC_DLL"
51664  new_path=`$CYGPATH -u "$path"`
51665
51666  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51667  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51668  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51669  # "foo.exe" is OK but "foo" is an error.
51670  #
51671  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51672  # It is also a way to make sure we got the proper file name for the real test later on.
51673  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51674  if test "x$test_shortpath" = x; then
51675    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51676$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51677    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51678  fi
51679
51680  # Call helper function which possibly converts this using DOS-style short mode.
51681  # If so, the updated path is stored in $new_path.
51682
51683  input_path="$new_path"
51684  # Check if we need to convert this using DOS-style short mode. If the path
51685  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51686  # take no chances and rewrite it.
51687  # Note: m4 eats our [], so we need to use [ and ] instead.
51688  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51689  if test "x$has_forbidden_chars" != x; then
51690    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51691    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51692    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51693    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51694      # Going to short mode and back again did indeed matter. Since short mode is
51695      # case insensitive, let's make it lowercase to improve readability.
51696      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51697      # Now convert it back to Unix-style (cygpath)
51698      input_path=`$CYGPATH -u "$shortmode_path"`
51699      new_path="$input_path"
51700    fi
51701  fi
51702
51703  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51704  if test "x$test_cygdrive_prefix" = x; then
51705    # As a simple fix, exclude /usr/bin since it's not a real path.
51706    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51707      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51708      # a path prefixed by /cygdrive for fixpath to work.
51709      new_path="$CYGWIN_ROOT_PATH$input_path"
51710    fi
51711  fi
51712
51713
51714  if test "x$path" != "x$new_path"; then
51715    MSVC_DLL="$new_path"
51716    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51717$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51718  fi
51719
51720    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51721
51722  path="$MSVC_DLL"
51723  has_colon=`$ECHO $path | $GREP ^.:`
51724  new_path="$path"
51725  if test "x$has_colon" = x; then
51726    # Not in mixed or Windows style, start by that.
51727    new_path=`cmd //c echo $path`
51728  fi
51729
51730
51731  input_path="$new_path"
51732  # Check if we need to convert this using DOS-style short mode. If the path
51733  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51734  # take no chances and rewrite it.
51735  # Note: m4 eats our [], so we need to use [ and ] instead.
51736  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51737  if test "x$has_forbidden_chars" != x; then
51738    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51739    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51740  fi
51741
51742
51743  windows_path="$new_path"
51744  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51745    unix_path=`$CYGPATH -u "$windows_path"`
51746    new_path="$unix_path"
51747  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51748    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51749    new_path="$unix_path"
51750  fi
51751
51752  if test "x$path" != "x$new_path"; then
51753    MSVC_DLL="$new_path"
51754    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51755$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51756  fi
51757
51758  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51759  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51760
51761    else
51762      # We're on a unix platform. Hooray! :)
51763      path="$MSVC_DLL"
51764      has_space=`$ECHO "$path" | $GREP " "`
51765      if test "x$has_space" != x; then
51766        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51767$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51768        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51769      fi
51770
51771      # Use eval to expand a potential ~
51772      eval path="$path"
51773      if test ! -f "$path" && test ! -d "$path"; then
51774        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51775      fi
51776
51777      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51778    fi
51779  fi
51780
51781      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51782$as_echo_n "checking for $DLL_NAME... " >&6; }
51783      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51784$as_echo "$MSVC_DLL" >&6; }
51785    else
51786      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51787$as_echo "incorrect, ignoring" >&6; }
51788      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51789$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51790    fi
51791  fi
51792
51793    fi
51794  fi
51795
51796  if test "x$MSVC_DLL" = x; then
51797    # Probe: Check in the Boot JDK directory.
51798    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
51799
51800  DLL_NAME="$DLL_NAME"
51801  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51802  METHOD="well-known location in Boot JDK"
51803  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51804    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51805$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51806
51807    # Need to check if the found msvcr is correct architecture
51808    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51809$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51810    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51811    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51812      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51813      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51814      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51815        CORRECT_MSVCR_ARCH="PE32 executable"
51816      else
51817        CORRECT_MSVCR_ARCH="PE32+ executable"
51818      fi
51819    else
51820      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51821        CORRECT_MSVCR_ARCH=386
51822      else
51823        CORRECT_MSVCR_ARCH=x86-64
51824      fi
51825    fi
51826    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51827      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51828$as_echo "ok" >&6; }
51829      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51830
51831  # Only process if variable expands to non-empty
51832
51833  if test "x$MSVC_DLL" != x; then
51834    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51835
51836  # Input might be given as Windows format, start by converting to
51837  # unix format.
51838  path="$MSVC_DLL"
51839  new_path=`$CYGPATH -u "$path"`
51840
51841  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51842  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51843  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51844  # "foo.exe" is OK but "foo" is an error.
51845  #
51846  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51847  # It is also a way to make sure we got the proper file name for the real test later on.
51848  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51849  if test "x$test_shortpath" = x; then
51850    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51851$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51852    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51853  fi
51854
51855  # Call helper function which possibly converts this using DOS-style short mode.
51856  # If so, the updated path is stored in $new_path.
51857
51858  input_path="$new_path"
51859  # Check if we need to convert this using DOS-style short mode. If the path
51860  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51861  # take no chances and rewrite it.
51862  # Note: m4 eats our [], so we need to use [ and ] instead.
51863  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51864  if test "x$has_forbidden_chars" != x; then
51865    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51866    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51867    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51868    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51869      # Going to short mode and back again did indeed matter. Since short mode is
51870      # case insensitive, let's make it lowercase to improve readability.
51871      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51872      # Now convert it back to Unix-style (cygpath)
51873      input_path=`$CYGPATH -u "$shortmode_path"`
51874      new_path="$input_path"
51875    fi
51876  fi
51877
51878  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51879  if test "x$test_cygdrive_prefix" = x; then
51880    # As a simple fix, exclude /usr/bin since it's not a real path.
51881    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51882      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51883      # a path prefixed by /cygdrive for fixpath to work.
51884      new_path="$CYGWIN_ROOT_PATH$input_path"
51885    fi
51886  fi
51887
51888
51889  if test "x$path" != "x$new_path"; then
51890    MSVC_DLL="$new_path"
51891    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51892$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51893  fi
51894
51895    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51896
51897  path="$MSVC_DLL"
51898  has_colon=`$ECHO $path | $GREP ^.:`
51899  new_path="$path"
51900  if test "x$has_colon" = x; then
51901    # Not in mixed or Windows style, start by that.
51902    new_path=`cmd //c echo $path`
51903  fi
51904
51905
51906  input_path="$new_path"
51907  # Check if we need to convert this using DOS-style short mode. If the path
51908  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51909  # take no chances and rewrite it.
51910  # Note: m4 eats our [], so we need to use [ and ] instead.
51911  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51912  if test "x$has_forbidden_chars" != x; then
51913    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51914    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51915  fi
51916
51917
51918  windows_path="$new_path"
51919  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51920    unix_path=`$CYGPATH -u "$windows_path"`
51921    new_path="$unix_path"
51922  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51923    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51924    new_path="$unix_path"
51925  fi
51926
51927  if test "x$path" != "x$new_path"; then
51928    MSVC_DLL="$new_path"
51929    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51930$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51931  fi
51932
51933  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51934  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51935
51936    else
51937      # We're on a unix platform. Hooray! :)
51938      path="$MSVC_DLL"
51939      has_space=`$ECHO "$path" | $GREP " "`
51940      if test "x$has_space" != x; then
51941        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51942$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51943        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51944      fi
51945
51946      # Use eval to expand a potential ~
51947      eval path="$path"
51948      if test ! -f "$path" && test ! -d "$path"; then
51949        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51950      fi
51951
51952      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51953    fi
51954  fi
51955
51956      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51957$as_echo_n "checking for $DLL_NAME... " >&6; }
51958      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51959$as_echo "$MSVC_DLL" >&6; }
51960    else
51961      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51962$as_echo "incorrect, ignoring" >&6; }
51963      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51964$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51965    fi
51966  fi
51967
51968  fi
51969
51970  if test "x$MSVC_DLL" = x; then
51971    # Probe: Look in the Windows system32 directory
51972    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
51973
51974  windows_path="$CYGWIN_SYSTEMROOT"
51975  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51976    unix_path=`$CYGPATH -u "$windows_path"`
51977    CYGWIN_SYSTEMROOT="$unix_path"
51978  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51979    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51980    CYGWIN_SYSTEMROOT="$unix_path"
51981  fi
51982
51983    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
51984
51985  DLL_NAME="$DLL_NAME"
51986  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51987  METHOD="well-known location in SYSTEMROOT"
51988  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51989    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51990$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51991
51992    # Need to check if the found msvcr is correct architecture
51993    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51994$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51995    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51996    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51997      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51998      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51999      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52000        CORRECT_MSVCR_ARCH="PE32 executable"
52001      else
52002        CORRECT_MSVCR_ARCH="PE32+ executable"
52003      fi
52004    else
52005      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52006        CORRECT_MSVCR_ARCH=386
52007      else
52008        CORRECT_MSVCR_ARCH=x86-64
52009      fi
52010    fi
52011    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
52012      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
52013$as_echo "ok" >&6; }
52014      MSVC_DLL="$POSSIBLE_MSVC_DLL"
52015
52016  # Only process if variable expands to non-empty
52017
52018  if test "x$MSVC_DLL" != x; then
52019    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52020
52021  # Input might be given as Windows format, start by converting to
52022  # unix format.
52023  path="$MSVC_DLL"
52024  new_path=`$CYGPATH -u "$path"`
52025
52026  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52027  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52028  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52029  # "foo.exe" is OK but "foo" is an error.
52030  #
52031  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52032  # It is also a way to make sure we got the proper file name for the real test later on.
52033  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52034  if test "x$test_shortpath" = x; then
52035    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52036$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52037    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
52038  fi
52039
52040  # Call helper function which possibly converts this using DOS-style short mode.
52041  # If so, the updated path is stored in $new_path.
52042
52043  input_path="$new_path"
52044  # Check if we need to convert this using DOS-style short mode. If the path
52045  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52046  # take no chances and rewrite it.
52047  # Note: m4 eats our [], so we need to use [ and ] instead.
52048  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52049  if test "x$has_forbidden_chars" != x; then
52050    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52051    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52052    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52053    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52054      # Going to short mode and back again did indeed matter. Since short mode is
52055      # case insensitive, let's make it lowercase to improve readability.
52056      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52057      # Now convert it back to Unix-style (cygpath)
52058      input_path=`$CYGPATH -u "$shortmode_path"`
52059      new_path="$input_path"
52060    fi
52061  fi
52062
52063  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52064  if test "x$test_cygdrive_prefix" = x; then
52065    # As a simple fix, exclude /usr/bin since it's not a real path.
52066    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52067      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52068      # a path prefixed by /cygdrive for fixpath to work.
52069      new_path="$CYGWIN_ROOT_PATH$input_path"
52070    fi
52071  fi
52072
52073
52074  if test "x$path" != "x$new_path"; then
52075    MSVC_DLL="$new_path"
52076    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52077$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52078  fi
52079
52080    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52081
52082  path="$MSVC_DLL"
52083  has_colon=`$ECHO $path | $GREP ^.:`
52084  new_path="$path"
52085  if test "x$has_colon" = x; then
52086    # Not in mixed or Windows style, start by that.
52087    new_path=`cmd //c echo $path`
52088  fi
52089
52090
52091  input_path="$new_path"
52092  # Check if we need to convert this using DOS-style short mode. If the path
52093  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52094  # take no chances and rewrite it.
52095  # Note: m4 eats our [], so we need to use [ and ] instead.
52096  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52097  if test "x$has_forbidden_chars" != x; then
52098    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52099    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52100  fi
52101
52102
52103  windows_path="$new_path"
52104  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52105    unix_path=`$CYGPATH -u "$windows_path"`
52106    new_path="$unix_path"
52107  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52108    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52109    new_path="$unix_path"
52110  fi
52111
52112  if test "x$path" != "x$new_path"; then
52113    MSVC_DLL="$new_path"
52114    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52115$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52116  fi
52117
52118  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52119  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52120
52121    else
52122      # We're on a unix platform. Hooray! :)
52123      path="$MSVC_DLL"
52124      has_space=`$ECHO "$path" | $GREP " "`
52125      if test "x$has_space" != x; then
52126        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52127$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52128        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52129      fi
52130
52131      # Use eval to expand a potential ~
52132      eval path="$path"
52133      if test ! -f "$path" && test ! -d "$path"; then
52134        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
52135      fi
52136
52137      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
52138    fi
52139  fi
52140
52141      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52142$as_echo_n "checking for $DLL_NAME... " >&6; }
52143      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
52144$as_echo "$MSVC_DLL" >&6; }
52145    else
52146      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
52147$as_echo "incorrect, ignoring" >&6; }
52148      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
52149$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
52150    fi
52151  fi
52152
52153  fi
52154
52155  if test "x$MSVC_DLL" = x; then
52156    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
52157    if test "x$VS100COMNTOOLS" != x; then
52158      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
52159
52160  windows_path="$CYGWIN_VS_TOOLS_DIR"
52161  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52162    unix_path=`$CYGPATH -u "$windows_path"`
52163    CYGWIN_VS_TOOLS_DIR="$unix_path"
52164  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52165    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52166    CYGWIN_VS_TOOLS_DIR="$unix_path"
52167  fi
52168
52169      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
52170        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
52171	    | $GREP -i /x64/ | $HEAD --lines 1`
52172      else
52173        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
52174	    | $GREP -i /x86/ | $HEAD --lines 1`
52175      fi
52176
52177  DLL_NAME="$DLL_NAME"
52178  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
52179  METHOD="search of VS100COMNTOOLS"
52180  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
52181    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
52182$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
52183
52184    # Need to check if the found msvcr is correct architecture
52185    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
52186$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
52187    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
52188    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52189      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
52190      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
52191      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52192        CORRECT_MSVCR_ARCH="PE32 executable"
52193      else
52194        CORRECT_MSVCR_ARCH="PE32+ executable"
52195      fi
52196    else
52197      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52198        CORRECT_MSVCR_ARCH=386
52199      else
52200        CORRECT_MSVCR_ARCH=x86-64
52201      fi
52202    fi
52203    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
52204      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
52205$as_echo "ok" >&6; }
52206      MSVC_DLL="$POSSIBLE_MSVC_DLL"
52207
52208  # Only process if variable expands to non-empty
52209
52210  if test "x$MSVC_DLL" != x; then
52211    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52212
52213  # Input might be given as Windows format, start by converting to
52214  # unix format.
52215  path="$MSVC_DLL"
52216  new_path=`$CYGPATH -u "$path"`
52217
52218  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52219  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52220  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52221  # "foo.exe" is OK but "foo" is an error.
52222  #
52223  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52224  # It is also a way to make sure we got the proper file name for the real test later on.
52225  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52226  if test "x$test_shortpath" = x; then
52227    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52228$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52229    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
52230  fi
52231
52232  # Call helper function which possibly converts this using DOS-style short mode.
52233  # If so, the updated path is stored in $new_path.
52234
52235  input_path="$new_path"
52236  # Check if we need to convert this using DOS-style short mode. If the path
52237  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52238  # take no chances and rewrite it.
52239  # Note: m4 eats our [], so we need to use [ and ] instead.
52240  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52241  if test "x$has_forbidden_chars" != x; then
52242    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52243    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52244    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52245    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52246      # Going to short mode and back again did indeed matter. Since short mode is
52247      # case insensitive, let's make it lowercase to improve readability.
52248      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52249      # Now convert it back to Unix-style (cygpath)
52250      input_path=`$CYGPATH -u "$shortmode_path"`
52251      new_path="$input_path"
52252    fi
52253  fi
52254
52255  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52256  if test "x$test_cygdrive_prefix" = x; then
52257    # As a simple fix, exclude /usr/bin since it's not a real path.
52258    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52259      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52260      # a path prefixed by /cygdrive for fixpath to work.
52261      new_path="$CYGWIN_ROOT_PATH$input_path"
52262    fi
52263  fi
52264
52265
52266  if test "x$path" != "x$new_path"; then
52267    MSVC_DLL="$new_path"
52268    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52269$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52270  fi
52271
52272    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52273
52274  path="$MSVC_DLL"
52275  has_colon=`$ECHO $path | $GREP ^.:`
52276  new_path="$path"
52277  if test "x$has_colon" = x; then
52278    # Not in mixed or Windows style, start by that.
52279    new_path=`cmd //c echo $path`
52280  fi
52281
52282
52283  input_path="$new_path"
52284  # Check if we need to convert this using DOS-style short mode. If the path
52285  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52286  # take no chances and rewrite it.
52287  # Note: m4 eats our [], so we need to use [ and ] instead.
52288  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52289  if test "x$has_forbidden_chars" != x; then
52290    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52291    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52292  fi
52293
52294
52295  windows_path="$new_path"
52296  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52297    unix_path=`$CYGPATH -u "$windows_path"`
52298    new_path="$unix_path"
52299  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52300    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52301    new_path="$unix_path"
52302  fi
52303
52304  if test "x$path" != "x$new_path"; then
52305    MSVC_DLL="$new_path"
52306    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52307$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52308  fi
52309
52310  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52311  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52312
52313    else
52314      # We're on a unix platform. Hooray! :)
52315      path="$MSVC_DLL"
52316      has_space=`$ECHO "$path" | $GREP " "`
52317      if test "x$has_space" != x; then
52318        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52319$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52320        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52321      fi
52322
52323      # Use eval to expand a potential ~
52324      eval path="$path"
52325      if test ! -f "$path" && test ! -d "$path"; then
52326        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
52327      fi
52328
52329      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
52330    fi
52331  fi
52332
52333      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52334$as_echo_n "checking for $DLL_NAME... " >&6; }
52335      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
52336$as_echo "$MSVC_DLL" >&6; }
52337    else
52338      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
52339$as_echo "incorrect, ignoring" >&6; }
52340      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
52341$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
52342    fi
52343  fi
52344
52345    fi
52346  fi
52347
52348  if test "x$MSVC_DLL" = x; then
52349    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
52350    # (This was the original behaviour; kept since it might turn something up)
52351    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
52352      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
52353        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
52354	    | $GREP x64 | $HEAD --lines 1`
52355      else
52356        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
52357	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
52358        if test "x$POSSIBLE_MSVC_DLL" = x; then
52359          # We're grasping at straws now...
52360          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
52361	      | $HEAD --lines 1`
52362        fi
52363      fi
52364
52365
52366  DLL_NAME="$DLL_NAME"
52367  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
52368  METHOD="search of VCINSTALLDIR"
52369  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
52370    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
52371$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
52372
52373    # Need to check if the found msvcr is correct architecture
52374    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
52375$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
52376    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
52377    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52378      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
52379      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
52380      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52381        CORRECT_MSVCR_ARCH="PE32 executable"
52382      else
52383        CORRECT_MSVCR_ARCH="PE32+ executable"
52384      fi
52385    else
52386      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52387        CORRECT_MSVCR_ARCH=386
52388      else
52389        CORRECT_MSVCR_ARCH=x86-64
52390      fi
52391    fi
52392    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
52393      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
52394$as_echo "ok" >&6; }
52395      MSVC_DLL="$POSSIBLE_MSVC_DLL"
52396
52397  # Only process if variable expands to non-empty
52398
52399  if test "x$MSVC_DLL" != x; then
52400    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52401
52402  # Input might be given as Windows format, start by converting to
52403  # unix format.
52404  path="$MSVC_DLL"
52405  new_path=`$CYGPATH -u "$path"`
52406
52407  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52408  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52409  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52410  # "foo.exe" is OK but "foo" is an error.
52411  #
52412  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52413  # It is also a way to make sure we got the proper file name for the real test later on.
52414  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52415  if test "x$test_shortpath" = x; then
52416    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52417$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52418    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
52419  fi
52420
52421  # Call helper function which possibly converts this using DOS-style short mode.
52422  # If so, the updated path is stored in $new_path.
52423
52424  input_path="$new_path"
52425  # Check if we need to convert this using DOS-style short mode. If the path
52426  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52427  # take no chances and rewrite it.
52428  # Note: m4 eats our [], so we need to use [ and ] instead.
52429  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52430  if test "x$has_forbidden_chars" != x; then
52431    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52432    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52433    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52434    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52435      # Going to short mode and back again did indeed matter. Since short mode is
52436      # case insensitive, let's make it lowercase to improve readability.
52437      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52438      # Now convert it back to Unix-style (cygpath)
52439      input_path=`$CYGPATH -u "$shortmode_path"`
52440      new_path="$input_path"
52441    fi
52442  fi
52443
52444  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52445  if test "x$test_cygdrive_prefix" = x; then
52446    # As a simple fix, exclude /usr/bin since it's not a real path.
52447    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52448      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52449      # a path prefixed by /cygdrive for fixpath to work.
52450      new_path="$CYGWIN_ROOT_PATH$input_path"
52451    fi
52452  fi
52453
52454
52455  if test "x$path" != "x$new_path"; then
52456    MSVC_DLL="$new_path"
52457    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52458$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52459  fi
52460
52461    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52462
52463  path="$MSVC_DLL"
52464  has_colon=`$ECHO $path | $GREP ^.:`
52465  new_path="$path"
52466  if test "x$has_colon" = x; then
52467    # Not in mixed or Windows style, start by that.
52468    new_path=`cmd //c echo $path`
52469  fi
52470
52471
52472  input_path="$new_path"
52473  # Check if we need to convert this using DOS-style short mode. If the path
52474  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52475  # take no chances and rewrite it.
52476  # Note: m4 eats our [], so we need to use [ and ] instead.
52477  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52478  if test "x$has_forbidden_chars" != x; then
52479    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52480    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52481  fi
52482
52483
52484  windows_path="$new_path"
52485  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52486    unix_path=`$CYGPATH -u "$windows_path"`
52487    new_path="$unix_path"
52488  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52489    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52490    new_path="$unix_path"
52491  fi
52492
52493  if test "x$path" != "x$new_path"; then
52494    MSVC_DLL="$new_path"
52495    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52496$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52497  fi
52498
52499  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52500  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52501
52502    else
52503      # We're on a unix platform. Hooray! :)
52504      path="$MSVC_DLL"
52505      has_space=`$ECHO "$path" | $GREP " "`
52506      if test "x$has_space" != x; then
52507        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52508$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52509        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52510      fi
52511
52512      # Use eval to expand a potential ~
52513      eval path="$path"
52514      if test ! -f "$path" && test ! -d "$path"; then
52515        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
52516      fi
52517
52518      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
52519    fi
52520  fi
52521
52522      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52523$as_echo_n "checking for $DLL_NAME... " >&6; }
52524      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
52525$as_echo "$MSVC_DLL" >&6; }
52526    else
52527      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
52528$as_echo "incorrect, ignoring" >&6; }
52529      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
52530$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
52531    fi
52532  fi
52533
52534    fi
52535  fi
52536
52537  if test "x$MSVC_DLL" = x; then
52538    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52539$as_echo_n "checking for $DLL_NAME... " >&6; }
52540    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52541$as_echo "no" >&6; }
52542    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
52543  fi
52544
52545      MSVCP_DLL="$MSVC_DLL"
52546    fi
52547
52548  fi
52549
52550
52551
52552# Check whether --with-dxsdk was given.
52553if test "${with_dxsdk+set}" = set; then :
52554  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
52555$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
52556fi
52557
52558
52559
52560
52561# Check whether --with-dxsdk-lib was given.
52562if test "${with_dxsdk_lib+set}" = set; then :
52563  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
52564$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
52565fi
52566
52567
52568
52569
52570# Check whether --with-dxsdk-include was given.
52571if test "${with_dxsdk_include+set}" = set; then :
52572  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
52573$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
52574fi
52575
52576
52577  fi
52578
52579
52580###############################################################################
52581#
52582# We need to do some final tweaking, when everything else is done.
52583#
52584###############################################################################
52585
52586
52587  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
52588
52589
52590  # The name of the Service Agent jar.
52591  SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
52592  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
52593    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
52594  fi
52595
52596
52597
52598  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
52599$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
52600
52601  if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
52602    ENABLE_INTREE_EC=yes
52603    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52604$as_echo "yes" >&6; }
52605  else
52606    ENABLE_INTREE_EC=no
52607    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52608$as_echo "no" >&6; }
52609  fi
52610
52611
52612
52613
52614###############################################################################
52615#
52616# Configure parts of the build that only affect the build performance,
52617# not the result.
52618#
52619###############################################################################
52620
52621
52622  # How many cores do we have on this build system?
52623
52624# Check whether --with-num-cores was given.
52625if test "${with_num_cores+set}" = set; then :
52626  withval=$with_num_cores;
52627fi
52628
52629  if test "x$with_num_cores" = x; then
52630    # The number of cores were not specified, try to probe them.
52631
52632  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
52633$as_echo_n "checking for number of cores... " >&6; }
52634  NUM_CORES=1
52635  FOUND_CORES=no
52636
52637  if test -f /proc/cpuinfo; then
52638    # Looks like a Linux (or cygwin) system
52639    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
52640    FOUND_CORES=yes
52641  elif test -x /usr/sbin/psrinfo; then
52642    # Looks like a Solaris system
52643    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
52644    FOUND_CORES=yes
52645  elif test -x /usr/sbin/system_profiler; then
52646    # Looks like a MacOSX system
52647    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
52648    FOUND_CORES=yes
52649  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
52650    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
52651    FOUND_CORES=yes
52652  elif test -n "$NUMBER_OF_PROCESSORS"; then
52653    # On windows, look in the env
52654    NUM_CORES=$NUMBER_OF_PROCESSORS
52655    FOUND_CORES=yes
52656  fi
52657
52658  if test "x$FOUND_CORES" = xyes; then
52659    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
52660$as_echo "$NUM_CORES" >&6; }
52661  else
52662    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
52663$as_echo "could not detect number of cores, defaulting to 1" >&6; }
52664    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
52665$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
52666  fi
52667
52668  else
52669    NUM_CORES=$with_num_cores
52670  fi
52671
52672
52673
52674  # How much memory do we have on this build system?
52675
52676# Check whether --with-memory-size was given.
52677if test "${with_memory_size+set}" = set; then :
52678  withval=$with_memory_size;
52679fi
52680
52681  if test "x$with_memory_size" = x; then
52682    # The memory size was not specified, try to probe it.
52683
52684  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
52685$as_echo_n "checking for memory size... " >&6; }
52686  # Default to 1024 MB
52687  MEMORY_SIZE=1024
52688  FOUND_MEM=no
52689
52690  if test -f /proc/meminfo; then
52691    # Looks like a Linux (or cygwin) system
52692    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
52693    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
52694    FOUND_MEM=yes
52695  elif test -x /usr/sbin/prtconf; then
52696    # Looks like a Solaris or AIX system
52697    MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
52698    FOUND_MEM=yes
52699  elif test -x /usr/sbin/system_profiler; then
52700    # Looks like a MacOSX system
52701    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
52702    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
52703    FOUND_MEM=yes
52704  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
52705    # Windows, but without cygwin
52706    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
52707    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
52708    FOUND_MEM=yes
52709  fi
52710
52711  if test "x$FOUND_MEM" = xyes; then
52712    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
52713$as_echo "$MEMORY_SIZE MB" >&6; }
52714  else
52715    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
52716$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
52717    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
52718$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
52719  fi
52720
52721  else
52722    MEMORY_SIZE=$with_memory_size
52723  fi
52724
52725
52726
52727  # Provide a decent default number of parallel jobs for make depending on
52728  # number of cores, amount of memory and machine architecture.
52729
52730# Check whether --with-jobs was given.
52731if test "${with_jobs+set}" = set; then :
52732  withval=$with_jobs;
52733fi
52734
52735  if test "x$with_jobs" = x; then
52736    # Number of jobs was not specified, calculate.
52737    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
52738$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
52739    # Approximate memory in GB.
52740    memory_gb=`expr $MEMORY_SIZE / 1024`
52741    # Pick the lowest of memory in gb and number of cores.
52742    if test "$memory_gb" -lt "$NUM_CORES"; then
52743      JOBS="$memory_gb"
52744    else
52745      JOBS="$NUM_CORES"
52746      # On bigger machines, leave some room for other processes to run
52747      if test "$JOBS" -gt "4"; then
52748        JOBS=`expr $JOBS '*' 90 / 100`
52749      fi
52750    fi
52751    # Cap number of jobs to 16
52752    if test "$JOBS" -gt "16"; then
52753      JOBS=16
52754    fi
52755    if test "$JOBS" -eq "0"; then
52756      JOBS=1
52757    fi
52758    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
52759$as_echo "$JOBS" >&6; }
52760  else
52761    JOBS=$with_jobs
52762  fi
52763
52764
52765
52766# Setup arguments for the boot jdk (after cores and memory have been setup)
52767
52768  ##############################################################################
52769  #
52770  # Specify jvm options for anything that is run with the Boot JDK.
52771  # Not all JVM:s accept the same arguments on the command line.
52772  #
52773
52774# Check whether --with-boot-jdk-jvmargs was given.
52775if test "${with_boot_jdk_jvmargs+set}" = set; then :
52776  withval=$with_boot_jdk_jvmargs;
52777fi
52778
52779
52780  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
52781$as_echo_n "checking flags for boot jdk java command ... " >&6; }
52782
52783  # Disable special log output when a debug build is used as Boot JDK...
52784
52785  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
52786  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
52787  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
52788  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52789  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52790  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52791    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
52792    JVM_ARG_OK=true
52793  else
52794    $ECHO "Arg failed:" >&5
52795    $ECHO "$OUTPUT" >&5
52796    JVM_ARG_OK=false
52797  fi
52798
52799
52800  # Apply user provided options.
52801
52802  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
52803  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
52804  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
52805  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52806  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52807  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52808    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
52809    JVM_ARG_OK=true
52810  else
52811    $ECHO "Arg failed:" >&5
52812    $ECHO "$OUTPUT" >&5
52813    JVM_ARG_OK=false
52814  fi
52815
52816
52817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
52818$as_echo "$boot_jdk_jvmargs" >&6; }
52819
52820  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
52821  JAVA_FLAGS=$boot_jdk_jvmargs
52822
52823
52824
52825  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
52826$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
52827
52828  # Starting amount of heap memory.
52829
52830  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
52831  $ECHO "Command: $JAVA -Xms64M -version" >&5
52832  OUTPUT=`$JAVA -Xms64M -version 2>&1`
52833  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52834  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52835  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52836    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
52837    JVM_ARG_OK=true
52838  else
52839    $ECHO "Arg failed:" >&5
52840    $ECHO "$OUTPUT" >&5
52841    JVM_ARG_OK=false
52842  fi
52843
52844
52845  # Maximum amount of heap memory.
52846  # Maximum stack size.
52847  JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
52848  if test "x$BUILD_NUM_BITS" = x32; then
52849    if test "$JVM_MAX_HEAP" -gt "1100"; then
52850      JVM_MAX_HEAP=1100
52851    elif test "$JVM_MAX_HEAP" -lt "512"; then
52852      JVM_MAX_HEAP=512
52853    fi
52854    STACK_SIZE=768
52855  else
52856    # Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit
52857    # pointers are used. Apparently, we need to increase the heap and stack
52858    # space for the jvm. More specifically, when running javac to build huge
52859    # jdk batch
52860    if test "$JVM_MAX_HEAP" -gt "1600"; then
52861      JVM_MAX_HEAP=1600
52862    elif test "$JVM_MAX_HEAP" -lt "512"; then
52863      JVM_MAX_HEAP=512
52864    fi
52865    STACK_SIZE=1536
52866  fi
52867
52868  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
52869  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
52870  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
52871  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52872  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52873  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52874    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
52875    JVM_ARG_OK=true
52876  else
52877    $ECHO "Arg failed:" >&5
52878    $ECHO "$OUTPUT" >&5
52879    JVM_ARG_OK=false
52880  fi
52881
52882
52883  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
52884  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
52885  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
52886  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52887  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52888  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52889    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
52890    JVM_ARG_OK=true
52891  else
52892    $ECHO "Arg failed:" >&5
52893    $ECHO "$OUTPUT" >&5
52894    JVM_ARG_OK=false
52895  fi
52896
52897
52898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
52899$as_echo "$boot_jdk_jvmargs_big" >&6; }
52900
52901  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
52902
52903
52904
52905  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
52906$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
52907
52908  # Use serial gc for small short lived tools if possible
52909
52910  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
52911  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
52912  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
52913  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52914  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52915  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52916    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
52917    JVM_ARG_OK=true
52918  else
52919    $ECHO "Arg failed:" >&5
52920    $ECHO "$OUTPUT" >&5
52921    JVM_ARG_OK=false
52922  fi
52923
52924
52925  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
52926  $ECHO "Command: $JAVA -Xms32M -version" >&5
52927  OUTPUT=`$JAVA -Xms32M -version 2>&1`
52928  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52929  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52930  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52931    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
52932    JVM_ARG_OK=true
52933  else
52934    $ECHO "Arg failed:" >&5
52935    $ECHO "$OUTPUT" >&5
52936    JVM_ARG_OK=false
52937  fi
52938
52939
52940  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
52941  $ECHO "Command: $JAVA -Xmx512M -version" >&5
52942  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
52943  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52944  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52945  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52946    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
52947    JVM_ARG_OK=true
52948  else
52949    $ECHO "Arg failed:" >&5
52950    $ECHO "$OUTPUT" >&5
52951    JVM_ARG_OK=false
52952  fi
52953
52954
52955  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
52956$as_echo "$boot_jdk_jvmargs_small" >&6; }
52957
52958  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
52959
52960
52961  JAVA_TOOL_FLAGS_SMALL=""
52962  for f in $JAVA_FLAGS_SMALL; do
52963    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
52964  done
52965
52966
52967
52968# Setup smart javac (after cores and memory have been setup)
52969
52970
52971# Check whether --with-sjavac-server-java was given.
52972if test "${with_sjavac_server_java+set}" = set; then :
52973  withval=$with_sjavac_server_java;
52974fi
52975
52976
52977  if test "x$with_sjavac_server_java" != x; then
52978    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
52979    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
52980    if test "x$FOUND_VERSION" = x; then
52981      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
52982    fi
52983  else
52984    SJAVAC_SERVER_JAVA="$JAVA"
52985  fi
52986
52987
52988  if test "$MEMORY_SIZE" -gt "3000"; then
52989
52990  $ECHO "Check if jvm arg is ok: -d64" >&5
52991  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
52992  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
52993  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52994  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52995  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52996    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
52997    JVM_ARG_OK=true
52998  else
52999    $ECHO "Arg failed:" >&5
53000    $ECHO "$OUTPUT" >&5
53001    JVM_ARG_OK=false
53002  fi
53003
53004    if test "$JVM_ARG_OK" = true; then
53005      JVM_64BIT=true
53006      JVM_ARG_OK=false
53007    fi
53008  fi
53009
53010  MX_VALUE=`expr $MEMORY_SIZE / 2`
53011  if test "$JVM_64BIT" = true; then
53012    # Set ms lower than mx since more than one instance of the server might
53013    # get launched at the same time before they figure out which instance won.
53014    MS_VALUE=512
53015    if test "$MX_VALUE" -gt "2048"; then
53016      MX_VALUE=2048
53017    fi
53018  else
53019    MS_VALUE=256
53020    if test "$MX_VALUE" -gt "1500"; then
53021      MX_VALUE=1500
53022    fi
53023  fi
53024  if test "$MX_VALUE" -lt "512"; then
53025    MX_VALUE=512
53026  fi
53027
53028  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
53029  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
53030  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
53031  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
53032  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
53033  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
53034    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
53035    JVM_ARG_OK=true
53036  else
53037    $ECHO "Arg failed:" >&5
53038    $ECHO "$OUTPUT" >&5
53039    JVM_ARG_OK=false
53040  fi
53041
53042
53043
53044  # Check whether --enable-sjavac was given.
53045if test "${enable_sjavac+set}" = set; then :
53046  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
53047else
53048  ENABLE_SJAVAC='no'
53049fi
53050
53051  if test "x$JVM_ARG_OK" = "xfalse"; then
53052    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
53053$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
53054    ENABLE_SJAVAC=no;
53055  fi
53056  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
53057$as_echo_n "checking whether to use sjavac... " >&6; }
53058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
53059$as_echo "$ENABLE_SJAVAC" >&6; }
53060
53061
53062
53063# Can the C/C++ compiler use precompiled headers?
53064
53065
53066  ###############################################################################
53067  #
53068  # Can the C/C++ compiler use precompiled headers?
53069  #
53070  # Check whether --enable-precompiled-headers was given.
53071if test "${enable_precompiled_headers+set}" = set; then :
53072  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
53073else
53074  ENABLE_PRECOMPH=yes
53075fi
53076
53077
53078  USE_PRECOMPILED_HEADER=1
53079  if test "x$ENABLE_PRECOMPH" = xno; then
53080    USE_PRECOMPILED_HEADER=0
53081  fi
53082
53083  if test "x$ENABLE_PRECOMPH" = xyes; then
53084    # Check that the compiler actually supports precomp headers.
53085    if test "x$TOOLCHAIN_TYPE" = xgcc; then
53086      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
53087$as_echo_n "checking that precompiled headers work... " >&6; }
53088      echo "int alfa();" > conftest.h
53089      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
53090      if test ! -f conftest.hpp.gch; then
53091        USE_PRECOMPILED_HEADER=0
53092        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53093$as_echo "no" >&6; }
53094      else
53095        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53096$as_echo "yes" >&6; }
53097      fi
53098      rm -f conftest.h conftest.hpp.gch
53099    fi
53100  fi
53101
53102
53103
53104
53105# Setup use of ccache, if available
53106
53107  # Check whether --enable-ccache was given.
53108if test "${enable_ccache+set}" = set; then :
53109  enableval=$enable_ccache;
53110fi
53111
53112
53113  CCACHE=
53114  CCACHE_STATUS=
53115  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
53116$as_echo_n "checking is ccache enabled... " >&6; }
53117  if test "x$enable_ccache" = xyes; then
53118    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
53119      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53120$as_echo "yes" >&6; }
53121      OLD_PATH="$PATH"
53122      if test "x$TOOLCHAIN_PATH" != x; then
53123        PATH=$TOOLCHAIN_PATH:$PATH
53124      fi
53125
53126
53127
53128  # Publish this variable in the help.
53129
53130
53131  if test "x$CCACHE" = x; then
53132    # The variable is not set by user, try to locate tool using the code snippet
53133    for ac_prog in ccache
53134do
53135  # Extract the first word of "$ac_prog", so it can be a program name with args.
53136set dummy $ac_prog; ac_word=$2
53137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
53138$as_echo_n "checking for $ac_word... " >&6; }
53139if ${ac_cv_path_CCACHE+:} false; then :
53140  $as_echo_n "(cached) " >&6
53141else
53142  case $CCACHE in
53143  [\\/]* | ?:[\\/]*)
53144  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
53145  ;;
53146  *)
53147  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
53148for as_dir in $PATH
53149do
53150  IFS=$as_save_IFS
53151  test -z "$as_dir" && as_dir=.
53152    for ac_exec_ext in '' $ac_executable_extensions; do
53153  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
53154    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
53155    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
53156    break 2
53157  fi
53158done
53159  done
53160IFS=$as_save_IFS
53161
53162  ;;
53163esac
53164fi
53165CCACHE=$ac_cv_path_CCACHE
53166if test -n "$CCACHE"; then
53167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
53168$as_echo "$CCACHE" >&6; }
53169else
53170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53171$as_echo "no" >&6; }
53172fi
53173
53174
53175  test -n "$CCACHE" && break
53176done
53177
53178  else
53179    # The variable is set, but is it from the command line or the environment?
53180
53181    # Try to remove the string !CCACHE! from our list.
53182    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
53183    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
53184      # If it failed, the variable was not from the command line. Ignore it,
53185      # but warn the user (except for BASH, which is always set by the calling BASH).
53186      if test "xCCACHE" != xBASH; then
53187        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
53188$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
53189      fi
53190      # Try to locate tool using the code snippet
53191      for ac_prog in ccache
53192do
53193  # Extract the first word of "$ac_prog", so it can be a program name with args.
53194set dummy $ac_prog; ac_word=$2
53195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
53196$as_echo_n "checking for $ac_word... " >&6; }
53197if ${ac_cv_path_CCACHE+:} false; then :
53198  $as_echo_n "(cached) " >&6
53199else
53200  case $CCACHE in
53201  [\\/]* | ?:[\\/]*)
53202  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
53203  ;;
53204  *)
53205  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
53206for as_dir in $PATH
53207do
53208  IFS=$as_save_IFS
53209  test -z "$as_dir" && as_dir=.
53210    for ac_exec_ext in '' $ac_executable_extensions; do
53211  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
53212    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
53213    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
53214    break 2
53215  fi
53216done
53217  done
53218IFS=$as_save_IFS
53219
53220  ;;
53221esac
53222fi
53223CCACHE=$ac_cv_path_CCACHE
53224if test -n "$CCACHE"; then
53225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
53226$as_echo "$CCACHE" >&6; }
53227else
53228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53229$as_echo "no" >&6; }
53230fi
53231
53232
53233  test -n "$CCACHE" && break
53234done
53235
53236    else
53237      # If it succeeded, then it was overridden by the user. We will use it
53238      # for the tool.
53239
53240      # First remove it from the list of overridden variables, so we can test
53241      # for unknown variables in the end.
53242      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
53243
53244      # Check if the provided tool contains a complete path.
53245      tool_specified="$CCACHE"
53246      tool_basename="${tool_specified##*/}"
53247      if test "x$tool_basename" = "x$tool_specified"; then
53248        # A command without a complete path is provided, search $PATH.
53249        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
53250$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
53251        # Extract the first word of "$tool_basename", so it can be a program name with args.
53252set dummy $tool_basename; ac_word=$2
53253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
53254$as_echo_n "checking for $ac_word... " >&6; }
53255if ${ac_cv_path_CCACHE+:} false; then :
53256  $as_echo_n "(cached) " >&6
53257else
53258  case $CCACHE in
53259  [\\/]* | ?:[\\/]*)
53260  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
53261  ;;
53262  *)
53263  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
53264for as_dir in $PATH
53265do
53266  IFS=$as_save_IFS
53267  test -z "$as_dir" && as_dir=.
53268    for ac_exec_ext in '' $ac_executable_extensions; do
53269  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
53270    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
53271    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
53272    break 2
53273  fi
53274done
53275  done
53276IFS=$as_save_IFS
53277
53278  ;;
53279esac
53280fi
53281CCACHE=$ac_cv_path_CCACHE
53282if test -n "$CCACHE"; then
53283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
53284$as_echo "$CCACHE" >&6; }
53285else
53286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53287$as_echo "no" >&6; }
53288fi
53289
53290
53291        if test "x$CCACHE" = x; then
53292          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
53293        fi
53294      else
53295        # Otherwise we believe it is a complete path. Use it as it is.
53296        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
53297$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
53298        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
53299$as_echo_n "checking for CCACHE... " >&6; }
53300        if test ! -x "$tool_specified"; then
53301          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
53302$as_echo "not found" >&6; }
53303          as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
53304        fi
53305        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
53306$as_echo "$tool_specified" >&6; }
53307      fi
53308    fi
53309  fi
53310
53311
53312
53313  if test "x$CCACHE" = x; then
53314    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
53315  fi
53316
53317
53318      PATH="$OLD_PATH"
53319      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
53320      CCACHE_STATUS="Active ($CCACHE_VERSION)"
53321    else
53322      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53323$as_echo "no" >&6; }
53324      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
53325$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
53326    fi
53327  elif test "x$enable_ccache" = xno; then
53328    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
53329$as_echo "no, explicitly disabled" >&6; }
53330    CCACHE_STATUS="Disabled"
53331  elif test "x$enable_ccache" = x; then
53332    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53333$as_echo "no" >&6; }
53334  else
53335    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
53336$as_echo "unknown" >&6; }
53337    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
53338  fi
53339
53340
53341
53342# Check whether --with-ccache-dir was given.
53343if test "${with_ccache_dir+set}" = set; then :
53344  withval=$with_ccache_dir;
53345fi
53346
53347
53348  if test "x$with_ccache_dir" != x; then
53349    # When using a non home ccache directory, assume the use is to share ccache files
53350    # with other users. Thus change the umask.
53351    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
53352    if test "x$CCACHE" = x; then
53353      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
53354$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
53355    fi
53356  fi
53357
53358  if test "x$CCACHE" != x; then
53359
53360  if test "x$CCACHE" != x; then
53361    if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
53362      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
53363          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
53364      if test "x$HAS_BAD_CCACHE" != "x"; then
53365        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
53366      fi
53367      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
53368$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
53369      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
53370      PUSHED_FLAGS="$CXXFLAGS"
53371      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
53372      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53373/* end confdefs.h.  */
53374
53375int
53376main ()
53377{
53378
53379  ;
53380  return 0;
53381}
53382_ACEOF
53383if ac_fn_cxx_try_compile "$LINENO"; then :
53384  CC_KNOWS_CCACHE_TRICK=yes
53385else
53386  CC_KNOWS_CCACHE_TRICK=no
53387fi
53388rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53389      CXXFLAGS="$PUSHED_FLAGS"
53390      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
53391        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53392$as_echo "yes" >&6; }
53393        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
53394
53395        CCACHE_SLOPPINESS=pch_defines,time_macros
53396      else
53397        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53398$as_echo "no" >&6; }
53399        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
53400      fi
53401    fi
53402
53403    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
53404        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
53405
53406    if test "x$SET_CCACHE_DIR" != x; then
53407      mkdir -p $CCACHE_DIR > /dev/null 2>&1
53408      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
53409    fi
53410  fi
53411
53412  fi
53413
53414
53415###############################################################################
53416#
53417# And now the finish...
53418#
53419###############################################################################
53420
53421# Check for some common pitfalls
53422
53423  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53424    file_to_test="$SRC_ROOT/LICENSE"
53425    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
53426      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
53427    fi
53428  fi
53429
53430
53431  # Did user specify any unknown variables?
53432
53433  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
53434    # Replace the separating ! with spaces before presenting for end user.
53435    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
53436    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
53437$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
53438  fi
53439
53440
53441  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
53442$as_echo_n "checking if build directory is on local disk... " >&6; }
53443
53444  # df -l lists only local disks; if the given directory is not found then
53445  # a non-zero exit code is given
53446  if test "x$DF" = x; then
53447    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53448      # msys does not have df; use Windows "net use" instead.
53449      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
53450      if test "x$IS_NETWORK_DISK" = x; then
53451        OUTPUT_DIR_IS_LOCAL="yes"
53452      else
53453        OUTPUT_DIR_IS_LOCAL="no"
53454      fi
53455    else
53456      # No df here, say it's local
53457      OUTPUT_DIR_IS_LOCAL="yes"
53458    fi
53459  else
53460    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
53461      OUTPUT_DIR_IS_LOCAL="yes"
53462    else
53463      OUTPUT_DIR_IS_LOCAL="no"
53464    fi
53465  fi
53466
53467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
53468$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
53469
53470
53471
53472  # Check if the user has any old-style ALT_ variables set.
53473  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
53474
53475  # Before generating output files, test if they exist. If they do, this is a reconfigure.
53476  # Since we can't properly handle the dependencies for this, warn the user about the situation
53477  if test -e $OUTPUT_ROOT/spec.gmk; then
53478    IS_RECONFIGURE=yes
53479  else
53480    IS_RECONFIGURE=no
53481  fi
53482
53483
53484# At the end, call the custom hook. (Dummy macro if no custom sources available)
53485
53486
53487# We're messing a bit with internal autoconf variables to put the config.status
53488# in the output directory instead of the current directory.
53489CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
53490
53491# Create the actual output files. Now the main work of configure is done.
53492cat >confcache <<\_ACEOF
53493# This file is a shell script that caches the results of configure
53494# tests run on this system so they can be shared between configure
53495# scripts and configure runs, see configure's option --config-cache.
53496# It is not useful on other systems.  If it contains results you don't
53497# want to keep, you may remove or edit it.
53498#
53499# config.status only pays attention to the cache file if you give it
53500# the --recheck option to rerun configure.
53501#
53502# `ac_cv_env_foo' variables (set or unset) will be overridden when
53503# loading this file, other *unset* `ac_cv_foo' will be assigned the
53504# following values.
53505
53506_ACEOF
53507
53508# The following way of writing the cache mishandles newlines in values,
53509# but we know of no workaround that is simple, portable, and efficient.
53510# So, we kill variables containing newlines.
53511# Ultrix sh set writes to stderr and can't be redirected directly,
53512# and sets the high bit in the cache file unless we assign to the vars.
53513(
53514  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
53515    eval ac_val=\$$ac_var
53516    case $ac_val in #(
53517    *${as_nl}*)
53518      case $ac_var in #(
53519      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
53520$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
53521      esac
53522      case $ac_var in #(
53523      _ | IFS | as_nl) ;; #(
53524      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
53525      *) { eval $ac_var=; unset $ac_var;} ;;
53526      esac ;;
53527    esac
53528  done
53529
53530  (set) 2>&1 |
53531    case $as_nl`(ac_space=' '; set) 2>&1` in #(
53532    *${as_nl}ac_space=\ *)
53533      # `set' does not quote correctly, so add quotes: double-quote
53534      # substitution turns \\\\ into \\, and sed turns \\ into \.
53535      sed -n \
53536	"s/'/'\\\\''/g;
53537	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
53538      ;; #(
53539    *)
53540      # `set' quotes correctly as required by POSIX, so do not add quotes.
53541      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
53542      ;;
53543    esac |
53544    sort
53545) |
53546  sed '
53547     /^ac_cv_env_/b end
53548     t clear
53549     :clear
53550     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
53551     t end
53552     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
53553     :end' >>confcache
53554if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
53555  if test -w "$cache_file"; then
53556    if test "x$cache_file" != "x/dev/null"; then
53557      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
53558$as_echo "$as_me: updating cache $cache_file" >&6;}
53559      if test ! -f "$cache_file" || test -h "$cache_file"; then
53560	cat confcache >"$cache_file"
53561      else
53562        case $cache_file in #(
53563        */* | ?:*)
53564	  mv -f confcache "$cache_file"$$ &&
53565	  mv -f "$cache_file"$$ "$cache_file" ;; #(
53566        *)
53567	  mv -f confcache "$cache_file" ;;
53568	esac
53569      fi
53570    fi
53571  else
53572    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
53573$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
53574  fi
53575fi
53576rm -f confcache
53577
53578test "x$prefix" = xNONE && prefix=$ac_default_prefix
53579# Let make expand exec_prefix.
53580test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
53581
53582# Transform confdefs.h into DEFS.
53583# Protect against shell expansion while executing Makefile rules.
53584# Protect against Makefile macro expansion.
53585#
53586# If the first sed substitution is executed (which looks for macros that
53587# take arguments), then branch to the quote section.  Otherwise,
53588# look for a macro that doesn't take arguments.
53589ac_script='
53590:mline
53591/\\$/{
53592 N
53593 s,\\\n,,
53594 b mline
53595}
53596t clear
53597:clear
53598s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
53599t quote
53600s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
53601t quote
53602b any
53603:quote
53604s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
53605s/\[/\\&/g
53606s/\]/\\&/g
53607s/\$/$$/g
53608H
53609:any
53610${
53611	g
53612	s/^\n//
53613	s/\n/ /g
53614	p
53615}
53616'
53617DEFS=`sed -n "$ac_script" confdefs.h`
53618
53619
53620ac_libobjs=
53621ac_ltlibobjs=
53622U=
53623for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
53624  # 1. Remove the extension, and $U if already installed.
53625  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
53626  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
53627  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
53628  #    will be set to the directory where LIBOBJS objects are built.
53629  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
53630  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
53631done
53632LIBOBJS=$ac_libobjs
53633
53634LTLIBOBJS=$ac_ltlibobjs
53635
53636
53637
53638: "${CONFIG_STATUS=./config.status}"
53639ac_write_fail=0
53640ac_clean_files_save=$ac_clean_files
53641ac_clean_files="$ac_clean_files $CONFIG_STATUS"
53642{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
53643$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
53644as_write_fail=0
53645cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
53646#! $SHELL
53647# Generated by $as_me.
53648# Run this file to recreate the current configuration.
53649# Compiler output produced by configure, useful for debugging
53650# configure, is in config.log if it exists.
53651
53652debug=false
53653ac_cs_recheck=false
53654ac_cs_silent=false
53655
53656SHELL=\${CONFIG_SHELL-$SHELL}
53657export SHELL
53658_ASEOF
53659cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
53660## -------------------- ##
53661## M4sh Initialization. ##
53662## -------------------- ##
53663
53664# Be more Bourne compatible
53665DUALCASE=1; export DUALCASE # for MKS sh
53666if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
53667  emulate sh
53668  NULLCMD=:
53669  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
53670  # is contrary to our usage.  Disable this feature.
53671  alias -g '${1+"$@"}'='"$@"'
53672  setopt NO_GLOB_SUBST
53673else
53674  case `(set -o) 2>/dev/null` in #(
53675  *posix*) :
53676    set -o posix ;; #(
53677  *) :
53678     ;;
53679esac
53680fi
53681
53682
53683as_nl='
53684'
53685export as_nl
53686# Printing a long string crashes Solaris 7 /usr/bin/printf.
53687as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
53688as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
53689as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
53690# Prefer a ksh shell builtin over an external printf program on Solaris,
53691# but without wasting forks for bash or zsh.
53692if test -z "$BASH_VERSION$ZSH_VERSION" \
53693    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
53694  as_echo='print -r --'
53695  as_echo_n='print -rn --'
53696elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
53697  as_echo='printf %s\n'
53698  as_echo_n='printf %s'
53699else
53700  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
53701    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53702    as_echo_n='/usr/ucb/echo -n'
53703  else
53704    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
53705    as_echo_n_body='eval
53706      arg=$1;
53707      case $arg in #(
53708      *"$as_nl"*)
53709	expr "X$arg" : "X\\(.*\\)$as_nl";
53710	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
53711      esac;
53712      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
53713    '
53714    export as_echo_n_body
53715    as_echo_n='sh -c $as_echo_n_body as_echo'
53716  fi
53717  export as_echo_body
53718  as_echo='sh -c $as_echo_body as_echo'
53719fi
53720
53721# The user is always right.
53722if test "${PATH_SEPARATOR+set}" != set; then
53723  PATH_SEPARATOR=:
53724  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
53725    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
53726      PATH_SEPARATOR=';'
53727  }
53728fi
53729
53730
53731# IFS
53732# We need space, tab and new line, in precisely that order.  Quoting is
53733# there to prevent editors from complaining about space-tab.
53734# (If _AS_PATH_WALK were called with IFS unset, it would disable word
53735# splitting by setting IFS to empty value.)
53736IFS=" ""	$as_nl"
53737
53738# Find who we are.  Look in the path if we contain no directory separator.
53739as_myself=
53740case $0 in #((
53741  *[\\/]* ) as_myself=$0 ;;
53742  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
53743for as_dir in $PATH
53744do
53745  IFS=$as_save_IFS
53746  test -z "$as_dir" && as_dir=.
53747    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
53748  done
53749IFS=$as_save_IFS
53750
53751     ;;
53752esac
53753# We did not find ourselves, most probably we were run as `sh COMMAND'
53754# in which case we are not to be found in the path.
53755if test "x$as_myself" = x; then
53756  as_myself=$0
53757fi
53758if test ! -f "$as_myself"; then
53759  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
53760  exit 1
53761fi
53762
53763# Unset variables that we do not need and which cause bugs (e.g. in
53764# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
53765# suppresses any "Segmentation fault" message there.  '((' could
53766# trigger a bug in pdksh 5.2.14.
53767for as_var in BASH_ENV ENV MAIL MAILPATH
53768do eval test x\${$as_var+set} = xset \
53769  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
53770done
53771PS1='$ '
53772PS2='> '
53773PS4='+ '
53774
53775# NLS nuisances.
53776LC_ALL=C
53777export LC_ALL
53778LANGUAGE=C
53779export LANGUAGE
53780
53781# CDPATH.
53782(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
53783
53784
53785# as_fn_error STATUS ERROR [LINENO LOG_FD]
53786# ----------------------------------------
53787# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
53788# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
53789# script with STATUS, using 1 if that was 0.
53790as_fn_error ()
53791{
53792  as_status=$1; test $as_status -eq 0 && as_status=1
53793  if test "$4"; then
53794    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
53795    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
53796  fi
53797  $as_echo "$as_me: error: $2" >&2
53798  as_fn_exit $as_status
53799} # as_fn_error
53800
53801
53802# as_fn_set_status STATUS
53803# -----------------------
53804# Set $? to STATUS, without forking.
53805as_fn_set_status ()
53806{
53807  return $1
53808} # as_fn_set_status
53809
53810# as_fn_exit STATUS
53811# -----------------
53812# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
53813as_fn_exit ()
53814{
53815  set +e
53816  as_fn_set_status $1
53817  exit $1
53818} # as_fn_exit
53819
53820# as_fn_unset VAR
53821# ---------------
53822# Portably unset VAR.
53823as_fn_unset ()
53824{
53825  { eval $1=; unset $1;}
53826}
53827as_unset=as_fn_unset
53828# as_fn_append VAR VALUE
53829# ----------------------
53830# Append the text in VALUE to the end of the definition contained in VAR. Take
53831# advantage of any shell optimizations that allow amortized linear growth over
53832# repeated appends, instead of the typical quadratic growth present in naive
53833# implementations.
53834if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
53835  eval 'as_fn_append ()
53836  {
53837    eval $1+=\$2
53838  }'
53839else
53840  as_fn_append ()
53841  {
53842    eval $1=\$$1\$2
53843  }
53844fi # as_fn_append
53845
53846# as_fn_arith ARG...
53847# ------------------
53848# Perform arithmetic evaluation on the ARGs, and store the result in the
53849# global $as_val. Take advantage of shells that can avoid forks. The arguments
53850# must be portable across $(()) and expr.
53851if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
53852  eval 'as_fn_arith ()
53853  {
53854    as_val=$(( $* ))
53855  }'
53856else
53857  as_fn_arith ()
53858  {
53859    as_val=`expr "$@" || test $? -eq 1`
53860  }
53861fi # as_fn_arith
53862
53863
53864if expr a : '\(a\)' >/dev/null 2>&1 &&
53865   test "X`expr 00001 : '.*\(...\)'`" = X001; then
53866  as_expr=expr
53867else
53868  as_expr=false
53869fi
53870
53871if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
53872  as_basename=basename
53873else
53874  as_basename=false
53875fi
53876
53877if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
53878  as_dirname=dirname
53879else
53880  as_dirname=false
53881fi
53882
53883as_me=`$as_basename -- "$0" ||
53884$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
53885	 X"$0" : 'X\(//\)$' \| \
53886	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
53887$as_echo X/"$0" |
53888    sed '/^.*\/\([^/][^/]*\)\/*$/{
53889	    s//\1/
53890	    q
53891	  }
53892	  /^X\/\(\/\/\)$/{
53893	    s//\1/
53894	    q
53895	  }
53896	  /^X\/\(\/\).*/{
53897	    s//\1/
53898	    q
53899	  }
53900	  s/.*/./; q'`
53901
53902# Avoid depending upon Character Ranges.
53903as_cr_letters='abcdefghijklmnopqrstuvwxyz'
53904as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
53905as_cr_Letters=$as_cr_letters$as_cr_LETTERS
53906as_cr_digits='0123456789'
53907as_cr_alnum=$as_cr_Letters$as_cr_digits
53908
53909ECHO_C= ECHO_N= ECHO_T=
53910case `echo -n x` in #(((((
53911-n*)
53912  case `echo 'xy\c'` in
53913  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
53914  xy)  ECHO_C='\c';;
53915  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
53916       ECHO_T='	';;
53917  esac;;
53918*)
53919  ECHO_N='-n';;
53920esac
53921
53922rm -f conf$$ conf$$.exe conf$$.file
53923if test -d conf$$.dir; then
53924  rm -f conf$$.dir/conf$$.file
53925else
53926  rm -f conf$$.dir
53927  mkdir conf$$.dir 2>/dev/null
53928fi
53929if (echo >conf$$.file) 2>/dev/null; then
53930  if ln -s conf$$.file conf$$ 2>/dev/null; then
53931    as_ln_s='ln -s'
53932    # ... but there are two gotchas:
53933    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
53934    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
53935    # In both cases, we have to default to `cp -pR'.
53936    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
53937      as_ln_s='cp -pR'
53938  elif ln conf$$.file conf$$ 2>/dev/null; then
53939    as_ln_s=ln
53940  else
53941    as_ln_s='cp -pR'
53942  fi
53943else
53944  as_ln_s='cp -pR'
53945fi
53946rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
53947rmdir conf$$.dir 2>/dev/null
53948
53949
53950# as_fn_mkdir_p
53951# -------------
53952# Create "$as_dir" as a directory, including parents if necessary.
53953as_fn_mkdir_p ()
53954{
53955
53956  case $as_dir in #(
53957  -*) as_dir=./$as_dir;;
53958  esac
53959  test -d "$as_dir" || eval $as_mkdir_p || {
53960    as_dirs=
53961    while :; do
53962      case $as_dir in #(
53963      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
53964      *) as_qdir=$as_dir;;
53965      esac
53966      as_dirs="'$as_qdir' $as_dirs"
53967      as_dir=`$as_dirname -- "$as_dir" ||
53968$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
53969	 X"$as_dir" : 'X\(//\)[^/]' \| \
53970	 X"$as_dir" : 'X\(//\)$' \| \
53971	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
53972$as_echo X"$as_dir" |
53973    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
53974	    s//\1/
53975	    q
53976	  }
53977	  /^X\(\/\/\)[^/].*/{
53978	    s//\1/
53979	    q
53980	  }
53981	  /^X\(\/\/\)$/{
53982	    s//\1/
53983	    q
53984	  }
53985	  /^X\(\/\).*/{
53986	    s//\1/
53987	    q
53988	  }
53989	  s/.*/./; q'`
53990      test -d "$as_dir" && break
53991    done
53992    test -z "$as_dirs" || eval "mkdir $as_dirs"
53993  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
53994
53995
53996} # as_fn_mkdir_p
53997if mkdir -p . 2>/dev/null; then
53998  as_mkdir_p='mkdir -p "$as_dir"'
53999else
54000  test -d ./-p && rmdir ./-p
54001  as_mkdir_p=false
54002fi
54003
54004
54005# as_fn_executable_p FILE
54006# -----------------------
54007# Test if FILE is an executable regular file.
54008as_fn_executable_p ()
54009{
54010  test -f "$1" && test -x "$1"
54011} # as_fn_executable_p
54012as_test_x='test -x'
54013as_executable_p=as_fn_executable_p
54014
54015# Sed expression to map a string onto a valid CPP name.
54016as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
54017
54018# Sed expression to map a string onto a valid variable name.
54019as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
54020
54021
54022exec 6>&1
54023## ----------------------------------- ##
54024## Main body of $CONFIG_STATUS script. ##
54025## ----------------------------------- ##
54026_ASEOF
54027test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
54028
54029cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54030# Save the log message, to keep $0 and so on meaningful, and to
54031# report actual input values of CONFIG_FILES etc. instead of their
54032# values after options handling.
54033ac_log="
54034This file was extended by OpenJDK $as_me jdk9, which was
54035generated by GNU Autoconf 2.69.  Invocation command line was
54036
54037  CONFIG_FILES    = $CONFIG_FILES
54038  CONFIG_HEADERS  = $CONFIG_HEADERS
54039  CONFIG_LINKS    = $CONFIG_LINKS
54040  CONFIG_COMMANDS = $CONFIG_COMMANDS
54041  $ $0 $@
54042
54043on `(hostname || uname -n) 2>/dev/null | sed 1q`
54044"
54045
54046_ACEOF
54047
54048case $ac_config_files in *"
54049"*) set x $ac_config_files; shift; ac_config_files=$*;;
54050esac
54051
54052
54053
54054cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54055# Files that config.status was made for.
54056config_files="$ac_config_files"
54057
54058_ACEOF
54059
54060cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54061ac_cs_usage="\
54062\`$as_me' instantiates files and other configuration actions
54063from templates according to the current configuration.  Unless the files
54064and actions are specified as TAGs, all are instantiated by default.
54065
54066Usage: $0 [OPTION]... [TAG]...
54067
54068  -h, --help       print this help, then exit
54069  -V, --version    print version number and configuration settings, then exit
54070      --config     print configuration, then exit
54071  -q, --quiet, --silent
54072                   do not print progress messages
54073  -d, --debug      don't remove temporary files
54074      --recheck    update $as_me by reconfiguring in the same conditions
54075      --file=FILE[:TEMPLATE]
54076                   instantiate the configuration file FILE
54077
54078Configuration files:
54079$config_files
54080
54081Report bugs to <build-dev@openjdk.java.net>.
54082OpenJDK home page: <http://openjdk.java.net>."
54083
54084_ACEOF
54085cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54086ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
54087ac_cs_version="\\
54088OpenJDK config.status jdk9
54089configured by $0, generated by GNU Autoconf 2.69,
54090  with options \\"\$ac_cs_config\\"
54091
54092Copyright (C) 2012 Free Software Foundation, Inc.
54093This config.status script is free software; the Free Software Foundation
54094gives unlimited permission to copy, distribute and modify it."
54095
54096ac_pwd='$ac_pwd'
54097srcdir='$srcdir'
54098AWK='$AWK'
54099test -n "\$AWK" || AWK=awk
54100_ACEOF
54101
54102cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54103# The default lists apply if the user does not specify any file.
54104ac_need_defaults=:
54105while test $# != 0
54106do
54107  case $1 in
54108  --*=?*)
54109    ac_option=`expr "X$1" : 'X\([^=]*\)='`
54110    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
54111    ac_shift=:
54112    ;;
54113  --*=)
54114    ac_option=`expr "X$1" : 'X\([^=]*\)='`
54115    ac_optarg=
54116    ac_shift=:
54117    ;;
54118  *)
54119    ac_option=$1
54120    ac_optarg=$2
54121    ac_shift=shift
54122    ;;
54123  esac
54124
54125  case $ac_option in
54126  # Handling of the options.
54127  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
54128    ac_cs_recheck=: ;;
54129  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
54130    $as_echo "$ac_cs_version"; exit ;;
54131  --config | --confi | --conf | --con | --co | --c )
54132    $as_echo "$ac_cs_config"; exit ;;
54133  --debug | --debu | --deb | --de | --d | -d )
54134    debug=: ;;
54135  --file | --fil | --fi | --f )
54136    $ac_shift
54137    case $ac_optarg in
54138    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
54139    '') as_fn_error $? "missing file argument" ;;
54140    esac
54141    as_fn_append CONFIG_FILES " '$ac_optarg'"
54142    ac_need_defaults=false;;
54143  --he | --h |  --help | --hel | -h )
54144    $as_echo "$ac_cs_usage"; exit ;;
54145  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
54146  | -silent | --silent | --silen | --sile | --sil | --si | --s)
54147    ac_cs_silent=: ;;
54148
54149  # This is an error.
54150  -*) as_fn_error $? "unrecognized option: \`$1'
54151Try \`$0 --help' for more information." ;;
54152
54153  *) as_fn_append ac_config_targets " $1"
54154     ac_need_defaults=false ;;
54155
54156  esac
54157  shift
54158done
54159
54160ac_configure_extra_args=
54161
54162if $ac_cs_silent; then
54163  exec 6>/dev/null
54164  ac_configure_extra_args="$ac_configure_extra_args --silent"
54165fi
54166
54167_ACEOF
54168cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54169if \$ac_cs_recheck; then
54170  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
54171  shift
54172  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
54173  CONFIG_SHELL='$SHELL'
54174  export CONFIG_SHELL
54175  exec "\$@"
54176fi
54177
54178_ACEOF
54179cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54180exec 5>>config.log
54181{
54182  echo
54183  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
54184## Running $as_me. ##
54185_ASBOX
54186  $as_echo "$ac_log"
54187} >&5
54188
54189_ACEOF
54190cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54191_ACEOF
54192
54193cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54194
54195# Handling of arguments.
54196for ac_config_target in $ac_config_targets
54197do
54198  case $ac_config_target in
54199    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
54200    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
54201    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
54202    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
54203    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
54204
54205  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
54206  esac
54207done
54208
54209
54210# If the user did not use the arguments to specify the items to instantiate,
54211# then the envvar interface is used.  Set only those that are not.
54212# We use the long form for the default assignment because of an extremely
54213# bizarre bug on SunOS 4.1.3.
54214if $ac_need_defaults; then
54215  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
54216fi
54217
54218# Have a temporary directory for convenience.  Make it in the build tree
54219# simply because there is no reason against having it here, and in addition,
54220# creating and moving files from /tmp can sometimes cause problems.
54221# Hook for its removal unless debugging.
54222# Note that there is a small window in which the directory will not be cleaned:
54223# after its creation but before its name has been assigned to `$tmp'.
54224$debug ||
54225{
54226  tmp= ac_tmp=
54227  trap 'exit_status=$?
54228  : "${ac_tmp:=$tmp}"
54229  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
54230' 0
54231  trap 'as_fn_exit 1' 1 2 13 15
54232}
54233# Create a (secure) tmp directory for tmp files.
54234
54235{
54236  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
54237  test -d "$tmp"
54238}  ||
54239{
54240  tmp=./conf$$-$RANDOM
54241  (umask 077 && mkdir "$tmp")
54242} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
54243ac_tmp=$tmp
54244
54245# Set up the scripts for CONFIG_FILES section.
54246# No need to generate them if there are no CONFIG_FILES.
54247# This happens for instance with `./config.status config.h'.
54248if test -n "$CONFIG_FILES"; then
54249
54250
54251ac_cr=`echo X | tr X '\015'`
54252# On cygwin, bash can eat \r inside `` if the user requested igncr.
54253# But we know of no other shell where ac_cr would be empty at this
54254# point, so we can use a bashism as a fallback.
54255if test "x$ac_cr" = x; then
54256  eval ac_cr=\$\'\\r\'
54257fi
54258ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
54259if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
54260  ac_cs_awk_cr='\\r'
54261else
54262  ac_cs_awk_cr=$ac_cr
54263fi
54264
54265echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
54266_ACEOF
54267
54268
54269{
54270  echo "cat >conf$$subs.awk <<_ACEOF" &&
54271  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
54272  echo "_ACEOF"
54273} >conf$$subs.sh ||
54274  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
54275ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
54276ac_delim='%!_!# '
54277for ac_last_try in false false false false false :; do
54278  . ./conf$$subs.sh ||
54279    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
54280
54281  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
54282  if test $ac_delim_n = $ac_delim_num; then
54283    break
54284  elif $ac_last_try; then
54285    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
54286  else
54287    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
54288  fi
54289done
54290rm -f conf$$subs.sh
54291
54292cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54293cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
54294_ACEOF
54295sed -n '
54296h
54297s/^/S["/; s/!.*/"]=/
54298p
54299g
54300s/^[^!]*!//
54301:repl
54302t repl
54303s/'"$ac_delim"'$//
54304t delim
54305:nl
54306h
54307s/\(.\{148\}\)..*/\1/
54308t more1
54309s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
54310p
54311n
54312b repl
54313:more1
54314s/["\\]/\\&/g; s/^/"/; s/$/"\\/
54315p
54316g
54317s/.\{148\}//
54318t nl
54319:delim
54320h
54321s/\(.\{148\}\)..*/\1/
54322t more2
54323s/["\\]/\\&/g; s/^/"/; s/$/"/
54324p
54325b
54326:more2
54327s/["\\]/\\&/g; s/^/"/; s/$/"\\/
54328p
54329g
54330s/.\{148\}//
54331t delim
54332' <conf$$subs.awk | sed '
54333/^[^""]/{
54334  N
54335  s/\n//
54336}
54337' >>$CONFIG_STATUS || ac_write_fail=1
54338rm -f conf$$subs.awk
54339cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54340_ACAWK
54341cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
54342  for (key in S) S_is_set[key] = 1
54343  FS = ""
54344
54345}
54346{
54347  line = $ 0
54348  nfields = split(line, field, "@")
54349  substed = 0
54350  len = length(field[1])
54351  for (i = 2; i < nfields; i++) {
54352    key = field[i]
54353    keylen = length(key)
54354    if (S_is_set[key]) {
54355      value = S[key]
54356      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
54357      len += length(value) + length(field[++i])
54358      substed = 1
54359    } else
54360      len += 1 + keylen
54361  }
54362
54363  print line
54364}
54365
54366_ACAWK
54367_ACEOF
54368cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54369if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
54370  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
54371else
54372  cat
54373fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
54374  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
54375_ACEOF
54376
54377# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
54378# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
54379# trailing colons and then remove the whole line if VPATH becomes empty
54380# (actually we leave an empty line to preserve line numbers).
54381if test "x$srcdir" = x.; then
54382  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
54383h
54384s///
54385s/^/:/
54386s/[	 ]*$/:/
54387s/:\$(srcdir):/:/g
54388s/:\${srcdir}:/:/g
54389s/:@srcdir@:/:/g
54390s/^:*//
54391s/:*$//
54392x
54393s/\(=[	 ]*\).*/\1/
54394G
54395s/\n//
54396s/^[^=]*=[	 ]*$//
54397}'
54398fi
54399
54400cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54401fi # test -n "$CONFIG_FILES"
54402
54403
54404eval set X "  :F $CONFIG_FILES      "
54405shift
54406for ac_tag
54407do
54408  case $ac_tag in
54409  :[FHLC]) ac_mode=$ac_tag; continue;;
54410  esac
54411  case $ac_mode$ac_tag in
54412  :[FHL]*:*);;
54413  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
54414  :[FH]-) ac_tag=-:-;;
54415  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
54416  esac
54417  ac_save_IFS=$IFS
54418  IFS=:
54419  set x $ac_tag
54420  IFS=$ac_save_IFS
54421  shift
54422  ac_file=$1
54423  shift
54424
54425  case $ac_mode in
54426  :L) ac_source=$1;;
54427  :[FH])
54428    ac_file_inputs=
54429    for ac_f
54430    do
54431      case $ac_f in
54432      -) ac_f="$ac_tmp/stdin";;
54433      *) # Look for the file first in the build tree, then in the source tree
54434	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
54435	 # because $ac_f cannot contain `:'.
54436	 test -f "$ac_f" ||
54437	   case $ac_f in
54438	   [\\/$]*) false;;
54439	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
54440	   esac ||
54441	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
54442      esac
54443      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
54444      as_fn_append ac_file_inputs " '$ac_f'"
54445    done
54446
54447    # Let's still pretend it is `configure' which instantiates (i.e., don't
54448    # use $as_me), people would be surprised to read:
54449    #    /* config.h.  Generated by config.status.  */
54450    configure_input='Generated from '`
54451	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
54452	`' by configure.'
54453    if test x"$ac_file" != x-; then
54454      configure_input="$ac_file.  $configure_input"
54455      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
54456$as_echo "$as_me: creating $ac_file" >&6;}
54457    fi
54458    # Neutralize special characters interpreted by sed in replacement strings.
54459    case $configure_input in #(
54460    *\&* | *\|* | *\\* )
54461       ac_sed_conf_input=`$as_echo "$configure_input" |
54462       sed 's/[\\\\&|]/\\\\&/g'`;; #(
54463    *) ac_sed_conf_input=$configure_input;;
54464    esac
54465
54466    case $ac_tag in
54467    *:-:* | *:-) cat >"$ac_tmp/stdin" \
54468      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
54469    esac
54470    ;;
54471  esac
54472
54473  ac_dir=`$as_dirname -- "$ac_file" ||
54474$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
54475	 X"$ac_file" : 'X\(//\)[^/]' \| \
54476	 X"$ac_file" : 'X\(//\)$' \| \
54477	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
54478$as_echo X"$ac_file" |
54479    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
54480	    s//\1/
54481	    q
54482	  }
54483	  /^X\(\/\/\)[^/].*/{
54484	    s//\1/
54485	    q
54486	  }
54487	  /^X\(\/\/\)$/{
54488	    s//\1/
54489	    q
54490	  }
54491	  /^X\(\/\).*/{
54492	    s//\1/
54493	    q
54494	  }
54495	  s/.*/./; q'`
54496  as_dir="$ac_dir"; as_fn_mkdir_p
54497  ac_builddir=.
54498
54499case "$ac_dir" in
54500.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
54501*)
54502  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
54503  # A ".." for each directory in $ac_dir_suffix.
54504  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
54505  case $ac_top_builddir_sub in
54506  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
54507  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
54508  esac ;;
54509esac
54510ac_abs_top_builddir=$ac_pwd
54511ac_abs_builddir=$ac_pwd$ac_dir_suffix
54512# for backward compatibility:
54513ac_top_builddir=$ac_top_build_prefix
54514
54515case $srcdir in
54516  .)  # We are building in place.
54517    ac_srcdir=.
54518    ac_top_srcdir=$ac_top_builddir_sub
54519    ac_abs_top_srcdir=$ac_pwd ;;
54520  [\\/]* | ?:[\\/]* )  # Absolute name.
54521    ac_srcdir=$srcdir$ac_dir_suffix;
54522    ac_top_srcdir=$srcdir
54523    ac_abs_top_srcdir=$srcdir ;;
54524  *) # Relative name.
54525    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
54526    ac_top_srcdir=$ac_top_build_prefix$srcdir
54527    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
54528esac
54529ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
54530
54531
54532  case $ac_mode in
54533  :F)
54534  #
54535  # CONFIG_FILE
54536  #
54537
54538_ACEOF
54539
54540cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54541# If the template does not know about datarootdir, expand it.
54542# FIXME: This hack should be removed a few years after 2.60.
54543ac_datarootdir_hack=; ac_datarootdir_seen=
54544ac_sed_dataroot='
54545/datarootdir/ {
54546  p
54547  q
54548}
54549/@datadir@/p
54550/@docdir@/p
54551/@infodir@/p
54552/@localedir@/p
54553/@mandir@/p'
54554case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
54555*datarootdir*) ac_datarootdir_seen=yes;;
54556*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
54557  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
54558$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
54559_ACEOF
54560cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54561  ac_datarootdir_hack='
54562  s&@datadir@&$datadir&g
54563  s&@docdir@&$docdir&g
54564  s&@infodir@&$infodir&g
54565  s&@localedir@&$localedir&g
54566  s&@mandir@&$mandir&g
54567  s&\\\${datarootdir}&$datarootdir&g' ;;
54568esac
54569_ACEOF
54570
54571# Neutralize VPATH when `$srcdir' = `.'.
54572# Shell code in configure.ac might set extrasub.
54573# FIXME: do we really want to maintain this feature?
54574cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54575ac_sed_extra="$ac_vpsub
54576$extrasub
54577_ACEOF
54578cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54579:t
54580/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
54581s|@configure_input@|$ac_sed_conf_input|;t t
54582s&@top_builddir@&$ac_top_builddir_sub&;t t
54583s&@top_build_prefix@&$ac_top_build_prefix&;t t
54584s&@srcdir@&$ac_srcdir&;t t
54585s&@abs_srcdir@&$ac_abs_srcdir&;t t
54586s&@top_srcdir@&$ac_top_srcdir&;t t
54587s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
54588s&@builddir@&$ac_builddir&;t t
54589s&@abs_builddir@&$ac_abs_builddir&;t t
54590s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
54591$ac_datarootdir_hack
54592"
54593eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
54594  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
54595
54596test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
54597  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
54598  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
54599      "$ac_tmp/out"`; test -z "$ac_out"; } &&
54600  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
54601which seems to be undefined.  Please make sure it is defined" >&5
54602$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
54603which seems to be undefined.  Please make sure it is defined" >&2;}
54604
54605  rm -f "$ac_tmp/stdin"
54606  case $ac_file in
54607  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
54608  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
54609  esac \
54610  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
54611 ;;
54612
54613
54614
54615  esac
54616
54617done # for ac_tag
54618
54619
54620as_fn_exit 0
54621_ACEOF
54622ac_clean_files=$ac_clean_files_save
54623
54624test $ac_write_fail = 0 ||
54625  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
54626
54627
54628# configure is writing to config.log, and then calls config.status.
54629# config.status does its own redirection, appending to config.log.
54630# Unfortunately, on DOS this fails, as config.log is still kept open
54631# by configure, so config.status won't be able to write to it; its
54632# output is simply discarded.  So we exec the FD to /dev/null,
54633# effectively closing config.log, so it can be properly (re)opened and
54634# appended to by config.status.  When coming back to configure, we
54635# need to make the FD available again.
54636if test "$no_create" != yes; then
54637  ac_cs_success=:
54638  ac_config_status_args=
54639  test "$silent" = yes &&
54640    ac_config_status_args="$ac_config_status_args --quiet"
54641  exec 5>/dev/null
54642  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
54643  exec 5>>config.log
54644  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
54645  # would make configure fail if this is the last instruction.
54646  $ac_cs_success || as_fn_exit 1
54647fi
54648if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
54649  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
54650$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
54651fi
54652
54653
54654# After AC_OUTPUT, we need to do final work
54655
54656
54657  # Try to move config.log (generated by autoconf) to the configure-support directory.
54658  if test -e ./config.log; then
54659    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
54660  fi
54661
54662  # Rotate our log file (configure.log)
54663  if test -e "$OUTPUT_ROOT/configure.log.old"; then
54664    $RM -f "$OUTPUT_ROOT/configure.log.old"
54665  fi
54666  if test -e "$OUTPUT_ROOT/configure.log"; then
54667    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
54668  fi
54669
54670  # Move configure.log from current directory to the build output root
54671  if test -e ./configure.log; then
54672    echo found it
54673    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
54674  fi
54675
54676  # Make the compare script executable
54677  $CHMOD +x $OUTPUT_ROOT/compare.sh
54678
54679
54680# Finally output some useful information to the user
54681
54682  # Finally output some useful information to the user
54683
54684  printf "\n"
54685  printf "====================================================\n"
54686  if test "x$no_create" != "xyes"; then
54687    if test "x$IS_RECONFIGURE" != "xyes"; then
54688      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
54689    else
54690      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
54691    fi
54692  else
54693    if test "x$IS_RECONFIGURE" != "xyes"; then
54694      printf "A configuration has been successfully checked but not created\n"
54695    else
54696      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
54697    fi
54698  fi
54699  if test "x$CONFIGURE_COMMAND_LINE" != x; then
54700    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
54701  else
54702    printf "using default settings.\n"
54703  fi
54704
54705  printf "\n"
54706  printf "Configuration summary:\n"
54707  printf "* Debug level:    $DEBUG_LEVEL\n"
54708  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
54709  printf "* JDK variant:    $JDK_VARIANT\n"
54710  printf "* JVM variants:   $with_jvm_variants\n"
54711  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
54712  printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
54713
54714  printf "\n"
54715  printf "Tools summary:\n"
54716  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
54717    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
54718  fi
54719  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
54720  if test "x$TOOLCHAIN_VERSION" != "x"; then
54721    print_version=" $TOOLCHAIN_VERSION"
54722  fi
54723  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
54724  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
54725  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
54726
54727  printf "\n"
54728  printf "Build performance summary:\n"
54729  printf "* Cores to use:   $JOBS\n"
54730  printf "* Memory limit:   $MEMORY_SIZE MB\n"
54731  if test "x$CCACHE_STATUS" != "x"; then
54732    printf "* ccache status:  $CCACHE_STATUS\n"
54733  fi
54734  printf "\n"
54735
54736  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
54737    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
54738    printf "will result in longer build times.\n"
54739    printf "\n"
54740  fi
54741
54742  if test "x$FOUND_ALT_VARIABLES" != "x"; then
54743    printf "WARNING: You have old-style ALT_ environment variables set.\n"
54744    printf "These are not respected, and will be ignored. It is recommended\n"
54745    printf "that you clean your environment. The following variables are set:\n"
54746    printf "$FOUND_ALT_VARIABLES\n"
54747    printf "\n"
54748  fi
54749
54750  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
54751    printf "WARNING: Your build output directory is not on a local disk.\n"
54752    printf "This will severely degrade build performance!\n"
54753    printf "It is recommended that you create an output directory on a local disk,\n"
54754    printf "and run the configure script again from that directory.\n"
54755    printf "\n"
54756  fi
54757
54758  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
54759    printf "WARNING: The result of this configuration has overridden an older\n"
54760    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
54761    printf "proper build. Failure to do so might result in strange build problems.\n"
54762    printf "\n"
54763  fi
54764
54765  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
54766    printf "WARNING: The result of this configuration was not saved.\n"
54767    printf "You should run without '--no-create | -n' to create the configuration.\n"
54768    printf "\n"
54769  fi
54770
54771
54772
54773  # Locate config.log.
54774  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
54775    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
54776  elif test -e "./config.log"; then
54777    CONFIG_LOG_PATH="."
54778  fi
54779
54780  if test -e "$CONFIG_LOG_PATH/config.log"; then
54781    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
54782    if test $? -eq 0; then
54783      printf "The following warnings were produced. Repeated here for convenience:\n"
54784      # We must quote sed expression (using []) to stop m4 from eating the [].
54785      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
54786      printf "\n"
54787    fi
54788  fi
54789
54790