generated-configure.sh revision 1633:0b0a6b9ed991
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_SYMBOLS
722CFLAGS_DEBUG_SYMBOLS
723CXX_FLAG_DEPS
724C_FLAG_DEPS
725SET_SHARED_LIBRARY_MAPFILE
726SET_SHARED_LIBRARY_NAME
727SET_SHARED_LIBRARY_ORIGIN
728SET_EXECUTABLE_ORIGIN
729CXX_FLAG_REORDER
730C_FLAG_REORDER
731SYSROOT_LDFLAGS
732SYSROOT_CFLAGS
733RC_FLAGS
734AR_OUT_OPTION
735LD_OUT_OPTION
736EXE_OUT_OPTION
737CC_OUT_OPTION
738POST_STRIP_CMD
739ARFLAGS
740COMPILER_TARGET_BITS_FLAG
741JT_HOME
742JTREGEXE
743USING_BROKEN_SUSE_LD
744PACKAGE_PATH
745USE_CLANG
746HOTSPOT_LD
747HOTSPOT_CXX
748HOTSPOT_RC
749HOTSPOT_MT
750BUILD_LD
751BUILD_CXX
752BUILD_CC
753ac_ct_OBJDUMP
754OBJDUMP
755ac_ct_OBJCOPY
756OBJCOPY
757ac_ct_NM
758ac_ct_STRIP
759GNM
760NM
761STRIP
762MSBUILD
763DUMPBIN
764RC
765MT
766LIPO
767ac_ct_AR
768AR
769AS
770LDCXX
771LD
772CXXCPP
773CPP
774ac_ct_CXX
775CXXFLAGS
776CXX
777ac_ct_PROPER_COMPILER_CXX
778PROPER_COMPILER_CXX
779TOOLCHAIN_PATH_CXX
780POTENTIAL_CXX
781OBJEXT
782EXEEXT
783ac_ct_CC
784CPPFLAGS
785LDFLAGS
786CFLAGS
787CC
788ac_ct_PROPER_COMPILER_CC
789PROPER_COMPILER_CC
790TOOLCHAIN_PATH_CC
791POTENTIAL_CC
792VS_LIB
793VS_INCLUDE
794VS_PATH
795CYGWIN_LINK
796EXE_SUFFIX
797OBJ_SUFFIX
798STATIC_LIBRARY
799SHARED_LIBRARY
800STATIC_LIBRARY_SUFFIX
801SHARED_LIBRARY_SUFFIX
802LIBRARY_PREFIX
803TOOLCHAIN_TYPE
804BUILD_HOTSPOT
805HOTSPOT_DIST
806BUILD_OUTPUT
807OVERRIDE_SRC_ROOT
808ADD_SRC_ROOT
809JDK_TOPDIR
810NASHORN_TOPDIR
811HOTSPOT_TOPDIR
812JAXWS_TOPDIR
813JAXP_TOPDIR
814CORBA_TOPDIR
815LANGTOOLS_TOPDIR
816JAVAC_FLAGS
817BOOT_JDK_SOURCETARGET
818JARSIGNER
819JAR
820JAVAH
821JAVAC
822JAVA
823BOOT_JDK
824JAVA_CHECK
825JAVAC_CHECK
826COOKED_BUILD_NUMBER
827JDK_VERSION
828COPYRIGHT_YEAR
829MACOSX_BUNDLE_ID_BASE
830MACOSX_BUNDLE_NAME_BASE
831COMPANY_NAME
832JDK_RC_PLATFORM_NAME
833PRODUCT_SUFFIX
834PRODUCT_NAME
835LAUNCHER_NAME
836MILESTONE
837JDK_BUILD_NUMBER
838JDK_UPDATE_VERSION
839JDK_MICRO_VERSION
840JDK_MINOR_VERSION
841JDK_MAJOR_VERSION
842USER_RELEASE_SUFFIX
843COMPRESS_JARS
844UNLIMITED_CRYPTO
845CACERTS_FILE
846TEST_IN_BUILD
847BUILD_HEADLESS
848SUPPORT_HEADFUL
849SUPPORT_HEADLESS
850BDEPS_FTP
851BDEPS_UNZIP
852OS_VERSION_MICRO
853OS_VERSION_MINOR
854OS_VERSION_MAJOR
855PKG_CONFIG
856BASH_ARGS
857SETFILE
858CODESIGN
859XATTR
860DSYMUTIL
861IS_GNU_TIME
862TIME
863STAT
864HG
865READELF
866OTOOL
867LDD
868ZIP
869UNZIP
870FIND_DELETE
871OUTPUT_SYNC
872OUTPUT_SYNC_SUPPORTED
873MAKE
874CHECK_TOOLSDIR_MAKE
875CHECK_TOOLSDIR_GMAKE
876CHECK_MAKE
877CHECK_GMAKE
878PKGHANDLER
879CONFIGURESUPPORT_OUTPUTDIR
880OUTPUT_ROOT
881CONF_NAME
882SPEC
883SDKROOT
884XCODEBUILD
885BUILD_VARIANT_RELEASE
886DEBUG_CLASSFILES
887FASTDEBUG
888VARIANT
889DEBUG_LEVEL
890MACOSX_UNIVERSAL
891INCLUDE_SA
892JVM_VARIANT_CORE
893JVM_VARIANT_ZEROSHARK
894JVM_VARIANT_ZERO
895JVM_VARIANT_KERNEL
896JVM_VARIANT_MINIMAL1
897JVM_VARIANT_CLIENT
898JVM_VARIANT_SERVER
899JVM_VARIANTS
900JVM_INTERPRETER
901JDK_VARIANT
902SET_OPENJDK
903CANONICAL_TOPDIR
904ORIGINAL_TOPDIR
905TOPDIR
906PATH_SEP
907ZERO_ARCHDEF
908DEFINE_CROSS_COMPILE_ARCH
909LP64
910OPENJDK_TARGET_OS_EXPORT_DIR
911OPENJDK_TARGET_CPU_JLI_CFLAGS
912OPENJDK_TARGET_CPU_OSARCH
913OPENJDK_TARGET_CPU_ISADIR
914OPENJDK_TARGET_CPU_LIBDIR
915OPENJDK_TARGET_CPU_LEGACY_LIB
916OPENJDK_TARGET_CPU_LEGACY
917REQUIRED_OS_VERSION
918REQUIRED_OS_NAME
919COMPILE_TYPE
920OPENJDK_TARGET_CPU_ENDIAN
921OPENJDK_TARGET_CPU_BITS
922OPENJDK_TARGET_CPU_ARCH
923OPENJDK_TARGET_CPU
924OPENJDK_TARGET_OS_ENV
925OPENJDK_TARGET_OS_TYPE
926OPENJDK_TARGET_OS
927OPENJDK_BUILD_CPU_ENDIAN
928OPENJDK_BUILD_CPU_BITS
929OPENJDK_BUILD_CPU_ARCH
930OPENJDK_BUILD_CPU
931OPENJDK_BUILD_OS_ENV
932OPENJDK_BUILD_OS_TYPE
933OPENJDK_BUILD_OS
934OPENJDK_BUILD_AUTOCONF_NAME
935OPENJDK_TARGET_AUTOCONF_NAME
936target_os
937target_vendor
938target_cpu
939target
940host_os
941host_vendor
942host_cpu
943host
944build_os
945build_vendor
946build_cpu
947build
948CPIO
949DF
950READLINK
951CYGPATH
952SED
953FGREP
954EGREP
955GREP
956AWK
957XARGS
958WHICH
959WC
960UNIQ
961UNAME
962TR
963TOUCH
964TEE
965TAR
966TAIL
967SORT
968SH
969RM
970PRINTF
971NAWK
972MV
973MKTEMP
974MKDIR
975LS
976LN
977HEAD
978FIND
979FILE
980EXPR
981ECHO
982DIRNAME
983DIFF
984DATE
985CUT
986CP
987COMM
988CMP
989CHMOD
990CAT
991BASH
992BASENAME
993DATE_WHEN_CONFIGURED
994ORIGINAL_PATH
995CONFIGURE_COMMAND_LINE
996target_alias
997host_alias
998build_alias
999LIBS
1000ECHO_T
1001ECHO_N
1002ECHO_C
1003DEFS
1004mandir
1005localedir
1006libdir
1007psdir
1008pdfdir
1009dvidir
1010htmldir
1011infodir
1012docdir
1013oldincludedir
1014includedir
1015localstatedir
1016sharedstatedir
1017sysconfdir
1018datadir
1019datarootdir
1020libexecdir
1021sbindir
1022bindir
1023program_transform_name
1024prefix
1025exec_prefix
1026PACKAGE_URL
1027PACKAGE_BUGREPORT
1028PACKAGE_STRING
1029PACKAGE_VERSION
1030PACKAGE_TARNAME
1031PACKAGE_NAME
1032PATH_SEPARATOR
1033SHELL'
1034ac_subst_files=''
1035ac_user_opts='
1036enable_option_checking
1037with_target_bits
1038enable_openjdk_only
1039with_custom_make_dir
1040with_jdk_variant
1041with_jvm_interpreter
1042with_jvm_variants
1043enable_debug
1044with_debug_level
1045with_devkit
1046with_sys_root
1047with_sysroot
1048with_tools_dir
1049with_toolchain_path
1050with_extra_path
1051with_sdk_name
1052with_conf_name
1053with_output_sync
1054with_builddeps_conf
1055with_builddeps_server
1056with_builddeps_dir
1057with_builddeps_group
1058enable_headful
1059enable_hotspot_test_in_build
1060with_cacerts_file
1061enable_unlimited_crypto
1062with_milestone
1063with_update_version
1064with_user_release_suffix
1065with_build_number
1066with_copyright_year
1067with_boot_jdk
1068with_add_source_root
1069with_override_source_root
1070with_adds_and_overrides
1071with_override_langtools
1072with_override_corba
1073with_override_jaxp
1074with_override_jaxws
1075with_override_hotspot
1076with_override_nashorn
1077with_override_jdk
1078with_import_hotspot
1079with_toolchain_type
1080with_toolchain_version
1081with_jtreg
1082with_extra_cflags
1083with_extra_cxxflags
1084with_extra_ldflags
1085enable_warnings_as_errors
1086enable_debug_symbols
1087enable_zip_debug_info
1088enable_native_coverage
1089with_x
1090with_cups
1091with_cups_include
1092with_freetype
1093with_freetype_include
1094with_freetype_lib
1095with_freetype_src
1096enable_freetype_bundling
1097with_alsa
1098with_alsa_include
1099with_alsa_lib
1100with_libjpeg
1101with_giflib
1102with_lcms
1103with_libpng
1104with_zlib
1105with_stdc__lib
1106with_msvcr_dll
1107with_msvcp_dll
1108with_dxsdk
1109with_dxsdk_lib
1110with_dxsdk_include
1111with_num_cores
1112with_memory_size
1113with_jobs
1114with_boot_jdk_jvmargs
1115with_sjavac_server_java
1116enable_sjavac
1117enable_precompiled_headers
1118enable_ccache
1119with_ccache_dir
1120'
1121      ac_precious_vars='build_alias
1122host_alias
1123target_alias
1124BASENAME
1125BASH
1126CAT
1127CHMOD
1128CMP
1129COMM
1130CP
1131CUT
1132DATE
1133DIFF
1134DIRNAME
1135ECHO
1136EXPR
1137FILE
1138FIND
1139HEAD
1140LN
1141LS
1142MKDIR
1143MKTEMP
1144MV
1145NAWK
1146PRINTF
1147RM
1148SH
1149SORT
1150TAIL
1151TAR
1152TEE
1153TOUCH
1154TR
1155UNAME
1156UNIQ
1157WC
1158WHICH
1159XARGS
1160AWK
1161GREP
1162EGREP
1163FGREP
1164SED
1165CYGPATH
1166READLINK
1167DF
1168CPIO
1169UNZIP
1170ZIP
1171LDD
1172OTOOL
1173READELF
1174HG
1175STAT
1176TIME
1177DSYMUTIL
1178XATTR
1179CODESIGN
1180SETFILE
1181PKG_CONFIG
1182JAVA
1183JAVAC
1184JAVAH
1185JAR
1186JARSIGNER
1187CC
1188CFLAGS
1189LDFLAGS
1190LIBS
1191CPPFLAGS
1192CXX
1193CXXFLAGS
1194CCC
1195CPP
1196CXXCPP
1197AS
1198AR
1199LIPO
1200STRIP
1201NM
1202GNM
1203OBJCOPY
1204OBJDUMP
1205BUILD_CC
1206BUILD_CXX
1207BUILD_LD
1208JTREGEXE
1209XMKMF
1210FREETYPE_CFLAGS
1211FREETYPE_LIBS
1212ALSA_CFLAGS
1213ALSA_LIBS
1214LCMS_CFLAGS
1215LCMS_LIBS
1216PNG_CFLAGS
1217PNG_LIBS
1218LIBFFI_CFLAGS
1219LIBFFI_LIBS
1220CCACHE'
1221
1222
1223# Initialize some variables set by options.
1224ac_init_help=
1225ac_init_version=false
1226ac_unrecognized_opts=
1227ac_unrecognized_sep=
1228# The variables have the same names as the options, with
1229# dashes changed to underlines.
1230cache_file=/dev/null
1231exec_prefix=NONE
1232no_create=
1233no_recursion=
1234prefix=NONE
1235program_prefix=NONE
1236program_suffix=NONE
1237program_transform_name=s,x,x,
1238silent=
1239site=
1240srcdir=
1241verbose=
1242x_includes=NONE
1243x_libraries=NONE
1244
1245# Installation directory options.
1246# These are left unexpanded so users can "make install exec_prefix=/foo"
1247# and all the variables that are supposed to be based on exec_prefix
1248# by default will actually change.
1249# Use braces instead of parens because sh, perl, etc. also accept them.
1250# (The list follows the same order as the GNU Coding Standards.)
1251bindir='${exec_prefix}/bin'
1252sbindir='${exec_prefix}/sbin'
1253libexecdir='${exec_prefix}/libexec'
1254datarootdir='${prefix}/share'
1255datadir='${datarootdir}'
1256sysconfdir='${prefix}/etc'
1257sharedstatedir='${prefix}/com'
1258localstatedir='${prefix}/var'
1259includedir='${prefix}/include'
1260oldincludedir='/usr/include'
1261docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1262infodir='${datarootdir}/info'
1263htmldir='${docdir}'
1264dvidir='${docdir}'
1265pdfdir='${docdir}'
1266psdir='${docdir}'
1267libdir='${exec_prefix}/lib'
1268localedir='${datarootdir}/locale'
1269mandir='${datarootdir}/man'
1270
1271ac_prev=
1272ac_dashdash=
1273for ac_option
1274do
1275  # If the previous option needs an argument, assign it.
1276  if test -n "$ac_prev"; then
1277    eval $ac_prev=\$ac_option
1278    ac_prev=
1279    continue
1280  fi
1281
1282  case $ac_option in
1283  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1284  *=)   ac_optarg= ;;
1285  *)    ac_optarg=yes ;;
1286  esac
1287
1288  # Accept the important Cygnus configure options, so we can diagnose typos.
1289
1290  case $ac_dashdash$ac_option in
1291  --)
1292    ac_dashdash=yes ;;
1293
1294  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1295    ac_prev=bindir ;;
1296  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1297    bindir=$ac_optarg ;;
1298
1299  -build | --build | --buil | --bui | --bu)
1300    ac_prev=build_alias ;;
1301  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1302    build_alias=$ac_optarg ;;
1303
1304  -cache-file | --cache-file | --cache-fil | --cache-fi \
1305  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1306    ac_prev=cache_file ;;
1307  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1308  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1309    cache_file=$ac_optarg ;;
1310
1311  --config-cache | -C)
1312    cache_file=config.cache ;;
1313
1314  -datadir | --datadir | --datadi | --datad)
1315    ac_prev=datadir ;;
1316  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1317    datadir=$ac_optarg ;;
1318
1319  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1320  | --dataroo | --dataro | --datar)
1321    ac_prev=datarootdir ;;
1322  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1323  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1324    datarootdir=$ac_optarg ;;
1325
1326  -disable-* | --disable-*)
1327    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1328    # Reject names that are not valid shell variable names.
1329    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1330      as_fn_error $? "invalid feature name: $ac_useropt"
1331    ac_useropt_orig=$ac_useropt
1332    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1333    case $ac_user_opts in
1334      *"
1335"enable_$ac_useropt"
1336"*) ;;
1337      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1338	 ac_unrecognized_sep=', ';;
1339    esac
1340    eval enable_$ac_useropt=no ;;
1341
1342  -docdir | --docdir | --docdi | --doc | --do)
1343    ac_prev=docdir ;;
1344  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1345    docdir=$ac_optarg ;;
1346
1347  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1348    ac_prev=dvidir ;;
1349  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1350    dvidir=$ac_optarg ;;
1351
1352  -enable-* | --enable-*)
1353    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1354    # Reject names that are not valid shell variable names.
1355    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1356      as_fn_error $? "invalid feature name: $ac_useropt"
1357    ac_useropt_orig=$ac_useropt
1358    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1359    case $ac_user_opts in
1360      *"
1361"enable_$ac_useropt"
1362"*) ;;
1363      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1364	 ac_unrecognized_sep=', ';;
1365    esac
1366    eval enable_$ac_useropt=\$ac_optarg ;;
1367
1368  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1369  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1370  | --exec | --exe | --ex)
1371    ac_prev=exec_prefix ;;
1372  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1373  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1374  | --exec=* | --exe=* | --ex=*)
1375    exec_prefix=$ac_optarg ;;
1376
1377  -gas | --gas | --ga | --g)
1378    # Obsolete; use --with-gas.
1379    with_gas=yes ;;
1380
1381  -help | --help | --hel | --he | -h)
1382    ac_init_help=long ;;
1383  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1384    ac_init_help=recursive ;;
1385  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1386    ac_init_help=short ;;
1387
1388  -host | --host | --hos | --ho)
1389    ac_prev=host_alias ;;
1390  -host=* | --host=* | --hos=* | --ho=*)
1391    host_alias=$ac_optarg ;;
1392
1393  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1394    ac_prev=htmldir ;;
1395  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1396  | --ht=*)
1397    htmldir=$ac_optarg ;;
1398
1399  -includedir | --includedir | --includedi | --included | --include \
1400  | --includ | --inclu | --incl | --inc)
1401    ac_prev=includedir ;;
1402  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1403  | --includ=* | --inclu=* | --incl=* | --inc=*)
1404    includedir=$ac_optarg ;;
1405
1406  -infodir | --infodir | --infodi | --infod | --info | --inf)
1407    ac_prev=infodir ;;
1408  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1409    infodir=$ac_optarg ;;
1410
1411  -libdir | --libdir | --libdi | --libd)
1412    ac_prev=libdir ;;
1413  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1414    libdir=$ac_optarg ;;
1415
1416  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1417  | --libexe | --libex | --libe)
1418    ac_prev=libexecdir ;;
1419  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1420  | --libexe=* | --libex=* | --libe=*)
1421    libexecdir=$ac_optarg ;;
1422
1423  -localedir | --localedir | --localedi | --localed | --locale)
1424    ac_prev=localedir ;;
1425  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1426    localedir=$ac_optarg ;;
1427
1428  -localstatedir | --localstatedir | --localstatedi | --localstated \
1429  | --localstate | --localstat | --localsta | --localst | --locals)
1430    ac_prev=localstatedir ;;
1431  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1432  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1433    localstatedir=$ac_optarg ;;
1434
1435  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1436    ac_prev=mandir ;;
1437  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1438    mandir=$ac_optarg ;;
1439
1440  -nfp | --nfp | --nf)
1441    # Obsolete; use --without-fp.
1442    with_fp=no ;;
1443
1444  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1445  | --no-cr | --no-c | -n)
1446    no_create=yes ;;
1447
1448  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1449  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1450    no_recursion=yes ;;
1451
1452  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1453  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1454  | --oldin | --oldi | --old | --ol | --o)
1455    ac_prev=oldincludedir ;;
1456  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1457  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1458  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1459    oldincludedir=$ac_optarg ;;
1460
1461  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1462    ac_prev=prefix ;;
1463  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1464    prefix=$ac_optarg ;;
1465
1466  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1467  | --program-pre | --program-pr | --program-p)
1468    ac_prev=program_prefix ;;
1469  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1470  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1471    program_prefix=$ac_optarg ;;
1472
1473  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1474  | --program-suf | --program-su | --program-s)
1475    ac_prev=program_suffix ;;
1476  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1477  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1478    program_suffix=$ac_optarg ;;
1479
1480  -program-transform-name | --program-transform-name \
1481  | --program-transform-nam | --program-transform-na \
1482  | --program-transform-n | --program-transform- \
1483  | --program-transform | --program-transfor \
1484  | --program-transfo | --program-transf \
1485  | --program-trans | --program-tran \
1486  | --progr-tra | --program-tr | --program-t)
1487    ac_prev=program_transform_name ;;
1488  -program-transform-name=* | --program-transform-name=* \
1489  | --program-transform-nam=* | --program-transform-na=* \
1490  | --program-transform-n=* | --program-transform-=* \
1491  | --program-transform=* | --program-transfor=* \
1492  | --program-transfo=* | --program-transf=* \
1493  | --program-trans=* | --program-tran=* \
1494  | --progr-tra=* | --program-tr=* | --program-t=*)
1495    program_transform_name=$ac_optarg ;;
1496
1497  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1498    ac_prev=pdfdir ;;
1499  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1500    pdfdir=$ac_optarg ;;
1501
1502  -psdir | --psdir | --psdi | --psd | --ps)
1503    ac_prev=psdir ;;
1504  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1505    psdir=$ac_optarg ;;
1506
1507  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1508  | -silent | --silent | --silen | --sile | --sil)
1509    silent=yes ;;
1510
1511  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1512    ac_prev=sbindir ;;
1513  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1514  | --sbi=* | --sb=*)
1515    sbindir=$ac_optarg ;;
1516
1517  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1518  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1519  | --sharedst | --shareds | --shared | --share | --shar \
1520  | --sha | --sh)
1521    ac_prev=sharedstatedir ;;
1522  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1523  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1524  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1525  | --sha=* | --sh=*)
1526    sharedstatedir=$ac_optarg ;;
1527
1528  -site | --site | --sit)
1529    ac_prev=site ;;
1530  -site=* | --site=* | --sit=*)
1531    site=$ac_optarg ;;
1532
1533  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1534    ac_prev=srcdir ;;
1535  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1536    srcdir=$ac_optarg ;;
1537
1538  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1539  | --syscon | --sysco | --sysc | --sys | --sy)
1540    ac_prev=sysconfdir ;;
1541  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1542  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1543    sysconfdir=$ac_optarg ;;
1544
1545  -target | --target | --targe | --targ | --tar | --ta | --t)
1546    ac_prev=target_alias ;;
1547  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1548    target_alias=$ac_optarg ;;
1549
1550  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1551    verbose=yes ;;
1552
1553  -version | --version | --versio | --versi | --vers | -V)
1554    ac_init_version=: ;;
1555
1556  -with-* | --with-*)
1557    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1558    # Reject names that are not valid shell variable names.
1559    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1560      as_fn_error $? "invalid package name: $ac_useropt"
1561    ac_useropt_orig=$ac_useropt
1562    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1563    case $ac_user_opts in
1564      *"
1565"with_$ac_useropt"
1566"*) ;;
1567      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1568	 ac_unrecognized_sep=', ';;
1569    esac
1570    eval with_$ac_useropt=\$ac_optarg ;;
1571
1572  -without-* | --without-*)
1573    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1574    # Reject names that are not valid shell variable names.
1575    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1576      as_fn_error $? "invalid package name: $ac_useropt"
1577    ac_useropt_orig=$ac_useropt
1578    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1579    case $ac_user_opts in
1580      *"
1581"with_$ac_useropt"
1582"*) ;;
1583      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1584	 ac_unrecognized_sep=', ';;
1585    esac
1586    eval with_$ac_useropt=no ;;
1587
1588  --x)
1589    # Obsolete; use --with-x.
1590    with_x=yes ;;
1591
1592  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1593  | --x-incl | --x-inc | --x-in | --x-i)
1594    ac_prev=x_includes ;;
1595  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1596  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1597    x_includes=$ac_optarg ;;
1598
1599  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1600  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1601    ac_prev=x_libraries ;;
1602  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1603  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1604    x_libraries=$ac_optarg ;;
1605
1606  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1607Try \`$0 --help' for more information"
1608    ;;
1609
1610  *=*)
1611    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1612    # Reject names that are not valid shell variable names.
1613    case $ac_envvar in #(
1614      '' | [0-9]* | *[!_$as_cr_alnum]* )
1615      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1616    esac
1617    eval $ac_envvar=\$ac_optarg
1618    export $ac_envvar ;;
1619
1620  *)
1621    # FIXME: should be removed in autoconf 3.0.
1622    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1623    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1624      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1625    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1626    ;;
1627
1628  esac
1629done
1630
1631if test -n "$ac_prev"; then
1632  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1633  as_fn_error $? "missing argument to $ac_option"
1634fi
1635
1636if test -n "$ac_unrecognized_opts"; then
1637  case $enable_option_checking in
1638    no) ;;
1639    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1640    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1641  esac
1642fi
1643
1644# Check all directory arguments for consistency.
1645for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1646		datadir sysconfdir sharedstatedir localstatedir includedir \
1647		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1648		libdir localedir mandir
1649do
1650  eval ac_val=\$$ac_var
1651  # Remove trailing slashes.
1652  case $ac_val in
1653    */ )
1654      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1655      eval $ac_var=\$ac_val;;
1656  esac
1657  # Be sure to have absolute directory names.
1658  case $ac_val in
1659    [\\/$]* | ?:[\\/]* )  continue;;
1660    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1661  esac
1662  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1663done
1664
1665# There might be people who depend on the old broken behavior: `$host'
1666# used to hold the argument of --host etc.
1667# FIXME: To remove some day.
1668build=$build_alias
1669host=$host_alias
1670target=$target_alias
1671
1672# FIXME: To remove some day.
1673if test "x$host_alias" != x; then
1674  if test "x$build_alias" = x; then
1675    cross_compiling=maybe
1676  elif test "x$build_alias" != "x$host_alias"; then
1677    cross_compiling=yes
1678  fi
1679fi
1680
1681ac_tool_prefix=
1682test -n "$host_alias" && ac_tool_prefix=$host_alias-
1683
1684test "$silent" = yes && exec 6>/dev/null
1685
1686
1687ac_pwd=`pwd` && test -n "$ac_pwd" &&
1688ac_ls_di=`ls -di .` &&
1689ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1690  as_fn_error $? "working directory cannot be determined"
1691test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1692  as_fn_error $? "pwd does not report name of working directory"
1693
1694
1695# Find the source files, if location was not specified.
1696if test -z "$srcdir"; then
1697  ac_srcdir_defaulted=yes
1698  # Try the directory containing this script, then the parent directory.
1699  ac_confdir=`$as_dirname -- "$as_myself" ||
1700$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1701	 X"$as_myself" : 'X\(//\)[^/]' \| \
1702	 X"$as_myself" : 'X\(//\)$' \| \
1703	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1704$as_echo X"$as_myself" |
1705    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1706	    s//\1/
1707	    q
1708	  }
1709	  /^X\(\/\/\)[^/].*/{
1710	    s//\1/
1711	    q
1712	  }
1713	  /^X\(\/\/\)$/{
1714	    s//\1/
1715	    q
1716	  }
1717	  /^X\(\/\).*/{
1718	    s//\1/
1719	    q
1720	  }
1721	  s/.*/./; q'`
1722  srcdir=$ac_confdir
1723  if test ! -r "$srcdir/$ac_unique_file"; then
1724    srcdir=..
1725  fi
1726else
1727  ac_srcdir_defaulted=no
1728fi
1729if test ! -r "$srcdir/$ac_unique_file"; then
1730  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1731  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1732fi
1733ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1734ac_abs_confdir=`(
1735	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1736	pwd)`
1737# When building in place, set srcdir=.
1738if test "$ac_abs_confdir" = "$ac_pwd"; then
1739  srcdir=.
1740fi
1741# Remove unnecessary trailing slashes from srcdir.
1742# Double slashes in file names in object file debugging info
1743# mess up M-x gdb in Emacs.
1744case $srcdir in
1745*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1746esac
1747for ac_var in $ac_precious_vars; do
1748  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1749  eval ac_env_${ac_var}_value=\$${ac_var}
1750  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1751  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1752done
1753
1754#
1755# Report the --help message.
1756#
1757if test "$ac_init_help" = "long"; then
1758  # Omit some internal or obsolete options to make the list less imposing.
1759  # This message is too long to be a string in the A/UX 3.1 sh.
1760  cat <<_ACEOF
1761\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1762
1763Usage: $0 [OPTION]... [VAR=VALUE]...
1764
1765To assign environment variables (e.g., CC, CFLAGS...), specify them as
1766VAR=VALUE.  See below for descriptions of some of the useful variables.
1767
1768Defaults for the options are specified in brackets.
1769
1770Configuration:
1771  -h, --help              display this help and exit
1772      --help=short        display options specific to this package
1773      --help=recursive    display the short help of all the included packages
1774  -V, --version           display version information and exit
1775  -q, --quiet, --silent   do not print \`checking ...' messages
1776      --cache-file=FILE   cache test results in FILE [disabled]
1777  -C, --config-cache      alias for \`--cache-file=config.cache'
1778  -n, --no-create         do not create output files
1779      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1780
1781Installation directories:
1782  --prefix=PREFIX         install architecture-independent files in PREFIX
1783                          [$ac_default_prefix]
1784  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1785                          [PREFIX]
1786
1787By default, \`make install' will install all the files in
1788\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1789an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1790for instance \`--prefix=\$HOME'.
1791
1792For better control, use the options below.
1793
1794Fine tuning of the installation directories:
1795  --bindir=DIR            user executables [EPREFIX/bin]
1796  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1797  --libexecdir=DIR        program executables [EPREFIX/libexec]
1798  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1799  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1800  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1801  --libdir=DIR            object code libraries [EPREFIX/lib]
1802  --includedir=DIR        C header files [PREFIX/include]
1803  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1804  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1805  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1806  --infodir=DIR           info documentation [DATAROOTDIR/info]
1807  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1808  --mandir=DIR            man documentation [DATAROOTDIR/man]
1809  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1810  --htmldir=DIR           html documentation [DOCDIR]
1811  --dvidir=DIR            dvi documentation [DOCDIR]
1812  --pdfdir=DIR            pdf documentation [DOCDIR]
1813  --psdir=DIR             ps documentation [DOCDIR]
1814_ACEOF
1815
1816  cat <<\_ACEOF
1817
1818X features:
1819  --x-includes=DIR    X include files are in DIR
1820  --x-libraries=DIR   X library files are in DIR
1821
1822System types:
1823  --build=BUILD     configure for building on BUILD [guessed]
1824  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1825  --target=TARGET   configure for building compilers for TARGET [HOST]
1826_ACEOF
1827fi
1828
1829if test -n "$ac_init_help"; then
1830  case $ac_init_help in
1831     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1832   esac
1833  cat <<\_ACEOF
1834
1835Optional Features:
1836  --disable-option-checking  ignore unrecognized --enable/--with options
1837  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1838  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1839  --enable-openjdk-only   suppress building custom source even if present
1840                          [disabled]
1841  --enable-debug          set the debug level to fastdebug (shorthand for
1842                          --with-debug-level=fastdebug) [disabled]
1843  --disable-headful       disable building headful support (graphical UI
1844                          support) [enabled]
1845  --enable-hotspot-test-in-build
1846                          run the Queens test after Hotspot build [disabled]
1847  --enable-unlimited-crypto
1848                          Enable unlimited crypto policy [disabled]
1849  --disable-warnings-as-errors
1850                          do not consider native warnings to be an error
1851                          [enabled]
1852  --disable-debug-symbols disable generation of debug symbols [enabled]
1853  --disable-zip-debug-info
1854                          disable zipping of debug-info files [enabled]
1855  --enable-native-coverage
1856                          enable native compilation with code coverage
1857                          data[disabled]
1858  --disable-freetype-bundling
1859                          disable bundling of the freetype library with the
1860                          build result [enabled on Windows or when using
1861                          --with-freetype, disabled otherwise]
1862  --enable-sjavac         use sjavac to do fast incremental compiles
1863                          [disabled]
1864  --disable-precompiled-headers
1865                          disable using precompiled headers when compiling C++
1866                          [enabled]
1867  --enable-ccache         enable using ccache to speed up recompilations
1868                          [disabled]
1869
1870Optional Packages:
1871  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1872  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1873  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1874                          support it), e.g. --with-target-bits=32 [guessed]
1875  --with-custom-make-dir  Deprecated. Option is kept for backwards
1876                          compatibility and is ignored
1877  --with-jdk-variant      JDK variant to build (normal) [normal]
1878  --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1879  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1880                          client, minimal1, kernel, zero, zeroshark, core)
1881                          [server]
1882  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
1883                          optimized (HotSpot build only)) [release]
1884  --with-devkit           use this devkit for compilers, tools and resources
1885  --with-sys-root         alias for --with-sysroot for backwards compatability
1886  --with-sysroot          use this directory as sysroot
1887  --with-tools-dir        alias for --with-toolchain-path for backwards
1888                          compatibility
1889  --with-toolchain-path   prepend these directories when searching for
1890                          toolchain binaries (compilers etc)
1891  --with-extra-path       prepend these directories to the default path
1892  --with-sdk-name         use the platform SDK of the given name. [macosx]
1893  --with-conf-name        use this as the name of the configuration [generated
1894                          from important configuration options]
1895  --with-output-sync      set make output sync type if supported by make.
1896                          [recurse]
1897  --with-builddeps-conf   use this configuration file for the builddeps
1898  --with-builddeps-server download and use build dependencies from this server
1899                          url
1900  --with-builddeps-dir    store downloaded build dependencies here
1901                          [/localhome/builddeps]
1902  --with-builddeps-group  chgrp the downloaded build dependencies to this
1903                          group
1904  --with-cacerts-file     specify alternative cacerts file
1905  --with-milestone        Set milestone value for build [internal]
1906  --with-update-version   Set update version value for build [b00]
1907  --with-user-release-suffix
1908                          Add a custom string to the version string if build
1909                          number is not set.[username_builddateb00]
1910  --with-build-number     Set build number value for build [b00]
1911  --with-copyright-year   Set copyright year value for build [current year]
1912  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1913  --with-add-source-root  for each and every source directory, look in this
1914                          additional source root for the same directory; if it
1915                          exists and have files in it, include it in the build
1916  --with-override-source-root
1917                          for each and every source directory, look in this
1918                          override source root for the same directory; if it
1919                          exists, use that directory instead and ignore the
1920                          directory in the original source root
1921  --with-adds-and-overrides
1922                          use the subdirs 'adds' and 'overrides' in the
1923                          specified directory as add-source-root and
1924                          override-source-root
1925  --with-override-langtools
1926                          use this langtools dir for the build
1927  --with-override-corba   use this corba dir for the build
1928  --with-override-jaxp    use this jaxp dir for the build
1929  --with-override-jaxws   use this jaxws dir for the build
1930  --with-override-hotspot use this hotspot dir for the build
1931  --with-override-nashorn use this nashorn dir for the build
1932  --with-override-jdk     use this jdk dir for the build
1933  --with-import-hotspot   import hotspot binaries from this jdk image or
1934                          hotspot build dist dir instead of building from
1935                          source
1936  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
1937                          to show possible values [platform dependent]
1938  --with-toolchain-version
1939                          the version of the toolchain to look for, use
1940                          '--help' to show possible values [platform
1941                          dependent]
1942  --with-jtreg            Regression Test Harness [probed]
1943  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1944  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1945  --with-extra-ldflags    extra flags to be used when linking jdk
1946  --with-x                use the X Window System
1947  --with-cups             specify prefix directory for the cups package
1948                          (expecting the headers under PATH/include)
1949  --with-cups-include     specify directory for the cups include files
1950  --with-freetype         specify prefix directory for the freetype package
1951                          (expecting the libraries under PATH/lib and the
1952                          headers under PATH/include)
1953  --with-freetype-include specify directory for the freetype include files
1954  --with-freetype-lib     specify directory for the freetype library
1955  --with-freetype-src     specify directory with freetype sources to
1956                          automatically build the library (experimental,
1957                          Windows-only)
1958  --with-alsa             specify prefix directory for the alsa package
1959                          (expecting the libraries under PATH/lib and the
1960                          headers under PATH/include)
1961  --with-alsa-include     specify directory for the alsa include files
1962  --with-alsa-lib         specify directory for the alsa library
1963  --with-libjpeg          use libjpeg from build system or OpenJDK source
1964                          (system, bundled) [bundled]
1965  --with-giflib           use giflib from build system or OpenJDK source
1966                          (system, bundled) [bundled]
1967  --with-lcms             use lcms2 from build system or OpenJDK source
1968                          (system, bundled) [bundled]
1969  --with-libpng           use libpng from build system or OpenJDK source
1970                          (system, bundled) [bundled]
1971  --with-zlib             use zlib from build system or OpenJDK source
1972                          (system, bundled) [bundled]
1973  --with-stdc++lib=<static>,<dynamic>,<default>
1974                          force linking of the C++ runtime on Linux to either
1975                          static or dynamic, default is static with dynamic as
1976                          fallback
1977  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
1978                          (Windows only) [probed]
1979  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
1980                          (Windows only) [probed]
1981  --with-dxsdk            Deprecated. Option is kept for backwards
1982                          compatibility and is ignored
1983  --with-dxsdk-lib        Deprecated. Option is kept for backwards
1984                          compatibility and is ignored
1985  --with-dxsdk-include    Deprecated. Option is kept for backwards
1986                          compatibility and is ignored
1987  --with-num-cores        number of cores in the build system, e.g.
1988                          --with-num-cores=8 [probed]
1989  --with-memory-size      memory (in MB) available in the build system, e.g.
1990                          --with-memory-size=1024 [probed]
1991  --with-jobs             number of parallel jobs to let make run [calculated
1992                          based on cores and memory]
1993  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
1994                          invocations of boot JDK, overriding the default
1995                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1996                          -enableassertions"
1997  --with-sjavac-server-java
1998                          use this java binary for running the sjavac
1999                          background server [Boot JDK java]
2000  --with-ccache-dir       where to store ccache files [~/.ccache]
2001
2002Some influential environment variables:
2003  BASENAME    Override default value for BASENAME
2004  BASH        Override default value for BASH
2005  CAT         Override default value for CAT
2006  CHMOD       Override default value for CHMOD
2007  CMP         Override default value for CMP
2008  COMM        Override default value for COMM
2009  CP          Override default value for CP
2010  CUT         Override default value for CUT
2011  DATE        Override default value for DATE
2012  DIFF        Override default value for DIFF
2013  DIRNAME     Override default value for DIRNAME
2014  ECHO        Override default value for ECHO
2015  EXPR        Override default value for EXPR
2016  FILE        Override default value for FILE
2017  FIND        Override default value for FIND
2018  HEAD        Override default value for HEAD
2019  LN          Override default value for LN
2020  LS          Override default value for LS
2021  MKDIR       Override default value for MKDIR
2022  MKTEMP      Override default value for MKTEMP
2023  MV          Override default value for MV
2024  NAWK        Override default value for NAWK
2025  PRINTF      Override default value for PRINTF
2026  RM          Override default value for RM
2027  SH          Override default value for SH
2028  SORT        Override default value for SORT
2029  TAIL        Override default value for TAIL
2030  TAR         Override default value for TAR
2031  TEE         Override default value for TEE
2032  TOUCH       Override default value for TOUCH
2033  TR          Override default value for TR
2034  UNAME       Override default value for UNAME
2035  UNIQ        Override default value for UNIQ
2036  WC          Override default value for WC
2037  WHICH       Override default value for WHICH
2038  XARGS       Override default value for XARGS
2039  AWK         Override default value for AWK
2040  GREP        Override default value for GREP
2041  EGREP       Override default value for EGREP
2042  FGREP       Override default value for FGREP
2043  SED         Override default value for SED
2044  CYGPATH     Override default value for CYGPATH
2045  READLINK    Override default value for READLINK
2046  DF          Override default value for DF
2047  CPIO        Override default value for CPIO
2048  UNZIP       Override default value for UNZIP
2049  ZIP         Override default value for ZIP
2050  LDD         Override default value for LDD
2051  OTOOL       Override default value for OTOOL
2052  READELF     Override default value for READELF
2053  HG          Override default value for HG
2054  STAT        Override default value for STAT
2055  TIME        Override default value for TIME
2056  DSYMUTIL    Override default value for DSYMUTIL
2057  XATTR       Override default value for XATTR
2058  CODESIGN    Override default value for CODESIGN
2059  SETFILE     Override default value for SETFILE
2060  PKG_CONFIG  path to pkg-config utility
2061  JAVA        Override default value for JAVA
2062  JAVAC       Override default value for JAVAC
2063  JAVAH       Override default value for JAVAH
2064  JAR         Override default value for JAR
2065  JARSIGNER   Override default value for JARSIGNER
2066  CC          C compiler command
2067  CFLAGS      C compiler flags
2068  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2069              nonstandard directory <lib dir>
2070  LIBS        libraries to pass to the linker, e.g. -l<library>
2071  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2072              you have headers in a nonstandard directory <include dir>
2073  CXX         C++ compiler command
2074  CXXFLAGS    C++ compiler flags
2075  CPP         C preprocessor
2076  CXXCPP      C++ preprocessor
2077  AS          Override default value for AS
2078  AR          Override default value for AR
2079  LIPO        Override default value for LIPO
2080  STRIP       Override default value for STRIP
2081  NM          Override default value for NM
2082  GNM         Override default value for GNM
2083  OBJCOPY     Override default value for OBJCOPY
2084  OBJDUMP     Override default value for OBJDUMP
2085  BUILD_CC    Override default value for BUILD_CC
2086  BUILD_CXX   Override default value for BUILD_CXX
2087  BUILD_LD    Override default value for BUILD_LD
2088  JTREGEXE    Override default value for JTREGEXE
2089  XMKMF       Path to xmkmf, Makefile generator for X Window System
2090  FREETYPE_CFLAGS
2091              C compiler flags for FREETYPE, overriding pkg-config
2092  FREETYPE_LIBS
2093              linker flags for FREETYPE, overriding pkg-config
2094  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2095  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2096  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2097  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2098  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2099  PNG_LIBS    linker flags for PNG, overriding pkg-config
2100  LIBFFI_CFLAGS
2101              C compiler flags for LIBFFI, overriding pkg-config
2102  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2103  CCACHE      Override default value for CCACHE
2104
2105Use these variables to override the choices made by `configure' or to help
2106it to find libraries and programs with nonstandard names/locations.
2107
2108Report bugs to <build-dev@openjdk.java.net>.
2109OpenJDK home page: <http://openjdk.java.net>.
2110_ACEOF
2111ac_status=$?
2112fi
2113
2114if test "$ac_init_help" = "recursive"; then
2115  # If there are subdirs, report their specific --help.
2116  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2117    test -d "$ac_dir" ||
2118      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2119      continue
2120    ac_builddir=.
2121
2122case "$ac_dir" in
2123.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2124*)
2125  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2126  # A ".." for each directory in $ac_dir_suffix.
2127  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2128  case $ac_top_builddir_sub in
2129  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2130  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2131  esac ;;
2132esac
2133ac_abs_top_builddir=$ac_pwd
2134ac_abs_builddir=$ac_pwd$ac_dir_suffix
2135# for backward compatibility:
2136ac_top_builddir=$ac_top_build_prefix
2137
2138case $srcdir in
2139  .)  # We are building in place.
2140    ac_srcdir=.
2141    ac_top_srcdir=$ac_top_builddir_sub
2142    ac_abs_top_srcdir=$ac_pwd ;;
2143  [\\/]* | ?:[\\/]* )  # Absolute name.
2144    ac_srcdir=$srcdir$ac_dir_suffix;
2145    ac_top_srcdir=$srcdir
2146    ac_abs_top_srcdir=$srcdir ;;
2147  *) # Relative name.
2148    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2149    ac_top_srcdir=$ac_top_build_prefix$srcdir
2150    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2151esac
2152ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2153
2154    cd "$ac_dir" || { ac_status=$?; continue; }
2155    # Check for guested configure.
2156    if test -f "$ac_srcdir/configure.gnu"; then
2157      echo &&
2158      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2159    elif test -f "$ac_srcdir/configure"; then
2160      echo &&
2161      $SHELL "$ac_srcdir/configure" --help=recursive
2162    else
2163      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2164    fi || ac_status=$?
2165    cd "$ac_pwd" || { ac_status=$?; break; }
2166  done
2167fi
2168
2169test -n "$ac_init_help" && exit $ac_status
2170if $ac_init_version; then
2171  cat <<\_ACEOF
2172OpenJDK configure jdk9
2173generated by GNU Autoconf 2.69
2174
2175Copyright (C) 2012 Free Software Foundation, Inc.
2176This configure script is free software; the Free Software Foundation
2177gives unlimited permission to copy, distribute and modify it.
2178_ACEOF
2179  exit
2180fi
2181
2182## ------------------------ ##
2183## Autoconf initialization. ##
2184## ------------------------ ##
2185
2186# ac_fn_c_try_compile LINENO
2187# --------------------------
2188# Try to compile conftest.$ac_ext, and return whether this succeeded.
2189ac_fn_c_try_compile ()
2190{
2191  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2192  rm -f conftest.$ac_objext
2193  if { { ac_try="$ac_compile"
2194case "(($ac_try" in
2195  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2196  *) ac_try_echo=$ac_try;;
2197esac
2198eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2199$as_echo "$ac_try_echo"; } >&5
2200  (eval "$ac_compile") 2>conftest.err
2201  ac_status=$?
2202  if test -s conftest.err; then
2203    grep -v '^ *+' conftest.err >conftest.er1
2204    cat conftest.er1 >&5
2205    mv -f conftest.er1 conftest.err
2206  fi
2207  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2208  test $ac_status = 0; } && {
2209	 test -z "$ac_c_werror_flag" ||
2210	 test ! -s conftest.err
2211       } && test -s conftest.$ac_objext; then :
2212  ac_retval=0
2213else
2214  $as_echo "$as_me: failed program was:" >&5
2215sed 's/^/| /' conftest.$ac_ext >&5
2216
2217	ac_retval=1
2218fi
2219  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2220  as_fn_set_status $ac_retval
2221
2222} # ac_fn_c_try_compile
2223
2224# ac_fn_cxx_try_compile LINENO
2225# ----------------------------
2226# Try to compile conftest.$ac_ext, and return whether this succeeded.
2227ac_fn_cxx_try_compile ()
2228{
2229  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2230  rm -f conftest.$ac_objext
2231  if { { ac_try="$ac_compile"
2232case "(($ac_try" in
2233  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2234  *) ac_try_echo=$ac_try;;
2235esac
2236eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2237$as_echo "$ac_try_echo"; } >&5
2238  (eval "$ac_compile") 2>conftest.err
2239  ac_status=$?
2240  if test -s conftest.err; then
2241    grep -v '^ *+' conftest.err >conftest.er1
2242    cat conftest.er1 >&5
2243    mv -f conftest.er1 conftest.err
2244  fi
2245  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2246  test $ac_status = 0; } && {
2247	 test -z "$ac_cxx_werror_flag" ||
2248	 test ! -s conftest.err
2249       } && test -s conftest.$ac_objext; then :
2250  ac_retval=0
2251else
2252  $as_echo "$as_me: failed program was:" >&5
2253sed 's/^/| /' conftest.$ac_ext >&5
2254
2255	ac_retval=1
2256fi
2257  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2258  as_fn_set_status $ac_retval
2259
2260} # ac_fn_cxx_try_compile
2261
2262# ac_fn_c_try_cpp LINENO
2263# ----------------------
2264# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2265ac_fn_c_try_cpp ()
2266{
2267  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2268  if { { ac_try="$ac_cpp conftest.$ac_ext"
2269case "(($ac_try" in
2270  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2271  *) ac_try_echo=$ac_try;;
2272esac
2273eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2274$as_echo "$ac_try_echo"; } >&5
2275  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2276  ac_status=$?
2277  if test -s conftest.err; then
2278    grep -v '^ *+' conftest.err >conftest.er1
2279    cat conftest.er1 >&5
2280    mv -f conftest.er1 conftest.err
2281  fi
2282  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2283  test $ac_status = 0; } > conftest.i && {
2284	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2285	 test ! -s conftest.err
2286       }; then :
2287  ac_retval=0
2288else
2289  $as_echo "$as_me: failed program was:" >&5
2290sed 's/^/| /' conftest.$ac_ext >&5
2291
2292    ac_retval=1
2293fi
2294  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2295  as_fn_set_status $ac_retval
2296
2297} # ac_fn_c_try_cpp
2298
2299# ac_fn_cxx_try_cpp LINENO
2300# ------------------------
2301# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2302ac_fn_cxx_try_cpp ()
2303{
2304  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2305  if { { ac_try="$ac_cpp conftest.$ac_ext"
2306case "(($ac_try" in
2307  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2308  *) ac_try_echo=$ac_try;;
2309esac
2310eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2311$as_echo "$ac_try_echo"; } >&5
2312  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2313  ac_status=$?
2314  if test -s conftest.err; then
2315    grep -v '^ *+' conftest.err >conftest.er1
2316    cat conftest.er1 >&5
2317    mv -f conftest.er1 conftest.err
2318  fi
2319  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2320  test $ac_status = 0; } > conftest.i && {
2321	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2322	 test ! -s conftest.err
2323       }; then :
2324  ac_retval=0
2325else
2326  $as_echo "$as_me: failed program was:" >&5
2327sed 's/^/| /' conftest.$ac_ext >&5
2328
2329    ac_retval=1
2330fi
2331  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2332  as_fn_set_status $ac_retval
2333
2334} # ac_fn_cxx_try_cpp
2335
2336# ac_fn_c_try_link LINENO
2337# -----------------------
2338# Try to link conftest.$ac_ext, and return whether this succeeded.
2339ac_fn_c_try_link ()
2340{
2341  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2342  rm -f conftest.$ac_objext conftest$ac_exeext
2343  if { { ac_try="$ac_link"
2344case "(($ac_try" in
2345  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2346  *) ac_try_echo=$ac_try;;
2347esac
2348eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2349$as_echo "$ac_try_echo"; } >&5
2350  (eval "$ac_link") 2>conftest.err
2351  ac_status=$?
2352  if test -s conftest.err; then
2353    grep -v '^ *+' conftest.err >conftest.er1
2354    cat conftest.er1 >&5
2355    mv -f conftest.er1 conftest.err
2356  fi
2357  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2358  test $ac_status = 0; } && {
2359	 test -z "$ac_c_werror_flag" ||
2360	 test ! -s conftest.err
2361       } && test -s conftest$ac_exeext && {
2362	 test "$cross_compiling" = yes ||
2363	 test -x conftest$ac_exeext
2364       }; then :
2365  ac_retval=0
2366else
2367  $as_echo "$as_me: failed program was:" >&5
2368sed 's/^/| /' conftest.$ac_ext >&5
2369
2370	ac_retval=1
2371fi
2372  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2373  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2374  # interfere with the next link command; also delete a directory that is
2375  # left behind by Apple's compiler.  We do this before executing the actions.
2376  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2377  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2378  as_fn_set_status $ac_retval
2379
2380} # ac_fn_c_try_link
2381
2382# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2383# ---------------------------------------------------------
2384# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2385# the include files in INCLUDES and setting the cache variable VAR
2386# accordingly.
2387ac_fn_cxx_check_header_mongrel ()
2388{
2389  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2390  if eval \${$3+:} false; then :
2391  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2392$as_echo_n "checking for $2... " >&6; }
2393if eval \${$3+:} false; then :
2394  $as_echo_n "(cached) " >&6
2395fi
2396eval ac_res=\$$3
2397	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2398$as_echo "$ac_res" >&6; }
2399else
2400  # Is the header compilable?
2401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2402$as_echo_n "checking $2 usability... " >&6; }
2403cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2404/* end confdefs.h.  */
2405$4
2406#include <$2>
2407_ACEOF
2408if ac_fn_cxx_try_compile "$LINENO"; then :
2409  ac_header_compiler=yes
2410else
2411  ac_header_compiler=no
2412fi
2413rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2415$as_echo "$ac_header_compiler" >&6; }
2416
2417# Is the header present?
2418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2419$as_echo_n "checking $2 presence... " >&6; }
2420cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2421/* end confdefs.h.  */
2422#include <$2>
2423_ACEOF
2424if ac_fn_cxx_try_cpp "$LINENO"; then :
2425  ac_header_preproc=yes
2426else
2427  ac_header_preproc=no
2428fi
2429rm -f conftest.err conftest.i conftest.$ac_ext
2430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2431$as_echo "$ac_header_preproc" >&6; }
2432
2433# So?  What about this header?
2434case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2435  yes:no: )
2436    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2437$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2438    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2439$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2440    ;;
2441  no:yes:* )
2442    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2443$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2444    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2445$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2446    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2447$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2448    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2449$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2450    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2451$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2452( $as_echo "## ----------------------------------------- ##
2453## Report this to build-dev@openjdk.java.net ##
2454## ----------------------------------------- ##"
2455     ) | sed "s/^/$as_me: WARNING:     /" >&2
2456    ;;
2457esac
2458  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2459$as_echo_n "checking for $2... " >&6; }
2460if eval \${$3+:} false; then :
2461  $as_echo_n "(cached) " >&6
2462else
2463  eval "$3=\$ac_header_compiler"
2464fi
2465eval ac_res=\$$3
2466	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2467$as_echo "$ac_res" >&6; }
2468fi
2469  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2470
2471} # ac_fn_cxx_check_header_mongrel
2472
2473# ac_fn_cxx_try_run LINENO
2474# ------------------------
2475# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2476# that executables *can* be run.
2477ac_fn_cxx_try_run ()
2478{
2479  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2480  if { { ac_try="$ac_link"
2481case "(($ac_try" in
2482  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2483  *) ac_try_echo=$ac_try;;
2484esac
2485eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2486$as_echo "$ac_try_echo"; } >&5
2487  (eval "$ac_link") 2>&5
2488  ac_status=$?
2489  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2490  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2491  { { case "(($ac_try" in
2492  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2493  *) ac_try_echo=$ac_try;;
2494esac
2495eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2496$as_echo "$ac_try_echo"; } >&5
2497  (eval "$ac_try") 2>&5
2498  ac_status=$?
2499  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2500  test $ac_status = 0; }; }; then :
2501  ac_retval=0
2502else
2503  $as_echo "$as_me: program exited with status $ac_status" >&5
2504       $as_echo "$as_me: failed program was:" >&5
2505sed 's/^/| /' conftest.$ac_ext >&5
2506
2507       ac_retval=$ac_status
2508fi
2509  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2510  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2511  as_fn_set_status $ac_retval
2512
2513} # ac_fn_cxx_try_run
2514
2515# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2516# ---------------------------------------------------------
2517# Tests whether HEADER exists and can be compiled using the include files in
2518# INCLUDES, setting the cache variable VAR accordingly.
2519ac_fn_cxx_check_header_compile ()
2520{
2521  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2522  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2523$as_echo_n "checking for $2... " >&6; }
2524if eval \${$3+:} false; then :
2525  $as_echo_n "(cached) " >&6
2526else
2527  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2528/* end confdefs.h.  */
2529$4
2530#include <$2>
2531_ACEOF
2532if ac_fn_cxx_try_compile "$LINENO"; then :
2533  eval "$3=yes"
2534else
2535  eval "$3=no"
2536fi
2537rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2538fi
2539eval ac_res=\$$3
2540	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2541$as_echo "$ac_res" >&6; }
2542  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2543
2544} # ac_fn_cxx_check_header_compile
2545
2546# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2547# ----------------------------------------------
2548# Tries to find the compile-time value of EXPR in a program that includes
2549# INCLUDES, setting VAR accordingly. Returns whether the value could be
2550# computed
2551ac_fn_cxx_compute_int ()
2552{
2553  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2554  if test "$cross_compiling" = yes; then
2555    # Depending upon the size, compute the lo and hi bounds.
2556cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2557/* end confdefs.h.  */
2558$4
2559int
2560main ()
2561{
2562static int test_array [1 - 2 * !(($2) >= 0)];
2563test_array [0] = 0;
2564return test_array [0];
2565
2566  ;
2567  return 0;
2568}
2569_ACEOF
2570if ac_fn_cxx_try_compile "$LINENO"; then :
2571  ac_lo=0 ac_mid=0
2572  while :; do
2573    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2574/* end confdefs.h.  */
2575$4
2576int
2577main ()
2578{
2579static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2580test_array [0] = 0;
2581return test_array [0];
2582
2583  ;
2584  return 0;
2585}
2586_ACEOF
2587if ac_fn_cxx_try_compile "$LINENO"; then :
2588  ac_hi=$ac_mid; break
2589else
2590  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2591			if test $ac_lo -le $ac_mid; then
2592			  ac_lo= ac_hi=
2593			  break
2594			fi
2595			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2596fi
2597rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2598  done
2599else
2600  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2601/* end confdefs.h.  */
2602$4
2603int
2604main ()
2605{
2606static int test_array [1 - 2 * !(($2) < 0)];
2607test_array [0] = 0;
2608return test_array [0];
2609
2610  ;
2611  return 0;
2612}
2613_ACEOF
2614if ac_fn_cxx_try_compile "$LINENO"; then :
2615  ac_hi=-1 ac_mid=-1
2616  while :; do
2617    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2618/* end confdefs.h.  */
2619$4
2620int
2621main ()
2622{
2623static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2624test_array [0] = 0;
2625return test_array [0];
2626
2627  ;
2628  return 0;
2629}
2630_ACEOF
2631if ac_fn_cxx_try_compile "$LINENO"; then :
2632  ac_lo=$ac_mid; break
2633else
2634  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2635			if test $ac_mid -le $ac_hi; then
2636			  ac_lo= ac_hi=
2637			  break
2638			fi
2639			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2640fi
2641rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2642  done
2643else
2644  ac_lo= ac_hi=
2645fi
2646rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2647fi
2648rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2649# Binary search between lo and hi bounds.
2650while test "x$ac_lo" != "x$ac_hi"; do
2651  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2652  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2653/* end confdefs.h.  */
2654$4
2655int
2656main ()
2657{
2658static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2659test_array [0] = 0;
2660return test_array [0];
2661
2662  ;
2663  return 0;
2664}
2665_ACEOF
2666if ac_fn_cxx_try_compile "$LINENO"; then :
2667  ac_hi=$ac_mid
2668else
2669  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2670fi
2671rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2672done
2673case $ac_lo in #((
2674?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2675'') ac_retval=1 ;;
2676esac
2677  else
2678    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2679/* end confdefs.h.  */
2680$4
2681static long int longval () { return $2; }
2682static unsigned long int ulongval () { return $2; }
2683#include <stdio.h>
2684#include <stdlib.h>
2685int
2686main ()
2687{
2688
2689  FILE *f = fopen ("conftest.val", "w");
2690  if (! f)
2691    return 1;
2692  if (($2) < 0)
2693    {
2694      long int i = longval ();
2695      if (i != ($2))
2696	return 1;
2697      fprintf (f, "%ld", i);
2698    }
2699  else
2700    {
2701      unsigned long int i = ulongval ();
2702      if (i != ($2))
2703	return 1;
2704      fprintf (f, "%lu", i);
2705    }
2706  /* Do not output a trailing newline, as this causes \r\n confusion
2707     on some platforms.  */
2708  return ferror (f) || fclose (f) != 0;
2709
2710  ;
2711  return 0;
2712}
2713_ACEOF
2714if ac_fn_cxx_try_run "$LINENO"; then :
2715  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2716else
2717  ac_retval=1
2718fi
2719rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2720  conftest.$ac_objext conftest.beam conftest.$ac_ext
2721rm -f conftest.val
2722
2723  fi
2724  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2725  as_fn_set_status $ac_retval
2726
2727} # ac_fn_cxx_compute_int
2728
2729# ac_fn_cxx_try_link LINENO
2730# -------------------------
2731# Try to link conftest.$ac_ext, and return whether this succeeded.
2732ac_fn_cxx_try_link ()
2733{
2734  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2735  rm -f conftest.$ac_objext conftest$ac_exeext
2736  if { { ac_try="$ac_link"
2737case "(($ac_try" in
2738  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2739  *) ac_try_echo=$ac_try;;
2740esac
2741eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2742$as_echo "$ac_try_echo"; } >&5
2743  (eval "$ac_link") 2>conftest.err
2744  ac_status=$?
2745  if test -s conftest.err; then
2746    grep -v '^ *+' conftest.err >conftest.er1
2747    cat conftest.er1 >&5
2748    mv -f conftest.er1 conftest.err
2749  fi
2750  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2751  test $ac_status = 0; } && {
2752	 test -z "$ac_cxx_werror_flag" ||
2753	 test ! -s conftest.err
2754       } && test -s conftest$ac_exeext && {
2755	 test "$cross_compiling" = yes ||
2756	 test -x conftest$ac_exeext
2757       }; then :
2758  ac_retval=0
2759else
2760  $as_echo "$as_me: failed program was:" >&5
2761sed 's/^/| /' conftest.$ac_ext >&5
2762
2763	ac_retval=1
2764fi
2765  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2766  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2767  # interfere with the next link command; also delete a directory that is
2768  # left behind by Apple's compiler.  We do this before executing the actions.
2769  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2770  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2771  as_fn_set_status $ac_retval
2772
2773} # ac_fn_cxx_try_link
2774
2775# ac_fn_cxx_check_func LINENO FUNC VAR
2776# ------------------------------------
2777# Tests whether FUNC exists, setting the cache variable VAR accordingly
2778ac_fn_cxx_check_func ()
2779{
2780  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2781  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2782$as_echo_n "checking for $2... " >&6; }
2783if eval \${$3+:} false; then :
2784  $as_echo_n "(cached) " >&6
2785else
2786  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2787/* end confdefs.h.  */
2788/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2789   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2790#define $2 innocuous_$2
2791
2792/* System header to define __stub macros and hopefully few prototypes,
2793    which can conflict with char $2 (); below.
2794    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2795    <limits.h> exists even on freestanding compilers.  */
2796
2797#ifdef __STDC__
2798# include <limits.h>
2799#else
2800# include <assert.h>
2801#endif
2802
2803#undef $2
2804
2805/* Override any GCC internal prototype to avoid an error.
2806   Use char because int might match the return type of a GCC
2807   builtin and then its argument prototype would still apply.  */
2808#ifdef __cplusplus
2809extern "C"
2810#endif
2811char $2 ();
2812/* The GNU C library defines this for functions which it implements
2813    to always fail with ENOSYS.  Some functions are actually named
2814    something starting with __ and the normal name is an alias.  */
2815#if defined __stub_$2 || defined __stub___$2
2816choke me
2817#endif
2818
2819int
2820main ()
2821{
2822return $2 ();
2823  ;
2824  return 0;
2825}
2826_ACEOF
2827if ac_fn_cxx_try_link "$LINENO"; then :
2828  eval "$3=yes"
2829else
2830  eval "$3=no"
2831fi
2832rm -f core conftest.err conftest.$ac_objext \
2833    conftest$ac_exeext conftest.$ac_ext
2834fi
2835eval ac_res=\$$3
2836	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2837$as_echo "$ac_res" >&6; }
2838  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2839
2840} # ac_fn_cxx_check_func
2841
2842# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2843# -------------------------------------------------------
2844# Tests whether HEADER exists and can be compiled using the include files in
2845# INCLUDES, setting the cache variable VAR accordingly.
2846ac_fn_c_check_header_compile ()
2847{
2848  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2849  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2850$as_echo_n "checking for $2... " >&6; }
2851if eval \${$3+:} false; then :
2852  $as_echo_n "(cached) " >&6
2853else
2854  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2855/* end confdefs.h.  */
2856$4
2857#include <$2>
2858_ACEOF
2859if ac_fn_c_try_compile "$LINENO"; then :
2860  eval "$3=yes"
2861else
2862  eval "$3=no"
2863fi
2864rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2865fi
2866eval ac_res=\$$3
2867	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2868$as_echo "$ac_res" >&6; }
2869  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2870
2871} # ac_fn_c_check_header_compile
2872cat >config.log <<_ACEOF
2873This file contains any messages produced by compilers while
2874running configure, to aid debugging if configure makes a mistake.
2875
2876It was created by OpenJDK $as_me jdk9, which was
2877generated by GNU Autoconf 2.69.  Invocation command line was
2878
2879  $ $0 $@
2880
2881_ACEOF
2882exec 5>>config.log
2883{
2884cat <<_ASUNAME
2885## --------- ##
2886## Platform. ##
2887## --------- ##
2888
2889hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2890uname -m = `(uname -m) 2>/dev/null || echo unknown`
2891uname -r = `(uname -r) 2>/dev/null || echo unknown`
2892uname -s = `(uname -s) 2>/dev/null || echo unknown`
2893uname -v = `(uname -v) 2>/dev/null || echo unknown`
2894
2895/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2896/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2897
2898/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2899/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2900/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2901/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2902/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2903/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2904/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2905
2906_ASUNAME
2907
2908as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2909for as_dir in $PATH
2910do
2911  IFS=$as_save_IFS
2912  test -z "$as_dir" && as_dir=.
2913    $as_echo "PATH: $as_dir"
2914  done
2915IFS=$as_save_IFS
2916
2917} >&5
2918
2919cat >&5 <<_ACEOF
2920
2921
2922## ----------- ##
2923## Core tests. ##
2924## ----------- ##
2925
2926_ACEOF
2927
2928
2929# Keep a trace of the command line.
2930# Strip out --no-create and --no-recursion so they do not pile up.
2931# Strip out --silent because we don't want to record it for future runs.
2932# Also quote any args containing shell meta-characters.
2933# Make two passes to allow for proper duplicate-argument suppression.
2934ac_configure_args=
2935ac_configure_args0=
2936ac_configure_args1=
2937ac_must_keep_next=false
2938for ac_pass in 1 2
2939do
2940  for ac_arg
2941  do
2942    case $ac_arg in
2943    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2944    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2945    | -silent | --silent | --silen | --sile | --sil)
2946      continue ;;
2947    *\'*)
2948      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2949    esac
2950    case $ac_pass in
2951    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2952    2)
2953      as_fn_append ac_configure_args1 " '$ac_arg'"
2954      if test $ac_must_keep_next = true; then
2955	ac_must_keep_next=false # Got value, back to normal.
2956      else
2957	case $ac_arg in
2958	  *=* | --config-cache | -C | -disable-* | --disable-* \
2959	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2960	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2961	  | -with-* | --with-* | -without-* | --without-* | --x)
2962	    case "$ac_configure_args0 " in
2963	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2964	    esac
2965	    ;;
2966	  -* ) ac_must_keep_next=true ;;
2967	esac
2968      fi
2969      as_fn_append ac_configure_args " '$ac_arg'"
2970      ;;
2971    esac
2972  done
2973done
2974{ ac_configure_args0=; unset ac_configure_args0;}
2975{ ac_configure_args1=; unset ac_configure_args1;}
2976
2977# When interrupted or exit'd, cleanup temporary files, and complete
2978# config.log.  We remove comments because anyway the quotes in there
2979# would cause problems or look ugly.
2980# WARNING: Use '\'' to represent an apostrophe within the trap.
2981# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2982trap 'exit_status=$?
2983  # Save into config.log some information that might help in debugging.
2984  {
2985    echo
2986
2987    $as_echo "## ---------------- ##
2988## Cache variables. ##
2989## ---------------- ##"
2990    echo
2991    # The following way of writing the cache mishandles newlines in values,
2992(
2993  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2994    eval ac_val=\$$ac_var
2995    case $ac_val in #(
2996    *${as_nl}*)
2997      case $ac_var in #(
2998      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2999$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3000      esac
3001      case $ac_var in #(
3002      _ | IFS | as_nl) ;; #(
3003      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3004      *) { eval $ac_var=; unset $ac_var;} ;;
3005      esac ;;
3006    esac
3007  done
3008  (set) 2>&1 |
3009    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3010    *${as_nl}ac_space=\ *)
3011      sed -n \
3012	"s/'\''/'\''\\\\'\'''\''/g;
3013	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3014      ;; #(
3015    *)
3016      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3017      ;;
3018    esac |
3019    sort
3020)
3021    echo
3022
3023    $as_echo "## ----------------- ##
3024## Output variables. ##
3025## ----------------- ##"
3026    echo
3027    for ac_var in $ac_subst_vars
3028    do
3029      eval ac_val=\$$ac_var
3030      case $ac_val in
3031      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3032      esac
3033      $as_echo "$ac_var='\''$ac_val'\''"
3034    done | sort
3035    echo
3036
3037    if test -n "$ac_subst_files"; then
3038      $as_echo "## ------------------- ##
3039## File substitutions. ##
3040## ------------------- ##"
3041      echo
3042      for ac_var in $ac_subst_files
3043      do
3044	eval ac_val=\$$ac_var
3045	case $ac_val in
3046	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3047	esac
3048	$as_echo "$ac_var='\''$ac_val'\''"
3049      done | sort
3050      echo
3051    fi
3052
3053    if test -s confdefs.h; then
3054      $as_echo "## ----------- ##
3055## confdefs.h. ##
3056## ----------- ##"
3057      echo
3058      cat confdefs.h
3059      echo
3060    fi
3061    test "$ac_signal" != 0 &&
3062      $as_echo "$as_me: caught signal $ac_signal"
3063    $as_echo "$as_me: exit $exit_status"
3064  } >&5
3065  rm -f core *.core core.conftest.* &&
3066    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3067    exit $exit_status
3068' 0
3069for ac_signal in 1 2 13 15; do
3070  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3071done
3072ac_signal=0
3073
3074# confdefs.h avoids OS command line length limits that DEFS can exceed.
3075rm -f -r conftest* confdefs.h
3076
3077$as_echo "/* confdefs.h */" > confdefs.h
3078
3079# Predefined preprocessor variables.
3080
3081cat >>confdefs.h <<_ACEOF
3082#define PACKAGE_NAME "$PACKAGE_NAME"
3083_ACEOF
3084
3085cat >>confdefs.h <<_ACEOF
3086#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3087_ACEOF
3088
3089cat >>confdefs.h <<_ACEOF
3090#define PACKAGE_VERSION "$PACKAGE_VERSION"
3091_ACEOF
3092
3093cat >>confdefs.h <<_ACEOF
3094#define PACKAGE_STRING "$PACKAGE_STRING"
3095_ACEOF
3096
3097cat >>confdefs.h <<_ACEOF
3098#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3099_ACEOF
3100
3101cat >>confdefs.h <<_ACEOF
3102#define PACKAGE_URL "$PACKAGE_URL"
3103_ACEOF
3104
3105
3106# Let the site file select an alternate cache file if it wants to.
3107# Prefer an explicitly selected file to automatically selected ones.
3108ac_site_file1=NONE
3109ac_site_file2=NONE
3110if test -n "$CONFIG_SITE"; then
3111  # We do not want a PATH search for config.site.
3112  case $CONFIG_SITE in #((
3113    -*)  ac_site_file1=./$CONFIG_SITE;;
3114    */*) ac_site_file1=$CONFIG_SITE;;
3115    *)   ac_site_file1=./$CONFIG_SITE;;
3116  esac
3117elif test "x$prefix" != xNONE; then
3118  ac_site_file1=$prefix/share/config.site
3119  ac_site_file2=$prefix/etc/config.site
3120else
3121  ac_site_file1=$ac_default_prefix/share/config.site
3122  ac_site_file2=$ac_default_prefix/etc/config.site
3123fi
3124for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3125do
3126  test "x$ac_site_file" = xNONE && continue
3127  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3128    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3129$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3130    sed 's/^/| /' "$ac_site_file" >&5
3131    . "$ac_site_file" \
3132      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3133$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3134as_fn_error $? "failed to load site script $ac_site_file
3135See \`config.log' for more details" "$LINENO" 5; }
3136  fi
3137done
3138
3139if test -r "$cache_file"; then
3140  # Some versions of bash will fail to source /dev/null (special files
3141  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3142  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3143    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3144$as_echo "$as_me: loading cache $cache_file" >&6;}
3145    case $cache_file in
3146      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3147      *)                      . "./$cache_file";;
3148    esac
3149  fi
3150else
3151  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3152$as_echo "$as_me: creating cache $cache_file" >&6;}
3153  >$cache_file
3154fi
3155
3156# Check that the precious variables saved in the cache have kept the same
3157# value.
3158ac_cache_corrupted=false
3159for ac_var in $ac_precious_vars; do
3160  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3161  eval ac_new_set=\$ac_env_${ac_var}_set
3162  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3163  eval ac_new_val=\$ac_env_${ac_var}_value
3164  case $ac_old_set,$ac_new_set in
3165    set,)
3166      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3167$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3168      ac_cache_corrupted=: ;;
3169    ,set)
3170      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3171$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3172      ac_cache_corrupted=: ;;
3173    ,);;
3174    *)
3175      if test "x$ac_old_val" != "x$ac_new_val"; then
3176	# differences in whitespace do not lead to failure.
3177	ac_old_val_w=`echo x $ac_old_val`
3178	ac_new_val_w=`echo x $ac_new_val`
3179	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3180	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3181$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3182	  ac_cache_corrupted=:
3183	else
3184	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3185$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3186	  eval $ac_var=\$ac_old_val
3187	fi
3188	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3189$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3190	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3191$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3192      fi;;
3193  esac
3194  # Pass precious variables to config.status.
3195  if test "$ac_new_set" = set; then
3196    case $ac_new_val in
3197    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3198    *) ac_arg=$ac_var=$ac_new_val ;;
3199    esac
3200    case " $ac_configure_args " in
3201      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3202      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3203    esac
3204  fi
3205done
3206if $ac_cache_corrupted; then
3207  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3208$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3209  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3210$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3211  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3212fi
3213## -------------------- ##
3214## Main body of script. ##
3215## -------------------- ##
3216
3217ac_ext=c
3218ac_cpp='$CPP $CPPFLAGS'
3219ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3220ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3221ac_compiler_gnu=$ac_cv_c_compiler_gnu
3222
3223
3224
3225ac_aux_dir=
3226for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3227  if test -f "$ac_dir/install-sh"; then
3228    ac_aux_dir=$ac_dir
3229    ac_install_sh="$ac_aux_dir/install-sh -c"
3230    break
3231  elif test -f "$ac_dir/install.sh"; then
3232    ac_aux_dir=$ac_dir
3233    ac_install_sh="$ac_aux_dir/install.sh -c"
3234    break
3235  elif test -f "$ac_dir/shtool"; then
3236    ac_aux_dir=$ac_dir
3237    ac_install_sh="$ac_aux_dir/shtool install -c"
3238    break
3239  fi
3240done
3241if test -z "$ac_aux_dir"; then
3242  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
3243fi
3244
3245# These three variables are undocumented and unsupported,
3246# and are intended to be withdrawn in a future Autoconf release.
3247# They can cause serious problems if a builder's source tree is in a directory
3248# whose full name contains unusual characters.
3249ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3250ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3251ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3252
3253
3254# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3255
3256#
3257# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3258# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3259#
3260# This code is free software; you can redistribute it and/or modify it
3261# under the terms of the GNU General Public License version 2 only, as
3262# published by the Free Software Foundation.  Oracle designates this
3263# particular file as subject to the "Classpath" exception as provided
3264# by Oracle in the LICENSE file that accompanied this code.
3265#
3266# This code is distributed in the hope that it will be useful, but WITHOUT
3267# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3268# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3269# version 2 for more details (a copy is included in the LICENSE file that
3270# accompanied this code).
3271#
3272# You should have received a copy of the GNU General Public License version
3273# 2 along with this work; if not, write to the Free Software Foundation,
3274# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3275#
3276# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3277# or visit www.oracle.com if you need additional information or have any
3278# questions.
3279#
3280
3281#
3282# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3283#
3284# This program is free software; you can redistribute it and/or modify
3285# it under the terms of the GNU General Public License as published by
3286# the Free Software Foundation; either version 2 of the License, or
3287# (at your option) any later version.
3288#
3289# This program is distributed in the hope that it will be useful, but
3290# WITHOUT ANY WARRANTY; without even the implied warranty of
3291# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3292# General Public License for more details.
3293#
3294# You should have received a copy of the GNU General Public License
3295# along with this program; if not, write to the Free Software
3296# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3297#
3298# As a special exception to the GNU General Public License, if you
3299# distribute this file as part of a program that contains a
3300# configuration script generated by Autoconf, you may include it under
3301# the same distribution terms that you use for the rest of that program.
3302
3303# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3304# ----------------------------------
3305# PKG_PROG_PKG_CONFIG
3306
3307# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3308#
3309# Check to see whether a particular set of modules exists.  Similar
3310# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3311#
3312#
3313# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3314# this or PKG_CHECK_MODULES is called, or make sure to call
3315# PKG_CHECK_EXISTS manually
3316# --------------------------------------------------------------
3317
3318
3319
3320# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3321# ---------------------------------------------
3322# _PKG_CONFIG
3323
3324# _PKG_SHORT_ERRORS_SUPPORTED
3325# -----------------------------
3326# _PKG_SHORT_ERRORS_SUPPORTED
3327
3328
3329# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3330# [ACTION-IF-NOT-FOUND])
3331#
3332#
3333# Note that if there is a possibility the first call to
3334# PKG_CHECK_MODULES might not happen, you should be sure to include an
3335# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3336#
3337#
3338# --------------------------------------------------------------
3339# PKG_CHECK_MODULES
3340
3341
3342# Include these first...
3343#
3344# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3345# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3346#
3347# This code is free software; you can redistribute it and/or modify it
3348# under the terms of the GNU General Public License version 2 only, as
3349# published by the Free Software Foundation.  Oracle designates this
3350# particular file as subject to the "Classpath" exception as provided
3351# by Oracle in the LICENSE file that accompanied this code.
3352#
3353# This code is distributed in the hope that it will be useful, but WITHOUT
3354# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3355# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3356# version 2 for more details (a copy is included in the LICENSE file that
3357# accompanied this code).
3358#
3359# You should have received a copy of the GNU General Public License version
3360# 2 along with this work; if not, write to the Free Software Foundation,
3361# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3362#
3363# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3364# or visit www.oracle.com if you need additional information or have any
3365# questions.
3366#
3367
3368# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3369# If so, then append $1 to $2 \
3370# Also set JVM_ARG_OK to true/false depending on outcome.
3371
3372
3373# Appends a string to a path variable, only adding the : when needed.
3374
3375
3376# Prepends a string to a path variable, only adding the : when needed.
3377
3378
3379# This will make sure the given variable points to a full and proper
3380# path. This means:
3381# 1) There will be no spaces in the path. On unix platforms,
3382#    spaces in the path will result in an error. On Windows,
3383#    the path will be rewritten using short-style to be space-free.
3384# 2) The path will be absolute, and it will be in unix-style (on
3385#     cygwin).
3386# $1: The name of the variable to fix
3387
3388
3389# This will make sure the given variable points to a executable
3390# with a full and proper path. This means:
3391# 1) There will be no spaces in the path. On unix platforms,
3392#    spaces in the path will result in an error. On Windows,
3393#    the path will be rewritten using short-style to be space-free.
3394# 2) The path will be absolute, and it will be in unix-style (on
3395#     cygwin).
3396# Any arguments given to the executable is preserved.
3397# If the input variable does not have a directory specification, then
3398# it need to be in the PATH.
3399# $1: The name of the variable to fix
3400
3401
3402
3403
3404# Register a --with argument but mark it as deprecated
3405# $1: The name of the with argument to deprecate, not including --with-
3406
3407
3408# Register a --enable argument but mark it as deprecated
3409# $1: The name of the with argument to deprecate, not including --enable-
3410# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3411
3412
3413
3414
3415# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3416# $1: variable to check
3417
3418
3419# Check that there are no unprocessed overridden variables left.
3420# If so, they are an incorrect argument and we will exit with an error.
3421
3422
3423# Setup a tool for the given variable. If correctly specified by the user,
3424# use that value, otherwise search for the tool using the supplied code snippet.
3425# $1: variable to set
3426# $2: code snippet to call to look for the tool
3427
3428
3429# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3430# $1: variable to set
3431# $2: executable name (or list of names) to look for
3432
3433
3434# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3435# $1: variable to set
3436# $2: executable name (or list of names) to look for
3437
3438
3439# Like BASIC_PATH_PROGS but fails if no tool was found.
3440# $1: variable to set
3441# $2: executable name (or list of names) to look for
3442
3443
3444# Like BASIC_SETUP_TOOL but fails if no tool was found.
3445# $1: variable to set
3446# $2: autoconf macro to call to look for the special tool
3447
3448
3449# Setup the most fundamental tools that relies on not much else to set up,
3450# but is used by much of the early bootstrap code.
3451
3452
3453# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3454
3455
3456# Evaluates platform specific overrides for devkit variables.
3457# $1: Name of variable
3458
3459
3460
3461
3462
3463
3464#%%% Simple tools %%%
3465
3466# Check if we have found a usable version of make
3467# $1: the path to a potential make binary (or empty)
3468# $2: the description on how we found this
3469
3470
3471
3472
3473# Goes looking for a usable version of GNU make.
3474
3475
3476
3477
3478
3479
3480# Check if build directory is on local disk. If not possible to determine,
3481# we prefer to claim it's local.
3482# Argument 1: directory to test
3483# Argument 2: what to do if it is on local disk
3484# Argument 3: what to do otherwise (remote disk or failure)
3485
3486
3487# Check that source files have basic read permissions set. This might
3488# not be the case in cygwin in certain conditions.
3489
3490
3491
3492
3493# Check for support for specific options in bash
3494
3495
3496# Code to run after AC_OUTPUT
3497
3498
3499#
3500# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3501# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3502#
3503# This code is free software; you can redistribute it and/or modify it
3504# under the terms of the GNU General Public License version 2 only, as
3505# published by the Free Software Foundation.  Oracle designates this
3506# particular file as subject to the "Classpath" exception as provided
3507# by Oracle in the LICENSE file that accompanied this code.
3508#
3509# This code is distributed in the hope that it will be useful, but WITHOUT
3510# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3511# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3512# version 2 for more details (a copy is included in the LICENSE file that
3513# accompanied this code).
3514#
3515# You should have received a copy of the GNU General Public License version
3516# 2 along with this work; if not, write to the Free Software Foundation,
3517# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3518#
3519# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3520# or visit www.oracle.com if you need additional information or have any
3521# questions.
3522#
3523
3524
3525
3526
3527
3528# Helper function which possibly converts a path using DOS-style short mode.
3529# If so, the updated path is stored in $new_path.
3530# $1: The path to check
3531
3532
3533# Helper function which possibly converts a path using DOS-style short mode.
3534# If so, the updated path is stored in $new_path.
3535# $1: The path to check
3536
3537
3538# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3539# and could probably be heavily simplified. However, all changes in this
3540# area tend to need lot of testing in different scenarios, and in lack of
3541# proper unit testing, cleaning this up has not been deemed worth the effort
3542# at the moment.
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3553
3554
3555
3556
3557#
3558# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3559# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3560#
3561# This code is free software; you can redistribute it and/or modify it
3562# under the terms of the GNU General Public License version 2 only, as
3563# published by the Free Software Foundation.  Oracle designates this
3564# particular file as subject to the "Classpath" exception as provided
3565# by Oracle in the LICENSE file that accompanied this code.
3566#
3567# This code is distributed in the hope that it will be useful, but WITHOUT
3568# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3569# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3570# version 2 for more details (a copy is included in the LICENSE file that
3571# accompanied this code).
3572#
3573# You should have received a copy of the GNU General Public License version
3574# 2 along with this work; if not, write to the Free Software Foundation,
3575# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3576#
3577# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3578# or visit www.oracle.com if you need additional information or have any
3579# questions.
3580#
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592# ... then the rest
3593#
3594# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3595# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3596#
3597# This code is free software; you can redistribute it and/or modify it
3598# under the terms of the GNU General Public License version 2 only, as
3599# published by the Free Software Foundation.  Oracle designates this
3600# particular file as subject to the "Classpath" exception as provided
3601# by Oracle in the LICENSE file that accompanied this code.
3602#
3603# This code is distributed in the hope that it will be useful, but WITHOUT
3604# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3605# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3606# version 2 for more details (a copy is included in the LICENSE file that
3607# accompanied this code).
3608#
3609# You should have received a copy of the GNU General Public License version
3610# 2 along with this work; if not, write to the Free Software Foundation,
3611# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3612#
3613# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3614# or visit www.oracle.com if you need additional information or have any
3615# questions.
3616#
3617
3618########################################################################
3619# This file handles detection of the Boot JDK. The Boot JDK detection
3620# process has been developed as a response to solve a complex real-world
3621# problem. Initially, it was simple, but it has grown as platform after
3622# platform, idiosyncracy after idiosyncracy has been supported.
3623#
3624# The basic idea is this:
3625# 1) You need an acceptable *) JDK to use as a Boot JDK
3626# 2) There are several ways to locate a JDK, that are mostly platform
3627#    dependent **)
3628# 3) You can have multiple JDKs installed
3629# 4) If possible, configure should try to dig out an acceptable JDK
3630#    automatically, without having to resort to command-line options
3631#
3632# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3633#     javac) and not a JRE, etc.
3634#
3635# **) On Windows we typically use a well-known path.
3636#     On MacOSX we typically use the tool java_home.
3637#     On Linux we typically find javac in the $PATH, and then follow a
3638#     chain of symlinks that often ends up in a real JDK.
3639#
3640# This leads to the code where we check in different ways to locate a
3641# JDK, and if one is found, check if it is acceptable. If not, we print
3642# our reasons for rejecting it (useful when debugging non-working
3643# configure situations) and continue checking the next one.
3644########################################################################
3645
3646# Execute the check given as argument, and verify the result
3647# If the Boot JDK was previously found, do nothing
3648# $1 A command line (typically autoconf macro) to execute
3649
3650
3651# Test: Is bootjdk explicitely set by command line arguments?
3652
3653
3654# Test: Is bootjdk available from builddeps?
3655
3656
3657# Test: Is $JAVA_HOME set?
3658
3659
3660# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3661
3662
3663# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3664# $1: Argument to the java_home binary (optional)
3665
3666
3667# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3668
3669
3670# Look for a jdk in the given path. If there are multiple, try to select the newest.
3671# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3672# $1 = Path to directory containing jdk installations.
3673# $2 = String to append to the found JDK directory to get the proper JDK home
3674
3675
3676# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3677# environmental variable as base for where to look.
3678# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3679
3680
3681# Test: Is there a JDK installed in default, well-known locations?
3682
3683
3684# Check that a command-line tool in the Boot JDK is correct
3685# $1 = name of variable to assign
3686# $2 = name of binary
3687
3688
3689###############################################################################
3690#
3691# We need a Boot JDK to bootstrap the build.
3692#
3693
3694
3695
3696
3697
3698#
3699# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3700# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3701#
3702# This code is free software; you can redistribute it and/or modify it
3703# under the terms of the GNU General Public License version 2 only, as
3704# published by the Free Software Foundation.  Oracle designates this
3705# particular file as subject to the "Classpath" exception as provided
3706# by Oracle in the LICENSE file that accompanied this code.
3707#
3708# This code is distributed in the hope that it will be useful, but WITHOUT
3709# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3710# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3711# version 2 for more details (a copy is included in the LICENSE file that
3712# accompanied this code).
3713#
3714# You should have received a copy of the GNU General Public License version
3715# 2 along with this work; if not, write to the Free Software Foundation,
3716# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3717#
3718# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3719# or visit www.oracle.com if you need additional information or have any
3720# questions.
3721#
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742#
3743# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3744# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3745#
3746# This code is free software; you can redistribute it and/or modify it
3747# under the terms of the GNU General Public License version 2 only, as
3748# published by the Free Software Foundation.  Oracle designates this
3749# particular file as subject to the "Classpath" exception as provided
3750# by Oracle in the LICENSE file that accompanied this code.
3751#
3752# This code is distributed in the hope that it will be useful, but WITHOUT
3753# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3754# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3755# version 2 for more details (a copy is included in the LICENSE file that
3756# accompanied this code).
3757#
3758# You should have received a copy of the GNU General Public License version
3759# 2 along with this work; if not, write to the Free Software Foundation,
3760# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3761#
3762# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3763# or visit www.oracle.com if you need additional information or have any
3764# questions.
3765#
3766
3767
3768
3769
3770
3771# Documentation on common flags used for solstudio in HIGHEST.
3772#
3773# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3774#          done with care, there are some assumptions below that need to
3775#          be understood about the use of pointers, and IEEE behavior.
3776#
3777# -fns: Use non-standard floating point mode (not IEEE 754)
3778# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3779# -fsingle: Use single precision floating point with 'float'
3780# -xalias_level=basic: Assume memory references via basic pointer types do not alias
3781#   (Source with excessing pointer casting and data access with mixed
3782#    pointer types are not recommended)
3783# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3784#   (If you expect perfect errno behavior, do not use this)
3785# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3786# -xrestrict: Pointer parameters to functions do not overlap
3787#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3788#    If you pass in multiple pointers to the same data, do not use this)
3789# -xlibmil: Inline some library routines
3790#   (If you expect perfect errno behavior, do not use this)
3791# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3792#   (If you expect perfect errno behavior, do not use this)
3793#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3794
3795    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3796    # Bug?
3797    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3798    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3799    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3800    #fi
3801
3802
3803
3804
3805
3806# FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3807#                                   [RUN-IF-FALSE])
3808# ------------------------------------------------------------
3809# Check that the c and c++ compilers support an argument
3810
3811
3812# FLAGS_LINKER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3813#                                    [RUN-IF-FALSE])
3814# ------------------------------------------------------------
3815# Check that the linker support an argument
3816
3817
3818
3819
3820#
3821# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3822# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3823#
3824# This code is free software; you can redistribute it and/or modify it
3825# under the terms of the GNU General Public License version 2 only, as
3826# published by the Free Software Foundation.  Oracle designates this
3827# particular file as subject to the "Classpath" exception as provided
3828# by Oracle in the LICENSE file that accompanied this code.
3829#
3830# This code is distributed in the hope that it will be useful, but WITHOUT
3831# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3832# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3833# version 2 for more details (a copy is included in the LICENSE file that
3834# accompanied this code).
3835#
3836# You should have received a copy of the GNU General Public License version
3837# 2 along with this work; if not, write to the Free Software Foundation,
3838# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3839#
3840# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3841# or visit www.oracle.com if you need additional information or have any
3842# questions.
3843#
3844
3845
3846
3847
3848
3849cygwin_help() {
3850  case $1 in
3851    unzip)
3852      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3853      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3854      ;;
3855    zip)
3856      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3857      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3858      ;;
3859    make)
3860      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3861      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3862      ;;
3863    freetype)
3864      HELP_MSG="
3865The freetype library can now be build during the configure process.
3866Download the freetype sources and unpack them into an arbitrary directory:
3867
3868wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
3869tar -xzf freetype-2.5.3.tar.gz
3870
3871Then run configure with '--with-freetype-src=<freetype_src>'. This will
3872automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
3873builds or into '<freetype_src>/lib32' for 32-bit builds.
3874Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
3875and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds."
3876      ;;
3877  esac
3878}
3879
3880msys_help() {
3881  PKGHANDLER_COMMAND=""
3882}
3883
3884apt_help() {
3885  case $1 in
3886    devkit)
3887      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3888    openjdk)
3889      PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3890    alsa)
3891      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3892    cups)
3893      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3894    freetype)
3895      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3896    pulse)
3897      PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3898    x11)
3899      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3900    ccache)
3901      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3902  esac
3903}
3904
3905yum_help() {
3906  case $1 in
3907    devkit)
3908      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3909    openjdk)
3910      PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3911    alsa)
3912      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3913    cups)
3914      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3915    freetype)
3916      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3917    pulse)
3918      PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3919    x11)
3920      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
3921    ccache)
3922      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3923  esac
3924}
3925
3926port_help() {
3927  PKGHANDLER_COMMAND=""
3928}
3929
3930pkgutil_help() {
3931  PKGHANDLER_COMMAND=""
3932}
3933
3934pkgadd_help() {
3935  PKGHANDLER_COMMAND=""
3936}
3937
3938# This function will check if we're called from the "configure" wrapper while
3939# printing --help. If so, we will print out additional information that can
3940# only be extracted within the autoconf script, and then exit. This must be
3941# called at the very beginning in configure.ac.
3942
3943
3944
3945
3946
3947
3948#
3949# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3950# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3951#
3952# This code is free software; you can redistribute it and/or modify it
3953# under the terms of the GNU General Public License version 2 only, as
3954# published by the Free Software Foundation.  Oracle designates this
3955# particular file as subject to the "Classpath" exception as provided
3956# by Oracle in the LICENSE file that accompanied this code.
3957#
3958# This code is distributed in the hope that it will be useful, but WITHOUT
3959# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3960# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3961# version 2 for more details (a copy is included in the LICENSE file that
3962# accompanied this code).
3963#
3964# You should have received a copy of the GNU General Public License version
3965# 2 along with this work; if not, write to the Free Software Foundation,
3966# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3967#
3968# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3969# or visit www.oracle.com if you need additional information or have any
3970# questions.
3971#
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982###############################################################################
3983#
3984# Should we build only OpenJDK even if closed sources are present?
3985#
3986
3987
3988
3989
3990###############################################################################
3991#
3992# Setup version numbers
3993#
3994
3995
3996
3997
3998
3999
4000################################################################################
4001#
4002# Gcov coverage data for hotspot
4003#
4004
4005
4006#
4007# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
4008# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4009#
4010# This code is free software; you can redistribute it and/or modify it
4011# under the terms of the GNU General Public License version 2 only, as
4012# published by the Free Software Foundation.  Oracle designates this
4013# particular file as subject to the "Classpath" exception as provided
4014# by Oracle in the LICENSE file that accompanied this code.
4015#
4016# This code is distributed in the hope that it will be useful, but WITHOUT
4017# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4018# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4019# version 2 for more details (a copy is included in the LICENSE file that
4020# accompanied this code).
4021#
4022# You should have received a copy of the GNU General Public License version
4023# 2 along with this work; if not, write to the Free Software Foundation,
4024# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4025#
4026# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4027# or visit www.oracle.com if you need additional information or have any
4028# questions.
4029#
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051#
4052# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4053# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4054#
4055# This code is free software; you can redistribute it and/or modify it
4056# under the terms of the GNU General Public License version 2 only, as
4057# published by the Free Software Foundation.  Oracle designates this
4058# particular file as subject to the "Classpath" exception as provided
4059# by Oracle in the LICENSE file that accompanied this code.
4060#
4061# This code is distributed in the hope that it will be useful, but WITHOUT
4062# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4063# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4064# version 2 for more details (a copy is included in the LICENSE file that
4065# accompanied this code).
4066#
4067# You should have received a copy of the GNU General Public License version
4068# 2 along with this work; if not, write to the Free Software Foundation,
4069# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4070#
4071# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4072# or visit www.oracle.com if you need additional information or have any
4073# questions.
4074#
4075
4076# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4077# Converts autoconf style CPU name to OpenJDK style, into
4078# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4079
4080
4081# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4082# Converts autoconf style OS name to OpenJDK style, into
4083# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4084
4085
4086# Expects $host_os $host_cpu $build_os and $build_cpu
4087# and $with_target_bits to have been setup!
4088#
4089# Translate the standard triplet(quadruplet) definition
4090# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4091# OPENJDK_BUILD_OS, etc.
4092
4093
4094# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4095# accordingly. Must be done after setting up build and target system, but before
4096# doing anything else with these values.
4097
4098
4099# Setup the legacy variables, for controlling the old makefiles.
4100#
4101
4102
4103
4104
4105#%%% Build and target systems %%%
4106
4107
4108
4109
4110# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4111# Add -mX to various FLAGS variables.
4112
4113
4114
4115
4116
4117
4118#
4119# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4120# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4121#
4122# This code is free software; you can redistribute it and/or modify it
4123# under the terms of the GNU General Public License version 2 only, as
4124# published by the Free Software Foundation.  Oracle designates this
4125# particular file as subject to the "Classpath" exception as provided
4126# by Oracle in the LICENSE file that accompanied this code.
4127#
4128# This code is distributed in the hope that it will be useful, but WITHOUT
4129# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4130# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4131# version 2 for more details (a copy is included in the LICENSE file that
4132# accompanied this code).
4133#
4134# You should have received a copy of the GNU General Public License version
4135# 2 along with this work; if not, write to the Free Software Foundation,
4136# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4137#
4138# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4139# or visit www.oracle.com if you need additional information or have any
4140# questions.
4141#
4142
4143
4144
4145
4146
4147
4148
4149
4150#
4151# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4152# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4153#
4154# This code is free software; you can redistribute it and/or modify it
4155# under the terms of the GNU General Public License version 2 only, as
4156# published by the Free Software Foundation.  Oracle designates this
4157# particular file as subject to the "Classpath" exception as provided
4158# by Oracle in the LICENSE file that accompanied this code.
4159#
4160# This code is distributed in the hope that it will be useful, but WITHOUT
4161# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4162# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4163# version 2 for more details (a copy is included in the LICENSE file that
4164# accompanied this code).
4165#
4166# You should have received a copy of the GNU General Public License version
4167# 2 along with this work; if not, write to the Free Software Foundation,
4168# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4169#
4170# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4171# or visit www.oracle.com if you need additional information or have any
4172# questions.
4173#
4174
4175########################################################################
4176# This file is responsible for detecting, verifying and setting up the
4177# toolchain, i.e. the compiler, linker and related utilities. It will setup
4178# proper paths to the binaries, but it will not setup any flags.
4179#
4180# The binaries used is determined by the toolchain type, which is the family of
4181# compilers and related tools that are used.
4182########################################################################
4183
4184
4185# All valid toolchains, regardless of platform (used by help.m4)
4186VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4187
4188# These toolchains are valid on different platforms
4189VALID_TOOLCHAINS_linux="gcc clang"
4190VALID_TOOLCHAINS_solaris="solstudio"
4191VALID_TOOLCHAINS_macosx="gcc clang"
4192VALID_TOOLCHAINS_aix="xlc"
4193VALID_TOOLCHAINS_windows="microsoft"
4194
4195# Toolchain descriptions
4196TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4197TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4198TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4199TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4200TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4201
4202# Setup a number of variables describing how native output files are
4203# named on this platform/toolchain.
4204
4205
4206# Determine which toolchain type to use, and make sure it is valid for this
4207# platform. Setup various information about the selected toolchain.
4208
4209
4210# Before we start detecting the toolchain executables, we might need some
4211# special setup, e.g. additional paths etc.
4212
4213
4214# Restore path, etc
4215
4216
4217# Check if a compiler is of the toolchain type we expect, and save the version
4218# information from it. If the compiler does not match the expected type,
4219# this function will abort using AC_MSG_ERROR. If it matches, the version will
4220# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4221# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4222#
4223# $1 = compiler to test (CC or CXX)
4224# $2 = human readable name of compiler (C or C++)
4225
4226
4227# Try to locate the given C or C++ compiler in the path, or otherwise.
4228#
4229# $1 = compiler to test (CC or CXX)
4230# $2 = human readable name of compiler (C or C++)
4231# $3 = list of compiler names to search for
4232
4233
4234# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4235# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4236# archiver (AR). Verify that the compilers are correct according to the
4237# toolchain type.
4238
4239
4240# Setup additional tools that is considered a part of the toolchain, but not the
4241# core part. Many of these are highly platform-specific and do not exist,
4242# and/or are not needed on all platforms.
4243
4244
4245# Setup the build tools (i.e, the compiler and linker used to build programs
4246# that should be run on the build platform, not the target platform, as a build
4247# helper). Since the non-cross-compile case uses the normal, target compilers
4248# for this, we can only do this after these have been setup.
4249
4250
4251# Setup legacy variables that are still needed as alternative ways to refer to
4252# parts of the toolchain.
4253
4254
4255# Do some additional checks on the detected tools.
4256
4257
4258# Setup the JTReg Regression Test Harness.
4259
4260
4261#
4262# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4263# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4264#
4265# This code is free software; you can redistribute it and/or modify it
4266# under the terms of the GNU General Public License version 2 only, as
4267# published by the Free Software Foundation.  Oracle designates this
4268# particular file as subject to the "Classpath" exception as provided
4269# by Oracle in the LICENSE file that accompanied this code.
4270#
4271# This code is distributed in the hope that it will be useful, but WITHOUT
4272# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4273# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4274# version 2 for more details (a copy is included in the LICENSE file that
4275# accompanied this code).
4276#
4277# You should have received a copy of the GNU General Public License version
4278# 2 along with this work; if not, write to the Free Software Foundation,
4279# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4280#
4281# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4282# or visit www.oracle.com if you need additional information or have any
4283# questions.
4284#
4285
4286################################################################################
4287# The order of these defines the priority by which we try to find them.
4288VALID_VS_VERSIONS="2013 2012 2010"
4289
4290VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
4291VS_VERSION_INTERNAL_2010=100
4292VS_MSVCR_2010=msvcr100.dll
4293# We don't use msvcp on Visual Studio 2010
4294#VS_MSVCP_2010=msvcp100.dll
4295VS_ENVVAR_2010="VS100COMNTOOLS"
4296VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
4297VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
4298VS_VS_PLATFORM_NAME_2010="v100"
4299VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
4300
4301VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
4302VS_VERSION_INTERNAL_2012=110
4303VS_MSVCR_2012=msvcr110.dll
4304VS_MSVCP_2012=msvcp110.dll
4305VS_ENVVAR_2012="VS110COMNTOOLS"
4306VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
4307VS_SDK_INSTALLDIR_2012=
4308VS_VS_PLATFORM_NAME_2012="v110"
4309VS_SDK_PLATFORM_NAME_2012=
4310
4311VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
4312VS_VERSION_INTERNAL_2013=120
4313VS_MSVCR_2013=msvcr120.dll
4314VS_MSVCP_2013=msvcp120.dll
4315VS_ENVVAR_2013="VS120COMNTOOLS"
4316VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
4317VS_SDK_INSTALLDIR_2013=
4318VS_VS_PLATFORM_NAME_2013="v120"
4319VS_SDK_PLATFORM_NAME_2013=
4320
4321################################################################################
4322
4323
4324
4325################################################################################
4326
4327
4328
4329################################################################################
4330# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
4331# build environment and assigns it to VS_ENV_CMD
4332
4333
4334################################################################################
4335
4336
4337
4338################################################################################
4339# Check if the VS env variables were setup prior to running configure.
4340# If not, then find vcvarsall.bat and run it automatically, and integrate
4341# the set env variables into the spec file.
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356# This line needs to be here, verbatim, after all includes and the dummy hook
4357# definitions. It is replaced with custom functionality when building
4358# custom sources.
4359#CUSTOM_AUTOCONF_INCLUDE
4360
4361# Do not change or remove the following line, it is needed for consistency checks:
4362DATE_WHEN_GENERATED=1439979411
4363
4364###############################################################################
4365#
4366# Initialization / Boot-strapping
4367#
4368# The bootstrapping process needs to solve the "chicken or the egg" problem,
4369# thus it jumps back and forth, each time gaining something needed later on.
4370#
4371###############################################################################
4372
4373# If we are requested to print additional help, do that and then exit.
4374# This must be the very first call.
4375
4376  if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4377    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4378    $PRINTF "Which are valid to use depends on the build platform.\n"
4379    for toolchain in $VALID_TOOLCHAINS_all; do
4380      # Use indirect variable referencing
4381      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4382      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4383      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4384    done
4385
4386    # And now exit directly
4387    exit 0
4388  fi
4389
4390
4391# Basic initialization that must happen first of all in the normal process.
4392
4393  # Save the original command line. This is passed to us by the wrapper configure script.
4394
4395  # Save the path variable before it gets changed
4396  ORIGINAL_PATH="$PATH"
4397
4398  DATE_WHEN_CONFIGURED=`LANG=C date`
4399
4400  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4401$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4402  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4403$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4404
4405
4406  # Start with tools that do not need have cross compilation support
4407  # and can be expected to be found in the default PATH. These tools are
4408  # used by configure. Nor are these tools expected to be found in the
4409  # devkit from the builddeps server either, since they are
4410  # needed to download the devkit.
4411
4412  # First are all the simple required tools.
4413
4414
4415
4416  # Publish this variable in the help.
4417
4418
4419  if test "x$BASENAME" = x; then
4420    # The variable is not set by user, try to locate tool using the code snippet
4421    for ac_prog in basename
4422do
4423  # Extract the first word of "$ac_prog", so it can be a program name with args.
4424set dummy $ac_prog; ac_word=$2
4425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4426$as_echo_n "checking for $ac_word... " >&6; }
4427if ${ac_cv_path_BASENAME+:} false; then :
4428  $as_echo_n "(cached) " >&6
4429else
4430  case $BASENAME in
4431  [\\/]* | ?:[\\/]*)
4432  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4433  ;;
4434  *)
4435  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4436for as_dir in $PATH
4437do
4438  IFS=$as_save_IFS
4439  test -z "$as_dir" && as_dir=.
4440    for ac_exec_ext in '' $ac_executable_extensions; do
4441  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4442    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4443    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4444    break 2
4445  fi
4446done
4447  done
4448IFS=$as_save_IFS
4449
4450  ;;
4451esac
4452fi
4453BASENAME=$ac_cv_path_BASENAME
4454if test -n "$BASENAME"; then
4455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4456$as_echo "$BASENAME" >&6; }
4457else
4458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4459$as_echo "no" >&6; }
4460fi
4461
4462
4463  test -n "$BASENAME" && break
4464done
4465
4466  else
4467    # The variable is set, but is it from the command line or the environment?
4468
4469    # Try to remove the string !BASENAME! from our list.
4470    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4471    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4472      # If it failed, the variable was not from the command line. Ignore it,
4473      # but warn the user (except for BASH, which is always set by the calling BASH).
4474      if test "xBASENAME" != xBASH; then
4475        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4476$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4477      fi
4478      # Try to locate tool using the code snippet
4479      for ac_prog in basename
4480do
4481  # Extract the first word of "$ac_prog", so it can be a program name with args.
4482set dummy $ac_prog; ac_word=$2
4483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4484$as_echo_n "checking for $ac_word... " >&6; }
4485if ${ac_cv_path_BASENAME+:} false; then :
4486  $as_echo_n "(cached) " >&6
4487else
4488  case $BASENAME in
4489  [\\/]* | ?:[\\/]*)
4490  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4491  ;;
4492  *)
4493  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4494for as_dir in $PATH
4495do
4496  IFS=$as_save_IFS
4497  test -z "$as_dir" && as_dir=.
4498    for ac_exec_ext in '' $ac_executable_extensions; do
4499  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4500    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4501    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4502    break 2
4503  fi
4504done
4505  done
4506IFS=$as_save_IFS
4507
4508  ;;
4509esac
4510fi
4511BASENAME=$ac_cv_path_BASENAME
4512if test -n "$BASENAME"; then
4513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4514$as_echo "$BASENAME" >&6; }
4515else
4516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4517$as_echo "no" >&6; }
4518fi
4519
4520
4521  test -n "$BASENAME" && break
4522done
4523
4524    else
4525      # If it succeeded, then it was overridden by the user. We will use it
4526      # for the tool.
4527
4528      # First remove it from the list of overridden variables, so we can test
4529      # for unknown variables in the end.
4530      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4531
4532      # Check if the provided tool contains a complete path.
4533      tool_specified="$BASENAME"
4534      tool_basename="${tool_specified##*/}"
4535      if test "x$tool_basename" = "x$tool_specified"; then
4536        # A command without a complete path is provided, search $PATH.
4537        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
4538$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
4539        # Extract the first word of "$tool_basename", so it can be a program name with args.
4540set dummy $tool_basename; ac_word=$2
4541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4542$as_echo_n "checking for $ac_word... " >&6; }
4543if ${ac_cv_path_BASENAME+:} false; then :
4544  $as_echo_n "(cached) " >&6
4545else
4546  case $BASENAME in
4547  [\\/]* | ?:[\\/]*)
4548  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4549  ;;
4550  *)
4551  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4552for as_dir in $PATH
4553do
4554  IFS=$as_save_IFS
4555  test -z "$as_dir" && as_dir=.
4556    for ac_exec_ext in '' $ac_executable_extensions; do
4557  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4558    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4559    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4560    break 2
4561  fi
4562done
4563  done
4564IFS=$as_save_IFS
4565
4566  ;;
4567esac
4568fi
4569BASENAME=$ac_cv_path_BASENAME
4570if test -n "$BASENAME"; then
4571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4572$as_echo "$BASENAME" >&6; }
4573else
4574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4575$as_echo "no" >&6; }
4576fi
4577
4578
4579        if test "x$BASENAME" = x; then
4580          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4581        fi
4582      else
4583        # Otherwise we believe it is a complete path. Use it as it is.
4584        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
4585$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
4586        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4587$as_echo_n "checking for BASENAME... " >&6; }
4588        if test ! -x "$tool_specified"; then
4589          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4590$as_echo "not found" >&6; }
4591          as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
4592        fi
4593        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4594$as_echo "$tool_specified" >&6; }
4595      fi
4596    fi
4597  fi
4598
4599
4600
4601  if test "x$BASENAME" = x; then
4602    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
4603  fi
4604
4605
4606
4607
4608
4609  # Publish this variable in the help.
4610
4611
4612  if test "x$BASH" = x; then
4613    # The variable is not set by user, try to locate tool using the code snippet
4614    for ac_prog in bash
4615do
4616  # Extract the first word of "$ac_prog", so it can be a program name with args.
4617set dummy $ac_prog; ac_word=$2
4618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4619$as_echo_n "checking for $ac_word... " >&6; }
4620if ${ac_cv_path_BASH+:} false; then :
4621  $as_echo_n "(cached) " >&6
4622else
4623  case $BASH in
4624  [\\/]* | ?:[\\/]*)
4625  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4626  ;;
4627  *)
4628  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4629for as_dir in $PATH
4630do
4631  IFS=$as_save_IFS
4632  test -z "$as_dir" && as_dir=.
4633    for ac_exec_ext in '' $ac_executable_extensions; do
4634  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4635    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4636    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4637    break 2
4638  fi
4639done
4640  done
4641IFS=$as_save_IFS
4642
4643  ;;
4644esac
4645fi
4646BASH=$ac_cv_path_BASH
4647if test -n "$BASH"; then
4648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4649$as_echo "$BASH" >&6; }
4650else
4651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4652$as_echo "no" >&6; }
4653fi
4654
4655
4656  test -n "$BASH" && break
4657done
4658
4659  else
4660    # The variable is set, but is it from the command line or the environment?
4661
4662    # Try to remove the string !BASH! from our list.
4663    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
4664    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4665      # If it failed, the variable was not from the command line. Ignore it,
4666      # but warn the user (except for BASH, which is always set by the calling BASH).
4667      if test "xBASH" != xBASH; then
4668        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
4669$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
4670      fi
4671      # Try to locate tool using the code snippet
4672      for ac_prog in bash
4673do
4674  # Extract the first word of "$ac_prog", so it can be a program name with args.
4675set dummy $ac_prog; ac_word=$2
4676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4677$as_echo_n "checking for $ac_word... " >&6; }
4678if ${ac_cv_path_BASH+:} false; then :
4679  $as_echo_n "(cached) " >&6
4680else
4681  case $BASH in
4682  [\\/]* | ?:[\\/]*)
4683  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4684  ;;
4685  *)
4686  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4687for as_dir in $PATH
4688do
4689  IFS=$as_save_IFS
4690  test -z "$as_dir" && as_dir=.
4691    for ac_exec_ext in '' $ac_executable_extensions; do
4692  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4693    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4694    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4695    break 2
4696  fi
4697done
4698  done
4699IFS=$as_save_IFS
4700
4701  ;;
4702esac
4703fi
4704BASH=$ac_cv_path_BASH
4705if test -n "$BASH"; then
4706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4707$as_echo "$BASH" >&6; }
4708else
4709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4710$as_echo "no" >&6; }
4711fi
4712
4713
4714  test -n "$BASH" && break
4715done
4716
4717    else
4718      # If it succeeded, then it was overridden by the user. We will use it
4719      # for the tool.
4720
4721      # First remove it from the list of overridden variables, so we can test
4722      # for unknown variables in the end.
4723      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4724
4725      # Check if the provided tool contains a complete path.
4726      tool_specified="$BASH"
4727      tool_basename="${tool_specified##*/}"
4728      if test "x$tool_basename" = "x$tool_specified"; then
4729        # A command without a complete path is provided, search $PATH.
4730        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
4731$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
4732        # Extract the first word of "$tool_basename", so it can be a program name with args.
4733set dummy $tool_basename; ac_word=$2
4734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4735$as_echo_n "checking for $ac_word... " >&6; }
4736if ${ac_cv_path_BASH+:} false; then :
4737  $as_echo_n "(cached) " >&6
4738else
4739  case $BASH in
4740  [\\/]* | ?:[\\/]*)
4741  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4742  ;;
4743  *)
4744  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4745for as_dir in $PATH
4746do
4747  IFS=$as_save_IFS
4748  test -z "$as_dir" && as_dir=.
4749    for ac_exec_ext in '' $ac_executable_extensions; do
4750  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4751    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4752    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4753    break 2
4754  fi
4755done
4756  done
4757IFS=$as_save_IFS
4758
4759  ;;
4760esac
4761fi
4762BASH=$ac_cv_path_BASH
4763if test -n "$BASH"; then
4764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4765$as_echo "$BASH" >&6; }
4766else
4767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4768$as_echo "no" >&6; }
4769fi
4770
4771
4772        if test "x$BASH" = x; then
4773          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4774        fi
4775      else
4776        # Otherwise we believe it is a complete path. Use it as it is.
4777        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
4778$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
4779        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
4780$as_echo_n "checking for BASH... " >&6; }
4781        if test ! -x "$tool_specified"; then
4782          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4783$as_echo "not found" >&6; }
4784          as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
4785        fi
4786        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4787$as_echo "$tool_specified" >&6; }
4788      fi
4789    fi
4790  fi
4791
4792
4793
4794  if test "x$BASH" = x; then
4795    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
4796  fi
4797
4798
4799
4800
4801
4802  # Publish this variable in the help.
4803
4804
4805  if test "x$CAT" = x; then
4806    # The variable is not set by user, try to locate tool using the code snippet
4807    for ac_prog in cat
4808do
4809  # Extract the first word of "$ac_prog", so it can be a program name with args.
4810set dummy $ac_prog; ac_word=$2
4811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4812$as_echo_n "checking for $ac_word... " >&6; }
4813if ${ac_cv_path_CAT+:} false; then :
4814  $as_echo_n "(cached) " >&6
4815else
4816  case $CAT in
4817  [\\/]* | ?:[\\/]*)
4818  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4819  ;;
4820  *)
4821  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4822for as_dir in $PATH
4823do
4824  IFS=$as_save_IFS
4825  test -z "$as_dir" && as_dir=.
4826    for ac_exec_ext in '' $ac_executable_extensions; do
4827  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4828    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4829    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4830    break 2
4831  fi
4832done
4833  done
4834IFS=$as_save_IFS
4835
4836  ;;
4837esac
4838fi
4839CAT=$ac_cv_path_CAT
4840if test -n "$CAT"; then
4841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4842$as_echo "$CAT" >&6; }
4843else
4844  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4845$as_echo "no" >&6; }
4846fi
4847
4848
4849  test -n "$CAT" && break
4850done
4851
4852  else
4853    # The variable is set, but is it from the command line or the environment?
4854
4855    # Try to remove the string !CAT! from our list.
4856    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
4857    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4858      # If it failed, the variable was not from the command line. Ignore it,
4859      # but warn the user (except for BASH, which is always set by the calling BASH).
4860      if test "xCAT" != xBASH; then
4861        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
4862$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
4863      fi
4864      # Try to locate tool using the code snippet
4865      for ac_prog in cat
4866do
4867  # Extract the first word of "$ac_prog", so it can be a program name with args.
4868set dummy $ac_prog; ac_word=$2
4869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4870$as_echo_n "checking for $ac_word... " >&6; }
4871if ${ac_cv_path_CAT+:} false; then :
4872  $as_echo_n "(cached) " >&6
4873else
4874  case $CAT in
4875  [\\/]* | ?:[\\/]*)
4876  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4877  ;;
4878  *)
4879  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4880for as_dir in $PATH
4881do
4882  IFS=$as_save_IFS
4883  test -z "$as_dir" && as_dir=.
4884    for ac_exec_ext in '' $ac_executable_extensions; do
4885  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4886    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4887    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4888    break 2
4889  fi
4890done
4891  done
4892IFS=$as_save_IFS
4893
4894  ;;
4895esac
4896fi
4897CAT=$ac_cv_path_CAT
4898if test -n "$CAT"; then
4899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4900$as_echo "$CAT" >&6; }
4901else
4902  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4903$as_echo "no" >&6; }
4904fi
4905
4906
4907  test -n "$CAT" && break
4908done
4909
4910    else
4911      # If it succeeded, then it was overridden by the user. We will use it
4912      # for the tool.
4913
4914      # First remove it from the list of overridden variables, so we can test
4915      # for unknown variables in the end.
4916      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4917
4918      # Check if the provided tool contains a complete path.
4919      tool_specified="$CAT"
4920      tool_basename="${tool_specified##*/}"
4921      if test "x$tool_basename" = "x$tool_specified"; then
4922        # A command without a complete path is provided, search $PATH.
4923        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
4924$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
4925        # Extract the first word of "$tool_basename", so it can be a program name with args.
4926set dummy $tool_basename; ac_word=$2
4927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4928$as_echo_n "checking for $ac_word... " >&6; }
4929if ${ac_cv_path_CAT+:} false; then :
4930  $as_echo_n "(cached) " >&6
4931else
4932  case $CAT in
4933  [\\/]* | ?:[\\/]*)
4934  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4935  ;;
4936  *)
4937  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4938for as_dir in $PATH
4939do
4940  IFS=$as_save_IFS
4941  test -z "$as_dir" && as_dir=.
4942    for ac_exec_ext in '' $ac_executable_extensions; do
4943  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4944    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4945    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4946    break 2
4947  fi
4948done
4949  done
4950IFS=$as_save_IFS
4951
4952  ;;
4953esac
4954fi
4955CAT=$ac_cv_path_CAT
4956if test -n "$CAT"; then
4957  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4958$as_echo "$CAT" >&6; }
4959else
4960  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4961$as_echo "no" >&6; }
4962fi
4963
4964
4965        if test "x$CAT" = x; then
4966          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4967        fi
4968      else
4969        # Otherwise we believe it is a complete path. Use it as it is.
4970        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
4971$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
4972        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
4973$as_echo_n "checking for CAT... " >&6; }
4974        if test ! -x "$tool_specified"; then
4975          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4976$as_echo "not found" >&6; }
4977          as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
4978        fi
4979        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4980$as_echo "$tool_specified" >&6; }
4981      fi
4982    fi
4983  fi
4984
4985
4986
4987  if test "x$CAT" = x; then
4988    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
4989  fi
4990
4991
4992
4993
4994
4995  # Publish this variable in the help.
4996
4997
4998  if test "x$CHMOD" = x; then
4999    # The variable is not set by user, try to locate tool using the code snippet
5000    for ac_prog in chmod
5001do
5002  # Extract the first word of "$ac_prog", so it can be a program name with args.
5003set dummy $ac_prog; ac_word=$2
5004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5005$as_echo_n "checking for $ac_word... " >&6; }
5006if ${ac_cv_path_CHMOD+:} false; then :
5007  $as_echo_n "(cached) " >&6
5008else
5009  case $CHMOD in
5010  [\\/]* | ?:[\\/]*)
5011  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5012  ;;
5013  *)
5014  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5015for as_dir in $PATH
5016do
5017  IFS=$as_save_IFS
5018  test -z "$as_dir" && as_dir=.
5019    for ac_exec_ext in '' $ac_executable_extensions; do
5020  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5021    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5022    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5023    break 2
5024  fi
5025done
5026  done
5027IFS=$as_save_IFS
5028
5029  ;;
5030esac
5031fi
5032CHMOD=$ac_cv_path_CHMOD
5033if test -n "$CHMOD"; then
5034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5035$as_echo "$CHMOD" >&6; }
5036else
5037  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5038$as_echo "no" >&6; }
5039fi
5040
5041
5042  test -n "$CHMOD" && break
5043done
5044
5045  else
5046    # The variable is set, but is it from the command line or the environment?
5047
5048    # Try to remove the string !CHMOD! from our list.
5049    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5050    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5051      # If it failed, the variable was not from the command line. Ignore it,
5052      # but warn the user (except for BASH, which is always set by the calling BASH).
5053      if test "xCHMOD" != xBASH; then
5054        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5055$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5056      fi
5057      # Try to locate tool using the code snippet
5058      for ac_prog in chmod
5059do
5060  # Extract the first word of "$ac_prog", so it can be a program name with args.
5061set dummy $ac_prog; ac_word=$2
5062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5063$as_echo_n "checking for $ac_word... " >&6; }
5064if ${ac_cv_path_CHMOD+:} false; then :
5065  $as_echo_n "(cached) " >&6
5066else
5067  case $CHMOD in
5068  [\\/]* | ?:[\\/]*)
5069  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5070  ;;
5071  *)
5072  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5073for as_dir in $PATH
5074do
5075  IFS=$as_save_IFS
5076  test -z "$as_dir" && as_dir=.
5077    for ac_exec_ext in '' $ac_executable_extensions; do
5078  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5079    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5080    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5081    break 2
5082  fi
5083done
5084  done
5085IFS=$as_save_IFS
5086
5087  ;;
5088esac
5089fi
5090CHMOD=$ac_cv_path_CHMOD
5091if test -n "$CHMOD"; then
5092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5093$as_echo "$CHMOD" >&6; }
5094else
5095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5096$as_echo "no" >&6; }
5097fi
5098
5099
5100  test -n "$CHMOD" && break
5101done
5102
5103    else
5104      # If it succeeded, then it was overridden by the user. We will use it
5105      # for the tool.
5106
5107      # First remove it from the list of overridden variables, so we can test
5108      # for unknown variables in the end.
5109      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5110
5111      # Check if the provided tool contains a complete path.
5112      tool_specified="$CHMOD"
5113      tool_basename="${tool_specified##*/}"
5114      if test "x$tool_basename" = "x$tool_specified"; then
5115        # A command without a complete path is provided, search $PATH.
5116        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5117$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5118        # Extract the first word of "$tool_basename", so it can be a program name with args.
5119set dummy $tool_basename; ac_word=$2
5120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5121$as_echo_n "checking for $ac_word... " >&6; }
5122if ${ac_cv_path_CHMOD+:} false; then :
5123  $as_echo_n "(cached) " >&6
5124else
5125  case $CHMOD in
5126  [\\/]* | ?:[\\/]*)
5127  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5128  ;;
5129  *)
5130  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5131for as_dir in $PATH
5132do
5133  IFS=$as_save_IFS
5134  test -z "$as_dir" && as_dir=.
5135    for ac_exec_ext in '' $ac_executable_extensions; do
5136  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5137    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5138    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5139    break 2
5140  fi
5141done
5142  done
5143IFS=$as_save_IFS
5144
5145  ;;
5146esac
5147fi
5148CHMOD=$ac_cv_path_CHMOD
5149if test -n "$CHMOD"; then
5150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5151$as_echo "$CHMOD" >&6; }
5152else
5153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5154$as_echo "no" >&6; }
5155fi
5156
5157
5158        if test "x$CHMOD" = x; then
5159          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5160        fi
5161      else
5162        # Otherwise we believe it is a complete path. Use it as it is.
5163        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5164$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5165        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5166$as_echo_n "checking for CHMOD... " >&6; }
5167        if test ! -x "$tool_specified"; then
5168          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5169$as_echo "not found" >&6; }
5170          as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5171        fi
5172        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5173$as_echo "$tool_specified" >&6; }
5174      fi
5175    fi
5176  fi
5177
5178
5179
5180  if test "x$CHMOD" = x; then
5181    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5182  fi
5183
5184
5185
5186
5187
5188  # Publish this variable in the help.
5189
5190
5191  if test "x$CMP" = x; then
5192    # The variable is not set by user, try to locate tool using the code snippet
5193    for ac_prog in cmp
5194do
5195  # Extract the first word of "$ac_prog", so it can be a program name with args.
5196set dummy $ac_prog; ac_word=$2
5197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5198$as_echo_n "checking for $ac_word... " >&6; }
5199if ${ac_cv_path_CMP+:} false; then :
5200  $as_echo_n "(cached) " >&6
5201else
5202  case $CMP in
5203  [\\/]* | ?:[\\/]*)
5204  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5205  ;;
5206  *)
5207  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5208for as_dir in $PATH
5209do
5210  IFS=$as_save_IFS
5211  test -z "$as_dir" && as_dir=.
5212    for ac_exec_ext in '' $ac_executable_extensions; do
5213  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5214    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5215    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5216    break 2
5217  fi
5218done
5219  done
5220IFS=$as_save_IFS
5221
5222  ;;
5223esac
5224fi
5225CMP=$ac_cv_path_CMP
5226if test -n "$CMP"; then
5227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5228$as_echo "$CMP" >&6; }
5229else
5230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5231$as_echo "no" >&6; }
5232fi
5233
5234
5235  test -n "$CMP" && break
5236done
5237
5238  else
5239    # The variable is set, but is it from the command line or the environment?
5240
5241    # Try to remove the string !CMP! from our list.
5242    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5243    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5244      # If it failed, the variable was not from the command line. Ignore it,
5245      # but warn the user (except for BASH, which is always set by the calling BASH).
5246      if test "xCMP" != xBASH; then
5247        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5248$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5249      fi
5250      # Try to locate tool using the code snippet
5251      for ac_prog in cmp
5252do
5253  # Extract the first word of "$ac_prog", so it can be a program name with args.
5254set dummy $ac_prog; ac_word=$2
5255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5256$as_echo_n "checking for $ac_word... " >&6; }
5257if ${ac_cv_path_CMP+:} false; then :
5258  $as_echo_n "(cached) " >&6
5259else
5260  case $CMP in
5261  [\\/]* | ?:[\\/]*)
5262  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5263  ;;
5264  *)
5265  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5266for as_dir in $PATH
5267do
5268  IFS=$as_save_IFS
5269  test -z "$as_dir" && as_dir=.
5270    for ac_exec_ext in '' $ac_executable_extensions; do
5271  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5272    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5273    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5274    break 2
5275  fi
5276done
5277  done
5278IFS=$as_save_IFS
5279
5280  ;;
5281esac
5282fi
5283CMP=$ac_cv_path_CMP
5284if test -n "$CMP"; then
5285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5286$as_echo "$CMP" >&6; }
5287else
5288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5289$as_echo "no" >&6; }
5290fi
5291
5292
5293  test -n "$CMP" && break
5294done
5295
5296    else
5297      # If it succeeded, then it was overridden by the user. We will use it
5298      # for the tool.
5299
5300      # First remove it from the list of overridden variables, so we can test
5301      # for unknown variables in the end.
5302      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5303
5304      # Check if the provided tool contains a complete path.
5305      tool_specified="$CMP"
5306      tool_basename="${tool_specified##*/}"
5307      if test "x$tool_basename" = "x$tool_specified"; then
5308        # A command without a complete path is provided, search $PATH.
5309        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5310$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5311        # Extract the first word of "$tool_basename", so it can be a program name with args.
5312set dummy $tool_basename; ac_word=$2
5313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5314$as_echo_n "checking for $ac_word... " >&6; }
5315if ${ac_cv_path_CMP+:} false; then :
5316  $as_echo_n "(cached) " >&6
5317else
5318  case $CMP in
5319  [\\/]* | ?:[\\/]*)
5320  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5321  ;;
5322  *)
5323  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5324for as_dir in $PATH
5325do
5326  IFS=$as_save_IFS
5327  test -z "$as_dir" && as_dir=.
5328    for ac_exec_ext in '' $ac_executable_extensions; do
5329  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5330    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5331    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5332    break 2
5333  fi
5334done
5335  done
5336IFS=$as_save_IFS
5337
5338  ;;
5339esac
5340fi
5341CMP=$ac_cv_path_CMP
5342if test -n "$CMP"; then
5343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5344$as_echo "$CMP" >&6; }
5345else
5346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5347$as_echo "no" >&6; }
5348fi
5349
5350
5351        if test "x$CMP" = x; then
5352          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5353        fi
5354      else
5355        # Otherwise we believe it is a complete path. Use it as it is.
5356        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5357$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5358        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5359$as_echo_n "checking for CMP... " >&6; }
5360        if test ! -x "$tool_specified"; then
5361          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5362$as_echo "not found" >&6; }
5363          as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5364        fi
5365        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5366$as_echo "$tool_specified" >&6; }
5367      fi
5368    fi
5369  fi
5370
5371
5372
5373  if test "x$CMP" = x; then
5374    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5375  fi
5376
5377
5378
5379
5380
5381  # Publish this variable in the help.
5382
5383
5384  if test "x$COMM" = x; then
5385    # The variable is not set by user, try to locate tool using the code snippet
5386    for ac_prog in comm
5387do
5388  # Extract the first word of "$ac_prog", so it can be a program name with args.
5389set dummy $ac_prog; ac_word=$2
5390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5391$as_echo_n "checking for $ac_word... " >&6; }
5392if ${ac_cv_path_COMM+:} false; then :
5393  $as_echo_n "(cached) " >&6
5394else
5395  case $COMM in
5396  [\\/]* | ?:[\\/]*)
5397  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5398  ;;
5399  *)
5400  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5401for as_dir in $PATH
5402do
5403  IFS=$as_save_IFS
5404  test -z "$as_dir" && as_dir=.
5405    for ac_exec_ext in '' $ac_executable_extensions; do
5406  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5407    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5408    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5409    break 2
5410  fi
5411done
5412  done
5413IFS=$as_save_IFS
5414
5415  ;;
5416esac
5417fi
5418COMM=$ac_cv_path_COMM
5419if test -n "$COMM"; then
5420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5421$as_echo "$COMM" >&6; }
5422else
5423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5424$as_echo "no" >&6; }
5425fi
5426
5427
5428  test -n "$COMM" && break
5429done
5430
5431  else
5432    # The variable is set, but is it from the command line or the environment?
5433
5434    # Try to remove the string !COMM! from our list.
5435    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5436    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5437      # If it failed, the variable was not from the command line. Ignore it,
5438      # but warn the user (except for BASH, which is always set by the calling BASH).
5439      if test "xCOMM" != xBASH; then
5440        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5441$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5442      fi
5443      # Try to locate tool using the code snippet
5444      for ac_prog in comm
5445do
5446  # Extract the first word of "$ac_prog", so it can be a program name with args.
5447set dummy $ac_prog; ac_word=$2
5448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5449$as_echo_n "checking for $ac_word... " >&6; }
5450if ${ac_cv_path_COMM+:} false; then :
5451  $as_echo_n "(cached) " >&6
5452else
5453  case $COMM in
5454  [\\/]* | ?:[\\/]*)
5455  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5456  ;;
5457  *)
5458  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5459for as_dir in $PATH
5460do
5461  IFS=$as_save_IFS
5462  test -z "$as_dir" && as_dir=.
5463    for ac_exec_ext in '' $ac_executable_extensions; do
5464  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5465    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5466    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5467    break 2
5468  fi
5469done
5470  done
5471IFS=$as_save_IFS
5472
5473  ;;
5474esac
5475fi
5476COMM=$ac_cv_path_COMM
5477if test -n "$COMM"; then
5478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5479$as_echo "$COMM" >&6; }
5480else
5481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5482$as_echo "no" >&6; }
5483fi
5484
5485
5486  test -n "$COMM" && break
5487done
5488
5489    else
5490      # If it succeeded, then it was overridden by the user. We will use it
5491      # for the tool.
5492
5493      # First remove it from the list of overridden variables, so we can test
5494      # for unknown variables in the end.
5495      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5496
5497      # Check if the provided tool contains a complete path.
5498      tool_specified="$COMM"
5499      tool_basename="${tool_specified##*/}"
5500      if test "x$tool_basename" = "x$tool_specified"; then
5501        # A command without a complete path is provided, search $PATH.
5502        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
5503$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
5504        # Extract the first word of "$tool_basename", so it can be a program name with args.
5505set dummy $tool_basename; ac_word=$2
5506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5507$as_echo_n "checking for $ac_word... " >&6; }
5508if ${ac_cv_path_COMM+:} false; then :
5509  $as_echo_n "(cached) " >&6
5510else
5511  case $COMM in
5512  [\\/]* | ?:[\\/]*)
5513  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5514  ;;
5515  *)
5516  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5517for as_dir in $PATH
5518do
5519  IFS=$as_save_IFS
5520  test -z "$as_dir" && as_dir=.
5521    for ac_exec_ext in '' $ac_executable_extensions; do
5522  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5523    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5524    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5525    break 2
5526  fi
5527done
5528  done
5529IFS=$as_save_IFS
5530
5531  ;;
5532esac
5533fi
5534COMM=$ac_cv_path_COMM
5535if test -n "$COMM"; then
5536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5537$as_echo "$COMM" >&6; }
5538else
5539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5540$as_echo "no" >&6; }
5541fi
5542
5543
5544        if test "x$COMM" = x; then
5545          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5546        fi
5547      else
5548        # Otherwise we believe it is a complete path. Use it as it is.
5549        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
5550$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
5551        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5552$as_echo_n "checking for COMM... " >&6; }
5553        if test ! -x "$tool_specified"; then
5554          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5555$as_echo "not found" >&6; }
5556          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
5557        fi
5558        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5559$as_echo "$tool_specified" >&6; }
5560      fi
5561    fi
5562  fi
5563
5564
5565
5566  if test "x$COMM" = x; then
5567    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
5568  fi
5569
5570
5571
5572
5573
5574  # Publish this variable in the help.
5575
5576
5577  if test "x$CP" = x; then
5578    # The variable is not set by user, try to locate tool using the code snippet
5579    for ac_prog in cp
5580do
5581  # Extract the first word of "$ac_prog", so it can be a program name with args.
5582set dummy $ac_prog; ac_word=$2
5583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5584$as_echo_n "checking for $ac_word... " >&6; }
5585if ${ac_cv_path_CP+:} false; then :
5586  $as_echo_n "(cached) " >&6
5587else
5588  case $CP in
5589  [\\/]* | ?:[\\/]*)
5590  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5591  ;;
5592  *)
5593  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5594for as_dir in $PATH
5595do
5596  IFS=$as_save_IFS
5597  test -z "$as_dir" && as_dir=.
5598    for ac_exec_ext in '' $ac_executable_extensions; do
5599  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5600    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5601    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5602    break 2
5603  fi
5604done
5605  done
5606IFS=$as_save_IFS
5607
5608  ;;
5609esac
5610fi
5611CP=$ac_cv_path_CP
5612if test -n "$CP"; then
5613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5614$as_echo "$CP" >&6; }
5615else
5616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5617$as_echo "no" >&6; }
5618fi
5619
5620
5621  test -n "$CP" && break
5622done
5623
5624  else
5625    # The variable is set, but is it from the command line or the environment?
5626
5627    # Try to remove the string !CP! from our list.
5628    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
5629    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5630      # If it failed, the variable was not from the command line. Ignore it,
5631      # but warn the user (except for BASH, which is always set by the calling BASH).
5632      if test "xCP" != xBASH; then
5633        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
5634$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
5635      fi
5636      # Try to locate tool using the code snippet
5637      for ac_prog in cp
5638do
5639  # Extract the first word of "$ac_prog", so it can be a program name with args.
5640set dummy $ac_prog; ac_word=$2
5641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5642$as_echo_n "checking for $ac_word... " >&6; }
5643if ${ac_cv_path_CP+:} false; then :
5644  $as_echo_n "(cached) " >&6
5645else
5646  case $CP in
5647  [\\/]* | ?:[\\/]*)
5648  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5649  ;;
5650  *)
5651  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5652for as_dir in $PATH
5653do
5654  IFS=$as_save_IFS
5655  test -z "$as_dir" && as_dir=.
5656    for ac_exec_ext in '' $ac_executable_extensions; do
5657  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5658    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5659    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5660    break 2
5661  fi
5662done
5663  done
5664IFS=$as_save_IFS
5665
5666  ;;
5667esac
5668fi
5669CP=$ac_cv_path_CP
5670if test -n "$CP"; then
5671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5672$as_echo "$CP" >&6; }
5673else
5674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5675$as_echo "no" >&6; }
5676fi
5677
5678
5679  test -n "$CP" && break
5680done
5681
5682    else
5683      # If it succeeded, then it was overridden by the user. We will use it
5684      # for the tool.
5685
5686      # First remove it from the list of overridden variables, so we can test
5687      # for unknown variables in the end.
5688      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5689
5690      # Check if the provided tool contains a complete path.
5691      tool_specified="$CP"
5692      tool_basename="${tool_specified##*/}"
5693      if test "x$tool_basename" = "x$tool_specified"; then
5694        # A command without a complete path is provided, search $PATH.
5695        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
5696$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
5697        # Extract the first word of "$tool_basename", so it can be a program name with args.
5698set dummy $tool_basename; ac_word=$2
5699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5700$as_echo_n "checking for $ac_word... " >&6; }
5701if ${ac_cv_path_CP+:} false; then :
5702  $as_echo_n "(cached) " >&6
5703else
5704  case $CP in
5705  [\\/]* | ?:[\\/]*)
5706  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5707  ;;
5708  *)
5709  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5710for as_dir in $PATH
5711do
5712  IFS=$as_save_IFS
5713  test -z "$as_dir" && as_dir=.
5714    for ac_exec_ext in '' $ac_executable_extensions; do
5715  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5716    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5717    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5718    break 2
5719  fi
5720done
5721  done
5722IFS=$as_save_IFS
5723
5724  ;;
5725esac
5726fi
5727CP=$ac_cv_path_CP
5728if test -n "$CP"; then
5729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5730$as_echo "$CP" >&6; }
5731else
5732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5733$as_echo "no" >&6; }
5734fi
5735
5736
5737        if test "x$CP" = x; then
5738          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5739        fi
5740      else
5741        # Otherwise we believe it is a complete path. Use it as it is.
5742        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
5743$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
5744        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
5745$as_echo_n "checking for CP... " >&6; }
5746        if test ! -x "$tool_specified"; then
5747          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5748$as_echo "not found" >&6; }
5749          as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
5750        fi
5751        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5752$as_echo "$tool_specified" >&6; }
5753      fi
5754    fi
5755  fi
5756
5757
5758
5759  if test "x$CP" = x; then
5760    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
5761  fi
5762
5763
5764
5765
5766
5767  # Publish this variable in the help.
5768
5769
5770  if test "x$CUT" = x; then
5771    # The variable is not set by user, try to locate tool using the code snippet
5772    for ac_prog in cut
5773do
5774  # Extract the first word of "$ac_prog", so it can be a program name with args.
5775set dummy $ac_prog; ac_word=$2
5776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5777$as_echo_n "checking for $ac_word... " >&6; }
5778if ${ac_cv_path_CUT+:} false; then :
5779  $as_echo_n "(cached) " >&6
5780else
5781  case $CUT in
5782  [\\/]* | ?:[\\/]*)
5783  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5784  ;;
5785  *)
5786  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5787for as_dir in $PATH
5788do
5789  IFS=$as_save_IFS
5790  test -z "$as_dir" && as_dir=.
5791    for ac_exec_ext in '' $ac_executable_extensions; do
5792  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5793    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5794    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5795    break 2
5796  fi
5797done
5798  done
5799IFS=$as_save_IFS
5800
5801  ;;
5802esac
5803fi
5804CUT=$ac_cv_path_CUT
5805if test -n "$CUT"; then
5806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5807$as_echo "$CUT" >&6; }
5808else
5809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5810$as_echo "no" >&6; }
5811fi
5812
5813
5814  test -n "$CUT" && break
5815done
5816
5817  else
5818    # The variable is set, but is it from the command line or the environment?
5819
5820    # Try to remove the string !CUT! from our list.
5821    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
5822    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5823      # If it failed, the variable was not from the command line. Ignore it,
5824      # but warn the user (except for BASH, which is always set by the calling BASH).
5825      if test "xCUT" != xBASH; then
5826        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
5827$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
5828      fi
5829      # Try to locate tool using the code snippet
5830      for ac_prog in cut
5831do
5832  # Extract the first word of "$ac_prog", so it can be a program name with args.
5833set dummy $ac_prog; ac_word=$2
5834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5835$as_echo_n "checking for $ac_word... " >&6; }
5836if ${ac_cv_path_CUT+:} false; then :
5837  $as_echo_n "(cached) " >&6
5838else
5839  case $CUT in
5840  [\\/]* | ?:[\\/]*)
5841  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5842  ;;
5843  *)
5844  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5845for as_dir in $PATH
5846do
5847  IFS=$as_save_IFS
5848  test -z "$as_dir" && as_dir=.
5849    for ac_exec_ext in '' $ac_executable_extensions; do
5850  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5851    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5852    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5853    break 2
5854  fi
5855done
5856  done
5857IFS=$as_save_IFS
5858
5859  ;;
5860esac
5861fi
5862CUT=$ac_cv_path_CUT
5863if test -n "$CUT"; then
5864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5865$as_echo "$CUT" >&6; }
5866else
5867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5868$as_echo "no" >&6; }
5869fi
5870
5871
5872  test -n "$CUT" && break
5873done
5874
5875    else
5876      # If it succeeded, then it was overridden by the user. We will use it
5877      # for the tool.
5878
5879      # First remove it from the list of overridden variables, so we can test
5880      # for unknown variables in the end.
5881      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5882
5883      # Check if the provided tool contains a complete path.
5884      tool_specified="$CUT"
5885      tool_basename="${tool_specified##*/}"
5886      if test "x$tool_basename" = "x$tool_specified"; then
5887        # A command without a complete path is provided, search $PATH.
5888        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
5889$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
5890        # Extract the first word of "$tool_basename", so it can be a program name with args.
5891set dummy $tool_basename; ac_word=$2
5892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5893$as_echo_n "checking for $ac_word... " >&6; }
5894if ${ac_cv_path_CUT+:} false; then :
5895  $as_echo_n "(cached) " >&6
5896else
5897  case $CUT in
5898  [\\/]* | ?:[\\/]*)
5899  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5900  ;;
5901  *)
5902  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5903for as_dir in $PATH
5904do
5905  IFS=$as_save_IFS
5906  test -z "$as_dir" && as_dir=.
5907    for ac_exec_ext in '' $ac_executable_extensions; do
5908  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5909    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5910    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5911    break 2
5912  fi
5913done
5914  done
5915IFS=$as_save_IFS
5916
5917  ;;
5918esac
5919fi
5920CUT=$ac_cv_path_CUT
5921if test -n "$CUT"; then
5922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5923$as_echo "$CUT" >&6; }
5924else
5925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5926$as_echo "no" >&6; }
5927fi
5928
5929
5930        if test "x$CUT" = x; then
5931          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5932        fi
5933      else
5934        # Otherwise we believe it is a complete path. Use it as it is.
5935        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
5936$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
5937        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
5938$as_echo_n "checking for CUT... " >&6; }
5939        if test ! -x "$tool_specified"; then
5940          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5941$as_echo "not found" >&6; }
5942          as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
5943        fi
5944        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5945$as_echo "$tool_specified" >&6; }
5946      fi
5947    fi
5948  fi
5949
5950
5951
5952  if test "x$CUT" = x; then
5953    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
5954  fi
5955
5956
5957
5958
5959
5960  # Publish this variable in the help.
5961
5962
5963  if test "x$DATE" = x; then
5964    # The variable is not set by user, try to locate tool using the code snippet
5965    for ac_prog in date
5966do
5967  # Extract the first word of "$ac_prog", so it can be a program name with args.
5968set dummy $ac_prog; ac_word=$2
5969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5970$as_echo_n "checking for $ac_word... " >&6; }
5971if ${ac_cv_path_DATE+:} false; then :
5972  $as_echo_n "(cached) " >&6
5973else
5974  case $DATE in
5975  [\\/]* | ?:[\\/]*)
5976  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
5977  ;;
5978  *)
5979  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5980for as_dir in $PATH
5981do
5982  IFS=$as_save_IFS
5983  test -z "$as_dir" && as_dir=.
5984    for ac_exec_ext in '' $ac_executable_extensions; do
5985  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5986    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
5987    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5988    break 2
5989  fi
5990done
5991  done
5992IFS=$as_save_IFS
5993
5994  ;;
5995esac
5996fi
5997DATE=$ac_cv_path_DATE
5998if test -n "$DATE"; then
5999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6000$as_echo "$DATE" >&6; }
6001else
6002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6003$as_echo "no" >&6; }
6004fi
6005
6006
6007  test -n "$DATE" && break
6008done
6009
6010  else
6011    # The variable is set, but is it from the command line or the environment?
6012
6013    # Try to remove the string !DATE! from our list.
6014    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6015    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6016      # If it failed, the variable was not from the command line. Ignore it,
6017      # but warn the user (except for BASH, which is always set by the calling BASH).
6018      if test "xDATE" != xBASH; then
6019        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6020$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6021      fi
6022      # Try to locate tool using the code snippet
6023      for ac_prog in date
6024do
6025  # Extract the first word of "$ac_prog", so it can be a program name with args.
6026set dummy $ac_prog; ac_word=$2
6027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6028$as_echo_n "checking for $ac_word... " >&6; }
6029if ${ac_cv_path_DATE+:} false; then :
6030  $as_echo_n "(cached) " >&6
6031else
6032  case $DATE in
6033  [\\/]* | ?:[\\/]*)
6034  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6035  ;;
6036  *)
6037  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6038for as_dir in $PATH
6039do
6040  IFS=$as_save_IFS
6041  test -z "$as_dir" && as_dir=.
6042    for ac_exec_ext in '' $ac_executable_extensions; do
6043  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6044    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6045    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6046    break 2
6047  fi
6048done
6049  done
6050IFS=$as_save_IFS
6051
6052  ;;
6053esac
6054fi
6055DATE=$ac_cv_path_DATE
6056if test -n "$DATE"; then
6057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6058$as_echo "$DATE" >&6; }
6059else
6060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6061$as_echo "no" >&6; }
6062fi
6063
6064
6065  test -n "$DATE" && break
6066done
6067
6068    else
6069      # If it succeeded, then it was overridden by the user. We will use it
6070      # for the tool.
6071
6072      # First remove it from the list of overridden variables, so we can test
6073      # for unknown variables in the end.
6074      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6075
6076      # Check if the provided tool contains a complete path.
6077      tool_specified="$DATE"
6078      tool_basename="${tool_specified##*/}"
6079      if test "x$tool_basename" = "x$tool_specified"; then
6080        # A command without a complete path is provided, search $PATH.
6081        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6082$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6083        # Extract the first word of "$tool_basename", so it can be a program name with args.
6084set dummy $tool_basename; ac_word=$2
6085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6086$as_echo_n "checking for $ac_word... " >&6; }
6087if ${ac_cv_path_DATE+:} false; then :
6088  $as_echo_n "(cached) " >&6
6089else
6090  case $DATE in
6091  [\\/]* | ?:[\\/]*)
6092  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6093  ;;
6094  *)
6095  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6096for as_dir in $PATH
6097do
6098  IFS=$as_save_IFS
6099  test -z "$as_dir" && as_dir=.
6100    for ac_exec_ext in '' $ac_executable_extensions; do
6101  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6102    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6103    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6104    break 2
6105  fi
6106done
6107  done
6108IFS=$as_save_IFS
6109
6110  ;;
6111esac
6112fi
6113DATE=$ac_cv_path_DATE
6114if test -n "$DATE"; then
6115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6116$as_echo "$DATE" >&6; }
6117else
6118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6119$as_echo "no" >&6; }
6120fi
6121
6122
6123        if test "x$DATE" = x; then
6124          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6125        fi
6126      else
6127        # Otherwise we believe it is a complete path. Use it as it is.
6128        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6129$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6130        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6131$as_echo_n "checking for DATE... " >&6; }
6132        if test ! -x "$tool_specified"; then
6133          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6134$as_echo "not found" >&6; }
6135          as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6136        fi
6137        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6138$as_echo "$tool_specified" >&6; }
6139      fi
6140    fi
6141  fi
6142
6143
6144
6145  if test "x$DATE" = x; then
6146    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6147  fi
6148
6149
6150
6151
6152
6153  # Publish this variable in the help.
6154
6155
6156  if test "x$DIFF" = x; then
6157    # The variable is not set by user, try to locate tool using the code snippet
6158    for ac_prog in gdiff diff
6159do
6160  # Extract the first word of "$ac_prog", so it can be a program name with args.
6161set dummy $ac_prog; ac_word=$2
6162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6163$as_echo_n "checking for $ac_word... " >&6; }
6164if ${ac_cv_path_DIFF+:} false; then :
6165  $as_echo_n "(cached) " >&6
6166else
6167  case $DIFF in
6168  [\\/]* | ?:[\\/]*)
6169  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6170  ;;
6171  *)
6172  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6173for as_dir in $PATH
6174do
6175  IFS=$as_save_IFS
6176  test -z "$as_dir" && as_dir=.
6177    for ac_exec_ext in '' $ac_executable_extensions; do
6178  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6179    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6180    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6181    break 2
6182  fi
6183done
6184  done
6185IFS=$as_save_IFS
6186
6187  ;;
6188esac
6189fi
6190DIFF=$ac_cv_path_DIFF
6191if test -n "$DIFF"; then
6192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6193$as_echo "$DIFF" >&6; }
6194else
6195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6196$as_echo "no" >&6; }
6197fi
6198
6199
6200  test -n "$DIFF" && break
6201done
6202
6203  else
6204    # The variable is set, but is it from the command line or the environment?
6205
6206    # Try to remove the string !DIFF! from our list.
6207    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6208    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6209      # If it failed, the variable was not from the command line. Ignore it,
6210      # but warn the user (except for BASH, which is always set by the calling BASH).
6211      if test "xDIFF" != xBASH; then
6212        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6213$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6214      fi
6215      # Try to locate tool using the code snippet
6216      for ac_prog in gdiff diff
6217do
6218  # Extract the first word of "$ac_prog", so it can be a program name with args.
6219set dummy $ac_prog; ac_word=$2
6220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6221$as_echo_n "checking for $ac_word... " >&6; }
6222if ${ac_cv_path_DIFF+:} false; then :
6223  $as_echo_n "(cached) " >&6
6224else
6225  case $DIFF in
6226  [\\/]* | ?:[\\/]*)
6227  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6228  ;;
6229  *)
6230  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6231for as_dir in $PATH
6232do
6233  IFS=$as_save_IFS
6234  test -z "$as_dir" && as_dir=.
6235    for ac_exec_ext in '' $ac_executable_extensions; do
6236  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6237    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6238    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6239    break 2
6240  fi
6241done
6242  done
6243IFS=$as_save_IFS
6244
6245  ;;
6246esac
6247fi
6248DIFF=$ac_cv_path_DIFF
6249if test -n "$DIFF"; then
6250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6251$as_echo "$DIFF" >&6; }
6252else
6253  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6254$as_echo "no" >&6; }
6255fi
6256
6257
6258  test -n "$DIFF" && break
6259done
6260
6261    else
6262      # If it succeeded, then it was overridden by the user. We will use it
6263      # for the tool.
6264
6265      # First remove it from the list of overridden variables, so we can test
6266      # for unknown variables in the end.
6267      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6268
6269      # Check if the provided tool contains a complete path.
6270      tool_specified="$DIFF"
6271      tool_basename="${tool_specified##*/}"
6272      if test "x$tool_basename" = "x$tool_specified"; then
6273        # A command without a complete path is provided, search $PATH.
6274        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6275$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6276        # Extract the first word of "$tool_basename", so it can be a program name with args.
6277set dummy $tool_basename; ac_word=$2
6278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6279$as_echo_n "checking for $ac_word... " >&6; }
6280if ${ac_cv_path_DIFF+:} false; then :
6281  $as_echo_n "(cached) " >&6
6282else
6283  case $DIFF in
6284  [\\/]* | ?:[\\/]*)
6285  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6286  ;;
6287  *)
6288  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6289for as_dir in $PATH
6290do
6291  IFS=$as_save_IFS
6292  test -z "$as_dir" && as_dir=.
6293    for ac_exec_ext in '' $ac_executable_extensions; do
6294  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6295    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6296    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6297    break 2
6298  fi
6299done
6300  done
6301IFS=$as_save_IFS
6302
6303  ;;
6304esac
6305fi
6306DIFF=$ac_cv_path_DIFF
6307if test -n "$DIFF"; then
6308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6309$as_echo "$DIFF" >&6; }
6310else
6311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6312$as_echo "no" >&6; }
6313fi
6314
6315
6316        if test "x$DIFF" = x; then
6317          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6318        fi
6319      else
6320        # Otherwise we believe it is a complete path. Use it as it is.
6321        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6322$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6323        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6324$as_echo_n "checking for DIFF... " >&6; }
6325        if test ! -x "$tool_specified"; then
6326          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6327$as_echo "not found" >&6; }
6328          as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6329        fi
6330        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6331$as_echo "$tool_specified" >&6; }
6332      fi
6333    fi
6334  fi
6335
6336
6337
6338  if test "x$DIFF" = x; then
6339    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6340  fi
6341
6342
6343
6344
6345
6346  # Publish this variable in the help.
6347
6348
6349  if test "x$DIRNAME" = x; then
6350    # The variable is not set by user, try to locate tool using the code snippet
6351    for ac_prog in dirname
6352do
6353  # Extract the first word of "$ac_prog", so it can be a program name with args.
6354set dummy $ac_prog; ac_word=$2
6355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6356$as_echo_n "checking for $ac_word... " >&6; }
6357if ${ac_cv_path_DIRNAME+:} false; then :
6358  $as_echo_n "(cached) " >&6
6359else
6360  case $DIRNAME in
6361  [\\/]* | ?:[\\/]*)
6362  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6363  ;;
6364  *)
6365  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6366for as_dir in $PATH
6367do
6368  IFS=$as_save_IFS
6369  test -z "$as_dir" && as_dir=.
6370    for ac_exec_ext in '' $ac_executable_extensions; do
6371  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6372    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6373    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6374    break 2
6375  fi
6376done
6377  done
6378IFS=$as_save_IFS
6379
6380  ;;
6381esac
6382fi
6383DIRNAME=$ac_cv_path_DIRNAME
6384if test -n "$DIRNAME"; then
6385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6386$as_echo "$DIRNAME" >&6; }
6387else
6388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6389$as_echo "no" >&6; }
6390fi
6391
6392
6393  test -n "$DIRNAME" && break
6394done
6395
6396  else
6397    # The variable is set, but is it from the command line or the environment?
6398
6399    # Try to remove the string !DIRNAME! from our list.
6400    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6401    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6402      # If it failed, the variable was not from the command line. Ignore it,
6403      # but warn the user (except for BASH, which is always set by the calling BASH).
6404      if test "xDIRNAME" != xBASH; then
6405        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6406$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6407      fi
6408      # Try to locate tool using the code snippet
6409      for ac_prog in dirname
6410do
6411  # Extract the first word of "$ac_prog", so it can be a program name with args.
6412set dummy $ac_prog; ac_word=$2
6413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6414$as_echo_n "checking for $ac_word... " >&6; }
6415if ${ac_cv_path_DIRNAME+:} false; then :
6416  $as_echo_n "(cached) " >&6
6417else
6418  case $DIRNAME in
6419  [\\/]* | ?:[\\/]*)
6420  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6421  ;;
6422  *)
6423  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6424for as_dir in $PATH
6425do
6426  IFS=$as_save_IFS
6427  test -z "$as_dir" && as_dir=.
6428    for ac_exec_ext in '' $ac_executable_extensions; do
6429  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6430    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6431    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6432    break 2
6433  fi
6434done
6435  done
6436IFS=$as_save_IFS
6437
6438  ;;
6439esac
6440fi
6441DIRNAME=$ac_cv_path_DIRNAME
6442if test -n "$DIRNAME"; then
6443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6444$as_echo "$DIRNAME" >&6; }
6445else
6446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6447$as_echo "no" >&6; }
6448fi
6449
6450
6451  test -n "$DIRNAME" && break
6452done
6453
6454    else
6455      # If it succeeded, then it was overridden by the user. We will use it
6456      # for the tool.
6457
6458      # First remove it from the list of overridden variables, so we can test
6459      # for unknown variables in the end.
6460      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6461
6462      # Check if the provided tool contains a complete path.
6463      tool_specified="$DIRNAME"
6464      tool_basename="${tool_specified##*/}"
6465      if test "x$tool_basename" = "x$tool_specified"; then
6466        # A command without a complete path is provided, search $PATH.
6467        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
6468$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
6469        # Extract the first word of "$tool_basename", so it can be a program name with args.
6470set dummy $tool_basename; ac_word=$2
6471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6472$as_echo_n "checking for $ac_word... " >&6; }
6473if ${ac_cv_path_DIRNAME+:} false; then :
6474  $as_echo_n "(cached) " >&6
6475else
6476  case $DIRNAME in
6477  [\\/]* | ?:[\\/]*)
6478  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6479  ;;
6480  *)
6481  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6482for as_dir in $PATH
6483do
6484  IFS=$as_save_IFS
6485  test -z "$as_dir" && as_dir=.
6486    for ac_exec_ext in '' $ac_executable_extensions; do
6487  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6488    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6489    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6490    break 2
6491  fi
6492done
6493  done
6494IFS=$as_save_IFS
6495
6496  ;;
6497esac
6498fi
6499DIRNAME=$ac_cv_path_DIRNAME
6500if test -n "$DIRNAME"; then
6501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6502$as_echo "$DIRNAME" >&6; }
6503else
6504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6505$as_echo "no" >&6; }
6506fi
6507
6508
6509        if test "x$DIRNAME" = x; then
6510          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6511        fi
6512      else
6513        # Otherwise we believe it is a complete path. Use it as it is.
6514        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
6515$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
6516        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6517$as_echo_n "checking for DIRNAME... " >&6; }
6518        if test ! -x "$tool_specified"; then
6519          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6520$as_echo "not found" >&6; }
6521          as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
6522        fi
6523        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6524$as_echo "$tool_specified" >&6; }
6525      fi
6526    fi
6527  fi
6528
6529
6530
6531  if test "x$DIRNAME" = x; then
6532    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
6533  fi
6534
6535
6536
6537
6538
6539  # Publish this variable in the help.
6540
6541
6542  if test "x$ECHO" = x; then
6543    # The variable is not set by user, try to locate tool using the code snippet
6544    for ac_prog in echo
6545do
6546  # Extract the first word of "$ac_prog", so it can be a program name with args.
6547set dummy $ac_prog; ac_word=$2
6548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6549$as_echo_n "checking for $ac_word... " >&6; }
6550if ${ac_cv_path_ECHO+:} false; then :
6551  $as_echo_n "(cached) " >&6
6552else
6553  case $ECHO in
6554  [\\/]* | ?:[\\/]*)
6555  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6556  ;;
6557  *)
6558  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6559for as_dir in $PATH
6560do
6561  IFS=$as_save_IFS
6562  test -z "$as_dir" && as_dir=.
6563    for ac_exec_ext in '' $ac_executable_extensions; do
6564  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6565    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6566    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6567    break 2
6568  fi
6569done
6570  done
6571IFS=$as_save_IFS
6572
6573  ;;
6574esac
6575fi
6576ECHO=$ac_cv_path_ECHO
6577if test -n "$ECHO"; then
6578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6579$as_echo "$ECHO" >&6; }
6580else
6581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6582$as_echo "no" >&6; }
6583fi
6584
6585
6586  test -n "$ECHO" && break
6587done
6588
6589  else
6590    # The variable is set, but is it from the command line or the environment?
6591
6592    # Try to remove the string !ECHO! from our list.
6593    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
6594    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6595      # If it failed, the variable was not from the command line. Ignore it,
6596      # but warn the user (except for BASH, which is always set by the calling BASH).
6597      if test "xECHO" != xBASH; then
6598        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
6599$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
6600      fi
6601      # Try to locate tool using the code snippet
6602      for ac_prog in echo
6603do
6604  # Extract the first word of "$ac_prog", so it can be a program name with args.
6605set dummy $ac_prog; ac_word=$2
6606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6607$as_echo_n "checking for $ac_word... " >&6; }
6608if ${ac_cv_path_ECHO+:} false; then :
6609  $as_echo_n "(cached) " >&6
6610else
6611  case $ECHO in
6612  [\\/]* | ?:[\\/]*)
6613  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6614  ;;
6615  *)
6616  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6617for as_dir in $PATH
6618do
6619  IFS=$as_save_IFS
6620  test -z "$as_dir" && as_dir=.
6621    for ac_exec_ext in '' $ac_executable_extensions; do
6622  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6623    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6624    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6625    break 2
6626  fi
6627done
6628  done
6629IFS=$as_save_IFS
6630
6631  ;;
6632esac
6633fi
6634ECHO=$ac_cv_path_ECHO
6635if test -n "$ECHO"; then
6636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6637$as_echo "$ECHO" >&6; }
6638else
6639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6640$as_echo "no" >&6; }
6641fi
6642
6643
6644  test -n "$ECHO" && break
6645done
6646
6647    else
6648      # If it succeeded, then it was overridden by the user. We will use it
6649      # for the tool.
6650
6651      # First remove it from the list of overridden variables, so we can test
6652      # for unknown variables in the end.
6653      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6654
6655      # Check if the provided tool contains a complete path.
6656      tool_specified="$ECHO"
6657      tool_basename="${tool_specified##*/}"
6658      if test "x$tool_basename" = "x$tool_specified"; then
6659        # A command without a complete path is provided, search $PATH.
6660        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
6661$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
6662        # Extract the first word of "$tool_basename", so it can be a program name with args.
6663set dummy $tool_basename; ac_word=$2
6664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6665$as_echo_n "checking for $ac_word... " >&6; }
6666if ${ac_cv_path_ECHO+:} false; then :
6667  $as_echo_n "(cached) " >&6
6668else
6669  case $ECHO in
6670  [\\/]* | ?:[\\/]*)
6671  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6672  ;;
6673  *)
6674  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6675for as_dir in $PATH
6676do
6677  IFS=$as_save_IFS
6678  test -z "$as_dir" && as_dir=.
6679    for ac_exec_ext in '' $ac_executable_extensions; do
6680  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6681    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6682    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6683    break 2
6684  fi
6685done
6686  done
6687IFS=$as_save_IFS
6688
6689  ;;
6690esac
6691fi
6692ECHO=$ac_cv_path_ECHO
6693if test -n "$ECHO"; then
6694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6695$as_echo "$ECHO" >&6; }
6696else
6697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6698$as_echo "no" >&6; }
6699fi
6700
6701
6702        if test "x$ECHO" = x; then
6703          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6704        fi
6705      else
6706        # Otherwise we believe it is a complete path. Use it as it is.
6707        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
6708$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
6709        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
6710$as_echo_n "checking for ECHO... " >&6; }
6711        if test ! -x "$tool_specified"; then
6712          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6713$as_echo "not found" >&6; }
6714          as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
6715        fi
6716        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6717$as_echo "$tool_specified" >&6; }
6718      fi
6719    fi
6720  fi
6721
6722
6723
6724  if test "x$ECHO" = x; then
6725    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
6726  fi
6727
6728
6729
6730
6731
6732  # Publish this variable in the help.
6733
6734
6735  if test "x$EXPR" = x; then
6736    # The variable is not set by user, try to locate tool using the code snippet
6737    for ac_prog in expr
6738do
6739  # Extract the first word of "$ac_prog", so it can be a program name with args.
6740set dummy $ac_prog; ac_word=$2
6741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6742$as_echo_n "checking for $ac_word... " >&6; }
6743if ${ac_cv_path_EXPR+:} false; then :
6744  $as_echo_n "(cached) " >&6
6745else
6746  case $EXPR in
6747  [\\/]* | ?:[\\/]*)
6748  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6749  ;;
6750  *)
6751  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6752for as_dir in $PATH
6753do
6754  IFS=$as_save_IFS
6755  test -z "$as_dir" && as_dir=.
6756    for ac_exec_ext in '' $ac_executable_extensions; do
6757  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6758    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6759    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6760    break 2
6761  fi
6762done
6763  done
6764IFS=$as_save_IFS
6765
6766  ;;
6767esac
6768fi
6769EXPR=$ac_cv_path_EXPR
6770if test -n "$EXPR"; then
6771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6772$as_echo "$EXPR" >&6; }
6773else
6774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6775$as_echo "no" >&6; }
6776fi
6777
6778
6779  test -n "$EXPR" && break
6780done
6781
6782  else
6783    # The variable is set, but is it from the command line or the environment?
6784
6785    # Try to remove the string !EXPR! from our list.
6786    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
6787    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6788      # If it failed, the variable was not from the command line. Ignore it,
6789      # but warn the user (except for BASH, which is always set by the calling BASH).
6790      if test "xEXPR" != xBASH; then
6791        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
6792$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
6793      fi
6794      # Try to locate tool using the code snippet
6795      for ac_prog in expr
6796do
6797  # Extract the first word of "$ac_prog", so it can be a program name with args.
6798set dummy $ac_prog; ac_word=$2
6799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6800$as_echo_n "checking for $ac_word... " >&6; }
6801if ${ac_cv_path_EXPR+:} false; then :
6802  $as_echo_n "(cached) " >&6
6803else
6804  case $EXPR in
6805  [\\/]* | ?:[\\/]*)
6806  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6807  ;;
6808  *)
6809  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6810for as_dir in $PATH
6811do
6812  IFS=$as_save_IFS
6813  test -z "$as_dir" && as_dir=.
6814    for ac_exec_ext in '' $ac_executable_extensions; do
6815  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6816    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6817    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6818    break 2
6819  fi
6820done
6821  done
6822IFS=$as_save_IFS
6823
6824  ;;
6825esac
6826fi
6827EXPR=$ac_cv_path_EXPR
6828if test -n "$EXPR"; then
6829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6830$as_echo "$EXPR" >&6; }
6831else
6832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6833$as_echo "no" >&6; }
6834fi
6835
6836
6837  test -n "$EXPR" && break
6838done
6839
6840    else
6841      # If it succeeded, then it was overridden by the user. We will use it
6842      # for the tool.
6843
6844      # First remove it from the list of overridden variables, so we can test
6845      # for unknown variables in the end.
6846      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6847
6848      # Check if the provided tool contains a complete path.
6849      tool_specified="$EXPR"
6850      tool_basename="${tool_specified##*/}"
6851      if test "x$tool_basename" = "x$tool_specified"; then
6852        # A command without a complete path is provided, search $PATH.
6853        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
6854$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
6855        # Extract the first word of "$tool_basename", so it can be a program name with args.
6856set dummy $tool_basename; ac_word=$2
6857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6858$as_echo_n "checking for $ac_word... " >&6; }
6859if ${ac_cv_path_EXPR+:} false; then :
6860  $as_echo_n "(cached) " >&6
6861else
6862  case $EXPR in
6863  [\\/]* | ?:[\\/]*)
6864  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6865  ;;
6866  *)
6867  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6868for as_dir in $PATH
6869do
6870  IFS=$as_save_IFS
6871  test -z "$as_dir" && as_dir=.
6872    for ac_exec_ext in '' $ac_executable_extensions; do
6873  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6874    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6875    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6876    break 2
6877  fi
6878done
6879  done
6880IFS=$as_save_IFS
6881
6882  ;;
6883esac
6884fi
6885EXPR=$ac_cv_path_EXPR
6886if test -n "$EXPR"; then
6887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6888$as_echo "$EXPR" >&6; }
6889else
6890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6891$as_echo "no" >&6; }
6892fi
6893
6894
6895        if test "x$EXPR" = x; then
6896          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6897        fi
6898      else
6899        # Otherwise we believe it is a complete path. Use it as it is.
6900        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
6901$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
6902        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
6903$as_echo_n "checking for EXPR... " >&6; }
6904        if test ! -x "$tool_specified"; then
6905          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6906$as_echo "not found" >&6; }
6907          as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
6908        fi
6909        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6910$as_echo "$tool_specified" >&6; }
6911      fi
6912    fi
6913  fi
6914
6915
6916
6917  if test "x$EXPR" = x; then
6918    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
6919  fi
6920
6921
6922
6923
6924
6925  # Publish this variable in the help.
6926
6927
6928  if test "x$FILE" = x; then
6929    # The variable is not set by user, try to locate tool using the code snippet
6930    for ac_prog in file
6931do
6932  # Extract the first word of "$ac_prog", so it can be a program name with args.
6933set dummy $ac_prog; ac_word=$2
6934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6935$as_echo_n "checking for $ac_word... " >&6; }
6936if ${ac_cv_path_FILE+:} false; then :
6937  $as_echo_n "(cached) " >&6
6938else
6939  case $FILE in
6940  [\\/]* | ?:[\\/]*)
6941  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
6942  ;;
6943  *)
6944  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6945for as_dir in $PATH
6946do
6947  IFS=$as_save_IFS
6948  test -z "$as_dir" && as_dir=.
6949    for ac_exec_ext in '' $ac_executable_extensions; do
6950  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6951    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
6952    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6953    break 2
6954  fi
6955done
6956  done
6957IFS=$as_save_IFS
6958
6959  ;;
6960esac
6961fi
6962FILE=$ac_cv_path_FILE
6963if test -n "$FILE"; then
6964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
6965$as_echo "$FILE" >&6; }
6966else
6967  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6968$as_echo "no" >&6; }
6969fi
6970
6971
6972  test -n "$FILE" && break
6973done
6974
6975  else
6976    # The variable is set, but is it from the command line or the environment?
6977
6978    # Try to remove the string !FILE! from our list.
6979    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
6980    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6981      # If it failed, the variable was not from the command line. Ignore it,
6982      # but warn the user (except for BASH, which is always set by the calling BASH).
6983      if test "xFILE" != xBASH; then
6984        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
6985$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
6986      fi
6987      # Try to locate tool using the code snippet
6988      for ac_prog in file
6989do
6990  # Extract the first word of "$ac_prog", so it can be a program name with args.
6991set dummy $ac_prog; ac_word=$2
6992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6993$as_echo_n "checking for $ac_word... " >&6; }
6994if ${ac_cv_path_FILE+:} false; then :
6995  $as_echo_n "(cached) " >&6
6996else
6997  case $FILE in
6998  [\\/]* | ?:[\\/]*)
6999  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7000  ;;
7001  *)
7002  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7003for as_dir in $PATH
7004do
7005  IFS=$as_save_IFS
7006  test -z "$as_dir" && as_dir=.
7007    for ac_exec_ext in '' $ac_executable_extensions; do
7008  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7009    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7010    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7011    break 2
7012  fi
7013done
7014  done
7015IFS=$as_save_IFS
7016
7017  ;;
7018esac
7019fi
7020FILE=$ac_cv_path_FILE
7021if test -n "$FILE"; then
7022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7023$as_echo "$FILE" >&6; }
7024else
7025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7026$as_echo "no" >&6; }
7027fi
7028
7029
7030  test -n "$FILE" && break
7031done
7032
7033    else
7034      # If it succeeded, then it was overridden by the user. We will use it
7035      # for the tool.
7036
7037      # First remove it from the list of overridden variables, so we can test
7038      # for unknown variables in the end.
7039      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7040
7041      # Check if the provided tool contains a complete path.
7042      tool_specified="$FILE"
7043      tool_basename="${tool_specified##*/}"
7044      if test "x$tool_basename" = "x$tool_specified"; then
7045        # A command without a complete path is provided, search $PATH.
7046        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7047$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7048        # Extract the first word of "$tool_basename", so it can be a program name with args.
7049set dummy $tool_basename; ac_word=$2
7050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7051$as_echo_n "checking for $ac_word... " >&6; }
7052if ${ac_cv_path_FILE+:} false; then :
7053  $as_echo_n "(cached) " >&6
7054else
7055  case $FILE in
7056  [\\/]* | ?:[\\/]*)
7057  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7058  ;;
7059  *)
7060  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7061for as_dir in $PATH
7062do
7063  IFS=$as_save_IFS
7064  test -z "$as_dir" && as_dir=.
7065    for ac_exec_ext in '' $ac_executable_extensions; do
7066  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7067    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7068    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7069    break 2
7070  fi
7071done
7072  done
7073IFS=$as_save_IFS
7074
7075  ;;
7076esac
7077fi
7078FILE=$ac_cv_path_FILE
7079if test -n "$FILE"; then
7080  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7081$as_echo "$FILE" >&6; }
7082else
7083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7084$as_echo "no" >&6; }
7085fi
7086
7087
7088        if test "x$FILE" = x; then
7089          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7090        fi
7091      else
7092        # Otherwise we believe it is a complete path. Use it as it is.
7093        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7094$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7095        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7096$as_echo_n "checking for FILE... " >&6; }
7097        if test ! -x "$tool_specified"; then
7098          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7099$as_echo "not found" >&6; }
7100          as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7101        fi
7102        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7103$as_echo "$tool_specified" >&6; }
7104      fi
7105    fi
7106  fi
7107
7108
7109
7110  if test "x$FILE" = x; then
7111    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7112  fi
7113
7114
7115
7116
7117
7118  # Publish this variable in the help.
7119
7120
7121  if test "x$FIND" = x; then
7122    # The variable is not set by user, try to locate tool using the code snippet
7123    for ac_prog in find
7124do
7125  # Extract the first word of "$ac_prog", so it can be a program name with args.
7126set dummy $ac_prog; ac_word=$2
7127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7128$as_echo_n "checking for $ac_word... " >&6; }
7129if ${ac_cv_path_FIND+:} false; then :
7130  $as_echo_n "(cached) " >&6
7131else
7132  case $FIND in
7133  [\\/]* | ?:[\\/]*)
7134  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7135  ;;
7136  *)
7137  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7138for as_dir in $PATH
7139do
7140  IFS=$as_save_IFS
7141  test -z "$as_dir" && as_dir=.
7142    for ac_exec_ext in '' $ac_executable_extensions; do
7143  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7144    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7145    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7146    break 2
7147  fi
7148done
7149  done
7150IFS=$as_save_IFS
7151
7152  ;;
7153esac
7154fi
7155FIND=$ac_cv_path_FIND
7156if test -n "$FIND"; then
7157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7158$as_echo "$FIND" >&6; }
7159else
7160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7161$as_echo "no" >&6; }
7162fi
7163
7164
7165  test -n "$FIND" && break
7166done
7167
7168  else
7169    # The variable is set, but is it from the command line or the environment?
7170
7171    # Try to remove the string !FIND! from our list.
7172    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7173    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7174      # If it failed, the variable was not from the command line. Ignore it,
7175      # but warn the user (except for BASH, which is always set by the calling BASH).
7176      if test "xFIND" != xBASH; then
7177        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7178$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7179      fi
7180      # Try to locate tool using the code snippet
7181      for ac_prog in find
7182do
7183  # Extract the first word of "$ac_prog", so it can be a program name with args.
7184set dummy $ac_prog; ac_word=$2
7185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7186$as_echo_n "checking for $ac_word... " >&6; }
7187if ${ac_cv_path_FIND+:} false; then :
7188  $as_echo_n "(cached) " >&6
7189else
7190  case $FIND in
7191  [\\/]* | ?:[\\/]*)
7192  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7193  ;;
7194  *)
7195  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7196for as_dir in $PATH
7197do
7198  IFS=$as_save_IFS
7199  test -z "$as_dir" && as_dir=.
7200    for ac_exec_ext in '' $ac_executable_extensions; do
7201  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7202    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7203    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7204    break 2
7205  fi
7206done
7207  done
7208IFS=$as_save_IFS
7209
7210  ;;
7211esac
7212fi
7213FIND=$ac_cv_path_FIND
7214if test -n "$FIND"; then
7215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7216$as_echo "$FIND" >&6; }
7217else
7218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7219$as_echo "no" >&6; }
7220fi
7221
7222
7223  test -n "$FIND" && break
7224done
7225
7226    else
7227      # If it succeeded, then it was overridden by the user. We will use it
7228      # for the tool.
7229
7230      # First remove it from the list of overridden variables, so we can test
7231      # for unknown variables in the end.
7232      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7233
7234      # Check if the provided tool contains a complete path.
7235      tool_specified="$FIND"
7236      tool_basename="${tool_specified##*/}"
7237      if test "x$tool_basename" = "x$tool_specified"; then
7238        # A command without a complete path is provided, search $PATH.
7239        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7240$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7241        # Extract the first word of "$tool_basename", so it can be a program name with args.
7242set dummy $tool_basename; ac_word=$2
7243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7244$as_echo_n "checking for $ac_word... " >&6; }
7245if ${ac_cv_path_FIND+:} false; then :
7246  $as_echo_n "(cached) " >&6
7247else
7248  case $FIND in
7249  [\\/]* | ?:[\\/]*)
7250  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7251  ;;
7252  *)
7253  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7254for as_dir in $PATH
7255do
7256  IFS=$as_save_IFS
7257  test -z "$as_dir" && as_dir=.
7258    for ac_exec_ext in '' $ac_executable_extensions; do
7259  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7260    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7261    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7262    break 2
7263  fi
7264done
7265  done
7266IFS=$as_save_IFS
7267
7268  ;;
7269esac
7270fi
7271FIND=$ac_cv_path_FIND
7272if test -n "$FIND"; then
7273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7274$as_echo "$FIND" >&6; }
7275else
7276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7277$as_echo "no" >&6; }
7278fi
7279
7280
7281        if test "x$FIND" = x; then
7282          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7283        fi
7284      else
7285        # Otherwise we believe it is a complete path. Use it as it is.
7286        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7287$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7288        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7289$as_echo_n "checking for FIND... " >&6; }
7290        if test ! -x "$tool_specified"; then
7291          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7292$as_echo "not found" >&6; }
7293          as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7294        fi
7295        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7296$as_echo "$tool_specified" >&6; }
7297      fi
7298    fi
7299  fi
7300
7301
7302
7303  if test "x$FIND" = x; then
7304    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7305  fi
7306
7307
7308
7309
7310
7311  # Publish this variable in the help.
7312
7313
7314  if test "x$HEAD" = x; then
7315    # The variable is not set by user, try to locate tool using the code snippet
7316    for ac_prog in head
7317do
7318  # Extract the first word of "$ac_prog", so it can be a program name with args.
7319set dummy $ac_prog; ac_word=$2
7320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7321$as_echo_n "checking for $ac_word... " >&6; }
7322if ${ac_cv_path_HEAD+:} false; then :
7323  $as_echo_n "(cached) " >&6
7324else
7325  case $HEAD in
7326  [\\/]* | ?:[\\/]*)
7327  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7328  ;;
7329  *)
7330  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7331for as_dir in $PATH
7332do
7333  IFS=$as_save_IFS
7334  test -z "$as_dir" && as_dir=.
7335    for ac_exec_ext in '' $ac_executable_extensions; do
7336  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7337    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7338    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7339    break 2
7340  fi
7341done
7342  done
7343IFS=$as_save_IFS
7344
7345  ;;
7346esac
7347fi
7348HEAD=$ac_cv_path_HEAD
7349if test -n "$HEAD"; then
7350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7351$as_echo "$HEAD" >&6; }
7352else
7353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7354$as_echo "no" >&6; }
7355fi
7356
7357
7358  test -n "$HEAD" && break
7359done
7360
7361  else
7362    # The variable is set, but is it from the command line or the environment?
7363
7364    # Try to remove the string !HEAD! from our list.
7365    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
7366    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7367      # If it failed, the variable was not from the command line. Ignore it,
7368      # but warn the user (except for BASH, which is always set by the calling BASH).
7369      if test "xHEAD" != xBASH; then
7370        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
7371$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
7372      fi
7373      # Try to locate tool using the code snippet
7374      for ac_prog in head
7375do
7376  # Extract the first word of "$ac_prog", so it can be a program name with args.
7377set dummy $ac_prog; ac_word=$2
7378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7379$as_echo_n "checking for $ac_word... " >&6; }
7380if ${ac_cv_path_HEAD+:} false; then :
7381  $as_echo_n "(cached) " >&6
7382else
7383  case $HEAD in
7384  [\\/]* | ?:[\\/]*)
7385  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7386  ;;
7387  *)
7388  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7389for as_dir in $PATH
7390do
7391  IFS=$as_save_IFS
7392  test -z "$as_dir" && as_dir=.
7393    for ac_exec_ext in '' $ac_executable_extensions; do
7394  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7395    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7396    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7397    break 2
7398  fi
7399done
7400  done
7401IFS=$as_save_IFS
7402
7403  ;;
7404esac
7405fi
7406HEAD=$ac_cv_path_HEAD
7407if test -n "$HEAD"; then
7408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7409$as_echo "$HEAD" >&6; }
7410else
7411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7412$as_echo "no" >&6; }
7413fi
7414
7415
7416  test -n "$HEAD" && break
7417done
7418
7419    else
7420      # If it succeeded, then it was overridden by the user. We will use it
7421      # for the tool.
7422
7423      # First remove it from the list of overridden variables, so we can test
7424      # for unknown variables in the end.
7425      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7426
7427      # Check if the provided tool contains a complete path.
7428      tool_specified="$HEAD"
7429      tool_basename="${tool_specified##*/}"
7430      if test "x$tool_basename" = "x$tool_specified"; then
7431        # A command without a complete path is provided, search $PATH.
7432        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
7433$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
7434        # Extract the first word of "$tool_basename", so it can be a program name with args.
7435set dummy $tool_basename; ac_word=$2
7436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7437$as_echo_n "checking for $ac_word... " >&6; }
7438if ${ac_cv_path_HEAD+:} false; then :
7439  $as_echo_n "(cached) " >&6
7440else
7441  case $HEAD in
7442  [\\/]* | ?:[\\/]*)
7443  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7444  ;;
7445  *)
7446  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7447for as_dir in $PATH
7448do
7449  IFS=$as_save_IFS
7450  test -z "$as_dir" && as_dir=.
7451    for ac_exec_ext in '' $ac_executable_extensions; do
7452  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7453    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7454    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7455    break 2
7456  fi
7457done
7458  done
7459IFS=$as_save_IFS
7460
7461  ;;
7462esac
7463fi
7464HEAD=$ac_cv_path_HEAD
7465if test -n "$HEAD"; then
7466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7467$as_echo "$HEAD" >&6; }
7468else
7469  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7470$as_echo "no" >&6; }
7471fi
7472
7473
7474        if test "x$HEAD" = x; then
7475          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7476        fi
7477      else
7478        # Otherwise we believe it is a complete path. Use it as it is.
7479        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
7480$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
7481        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7482$as_echo_n "checking for HEAD... " >&6; }
7483        if test ! -x "$tool_specified"; then
7484          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7485$as_echo "not found" >&6; }
7486          as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
7487        fi
7488        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7489$as_echo "$tool_specified" >&6; }
7490      fi
7491    fi
7492  fi
7493
7494
7495
7496  if test "x$HEAD" = x; then
7497    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
7498  fi
7499
7500
7501
7502
7503
7504  # Publish this variable in the help.
7505
7506
7507  if test "x$LN" = x; then
7508    # The variable is not set by user, try to locate tool using the code snippet
7509    for ac_prog in ln
7510do
7511  # Extract the first word of "$ac_prog", so it can be a program name with args.
7512set dummy $ac_prog; ac_word=$2
7513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7514$as_echo_n "checking for $ac_word... " >&6; }
7515if ${ac_cv_path_LN+:} false; then :
7516  $as_echo_n "(cached) " >&6
7517else
7518  case $LN in
7519  [\\/]* | ?:[\\/]*)
7520  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7521  ;;
7522  *)
7523  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7524for as_dir in $PATH
7525do
7526  IFS=$as_save_IFS
7527  test -z "$as_dir" && as_dir=.
7528    for ac_exec_ext in '' $ac_executable_extensions; do
7529  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7530    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7531    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7532    break 2
7533  fi
7534done
7535  done
7536IFS=$as_save_IFS
7537
7538  ;;
7539esac
7540fi
7541LN=$ac_cv_path_LN
7542if test -n "$LN"; then
7543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7544$as_echo "$LN" >&6; }
7545else
7546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7547$as_echo "no" >&6; }
7548fi
7549
7550
7551  test -n "$LN" && break
7552done
7553
7554  else
7555    # The variable is set, but is it from the command line or the environment?
7556
7557    # Try to remove the string !LN! from our list.
7558    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
7559    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7560      # If it failed, the variable was not from the command line. Ignore it,
7561      # but warn the user (except for BASH, which is always set by the calling BASH).
7562      if test "xLN" != xBASH; then
7563        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
7564$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
7565      fi
7566      # Try to locate tool using the code snippet
7567      for ac_prog in ln
7568do
7569  # Extract the first word of "$ac_prog", so it can be a program name with args.
7570set dummy $ac_prog; ac_word=$2
7571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7572$as_echo_n "checking for $ac_word... " >&6; }
7573if ${ac_cv_path_LN+:} false; then :
7574  $as_echo_n "(cached) " >&6
7575else
7576  case $LN in
7577  [\\/]* | ?:[\\/]*)
7578  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7579  ;;
7580  *)
7581  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7582for as_dir in $PATH
7583do
7584  IFS=$as_save_IFS
7585  test -z "$as_dir" && as_dir=.
7586    for ac_exec_ext in '' $ac_executable_extensions; do
7587  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7588    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7589    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7590    break 2
7591  fi
7592done
7593  done
7594IFS=$as_save_IFS
7595
7596  ;;
7597esac
7598fi
7599LN=$ac_cv_path_LN
7600if test -n "$LN"; then
7601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7602$as_echo "$LN" >&6; }
7603else
7604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7605$as_echo "no" >&6; }
7606fi
7607
7608
7609  test -n "$LN" && break
7610done
7611
7612    else
7613      # If it succeeded, then it was overridden by the user. We will use it
7614      # for the tool.
7615
7616      # First remove it from the list of overridden variables, so we can test
7617      # for unknown variables in the end.
7618      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7619
7620      # Check if the provided tool contains a complete path.
7621      tool_specified="$LN"
7622      tool_basename="${tool_specified##*/}"
7623      if test "x$tool_basename" = "x$tool_specified"; then
7624        # A command without a complete path is provided, search $PATH.
7625        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
7626$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
7627        # Extract the first word of "$tool_basename", so it can be a program name with args.
7628set dummy $tool_basename; ac_word=$2
7629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7630$as_echo_n "checking for $ac_word... " >&6; }
7631if ${ac_cv_path_LN+:} false; then :
7632  $as_echo_n "(cached) " >&6
7633else
7634  case $LN in
7635  [\\/]* | ?:[\\/]*)
7636  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7637  ;;
7638  *)
7639  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7640for as_dir in $PATH
7641do
7642  IFS=$as_save_IFS
7643  test -z "$as_dir" && as_dir=.
7644    for ac_exec_ext in '' $ac_executable_extensions; do
7645  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7646    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7647    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7648    break 2
7649  fi
7650done
7651  done
7652IFS=$as_save_IFS
7653
7654  ;;
7655esac
7656fi
7657LN=$ac_cv_path_LN
7658if test -n "$LN"; then
7659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7660$as_echo "$LN" >&6; }
7661else
7662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7663$as_echo "no" >&6; }
7664fi
7665
7666
7667        if test "x$LN" = x; then
7668          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7669        fi
7670      else
7671        # Otherwise we believe it is a complete path. Use it as it is.
7672        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
7673$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
7674        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
7675$as_echo_n "checking for LN... " >&6; }
7676        if test ! -x "$tool_specified"; then
7677          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7678$as_echo "not found" >&6; }
7679          as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
7680        fi
7681        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7682$as_echo "$tool_specified" >&6; }
7683      fi
7684    fi
7685  fi
7686
7687
7688
7689  if test "x$LN" = x; then
7690    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
7691  fi
7692
7693
7694
7695
7696
7697  # Publish this variable in the help.
7698
7699
7700  if test "x$LS" = x; then
7701    # The variable is not set by user, try to locate tool using the code snippet
7702    for ac_prog in ls
7703do
7704  # Extract the first word of "$ac_prog", so it can be a program name with args.
7705set dummy $ac_prog; ac_word=$2
7706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7707$as_echo_n "checking for $ac_word... " >&6; }
7708if ${ac_cv_path_LS+:} false; then :
7709  $as_echo_n "(cached) " >&6
7710else
7711  case $LS in
7712  [\\/]* | ?:[\\/]*)
7713  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7714  ;;
7715  *)
7716  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7717for as_dir in $PATH
7718do
7719  IFS=$as_save_IFS
7720  test -z "$as_dir" && as_dir=.
7721    for ac_exec_ext in '' $ac_executable_extensions; do
7722  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7723    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7724    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7725    break 2
7726  fi
7727done
7728  done
7729IFS=$as_save_IFS
7730
7731  ;;
7732esac
7733fi
7734LS=$ac_cv_path_LS
7735if test -n "$LS"; then
7736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7737$as_echo "$LS" >&6; }
7738else
7739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7740$as_echo "no" >&6; }
7741fi
7742
7743
7744  test -n "$LS" && break
7745done
7746
7747  else
7748    # The variable is set, but is it from the command line or the environment?
7749
7750    # Try to remove the string !LS! from our list.
7751    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
7752    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7753      # If it failed, the variable was not from the command line. Ignore it,
7754      # but warn the user (except for BASH, which is always set by the calling BASH).
7755      if test "xLS" != xBASH; then
7756        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
7757$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
7758      fi
7759      # Try to locate tool using the code snippet
7760      for ac_prog in ls
7761do
7762  # Extract the first word of "$ac_prog", so it can be a program name with args.
7763set dummy $ac_prog; ac_word=$2
7764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7765$as_echo_n "checking for $ac_word... " >&6; }
7766if ${ac_cv_path_LS+:} false; then :
7767  $as_echo_n "(cached) " >&6
7768else
7769  case $LS in
7770  [\\/]* | ?:[\\/]*)
7771  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7772  ;;
7773  *)
7774  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7775for as_dir in $PATH
7776do
7777  IFS=$as_save_IFS
7778  test -z "$as_dir" && as_dir=.
7779    for ac_exec_ext in '' $ac_executable_extensions; do
7780  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7781    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7782    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7783    break 2
7784  fi
7785done
7786  done
7787IFS=$as_save_IFS
7788
7789  ;;
7790esac
7791fi
7792LS=$ac_cv_path_LS
7793if test -n "$LS"; then
7794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7795$as_echo "$LS" >&6; }
7796else
7797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7798$as_echo "no" >&6; }
7799fi
7800
7801
7802  test -n "$LS" && break
7803done
7804
7805    else
7806      # If it succeeded, then it was overridden by the user. We will use it
7807      # for the tool.
7808
7809      # First remove it from the list of overridden variables, so we can test
7810      # for unknown variables in the end.
7811      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7812
7813      # Check if the provided tool contains a complete path.
7814      tool_specified="$LS"
7815      tool_basename="${tool_specified##*/}"
7816      if test "x$tool_basename" = "x$tool_specified"; then
7817        # A command without a complete path is provided, search $PATH.
7818        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
7819$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
7820        # Extract the first word of "$tool_basename", so it can be a program name with args.
7821set dummy $tool_basename; ac_word=$2
7822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7823$as_echo_n "checking for $ac_word... " >&6; }
7824if ${ac_cv_path_LS+:} false; then :
7825  $as_echo_n "(cached) " >&6
7826else
7827  case $LS in
7828  [\\/]* | ?:[\\/]*)
7829  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7830  ;;
7831  *)
7832  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7833for as_dir in $PATH
7834do
7835  IFS=$as_save_IFS
7836  test -z "$as_dir" && as_dir=.
7837    for ac_exec_ext in '' $ac_executable_extensions; do
7838  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7839    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7840    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7841    break 2
7842  fi
7843done
7844  done
7845IFS=$as_save_IFS
7846
7847  ;;
7848esac
7849fi
7850LS=$ac_cv_path_LS
7851if test -n "$LS"; then
7852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7853$as_echo "$LS" >&6; }
7854else
7855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7856$as_echo "no" >&6; }
7857fi
7858
7859
7860        if test "x$LS" = x; then
7861          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7862        fi
7863      else
7864        # Otherwise we believe it is a complete path. Use it as it is.
7865        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
7866$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
7867        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
7868$as_echo_n "checking for LS... " >&6; }
7869        if test ! -x "$tool_specified"; then
7870          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7871$as_echo "not found" >&6; }
7872          as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
7873        fi
7874        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7875$as_echo "$tool_specified" >&6; }
7876      fi
7877    fi
7878  fi
7879
7880
7881
7882  if test "x$LS" = x; then
7883    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
7884  fi
7885
7886
7887
7888
7889
7890  # Publish this variable in the help.
7891
7892
7893  if test "x$MKDIR" = x; then
7894    # The variable is not set by user, try to locate tool using the code snippet
7895    for ac_prog in mkdir
7896do
7897  # Extract the first word of "$ac_prog", so it can be a program name with args.
7898set dummy $ac_prog; ac_word=$2
7899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7900$as_echo_n "checking for $ac_word... " >&6; }
7901if ${ac_cv_path_MKDIR+:} false; then :
7902  $as_echo_n "(cached) " >&6
7903else
7904  case $MKDIR in
7905  [\\/]* | ?:[\\/]*)
7906  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7907  ;;
7908  *)
7909  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7910for as_dir in $PATH
7911do
7912  IFS=$as_save_IFS
7913  test -z "$as_dir" && as_dir=.
7914    for ac_exec_ext in '' $ac_executable_extensions; do
7915  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7916    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7917    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7918    break 2
7919  fi
7920done
7921  done
7922IFS=$as_save_IFS
7923
7924  ;;
7925esac
7926fi
7927MKDIR=$ac_cv_path_MKDIR
7928if test -n "$MKDIR"; then
7929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
7930$as_echo "$MKDIR" >&6; }
7931else
7932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7933$as_echo "no" >&6; }
7934fi
7935
7936
7937  test -n "$MKDIR" && break
7938done
7939
7940  else
7941    # The variable is set, but is it from the command line or the environment?
7942
7943    # Try to remove the string !MKDIR! from our list.
7944    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
7945    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7946      # If it failed, the variable was not from the command line. Ignore it,
7947      # but warn the user (except for BASH, which is always set by the calling BASH).
7948      if test "xMKDIR" != xBASH; then
7949        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
7950$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
7951      fi
7952      # Try to locate tool using the code snippet
7953      for ac_prog in mkdir
7954do
7955  # Extract the first word of "$ac_prog", so it can be a program name with args.
7956set dummy $ac_prog; ac_word=$2
7957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7958$as_echo_n "checking for $ac_word... " >&6; }
7959if ${ac_cv_path_MKDIR+:} false; then :
7960  $as_echo_n "(cached) " >&6
7961else
7962  case $MKDIR in
7963  [\\/]* | ?:[\\/]*)
7964  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7965  ;;
7966  *)
7967  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7968for as_dir in $PATH
7969do
7970  IFS=$as_save_IFS
7971  test -z "$as_dir" && as_dir=.
7972    for ac_exec_ext in '' $ac_executable_extensions; do
7973  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7974    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7975    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7976    break 2
7977  fi
7978done
7979  done
7980IFS=$as_save_IFS
7981
7982  ;;
7983esac
7984fi
7985MKDIR=$ac_cv_path_MKDIR
7986if test -n "$MKDIR"; then
7987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
7988$as_echo "$MKDIR" >&6; }
7989else
7990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7991$as_echo "no" >&6; }
7992fi
7993
7994
7995  test -n "$MKDIR" && break
7996done
7997
7998    else
7999      # If it succeeded, then it was overridden by the user. We will use it
8000      # for the tool.
8001
8002      # First remove it from the list of overridden variables, so we can test
8003      # for unknown variables in the end.
8004      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8005
8006      # Check if the provided tool contains a complete path.
8007      tool_specified="$MKDIR"
8008      tool_basename="${tool_specified##*/}"
8009      if test "x$tool_basename" = "x$tool_specified"; then
8010        # A command without a complete path is provided, search $PATH.
8011        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8012$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8013        # Extract the first word of "$tool_basename", so it can be a program name with args.
8014set dummy $tool_basename; ac_word=$2
8015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8016$as_echo_n "checking for $ac_word... " >&6; }
8017if ${ac_cv_path_MKDIR+:} false; then :
8018  $as_echo_n "(cached) " >&6
8019else
8020  case $MKDIR in
8021  [\\/]* | ?:[\\/]*)
8022  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8023  ;;
8024  *)
8025  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8026for as_dir in $PATH
8027do
8028  IFS=$as_save_IFS
8029  test -z "$as_dir" && as_dir=.
8030    for ac_exec_ext in '' $ac_executable_extensions; do
8031  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8032    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8033    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8034    break 2
8035  fi
8036done
8037  done
8038IFS=$as_save_IFS
8039
8040  ;;
8041esac
8042fi
8043MKDIR=$ac_cv_path_MKDIR
8044if test -n "$MKDIR"; then
8045  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8046$as_echo "$MKDIR" >&6; }
8047else
8048  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8049$as_echo "no" >&6; }
8050fi
8051
8052
8053        if test "x$MKDIR" = x; then
8054          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8055        fi
8056      else
8057        # Otherwise we believe it is a complete path. Use it as it is.
8058        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8059$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8060        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8061$as_echo_n "checking for MKDIR... " >&6; }
8062        if test ! -x "$tool_specified"; then
8063          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8064$as_echo "not found" >&6; }
8065          as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8066        fi
8067        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8068$as_echo "$tool_specified" >&6; }
8069      fi
8070    fi
8071  fi
8072
8073
8074
8075  if test "x$MKDIR" = x; then
8076    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8077  fi
8078
8079
8080
8081
8082
8083  # Publish this variable in the help.
8084
8085
8086  if test "x$MKTEMP" = x; then
8087    # The variable is not set by user, try to locate tool using the code snippet
8088    for ac_prog in mktemp
8089do
8090  # Extract the first word of "$ac_prog", so it can be a program name with args.
8091set dummy $ac_prog; ac_word=$2
8092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8093$as_echo_n "checking for $ac_word... " >&6; }
8094if ${ac_cv_path_MKTEMP+:} false; then :
8095  $as_echo_n "(cached) " >&6
8096else
8097  case $MKTEMP in
8098  [\\/]* | ?:[\\/]*)
8099  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8100  ;;
8101  *)
8102  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8103for as_dir in $PATH
8104do
8105  IFS=$as_save_IFS
8106  test -z "$as_dir" && as_dir=.
8107    for ac_exec_ext in '' $ac_executable_extensions; do
8108  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8109    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8110    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8111    break 2
8112  fi
8113done
8114  done
8115IFS=$as_save_IFS
8116
8117  ;;
8118esac
8119fi
8120MKTEMP=$ac_cv_path_MKTEMP
8121if test -n "$MKTEMP"; then
8122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8123$as_echo "$MKTEMP" >&6; }
8124else
8125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8126$as_echo "no" >&6; }
8127fi
8128
8129
8130  test -n "$MKTEMP" && break
8131done
8132
8133  else
8134    # The variable is set, but is it from the command line or the environment?
8135
8136    # Try to remove the string !MKTEMP! from our list.
8137    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8138    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8139      # If it failed, the variable was not from the command line. Ignore it,
8140      # but warn the user (except for BASH, which is always set by the calling BASH).
8141      if test "xMKTEMP" != xBASH; then
8142        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8143$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8144      fi
8145      # Try to locate tool using the code snippet
8146      for ac_prog in mktemp
8147do
8148  # Extract the first word of "$ac_prog", so it can be a program name with args.
8149set dummy $ac_prog; ac_word=$2
8150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8151$as_echo_n "checking for $ac_word... " >&6; }
8152if ${ac_cv_path_MKTEMP+:} false; then :
8153  $as_echo_n "(cached) " >&6
8154else
8155  case $MKTEMP in
8156  [\\/]* | ?:[\\/]*)
8157  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8158  ;;
8159  *)
8160  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8161for as_dir in $PATH
8162do
8163  IFS=$as_save_IFS
8164  test -z "$as_dir" && as_dir=.
8165    for ac_exec_ext in '' $ac_executable_extensions; do
8166  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8167    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8168    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8169    break 2
8170  fi
8171done
8172  done
8173IFS=$as_save_IFS
8174
8175  ;;
8176esac
8177fi
8178MKTEMP=$ac_cv_path_MKTEMP
8179if test -n "$MKTEMP"; then
8180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8181$as_echo "$MKTEMP" >&6; }
8182else
8183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8184$as_echo "no" >&6; }
8185fi
8186
8187
8188  test -n "$MKTEMP" && break
8189done
8190
8191    else
8192      # If it succeeded, then it was overridden by the user. We will use it
8193      # for the tool.
8194
8195      # First remove it from the list of overridden variables, so we can test
8196      # for unknown variables in the end.
8197      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8198
8199      # Check if the provided tool contains a complete path.
8200      tool_specified="$MKTEMP"
8201      tool_basename="${tool_specified##*/}"
8202      if test "x$tool_basename" = "x$tool_specified"; then
8203        # A command without a complete path is provided, search $PATH.
8204        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8205$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8206        # Extract the first word of "$tool_basename", so it can be a program name with args.
8207set dummy $tool_basename; ac_word=$2
8208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8209$as_echo_n "checking for $ac_word... " >&6; }
8210if ${ac_cv_path_MKTEMP+:} false; then :
8211  $as_echo_n "(cached) " >&6
8212else
8213  case $MKTEMP in
8214  [\\/]* | ?:[\\/]*)
8215  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8216  ;;
8217  *)
8218  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8219for as_dir in $PATH
8220do
8221  IFS=$as_save_IFS
8222  test -z "$as_dir" && as_dir=.
8223    for ac_exec_ext in '' $ac_executable_extensions; do
8224  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8225    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8226    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8227    break 2
8228  fi
8229done
8230  done
8231IFS=$as_save_IFS
8232
8233  ;;
8234esac
8235fi
8236MKTEMP=$ac_cv_path_MKTEMP
8237if test -n "$MKTEMP"; then
8238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8239$as_echo "$MKTEMP" >&6; }
8240else
8241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8242$as_echo "no" >&6; }
8243fi
8244
8245
8246        if test "x$MKTEMP" = x; then
8247          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8248        fi
8249      else
8250        # Otherwise we believe it is a complete path. Use it as it is.
8251        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8252$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8253        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8254$as_echo_n "checking for MKTEMP... " >&6; }
8255        if test ! -x "$tool_specified"; then
8256          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8257$as_echo "not found" >&6; }
8258          as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8259        fi
8260        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8261$as_echo "$tool_specified" >&6; }
8262      fi
8263    fi
8264  fi
8265
8266
8267
8268  if test "x$MKTEMP" = x; then
8269    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8270  fi
8271
8272
8273
8274
8275
8276  # Publish this variable in the help.
8277
8278
8279  if test "x$MV" = x; then
8280    # The variable is not set by user, try to locate tool using the code snippet
8281    for ac_prog in mv
8282do
8283  # Extract the first word of "$ac_prog", so it can be a program name with args.
8284set dummy $ac_prog; ac_word=$2
8285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8286$as_echo_n "checking for $ac_word... " >&6; }
8287if ${ac_cv_path_MV+:} false; then :
8288  $as_echo_n "(cached) " >&6
8289else
8290  case $MV in
8291  [\\/]* | ?:[\\/]*)
8292  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8293  ;;
8294  *)
8295  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8296for as_dir in $PATH
8297do
8298  IFS=$as_save_IFS
8299  test -z "$as_dir" && as_dir=.
8300    for ac_exec_ext in '' $ac_executable_extensions; do
8301  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8302    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8303    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8304    break 2
8305  fi
8306done
8307  done
8308IFS=$as_save_IFS
8309
8310  ;;
8311esac
8312fi
8313MV=$ac_cv_path_MV
8314if test -n "$MV"; then
8315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8316$as_echo "$MV" >&6; }
8317else
8318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8319$as_echo "no" >&6; }
8320fi
8321
8322
8323  test -n "$MV" && break
8324done
8325
8326  else
8327    # The variable is set, but is it from the command line or the environment?
8328
8329    # Try to remove the string !MV! from our list.
8330    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
8331    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8332      # If it failed, the variable was not from the command line. Ignore it,
8333      # but warn the user (except for BASH, which is always set by the calling BASH).
8334      if test "xMV" != xBASH; then
8335        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
8336$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
8337      fi
8338      # Try to locate tool using the code snippet
8339      for ac_prog in mv
8340do
8341  # Extract the first word of "$ac_prog", so it can be a program name with args.
8342set dummy $ac_prog; ac_word=$2
8343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8344$as_echo_n "checking for $ac_word... " >&6; }
8345if ${ac_cv_path_MV+:} false; then :
8346  $as_echo_n "(cached) " >&6
8347else
8348  case $MV in
8349  [\\/]* | ?:[\\/]*)
8350  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8351  ;;
8352  *)
8353  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8354for as_dir in $PATH
8355do
8356  IFS=$as_save_IFS
8357  test -z "$as_dir" && as_dir=.
8358    for ac_exec_ext in '' $ac_executable_extensions; do
8359  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8360    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8361    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8362    break 2
8363  fi
8364done
8365  done
8366IFS=$as_save_IFS
8367
8368  ;;
8369esac
8370fi
8371MV=$ac_cv_path_MV
8372if test -n "$MV"; then
8373  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8374$as_echo "$MV" >&6; }
8375else
8376  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8377$as_echo "no" >&6; }
8378fi
8379
8380
8381  test -n "$MV" && break
8382done
8383
8384    else
8385      # If it succeeded, then it was overridden by the user. We will use it
8386      # for the tool.
8387
8388      # First remove it from the list of overridden variables, so we can test
8389      # for unknown variables in the end.
8390      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8391
8392      # Check if the provided tool contains a complete path.
8393      tool_specified="$MV"
8394      tool_basename="${tool_specified##*/}"
8395      if test "x$tool_basename" = "x$tool_specified"; then
8396        # A command without a complete path is provided, search $PATH.
8397        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
8398$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
8399        # Extract the first word of "$tool_basename", so it can be a program name with args.
8400set dummy $tool_basename; ac_word=$2
8401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8402$as_echo_n "checking for $ac_word... " >&6; }
8403if ${ac_cv_path_MV+:} false; then :
8404  $as_echo_n "(cached) " >&6
8405else
8406  case $MV in
8407  [\\/]* | ?:[\\/]*)
8408  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8409  ;;
8410  *)
8411  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8412for as_dir in $PATH
8413do
8414  IFS=$as_save_IFS
8415  test -z "$as_dir" && as_dir=.
8416    for ac_exec_ext in '' $ac_executable_extensions; do
8417  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8418    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8419    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8420    break 2
8421  fi
8422done
8423  done
8424IFS=$as_save_IFS
8425
8426  ;;
8427esac
8428fi
8429MV=$ac_cv_path_MV
8430if test -n "$MV"; then
8431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8432$as_echo "$MV" >&6; }
8433else
8434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8435$as_echo "no" >&6; }
8436fi
8437
8438
8439        if test "x$MV" = x; then
8440          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8441        fi
8442      else
8443        # Otherwise we believe it is a complete path. Use it as it is.
8444        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
8445$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
8446        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8447$as_echo_n "checking for MV... " >&6; }
8448        if test ! -x "$tool_specified"; then
8449          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8450$as_echo "not found" >&6; }
8451          as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
8452        fi
8453        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8454$as_echo "$tool_specified" >&6; }
8455      fi
8456    fi
8457  fi
8458
8459
8460
8461  if test "x$MV" = x; then
8462    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
8463  fi
8464
8465
8466
8467
8468
8469  # Publish this variable in the help.
8470
8471
8472  if test "x$NAWK" = x; then
8473    # The variable is not set by user, try to locate tool using the code snippet
8474    for ac_prog in nawk gawk awk
8475do
8476  # Extract the first word of "$ac_prog", so it can be a program name with args.
8477set dummy $ac_prog; ac_word=$2
8478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8479$as_echo_n "checking for $ac_word... " >&6; }
8480if ${ac_cv_path_NAWK+:} false; then :
8481  $as_echo_n "(cached) " >&6
8482else
8483  case $NAWK in
8484  [\\/]* | ?:[\\/]*)
8485  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8486  ;;
8487  *)
8488  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8489for as_dir in $PATH
8490do
8491  IFS=$as_save_IFS
8492  test -z "$as_dir" && as_dir=.
8493    for ac_exec_ext in '' $ac_executable_extensions; do
8494  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8495    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8496    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8497    break 2
8498  fi
8499done
8500  done
8501IFS=$as_save_IFS
8502
8503  ;;
8504esac
8505fi
8506NAWK=$ac_cv_path_NAWK
8507if test -n "$NAWK"; then
8508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8509$as_echo "$NAWK" >&6; }
8510else
8511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8512$as_echo "no" >&6; }
8513fi
8514
8515
8516  test -n "$NAWK" && break
8517done
8518
8519  else
8520    # The variable is set, but is it from the command line or the environment?
8521
8522    # Try to remove the string !NAWK! from our list.
8523    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
8524    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8525      # If it failed, the variable was not from the command line. Ignore it,
8526      # but warn the user (except for BASH, which is always set by the calling BASH).
8527      if test "xNAWK" != xBASH; then
8528        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
8529$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
8530      fi
8531      # Try to locate tool using the code snippet
8532      for ac_prog in nawk gawk awk
8533do
8534  # Extract the first word of "$ac_prog", so it can be a program name with args.
8535set dummy $ac_prog; ac_word=$2
8536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8537$as_echo_n "checking for $ac_word... " >&6; }
8538if ${ac_cv_path_NAWK+:} false; then :
8539  $as_echo_n "(cached) " >&6
8540else
8541  case $NAWK in
8542  [\\/]* | ?:[\\/]*)
8543  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8544  ;;
8545  *)
8546  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8547for as_dir in $PATH
8548do
8549  IFS=$as_save_IFS
8550  test -z "$as_dir" && as_dir=.
8551    for ac_exec_ext in '' $ac_executable_extensions; do
8552  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8553    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8554    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8555    break 2
8556  fi
8557done
8558  done
8559IFS=$as_save_IFS
8560
8561  ;;
8562esac
8563fi
8564NAWK=$ac_cv_path_NAWK
8565if test -n "$NAWK"; then
8566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8567$as_echo "$NAWK" >&6; }
8568else
8569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8570$as_echo "no" >&6; }
8571fi
8572
8573
8574  test -n "$NAWK" && break
8575done
8576
8577    else
8578      # If it succeeded, then it was overridden by the user. We will use it
8579      # for the tool.
8580
8581      # First remove it from the list of overridden variables, so we can test
8582      # for unknown variables in the end.
8583      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8584
8585      # Check if the provided tool contains a complete path.
8586      tool_specified="$NAWK"
8587      tool_basename="${tool_specified##*/}"
8588      if test "x$tool_basename" = "x$tool_specified"; then
8589        # A command without a complete path is provided, search $PATH.
8590        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
8591$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
8592        # Extract the first word of "$tool_basename", so it can be a program name with args.
8593set dummy $tool_basename; ac_word=$2
8594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8595$as_echo_n "checking for $ac_word... " >&6; }
8596if ${ac_cv_path_NAWK+:} false; then :
8597  $as_echo_n "(cached) " >&6
8598else
8599  case $NAWK in
8600  [\\/]* | ?:[\\/]*)
8601  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8602  ;;
8603  *)
8604  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8605for as_dir in $PATH
8606do
8607  IFS=$as_save_IFS
8608  test -z "$as_dir" && as_dir=.
8609    for ac_exec_ext in '' $ac_executable_extensions; do
8610  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8611    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8612    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8613    break 2
8614  fi
8615done
8616  done
8617IFS=$as_save_IFS
8618
8619  ;;
8620esac
8621fi
8622NAWK=$ac_cv_path_NAWK
8623if test -n "$NAWK"; then
8624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8625$as_echo "$NAWK" >&6; }
8626else
8627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8628$as_echo "no" >&6; }
8629fi
8630
8631
8632        if test "x$NAWK" = x; then
8633          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8634        fi
8635      else
8636        # Otherwise we believe it is a complete path. Use it as it is.
8637        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
8638$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
8639        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
8640$as_echo_n "checking for NAWK... " >&6; }
8641        if test ! -x "$tool_specified"; then
8642          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8643$as_echo "not found" >&6; }
8644          as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
8645        fi
8646        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8647$as_echo "$tool_specified" >&6; }
8648      fi
8649    fi
8650  fi
8651
8652
8653
8654  if test "x$NAWK" = x; then
8655    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
8656  fi
8657
8658
8659
8660
8661
8662  # Publish this variable in the help.
8663
8664
8665  if test "x$PRINTF" = x; then
8666    # The variable is not set by user, try to locate tool using the code snippet
8667    for ac_prog in printf
8668do
8669  # Extract the first word of "$ac_prog", so it can be a program name with args.
8670set dummy $ac_prog; ac_word=$2
8671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8672$as_echo_n "checking for $ac_word... " >&6; }
8673if ${ac_cv_path_PRINTF+:} false; then :
8674  $as_echo_n "(cached) " >&6
8675else
8676  case $PRINTF in
8677  [\\/]* | ?:[\\/]*)
8678  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8679  ;;
8680  *)
8681  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8682for as_dir in $PATH
8683do
8684  IFS=$as_save_IFS
8685  test -z "$as_dir" && as_dir=.
8686    for ac_exec_ext in '' $ac_executable_extensions; do
8687  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8688    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8689    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8690    break 2
8691  fi
8692done
8693  done
8694IFS=$as_save_IFS
8695
8696  ;;
8697esac
8698fi
8699PRINTF=$ac_cv_path_PRINTF
8700if test -n "$PRINTF"; then
8701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8702$as_echo "$PRINTF" >&6; }
8703else
8704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8705$as_echo "no" >&6; }
8706fi
8707
8708
8709  test -n "$PRINTF" && break
8710done
8711
8712  else
8713    # The variable is set, but is it from the command line or the environment?
8714
8715    # Try to remove the string !PRINTF! from our list.
8716    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
8717    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8718      # If it failed, the variable was not from the command line. Ignore it,
8719      # but warn the user (except for BASH, which is always set by the calling BASH).
8720      if test "xPRINTF" != xBASH; then
8721        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
8722$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
8723      fi
8724      # Try to locate tool using the code snippet
8725      for ac_prog in printf
8726do
8727  # Extract the first word of "$ac_prog", so it can be a program name with args.
8728set dummy $ac_prog; ac_word=$2
8729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8730$as_echo_n "checking for $ac_word... " >&6; }
8731if ${ac_cv_path_PRINTF+:} false; then :
8732  $as_echo_n "(cached) " >&6
8733else
8734  case $PRINTF in
8735  [\\/]* | ?:[\\/]*)
8736  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8737  ;;
8738  *)
8739  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8740for as_dir in $PATH
8741do
8742  IFS=$as_save_IFS
8743  test -z "$as_dir" && as_dir=.
8744    for ac_exec_ext in '' $ac_executable_extensions; do
8745  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8746    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8747    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8748    break 2
8749  fi
8750done
8751  done
8752IFS=$as_save_IFS
8753
8754  ;;
8755esac
8756fi
8757PRINTF=$ac_cv_path_PRINTF
8758if test -n "$PRINTF"; then
8759  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8760$as_echo "$PRINTF" >&6; }
8761else
8762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8763$as_echo "no" >&6; }
8764fi
8765
8766
8767  test -n "$PRINTF" && break
8768done
8769
8770    else
8771      # If it succeeded, then it was overridden by the user. We will use it
8772      # for the tool.
8773
8774      # First remove it from the list of overridden variables, so we can test
8775      # for unknown variables in the end.
8776      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8777
8778      # Check if the provided tool contains a complete path.
8779      tool_specified="$PRINTF"
8780      tool_basename="${tool_specified##*/}"
8781      if test "x$tool_basename" = "x$tool_specified"; then
8782        # A command without a complete path is provided, search $PATH.
8783        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
8784$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
8785        # Extract the first word of "$tool_basename", so it can be a program name with args.
8786set dummy $tool_basename; ac_word=$2
8787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8788$as_echo_n "checking for $ac_word... " >&6; }
8789if ${ac_cv_path_PRINTF+:} false; then :
8790  $as_echo_n "(cached) " >&6
8791else
8792  case $PRINTF in
8793  [\\/]* | ?:[\\/]*)
8794  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8795  ;;
8796  *)
8797  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8798for as_dir in $PATH
8799do
8800  IFS=$as_save_IFS
8801  test -z "$as_dir" && as_dir=.
8802    for ac_exec_ext in '' $ac_executable_extensions; do
8803  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8804    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8805    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8806    break 2
8807  fi
8808done
8809  done
8810IFS=$as_save_IFS
8811
8812  ;;
8813esac
8814fi
8815PRINTF=$ac_cv_path_PRINTF
8816if test -n "$PRINTF"; then
8817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8818$as_echo "$PRINTF" >&6; }
8819else
8820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8821$as_echo "no" >&6; }
8822fi
8823
8824
8825        if test "x$PRINTF" = x; then
8826          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8827        fi
8828      else
8829        # Otherwise we believe it is a complete path. Use it as it is.
8830        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
8831$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
8832        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
8833$as_echo_n "checking for PRINTF... " >&6; }
8834        if test ! -x "$tool_specified"; then
8835          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8836$as_echo "not found" >&6; }
8837          as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
8838        fi
8839        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8840$as_echo "$tool_specified" >&6; }
8841      fi
8842    fi
8843  fi
8844
8845
8846
8847  if test "x$PRINTF" = x; then
8848    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
8849  fi
8850
8851
8852
8853
8854
8855  # Publish this variable in the help.
8856
8857
8858  if test "x$RM" = x; then
8859    # The variable is not set by user, try to locate tool using the code snippet
8860    for ac_prog in rm
8861do
8862  # Extract the first word of "$ac_prog", so it can be a program name with args.
8863set dummy $ac_prog; ac_word=$2
8864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8865$as_echo_n "checking for $ac_word... " >&6; }
8866if ${ac_cv_path_RM+:} false; then :
8867  $as_echo_n "(cached) " >&6
8868else
8869  case $RM in
8870  [\\/]* | ?:[\\/]*)
8871  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8872  ;;
8873  *)
8874  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8875for as_dir in $PATH
8876do
8877  IFS=$as_save_IFS
8878  test -z "$as_dir" && as_dir=.
8879    for ac_exec_ext in '' $ac_executable_extensions; do
8880  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8881    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8882    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8883    break 2
8884  fi
8885done
8886  done
8887IFS=$as_save_IFS
8888
8889  ;;
8890esac
8891fi
8892RM=$ac_cv_path_RM
8893if test -n "$RM"; then
8894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8895$as_echo "$RM" >&6; }
8896else
8897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8898$as_echo "no" >&6; }
8899fi
8900
8901
8902  test -n "$RM" && break
8903done
8904
8905  else
8906    # The variable is set, but is it from the command line or the environment?
8907
8908    # Try to remove the string !RM! from our list.
8909    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
8910    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8911      # If it failed, the variable was not from the command line. Ignore it,
8912      # but warn the user (except for BASH, which is always set by the calling BASH).
8913      if test "xRM" != xBASH; then
8914        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
8915$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
8916      fi
8917      # Try to locate tool using the code snippet
8918      for ac_prog in rm
8919do
8920  # Extract the first word of "$ac_prog", so it can be a program name with args.
8921set dummy $ac_prog; ac_word=$2
8922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8923$as_echo_n "checking for $ac_word... " >&6; }
8924if ${ac_cv_path_RM+:} false; then :
8925  $as_echo_n "(cached) " >&6
8926else
8927  case $RM in
8928  [\\/]* | ?:[\\/]*)
8929  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8930  ;;
8931  *)
8932  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8933for as_dir in $PATH
8934do
8935  IFS=$as_save_IFS
8936  test -z "$as_dir" && as_dir=.
8937    for ac_exec_ext in '' $ac_executable_extensions; do
8938  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8939    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8940    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8941    break 2
8942  fi
8943done
8944  done
8945IFS=$as_save_IFS
8946
8947  ;;
8948esac
8949fi
8950RM=$ac_cv_path_RM
8951if test -n "$RM"; then
8952  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8953$as_echo "$RM" >&6; }
8954else
8955  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8956$as_echo "no" >&6; }
8957fi
8958
8959
8960  test -n "$RM" && break
8961done
8962
8963    else
8964      # If it succeeded, then it was overridden by the user. We will use it
8965      # for the tool.
8966
8967      # First remove it from the list of overridden variables, so we can test
8968      # for unknown variables in the end.
8969      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8970
8971      # Check if the provided tool contains a complete path.
8972      tool_specified="$RM"
8973      tool_basename="${tool_specified##*/}"
8974      if test "x$tool_basename" = "x$tool_specified"; then
8975        # A command without a complete path is provided, search $PATH.
8976        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
8977$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
8978        # Extract the first word of "$tool_basename", so it can be a program name with args.
8979set dummy $tool_basename; ac_word=$2
8980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8981$as_echo_n "checking for $ac_word... " >&6; }
8982if ${ac_cv_path_RM+:} false; then :
8983  $as_echo_n "(cached) " >&6
8984else
8985  case $RM in
8986  [\\/]* | ?:[\\/]*)
8987  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8988  ;;
8989  *)
8990  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8991for as_dir in $PATH
8992do
8993  IFS=$as_save_IFS
8994  test -z "$as_dir" && as_dir=.
8995    for ac_exec_ext in '' $ac_executable_extensions; do
8996  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8997    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8998    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8999    break 2
9000  fi
9001done
9002  done
9003IFS=$as_save_IFS
9004
9005  ;;
9006esac
9007fi
9008RM=$ac_cv_path_RM
9009if test -n "$RM"; then
9010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9011$as_echo "$RM" >&6; }
9012else
9013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9014$as_echo "no" >&6; }
9015fi
9016
9017
9018        if test "x$RM" = x; then
9019          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9020        fi
9021      else
9022        # Otherwise we believe it is a complete path. Use it as it is.
9023        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
9024$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
9025        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9026$as_echo_n "checking for RM... " >&6; }
9027        if test ! -x "$tool_specified"; then
9028          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9029$as_echo "not found" >&6; }
9030          as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
9031        fi
9032        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9033$as_echo "$tool_specified" >&6; }
9034      fi
9035    fi
9036  fi
9037
9038
9039
9040  if test "x$RM" = x; then
9041    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9042  fi
9043
9044
9045
9046
9047
9048  # Publish this variable in the help.
9049
9050
9051  if test "x$SH" = x; then
9052    # The variable is not set by user, try to locate tool using the code snippet
9053    for ac_prog in sh
9054do
9055  # Extract the first word of "$ac_prog", so it can be a program name with args.
9056set dummy $ac_prog; ac_word=$2
9057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9058$as_echo_n "checking for $ac_word... " >&6; }
9059if ${ac_cv_path_SH+:} false; then :
9060  $as_echo_n "(cached) " >&6
9061else
9062  case $SH in
9063  [\\/]* | ?:[\\/]*)
9064  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9065  ;;
9066  *)
9067  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9068for as_dir in $PATH
9069do
9070  IFS=$as_save_IFS
9071  test -z "$as_dir" && as_dir=.
9072    for ac_exec_ext in '' $ac_executable_extensions; do
9073  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9074    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9075    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9076    break 2
9077  fi
9078done
9079  done
9080IFS=$as_save_IFS
9081
9082  ;;
9083esac
9084fi
9085SH=$ac_cv_path_SH
9086if test -n "$SH"; then
9087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9088$as_echo "$SH" >&6; }
9089else
9090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9091$as_echo "no" >&6; }
9092fi
9093
9094
9095  test -n "$SH" && break
9096done
9097
9098  else
9099    # The variable is set, but is it from the command line or the environment?
9100
9101    # Try to remove the string !SH! from our list.
9102    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
9103    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9104      # If it failed, the variable was not from the command line. Ignore it,
9105      # but warn the user (except for BASH, which is always set by the calling BASH).
9106      if test "xSH" != xBASH; then
9107        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
9108$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
9109      fi
9110      # Try to locate tool using the code snippet
9111      for ac_prog in sh
9112do
9113  # Extract the first word of "$ac_prog", so it can be a program name with args.
9114set dummy $ac_prog; ac_word=$2
9115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9116$as_echo_n "checking for $ac_word... " >&6; }
9117if ${ac_cv_path_SH+:} false; then :
9118  $as_echo_n "(cached) " >&6
9119else
9120  case $SH in
9121  [\\/]* | ?:[\\/]*)
9122  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9123  ;;
9124  *)
9125  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9126for as_dir in $PATH
9127do
9128  IFS=$as_save_IFS
9129  test -z "$as_dir" && as_dir=.
9130    for ac_exec_ext in '' $ac_executable_extensions; do
9131  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9132    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9133    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9134    break 2
9135  fi
9136done
9137  done
9138IFS=$as_save_IFS
9139
9140  ;;
9141esac
9142fi
9143SH=$ac_cv_path_SH
9144if test -n "$SH"; then
9145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9146$as_echo "$SH" >&6; }
9147else
9148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9149$as_echo "no" >&6; }
9150fi
9151
9152
9153  test -n "$SH" && break
9154done
9155
9156    else
9157      # If it succeeded, then it was overridden by the user. We will use it
9158      # for the tool.
9159
9160      # First remove it from the list of overridden variables, so we can test
9161      # for unknown variables in the end.
9162      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9163
9164      # Check if the provided tool contains a complete path.
9165      tool_specified="$SH"
9166      tool_basename="${tool_specified##*/}"
9167      if test "x$tool_basename" = "x$tool_specified"; then
9168        # A command without a complete path is provided, search $PATH.
9169        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
9170$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
9171        # Extract the first word of "$tool_basename", so it can be a program name with args.
9172set dummy $tool_basename; ac_word=$2
9173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9174$as_echo_n "checking for $ac_word... " >&6; }
9175if ${ac_cv_path_SH+:} false; then :
9176  $as_echo_n "(cached) " >&6
9177else
9178  case $SH in
9179  [\\/]* | ?:[\\/]*)
9180  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9181  ;;
9182  *)
9183  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9184for as_dir in $PATH
9185do
9186  IFS=$as_save_IFS
9187  test -z "$as_dir" && as_dir=.
9188    for ac_exec_ext in '' $ac_executable_extensions; do
9189  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9190    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9191    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9192    break 2
9193  fi
9194done
9195  done
9196IFS=$as_save_IFS
9197
9198  ;;
9199esac
9200fi
9201SH=$ac_cv_path_SH
9202if test -n "$SH"; then
9203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9204$as_echo "$SH" >&6; }
9205else
9206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9207$as_echo "no" >&6; }
9208fi
9209
9210
9211        if test "x$SH" = x; then
9212          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9213        fi
9214      else
9215        # Otherwise we believe it is a complete path. Use it as it is.
9216        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
9217$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
9218        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9219$as_echo_n "checking for SH... " >&6; }
9220        if test ! -x "$tool_specified"; then
9221          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9222$as_echo "not found" >&6; }
9223          as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
9224        fi
9225        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9226$as_echo "$tool_specified" >&6; }
9227      fi
9228    fi
9229  fi
9230
9231
9232
9233  if test "x$SH" = x; then
9234    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
9235  fi
9236
9237
9238
9239
9240
9241  # Publish this variable in the help.
9242
9243
9244  if test "x$SORT" = x; then
9245    # The variable is not set by user, try to locate tool using the code snippet
9246    for ac_prog in sort
9247do
9248  # Extract the first word of "$ac_prog", so it can be a program name with args.
9249set dummy $ac_prog; ac_word=$2
9250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9251$as_echo_n "checking for $ac_word... " >&6; }
9252if ${ac_cv_path_SORT+:} false; then :
9253  $as_echo_n "(cached) " >&6
9254else
9255  case $SORT in
9256  [\\/]* | ?:[\\/]*)
9257  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9258  ;;
9259  *)
9260  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9261for as_dir in $PATH
9262do
9263  IFS=$as_save_IFS
9264  test -z "$as_dir" && as_dir=.
9265    for ac_exec_ext in '' $ac_executable_extensions; do
9266  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9267    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9268    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9269    break 2
9270  fi
9271done
9272  done
9273IFS=$as_save_IFS
9274
9275  ;;
9276esac
9277fi
9278SORT=$ac_cv_path_SORT
9279if test -n "$SORT"; then
9280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9281$as_echo "$SORT" >&6; }
9282else
9283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9284$as_echo "no" >&6; }
9285fi
9286
9287
9288  test -n "$SORT" && break
9289done
9290
9291  else
9292    # The variable is set, but is it from the command line or the environment?
9293
9294    # Try to remove the string !SORT! from our list.
9295    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
9296    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9297      # If it failed, the variable was not from the command line. Ignore it,
9298      # but warn the user (except for BASH, which is always set by the calling BASH).
9299      if test "xSORT" != xBASH; then
9300        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
9301$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
9302      fi
9303      # Try to locate tool using the code snippet
9304      for ac_prog in sort
9305do
9306  # Extract the first word of "$ac_prog", so it can be a program name with args.
9307set dummy $ac_prog; ac_word=$2
9308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9309$as_echo_n "checking for $ac_word... " >&6; }
9310if ${ac_cv_path_SORT+:} false; then :
9311  $as_echo_n "(cached) " >&6
9312else
9313  case $SORT in
9314  [\\/]* | ?:[\\/]*)
9315  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9316  ;;
9317  *)
9318  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9319for as_dir in $PATH
9320do
9321  IFS=$as_save_IFS
9322  test -z "$as_dir" && as_dir=.
9323    for ac_exec_ext in '' $ac_executable_extensions; do
9324  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9325    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9326    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9327    break 2
9328  fi
9329done
9330  done
9331IFS=$as_save_IFS
9332
9333  ;;
9334esac
9335fi
9336SORT=$ac_cv_path_SORT
9337if test -n "$SORT"; then
9338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9339$as_echo "$SORT" >&6; }
9340else
9341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9342$as_echo "no" >&6; }
9343fi
9344
9345
9346  test -n "$SORT" && break
9347done
9348
9349    else
9350      # If it succeeded, then it was overridden by the user. We will use it
9351      # for the tool.
9352
9353      # First remove it from the list of overridden variables, so we can test
9354      # for unknown variables in the end.
9355      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9356
9357      # Check if the provided tool contains a complete path.
9358      tool_specified="$SORT"
9359      tool_basename="${tool_specified##*/}"
9360      if test "x$tool_basename" = "x$tool_specified"; then
9361        # A command without a complete path is provided, search $PATH.
9362        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
9363$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
9364        # Extract the first word of "$tool_basename", so it can be a program name with args.
9365set dummy $tool_basename; ac_word=$2
9366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9367$as_echo_n "checking for $ac_word... " >&6; }
9368if ${ac_cv_path_SORT+:} false; then :
9369  $as_echo_n "(cached) " >&6
9370else
9371  case $SORT in
9372  [\\/]* | ?:[\\/]*)
9373  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9374  ;;
9375  *)
9376  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9377for as_dir in $PATH
9378do
9379  IFS=$as_save_IFS
9380  test -z "$as_dir" && as_dir=.
9381    for ac_exec_ext in '' $ac_executable_extensions; do
9382  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9383    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9384    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9385    break 2
9386  fi
9387done
9388  done
9389IFS=$as_save_IFS
9390
9391  ;;
9392esac
9393fi
9394SORT=$ac_cv_path_SORT
9395if test -n "$SORT"; then
9396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9397$as_echo "$SORT" >&6; }
9398else
9399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9400$as_echo "no" >&6; }
9401fi
9402
9403
9404        if test "x$SORT" = x; then
9405          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9406        fi
9407      else
9408        # Otherwise we believe it is a complete path. Use it as it is.
9409        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
9410$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
9411        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
9412$as_echo_n "checking for SORT... " >&6; }
9413        if test ! -x "$tool_specified"; then
9414          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9415$as_echo "not found" >&6; }
9416          as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
9417        fi
9418        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9419$as_echo "$tool_specified" >&6; }
9420      fi
9421    fi
9422  fi
9423
9424
9425
9426  if test "x$SORT" = x; then
9427    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
9428  fi
9429
9430
9431
9432
9433
9434  # Publish this variable in the help.
9435
9436
9437  if test "x$TAIL" = x; then
9438    # The variable is not set by user, try to locate tool using the code snippet
9439    for ac_prog in tail
9440do
9441  # Extract the first word of "$ac_prog", so it can be a program name with args.
9442set dummy $ac_prog; ac_word=$2
9443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9444$as_echo_n "checking for $ac_word... " >&6; }
9445if ${ac_cv_path_TAIL+:} false; then :
9446  $as_echo_n "(cached) " >&6
9447else
9448  case $TAIL in
9449  [\\/]* | ?:[\\/]*)
9450  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9451  ;;
9452  *)
9453  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9454for as_dir in $PATH
9455do
9456  IFS=$as_save_IFS
9457  test -z "$as_dir" && as_dir=.
9458    for ac_exec_ext in '' $ac_executable_extensions; do
9459  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9460    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9461    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9462    break 2
9463  fi
9464done
9465  done
9466IFS=$as_save_IFS
9467
9468  ;;
9469esac
9470fi
9471TAIL=$ac_cv_path_TAIL
9472if test -n "$TAIL"; then
9473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9474$as_echo "$TAIL" >&6; }
9475else
9476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9477$as_echo "no" >&6; }
9478fi
9479
9480
9481  test -n "$TAIL" && break
9482done
9483
9484  else
9485    # The variable is set, but is it from the command line or the environment?
9486
9487    # Try to remove the string !TAIL! from our list.
9488    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
9489    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9490      # If it failed, the variable was not from the command line. Ignore it,
9491      # but warn the user (except for BASH, which is always set by the calling BASH).
9492      if test "xTAIL" != xBASH; then
9493        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
9494$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
9495      fi
9496      # Try to locate tool using the code snippet
9497      for ac_prog in tail
9498do
9499  # Extract the first word of "$ac_prog", so it can be a program name with args.
9500set dummy $ac_prog; ac_word=$2
9501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9502$as_echo_n "checking for $ac_word... " >&6; }
9503if ${ac_cv_path_TAIL+:} false; then :
9504  $as_echo_n "(cached) " >&6
9505else
9506  case $TAIL in
9507  [\\/]* | ?:[\\/]*)
9508  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9509  ;;
9510  *)
9511  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9512for as_dir in $PATH
9513do
9514  IFS=$as_save_IFS
9515  test -z "$as_dir" && as_dir=.
9516    for ac_exec_ext in '' $ac_executable_extensions; do
9517  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9518    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9519    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9520    break 2
9521  fi
9522done
9523  done
9524IFS=$as_save_IFS
9525
9526  ;;
9527esac
9528fi
9529TAIL=$ac_cv_path_TAIL
9530if test -n "$TAIL"; then
9531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9532$as_echo "$TAIL" >&6; }
9533else
9534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9535$as_echo "no" >&6; }
9536fi
9537
9538
9539  test -n "$TAIL" && break
9540done
9541
9542    else
9543      # If it succeeded, then it was overridden by the user. We will use it
9544      # for the tool.
9545
9546      # First remove it from the list of overridden variables, so we can test
9547      # for unknown variables in the end.
9548      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9549
9550      # Check if the provided tool contains a complete path.
9551      tool_specified="$TAIL"
9552      tool_basename="${tool_specified##*/}"
9553      if test "x$tool_basename" = "x$tool_specified"; then
9554        # A command without a complete path is provided, search $PATH.
9555        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
9556$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
9557        # Extract the first word of "$tool_basename", so it can be a program name with args.
9558set dummy $tool_basename; ac_word=$2
9559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9560$as_echo_n "checking for $ac_word... " >&6; }
9561if ${ac_cv_path_TAIL+:} false; then :
9562  $as_echo_n "(cached) " >&6
9563else
9564  case $TAIL in
9565  [\\/]* | ?:[\\/]*)
9566  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9567  ;;
9568  *)
9569  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9570for as_dir in $PATH
9571do
9572  IFS=$as_save_IFS
9573  test -z "$as_dir" && as_dir=.
9574    for ac_exec_ext in '' $ac_executable_extensions; do
9575  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9576    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9577    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9578    break 2
9579  fi
9580done
9581  done
9582IFS=$as_save_IFS
9583
9584  ;;
9585esac
9586fi
9587TAIL=$ac_cv_path_TAIL
9588if test -n "$TAIL"; then
9589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9590$as_echo "$TAIL" >&6; }
9591else
9592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9593$as_echo "no" >&6; }
9594fi
9595
9596
9597        if test "x$TAIL" = x; then
9598          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9599        fi
9600      else
9601        # Otherwise we believe it is a complete path. Use it as it is.
9602        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
9603$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
9604        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
9605$as_echo_n "checking for TAIL... " >&6; }
9606        if test ! -x "$tool_specified"; then
9607          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9608$as_echo "not found" >&6; }
9609          as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
9610        fi
9611        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9612$as_echo "$tool_specified" >&6; }
9613      fi
9614    fi
9615  fi
9616
9617
9618
9619  if test "x$TAIL" = x; then
9620    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
9621  fi
9622
9623
9624
9625
9626
9627  # Publish this variable in the help.
9628
9629
9630  if test "x$TAR" = x; then
9631    # The variable is not set by user, try to locate tool using the code snippet
9632    for ac_prog in tar
9633do
9634  # Extract the first word of "$ac_prog", so it can be a program name with args.
9635set dummy $ac_prog; ac_word=$2
9636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9637$as_echo_n "checking for $ac_word... " >&6; }
9638if ${ac_cv_path_TAR+:} false; then :
9639  $as_echo_n "(cached) " >&6
9640else
9641  case $TAR in
9642  [\\/]* | ?:[\\/]*)
9643  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9644  ;;
9645  *)
9646  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9647for as_dir in $PATH
9648do
9649  IFS=$as_save_IFS
9650  test -z "$as_dir" && as_dir=.
9651    for ac_exec_ext in '' $ac_executable_extensions; do
9652  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9653    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9654    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9655    break 2
9656  fi
9657done
9658  done
9659IFS=$as_save_IFS
9660
9661  ;;
9662esac
9663fi
9664TAR=$ac_cv_path_TAR
9665if test -n "$TAR"; then
9666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9667$as_echo "$TAR" >&6; }
9668else
9669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9670$as_echo "no" >&6; }
9671fi
9672
9673
9674  test -n "$TAR" && break
9675done
9676
9677  else
9678    # The variable is set, but is it from the command line or the environment?
9679
9680    # Try to remove the string !TAR! from our list.
9681    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
9682    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9683      # If it failed, the variable was not from the command line. Ignore it,
9684      # but warn the user (except for BASH, which is always set by the calling BASH).
9685      if test "xTAR" != xBASH; then
9686        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
9687$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
9688      fi
9689      # Try to locate tool using the code snippet
9690      for ac_prog in tar
9691do
9692  # Extract the first word of "$ac_prog", so it can be a program name with args.
9693set dummy $ac_prog; ac_word=$2
9694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9695$as_echo_n "checking for $ac_word... " >&6; }
9696if ${ac_cv_path_TAR+:} false; then :
9697  $as_echo_n "(cached) " >&6
9698else
9699  case $TAR in
9700  [\\/]* | ?:[\\/]*)
9701  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9702  ;;
9703  *)
9704  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9705for as_dir in $PATH
9706do
9707  IFS=$as_save_IFS
9708  test -z "$as_dir" && as_dir=.
9709    for ac_exec_ext in '' $ac_executable_extensions; do
9710  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9711    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9712    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9713    break 2
9714  fi
9715done
9716  done
9717IFS=$as_save_IFS
9718
9719  ;;
9720esac
9721fi
9722TAR=$ac_cv_path_TAR
9723if test -n "$TAR"; then
9724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9725$as_echo "$TAR" >&6; }
9726else
9727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9728$as_echo "no" >&6; }
9729fi
9730
9731
9732  test -n "$TAR" && break
9733done
9734
9735    else
9736      # If it succeeded, then it was overridden by the user. We will use it
9737      # for the tool.
9738
9739      # First remove it from the list of overridden variables, so we can test
9740      # for unknown variables in the end.
9741      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9742
9743      # Check if the provided tool contains a complete path.
9744      tool_specified="$TAR"
9745      tool_basename="${tool_specified##*/}"
9746      if test "x$tool_basename" = "x$tool_specified"; then
9747        # A command without a complete path is provided, search $PATH.
9748        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
9749$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
9750        # Extract the first word of "$tool_basename", so it can be a program name with args.
9751set dummy $tool_basename; ac_word=$2
9752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9753$as_echo_n "checking for $ac_word... " >&6; }
9754if ${ac_cv_path_TAR+:} false; then :
9755  $as_echo_n "(cached) " >&6
9756else
9757  case $TAR in
9758  [\\/]* | ?:[\\/]*)
9759  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9760  ;;
9761  *)
9762  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9763for as_dir in $PATH
9764do
9765  IFS=$as_save_IFS
9766  test -z "$as_dir" && as_dir=.
9767    for ac_exec_ext in '' $ac_executable_extensions; do
9768  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9769    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9770    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9771    break 2
9772  fi
9773done
9774  done
9775IFS=$as_save_IFS
9776
9777  ;;
9778esac
9779fi
9780TAR=$ac_cv_path_TAR
9781if test -n "$TAR"; then
9782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9783$as_echo "$TAR" >&6; }
9784else
9785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9786$as_echo "no" >&6; }
9787fi
9788
9789
9790        if test "x$TAR" = x; then
9791          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9792        fi
9793      else
9794        # Otherwise we believe it is a complete path. Use it as it is.
9795        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
9796$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
9797        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9798$as_echo_n "checking for TAR... " >&6; }
9799        if test ! -x "$tool_specified"; then
9800          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9801$as_echo "not found" >&6; }
9802          as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
9803        fi
9804        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9805$as_echo "$tool_specified" >&6; }
9806      fi
9807    fi
9808  fi
9809
9810
9811
9812  if test "x$TAR" = x; then
9813    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
9814  fi
9815
9816
9817
9818
9819
9820  # Publish this variable in the help.
9821
9822
9823  if test "x$TEE" = x; then
9824    # The variable is not set by user, try to locate tool using the code snippet
9825    for ac_prog in tee
9826do
9827  # Extract the first word of "$ac_prog", so it can be a program name with args.
9828set dummy $ac_prog; ac_word=$2
9829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9830$as_echo_n "checking for $ac_word... " >&6; }
9831if ${ac_cv_path_TEE+:} false; then :
9832  $as_echo_n "(cached) " >&6
9833else
9834  case $TEE in
9835  [\\/]* | ?:[\\/]*)
9836  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9837  ;;
9838  *)
9839  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9840for as_dir in $PATH
9841do
9842  IFS=$as_save_IFS
9843  test -z "$as_dir" && as_dir=.
9844    for ac_exec_ext in '' $ac_executable_extensions; do
9845  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9846    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9847    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9848    break 2
9849  fi
9850done
9851  done
9852IFS=$as_save_IFS
9853
9854  ;;
9855esac
9856fi
9857TEE=$ac_cv_path_TEE
9858if test -n "$TEE"; then
9859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9860$as_echo "$TEE" >&6; }
9861else
9862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9863$as_echo "no" >&6; }
9864fi
9865
9866
9867  test -n "$TEE" && break
9868done
9869
9870  else
9871    # The variable is set, but is it from the command line or the environment?
9872
9873    # Try to remove the string !TEE! from our list.
9874    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
9875    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9876      # If it failed, the variable was not from the command line. Ignore it,
9877      # but warn the user (except for BASH, which is always set by the calling BASH).
9878      if test "xTEE" != xBASH; then
9879        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
9880$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
9881      fi
9882      # Try to locate tool using the code snippet
9883      for ac_prog in tee
9884do
9885  # Extract the first word of "$ac_prog", so it can be a program name with args.
9886set dummy $ac_prog; ac_word=$2
9887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9888$as_echo_n "checking for $ac_word... " >&6; }
9889if ${ac_cv_path_TEE+:} false; then :
9890  $as_echo_n "(cached) " >&6
9891else
9892  case $TEE in
9893  [\\/]* | ?:[\\/]*)
9894  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9895  ;;
9896  *)
9897  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9898for as_dir in $PATH
9899do
9900  IFS=$as_save_IFS
9901  test -z "$as_dir" && as_dir=.
9902    for ac_exec_ext in '' $ac_executable_extensions; do
9903  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9904    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9905    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9906    break 2
9907  fi
9908done
9909  done
9910IFS=$as_save_IFS
9911
9912  ;;
9913esac
9914fi
9915TEE=$ac_cv_path_TEE
9916if test -n "$TEE"; then
9917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9918$as_echo "$TEE" >&6; }
9919else
9920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9921$as_echo "no" >&6; }
9922fi
9923
9924
9925  test -n "$TEE" && break
9926done
9927
9928    else
9929      # If it succeeded, then it was overridden by the user. We will use it
9930      # for the tool.
9931
9932      # First remove it from the list of overridden variables, so we can test
9933      # for unknown variables in the end.
9934      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9935
9936      # Check if the provided tool contains a complete path.
9937      tool_specified="$TEE"
9938      tool_basename="${tool_specified##*/}"
9939      if test "x$tool_basename" = "x$tool_specified"; then
9940        # A command without a complete path is provided, search $PATH.
9941        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
9942$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
9943        # Extract the first word of "$tool_basename", so it can be a program name with args.
9944set dummy $tool_basename; ac_word=$2
9945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9946$as_echo_n "checking for $ac_word... " >&6; }
9947if ${ac_cv_path_TEE+:} false; then :
9948  $as_echo_n "(cached) " >&6
9949else
9950  case $TEE in
9951  [\\/]* | ?:[\\/]*)
9952  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9953  ;;
9954  *)
9955  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9956for as_dir in $PATH
9957do
9958  IFS=$as_save_IFS
9959  test -z "$as_dir" && as_dir=.
9960    for ac_exec_ext in '' $ac_executable_extensions; do
9961  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9962    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9963    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9964    break 2
9965  fi
9966done
9967  done
9968IFS=$as_save_IFS
9969
9970  ;;
9971esac
9972fi
9973TEE=$ac_cv_path_TEE
9974if test -n "$TEE"; then
9975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9976$as_echo "$TEE" >&6; }
9977else
9978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9979$as_echo "no" >&6; }
9980fi
9981
9982
9983        if test "x$TEE" = x; then
9984          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9985        fi
9986      else
9987        # Otherwise we believe it is a complete path. Use it as it is.
9988        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
9989$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
9990        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
9991$as_echo_n "checking for TEE... " >&6; }
9992        if test ! -x "$tool_specified"; then
9993          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9994$as_echo "not found" >&6; }
9995          as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
9996        fi
9997        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9998$as_echo "$tool_specified" >&6; }
9999      fi
10000    fi
10001  fi
10002
10003
10004
10005  if test "x$TEE" = x; then
10006    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
10007  fi
10008
10009
10010
10011
10012
10013  # Publish this variable in the help.
10014
10015
10016  if test "x$TOUCH" = x; then
10017    # The variable is not set by user, try to locate tool using the code snippet
10018    for ac_prog in touch
10019do
10020  # Extract the first word of "$ac_prog", so it can be a program name with args.
10021set dummy $ac_prog; ac_word=$2
10022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10023$as_echo_n "checking for $ac_word... " >&6; }
10024if ${ac_cv_path_TOUCH+:} false; then :
10025  $as_echo_n "(cached) " >&6
10026else
10027  case $TOUCH in
10028  [\\/]* | ?:[\\/]*)
10029  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10030  ;;
10031  *)
10032  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10033for as_dir in $PATH
10034do
10035  IFS=$as_save_IFS
10036  test -z "$as_dir" && as_dir=.
10037    for ac_exec_ext in '' $ac_executable_extensions; do
10038  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10039    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10040    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10041    break 2
10042  fi
10043done
10044  done
10045IFS=$as_save_IFS
10046
10047  ;;
10048esac
10049fi
10050TOUCH=$ac_cv_path_TOUCH
10051if test -n "$TOUCH"; then
10052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10053$as_echo "$TOUCH" >&6; }
10054else
10055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10056$as_echo "no" >&6; }
10057fi
10058
10059
10060  test -n "$TOUCH" && break
10061done
10062
10063  else
10064    # The variable is set, but is it from the command line or the environment?
10065
10066    # Try to remove the string !TOUCH! from our list.
10067    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
10068    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10069      # If it failed, the variable was not from the command line. Ignore it,
10070      # but warn the user (except for BASH, which is always set by the calling BASH).
10071      if test "xTOUCH" != xBASH; then
10072        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
10073$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
10074      fi
10075      # Try to locate tool using the code snippet
10076      for ac_prog in touch
10077do
10078  # Extract the first word of "$ac_prog", so it can be a program name with args.
10079set dummy $ac_prog; ac_word=$2
10080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10081$as_echo_n "checking for $ac_word... " >&6; }
10082if ${ac_cv_path_TOUCH+:} false; then :
10083  $as_echo_n "(cached) " >&6
10084else
10085  case $TOUCH in
10086  [\\/]* | ?:[\\/]*)
10087  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10088  ;;
10089  *)
10090  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10091for as_dir in $PATH
10092do
10093  IFS=$as_save_IFS
10094  test -z "$as_dir" && as_dir=.
10095    for ac_exec_ext in '' $ac_executable_extensions; do
10096  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10097    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10098    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10099    break 2
10100  fi
10101done
10102  done
10103IFS=$as_save_IFS
10104
10105  ;;
10106esac
10107fi
10108TOUCH=$ac_cv_path_TOUCH
10109if test -n "$TOUCH"; then
10110  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10111$as_echo "$TOUCH" >&6; }
10112else
10113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10114$as_echo "no" >&6; }
10115fi
10116
10117
10118  test -n "$TOUCH" && break
10119done
10120
10121    else
10122      # If it succeeded, then it was overridden by the user. We will use it
10123      # for the tool.
10124
10125      # First remove it from the list of overridden variables, so we can test
10126      # for unknown variables in the end.
10127      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10128
10129      # Check if the provided tool contains a complete path.
10130      tool_specified="$TOUCH"
10131      tool_basename="${tool_specified##*/}"
10132      if test "x$tool_basename" = "x$tool_specified"; then
10133        # A command without a complete path is provided, search $PATH.
10134        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
10135$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
10136        # Extract the first word of "$tool_basename", so it can be a program name with args.
10137set dummy $tool_basename; ac_word=$2
10138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10139$as_echo_n "checking for $ac_word... " >&6; }
10140if ${ac_cv_path_TOUCH+:} false; then :
10141  $as_echo_n "(cached) " >&6
10142else
10143  case $TOUCH in
10144  [\\/]* | ?:[\\/]*)
10145  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10146  ;;
10147  *)
10148  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10149for as_dir in $PATH
10150do
10151  IFS=$as_save_IFS
10152  test -z "$as_dir" && as_dir=.
10153    for ac_exec_ext in '' $ac_executable_extensions; do
10154  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10155    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10156    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10157    break 2
10158  fi
10159done
10160  done
10161IFS=$as_save_IFS
10162
10163  ;;
10164esac
10165fi
10166TOUCH=$ac_cv_path_TOUCH
10167if test -n "$TOUCH"; then
10168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10169$as_echo "$TOUCH" >&6; }
10170else
10171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10172$as_echo "no" >&6; }
10173fi
10174
10175
10176        if test "x$TOUCH" = x; then
10177          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10178        fi
10179      else
10180        # Otherwise we believe it is a complete path. Use it as it is.
10181        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
10182$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
10183        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10184$as_echo_n "checking for TOUCH... " >&6; }
10185        if test ! -x "$tool_specified"; then
10186          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10187$as_echo "not found" >&6; }
10188          as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
10189        fi
10190        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10191$as_echo "$tool_specified" >&6; }
10192      fi
10193    fi
10194  fi
10195
10196
10197
10198  if test "x$TOUCH" = x; then
10199    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
10200  fi
10201
10202
10203
10204
10205
10206  # Publish this variable in the help.
10207
10208
10209  if test "x$TR" = x; then
10210    # The variable is not set by user, try to locate tool using the code snippet
10211    for ac_prog in tr
10212do
10213  # Extract the first word of "$ac_prog", so it can be a program name with args.
10214set dummy $ac_prog; ac_word=$2
10215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10216$as_echo_n "checking for $ac_word... " >&6; }
10217if ${ac_cv_path_TR+:} false; then :
10218  $as_echo_n "(cached) " >&6
10219else
10220  case $TR in
10221  [\\/]* | ?:[\\/]*)
10222  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10223  ;;
10224  *)
10225  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10226for as_dir in $PATH
10227do
10228  IFS=$as_save_IFS
10229  test -z "$as_dir" && as_dir=.
10230    for ac_exec_ext in '' $ac_executable_extensions; do
10231  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10232    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10233    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10234    break 2
10235  fi
10236done
10237  done
10238IFS=$as_save_IFS
10239
10240  ;;
10241esac
10242fi
10243TR=$ac_cv_path_TR
10244if test -n "$TR"; then
10245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10246$as_echo "$TR" >&6; }
10247else
10248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10249$as_echo "no" >&6; }
10250fi
10251
10252
10253  test -n "$TR" && break
10254done
10255
10256  else
10257    # The variable is set, but is it from the command line or the environment?
10258
10259    # Try to remove the string !TR! from our list.
10260    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
10261    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10262      # If it failed, the variable was not from the command line. Ignore it,
10263      # but warn the user (except for BASH, which is always set by the calling BASH).
10264      if test "xTR" != xBASH; then
10265        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
10266$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
10267      fi
10268      # Try to locate tool using the code snippet
10269      for ac_prog in tr
10270do
10271  # Extract the first word of "$ac_prog", so it can be a program name with args.
10272set dummy $ac_prog; ac_word=$2
10273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10274$as_echo_n "checking for $ac_word... " >&6; }
10275if ${ac_cv_path_TR+:} false; then :
10276  $as_echo_n "(cached) " >&6
10277else
10278  case $TR in
10279  [\\/]* | ?:[\\/]*)
10280  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10281  ;;
10282  *)
10283  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10284for as_dir in $PATH
10285do
10286  IFS=$as_save_IFS
10287  test -z "$as_dir" && as_dir=.
10288    for ac_exec_ext in '' $ac_executable_extensions; do
10289  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10290    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10291    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10292    break 2
10293  fi
10294done
10295  done
10296IFS=$as_save_IFS
10297
10298  ;;
10299esac
10300fi
10301TR=$ac_cv_path_TR
10302if test -n "$TR"; then
10303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10304$as_echo "$TR" >&6; }
10305else
10306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10307$as_echo "no" >&6; }
10308fi
10309
10310
10311  test -n "$TR" && break
10312done
10313
10314    else
10315      # If it succeeded, then it was overridden by the user. We will use it
10316      # for the tool.
10317
10318      # First remove it from the list of overridden variables, so we can test
10319      # for unknown variables in the end.
10320      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10321
10322      # Check if the provided tool contains a complete path.
10323      tool_specified="$TR"
10324      tool_basename="${tool_specified##*/}"
10325      if test "x$tool_basename" = "x$tool_specified"; then
10326        # A command without a complete path is provided, search $PATH.
10327        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
10328$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
10329        # Extract the first word of "$tool_basename", so it can be a program name with args.
10330set dummy $tool_basename; ac_word=$2
10331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10332$as_echo_n "checking for $ac_word... " >&6; }
10333if ${ac_cv_path_TR+:} false; then :
10334  $as_echo_n "(cached) " >&6
10335else
10336  case $TR in
10337  [\\/]* | ?:[\\/]*)
10338  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10339  ;;
10340  *)
10341  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10342for as_dir in $PATH
10343do
10344  IFS=$as_save_IFS
10345  test -z "$as_dir" && as_dir=.
10346    for ac_exec_ext in '' $ac_executable_extensions; do
10347  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10348    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10349    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10350    break 2
10351  fi
10352done
10353  done
10354IFS=$as_save_IFS
10355
10356  ;;
10357esac
10358fi
10359TR=$ac_cv_path_TR
10360if test -n "$TR"; then
10361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10362$as_echo "$TR" >&6; }
10363else
10364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10365$as_echo "no" >&6; }
10366fi
10367
10368
10369        if test "x$TR" = x; then
10370          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10371        fi
10372      else
10373        # Otherwise we believe it is a complete path. Use it as it is.
10374        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
10375$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
10376        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
10377$as_echo_n "checking for TR... " >&6; }
10378        if test ! -x "$tool_specified"; then
10379          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10380$as_echo "not found" >&6; }
10381          as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
10382        fi
10383        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10384$as_echo "$tool_specified" >&6; }
10385      fi
10386    fi
10387  fi
10388
10389
10390
10391  if test "x$TR" = x; then
10392    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
10393  fi
10394
10395
10396
10397
10398
10399  # Publish this variable in the help.
10400
10401
10402  if test "x$UNAME" = x; then
10403    # The variable is not set by user, try to locate tool using the code snippet
10404    for ac_prog in uname
10405do
10406  # Extract the first word of "$ac_prog", so it can be a program name with args.
10407set dummy $ac_prog; ac_word=$2
10408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10409$as_echo_n "checking for $ac_word... " >&6; }
10410if ${ac_cv_path_UNAME+:} false; then :
10411  $as_echo_n "(cached) " >&6
10412else
10413  case $UNAME in
10414  [\\/]* | ?:[\\/]*)
10415  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10416  ;;
10417  *)
10418  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10419for as_dir in $PATH
10420do
10421  IFS=$as_save_IFS
10422  test -z "$as_dir" && as_dir=.
10423    for ac_exec_ext in '' $ac_executable_extensions; do
10424  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10425    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10426    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10427    break 2
10428  fi
10429done
10430  done
10431IFS=$as_save_IFS
10432
10433  ;;
10434esac
10435fi
10436UNAME=$ac_cv_path_UNAME
10437if test -n "$UNAME"; then
10438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10439$as_echo "$UNAME" >&6; }
10440else
10441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10442$as_echo "no" >&6; }
10443fi
10444
10445
10446  test -n "$UNAME" && break
10447done
10448
10449  else
10450    # The variable is set, but is it from the command line or the environment?
10451
10452    # Try to remove the string !UNAME! from our list.
10453    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
10454    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10455      # If it failed, the variable was not from the command line. Ignore it,
10456      # but warn the user (except for BASH, which is always set by the calling BASH).
10457      if test "xUNAME" != xBASH; then
10458        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
10459$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
10460      fi
10461      # Try to locate tool using the code snippet
10462      for ac_prog in uname
10463do
10464  # Extract the first word of "$ac_prog", so it can be a program name with args.
10465set dummy $ac_prog; ac_word=$2
10466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10467$as_echo_n "checking for $ac_word... " >&6; }
10468if ${ac_cv_path_UNAME+:} false; then :
10469  $as_echo_n "(cached) " >&6
10470else
10471  case $UNAME in
10472  [\\/]* | ?:[\\/]*)
10473  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10474  ;;
10475  *)
10476  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10477for as_dir in $PATH
10478do
10479  IFS=$as_save_IFS
10480  test -z "$as_dir" && as_dir=.
10481    for ac_exec_ext in '' $ac_executable_extensions; do
10482  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10483    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10484    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10485    break 2
10486  fi
10487done
10488  done
10489IFS=$as_save_IFS
10490
10491  ;;
10492esac
10493fi
10494UNAME=$ac_cv_path_UNAME
10495if test -n "$UNAME"; then
10496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10497$as_echo "$UNAME" >&6; }
10498else
10499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10500$as_echo "no" >&6; }
10501fi
10502
10503
10504  test -n "$UNAME" && break
10505done
10506
10507    else
10508      # If it succeeded, then it was overridden by the user. We will use it
10509      # for the tool.
10510
10511      # First remove it from the list of overridden variables, so we can test
10512      # for unknown variables in the end.
10513      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10514
10515      # Check if the provided tool contains a complete path.
10516      tool_specified="$UNAME"
10517      tool_basename="${tool_specified##*/}"
10518      if test "x$tool_basename" = "x$tool_specified"; then
10519        # A command without a complete path is provided, search $PATH.
10520        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
10521$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
10522        # Extract the first word of "$tool_basename", so it can be a program name with args.
10523set dummy $tool_basename; ac_word=$2
10524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10525$as_echo_n "checking for $ac_word... " >&6; }
10526if ${ac_cv_path_UNAME+:} false; then :
10527  $as_echo_n "(cached) " >&6
10528else
10529  case $UNAME in
10530  [\\/]* | ?:[\\/]*)
10531  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10532  ;;
10533  *)
10534  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10535for as_dir in $PATH
10536do
10537  IFS=$as_save_IFS
10538  test -z "$as_dir" && as_dir=.
10539    for ac_exec_ext in '' $ac_executable_extensions; do
10540  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10541    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10542    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10543    break 2
10544  fi
10545done
10546  done
10547IFS=$as_save_IFS
10548
10549  ;;
10550esac
10551fi
10552UNAME=$ac_cv_path_UNAME
10553if test -n "$UNAME"; then
10554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10555$as_echo "$UNAME" >&6; }
10556else
10557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10558$as_echo "no" >&6; }
10559fi
10560
10561
10562        if test "x$UNAME" = x; then
10563          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10564        fi
10565      else
10566        # Otherwise we believe it is a complete path. Use it as it is.
10567        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
10568$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
10569        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
10570$as_echo_n "checking for UNAME... " >&6; }
10571        if test ! -x "$tool_specified"; then
10572          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10573$as_echo "not found" >&6; }
10574          as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
10575        fi
10576        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10577$as_echo "$tool_specified" >&6; }
10578      fi
10579    fi
10580  fi
10581
10582
10583
10584  if test "x$UNAME" = x; then
10585    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
10586  fi
10587
10588
10589
10590
10591
10592  # Publish this variable in the help.
10593
10594
10595  if test "x$UNIQ" = x; then
10596    # The variable is not set by user, try to locate tool using the code snippet
10597    for ac_prog in uniq
10598do
10599  # Extract the first word of "$ac_prog", so it can be a program name with args.
10600set dummy $ac_prog; ac_word=$2
10601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10602$as_echo_n "checking for $ac_word... " >&6; }
10603if ${ac_cv_path_UNIQ+:} false; then :
10604  $as_echo_n "(cached) " >&6
10605else
10606  case $UNIQ in
10607  [\\/]* | ?:[\\/]*)
10608  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10609  ;;
10610  *)
10611  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10612for as_dir in $PATH
10613do
10614  IFS=$as_save_IFS
10615  test -z "$as_dir" && as_dir=.
10616    for ac_exec_ext in '' $ac_executable_extensions; do
10617  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10618    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10619    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10620    break 2
10621  fi
10622done
10623  done
10624IFS=$as_save_IFS
10625
10626  ;;
10627esac
10628fi
10629UNIQ=$ac_cv_path_UNIQ
10630if test -n "$UNIQ"; then
10631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10632$as_echo "$UNIQ" >&6; }
10633else
10634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10635$as_echo "no" >&6; }
10636fi
10637
10638
10639  test -n "$UNIQ" && break
10640done
10641
10642  else
10643    # The variable is set, but is it from the command line or the environment?
10644
10645    # Try to remove the string !UNIQ! from our list.
10646    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
10647    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10648      # If it failed, the variable was not from the command line. Ignore it,
10649      # but warn the user (except for BASH, which is always set by the calling BASH).
10650      if test "xUNIQ" != xBASH; then
10651        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
10652$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
10653      fi
10654      # Try to locate tool using the code snippet
10655      for ac_prog in uniq
10656do
10657  # Extract the first word of "$ac_prog", so it can be a program name with args.
10658set dummy $ac_prog; ac_word=$2
10659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10660$as_echo_n "checking for $ac_word... " >&6; }
10661if ${ac_cv_path_UNIQ+:} false; then :
10662  $as_echo_n "(cached) " >&6
10663else
10664  case $UNIQ in
10665  [\\/]* | ?:[\\/]*)
10666  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10667  ;;
10668  *)
10669  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10670for as_dir in $PATH
10671do
10672  IFS=$as_save_IFS
10673  test -z "$as_dir" && as_dir=.
10674    for ac_exec_ext in '' $ac_executable_extensions; do
10675  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10676    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10677    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10678    break 2
10679  fi
10680done
10681  done
10682IFS=$as_save_IFS
10683
10684  ;;
10685esac
10686fi
10687UNIQ=$ac_cv_path_UNIQ
10688if test -n "$UNIQ"; then
10689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10690$as_echo "$UNIQ" >&6; }
10691else
10692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10693$as_echo "no" >&6; }
10694fi
10695
10696
10697  test -n "$UNIQ" && break
10698done
10699
10700    else
10701      # If it succeeded, then it was overridden by the user. We will use it
10702      # for the tool.
10703
10704      # First remove it from the list of overridden variables, so we can test
10705      # for unknown variables in the end.
10706      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10707
10708      # Check if the provided tool contains a complete path.
10709      tool_specified="$UNIQ"
10710      tool_basename="${tool_specified##*/}"
10711      if test "x$tool_basename" = "x$tool_specified"; then
10712        # A command without a complete path is provided, search $PATH.
10713        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
10714$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
10715        # Extract the first word of "$tool_basename", so it can be a program name with args.
10716set dummy $tool_basename; ac_word=$2
10717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10718$as_echo_n "checking for $ac_word... " >&6; }
10719if ${ac_cv_path_UNIQ+:} false; then :
10720  $as_echo_n "(cached) " >&6
10721else
10722  case $UNIQ in
10723  [\\/]* | ?:[\\/]*)
10724  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10725  ;;
10726  *)
10727  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10728for as_dir in $PATH
10729do
10730  IFS=$as_save_IFS
10731  test -z "$as_dir" && as_dir=.
10732    for ac_exec_ext in '' $ac_executable_extensions; do
10733  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10734    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10735    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10736    break 2
10737  fi
10738done
10739  done
10740IFS=$as_save_IFS
10741
10742  ;;
10743esac
10744fi
10745UNIQ=$ac_cv_path_UNIQ
10746if test -n "$UNIQ"; then
10747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10748$as_echo "$UNIQ" >&6; }
10749else
10750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10751$as_echo "no" >&6; }
10752fi
10753
10754
10755        if test "x$UNIQ" = x; then
10756          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10757        fi
10758      else
10759        # Otherwise we believe it is a complete path. Use it as it is.
10760        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
10761$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
10762        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
10763$as_echo_n "checking for UNIQ... " >&6; }
10764        if test ! -x "$tool_specified"; then
10765          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10766$as_echo "not found" >&6; }
10767          as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
10768        fi
10769        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10770$as_echo "$tool_specified" >&6; }
10771      fi
10772    fi
10773  fi
10774
10775
10776
10777  if test "x$UNIQ" = x; then
10778    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
10779  fi
10780
10781
10782
10783
10784
10785  # Publish this variable in the help.
10786
10787
10788  if test "x$WC" = x; then
10789    # The variable is not set by user, try to locate tool using the code snippet
10790    for ac_prog in wc
10791do
10792  # Extract the first word of "$ac_prog", so it can be a program name with args.
10793set dummy $ac_prog; ac_word=$2
10794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10795$as_echo_n "checking for $ac_word... " >&6; }
10796if ${ac_cv_path_WC+:} false; then :
10797  $as_echo_n "(cached) " >&6
10798else
10799  case $WC in
10800  [\\/]* | ?:[\\/]*)
10801  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10802  ;;
10803  *)
10804  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10805for as_dir in $PATH
10806do
10807  IFS=$as_save_IFS
10808  test -z "$as_dir" && as_dir=.
10809    for ac_exec_ext in '' $ac_executable_extensions; do
10810  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10811    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10812    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10813    break 2
10814  fi
10815done
10816  done
10817IFS=$as_save_IFS
10818
10819  ;;
10820esac
10821fi
10822WC=$ac_cv_path_WC
10823if test -n "$WC"; then
10824  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10825$as_echo "$WC" >&6; }
10826else
10827  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10828$as_echo "no" >&6; }
10829fi
10830
10831
10832  test -n "$WC" && break
10833done
10834
10835  else
10836    # The variable is set, but is it from the command line or the environment?
10837
10838    # Try to remove the string !WC! from our list.
10839    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
10840    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10841      # If it failed, the variable was not from the command line. Ignore it,
10842      # but warn the user (except for BASH, which is always set by the calling BASH).
10843      if test "xWC" != xBASH; then
10844        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
10845$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
10846      fi
10847      # Try to locate tool using the code snippet
10848      for ac_prog in wc
10849do
10850  # Extract the first word of "$ac_prog", so it can be a program name with args.
10851set dummy $ac_prog; ac_word=$2
10852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10853$as_echo_n "checking for $ac_word... " >&6; }
10854if ${ac_cv_path_WC+:} false; then :
10855  $as_echo_n "(cached) " >&6
10856else
10857  case $WC in
10858  [\\/]* | ?:[\\/]*)
10859  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10860  ;;
10861  *)
10862  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10863for as_dir in $PATH
10864do
10865  IFS=$as_save_IFS
10866  test -z "$as_dir" && as_dir=.
10867    for ac_exec_ext in '' $ac_executable_extensions; do
10868  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10869    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10870    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10871    break 2
10872  fi
10873done
10874  done
10875IFS=$as_save_IFS
10876
10877  ;;
10878esac
10879fi
10880WC=$ac_cv_path_WC
10881if test -n "$WC"; then
10882  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10883$as_echo "$WC" >&6; }
10884else
10885  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10886$as_echo "no" >&6; }
10887fi
10888
10889
10890  test -n "$WC" && break
10891done
10892
10893    else
10894      # If it succeeded, then it was overridden by the user. We will use it
10895      # for the tool.
10896
10897      # First remove it from the list of overridden variables, so we can test
10898      # for unknown variables in the end.
10899      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10900
10901      # Check if the provided tool contains a complete path.
10902      tool_specified="$WC"
10903      tool_basename="${tool_specified##*/}"
10904      if test "x$tool_basename" = "x$tool_specified"; then
10905        # A command without a complete path is provided, search $PATH.
10906        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
10907$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
10908        # Extract the first word of "$tool_basename", so it can be a program name with args.
10909set dummy $tool_basename; ac_word=$2
10910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10911$as_echo_n "checking for $ac_word... " >&6; }
10912if ${ac_cv_path_WC+:} false; then :
10913  $as_echo_n "(cached) " >&6
10914else
10915  case $WC in
10916  [\\/]* | ?:[\\/]*)
10917  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10918  ;;
10919  *)
10920  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10921for as_dir in $PATH
10922do
10923  IFS=$as_save_IFS
10924  test -z "$as_dir" && as_dir=.
10925    for ac_exec_ext in '' $ac_executable_extensions; do
10926  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10927    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10928    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10929    break 2
10930  fi
10931done
10932  done
10933IFS=$as_save_IFS
10934
10935  ;;
10936esac
10937fi
10938WC=$ac_cv_path_WC
10939if test -n "$WC"; then
10940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10941$as_echo "$WC" >&6; }
10942else
10943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10944$as_echo "no" >&6; }
10945fi
10946
10947
10948        if test "x$WC" = x; then
10949          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10950        fi
10951      else
10952        # Otherwise we believe it is a complete path. Use it as it is.
10953        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
10954$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
10955        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
10956$as_echo_n "checking for WC... " >&6; }
10957        if test ! -x "$tool_specified"; then
10958          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10959$as_echo "not found" >&6; }
10960          as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
10961        fi
10962        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10963$as_echo "$tool_specified" >&6; }
10964      fi
10965    fi
10966  fi
10967
10968
10969
10970  if test "x$WC" = x; then
10971    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
10972  fi
10973
10974
10975
10976
10977
10978  # Publish this variable in the help.
10979
10980
10981  if test "x$WHICH" = x; then
10982    # The variable is not set by user, try to locate tool using the code snippet
10983    for ac_prog in which
10984do
10985  # Extract the first word of "$ac_prog", so it can be a program name with args.
10986set dummy $ac_prog; ac_word=$2
10987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10988$as_echo_n "checking for $ac_word... " >&6; }
10989if ${ac_cv_path_WHICH+:} false; then :
10990  $as_echo_n "(cached) " >&6
10991else
10992  case $WHICH in
10993  [\\/]* | ?:[\\/]*)
10994  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
10995  ;;
10996  *)
10997  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10998for as_dir in $PATH
10999do
11000  IFS=$as_save_IFS
11001  test -z "$as_dir" && as_dir=.
11002    for ac_exec_ext in '' $ac_executable_extensions; do
11003  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11004    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11005    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11006    break 2
11007  fi
11008done
11009  done
11010IFS=$as_save_IFS
11011
11012  ;;
11013esac
11014fi
11015WHICH=$ac_cv_path_WHICH
11016if test -n "$WHICH"; then
11017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11018$as_echo "$WHICH" >&6; }
11019else
11020  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11021$as_echo "no" >&6; }
11022fi
11023
11024
11025  test -n "$WHICH" && break
11026done
11027
11028  else
11029    # The variable is set, but is it from the command line or the environment?
11030
11031    # Try to remove the string !WHICH! from our list.
11032    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
11033    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11034      # If it failed, the variable was not from the command line. Ignore it,
11035      # but warn the user (except for BASH, which is always set by the calling BASH).
11036      if test "xWHICH" != xBASH; then
11037        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
11038$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
11039      fi
11040      # Try to locate tool using the code snippet
11041      for ac_prog in which
11042do
11043  # Extract the first word of "$ac_prog", so it can be a program name with args.
11044set dummy $ac_prog; ac_word=$2
11045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11046$as_echo_n "checking for $ac_word... " >&6; }
11047if ${ac_cv_path_WHICH+:} false; then :
11048  $as_echo_n "(cached) " >&6
11049else
11050  case $WHICH in
11051  [\\/]* | ?:[\\/]*)
11052  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11053  ;;
11054  *)
11055  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11056for as_dir in $PATH
11057do
11058  IFS=$as_save_IFS
11059  test -z "$as_dir" && as_dir=.
11060    for ac_exec_ext in '' $ac_executable_extensions; do
11061  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11062    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11063    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11064    break 2
11065  fi
11066done
11067  done
11068IFS=$as_save_IFS
11069
11070  ;;
11071esac
11072fi
11073WHICH=$ac_cv_path_WHICH
11074if test -n "$WHICH"; then
11075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11076$as_echo "$WHICH" >&6; }
11077else
11078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11079$as_echo "no" >&6; }
11080fi
11081
11082
11083  test -n "$WHICH" && break
11084done
11085
11086    else
11087      # If it succeeded, then it was overridden by the user. We will use it
11088      # for the tool.
11089
11090      # First remove it from the list of overridden variables, so we can test
11091      # for unknown variables in the end.
11092      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11093
11094      # Check if the provided tool contains a complete path.
11095      tool_specified="$WHICH"
11096      tool_basename="${tool_specified##*/}"
11097      if test "x$tool_basename" = "x$tool_specified"; then
11098        # A command without a complete path is provided, search $PATH.
11099        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
11100$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
11101        # Extract the first word of "$tool_basename", so it can be a program name with args.
11102set dummy $tool_basename; ac_word=$2
11103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11104$as_echo_n "checking for $ac_word... " >&6; }
11105if ${ac_cv_path_WHICH+:} false; then :
11106  $as_echo_n "(cached) " >&6
11107else
11108  case $WHICH in
11109  [\\/]* | ?:[\\/]*)
11110  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11111  ;;
11112  *)
11113  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11114for as_dir in $PATH
11115do
11116  IFS=$as_save_IFS
11117  test -z "$as_dir" && as_dir=.
11118    for ac_exec_ext in '' $ac_executable_extensions; do
11119  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11120    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11121    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11122    break 2
11123  fi
11124done
11125  done
11126IFS=$as_save_IFS
11127
11128  ;;
11129esac
11130fi
11131WHICH=$ac_cv_path_WHICH
11132if test -n "$WHICH"; then
11133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11134$as_echo "$WHICH" >&6; }
11135else
11136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11137$as_echo "no" >&6; }
11138fi
11139
11140
11141        if test "x$WHICH" = x; then
11142          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11143        fi
11144      else
11145        # Otherwise we believe it is a complete path. Use it as it is.
11146        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
11147$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
11148        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11149$as_echo_n "checking for WHICH... " >&6; }
11150        if test ! -x "$tool_specified"; then
11151          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11152$as_echo "not found" >&6; }
11153          as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
11154        fi
11155        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11156$as_echo "$tool_specified" >&6; }
11157      fi
11158    fi
11159  fi
11160
11161
11162
11163  if test "x$WHICH" = x; then
11164    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
11165  fi
11166
11167
11168
11169
11170
11171  # Publish this variable in the help.
11172
11173
11174  if test "x$XARGS" = x; then
11175    # The variable is not set by user, try to locate tool using the code snippet
11176    for ac_prog in xargs
11177do
11178  # Extract the first word of "$ac_prog", so it can be a program name with args.
11179set dummy $ac_prog; ac_word=$2
11180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11181$as_echo_n "checking for $ac_word... " >&6; }
11182if ${ac_cv_path_XARGS+:} false; then :
11183  $as_echo_n "(cached) " >&6
11184else
11185  case $XARGS in
11186  [\\/]* | ?:[\\/]*)
11187  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11188  ;;
11189  *)
11190  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11191for as_dir in $PATH
11192do
11193  IFS=$as_save_IFS
11194  test -z "$as_dir" && as_dir=.
11195    for ac_exec_ext in '' $ac_executable_extensions; do
11196  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11197    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11198    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11199    break 2
11200  fi
11201done
11202  done
11203IFS=$as_save_IFS
11204
11205  ;;
11206esac
11207fi
11208XARGS=$ac_cv_path_XARGS
11209if test -n "$XARGS"; then
11210  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11211$as_echo "$XARGS" >&6; }
11212else
11213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11214$as_echo "no" >&6; }
11215fi
11216
11217
11218  test -n "$XARGS" && break
11219done
11220
11221  else
11222    # The variable is set, but is it from the command line or the environment?
11223
11224    # Try to remove the string !XARGS! from our list.
11225    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
11226    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11227      # If it failed, the variable was not from the command line. Ignore it,
11228      # but warn the user (except for BASH, which is always set by the calling BASH).
11229      if test "xXARGS" != xBASH; then
11230        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
11231$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
11232      fi
11233      # Try to locate tool using the code snippet
11234      for ac_prog in xargs
11235do
11236  # Extract the first word of "$ac_prog", so it can be a program name with args.
11237set dummy $ac_prog; ac_word=$2
11238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11239$as_echo_n "checking for $ac_word... " >&6; }
11240if ${ac_cv_path_XARGS+:} false; then :
11241  $as_echo_n "(cached) " >&6
11242else
11243  case $XARGS in
11244  [\\/]* | ?:[\\/]*)
11245  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11246  ;;
11247  *)
11248  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11249for as_dir in $PATH
11250do
11251  IFS=$as_save_IFS
11252  test -z "$as_dir" && as_dir=.
11253    for ac_exec_ext in '' $ac_executable_extensions; do
11254  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11255    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11256    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11257    break 2
11258  fi
11259done
11260  done
11261IFS=$as_save_IFS
11262
11263  ;;
11264esac
11265fi
11266XARGS=$ac_cv_path_XARGS
11267if test -n "$XARGS"; then
11268  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11269$as_echo "$XARGS" >&6; }
11270else
11271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11272$as_echo "no" >&6; }
11273fi
11274
11275
11276  test -n "$XARGS" && break
11277done
11278
11279    else
11280      # If it succeeded, then it was overridden by the user. We will use it
11281      # for the tool.
11282
11283      # First remove it from the list of overridden variables, so we can test
11284      # for unknown variables in the end.
11285      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11286
11287      # Check if the provided tool contains a complete path.
11288      tool_specified="$XARGS"
11289      tool_basename="${tool_specified##*/}"
11290      if test "x$tool_basename" = "x$tool_specified"; then
11291        # A command without a complete path is provided, search $PATH.
11292        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
11293$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
11294        # Extract the first word of "$tool_basename", so it can be a program name with args.
11295set dummy $tool_basename; ac_word=$2
11296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11297$as_echo_n "checking for $ac_word... " >&6; }
11298if ${ac_cv_path_XARGS+:} false; then :
11299  $as_echo_n "(cached) " >&6
11300else
11301  case $XARGS in
11302  [\\/]* | ?:[\\/]*)
11303  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11304  ;;
11305  *)
11306  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11307for as_dir in $PATH
11308do
11309  IFS=$as_save_IFS
11310  test -z "$as_dir" && as_dir=.
11311    for ac_exec_ext in '' $ac_executable_extensions; do
11312  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11313    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11314    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11315    break 2
11316  fi
11317done
11318  done
11319IFS=$as_save_IFS
11320
11321  ;;
11322esac
11323fi
11324XARGS=$ac_cv_path_XARGS
11325if test -n "$XARGS"; then
11326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11327$as_echo "$XARGS" >&6; }
11328else
11329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11330$as_echo "no" >&6; }
11331fi
11332
11333
11334        if test "x$XARGS" = x; then
11335          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11336        fi
11337      else
11338        # Otherwise we believe it is a complete path. Use it as it is.
11339        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
11340$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
11341        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
11342$as_echo_n "checking for XARGS... " >&6; }
11343        if test ! -x "$tool_specified"; then
11344          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11345$as_echo "not found" >&6; }
11346          as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
11347        fi
11348        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11349$as_echo "$tool_specified" >&6; }
11350      fi
11351    fi
11352  fi
11353
11354
11355
11356  if test "x$XARGS" = x; then
11357    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
11358  fi
11359
11360
11361
11362  # Then required tools that require some special treatment.
11363
11364
11365  # Publish this variable in the help.
11366
11367
11368  if test "x$AWK" = x; then
11369    # The variable is not set by user, try to locate tool using the code snippet
11370    for ac_prog in gawk mawk nawk awk
11371do
11372  # Extract the first word of "$ac_prog", so it can be a program name with args.
11373set dummy $ac_prog; ac_word=$2
11374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11375$as_echo_n "checking for $ac_word... " >&6; }
11376if ${ac_cv_prog_AWK+:} false; then :
11377  $as_echo_n "(cached) " >&6
11378else
11379  if test -n "$AWK"; then
11380  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11381else
11382as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11383for as_dir in $PATH
11384do
11385  IFS=$as_save_IFS
11386  test -z "$as_dir" && as_dir=.
11387    for ac_exec_ext in '' $ac_executable_extensions; do
11388  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11389    ac_cv_prog_AWK="$ac_prog"
11390    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11391    break 2
11392  fi
11393done
11394  done
11395IFS=$as_save_IFS
11396
11397fi
11398fi
11399AWK=$ac_cv_prog_AWK
11400if test -n "$AWK"; then
11401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11402$as_echo "$AWK" >&6; }
11403else
11404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11405$as_echo "no" >&6; }
11406fi
11407
11408
11409  test -n "$AWK" && break
11410done
11411
11412  else
11413    # The variable is set, but is it from the command line or the environment?
11414
11415    # Try to remove the string !AWK! from our list.
11416    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
11417    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11418      # If it failed, the variable was not from the command line. Ignore it,
11419      # but warn the user (except for BASH, which is always set by the calling BASH).
11420      if test "xAWK" != xBASH; then
11421        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
11422$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
11423      fi
11424      # Try to locate tool using the code snippet
11425      for ac_prog in gawk mawk nawk awk
11426do
11427  # Extract the first word of "$ac_prog", so it can be a program name with args.
11428set dummy $ac_prog; ac_word=$2
11429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11430$as_echo_n "checking for $ac_word... " >&6; }
11431if ${ac_cv_prog_AWK+:} false; then :
11432  $as_echo_n "(cached) " >&6
11433else
11434  if test -n "$AWK"; then
11435  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11436else
11437as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11438for as_dir in $PATH
11439do
11440  IFS=$as_save_IFS
11441  test -z "$as_dir" && as_dir=.
11442    for ac_exec_ext in '' $ac_executable_extensions; do
11443  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11444    ac_cv_prog_AWK="$ac_prog"
11445    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11446    break 2
11447  fi
11448done
11449  done
11450IFS=$as_save_IFS
11451
11452fi
11453fi
11454AWK=$ac_cv_prog_AWK
11455if test -n "$AWK"; then
11456  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11457$as_echo "$AWK" >&6; }
11458else
11459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11460$as_echo "no" >&6; }
11461fi
11462
11463
11464  test -n "$AWK" && break
11465done
11466
11467    else
11468      # If it succeeded, then it was overridden by the user. We will use it
11469      # for the tool.
11470
11471      # First remove it from the list of overridden variables, so we can test
11472      # for unknown variables in the end.
11473      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11474
11475      # Check if the provided tool contains a complete path.
11476      tool_specified="$AWK"
11477      tool_basename="${tool_specified##*/}"
11478      if test "x$tool_basename" = "x$tool_specified"; then
11479        # A command without a complete path is provided, search $PATH.
11480        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
11481$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
11482        # Extract the first word of "$tool_basename", so it can be a program name with args.
11483set dummy $tool_basename; ac_word=$2
11484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11485$as_echo_n "checking for $ac_word... " >&6; }
11486if ${ac_cv_path_AWK+:} false; then :
11487  $as_echo_n "(cached) " >&6
11488else
11489  case $AWK in
11490  [\\/]* | ?:[\\/]*)
11491  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
11492  ;;
11493  *)
11494  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11495for as_dir in $PATH
11496do
11497  IFS=$as_save_IFS
11498  test -z "$as_dir" && as_dir=.
11499    for ac_exec_ext in '' $ac_executable_extensions; do
11500  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11501    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
11502    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11503    break 2
11504  fi
11505done
11506  done
11507IFS=$as_save_IFS
11508
11509  ;;
11510esac
11511fi
11512AWK=$ac_cv_path_AWK
11513if test -n "$AWK"; then
11514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11515$as_echo "$AWK" >&6; }
11516else
11517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11518$as_echo "no" >&6; }
11519fi
11520
11521
11522        if test "x$AWK" = x; then
11523          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11524        fi
11525      else
11526        # Otherwise we believe it is a complete path. Use it as it is.
11527        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
11528$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
11529        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
11530$as_echo_n "checking for AWK... " >&6; }
11531        if test ! -x "$tool_specified"; then
11532          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11533$as_echo "not found" >&6; }
11534          as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
11535        fi
11536        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11537$as_echo "$tool_specified" >&6; }
11538      fi
11539    fi
11540  fi
11541
11542
11543  if test "x$AWK" = x; then
11544    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
11545  fi
11546
11547
11548
11549
11550  # Publish this variable in the help.
11551
11552
11553  if test "x$GREP" = x; then
11554    # The variable is not set by user, try to locate tool using the code snippet
11555    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11556$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11557if ${ac_cv_path_GREP+:} false; then :
11558  $as_echo_n "(cached) " >&6
11559else
11560  if test -z "$GREP"; then
11561  ac_path_GREP_found=false
11562  # Loop through the user's path and test for each of PROGNAME-LIST
11563  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11564for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11565do
11566  IFS=$as_save_IFS
11567  test -z "$as_dir" && as_dir=.
11568    for ac_prog in grep ggrep; do
11569    for ac_exec_ext in '' $ac_executable_extensions; do
11570      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11571      as_fn_executable_p "$ac_path_GREP" || continue
11572# Check for GNU ac_path_GREP and select it if it is found.
11573  # Check for GNU $ac_path_GREP
11574case `"$ac_path_GREP" --version 2>&1` in
11575*GNU*)
11576  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11577*)
11578  ac_count=0
11579  $as_echo_n 0123456789 >"conftest.in"
11580  while :
11581  do
11582    cat "conftest.in" "conftest.in" >"conftest.tmp"
11583    mv "conftest.tmp" "conftest.in"
11584    cp "conftest.in" "conftest.nl"
11585    $as_echo 'GREP' >> "conftest.nl"
11586    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11587    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11588    as_fn_arith $ac_count + 1 && ac_count=$as_val
11589    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11590      # Best one so far, save it but keep looking for a better one
11591      ac_cv_path_GREP="$ac_path_GREP"
11592      ac_path_GREP_max=$ac_count
11593    fi
11594    # 10*(2^10) chars as input seems more than enough
11595    test $ac_count -gt 10 && break
11596  done
11597  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11598esac
11599
11600      $ac_path_GREP_found && break 3
11601    done
11602  done
11603  done
11604IFS=$as_save_IFS
11605  if test -z "$ac_cv_path_GREP"; then
11606    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11607  fi
11608else
11609  ac_cv_path_GREP=$GREP
11610fi
11611
11612fi
11613{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11614$as_echo "$ac_cv_path_GREP" >&6; }
11615 GREP="$ac_cv_path_GREP"
11616
11617
11618  else
11619    # The variable is set, but is it from the command line or the environment?
11620
11621    # Try to remove the string !GREP! from our list.
11622    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
11623    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11624      # If it failed, the variable was not from the command line. Ignore it,
11625      # but warn the user (except for BASH, which is always set by the calling BASH).
11626      if test "xGREP" != xBASH; then
11627        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
11628$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
11629      fi
11630      # Try to locate tool using the code snippet
11631      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11632$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11633if ${ac_cv_path_GREP+:} false; then :
11634  $as_echo_n "(cached) " >&6
11635else
11636  if test -z "$GREP"; then
11637  ac_path_GREP_found=false
11638  # Loop through the user's path and test for each of PROGNAME-LIST
11639  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11640for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11641do
11642  IFS=$as_save_IFS
11643  test -z "$as_dir" && as_dir=.
11644    for ac_prog in grep ggrep; do
11645    for ac_exec_ext in '' $ac_executable_extensions; do
11646      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11647      as_fn_executable_p "$ac_path_GREP" || continue
11648# Check for GNU ac_path_GREP and select it if it is found.
11649  # Check for GNU $ac_path_GREP
11650case `"$ac_path_GREP" --version 2>&1` in
11651*GNU*)
11652  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11653*)
11654  ac_count=0
11655  $as_echo_n 0123456789 >"conftest.in"
11656  while :
11657  do
11658    cat "conftest.in" "conftest.in" >"conftest.tmp"
11659    mv "conftest.tmp" "conftest.in"
11660    cp "conftest.in" "conftest.nl"
11661    $as_echo 'GREP' >> "conftest.nl"
11662    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11663    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11664    as_fn_arith $ac_count + 1 && ac_count=$as_val
11665    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11666      # Best one so far, save it but keep looking for a better one
11667      ac_cv_path_GREP="$ac_path_GREP"
11668      ac_path_GREP_max=$ac_count
11669    fi
11670    # 10*(2^10) chars as input seems more than enough
11671    test $ac_count -gt 10 && break
11672  done
11673  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11674esac
11675
11676      $ac_path_GREP_found && break 3
11677    done
11678  done
11679  done
11680IFS=$as_save_IFS
11681  if test -z "$ac_cv_path_GREP"; then
11682    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11683  fi
11684else
11685  ac_cv_path_GREP=$GREP
11686fi
11687
11688fi
11689{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11690$as_echo "$ac_cv_path_GREP" >&6; }
11691 GREP="$ac_cv_path_GREP"
11692
11693
11694    else
11695      # If it succeeded, then it was overridden by the user. We will use it
11696      # for the tool.
11697
11698      # First remove it from the list of overridden variables, so we can test
11699      # for unknown variables in the end.
11700      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11701
11702      # Check if the provided tool contains a complete path.
11703      tool_specified="$GREP"
11704      tool_basename="${tool_specified##*/}"
11705      if test "x$tool_basename" = "x$tool_specified"; then
11706        # A command without a complete path is provided, search $PATH.
11707        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
11708$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
11709        # Extract the first word of "$tool_basename", so it can be a program name with args.
11710set dummy $tool_basename; ac_word=$2
11711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11712$as_echo_n "checking for $ac_word... " >&6; }
11713if ${ac_cv_path_GREP+:} false; then :
11714  $as_echo_n "(cached) " >&6
11715else
11716  case $GREP in
11717  [\\/]* | ?:[\\/]*)
11718  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
11719  ;;
11720  *)
11721  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11722for as_dir in $PATH
11723do
11724  IFS=$as_save_IFS
11725  test -z "$as_dir" && as_dir=.
11726    for ac_exec_ext in '' $ac_executable_extensions; do
11727  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11728    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
11729    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11730    break 2
11731  fi
11732done
11733  done
11734IFS=$as_save_IFS
11735
11736  ;;
11737esac
11738fi
11739GREP=$ac_cv_path_GREP
11740if test -n "$GREP"; then
11741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
11742$as_echo "$GREP" >&6; }
11743else
11744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11745$as_echo "no" >&6; }
11746fi
11747
11748
11749        if test "x$GREP" = x; then
11750          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11751        fi
11752      else
11753        # Otherwise we believe it is a complete path. Use it as it is.
11754        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
11755$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
11756        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
11757$as_echo_n "checking for GREP... " >&6; }
11758        if test ! -x "$tool_specified"; then
11759          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11760$as_echo "not found" >&6; }
11761          as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
11762        fi
11763        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11764$as_echo "$tool_specified" >&6; }
11765      fi
11766    fi
11767  fi
11768
11769
11770  if test "x$GREP" = x; then
11771    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
11772  fi
11773
11774
11775
11776
11777  # Publish this variable in the help.
11778
11779
11780  if test "x$EGREP" = x; then
11781    # The variable is not set by user, try to locate tool using the code snippet
11782    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11783$as_echo_n "checking for egrep... " >&6; }
11784if ${ac_cv_path_EGREP+:} false; then :
11785  $as_echo_n "(cached) " >&6
11786else
11787  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11788   then ac_cv_path_EGREP="$GREP -E"
11789   else
11790     if test -z "$EGREP"; then
11791  ac_path_EGREP_found=false
11792  # Loop through the user's path and test for each of PROGNAME-LIST
11793  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11794for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11795do
11796  IFS=$as_save_IFS
11797  test -z "$as_dir" && as_dir=.
11798    for ac_prog in egrep; do
11799    for ac_exec_ext in '' $ac_executable_extensions; do
11800      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11801      as_fn_executable_p "$ac_path_EGREP" || continue
11802# Check for GNU ac_path_EGREP and select it if it is found.
11803  # Check for GNU $ac_path_EGREP
11804case `"$ac_path_EGREP" --version 2>&1` in
11805*GNU*)
11806  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11807*)
11808  ac_count=0
11809  $as_echo_n 0123456789 >"conftest.in"
11810  while :
11811  do
11812    cat "conftest.in" "conftest.in" >"conftest.tmp"
11813    mv "conftest.tmp" "conftest.in"
11814    cp "conftest.in" "conftest.nl"
11815    $as_echo 'EGREP' >> "conftest.nl"
11816    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11817    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11818    as_fn_arith $ac_count + 1 && ac_count=$as_val
11819    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11820      # Best one so far, save it but keep looking for a better one
11821      ac_cv_path_EGREP="$ac_path_EGREP"
11822      ac_path_EGREP_max=$ac_count
11823    fi
11824    # 10*(2^10) chars as input seems more than enough
11825    test $ac_count -gt 10 && break
11826  done
11827  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11828esac
11829
11830      $ac_path_EGREP_found && break 3
11831    done
11832  done
11833  done
11834IFS=$as_save_IFS
11835  if test -z "$ac_cv_path_EGREP"; then
11836    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11837  fi
11838else
11839  ac_cv_path_EGREP=$EGREP
11840fi
11841
11842   fi
11843fi
11844{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11845$as_echo "$ac_cv_path_EGREP" >&6; }
11846 EGREP="$ac_cv_path_EGREP"
11847
11848
11849  else
11850    # The variable is set, but is it from the command line or the environment?
11851
11852    # Try to remove the string !EGREP! from our list.
11853    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
11854    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11855      # If it failed, the variable was not from the command line. Ignore it,
11856      # but warn the user (except for BASH, which is always set by the calling BASH).
11857      if test "xEGREP" != xBASH; then
11858        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
11859$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
11860      fi
11861      # Try to locate tool using the code snippet
11862      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11863$as_echo_n "checking for egrep... " >&6; }
11864if ${ac_cv_path_EGREP+:} false; then :
11865  $as_echo_n "(cached) " >&6
11866else
11867  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11868   then ac_cv_path_EGREP="$GREP -E"
11869   else
11870     if test -z "$EGREP"; then
11871  ac_path_EGREP_found=false
11872  # Loop through the user's path and test for each of PROGNAME-LIST
11873  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11874for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11875do
11876  IFS=$as_save_IFS
11877  test -z "$as_dir" && as_dir=.
11878    for ac_prog in egrep; do
11879    for ac_exec_ext in '' $ac_executable_extensions; do
11880      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11881      as_fn_executable_p "$ac_path_EGREP" || continue
11882# Check for GNU ac_path_EGREP and select it if it is found.
11883  # Check for GNU $ac_path_EGREP
11884case `"$ac_path_EGREP" --version 2>&1` in
11885*GNU*)
11886  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11887*)
11888  ac_count=0
11889  $as_echo_n 0123456789 >"conftest.in"
11890  while :
11891  do
11892    cat "conftest.in" "conftest.in" >"conftest.tmp"
11893    mv "conftest.tmp" "conftest.in"
11894    cp "conftest.in" "conftest.nl"
11895    $as_echo 'EGREP' >> "conftest.nl"
11896    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11897    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11898    as_fn_arith $ac_count + 1 && ac_count=$as_val
11899    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11900      # Best one so far, save it but keep looking for a better one
11901      ac_cv_path_EGREP="$ac_path_EGREP"
11902      ac_path_EGREP_max=$ac_count
11903    fi
11904    # 10*(2^10) chars as input seems more than enough
11905    test $ac_count -gt 10 && break
11906  done
11907  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11908esac
11909
11910      $ac_path_EGREP_found && break 3
11911    done
11912  done
11913  done
11914IFS=$as_save_IFS
11915  if test -z "$ac_cv_path_EGREP"; then
11916    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11917  fi
11918else
11919  ac_cv_path_EGREP=$EGREP
11920fi
11921
11922   fi
11923fi
11924{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11925$as_echo "$ac_cv_path_EGREP" >&6; }
11926 EGREP="$ac_cv_path_EGREP"
11927
11928
11929    else
11930      # If it succeeded, then it was overridden by the user. We will use it
11931      # for the tool.
11932
11933      # First remove it from the list of overridden variables, so we can test
11934      # for unknown variables in the end.
11935      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11936
11937      # Check if the provided tool contains a complete path.
11938      tool_specified="$EGREP"
11939      tool_basename="${tool_specified##*/}"
11940      if test "x$tool_basename" = "x$tool_specified"; then
11941        # A command without a complete path is provided, search $PATH.
11942        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
11943$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
11944        # Extract the first word of "$tool_basename", so it can be a program name with args.
11945set dummy $tool_basename; ac_word=$2
11946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11947$as_echo_n "checking for $ac_word... " >&6; }
11948if ${ac_cv_path_EGREP+:} false; then :
11949  $as_echo_n "(cached) " >&6
11950else
11951  case $EGREP in
11952  [\\/]* | ?:[\\/]*)
11953  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
11954  ;;
11955  *)
11956  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11957for as_dir in $PATH
11958do
11959  IFS=$as_save_IFS
11960  test -z "$as_dir" && as_dir=.
11961    for ac_exec_ext in '' $ac_executable_extensions; do
11962  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11963    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
11964    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11965    break 2
11966  fi
11967done
11968  done
11969IFS=$as_save_IFS
11970
11971  ;;
11972esac
11973fi
11974EGREP=$ac_cv_path_EGREP
11975if test -n "$EGREP"; then
11976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
11977$as_echo "$EGREP" >&6; }
11978else
11979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11980$as_echo "no" >&6; }
11981fi
11982
11983
11984        if test "x$EGREP" = x; then
11985          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11986        fi
11987      else
11988        # Otherwise we believe it is a complete path. Use it as it is.
11989        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
11990$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
11991        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
11992$as_echo_n "checking for EGREP... " >&6; }
11993        if test ! -x "$tool_specified"; then
11994          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11995$as_echo "not found" >&6; }
11996          as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
11997        fi
11998        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11999$as_echo "$tool_specified" >&6; }
12000      fi
12001    fi
12002  fi
12003
12004
12005  if test "x$EGREP" = x; then
12006    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
12007  fi
12008
12009
12010
12011
12012  # Publish this variable in the help.
12013
12014
12015  if test "x$FGREP" = x; then
12016    # The variable is not set by user, try to locate tool using the code snippet
12017    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12018$as_echo_n "checking for fgrep... " >&6; }
12019if ${ac_cv_path_FGREP+:} false; then :
12020  $as_echo_n "(cached) " >&6
12021else
12022  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12023   then ac_cv_path_FGREP="$GREP -F"
12024   else
12025     if test -z "$FGREP"; then
12026  ac_path_FGREP_found=false
12027  # Loop through the user's path and test for each of PROGNAME-LIST
12028  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12029for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12030do
12031  IFS=$as_save_IFS
12032  test -z "$as_dir" && as_dir=.
12033    for ac_prog in fgrep; do
12034    for ac_exec_ext in '' $ac_executable_extensions; do
12035      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12036      as_fn_executable_p "$ac_path_FGREP" || continue
12037# Check for GNU ac_path_FGREP and select it if it is found.
12038  # Check for GNU $ac_path_FGREP
12039case `"$ac_path_FGREP" --version 2>&1` in
12040*GNU*)
12041  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12042*)
12043  ac_count=0
12044  $as_echo_n 0123456789 >"conftest.in"
12045  while :
12046  do
12047    cat "conftest.in" "conftest.in" >"conftest.tmp"
12048    mv "conftest.tmp" "conftest.in"
12049    cp "conftest.in" "conftest.nl"
12050    $as_echo 'FGREP' >> "conftest.nl"
12051    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12052    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12053    as_fn_arith $ac_count + 1 && ac_count=$as_val
12054    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12055      # Best one so far, save it but keep looking for a better one
12056      ac_cv_path_FGREP="$ac_path_FGREP"
12057      ac_path_FGREP_max=$ac_count
12058    fi
12059    # 10*(2^10) chars as input seems more than enough
12060    test $ac_count -gt 10 && break
12061  done
12062  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12063esac
12064
12065      $ac_path_FGREP_found && break 3
12066    done
12067  done
12068  done
12069IFS=$as_save_IFS
12070  if test -z "$ac_cv_path_FGREP"; then
12071    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12072  fi
12073else
12074  ac_cv_path_FGREP=$FGREP
12075fi
12076
12077   fi
12078fi
12079{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12080$as_echo "$ac_cv_path_FGREP" >&6; }
12081 FGREP="$ac_cv_path_FGREP"
12082
12083
12084  else
12085    # The variable is set, but is it from the command line or the environment?
12086
12087    # Try to remove the string !FGREP! from our list.
12088    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
12089    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12090      # If it failed, the variable was not from the command line. Ignore it,
12091      # but warn the user (except for BASH, which is always set by the calling BASH).
12092      if test "xFGREP" != xBASH; then
12093        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
12094$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
12095      fi
12096      # Try to locate tool using the code snippet
12097      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12098$as_echo_n "checking for fgrep... " >&6; }
12099if ${ac_cv_path_FGREP+:} false; then :
12100  $as_echo_n "(cached) " >&6
12101else
12102  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12103   then ac_cv_path_FGREP="$GREP -F"
12104   else
12105     if test -z "$FGREP"; then
12106  ac_path_FGREP_found=false
12107  # Loop through the user's path and test for each of PROGNAME-LIST
12108  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12109for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12110do
12111  IFS=$as_save_IFS
12112  test -z "$as_dir" && as_dir=.
12113    for ac_prog in fgrep; do
12114    for ac_exec_ext in '' $ac_executable_extensions; do
12115      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12116      as_fn_executable_p "$ac_path_FGREP" || continue
12117# Check for GNU ac_path_FGREP and select it if it is found.
12118  # Check for GNU $ac_path_FGREP
12119case `"$ac_path_FGREP" --version 2>&1` in
12120*GNU*)
12121  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12122*)
12123  ac_count=0
12124  $as_echo_n 0123456789 >"conftest.in"
12125  while :
12126  do
12127    cat "conftest.in" "conftest.in" >"conftest.tmp"
12128    mv "conftest.tmp" "conftest.in"
12129    cp "conftest.in" "conftest.nl"
12130    $as_echo 'FGREP' >> "conftest.nl"
12131    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12132    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12133    as_fn_arith $ac_count + 1 && ac_count=$as_val
12134    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12135      # Best one so far, save it but keep looking for a better one
12136      ac_cv_path_FGREP="$ac_path_FGREP"
12137      ac_path_FGREP_max=$ac_count
12138    fi
12139    # 10*(2^10) chars as input seems more than enough
12140    test $ac_count -gt 10 && break
12141  done
12142  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12143esac
12144
12145      $ac_path_FGREP_found && break 3
12146    done
12147  done
12148  done
12149IFS=$as_save_IFS
12150  if test -z "$ac_cv_path_FGREP"; then
12151    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12152  fi
12153else
12154  ac_cv_path_FGREP=$FGREP
12155fi
12156
12157   fi
12158fi
12159{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12160$as_echo "$ac_cv_path_FGREP" >&6; }
12161 FGREP="$ac_cv_path_FGREP"
12162
12163
12164    else
12165      # If it succeeded, then it was overridden by the user. We will use it
12166      # for the tool.
12167
12168      # First remove it from the list of overridden variables, so we can test
12169      # for unknown variables in the end.
12170      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12171
12172      # Check if the provided tool contains a complete path.
12173      tool_specified="$FGREP"
12174      tool_basename="${tool_specified##*/}"
12175      if test "x$tool_basename" = "x$tool_specified"; then
12176        # A command without a complete path is provided, search $PATH.
12177        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
12178$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
12179        # Extract the first word of "$tool_basename", so it can be a program name with args.
12180set dummy $tool_basename; ac_word=$2
12181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12182$as_echo_n "checking for $ac_word... " >&6; }
12183if ${ac_cv_path_FGREP+:} false; then :
12184  $as_echo_n "(cached) " >&6
12185else
12186  case $FGREP in
12187  [\\/]* | ?:[\\/]*)
12188  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
12189  ;;
12190  *)
12191  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12192for as_dir in $PATH
12193do
12194  IFS=$as_save_IFS
12195  test -z "$as_dir" && as_dir=.
12196    for ac_exec_ext in '' $ac_executable_extensions; do
12197  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12198    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
12199    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12200    break 2
12201  fi
12202done
12203  done
12204IFS=$as_save_IFS
12205
12206  ;;
12207esac
12208fi
12209FGREP=$ac_cv_path_FGREP
12210if test -n "$FGREP"; then
12211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
12212$as_echo "$FGREP" >&6; }
12213else
12214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12215$as_echo "no" >&6; }
12216fi
12217
12218
12219        if test "x$FGREP" = x; then
12220          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12221        fi
12222      else
12223        # Otherwise we believe it is a complete path. Use it as it is.
12224        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
12225$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
12226        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
12227$as_echo_n "checking for FGREP... " >&6; }
12228        if test ! -x "$tool_specified"; then
12229          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12230$as_echo "not found" >&6; }
12231          as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12232        fi
12233        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12234$as_echo "$tool_specified" >&6; }
12235      fi
12236    fi
12237  fi
12238
12239
12240  if test "x$FGREP" = x; then
12241    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
12242  fi
12243
12244
12245
12246
12247  # Publish this variable in the help.
12248
12249
12250  if test "x$SED" = x; then
12251    # The variable is not set by user, try to locate tool using the code snippet
12252    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12253$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12254if ${ac_cv_path_SED+:} false; then :
12255  $as_echo_n "(cached) " >&6
12256else
12257            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12258     for ac_i in 1 2 3 4 5 6 7; do
12259       ac_script="$ac_script$as_nl$ac_script"
12260     done
12261     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12262     { ac_script=; unset ac_script;}
12263     if test -z "$SED"; then
12264  ac_path_SED_found=false
12265  # Loop through the user's path and test for each of PROGNAME-LIST
12266  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12267for as_dir in $PATH
12268do
12269  IFS=$as_save_IFS
12270  test -z "$as_dir" && as_dir=.
12271    for ac_prog in sed gsed; do
12272    for ac_exec_ext in '' $ac_executable_extensions; do
12273      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12274      as_fn_executable_p "$ac_path_SED" || continue
12275# Check for GNU ac_path_SED and select it if it is found.
12276  # Check for GNU $ac_path_SED
12277case `"$ac_path_SED" --version 2>&1` in
12278*GNU*)
12279  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12280*)
12281  ac_count=0
12282  $as_echo_n 0123456789 >"conftest.in"
12283  while :
12284  do
12285    cat "conftest.in" "conftest.in" >"conftest.tmp"
12286    mv "conftest.tmp" "conftest.in"
12287    cp "conftest.in" "conftest.nl"
12288    $as_echo '' >> "conftest.nl"
12289    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12290    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12291    as_fn_arith $ac_count + 1 && ac_count=$as_val
12292    if test $ac_count -gt ${ac_path_SED_max-0}; then
12293      # Best one so far, save it but keep looking for a better one
12294      ac_cv_path_SED="$ac_path_SED"
12295      ac_path_SED_max=$ac_count
12296    fi
12297    # 10*(2^10) chars as input seems more than enough
12298    test $ac_count -gt 10 && break
12299  done
12300  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12301esac
12302
12303      $ac_path_SED_found && break 3
12304    done
12305  done
12306  done
12307IFS=$as_save_IFS
12308  if test -z "$ac_cv_path_SED"; then
12309    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12310  fi
12311else
12312  ac_cv_path_SED=$SED
12313fi
12314
12315fi
12316{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12317$as_echo "$ac_cv_path_SED" >&6; }
12318 SED="$ac_cv_path_SED"
12319  rm -f conftest.sed
12320
12321  else
12322    # The variable is set, but is it from the command line or the environment?
12323
12324    # Try to remove the string !SED! from our list.
12325    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
12326    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12327      # If it failed, the variable was not from the command line. Ignore it,
12328      # but warn the user (except for BASH, which is always set by the calling BASH).
12329      if test "xSED" != xBASH; then
12330        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
12331$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
12332      fi
12333      # Try to locate tool using the code snippet
12334      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12335$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12336if ${ac_cv_path_SED+:} false; then :
12337  $as_echo_n "(cached) " >&6
12338else
12339            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12340     for ac_i in 1 2 3 4 5 6 7; do
12341       ac_script="$ac_script$as_nl$ac_script"
12342     done
12343     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12344     { ac_script=; unset ac_script;}
12345     if test -z "$SED"; then
12346  ac_path_SED_found=false
12347  # Loop through the user's path and test for each of PROGNAME-LIST
12348  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12349for as_dir in $PATH
12350do
12351  IFS=$as_save_IFS
12352  test -z "$as_dir" && as_dir=.
12353    for ac_prog in sed gsed; do
12354    for ac_exec_ext in '' $ac_executable_extensions; do
12355      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12356      as_fn_executable_p "$ac_path_SED" || continue
12357# Check for GNU ac_path_SED and select it if it is found.
12358  # Check for GNU $ac_path_SED
12359case `"$ac_path_SED" --version 2>&1` in
12360*GNU*)
12361  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12362*)
12363  ac_count=0
12364  $as_echo_n 0123456789 >"conftest.in"
12365  while :
12366  do
12367    cat "conftest.in" "conftest.in" >"conftest.tmp"
12368    mv "conftest.tmp" "conftest.in"
12369    cp "conftest.in" "conftest.nl"
12370    $as_echo '' >> "conftest.nl"
12371    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12372    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12373    as_fn_arith $ac_count + 1 && ac_count=$as_val
12374    if test $ac_count -gt ${ac_path_SED_max-0}; then
12375      # Best one so far, save it but keep looking for a better one
12376      ac_cv_path_SED="$ac_path_SED"
12377      ac_path_SED_max=$ac_count
12378    fi
12379    # 10*(2^10) chars as input seems more than enough
12380    test $ac_count -gt 10 && break
12381  done
12382  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12383esac
12384
12385      $ac_path_SED_found && break 3
12386    done
12387  done
12388  done
12389IFS=$as_save_IFS
12390  if test -z "$ac_cv_path_SED"; then
12391    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12392  fi
12393else
12394  ac_cv_path_SED=$SED
12395fi
12396
12397fi
12398{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12399$as_echo "$ac_cv_path_SED" >&6; }
12400 SED="$ac_cv_path_SED"
12401  rm -f conftest.sed
12402
12403    else
12404      # If it succeeded, then it was overridden by the user. We will use it
12405      # for the tool.
12406
12407      # First remove it from the list of overridden variables, so we can test
12408      # for unknown variables in the end.
12409      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12410
12411      # Check if the provided tool contains a complete path.
12412      tool_specified="$SED"
12413      tool_basename="${tool_specified##*/}"
12414      if test "x$tool_basename" = "x$tool_specified"; then
12415        # A command without a complete path is provided, search $PATH.
12416        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
12417$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
12418        # Extract the first word of "$tool_basename", so it can be a program name with args.
12419set dummy $tool_basename; ac_word=$2
12420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12421$as_echo_n "checking for $ac_word... " >&6; }
12422if ${ac_cv_path_SED+:} false; then :
12423  $as_echo_n "(cached) " >&6
12424else
12425  case $SED in
12426  [\\/]* | ?:[\\/]*)
12427  ac_cv_path_SED="$SED" # Let the user override the test with a path.
12428  ;;
12429  *)
12430  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12431for as_dir in $PATH
12432do
12433  IFS=$as_save_IFS
12434  test -z "$as_dir" && as_dir=.
12435    for ac_exec_ext in '' $ac_executable_extensions; do
12436  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12437    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
12438    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12439    break 2
12440  fi
12441done
12442  done
12443IFS=$as_save_IFS
12444
12445  ;;
12446esac
12447fi
12448SED=$ac_cv_path_SED
12449if test -n "$SED"; then
12450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
12451$as_echo "$SED" >&6; }
12452else
12453  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12454$as_echo "no" >&6; }
12455fi
12456
12457
12458        if test "x$SED" = x; then
12459          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12460        fi
12461      else
12462        # Otherwise we believe it is a complete path. Use it as it is.
12463        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
12464$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
12465        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
12466$as_echo_n "checking for SED... " >&6; }
12467        if test ! -x "$tool_specified"; then
12468          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12469$as_echo "not found" >&6; }
12470          as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
12471        fi
12472        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12473$as_echo "$tool_specified" >&6; }
12474      fi
12475    fi
12476  fi
12477
12478
12479  if test "x$SED" = x; then
12480    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
12481  fi
12482
12483
12484
12485  # Always force rm.
12486  RM="$RM -f"
12487
12488  # pwd behaves differently on various platforms and some don't support the -L flag.
12489  # Always use the bash builtin pwd to get uniform behavior.
12490  THEPWDCMD=pwd
12491
12492  # These are not required on all platforms
12493
12494
12495  # Publish this variable in the help.
12496
12497
12498  if test "x$CYGPATH" = x; then
12499    # The variable is not set by user, try to locate tool using the code snippet
12500    for ac_prog in cygpath
12501do
12502  # Extract the first word of "$ac_prog", so it can be a program name with args.
12503set dummy $ac_prog; ac_word=$2
12504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12505$as_echo_n "checking for $ac_word... " >&6; }
12506if ${ac_cv_path_CYGPATH+:} false; then :
12507  $as_echo_n "(cached) " >&6
12508else
12509  case $CYGPATH in
12510  [\\/]* | ?:[\\/]*)
12511  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12512  ;;
12513  *)
12514  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12515for as_dir in $PATH
12516do
12517  IFS=$as_save_IFS
12518  test -z "$as_dir" && as_dir=.
12519    for ac_exec_ext in '' $ac_executable_extensions; do
12520  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12521    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12522    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12523    break 2
12524  fi
12525done
12526  done
12527IFS=$as_save_IFS
12528
12529  ;;
12530esac
12531fi
12532CYGPATH=$ac_cv_path_CYGPATH
12533if test -n "$CYGPATH"; then
12534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12535$as_echo "$CYGPATH" >&6; }
12536else
12537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12538$as_echo "no" >&6; }
12539fi
12540
12541
12542  test -n "$CYGPATH" && break
12543done
12544
12545  else
12546    # The variable is set, but is it from the command line or the environment?
12547
12548    # Try to remove the string !CYGPATH! from our list.
12549    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
12550    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12551      # If it failed, the variable was not from the command line. Ignore it,
12552      # but warn the user (except for BASH, which is always set by the calling BASH).
12553      if test "xCYGPATH" != xBASH; then
12554        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
12555$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
12556      fi
12557      # Try to locate tool using the code snippet
12558      for ac_prog in cygpath
12559do
12560  # Extract the first word of "$ac_prog", so it can be a program name with args.
12561set dummy $ac_prog; ac_word=$2
12562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12563$as_echo_n "checking for $ac_word... " >&6; }
12564if ${ac_cv_path_CYGPATH+:} false; then :
12565  $as_echo_n "(cached) " >&6
12566else
12567  case $CYGPATH in
12568  [\\/]* | ?:[\\/]*)
12569  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12570  ;;
12571  *)
12572  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12573for as_dir in $PATH
12574do
12575  IFS=$as_save_IFS
12576  test -z "$as_dir" && as_dir=.
12577    for ac_exec_ext in '' $ac_executable_extensions; do
12578  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12579    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12580    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12581    break 2
12582  fi
12583done
12584  done
12585IFS=$as_save_IFS
12586
12587  ;;
12588esac
12589fi
12590CYGPATH=$ac_cv_path_CYGPATH
12591if test -n "$CYGPATH"; then
12592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12593$as_echo "$CYGPATH" >&6; }
12594else
12595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12596$as_echo "no" >&6; }
12597fi
12598
12599
12600  test -n "$CYGPATH" && break
12601done
12602
12603    else
12604      # If it succeeded, then it was overridden by the user. We will use it
12605      # for the tool.
12606
12607      # First remove it from the list of overridden variables, so we can test
12608      # for unknown variables in the end.
12609      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12610
12611      # Check if the provided tool contains a complete path.
12612      tool_specified="$CYGPATH"
12613      tool_basename="${tool_specified##*/}"
12614      if test "x$tool_basename" = "x$tool_specified"; then
12615        # A command without a complete path is provided, search $PATH.
12616        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
12617$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
12618        # Extract the first word of "$tool_basename", so it can be a program name with args.
12619set dummy $tool_basename; ac_word=$2
12620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12621$as_echo_n "checking for $ac_word... " >&6; }
12622if ${ac_cv_path_CYGPATH+:} false; then :
12623  $as_echo_n "(cached) " >&6
12624else
12625  case $CYGPATH in
12626  [\\/]* | ?:[\\/]*)
12627  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12628  ;;
12629  *)
12630  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12631for as_dir in $PATH
12632do
12633  IFS=$as_save_IFS
12634  test -z "$as_dir" && as_dir=.
12635    for ac_exec_ext in '' $ac_executable_extensions; do
12636  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12637    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12638    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12639    break 2
12640  fi
12641done
12642  done
12643IFS=$as_save_IFS
12644
12645  ;;
12646esac
12647fi
12648CYGPATH=$ac_cv_path_CYGPATH
12649if test -n "$CYGPATH"; then
12650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12651$as_echo "$CYGPATH" >&6; }
12652else
12653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12654$as_echo "no" >&6; }
12655fi
12656
12657
12658        if test "x$CYGPATH" = x; then
12659          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12660        fi
12661      else
12662        # Otherwise we believe it is a complete path. Use it as it is.
12663        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
12664$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
12665        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
12666$as_echo_n "checking for CYGPATH... " >&6; }
12667        if test ! -x "$tool_specified"; then
12668          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12669$as_echo "not found" >&6; }
12670          as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
12671        fi
12672        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12673$as_echo "$tool_specified" >&6; }
12674      fi
12675    fi
12676  fi
12677
12678
12679
12680
12681  # Publish this variable in the help.
12682
12683
12684  if test "x$READLINK" = x; then
12685    # The variable is not set by user, try to locate tool using the code snippet
12686    for ac_prog in greadlink readlink
12687do
12688  # Extract the first word of "$ac_prog", so it can be a program name with args.
12689set dummy $ac_prog; ac_word=$2
12690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12691$as_echo_n "checking for $ac_word... " >&6; }
12692if ${ac_cv_path_READLINK+:} false; then :
12693  $as_echo_n "(cached) " >&6
12694else
12695  case $READLINK in
12696  [\\/]* | ?:[\\/]*)
12697  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12698  ;;
12699  *)
12700  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12701for as_dir in $PATH
12702do
12703  IFS=$as_save_IFS
12704  test -z "$as_dir" && as_dir=.
12705    for ac_exec_ext in '' $ac_executable_extensions; do
12706  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12707    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12708    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12709    break 2
12710  fi
12711done
12712  done
12713IFS=$as_save_IFS
12714
12715  ;;
12716esac
12717fi
12718READLINK=$ac_cv_path_READLINK
12719if test -n "$READLINK"; then
12720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12721$as_echo "$READLINK" >&6; }
12722else
12723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12724$as_echo "no" >&6; }
12725fi
12726
12727
12728  test -n "$READLINK" && break
12729done
12730
12731  else
12732    # The variable is set, but is it from the command line or the environment?
12733
12734    # Try to remove the string !READLINK! from our list.
12735    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
12736    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12737      # If it failed, the variable was not from the command line. Ignore it,
12738      # but warn the user (except for BASH, which is always set by the calling BASH).
12739      if test "xREADLINK" != xBASH; then
12740        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
12741$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
12742      fi
12743      # Try to locate tool using the code snippet
12744      for ac_prog in greadlink readlink
12745do
12746  # Extract the first word of "$ac_prog", so it can be a program name with args.
12747set dummy $ac_prog; ac_word=$2
12748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12749$as_echo_n "checking for $ac_word... " >&6; }
12750if ${ac_cv_path_READLINK+:} false; then :
12751  $as_echo_n "(cached) " >&6
12752else
12753  case $READLINK in
12754  [\\/]* | ?:[\\/]*)
12755  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12756  ;;
12757  *)
12758  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12759for as_dir in $PATH
12760do
12761  IFS=$as_save_IFS
12762  test -z "$as_dir" && as_dir=.
12763    for ac_exec_ext in '' $ac_executable_extensions; do
12764  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12765    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12766    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12767    break 2
12768  fi
12769done
12770  done
12771IFS=$as_save_IFS
12772
12773  ;;
12774esac
12775fi
12776READLINK=$ac_cv_path_READLINK
12777if test -n "$READLINK"; then
12778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12779$as_echo "$READLINK" >&6; }
12780else
12781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12782$as_echo "no" >&6; }
12783fi
12784
12785
12786  test -n "$READLINK" && break
12787done
12788
12789    else
12790      # If it succeeded, then it was overridden by the user. We will use it
12791      # for the tool.
12792
12793      # First remove it from the list of overridden variables, so we can test
12794      # for unknown variables in the end.
12795      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12796
12797      # Check if the provided tool contains a complete path.
12798      tool_specified="$READLINK"
12799      tool_basename="${tool_specified##*/}"
12800      if test "x$tool_basename" = "x$tool_specified"; then
12801        # A command without a complete path is provided, search $PATH.
12802        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
12803$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
12804        # Extract the first word of "$tool_basename", so it can be a program name with args.
12805set dummy $tool_basename; ac_word=$2
12806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12807$as_echo_n "checking for $ac_word... " >&6; }
12808if ${ac_cv_path_READLINK+:} false; then :
12809  $as_echo_n "(cached) " >&6
12810else
12811  case $READLINK in
12812  [\\/]* | ?:[\\/]*)
12813  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12814  ;;
12815  *)
12816  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12817for as_dir in $PATH
12818do
12819  IFS=$as_save_IFS
12820  test -z "$as_dir" && as_dir=.
12821    for ac_exec_ext in '' $ac_executable_extensions; do
12822  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12823    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12824    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12825    break 2
12826  fi
12827done
12828  done
12829IFS=$as_save_IFS
12830
12831  ;;
12832esac
12833fi
12834READLINK=$ac_cv_path_READLINK
12835if test -n "$READLINK"; then
12836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12837$as_echo "$READLINK" >&6; }
12838else
12839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12840$as_echo "no" >&6; }
12841fi
12842
12843
12844        if test "x$READLINK" = x; then
12845          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12846        fi
12847      else
12848        # Otherwise we believe it is a complete path. Use it as it is.
12849        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
12850$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
12851        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
12852$as_echo_n "checking for READLINK... " >&6; }
12853        if test ! -x "$tool_specified"; then
12854          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12855$as_echo "not found" >&6; }
12856          as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
12857        fi
12858        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12859$as_echo "$tool_specified" >&6; }
12860      fi
12861    fi
12862  fi
12863
12864
12865
12866
12867  # Publish this variable in the help.
12868
12869
12870  if test "x$DF" = x; then
12871    # The variable is not set by user, try to locate tool using the code snippet
12872    for ac_prog in df
12873do
12874  # Extract the first word of "$ac_prog", so it can be a program name with args.
12875set dummy $ac_prog; ac_word=$2
12876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12877$as_echo_n "checking for $ac_word... " >&6; }
12878if ${ac_cv_path_DF+:} false; then :
12879  $as_echo_n "(cached) " >&6
12880else
12881  case $DF in
12882  [\\/]* | ?:[\\/]*)
12883  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12884  ;;
12885  *)
12886  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12887for as_dir in $PATH
12888do
12889  IFS=$as_save_IFS
12890  test -z "$as_dir" && as_dir=.
12891    for ac_exec_ext in '' $ac_executable_extensions; do
12892  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12893    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12894    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12895    break 2
12896  fi
12897done
12898  done
12899IFS=$as_save_IFS
12900
12901  ;;
12902esac
12903fi
12904DF=$ac_cv_path_DF
12905if test -n "$DF"; then
12906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12907$as_echo "$DF" >&6; }
12908else
12909  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12910$as_echo "no" >&6; }
12911fi
12912
12913
12914  test -n "$DF" && break
12915done
12916
12917  else
12918    # The variable is set, but is it from the command line or the environment?
12919
12920    # Try to remove the string !DF! from our list.
12921    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
12922    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12923      # If it failed, the variable was not from the command line. Ignore it,
12924      # but warn the user (except for BASH, which is always set by the calling BASH).
12925      if test "xDF" != xBASH; then
12926        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
12927$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
12928      fi
12929      # Try to locate tool using the code snippet
12930      for ac_prog in df
12931do
12932  # Extract the first word of "$ac_prog", so it can be a program name with args.
12933set dummy $ac_prog; ac_word=$2
12934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12935$as_echo_n "checking for $ac_word... " >&6; }
12936if ${ac_cv_path_DF+:} false; then :
12937  $as_echo_n "(cached) " >&6
12938else
12939  case $DF in
12940  [\\/]* | ?:[\\/]*)
12941  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12942  ;;
12943  *)
12944  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12945for as_dir in $PATH
12946do
12947  IFS=$as_save_IFS
12948  test -z "$as_dir" && as_dir=.
12949    for ac_exec_ext in '' $ac_executable_extensions; do
12950  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12951    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12952    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12953    break 2
12954  fi
12955done
12956  done
12957IFS=$as_save_IFS
12958
12959  ;;
12960esac
12961fi
12962DF=$ac_cv_path_DF
12963if test -n "$DF"; then
12964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12965$as_echo "$DF" >&6; }
12966else
12967  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12968$as_echo "no" >&6; }
12969fi
12970
12971
12972  test -n "$DF" && break
12973done
12974
12975    else
12976      # If it succeeded, then it was overridden by the user. We will use it
12977      # for the tool.
12978
12979      # First remove it from the list of overridden variables, so we can test
12980      # for unknown variables in the end.
12981      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12982
12983      # Check if the provided tool contains a complete path.
12984      tool_specified="$DF"
12985      tool_basename="${tool_specified##*/}"
12986      if test "x$tool_basename" = "x$tool_specified"; then
12987        # A command without a complete path is provided, search $PATH.
12988        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
12989$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
12990        # Extract the first word of "$tool_basename", so it can be a program name with args.
12991set dummy $tool_basename; ac_word=$2
12992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12993$as_echo_n "checking for $ac_word... " >&6; }
12994if ${ac_cv_path_DF+:} false; then :
12995  $as_echo_n "(cached) " >&6
12996else
12997  case $DF in
12998  [\\/]* | ?:[\\/]*)
12999  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13000  ;;
13001  *)
13002  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13003for as_dir in $PATH
13004do
13005  IFS=$as_save_IFS
13006  test -z "$as_dir" && as_dir=.
13007    for ac_exec_ext in '' $ac_executable_extensions; do
13008  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13009    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13010    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13011    break 2
13012  fi
13013done
13014  done
13015IFS=$as_save_IFS
13016
13017  ;;
13018esac
13019fi
13020DF=$ac_cv_path_DF
13021if test -n "$DF"; then
13022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13023$as_echo "$DF" >&6; }
13024else
13025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13026$as_echo "no" >&6; }
13027fi
13028
13029
13030        if test "x$DF" = x; then
13031          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13032        fi
13033      else
13034        # Otherwise we believe it is a complete path. Use it as it is.
13035        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
13036$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
13037        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
13038$as_echo_n "checking for DF... " >&6; }
13039        if test ! -x "$tool_specified"; then
13040          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13041$as_echo "not found" >&6; }
13042          as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
13043        fi
13044        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13045$as_echo "$tool_specified" >&6; }
13046      fi
13047    fi
13048  fi
13049
13050
13051
13052
13053  # Publish this variable in the help.
13054
13055
13056  if test "x$CPIO" = x; then
13057    # The variable is not set by user, try to locate tool using the code snippet
13058    for ac_prog in cpio bsdcpio
13059do
13060  # Extract the first word of "$ac_prog", so it can be a program name with args.
13061set dummy $ac_prog; ac_word=$2
13062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13063$as_echo_n "checking for $ac_word... " >&6; }
13064if ${ac_cv_path_CPIO+:} false; then :
13065  $as_echo_n "(cached) " >&6
13066else
13067  case $CPIO in
13068  [\\/]* | ?:[\\/]*)
13069  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13070  ;;
13071  *)
13072  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13073for as_dir in $PATH
13074do
13075  IFS=$as_save_IFS
13076  test -z "$as_dir" && as_dir=.
13077    for ac_exec_ext in '' $ac_executable_extensions; do
13078  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13079    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13080    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13081    break 2
13082  fi
13083done
13084  done
13085IFS=$as_save_IFS
13086
13087  ;;
13088esac
13089fi
13090CPIO=$ac_cv_path_CPIO
13091if test -n "$CPIO"; then
13092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13093$as_echo "$CPIO" >&6; }
13094else
13095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13096$as_echo "no" >&6; }
13097fi
13098
13099
13100  test -n "$CPIO" && break
13101done
13102
13103  else
13104    # The variable is set, but is it from the command line or the environment?
13105
13106    # Try to remove the string !CPIO! from our list.
13107    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
13108    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13109      # If it failed, the variable was not from the command line. Ignore it,
13110      # but warn the user (except for BASH, which is always set by the calling BASH).
13111      if test "xCPIO" != xBASH; then
13112        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
13113$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
13114      fi
13115      # Try to locate tool using the code snippet
13116      for ac_prog in cpio bsdcpio
13117do
13118  # Extract the first word of "$ac_prog", so it can be a program name with args.
13119set dummy $ac_prog; ac_word=$2
13120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13121$as_echo_n "checking for $ac_word... " >&6; }
13122if ${ac_cv_path_CPIO+:} false; then :
13123  $as_echo_n "(cached) " >&6
13124else
13125  case $CPIO in
13126  [\\/]* | ?:[\\/]*)
13127  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13128  ;;
13129  *)
13130  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13131for as_dir in $PATH
13132do
13133  IFS=$as_save_IFS
13134  test -z "$as_dir" && as_dir=.
13135    for ac_exec_ext in '' $ac_executable_extensions; do
13136  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13137    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13138    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13139    break 2
13140  fi
13141done
13142  done
13143IFS=$as_save_IFS
13144
13145  ;;
13146esac
13147fi
13148CPIO=$ac_cv_path_CPIO
13149if test -n "$CPIO"; then
13150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13151$as_echo "$CPIO" >&6; }
13152else
13153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13154$as_echo "no" >&6; }
13155fi
13156
13157
13158  test -n "$CPIO" && break
13159done
13160
13161    else
13162      # If it succeeded, then it was overridden by the user. We will use it
13163      # for the tool.
13164
13165      # First remove it from the list of overridden variables, so we can test
13166      # for unknown variables in the end.
13167      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13168
13169      # Check if the provided tool contains a complete path.
13170      tool_specified="$CPIO"
13171      tool_basename="${tool_specified##*/}"
13172      if test "x$tool_basename" = "x$tool_specified"; then
13173        # A command without a complete path is provided, search $PATH.
13174        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
13175$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
13176        # Extract the first word of "$tool_basename", so it can be a program name with args.
13177set dummy $tool_basename; ac_word=$2
13178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13179$as_echo_n "checking for $ac_word... " >&6; }
13180if ${ac_cv_path_CPIO+:} false; then :
13181  $as_echo_n "(cached) " >&6
13182else
13183  case $CPIO in
13184  [\\/]* | ?:[\\/]*)
13185  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13186  ;;
13187  *)
13188  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13189for as_dir in $PATH
13190do
13191  IFS=$as_save_IFS
13192  test -z "$as_dir" && as_dir=.
13193    for ac_exec_ext in '' $ac_executable_extensions; do
13194  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13195    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13196    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13197    break 2
13198  fi
13199done
13200  done
13201IFS=$as_save_IFS
13202
13203  ;;
13204esac
13205fi
13206CPIO=$ac_cv_path_CPIO
13207if test -n "$CPIO"; then
13208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13209$as_echo "$CPIO" >&6; }
13210else
13211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13212$as_echo "no" >&6; }
13213fi
13214
13215
13216        if test "x$CPIO" = x; then
13217          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13218        fi
13219      else
13220        # Otherwise we believe it is a complete path. Use it as it is.
13221        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
13222$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
13223        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
13224$as_echo_n "checking for CPIO... " >&6; }
13225        if test ! -x "$tool_specified"; then
13226          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13227$as_echo "not found" >&6; }
13228          as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
13229        fi
13230        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13231$as_echo "$tool_specified" >&6; }
13232      fi
13233    fi
13234  fi
13235
13236
13237
13238
13239# Now we can determine OpenJDK build and target platforms. This is required to
13240# have early on.
13241# Make sure we can run config.sub.
13242$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
13243  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
13244
13245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
13246$as_echo_n "checking build system type... " >&6; }
13247if ${ac_cv_build+:} false; then :
13248  $as_echo_n "(cached) " >&6
13249else
13250  ac_build_alias=$build_alias
13251test "x$ac_build_alias" = x &&
13252  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
13253test "x$ac_build_alias" = x &&
13254  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
13255ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
13256  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
13257
13258fi
13259{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
13260$as_echo "$ac_cv_build" >&6; }
13261case $ac_cv_build in
13262*-*-*) ;;
13263*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
13264esac
13265build=$ac_cv_build
13266ac_save_IFS=$IFS; IFS='-'
13267set x $ac_cv_build
13268shift
13269build_cpu=$1
13270build_vendor=$2
13271shift; shift
13272# Remember, the first character of IFS is used to create $*,
13273# except with old shells:
13274build_os=$*
13275IFS=$ac_save_IFS
13276case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
13277
13278
13279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
13280$as_echo_n "checking host system type... " >&6; }
13281if ${ac_cv_host+:} false; then :
13282  $as_echo_n "(cached) " >&6
13283else
13284  if test "x$host_alias" = x; then
13285  ac_cv_host=$ac_cv_build
13286else
13287  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
13288    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
13289fi
13290
13291fi
13292{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
13293$as_echo "$ac_cv_host" >&6; }
13294case $ac_cv_host in
13295*-*-*) ;;
13296*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
13297esac
13298host=$ac_cv_host
13299ac_save_IFS=$IFS; IFS='-'
13300set x $ac_cv_host
13301shift
13302host_cpu=$1
13303host_vendor=$2
13304shift; shift
13305# Remember, the first character of IFS is used to create $*,
13306# except with old shells:
13307host_os=$*
13308IFS=$ac_save_IFS
13309case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
13310
13311
13312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
13313$as_echo_n "checking target system type... " >&6; }
13314if ${ac_cv_target+:} false; then :
13315  $as_echo_n "(cached) " >&6
13316else
13317  if test "x$target_alias" = x; then
13318  ac_cv_target=$ac_cv_host
13319else
13320  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
13321    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
13322fi
13323
13324fi
13325{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
13326$as_echo "$ac_cv_target" >&6; }
13327case $ac_cv_target in
13328*-*-*) ;;
13329*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
13330esac
13331target=$ac_cv_target
13332ac_save_IFS=$IFS; IFS='-'
13333set x $ac_cv_target
13334shift
13335target_cpu=$1
13336target_vendor=$2
13337shift; shift
13338# Remember, the first character of IFS is used to create $*,
13339# except with old shells:
13340target_os=$*
13341IFS=$ac_save_IFS
13342case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
13343
13344
13345# The aliases save the names the user supplied, while $host etc.
13346# will get canonicalized.
13347test -n "$target_alias" &&
13348  test "$program_prefix$program_suffix$program_transform_name" = \
13349    NONENONEs,x,x, &&
13350  program_prefix=${target_alias}-
13351
13352  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
13353  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
13354  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
13355  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
13356  # to use the configure naming style.
13357
13358
13359
13360
13361
13362  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
13363  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
13364  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
13365  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
13366  OPENJDK_TARGET_AUTOCONF_NAME="$host"
13367  OPENJDK_BUILD_AUTOCONF_NAME="$build"
13368
13369
13370
13371  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13372
13373  case "$build_os" in
13374    *linux*)
13375      VAR_OS=linux
13376      VAR_OS_TYPE=unix
13377      ;;
13378    *solaris*)
13379      VAR_OS=solaris
13380      VAR_OS_TYPE=unix
13381      ;;
13382    *darwin*)
13383      VAR_OS=macosx
13384      VAR_OS_TYPE=unix
13385      ;;
13386    *bsd*)
13387      VAR_OS=bsd
13388      VAR_OS_TYPE=unix
13389      ;;
13390    *cygwin*)
13391      VAR_OS=windows
13392      VAR_OS_ENV=windows.cygwin
13393      ;;
13394    *mingw*)
13395      VAR_OS=windows
13396      VAR_OS_ENV=windows.msys
13397      ;;
13398    *aix*)
13399      VAR_OS=aix
13400      VAR_OS_TYPE=unix
13401      ;;
13402    *)
13403      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
13404      ;;
13405  esac
13406
13407
13408  # First argument is the cpu name from the trip/quad
13409  case "$build_cpu" in
13410    x86_64)
13411      VAR_CPU=x86_64
13412      VAR_CPU_ARCH=x86
13413      VAR_CPU_BITS=64
13414      VAR_CPU_ENDIAN=little
13415      ;;
13416    i?86)
13417      VAR_CPU=x86
13418      VAR_CPU_ARCH=x86
13419      VAR_CPU_BITS=32
13420      VAR_CPU_ENDIAN=little
13421      ;;
13422    arm*)
13423      VAR_CPU=arm
13424      VAR_CPU_ARCH=arm
13425      VAR_CPU_BITS=32
13426      VAR_CPU_ENDIAN=little
13427      ;;
13428    aarch64)
13429      VAR_CPU=aarch64
13430      VAR_CPU_ARCH=aarch64
13431      VAR_CPU_BITS=64
13432      VAR_CPU_ENDIAN=little
13433      ;;
13434    powerpc)
13435      VAR_CPU=ppc
13436      VAR_CPU_ARCH=ppc
13437      VAR_CPU_BITS=32
13438      VAR_CPU_ENDIAN=big
13439      ;;
13440    powerpc64)
13441      VAR_CPU=ppc64
13442      VAR_CPU_ARCH=ppc
13443      VAR_CPU_BITS=64
13444      VAR_CPU_ENDIAN=big
13445      ;;
13446    powerpc64le)
13447      VAR_CPU=ppc64
13448      VAR_CPU_ARCH=ppc
13449      VAR_CPU_BITS=64
13450      VAR_CPU_ENDIAN=little
13451      ;;
13452    s390)
13453      VAR_CPU=s390
13454      VAR_CPU_ARCH=s390
13455      VAR_CPU_BITS=32
13456      VAR_CPU_ENDIAN=big
13457      ;;
13458    s390x)
13459      VAR_CPU=s390x
13460      VAR_CPU_ARCH=s390
13461      VAR_CPU_BITS=64
13462      VAR_CPU_ENDIAN=big
13463      ;;
13464    sparc)
13465      VAR_CPU=sparc
13466      VAR_CPU_ARCH=sparc
13467      VAR_CPU_BITS=32
13468      VAR_CPU_ENDIAN=big
13469      ;;
13470    sparcv9|sparc64)
13471      VAR_CPU=sparcv9
13472      VAR_CPU_ARCH=sparc
13473      VAR_CPU_BITS=64
13474      VAR_CPU_ENDIAN=big
13475      ;;
13476    *)
13477      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
13478      ;;
13479  esac
13480
13481  # ..and setup our own variables. (Do this explicitely to facilitate searching)
13482  OPENJDK_BUILD_OS="$VAR_OS"
13483  if test "x$VAR_OS_TYPE" != x; then
13484    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
13485  else
13486    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
13487  fi
13488  if test "x$VAR_OS_ENV" != x; then
13489    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
13490  else
13491    OPENJDK_BUILD_OS_ENV="$VAR_OS"
13492  fi
13493  OPENJDK_BUILD_CPU="$VAR_CPU"
13494  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
13495  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
13496  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13497
13498
13499
13500
13501
13502
13503
13504
13505  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
13506$as_echo_n "checking openjdk-build os-cpu... " >&6; }
13507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
13508$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
13509
13510  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13511
13512  case "$host_os" in
13513    *linux*)
13514      VAR_OS=linux
13515      VAR_OS_TYPE=unix
13516      ;;
13517    *solaris*)
13518      VAR_OS=solaris
13519      VAR_OS_TYPE=unix
13520      ;;
13521    *darwin*)
13522      VAR_OS=macosx
13523      VAR_OS_TYPE=unix
13524      ;;
13525    *bsd*)
13526      VAR_OS=bsd
13527      VAR_OS_TYPE=unix
13528      ;;
13529    *cygwin*)
13530      VAR_OS=windows
13531      VAR_OS_ENV=windows.cygwin
13532      ;;
13533    *mingw*)
13534      VAR_OS=windows
13535      VAR_OS_ENV=windows.msys
13536      ;;
13537    *aix*)
13538      VAR_OS=aix
13539      VAR_OS_TYPE=unix
13540      ;;
13541    *)
13542      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
13543      ;;
13544  esac
13545
13546
13547  # First argument is the cpu name from the trip/quad
13548  case "$host_cpu" in
13549    x86_64)
13550      VAR_CPU=x86_64
13551      VAR_CPU_ARCH=x86
13552      VAR_CPU_BITS=64
13553      VAR_CPU_ENDIAN=little
13554      ;;
13555    i?86)
13556      VAR_CPU=x86
13557      VAR_CPU_ARCH=x86
13558      VAR_CPU_BITS=32
13559      VAR_CPU_ENDIAN=little
13560      ;;
13561    arm*)
13562      VAR_CPU=arm
13563      VAR_CPU_ARCH=arm
13564      VAR_CPU_BITS=32
13565      VAR_CPU_ENDIAN=little
13566      ;;
13567    aarch64)
13568      VAR_CPU=aarch64
13569      VAR_CPU_ARCH=aarch64
13570      VAR_CPU_BITS=64
13571      VAR_CPU_ENDIAN=little
13572      ;;
13573    powerpc)
13574      VAR_CPU=ppc
13575      VAR_CPU_ARCH=ppc
13576      VAR_CPU_BITS=32
13577      VAR_CPU_ENDIAN=big
13578      ;;
13579    powerpc64)
13580      VAR_CPU=ppc64
13581      VAR_CPU_ARCH=ppc
13582      VAR_CPU_BITS=64
13583      VAR_CPU_ENDIAN=big
13584      ;;
13585    powerpc64le)
13586      VAR_CPU=ppc64
13587      VAR_CPU_ARCH=ppc
13588      VAR_CPU_BITS=64
13589      VAR_CPU_ENDIAN=little
13590      ;;
13591    s390)
13592      VAR_CPU=s390
13593      VAR_CPU_ARCH=s390
13594      VAR_CPU_BITS=32
13595      VAR_CPU_ENDIAN=big
13596      ;;
13597    s390x)
13598      VAR_CPU=s390x
13599      VAR_CPU_ARCH=s390
13600      VAR_CPU_BITS=64
13601      VAR_CPU_ENDIAN=big
13602      ;;
13603    sparc)
13604      VAR_CPU=sparc
13605      VAR_CPU_ARCH=sparc
13606      VAR_CPU_BITS=32
13607      VAR_CPU_ENDIAN=big
13608      ;;
13609    sparcv9|sparc64)
13610      VAR_CPU=sparcv9
13611      VAR_CPU_ARCH=sparc
13612      VAR_CPU_BITS=64
13613      VAR_CPU_ENDIAN=big
13614      ;;
13615    *)
13616      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
13617      ;;
13618  esac
13619
13620  # ... and setup our own variables. (Do this explicitely to facilitate searching)
13621  OPENJDK_TARGET_OS="$VAR_OS"
13622  if test "x$VAR_OS_TYPE" != x; then
13623    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
13624  else
13625    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
13626  fi
13627  if test "x$VAR_OS_ENV" != x; then
13628    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
13629  else
13630    OPENJDK_TARGET_OS_ENV="$VAR_OS"
13631  fi
13632  OPENJDK_TARGET_CPU="$VAR_CPU"
13633  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
13634  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
13635  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13636
13637
13638
13639
13640
13641
13642
13643
13644  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
13645$as_echo_n "checking openjdk-target os-cpu... " >&6; }
13646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
13647$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
13648
13649
13650
13651# Check whether --with-target-bits was given.
13652if test "${with_target_bits+set}" = set; then :
13653  withval=$with_target_bits;
13654fi
13655
13656
13657  # We have three types of compiles:
13658  # native  == normal compilation, target system == build system
13659  # cross   == traditional cross compilation, target system != build system; special toolchain needed
13660  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
13661  #
13662  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
13663    # We're doing a proper cross-compilation
13664    COMPILE_TYPE="cross"
13665  else
13666    COMPILE_TYPE="native"
13667  fi
13668
13669  if test "x$with_target_bits" != x; then
13670    if test "x$COMPILE_TYPE" = "xcross"; then
13671      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
13672    fi
13673
13674    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13675      # A reduced build is requested
13676      COMPILE_TYPE="reduced"
13677      OPENJDK_TARGET_CPU_BITS=32
13678      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
13679        OPENJDK_TARGET_CPU=x86
13680      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
13681        OPENJDK_TARGET_CPU=sparc
13682      else
13683        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
13684      fi
13685    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
13686      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
13687    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
13688      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
13689$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
13690    else
13691      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
13692    fi
13693  fi
13694
13695
13696  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
13697$as_echo_n "checking compilation type... " >&6; }
13698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
13699$as_echo "$COMPILE_TYPE" >&6; }
13700
13701
13702  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
13703    REQUIRED_OS_NAME=SunOS
13704    REQUIRED_OS_VERSION=5.10
13705  fi
13706  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
13707    REQUIRED_OS_NAME=Linux
13708    REQUIRED_OS_VERSION=2.6
13709  fi
13710  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13711    REQUIRED_OS_NAME=Windows
13712    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
13713      REQUIRED_OS_VERSION=5.2
13714    else
13715      REQUIRED_OS_VERSION=5.1
13716    fi
13717  fi
13718  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
13719    REQUIRED_OS_NAME=Darwin
13720    REQUIRED_OS_VERSION=11.2
13721  fi
13722
13723
13724
13725
13726
13727  # Also store the legacy naming of the cpu.
13728  # Ie i586 and amd64 instead of x86 and x86_64
13729  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
13730  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13731    OPENJDK_TARGET_CPU_LEGACY="i586"
13732  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13733    # On all platforms except MacOSX replace x86_64 with amd64.
13734    OPENJDK_TARGET_CPU_LEGACY="amd64"
13735  fi
13736
13737
13738  # And the second legacy naming of the cpu.
13739  # Ie i386 and amd64 instead of x86 and x86_64.
13740  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
13741  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13742    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
13743  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13744    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
13745  fi
13746
13747
13748  # This is the name of the cpu (but using i386 and amd64 instead of
13749  # x86 and x86_64, respectively), preceeded by a /, to be used when
13750  # locating libraries. On macosx, it's empty, though.
13751  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
13752  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13753    OPENJDK_TARGET_CPU_LIBDIR=""
13754  fi
13755
13756
13757  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
13758  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
13759  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
13760  OPENJDK_TARGET_CPU_ISADIR=""
13761  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13762    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13763      OPENJDK_TARGET_CPU_ISADIR="/amd64"
13764    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
13765      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
13766    fi
13767  fi
13768
13769
13770  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
13771  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
13772  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
13773    # On linux only, we replace x86 with i386.
13774    OPENJDK_TARGET_CPU_OSARCH="i386"
13775  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13776    # On all platforms except macosx, we replace x86_64 with amd64.
13777    OPENJDK_TARGET_CPU_OSARCH="amd64"
13778  fi
13779
13780
13781  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
13782  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13783    OPENJDK_TARGET_CPU_JLI="i386"
13784  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13785    # On all platforms except macosx, we replace x86_64 with amd64.
13786    OPENJDK_TARGET_CPU_JLI="amd64"
13787  fi
13788  # Now setup the -D flags for building libjli.
13789  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
13790  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13791    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
13792      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
13793    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
13794      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
13795    fi
13796  fi
13797
13798
13799  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13800      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
13801  else
13802      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
13803  fi
13804
13805
13806  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13807    A_LP64="LP64:="
13808    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
13809    # unpack200.exe
13810    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
13811      ADD_LP64="-D_LP64=1"
13812    fi
13813  fi
13814  LP64=$A_LP64
13815
13816
13817  if test "x$COMPILE_TYPE" = "xcross"; then
13818    # FIXME: ... or should this include reduced builds..?
13819    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
13820  else
13821    DEFINE_CROSS_COMPILE_ARCH=""
13822  fi
13823
13824
13825  # ZERO_ARCHDEF is used to enable architecture-specific code
13826  case "${OPENJDK_TARGET_CPU}" in
13827    ppc)     ZERO_ARCHDEF=PPC32 ;;
13828    ppc64)   ZERO_ARCHDEF=PPC64 ;;
13829    s390*)   ZERO_ARCHDEF=S390  ;;
13830    sparc*)  ZERO_ARCHDEF=SPARC ;;
13831    x86_64*) ZERO_ARCHDEF=AMD64 ;;
13832    x86)     ZERO_ARCHDEF=IA32  ;;
13833    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
13834  esac
13835
13836
13837
13838
13839# Continue setting up basic stuff. Most remaining code require fundamental tools.
13840
13841  # Save the current directory this script was started from
13842  CURDIR="$PWD"
13843
13844  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13845    PATH_SEP=";"
13846
13847  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
13848  if test $SRC_ROOT_LENGTH -gt 100; then
13849    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
13850  fi
13851
13852  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13853    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
13854$as_echo_n "checking cygwin release... " >&6; }
13855    CYGWIN_VERSION=`$UNAME -r`
13856    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
13857$as_echo "$CYGWIN_VERSION" >&6; }
13858    WINDOWS_ENV_VENDOR='cygwin'
13859    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
13860
13861    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
13862    if test "x$CYGWIN_VERSION_OLD" != x; then
13863      { $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
13864$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;}
13865      as_fn_error $? "Cannot continue" "$LINENO" 5
13866    fi
13867    if test "x$CYGPATH" = x; then
13868      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
13869    fi
13870    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
13871$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
13872    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
13873    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
13874    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
13875    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
13876    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
13877$as_echo "$CYGWIN_ROOT_PATH" >&6; }
13878    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
13879    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
13880    if test "x$test_cygdrive_prefix" = x; then
13881      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
13882    fi
13883  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13884    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
13885$as_echo_n "checking msys release... " >&6; }
13886    MSYS_VERSION=`$UNAME -r`
13887    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
13888$as_echo "$MSYS_VERSION" >&6; }
13889
13890    WINDOWS_ENV_VENDOR='msys'
13891    WINDOWS_ENV_VERSION="$MSYS_VERSION"
13892
13893    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
13894$as_echo_n "checking msys root directory as unix-style path... " >&6; }
13895    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
13896    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
13897
13898  windows_path="$MSYS_ROOT_PATH"
13899  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13900    unix_path=`$CYGPATH -u "$windows_path"`
13901    MSYS_ROOT_PATH="$unix_path"
13902  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13903    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13904    MSYS_ROOT_PATH="$unix_path"
13905  fi
13906
13907    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
13908$as_echo "$MSYS_ROOT_PATH" >&6; }
13909    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
13910  else
13911    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
13912  fi
13913
13914  # Test if windows or unix (cygwin/msys) find is first in path.
13915  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
13916$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
13917  FIND_BINARY_OUTPUT=`find --version 2>&1`
13918  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
13919    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
13920$as_echo "unix style" >&6; }
13921  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
13922    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
13923$as_echo "Windows" >&6; }
13924    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
13925$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
13926    { $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
13927$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
13928    as_fn_error $? "Cannot continue" "$LINENO" 5
13929  else
13930    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
13931$as_echo "unknown" >&6; }
13932    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
13933$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
13934  fi
13935
13936  else
13937    PATH_SEP=":"
13938  fi
13939
13940
13941  # We get the top-level directory from the supporting wrappers.
13942  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
13943$as_echo_n "checking for top-level directory... " >&6; }
13944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
13945$as_echo "$TOPDIR" >&6; }
13946
13947
13948  # Save the original version of TOPDIR for string comparisons
13949  ORIGINAL_TOPDIR="$TOPDIR"
13950
13951
13952  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
13953
13954  # Only process if variable expands to non-empty
13955
13956  if test "x$CURDIR" != x; then
13957    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13958
13959  # Input might be given as Windows format, start by converting to
13960  # unix format.
13961  path="$CURDIR"
13962  new_path=`$CYGPATH -u "$path"`
13963
13964  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13965  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13966  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13967  # "foo.exe" is OK but "foo" is an error.
13968  #
13969  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13970  # It is also a way to make sure we got the proper file name for the real test later on.
13971  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13972  if test "x$test_shortpath" = x; then
13973    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
13974$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
13975    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
13976  fi
13977
13978  # Call helper function which possibly converts this using DOS-style short mode.
13979  # If so, the updated path is stored in $new_path.
13980
13981  input_path="$new_path"
13982  # Check if we need to convert this using DOS-style short mode. If the path
13983  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13984  # take no chances and rewrite it.
13985  # Note: m4 eats our [], so we need to use [ and ] instead.
13986  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13987  if test "x$has_forbidden_chars" != x; then
13988    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13989    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13990    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13991    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13992      # Going to short mode and back again did indeed matter. Since short mode is
13993      # case insensitive, let's make it lowercase to improve readability.
13994      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13995      # Now convert it back to Unix-style (cygpath)
13996      input_path=`$CYGPATH -u "$shortmode_path"`
13997      new_path="$input_path"
13998    fi
13999  fi
14000
14001  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14002  if test "x$test_cygdrive_prefix" = x; then
14003    # As a simple fix, exclude /usr/bin since it's not a real path.
14004    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14005      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14006      # a path prefixed by /cygdrive for fixpath to work.
14007      new_path="$CYGWIN_ROOT_PATH$input_path"
14008    fi
14009  fi
14010
14011
14012  if test "x$path" != "x$new_path"; then
14013    CURDIR="$new_path"
14014    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14015$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14016  fi
14017
14018    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14019
14020  path="$CURDIR"
14021  has_colon=`$ECHO $path | $GREP ^.:`
14022  new_path="$path"
14023  if test "x$has_colon" = x; then
14024    # Not in mixed or Windows style, start by that.
14025    new_path=`cmd //c echo $path`
14026  fi
14027
14028
14029  input_path="$new_path"
14030  # Check if we need to convert this using DOS-style short mode. If the path
14031  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14032  # take no chances and rewrite it.
14033  # Note: m4 eats our [], so we need to use [ and ] instead.
14034  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14035  if test "x$has_forbidden_chars" != x; then
14036    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14037    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14038  fi
14039
14040
14041  windows_path="$new_path"
14042  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14043    unix_path=`$CYGPATH -u "$windows_path"`
14044    new_path="$unix_path"
14045  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14046    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14047    new_path="$unix_path"
14048  fi
14049
14050  if test "x$path" != "x$new_path"; then
14051    CURDIR="$new_path"
14052    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14053$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14054  fi
14055
14056  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14057  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14058
14059    else
14060      # We're on a unix platform. Hooray! :)
14061      path="$CURDIR"
14062      has_space=`$ECHO "$path" | $GREP " "`
14063      if test "x$has_space" != x; then
14064        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14065$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14066        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14067      fi
14068
14069      # Use eval to expand a potential ~
14070      eval path="$path"
14071      if test ! -f "$path" && test ! -d "$path"; then
14072        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14073      fi
14074
14075      CURDIR="`cd "$path"; $THEPWDCMD -L`"
14076    fi
14077  fi
14078
14079
14080  # Only process if variable expands to non-empty
14081
14082  if test "x$TOPDIR" != x; then
14083    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14084
14085  # Input might be given as Windows format, start by converting to
14086  # unix format.
14087  path="$TOPDIR"
14088  new_path=`$CYGPATH -u "$path"`
14089
14090  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14091  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14092  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14093  # "foo.exe" is OK but "foo" is an error.
14094  #
14095  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14096  # It is also a way to make sure we got the proper file name for the real test later on.
14097  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14098  if test "x$test_shortpath" = x; then
14099    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14100$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14101    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
14102  fi
14103
14104  # Call helper function which possibly converts this using DOS-style short mode.
14105  # If so, the updated path is stored in $new_path.
14106
14107  input_path="$new_path"
14108  # Check if we need to convert this using DOS-style short mode. If the path
14109  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14110  # take no chances and rewrite it.
14111  # Note: m4 eats our [], so we need to use [ and ] instead.
14112  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14113  if test "x$has_forbidden_chars" != x; then
14114    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14115    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14116    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14117    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14118      # Going to short mode and back again did indeed matter. Since short mode is
14119      # case insensitive, let's make it lowercase to improve readability.
14120      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14121      # Now convert it back to Unix-style (cygpath)
14122      input_path=`$CYGPATH -u "$shortmode_path"`
14123      new_path="$input_path"
14124    fi
14125  fi
14126
14127  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14128  if test "x$test_cygdrive_prefix" = x; then
14129    # As a simple fix, exclude /usr/bin since it's not a real path.
14130    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14131      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14132      # a path prefixed by /cygdrive for fixpath to work.
14133      new_path="$CYGWIN_ROOT_PATH$input_path"
14134    fi
14135  fi
14136
14137
14138  if test "x$path" != "x$new_path"; then
14139    TOPDIR="$new_path"
14140    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14141$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14142  fi
14143
14144    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14145
14146  path="$TOPDIR"
14147  has_colon=`$ECHO $path | $GREP ^.:`
14148  new_path="$path"
14149  if test "x$has_colon" = x; then
14150    # Not in mixed or Windows style, start by that.
14151    new_path=`cmd //c echo $path`
14152  fi
14153
14154
14155  input_path="$new_path"
14156  # Check if we need to convert this using DOS-style short mode. If the path
14157  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14158  # take no chances and rewrite it.
14159  # Note: m4 eats our [], so we need to use [ and ] instead.
14160  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14161  if test "x$has_forbidden_chars" != x; then
14162    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14163    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14164  fi
14165
14166
14167  windows_path="$new_path"
14168  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14169    unix_path=`$CYGPATH -u "$windows_path"`
14170    new_path="$unix_path"
14171  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14172    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14173    new_path="$unix_path"
14174  fi
14175
14176  if test "x$path" != "x$new_path"; then
14177    TOPDIR="$new_path"
14178    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14179$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14180  fi
14181
14182  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14183  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14184
14185    else
14186      # We're on a unix platform. Hooray! :)
14187      path="$TOPDIR"
14188      has_space=`$ECHO "$path" | $GREP " "`
14189      if test "x$has_space" != x; then
14190        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14191$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14192        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14193      fi
14194
14195      # Use eval to expand a potential ~
14196      eval path="$path"
14197      if test ! -f "$path" && test ! -d "$path"; then
14198        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14199      fi
14200
14201      TOPDIR="`cd "$path"; $THEPWDCMD -L`"
14202    fi
14203  fi
14204
14205  # SRC_ROOT is a traditional alias for TOPDIR.
14206  SRC_ROOT=$TOPDIR
14207
14208  # Calculate a canonical version of TOPDIR for string comparisons
14209  CANONICAL_TOPDIR=$TOPDIR
14210
14211  if test "x$OPENJDK_BUILD_OS" != xwindows; then
14212    # Follow a chain of symbolic links. Use readlink
14213    # where it exists, else fall back to horribly
14214    # complicated shell code.
14215    if test "x$READLINK_TESTED" != yes; then
14216      # On MacOSX there is a readlink tool with a different
14217      # purpose than the GNU readlink tool. Check the found readlink.
14218      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
14219      if test "x$ISGNU" = x; then
14220        # A readlink that we do not know how to use.
14221        # Are there other non-GNU readlinks out there?
14222        READLINK_TESTED=yes
14223        READLINK=
14224      fi
14225    fi
14226
14227    if test "x$READLINK" != x; then
14228      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
14229    else
14230      # Save the current directory for restoring afterwards
14231      STARTDIR=$PWD
14232      COUNTER=0
14233      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
14234      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
14235      cd $sym_link_dir
14236      # Use -P flag to resolve symlinks in directories.
14237      cd `$THEPWDCMD -P`
14238      sym_link_dir=`$THEPWDCMD -P`
14239      # Resolve file symlinks
14240      while test $COUNTER -lt 20; do
14241        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
14242        if test "x$ISLINK" == x; then
14243          # This is not a symbolic link! We are done!
14244          break
14245        fi
14246        # Again resolve directory symlinks since the target of the just found
14247        # link could be in a different directory
14248        cd `$DIRNAME $ISLINK`
14249        sym_link_dir=`$THEPWDCMD -P`
14250        sym_link_file=`$BASENAME $ISLINK`
14251        let COUNTER=COUNTER+1
14252      done
14253      cd $STARTDIR
14254      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
14255    fi
14256  fi
14257
14258
14259
14260  # Locate the directory of this script.
14261  AUTOCONF_DIR=$TOPDIR/common/autoconf
14262
14263
14264# Check if it's a pure open build or if custom sources are to be used.
14265
14266  # Check whether --enable-openjdk-only was given.
14267if test "${enable_openjdk_only+set}" = set; then :
14268  enableval=$enable_openjdk_only;
14269else
14270  enable_openjdk_only="no"
14271fi
14272
14273
14274  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
14275$as_echo_n "checking for presence of closed sources... " >&6; }
14276  if test -d "$SRC_ROOT/jdk/src/closed"; then
14277    CLOSED_SOURCE_PRESENT=yes
14278  else
14279    CLOSED_SOURCE_PRESENT=no
14280  fi
14281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
14282$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
14283
14284  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
14285$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
14286  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
14287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
14288$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
14289
14290  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
14291    OPENJDK=true
14292    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14293      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
14294$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
14295    fi
14296  else
14297    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14298      OPENJDK=true
14299    else
14300      OPENJDK=false
14301    fi
14302  fi
14303
14304  if test "x$OPENJDK" = "xtrue"; then
14305    SET_OPENJDK="OPENJDK=true"
14306  fi
14307
14308
14309
14310  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
14311  # the IncludeCustomExtension macro.
14312
14313
14314# Check whether --with-custom-make-dir was given.
14315if test "${with_custom_make_dir+set}" = set; then :
14316  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
14317$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
14318fi
14319
14320
14321
14322
14323# These are needed to be able to create a configuration name (and thus the output directory)
14324
14325  ###############################################################################
14326  #
14327  # Check which variant of the JDK that we want to build.
14328  # Currently we have:
14329  #    normal:   standard edition
14330  # but the custom make system may add other variants
14331  #
14332  # Effectively the JDK variant gives a name to a specific set of
14333  # modules to compile into the JDK. In the future, these modules
14334  # might even be Jigsaw modules.
14335  #
14336  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
14337$as_echo_n "checking which variant of the JDK to build... " >&6; }
14338
14339# Check whether --with-jdk-variant was given.
14340if test "${with_jdk_variant+set}" = set; then :
14341  withval=$with_jdk_variant;
14342fi
14343
14344
14345  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
14346    JDK_VARIANT="normal"
14347  else
14348    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
14349  fi
14350
14351
14352
14353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
14354$as_echo "$JDK_VARIANT" >&6; }
14355
14356
14357###############################################################################
14358#
14359# Check which interpreter of the JVM we want to build.
14360# Currently we have:
14361#    template: Template interpreter (the default)
14362#    cpp     : C++ interpreter
14363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
14364$as_echo_n "checking which interpreter of the JVM to build... " >&6; }
14365
14366# Check whether --with-jvm-interpreter was given.
14367if test "${with_jvm_interpreter+set}" = set; then :
14368  withval=$with_jvm_interpreter;
14369fi
14370
14371
14372if test "x$with_jvm_interpreter" = x; then
14373     with_jvm_interpreter="template"
14374fi
14375
14376JVM_INTERPRETER="$with_jvm_interpreter"
14377
14378if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
14379   as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
14380fi
14381
14382
14383
14384{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
14385$as_echo "$with_jvm_interpreter" >&6; }
14386
14387
14388
14389  ###############################################################################
14390  #
14391  # Check which variants of the JVM that we want to build.
14392  # Currently we have:
14393  #    server: normal interpreter and a tiered C1/C2 compiler
14394  #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
14395  #    minimal1: reduced form of client with optional VM services and features stripped out
14396  #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
14397  #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
14398  #    zero: no machine code interpreter, no compiler
14399  #    zeroshark: zero interpreter and shark/llvm compiler backend
14400#    core: interpreter only, no compiler (only works on some platforms)
14401  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
14402$as_echo_n "checking which variants of the JVM to build... " >&6; }
14403
14404# Check whether --with-jvm-variants was given.
14405if test "${with_jvm_variants+set}" = set; then :
14406  withval=$with_jvm_variants;
14407fi
14408
14409
14410  if test "x$with_jvm_variants" = x; then
14411    with_jvm_variants="server"
14412  fi
14413
14414  JVM_VARIANTS=",$with_jvm_variants,"
14415  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,//'`
14416
14417  if test "x$TEST_VARIANTS" != "x,"; then
14418     as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
14419  fi
14420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
14421$as_echo "$with_jvm_variants" >&6; }
14422
14423  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
14424  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
14425  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
14426  JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
14427  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
14428  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
14429  JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
14430
14431  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14432    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14433      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
14434    fi
14435  fi
14436  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14437    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14438      as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
14439    fi
14440  fi
14441  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14442    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14443      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
14444    fi
14445  fi
14446
14447  # Replace the commas with AND for use in the build directory name.
14448  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
14449  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/'`
14450  if test "x$COUNT_VARIANTS" != "x,1"; then
14451    BUILDING_MULTIPLE_JVM_VARIANTS=yes
14452  else
14453    BUILDING_MULTIPLE_JVM_VARIANTS=no
14454  fi
14455
14456
14457
14458
14459
14460
14461
14462
14463
14464
14465  INCLUDE_SA=true
14466  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
14467    INCLUDE_SA=false
14468  fi
14469  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
14470    INCLUDE_SA=false
14471  fi
14472  if test "x$OPENJDK_TARGET_OS" = xaix ; then
14473    INCLUDE_SA=false
14474  fi
14475  if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
14476    INCLUDE_SA=false
14477  fi
14478
14479
14480  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
14481    MACOSX_UNIVERSAL="true"
14482  fi
14483
14484
14485
14486
14487  ###############################################################################
14488  #
14489  # Set the debug level
14490  #    release: no debug information, all optimizations, no asserts.
14491  #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
14492  #    fastdebug: debug information (-g), all optimizations, all asserts
14493  #    slowdebug: debug information (-g), no optimizations, all asserts
14494  #
14495  DEBUG_LEVEL="release"
14496  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
14497$as_echo_n "checking which debug level to use... " >&6; }
14498  # Check whether --enable-debug was given.
14499if test "${enable_debug+set}" = set; then :
14500  enableval=$enable_debug;
14501        ENABLE_DEBUG="${enableval}"
14502        DEBUG_LEVEL="fastdebug"
14503
14504else
14505  ENABLE_DEBUG="no"
14506fi
14507
14508
14509
14510# Check whether --with-debug-level was given.
14511if test "${with_debug_level+set}" = set; then :
14512  withval=$with_debug_level;
14513        DEBUG_LEVEL="${withval}"
14514        if test "x$ENABLE_DEBUG" = xyes; then
14515          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
14516        fi
14517
14518fi
14519
14520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
14521$as_echo "$DEBUG_LEVEL" >&6; }
14522
14523  if test "x$DEBUG_LEVEL" != xrelease && \
14524      test "x$DEBUG_LEVEL" != xoptimized && \
14525      test "x$DEBUG_LEVEL" != xfastdebug && \
14526      test "x$DEBUG_LEVEL" != xslowdebug; then
14527    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
14528  fi
14529
14530
14531  ###############################################################################
14532  #
14533  # Setup legacy vars/targets and new vars to deal with different debug levels.
14534  #
14535
14536  case $DEBUG_LEVEL in
14537    release )
14538      VARIANT="OPT"
14539      FASTDEBUG="false"
14540      DEBUG_CLASSFILES="false"
14541      BUILD_VARIANT_RELEASE=""
14542      HOTSPOT_DEBUG_LEVEL="product"
14543      HOTSPOT_EXPORT="product"
14544      ;;
14545    fastdebug )
14546      VARIANT="DBG"
14547      FASTDEBUG="true"
14548      DEBUG_CLASSFILES="true"
14549      BUILD_VARIANT_RELEASE="-fastdebug"
14550      HOTSPOT_DEBUG_LEVEL="fastdebug"
14551      HOTSPOT_EXPORT="fastdebug"
14552      ;;
14553    slowdebug )
14554      VARIANT="DBG"
14555      FASTDEBUG="false"
14556      DEBUG_CLASSFILES="true"
14557      BUILD_VARIANT_RELEASE="-debug"
14558      HOTSPOT_DEBUG_LEVEL="debug"
14559      HOTSPOT_EXPORT="debug"
14560      ;;
14561    optimized )
14562      VARIANT="OPT"
14563      FASTDEBUG="false"
14564      DEBUG_CLASSFILES="false"
14565      BUILD_VARIANT_RELEASE="-optimized"
14566      HOTSPOT_DEBUG_LEVEL="optimized"
14567      HOTSPOT_EXPORT="optimized"
14568      ;;
14569  esac
14570
14571  # The debug level 'optimized' is a little special because it is currently only
14572  # applicable to the HotSpot build where it means to build a completely
14573  # optimized version of the VM without any debugging code (like for the
14574  # 'release' debug level which is called 'product' in the HotSpot build) but
14575  # with the exception that it can contain additional code which is otherwise
14576  # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
14577  # test new and/or experimental features which are not intended for customer
14578  # shipment. Because these new features need to be tested and benchmarked in
14579  # real world scenarios, we want to build the containing JDK at the 'release'
14580  # debug level.
14581  if test "x$DEBUG_LEVEL" = xoptimized; then
14582    DEBUG_LEVEL="release"
14583  fi
14584
14585  #####
14586  # Generate the legacy makefile targets for hotspot.
14587  # The hotspot api for selecting the build artifacts, really, needs to be improved.
14588  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
14589  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
14590  # But until then ...
14591  HOTSPOT_TARGET=""
14592
14593  if test "x$JVM_VARIANT_SERVER" = xtrue; then
14594    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
14595  fi
14596
14597  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14598    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
14599  fi
14600
14601  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14602    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
14603  fi
14604
14605  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14606    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
14607  fi
14608
14609  if test "x$JVM_VARIANT_ZERO" = xtrue; then
14610    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
14611  fi
14612
14613  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
14614    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
14615  fi
14616
14617  if test "x$JVM_VARIANT_CORE" = xtrue; then
14618    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
14619  fi
14620
14621  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
14622
14623  # On Macosx universal binaries are produced, but they only contain
14624  # 64 bit intel. This invalidates control of which jvms are built
14625  # from configure, but only server is valid anyway. Fix this
14626  # when hotspot makefiles are rewritten.
14627  if test "x$MACOSX_UNIVERSAL" = xtrue; then
14628    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
14629  fi
14630
14631  #####
14632
14633
14634
14635
14636
14637
14638
14639
14640# With basic setup done, call the custom early hook.
14641
14642
14643# Check if we have devkits, extra paths or sysroot set.
14644
14645
14646# Check whether --with-devkit was given.
14647if test "${with_devkit+set}" = set; then :
14648  withval=$with_devkit;
14649
14650  # Only process if variable expands to non-empty
14651
14652  if test "x$with_devkit" != x; then
14653    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14654
14655  # Input might be given as Windows format, start by converting to
14656  # unix format.
14657  path="$with_devkit"
14658  new_path=`$CYGPATH -u "$path"`
14659
14660  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14661  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14662  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14663  # "foo.exe" is OK but "foo" is an error.
14664  #
14665  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14666  # It is also a way to make sure we got the proper file name for the real test later on.
14667  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14668  if test "x$test_shortpath" = x; then
14669    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14670$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14671    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
14672  fi
14673
14674  # Call helper function which possibly converts this using DOS-style short mode.
14675  # If so, the updated path is stored in $new_path.
14676
14677  input_path="$new_path"
14678  # Check if we need to convert this using DOS-style short mode. If the path
14679  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14680  # take no chances and rewrite it.
14681  # Note: m4 eats our [], so we need to use [ and ] instead.
14682  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14683  if test "x$has_forbidden_chars" != x; then
14684    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14685    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14686    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14687    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14688      # Going to short mode and back again did indeed matter. Since short mode is
14689      # case insensitive, let's make it lowercase to improve readability.
14690      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14691      # Now convert it back to Unix-style (cygpath)
14692      input_path=`$CYGPATH -u "$shortmode_path"`
14693      new_path="$input_path"
14694    fi
14695  fi
14696
14697  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14698  if test "x$test_cygdrive_prefix" = x; then
14699    # As a simple fix, exclude /usr/bin since it's not a real path.
14700    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14701      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14702      # a path prefixed by /cygdrive for fixpath to work.
14703      new_path="$CYGWIN_ROOT_PATH$input_path"
14704    fi
14705  fi
14706
14707
14708  if test "x$path" != "x$new_path"; then
14709    with_devkit="$new_path"
14710    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14711$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14712  fi
14713
14714    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14715
14716  path="$with_devkit"
14717  has_colon=`$ECHO $path | $GREP ^.:`
14718  new_path="$path"
14719  if test "x$has_colon" = x; then
14720    # Not in mixed or Windows style, start by that.
14721    new_path=`cmd //c echo $path`
14722  fi
14723
14724
14725  input_path="$new_path"
14726  # Check if we need to convert this using DOS-style short mode. If the path
14727  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14728  # take no chances and rewrite it.
14729  # Note: m4 eats our [], so we need to use [ and ] instead.
14730  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14731  if test "x$has_forbidden_chars" != x; then
14732    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14733    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14734  fi
14735
14736
14737  windows_path="$new_path"
14738  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14739    unix_path=`$CYGPATH -u "$windows_path"`
14740    new_path="$unix_path"
14741  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14742    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14743    new_path="$unix_path"
14744  fi
14745
14746  if test "x$path" != "x$new_path"; then
14747    with_devkit="$new_path"
14748    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14749$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14750  fi
14751
14752  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14753  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14754
14755    else
14756      # We're on a unix platform. Hooray! :)
14757      path="$with_devkit"
14758      has_space=`$ECHO "$path" | $GREP " "`
14759      if test "x$has_space" != x; then
14760        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14761$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14762        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14763      fi
14764
14765      # Use eval to expand a potential ~
14766      eval path="$path"
14767      if test ! -f "$path" && test ! -d "$path"; then
14768        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
14769      fi
14770
14771      with_devkit="`cd "$path"; $THEPWDCMD -L`"
14772    fi
14773  fi
14774
14775        DEVKIT_ROOT="$with_devkit"
14776        # Check for a meta data info file in the root of the devkit
14777        if test -f "$DEVKIT_ROOT/devkit.info"; then
14778          . $DEVKIT_ROOT/devkit.info
14779          # This potentially sets the following:
14780          # A descriptive name of the devkit
14781
14782  if test "x$DEVKIT_NAME" = x; then
14783    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
14784  fi
14785
14786          # Corresponds to --with-extra-path
14787
14788  if test "x$DEVKIT_EXTRA_PATH" = x; then
14789    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
14790  fi
14791
14792          # Corresponds to --with-toolchain-path
14793
14794  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
14795    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
14796  fi
14797
14798          # Corresponds to --with-sysroot
14799
14800  if test "x$DEVKIT_SYSROOT" = x; then
14801    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
14802  fi
14803
14804
14805          # Identifies the Visual Studio version in the devkit
14806
14807  if test "x$DEVKIT_VS_VERSION" = x; then
14808    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
14809  fi
14810
14811          # The Visual Studio include environment variable
14812
14813  if test "x$DEVKIT_VS_INCLUDE" = x; then
14814    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
14815  fi
14816
14817          # The Visual Studio lib environment variable
14818
14819  if test "x$DEVKIT_VS_LIB" = x; then
14820    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
14821  fi
14822
14823          # Corresponds to --with-msvcr-dll
14824
14825  if test "x$DEVKIT_MSVCR_DLL" = x; then
14826    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
14827  fi
14828
14829          # Corresponds to --with-msvcp-dll
14830
14831  if test "x$DEVKIT_MSVCP_DLL" = x; then
14832    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
14833  fi
14834
14835        fi
14836
14837        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
14838$as_echo_n "checking for devkit... " >&6; }
14839        if test "x$DEVKIT_NAME" != x; then
14840          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
14841$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
14842        else
14843          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
14844$as_echo "$DEVKIT_ROOT" >&6; }
14845        fi
14846
14847
14848  if test "x$DEVKIT_EXTRA_PATH" != x; then
14849    if test "x$EXTRA_PATH" = x; then
14850      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
14851    else
14852      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
14853    fi
14854  fi
14855
14856
14857        # Fallback default of just /bin if DEVKIT_PATH is not defined
14858        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
14859          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
14860        fi
14861
14862  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
14863    if test "x$TOOLCHAIN_PATH" = x; then
14864      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
14865    else
14866      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
14867    fi
14868  fi
14869
14870
14871        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
14872        # places for backwards compatiblity.
14873        if test "x$DEVKIT_SYSROOT" != x; then
14874          SYSROOT="$DEVKIT_SYSROOT"
14875        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
14876          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
14877        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
14878          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
14879        fi
14880
14881
14882fi
14883
14884
14885  # You can force the sysroot if the sysroot encoded into the compiler tools
14886  # is not correct.
14887
14888# Check whether --with-sys-root was given.
14889if test "${with_sys_root+set}" = set; then :
14890  withval=$with_sys_root; SYSROOT=$with_sys_root
14891
14892fi
14893
14894
14895
14896# Check whether --with-sysroot was given.
14897if test "${with_sysroot+set}" = set; then :
14898  withval=$with_sysroot; SYSROOT=$with_sysroot
14899
14900fi
14901
14902
14903
14904# Check whether --with-tools-dir was given.
14905if test "${with_tools_dir+set}" = set; then :
14906  withval=$with_tools_dir;
14907  if test "x$with_tools_dir" != x; then
14908    if test "x$TOOLCHAIN_PATH" = x; then
14909      TOOLCHAIN_PATH="$with_tools_dir"
14910    else
14911      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
14912    fi
14913  fi
14914
14915
14916fi
14917
14918
14919
14920# Check whether --with-toolchain-path was given.
14921if test "${with_toolchain_path+set}" = set; then :
14922  withval=$with_toolchain_path;
14923  if test "x$with_toolchain_path" != x; then
14924    if test "x$TOOLCHAIN_PATH" = x; then
14925      TOOLCHAIN_PATH="$with_toolchain_path"
14926    else
14927      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
14928    fi
14929  fi
14930
14931
14932fi
14933
14934
14935
14936# Check whether --with-extra-path was given.
14937if test "${with_extra_path+set}" = set; then :
14938  withval=$with_extra_path;
14939  if test "x$with_extra_path" != x; then
14940    if test "x$EXTRA_PATH" = x; then
14941      EXTRA_PATH="$with_extra_path"
14942    else
14943      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
14944    fi
14945  fi
14946
14947
14948fi
14949
14950
14951  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
14952    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
14953    # If not, detect if Xcode is installed by running xcodebuild -version
14954    # if no Xcode installed, xcodebuild exits with 1
14955    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
14956    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
14957      # We need to use xcodebuild in the toolchain dir provided by the user, this will
14958      # fall back on the stub binary in /usr/bin/xcodebuild
14959      # Extract the first word of "xcodebuild", so it can be a program name with args.
14960set dummy xcodebuild; ac_word=$2
14961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14962$as_echo_n "checking for $ac_word... " >&6; }
14963if ${ac_cv_path_XCODEBUILD+:} false; then :
14964  $as_echo_n "(cached) " >&6
14965else
14966  case $XCODEBUILD in
14967  [\\/]* | ?:[\\/]*)
14968  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
14969  ;;
14970  *)
14971  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14972for as_dir in $TOOLCHAIN_PATH
14973do
14974  IFS=$as_save_IFS
14975  test -z "$as_dir" && as_dir=.
14976    for ac_exec_ext in '' $ac_executable_extensions; do
14977  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14978    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
14979    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14980    break 2
14981  fi
14982done
14983  done
14984IFS=$as_save_IFS
14985
14986  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
14987  ;;
14988esac
14989fi
14990XCODEBUILD=$ac_cv_path_XCODEBUILD
14991if test -n "$XCODEBUILD"; then
14992  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
14993$as_echo "$XCODEBUILD" >&6; }
14994else
14995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14996$as_echo "no" >&6; }
14997fi
14998
14999
15000    else
15001      # this should result in SYSROOT being empty, unless --with-sysroot is provided
15002      # when only the command line tools are installed there are no SDKs, so headers
15003      # are copied into the system frameworks
15004      XCODEBUILD=
15005
15006    fi
15007
15008    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
15009$as_echo_n "checking for sdk name... " >&6; }
15010
15011# Check whether --with-sdk-name was given.
15012if test "${with_sdk_name+set}" = set; then :
15013  withval=$with_sdk_name; SDKNAME=$with_sdk_name
15014
15015fi
15016
15017    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
15018$as_echo "$SDKNAME" >&6; }
15019
15020    # if toolchain path is specified then don't rely on system headers, they may not compile
15021    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
15022    test -z "$TOOLCHAIN_PATH" && \
15023      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
15024
15025    if test -z "$SYSROOT"; then
15026      if test -n "$XCODEBUILD"; then
15027        # if we don't have system headers, use default SDK name (last resort)
15028        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15029          SDKNAME=${SDKNAME:-macosx}
15030        fi
15031
15032        if test -n "$SDKNAME"; then
15033          # Call xcodebuild to determine SYSROOT
15034          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | grep '^Path: ' | sed 's/Path: //'`
15035        fi
15036      else
15037        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15038          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
15039        fi
15040      fi
15041    else
15042      # warn user if --with-sdk-name was also set
15043      if test -n "$with_sdk_name"; then
15044        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
15045$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
15046      fi
15047    fi
15048
15049    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
15050      # If no system framework headers, then SYSROOT must be set, or we won't build
15051      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
15052    fi
15053
15054    # Perform a basic sanity test
15055    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
15056      if test -z "$SYSROOT"; then
15057        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
15058      else
15059        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
15060      fi
15061    fi
15062
15063    # set SDKROOT too, Xcode tools will pick it up
15064    SDKROOT=$SYSROOT
15065
15066  fi
15067
15068  # Prepend the extra path to the global path
15069
15070  if test "x$EXTRA_PATH" != x; then
15071    if test "x$PATH" = x; then
15072      PATH="$EXTRA_PATH"
15073    else
15074      PATH="$EXTRA_PATH:$PATH"
15075    fi
15076  fi
15077
15078
15079  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
15080    # Add extra search paths on solaris for utilities like ar and as etc...
15081    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
15082  fi
15083
15084  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
15085$as_echo_n "checking for sysroot... " >&6; }
15086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
15087$as_echo "$SYSROOT" >&6; }
15088  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
15089$as_echo_n "checking for toolchain path... " >&6; }
15090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
15091$as_echo "$TOOLCHAIN_PATH" >&6; }
15092  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
15093$as_echo_n "checking for extra path... " >&6; }
15094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
15095$as_echo "$EXTRA_PATH" >&6; }
15096
15097
15098# To properly create a configuration name, we need to have the OpenJDK target
15099# and options (variants and debug level) parsed.
15100
15101
15102
15103# Check whether --with-conf-name was given.
15104if test "${with_conf_name+set}" = set; then :
15105  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
15106fi
15107
15108
15109  # Test from where we are running configure, in or outside of src root.
15110  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
15111$as_echo_n "checking where to store configuration... " >&6; }
15112  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
15113      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
15114      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
15115    # We are running configure from the src root.
15116    # Create a default ./build/target-variant-debuglevel output root.
15117    if test "x${CONF_NAME}" = x; then
15118      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
15119$as_echo "in default location" >&6; }
15120      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
15121    else
15122      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
15123$as_echo "in build directory with custom name" >&6; }
15124    fi
15125    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
15126    $MKDIR -p "$OUTPUT_ROOT"
15127    if test ! -d "$OUTPUT_ROOT"; then
15128      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
15129    fi
15130  else
15131    # We are running configure from outside of the src dir.
15132    # Then use the current directory as output dir!
15133    # If configuration is situated in normal build directory, just use the build
15134    # directory name as configuration name, otherwise use the complete path.
15135    if test "x${CONF_NAME}" = x; then
15136      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
15137    fi
15138    OUTPUT_ROOT="$CURDIR"
15139    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
15140$as_echo "in current directory" >&6; }
15141
15142    # WARNING: This might be a bad thing to do. You need to be sure you want to
15143    # have a configuration in this directory. Do some sanity checks!
15144
15145    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
15146      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
15147      # other files
15148      files_present=`$LS $OUTPUT_ROOT`
15149      # Configure has already touched config.log and confdefs.h in the current dir when this check
15150      # is performed.
15151      filtered_files=`$ECHO "$files_present" \
15152          | $SED -e 's/config.log//g' \
15153              -e 's/configure.log//g' \
15154              -e 's/confdefs.h//g' \
15155              -e 's/ //g' \
15156          | $TR -d '\n'`
15157      if test "x$filtered_files" != x; then
15158        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
15159$as_echo "$as_me: Current directory is $CURDIR." >&6;}
15160        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
15161$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
15162        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
15163$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
15164        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
15165$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
15166        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
15167$as_echo "$as_me: seriously mess up just about everything." >&6;}
15168        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
15169$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
15170        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
15171$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
15172        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
15173      fi
15174    fi
15175  fi
15176  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
15177$as_echo_n "checking what configuration name to use... " >&6; }
15178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
15179$as_echo "$CONF_NAME" >&6; }
15180
15181
15182  # Only process if variable expands to non-empty
15183
15184  if test "x$OUTPUT_ROOT" != x; then
15185    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15186
15187  # Input might be given as Windows format, start by converting to
15188  # unix format.
15189  path="$OUTPUT_ROOT"
15190  new_path=`$CYGPATH -u "$path"`
15191
15192  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15193  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15194  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15195  # "foo.exe" is OK but "foo" is an error.
15196  #
15197  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15198  # It is also a way to make sure we got the proper file name for the real test later on.
15199  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15200  if test "x$test_shortpath" = x; then
15201    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15202$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15203    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
15204  fi
15205
15206  # Call helper function which possibly converts this using DOS-style short mode.
15207  # If so, the updated path is stored in $new_path.
15208
15209  input_path="$new_path"
15210  # Check if we need to convert this using DOS-style short mode. If the path
15211  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15212  # take no chances and rewrite it.
15213  # Note: m4 eats our [], so we need to use [ and ] instead.
15214  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15215  if test "x$has_forbidden_chars" != x; then
15216    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15217    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15218    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15219    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15220      # Going to short mode and back again did indeed matter. Since short mode is
15221      # case insensitive, let's make it lowercase to improve readability.
15222      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15223      # Now convert it back to Unix-style (cygpath)
15224      input_path=`$CYGPATH -u "$shortmode_path"`
15225      new_path="$input_path"
15226    fi
15227  fi
15228
15229  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15230  if test "x$test_cygdrive_prefix" = x; then
15231    # As a simple fix, exclude /usr/bin since it's not a real path.
15232    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15233      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15234      # a path prefixed by /cygdrive for fixpath to work.
15235      new_path="$CYGWIN_ROOT_PATH$input_path"
15236    fi
15237  fi
15238
15239
15240  if test "x$path" != "x$new_path"; then
15241    OUTPUT_ROOT="$new_path"
15242    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15243$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15244  fi
15245
15246    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15247
15248  path="$OUTPUT_ROOT"
15249  has_colon=`$ECHO $path | $GREP ^.:`
15250  new_path="$path"
15251  if test "x$has_colon" = x; then
15252    # Not in mixed or Windows style, start by that.
15253    new_path=`cmd //c echo $path`
15254  fi
15255
15256
15257  input_path="$new_path"
15258  # Check if we need to convert this using DOS-style short mode. If the path
15259  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15260  # take no chances and rewrite it.
15261  # Note: m4 eats our [], so we need to use [ and ] instead.
15262  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15263  if test "x$has_forbidden_chars" != x; then
15264    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15265    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15266  fi
15267
15268
15269  windows_path="$new_path"
15270  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15271    unix_path=`$CYGPATH -u "$windows_path"`
15272    new_path="$unix_path"
15273  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15274    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15275    new_path="$unix_path"
15276  fi
15277
15278  if test "x$path" != "x$new_path"; then
15279    OUTPUT_ROOT="$new_path"
15280    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15281$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15282  fi
15283
15284  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15285  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15286
15287    else
15288      # We're on a unix platform. Hooray! :)
15289      path="$OUTPUT_ROOT"
15290      has_space=`$ECHO "$path" | $GREP " "`
15291      if test "x$has_space" != x; then
15292        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15293$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15294        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15295      fi
15296
15297      # Use eval to expand a potential ~
15298      eval path="$path"
15299      if test ! -f "$path" && test ! -d "$path"; then
15300        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
15301      fi
15302
15303      OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
15304    fi
15305  fi
15306
15307
15308  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
15309  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
15310
15311  SPEC=$OUTPUT_ROOT/spec.gmk
15312
15313  CONF_NAME=$CONF_NAME
15314
15315  OUTPUT_ROOT=$OUTPUT_ROOT
15316
15317
15318
15319  # The spec.gmk file contains all variables for the make system.
15320  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
15321
15322  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
15323  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
15324
15325  # The bootcycle-spec.gmk file contains support for boot cycle builds.
15326  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
15327
15328  # The compare.sh is used to compare the build output to other builds.
15329  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
15330
15331  # The generated Makefile knows where the spec.gmk is and where the source is.
15332  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
15333  # which will look for generated configurations
15334  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
15335
15336
15337
15338# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
15339
15340  for ac_prog in apt-get yum port pkgutil pkgadd
15341do
15342  # Extract the first word of "$ac_prog", so it can be a program name with args.
15343set dummy $ac_prog; ac_word=$2
15344{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15345$as_echo_n "checking for $ac_word... " >&6; }
15346if ${ac_cv_prog_PKGHANDLER+:} false; then :
15347  $as_echo_n "(cached) " >&6
15348else
15349  if test -n "$PKGHANDLER"; then
15350  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
15351else
15352as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15353for as_dir in $PATH
15354do
15355  IFS=$as_save_IFS
15356  test -z "$as_dir" && as_dir=.
15357    for ac_exec_ext in '' $ac_executable_extensions; do
15358  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15359    ac_cv_prog_PKGHANDLER="$ac_prog"
15360    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15361    break 2
15362  fi
15363done
15364  done
15365IFS=$as_save_IFS
15366
15367fi
15368fi
15369PKGHANDLER=$ac_cv_prog_PKGHANDLER
15370if test -n "$PKGHANDLER"; then
15371  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
15372$as_echo "$PKGHANDLER" >&6; }
15373else
15374  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15375$as_echo "no" >&6; }
15376fi
15377
15378
15379  test -n "$PKGHANDLER" && break
15380done
15381
15382
15383
15384# Setup tools that requires more complex handling, or that is not needed by the configure script.
15385
15386
15387  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
15388  if test "x$MAKE" != x; then
15389    # User has supplied a make, test it.
15390    if test ! -f "$MAKE"; then
15391      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
15392    fi
15393
15394  MAKE_CANDIDATE=""$MAKE""
15395  DESCRIPTION="user supplied MAKE=$MAKE"
15396
15397  # On Cygwin, we require a newer version of make than on other platforms
15398  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15399    MAKE_VERSION_EXPR="-e 4\."
15400    MAKE_REQUIRED_VERSION="4.0"
15401   else
15402    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
15403    MAKE_REQUIRED_VERSION="3.81"
15404  fi
15405
15406  if test "x$MAKE_CANDIDATE" != x; then
15407    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15408$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15409    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15410    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15411    if test "x$IS_GNU_MAKE" = x; then
15412      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15413$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15414    else
15415      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
15416      if test "x$IS_MODERN_MAKE" = x; then
15417        { $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
15418$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;}
15419      else
15420        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15421          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15422            MAKE_EXPECTED_ENV='cygwin'
15423          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15424            MAKE_EXPECTED_ENV='msys'
15425          else
15426            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15427          fi
15428          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15429          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15430        else
15431          # Not relevant for non-Windows
15432          IS_MAKE_CORRECT_ENV=true
15433        fi
15434        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15435          { $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
15436$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;}
15437        else
15438          FOUND_MAKE=$MAKE_CANDIDATE
15439
15440  # Only process if variable expands to non-empty
15441
15442  if test "x$FOUND_MAKE" != x; then
15443    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15444
15445  # First separate the path from the arguments. This will split at the first
15446  # space.
15447  complete="$FOUND_MAKE"
15448  path="${complete%% *}"
15449  tmp="$complete EOL"
15450  arguments="${tmp#* }"
15451
15452  # Input might be given as Windows format, start by converting to
15453  # unix format.
15454  new_path=`$CYGPATH -u "$path"`
15455
15456  # Now try to locate executable using which
15457  new_path=`$WHICH "$new_path" 2> /dev/null`
15458  # bat and cmd files are not always considered executable in cygwin causing which
15459  # to not find them
15460  if test "x$new_path" = x \
15461      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15462      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15463    new_path=`$CYGPATH -u "$path"`
15464  fi
15465  if test "x$new_path" = x; then
15466    # Oops. Which didn't find the executable.
15467    # The splitting of arguments from the executable at a space might have been incorrect,
15468    # since paths with space are more likely in Windows. Give it another try with the whole
15469    # argument.
15470    path="$complete"
15471    arguments="EOL"
15472    new_path=`$CYGPATH -u "$path"`
15473    new_path=`$WHICH "$new_path" 2> /dev/null`
15474    # bat and cmd files are not always considered executable in cygwin causing which
15475    # to not find them
15476    if test "x$new_path" = x \
15477        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15478        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15479      new_path=`$CYGPATH -u "$path"`
15480    fi
15481    if test "x$new_path" = x; then
15482      # It's still not found. Now this is an unrecoverable error.
15483      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15484$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15485      has_space=`$ECHO "$complete" | $GREP " "`
15486      if test "x$has_space" != x; then
15487        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15488$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15489      fi
15490      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15491    fi
15492  fi
15493
15494  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15495  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15496  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15497  # "foo.exe" is OK but "foo" is an error.
15498  #
15499  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15500  # It is also a way to make sure we got the proper file name for the real test later on.
15501  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15502  if test "x$test_shortpath" = x; then
15503    # Short path failed, file does not exist as specified.
15504    # Try adding .exe or .cmd
15505    if test -f "${new_path}.exe"; then
15506      input_to_shortpath="${new_path}.exe"
15507    elif test -f "${new_path}.cmd"; then
15508      input_to_shortpath="${new_path}.cmd"
15509    else
15510      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15511$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15512      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15513$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15514      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15515    fi
15516  else
15517    input_to_shortpath="$new_path"
15518  fi
15519
15520  # Call helper function which possibly converts this using DOS-style short mode.
15521  # If so, the updated path is stored in $new_path.
15522  new_path="$input_to_shortpath"
15523
15524  input_path="$input_to_shortpath"
15525  # Check if we need to convert this using DOS-style short mode. If the path
15526  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15527  # take no chances and rewrite it.
15528  # Note: m4 eats our [], so we need to use [ and ] instead.
15529  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15530  if test "x$has_forbidden_chars" != x; then
15531    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15532    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15533    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15534    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15535      # Going to short mode and back again did indeed matter. Since short mode is
15536      # case insensitive, let's make it lowercase to improve readability.
15537      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15538      # Now convert it back to Unix-style (cygpath)
15539      input_path=`$CYGPATH -u "$shortmode_path"`
15540      new_path="$input_path"
15541    fi
15542  fi
15543
15544  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15545  if test "x$test_cygdrive_prefix" = x; then
15546    # As a simple fix, exclude /usr/bin since it's not a real path.
15547    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15548      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15549      # a path prefixed by /cygdrive for fixpath to work.
15550      new_path="$CYGWIN_ROOT_PATH$input_path"
15551    fi
15552  fi
15553
15554  # remove trailing .exe if any
15555  new_path="${new_path/%.exe/}"
15556
15557    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15558
15559  # First separate the path from the arguments. This will split at the first
15560  # space.
15561  complete="$FOUND_MAKE"
15562  path="${complete%% *}"
15563  tmp="$complete EOL"
15564  arguments="${tmp#* }"
15565
15566  # Input might be given as Windows format, start by converting to
15567  # unix format.
15568  new_path="$path"
15569
15570  windows_path="$new_path"
15571  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15572    unix_path=`$CYGPATH -u "$windows_path"`
15573    new_path="$unix_path"
15574  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15575    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15576    new_path="$unix_path"
15577  fi
15578
15579
15580  # Now try to locate executable using which
15581  new_path=`$WHICH "$new_path" 2> /dev/null`
15582
15583  if test "x$new_path" = x; then
15584    # Oops. Which didn't find the executable.
15585    # The splitting of arguments from the executable at a space might have been incorrect,
15586    # since paths with space are more likely in Windows. Give it another try with the whole
15587    # argument.
15588    path="$complete"
15589    arguments="EOL"
15590    new_path="$path"
15591
15592  windows_path="$new_path"
15593  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15594    unix_path=`$CYGPATH -u "$windows_path"`
15595    new_path="$unix_path"
15596  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15597    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15598    new_path="$unix_path"
15599  fi
15600
15601
15602    new_path=`$WHICH "$new_path" 2> /dev/null`
15603    # bat and cmd files are not always considered executable in MSYS causing which
15604    # to not find them
15605    if test "x$new_path" = x \
15606        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15607        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15608      new_path="$path"
15609
15610  windows_path="$new_path"
15611  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15612    unix_path=`$CYGPATH -u "$windows_path"`
15613    new_path="$unix_path"
15614  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15615    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15616    new_path="$unix_path"
15617  fi
15618
15619    fi
15620
15621    if test "x$new_path" = x; then
15622      # It's still not found. Now this is an unrecoverable error.
15623      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15624$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15625      has_space=`$ECHO "$complete" | $GREP " "`
15626      if test "x$has_space" != x; then
15627        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15628$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15629      fi
15630      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15631    fi
15632  fi
15633
15634  # Now new_path has a complete unix path to the binary
15635  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15636    # Keep paths in /bin as-is, but remove trailing .exe if any
15637    new_path="${new_path/%.exe/}"
15638    # Do not save /bin paths to all_fixpath_prefixes!
15639  else
15640    # Not in mixed or Windows style, start by that.
15641    new_path=`cmd //c echo $new_path`
15642
15643  input_path="$new_path"
15644  # Check if we need to convert this using DOS-style short mode. If the path
15645  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15646  # take no chances and rewrite it.
15647  # Note: m4 eats our [], so we need to use [ and ] instead.
15648  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15649  if test "x$has_forbidden_chars" != x; then
15650    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15651    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15652  fi
15653
15654    # Output is in $new_path
15655
15656  windows_path="$new_path"
15657  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15658    unix_path=`$CYGPATH -u "$windows_path"`
15659    new_path="$unix_path"
15660  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15661    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15662    new_path="$unix_path"
15663  fi
15664
15665    # remove trailing .exe if any
15666    new_path="${new_path/%.exe/}"
15667
15668    # Save the first 10 bytes of this path to the storage, so fixpath can work.
15669    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15670  fi
15671
15672    else
15673      # We're on a unix platform. Hooray! :)
15674      # First separate the path from the arguments. This will split at the first
15675      # space.
15676      complete="$FOUND_MAKE"
15677      path="${complete%% *}"
15678      tmp="$complete EOL"
15679      arguments="${tmp#* }"
15680
15681      # Cannot rely on the command "which" here since it doesn't always work.
15682      is_absolute_path=`$ECHO "$path" | $GREP ^/`
15683      if test -z "$is_absolute_path"; then
15684        # Path to executable is not absolute. Find it.
15685        IFS_save="$IFS"
15686        IFS=:
15687        for p in $PATH; do
15688          if test -f "$p/$path" && test -x "$p/$path"; then
15689            new_path="$p/$path"
15690            break
15691          fi
15692        done
15693        IFS="$IFS_save"
15694      else
15695        # This is an absolute path, we can use it without further modifications.
15696        new_path="$path"
15697      fi
15698
15699      if test "x$new_path" = x; then
15700        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15701$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15702        has_space=`$ECHO "$complete" | $GREP " "`
15703        if test "x$has_space" != x; then
15704          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15705$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15706        fi
15707        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15708      fi
15709    fi
15710
15711    # Now join together the path and the arguments once again
15712    if test "x$arguments" != xEOL; then
15713      new_complete="$new_path ${arguments% *}"
15714    else
15715      new_complete="$new_path"
15716    fi
15717
15718    if test "x$complete" != "x$new_complete"; then
15719      FOUND_MAKE="$new_complete"
15720      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15721$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15722    fi
15723  fi
15724
15725        fi
15726      fi
15727    fi
15728  fi
15729
15730    if test "x$FOUND_MAKE" = x; then
15731      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
15732    fi
15733  else
15734    # Try our hardest to locate a correct version of GNU make
15735    for ac_prog in gmake
15736do
15737  # Extract the first word of "$ac_prog", so it can be a program name with args.
15738set dummy $ac_prog; ac_word=$2
15739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15740$as_echo_n "checking for $ac_word... " >&6; }
15741if ${ac_cv_path_CHECK_GMAKE+:} false; then :
15742  $as_echo_n "(cached) " >&6
15743else
15744  case $CHECK_GMAKE in
15745  [\\/]* | ?:[\\/]*)
15746  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
15747  ;;
15748  *)
15749  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15750for as_dir in $PATH
15751do
15752  IFS=$as_save_IFS
15753  test -z "$as_dir" && as_dir=.
15754    for ac_exec_ext in '' $ac_executable_extensions; do
15755  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15756    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
15757    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15758    break 2
15759  fi
15760done
15761  done
15762IFS=$as_save_IFS
15763
15764  ;;
15765esac
15766fi
15767CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
15768if test -n "$CHECK_GMAKE"; then
15769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
15770$as_echo "$CHECK_GMAKE" >&6; }
15771else
15772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15773$as_echo "no" >&6; }
15774fi
15775
15776
15777  test -n "$CHECK_GMAKE" && break
15778done
15779
15780
15781  MAKE_CANDIDATE=""$CHECK_GMAKE""
15782  DESCRIPTION="gmake in PATH"
15783
15784  # On Cygwin, we require a newer version of make than on other platforms
15785  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15786    MAKE_VERSION_EXPR="-e 4\."
15787    MAKE_REQUIRED_VERSION="4.0"
15788   else
15789    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
15790    MAKE_REQUIRED_VERSION="3.81"
15791  fi
15792
15793  if test "x$MAKE_CANDIDATE" != x; then
15794    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15795$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15796    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15797    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15798    if test "x$IS_GNU_MAKE" = x; then
15799      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15800$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15801    else
15802      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
15803      if test "x$IS_MODERN_MAKE" = x; then
15804        { $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
15805$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;}
15806      else
15807        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15808          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15809            MAKE_EXPECTED_ENV='cygwin'
15810          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15811            MAKE_EXPECTED_ENV='msys'
15812          else
15813            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15814          fi
15815          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15816          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15817        else
15818          # Not relevant for non-Windows
15819          IS_MAKE_CORRECT_ENV=true
15820        fi
15821        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15822          { $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
15823$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;}
15824        else
15825          FOUND_MAKE=$MAKE_CANDIDATE
15826
15827  # Only process if variable expands to non-empty
15828
15829  if test "x$FOUND_MAKE" != x; then
15830    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15831
15832  # First separate the path from the arguments. This will split at the first
15833  # space.
15834  complete="$FOUND_MAKE"
15835  path="${complete%% *}"
15836  tmp="$complete EOL"
15837  arguments="${tmp#* }"
15838
15839  # Input might be given as Windows format, start by converting to
15840  # unix format.
15841  new_path=`$CYGPATH -u "$path"`
15842
15843  # Now try to locate executable using which
15844  new_path=`$WHICH "$new_path" 2> /dev/null`
15845  # bat and cmd files are not always considered executable in cygwin causing which
15846  # to not find them
15847  if test "x$new_path" = x \
15848      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15849      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15850    new_path=`$CYGPATH -u "$path"`
15851  fi
15852  if test "x$new_path" = x; then
15853    # Oops. Which didn't find the executable.
15854    # The splitting of arguments from the executable at a space might have been incorrect,
15855    # since paths with space are more likely in Windows. Give it another try with the whole
15856    # argument.
15857    path="$complete"
15858    arguments="EOL"
15859    new_path=`$CYGPATH -u "$path"`
15860    new_path=`$WHICH "$new_path" 2> /dev/null`
15861    # bat and cmd files are not always considered executable in cygwin causing which
15862    # to not find them
15863    if test "x$new_path" = x \
15864        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15865        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15866      new_path=`$CYGPATH -u "$path"`
15867    fi
15868    if test "x$new_path" = x; then
15869      # It's still not found. Now this is an unrecoverable error.
15870      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15871$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15872      has_space=`$ECHO "$complete" | $GREP " "`
15873      if test "x$has_space" != x; then
15874        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15875$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15876      fi
15877      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15878    fi
15879  fi
15880
15881  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15882  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15883  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15884  # "foo.exe" is OK but "foo" is an error.
15885  #
15886  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15887  # It is also a way to make sure we got the proper file name for the real test later on.
15888  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15889  if test "x$test_shortpath" = x; then
15890    # Short path failed, file does not exist as specified.
15891    # Try adding .exe or .cmd
15892    if test -f "${new_path}.exe"; then
15893      input_to_shortpath="${new_path}.exe"
15894    elif test -f "${new_path}.cmd"; then
15895      input_to_shortpath="${new_path}.cmd"
15896    else
15897      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15898$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15899      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15900$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15901      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15902    fi
15903  else
15904    input_to_shortpath="$new_path"
15905  fi
15906
15907  # Call helper function which possibly converts this using DOS-style short mode.
15908  # If so, the updated path is stored in $new_path.
15909  new_path="$input_to_shortpath"
15910
15911  input_path="$input_to_shortpath"
15912  # Check if we need to convert this using DOS-style short mode. If the path
15913  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15914  # take no chances and rewrite it.
15915  # Note: m4 eats our [], so we need to use [ and ] instead.
15916  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15917  if test "x$has_forbidden_chars" != x; then
15918    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15919    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15920    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15921    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15922      # Going to short mode and back again did indeed matter. Since short mode is
15923      # case insensitive, let's make it lowercase to improve readability.
15924      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15925      # Now convert it back to Unix-style (cygpath)
15926      input_path=`$CYGPATH -u "$shortmode_path"`
15927      new_path="$input_path"
15928    fi
15929  fi
15930
15931  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15932  if test "x$test_cygdrive_prefix" = x; then
15933    # As a simple fix, exclude /usr/bin since it's not a real path.
15934    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15935      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15936      # a path prefixed by /cygdrive for fixpath to work.
15937      new_path="$CYGWIN_ROOT_PATH$input_path"
15938    fi
15939  fi
15940
15941  # remove trailing .exe if any
15942  new_path="${new_path/%.exe/}"
15943
15944    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15945
15946  # First separate the path from the arguments. This will split at the first
15947  # space.
15948  complete="$FOUND_MAKE"
15949  path="${complete%% *}"
15950  tmp="$complete EOL"
15951  arguments="${tmp#* }"
15952
15953  # Input might be given as Windows format, start by converting to
15954  # unix format.
15955  new_path="$path"
15956
15957  windows_path="$new_path"
15958  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15959    unix_path=`$CYGPATH -u "$windows_path"`
15960    new_path="$unix_path"
15961  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15962    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15963    new_path="$unix_path"
15964  fi
15965
15966
15967  # Now try to locate executable using which
15968  new_path=`$WHICH "$new_path" 2> /dev/null`
15969
15970  if test "x$new_path" = x; then
15971    # Oops. Which didn't find the executable.
15972    # The splitting of arguments from the executable at a space might have been incorrect,
15973    # since paths with space are more likely in Windows. Give it another try with the whole
15974    # argument.
15975    path="$complete"
15976    arguments="EOL"
15977    new_path="$path"
15978
15979  windows_path="$new_path"
15980  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15981    unix_path=`$CYGPATH -u "$windows_path"`
15982    new_path="$unix_path"
15983  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15984    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15985    new_path="$unix_path"
15986  fi
15987
15988
15989    new_path=`$WHICH "$new_path" 2> /dev/null`
15990    # bat and cmd files are not always considered executable in MSYS causing which
15991    # to not find them
15992    if test "x$new_path" = x \
15993        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15994        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15995      new_path="$path"
15996
15997  windows_path="$new_path"
15998  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15999    unix_path=`$CYGPATH -u "$windows_path"`
16000    new_path="$unix_path"
16001  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16002    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16003    new_path="$unix_path"
16004  fi
16005
16006    fi
16007
16008    if test "x$new_path" = x; then
16009      # It's still not found. Now this is an unrecoverable error.
16010      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16011$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16012      has_space=`$ECHO "$complete" | $GREP " "`
16013      if test "x$has_space" != x; then
16014        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16015$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16016      fi
16017      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16018    fi
16019  fi
16020
16021  # Now new_path has a complete unix path to the binary
16022  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16023    # Keep paths in /bin as-is, but remove trailing .exe if any
16024    new_path="${new_path/%.exe/}"
16025    # Do not save /bin paths to all_fixpath_prefixes!
16026  else
16027    # Not in mixed or Windows style, start by that.
16028    new_path=`cmd //c echo $new_path`
16029
16030  input_path="$new_path"
16031  # Check if we need to convert this using DOS-style short mode. If the path
16032  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16033  # take no chances and rewrite it.
16034  # Note: m4 eats our [], so we need to use [ and ] instead.
16035  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16036  if test "x$has_forbidden_chars" != x; then
16037    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16038    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16039  fi
16040
16041    # Output is in $new_path
16042
16043  windows_path="$new_path"
16044  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16045    unix_path=`$CYGPATH -u "$windows_path"`
16046    new_path="$unix_path"
16047  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16048    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16049    new_path="$unix_path"
16050  fi
16051
16052    # remove trailing .exe if any
16053    new_path="${new_path/%.exe/}"
16054
16055    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16056    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16057  fi
16058
16059    else
16060      # We're on a unix platform. Hooray! :)
16061      # First separate the path from the arguments. This will split at the first
16062      # space.
16063      complete="$FOUND_MAKE"
16064      path="${complete%% *}"
16065      tmp="$complete EOL"
16066      arguments="${tmp#* }"
16067
16068      # Cannot rely on the command "which" here since it doesn't always work.
16069      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16070      if test -z "$is_absolute_path"; then
16071        # Path to executable is not absolute. Find it.
16072        IFS_save="$IFS"
16073        IFS=:
16074        for p in $PATH; do
16075          if test -f "$p/$path" && test -x "$p/$path"; then
16076            new_path="$p/$path"
16077            break
16078          fi
16079        done
16080        IFS="$IFS_save"
16081      else
16082        # This is an absolute path, we can use it without further modifications.
16083        new_path="$path"
16084      fi
16085
16086      if test "x$new_path" = x; then
16087        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16088$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16089        has_space=`$ECHO "$complete" | $GREP " "`
16090        if test "x$has_space" != x; then
16091          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16092$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16093        fi
16094        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16095      fi
16096    fi
16097
16098    # Now join together the path and the arguments once again
16099    if test "x$arguments" != xEOL; then
16100      new_complete="$new_path ${arguments% *}"
16101    else
16102      new_complete="$new_path"
16103    fi
16104
16105    if test "x$complete" != "x$new_complete"; then
16106      FOUND_MAKE="$new_complete"
16107      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16108$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16109    fi
16110  fi
16111
16112        fi
16113      fi
16114    fi
16115  fi
16116
16117
16118    if test "x$FOUND_MAKE" = x; then
16119      for ac_prog in make
16120do
16121  # Extract the first word of "$ac_prog", so it can be a program name with args.
16122set dummy $ac_prog; ac_word=$2
16123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16124$as_echo_n "checking for $ac_word... " >&6; }
16125if ${ac_cv_path_CHECK_MAKE+:} false; then :
16126  $as_echo_n "(cached) " >&6
16127else
16128  case $CHECK_MAKE in
16129  [\\/]* | ?:[\\/]*)
16130  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
16131  ;;
16132  *)
16133  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16134for as_dir in $PATH
16135do
16136  IFS=$as_save_IFS
16137  test -z "$as_dir" && as_dir=.
16138    for ac_exec_ext in '' $ac_executable_extensions; do
16139  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16140    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
16141    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16142    break 2
16143  fi
16144done
16145  done
16146IFS=$as_save_IFS
16147
16148  ;;
16149esac
16150fi
16151CHECK_MAKE=$ac_cv_path_CHECK_MAKE
16152if test -n "$CHECK_MAKE"; then
16153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
16154$as_echo "$CHECK_MAKE" >&6; }
16155else
16156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16157$as_echo "no" >&6; }
16158fi
16159
16160
16161  test -n "$CHECK_MAKE" && break
16162done
16163
16164
16165  MAKE_CANDIDATE=""$CHECK_MAKE""
16166  DESCRIPTION="make in PATH"
16167
16168  # On Cygwin, we require a newer version of make than on other platforms
16169  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16170    MAKE_VERSION_EXPR="-e 4\."
16171    MAKE_REQUIRED_VERSION="4.0"
16172   else
16173    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16174    MAKE_REQUIRED_VERSION="3.81"
16175  fi
16176
16177  if test "x$MAKE_CANDIDATE" != x; then
16178    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16179$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16180    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16181    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16182    if test "x$IS_GNU_MAKE" = x; then
16183      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16184$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16185    else
16186      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
16187      if test "x$IS_MODERN_MAKE" = x; then
16188        { $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
16189$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;}
16190      else
16191        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16192          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16193            MAKE_EXPECTED_ENV='cygwin'
16194          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16195            MAKE_EXPECTED_ENV='msys'
16196          else
16197            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16198          fi
16199          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16200          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16201        else
16202          # Not relevant for non-Windows
16203          IS_MAKE_CORRECT_ENV=true
16204        fi
16205        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16206          { $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
16207$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;}
16208        else
16209          FOUND_MAKE=$MAKE_CANDIDATE
16210
16211  # Only process if variable expands to non-empty
16212
16213  if test "x$FOUND_MAKE" != x; then
16214    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16215
16216  # First separate the path from the arguments. This will split at the first
16217  # space.
16218  complete="$FOUND_MAKE"
16219  path="${complete%% *}"
16220  tmp="$complete EOL"
16221  arguments="${tmp#* }"
16222
16223  # Input might be given as Windows format, start by converting to
16224  # unix format.
16225  new_path=`$CYGPATH -u "$path"`
16226
16227  # Now try to locate executable using which
16228  new_path=`$WHICH "$new_path" 2> /dev/null`
16229  # bat and cmd files are not always considered executable in cygwin causing which
16230  # to not find them
16231  if test "x$new_path" = x \
16232      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16233      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16234    new_path=`$CYGPATH -u "$path"`
16235  fi
16236  if test "x$new_path" = x; then
16237    # Oops. Which didn't find the executable.
16238    # The splitting of arguments from the executable at a space might have been incorrect,
16239    # since paths with space are more likely in Windows. Give it another try with the whole
16240    # argument.
16241    path="$complete"
16242    arguments="EOL"
16243    new_path=`$CYGPATH -u "$path"`
16244    new_path=`$WHICH "$new_path" 2> /dev/null`
16245    # bat and cmd files are not always considered executable in cygwin causing which
16246    # to not find them
16247    if test "x$new_path" = x \
16248        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16249        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16250      new_path=`$CYGPATH -u "$path"`
16251    fi
16252    if test "x$new_path" = x; then
16253      # It's still not found. Now this is an unrecoverable error.
16254      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16255$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16256      has_space=`$ECHO "$complete" | $GREP " "`
16257      if test "x$has_space" != x; then
16258        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16259$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16260      fi
16261      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16262    fi
16263  fi
16264
16265  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16266  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16267  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16268  # "foo.exe" is OK but "foo" is an error.
16269  #
16270  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16271  # It is also a way to make sure we got the proper file name for the real test later on.
16272  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16273  if test "x$test_shortpath" = x; then
16274    # Short path failed, file does not exist as specified.
16275    # Try adding .exe or .cmd
16276    if test -f "${new_path}.exe"; then
16277      input_to_shortpath="${new_path}.exe"
16278    elif test -f "${new_path}.cmd"; then
16279      input_to_shortpath="${new_path}.cmd"
16280    else
16281      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16282$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16283      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16284$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16285      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16286    fi
16287  else
16288    input_to_shortpath="$new_path"
16289  fi
16290
16291  # Call helper function which possibly converts this using DOS-style short mode.
16292  # If so, the updated path is stored in $new_path.
16293  new_path="$input_to_shortpath"
16294
16295  input_path="$input_to_shortpath"
16296  # Check if we need to convert this using DOS-style short mode. If the path
16297  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16298  # take no chances and rewrite it.
16299  # Note: m4 eats our [], so we need to use [ and ] instead.
16300  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16301  if test "x$has_forbidden_chars" != x; then
16302    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16303    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16304    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16305    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16306      # Going to short mode and back again did indeed matter. Since short mode is
16307      # case insensitive, let's make it lowercase to improve readability.
16308      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16309      # Now convert it back to Unix-style (cygpath)
16310      input_path=`$CYGPATH -u "$shortmode_path"`
16311      new_path="$input_path"
16312    fi
16313  fi
16314
16315  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16316  if test "x$test_cygdrive_prefix" = x; then
16317    # As a simple fix, exclude /usr/bin since it's not a real path.
16318    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16319      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16320      # a path prefixed by /cygdrive for fixpath to work.
16321      new_path="$CYGWIN_ROOT_PATH$input_path"
16322    fi
16323  fi
16324
16325  # remove trailing .exe if any
16326  new_path="${new_path/%.exe/}"
16327
16328    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16329
16330  # First separate the path from the arguments. This will split at the first
16331  # space.
16332  complete="$FOUND_MAKE"
16333  path="${complete%% *}"
16334  tmp="$complete EOL"
16335  arguments="${tmp#* }"
16336
16337  # Input might be given as Windows format, start by converting to
16338  # unix format.
16339  new_path="$path"
16340
16341  windows_path="$new_path"
16342  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16343    unix_path=`$CYGPATH -u "$windows_path"`
16344    new_path="$unix_path"
16345  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16346    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16347    new_path="$unix_path"
16348  fi
16349
16350
16351  # Now try to locate executable using which
16352  new_path=`$WHICH "$new_path" 2> /dev/null`
16353
16354  if test "x$new_path" = x; then
16355    # Oops. Which didn't find the executable.
16356    # The splitting of arguments from the executable at a space might have been incorrect,
16357    # since paths with space are more likely in Windows. Give it another try with the whole
16358    # argument.
16359    path="$complete"
16360    arguments="EOL"
16361    new_path="$path"
16362
16363  windows_path="$new_path"
16364  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16365    unix_path=`$CYGPATH -u "$windows_path"`
16366    new_path="$unix_path"
16367  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16368    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16369    new_path="$unix_path"
16370  fi
16371
16372
16373    new_path=`$WHICH "$new_path" 2> /dev/null`
16374    # bat and cmd files are not always considered executable in MSYS causing which
16375    # to not find them
16376    if test "x$new_path" = x \
16377        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16378        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16379      new_path="$path"
16380
16381  windows_path="$new_path"
16382  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16383    unix_path=`$CYGPATH -u "$windows_path"`
16384    new_path="$unix_path"
16385  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16386    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16387    new_path="$unix_path"
16388  fi
16389
16390    fi
16391
16392    if test "x$new_path" = x; then
16393      # It's still not found. Now this is an unrecoverable error.
16394      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16395$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16396      has_space=`$ECHO "$complete" | $GREP " "`
16397      if test "x$has_space" != x; then
16398        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16399$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16400      fi
16401      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16402    fi
16403  fi
16404
16405  # Now new_path has a complete unix path to the binary
16406  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16407    # Keep paths in /bin as-is, but remove trailing .exe if any
16408    new_path="${new_path/%.exe/}"
16409    # Do not save /bin paths to all_fixpath_prefixes!
16410  else
16411    # Not in mixed or Windows style, start by that.
16412    new_path=`cmd //c echo $new_path`
16413
16414  input_path="$new_path"
16415  # Check if we need to convert this using DOS-style short mode. If the path
16416  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16417  # take no chances and rewrite it.
16418  # Note: m4 eats our [], so we need to use [ and ] instead.
16419  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16420  if test "x$has_forbidden_chars" != x; then
16421    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16422    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16423  fi
16424
16425    # Output is in $new_path
16426
16427  windows_path="$new_path"
16428  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16429    unix_path=`$CYGPATH -u "$windows_path"`
16430    new_path="$unix_path"
16431  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16432    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16433    new_path="$unix_path"
16434  fi
16435
16436    # remove trailing .exe if any
16437    new_path="${new_path/%.exe/}"
16438
16439    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16440    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16441  fi
16442
16443    else
16444      # We're on a unix platform. Hooray! :)
16445      # First separate the path from the arguments. This will split at the first
16446      # space.
16447      complete="$FOUND_MAKE"
16448      path="${complete%% *}"
16449      tmp="$complete EOL"
16450      arguments="${tmp#* }"
16451
16452      # Cannot rely on the command "which" here since it doesn't always work.
16453      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16454      if test -z "$is_absolute_path"; then
16455        # Path to executable is not absolute. Find it.
16456        IFS_save="$IFS"
16457        IFS=:
16458        for p in $PATH; do
16459          if test -f "$p/$path" && test -x "$p/$path"; then
16460            new_path="$p/$path"
16461            break
16462          fi
16463        done
16464        IFS="$IFS_save"
16465      else
16466        # This is an absolute path, we can use it without further modifications.
16467        new_path="$path"
16468      fi
16469
16470      if test "x$new_path" = x; then
16471        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16472$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16473        has_space=`$ECHO "$complete" | $GREP " "`
16474        if test "x$has_space" != x; then
16475          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16476$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16477        fi
16478        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16479      fi
16480    fi
16481
16482    # Now join together the path and the arguments once again
16483    if test "x$arguments" != xEOL; then
16484      new_complete="$new_path ${arguments% *}"
16485    else
16486      new_complete="$new_path"
16487    fi
16488
16489    if test "x$complete" != "x$new_complete"; then
16490      FOUND_MAKE="$new_complete"
16491      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16492$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16493    fi
16494  fi
16495
16496        fi
16497      fi
16498    fi
16499  fi
16500
16501    fi
16502
16503    if test "x$FOUND_MAKE" = x; then
16504      if test "x$TOOLCHAIN_PATH" != x; then
16505        # We have a toolchain path, check that as well before giving up.
16506        OLD_PATH=$PATH
16507        PATH=$TOOLCHAIN_PATH:$PATH
16508        for ac_prog in gmake
16509do
16510  # Extract the first word of "$ac_prog", so it can be a program name with args.
16511set dummy $ac_prog; ac_word=$2
16512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16513$as_echo_n "checking for $ac_word... " >&6; }
16514if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
16515  $as_echo_n "(cached) " >&6
16516else
16517  case $CHECK_TOOLSDIR_GMAKE in
16518  [\\/]* | ?:[\\/]*)
16519  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
16520  ;;
16521  *)
16522  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16523for as_dir in $PATH
16524do
16525  IFS=$as_save_IFS
16526  test -z "$as_dir" && as_dir=.
16527    for ac_exec_ext in '' $ac_executable_extensions; do
16528  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16529    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16530    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16531    break 2
16532  fi
16533done
16534  done
16535IFS=$as_save_IFS
16536
16537  ;;
16538esac
16539fi
16540CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
16541if test -n "$CHECK_TOOLSDIR_GMAKE"; then
16542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
16543$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
16544else
16545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16546$as_echo "no" >&6; }
16547fi
16548
16549
16550  test -n "$CHECK_TOOLSDIR_GMAKE" && break
16551done
16552
16553
16554  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
16555  DESCRIPTION="gmake in tools-dir"
16556
16557  # On Cygwin, we require a newer version of make than on other platforms
16558  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16559    MAKE_VERSION_EXPR="-e 4\."
16560    MAKE_REQUIRED_VERSION="4.0"
16561   else
16562    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16563    MAKE_REQUIRED_VERSION="3.81"
16564  fi
16565
16566  if test "x$MAKE_CANDIDATE" != x; then
16567    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16568$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16569    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16570    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16571    if test "x$IS_GNU_MAKE" = x; then
16572      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16573$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16574    else
16575      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
16576      if test "x$IS_MODERN_MAKE" = x; then
16577        { $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
16578$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;}
16579      else
16580        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16581          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16582            MAKE_EXPECTED_ENV='cygwin'
16583          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16584            MAKE_EXPECTED_ENV='msys'
16585          else
16586            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16587          fi
16588          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16589          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16590        else
16591          # Not relevant for non-Windows
16592          IS_MAKE_CORRECT_ENV=true
16593        fi
16594        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16595          { $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
16596$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;}
16597        else
16598          FOUND_MAKE=$MAKE_CANDIDATE
16599
16600  # Only process if variable expands to non-empty
16601
16602  if test "x$FOUND_MAKE" != x; then
16603    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16604
16605  # First separate the path from the arguments. This will split at the first
16606  # space.
16607  complete="$FOUND_MAKE"
16608  path="${complete%% *}"
16609  tmp="$complete EOL"
16610  arguments="${tmp#* }"
16611
16612  # Input might be given as Windows format, start by converting to
16613  # unix format.
16614  new_path=`$CYGPATH -u "$path"`
16615
16616  # Now try to locate executable using which
16617  new_path=`$WHICH "$new_path" 2> /dev/null`
16618  # bat and cmd files are not always considered executable in cygwin causing which
16619  # to not find them
16620  if test "x$new_path" = x \
16621      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16622      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16623    new_path=`$CYGPATH -u "$path"`
16624  fi
16625  if test "x$new_path" = x; then
16626    # Oops. Which didn't find the executable.
16627    # The splitting of arguments from the executable at a space might have been incorrect,
16628    # since paths with space are more likely in Windows. Give it another try with the whole
16629    # argument.
16630    path="$complete"
16631    arguments="EOL"
16632    new_path=`$CYGPATH -u "$path"`
16633    new_path=`$WHICH "$new_path" 2> /dev/null`
16634    # bat and cmd files are not always considered executable in cygwin causing which
16635    # to not find them
16636    if test "x$new_path" = x \
16637        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16638        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16639      new_path=`$CYGPATH -u "$path"`
16640    fi
16641    if test "x$new_path" = x; then
16642      # It's still not found. Now this is an unrecoverable error.
16643      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16644$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16645      has_space=`$ECHO "$complete" | $GREP " "`
16646      if test "x$has_space" != x; then
16647        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16648$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16649      fi
16650      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16651    fi
16652  fi
16653
16654  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16655  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16656  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16657  # "foo.exe" is OK but "foo" is an error.
16658  #
16659  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16660  # It is also a way to make sure we got the proper file name for the real test later on.
16661  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16662  if test "x$test_shortpath" = x; then
16663    # Short path failed, file does not exist as specified.
16664    # Try adding .exe or .cmd
16665    if test -f "${new_path}.exe"; then
16666      input_to_shortpath="${new_path}.exe"
16667    elif test -f "${new_path}.cmd"; then
16668      input_to_shortpath="${new_path}.cmd"
16669    else
16670      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16671$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16672      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16673$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16674      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16675    fi
16676  else
16677    input_to_shortpath="$new_path"
16678  fi
16679
16680  # Call helper function which possibly converts this using DOS-style short mode.
16681  # If so, the updated path is stored in $new_path.
16682  new_path="$input_to_shortpath"
16683
16684  input_path="$input_to_shortpath"
16685  # Check if we need to convert this using DOS-style short mode. If the path
16686  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16687  # take no chances and rewrite it.
16688  # Note: m4 eats our [], so we need to use [ and ] instead.
16689  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16690  if test "x$has_forbidden_chars" != x; then
16691    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16692    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16693    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16694    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16695      # Going to short mode and back again did indeed matter. Since short mode is
16696      # case insensitive, let's make it lowercase to improve readability.
16697      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16698      # Now convert it back to Unix-style (cygpath)
16699      input_path=`$CYGPATH -u "$shortmode_path"`
16700      new_path="$input_path"
16701    fi
16702  fi
16703
16704  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16705  if test "x$test_cygdrive_prefix" = x; then
16706    # As a simple fix, exclude /usr/bin since it's not a real path.
16707    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16708      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16709      # a path prefixed by /cygdrive for fixpath to work.
16710      new_path="$CYGWIN_ROOT_PATH$input_path"
16711    fi
16712  fi
16713
16714  # remove trailing .exe if any
16715  new_path="${new_path/%.exe/}"
16716
16717    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16718
16719  # First separate the path from the arguments. This will split at the first
16720  # space.
16721  complete="$FOUND_MAKE"
16722  path="${complete%% *}"
16723  tmp="$complete EOL"
16724  arguments="${tmp#* }"
16725
16726  # Input might be given as Windows format, start by converting to
16727  # unix format.
16728  new_path="$path"
16729
16730  windows_path="$new_path"
16731  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16732    unix_path=`$CYGPATH -u "$windows_path"`
16733    new_path="$unix_path"
16734  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16735    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16736    new_path="$unix_path"
16737  fi
16738
16739
16740  # Now try to locate executable using which
16741  new_path=`$WHICH "$new_path" 2> /dev/null`
16742
16743  if test "x$new_path" = x; then
16744    # Oops. Which didn't find the executable.
16745    # The splitting of arguments from the executable at a space might have been incorrect,
16746    # since paths with space are more likely in Windows. Give it another try with the whole
16747    # argument.
16748    path="$complete"
16749    arguments="EOL"
16750    new_path="$path"
16751
16752  windows_path="$new_path"
16753  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16754    unix_path=`$CYGPATH -u "$windows_path"`
16755    new_path="$unix_path"
16756  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16757    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16758    new_path="$unix_path"
16759  fi
16760
16761
16762    new_path=`$WHICH "$new_path" 2> /dev/null`
16763    # bat and cmd files are not always considered executable in MSYS causing which
16764    # to not find them
16765    if test "x$new_path" = x \
16766        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16767        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16768      new_path="$path"
16769
16770  windows_path="$new_path"
16771  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16772    unix_path=`$CYGPATH -u "$windows_path"`
16773    new_path="$unix_path"
16774  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16775    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16776    new_path="$unix_path"
16777  fi
16778
16779    fi
16780
16781    if test "x$new_path" = x; then
16782      # It's still not found. Now this is an unrecoverable error.
16783      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16784$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16785      has_space=`$ECHO "$complete" | $GREP " "`
16786      if test "x$has_space" != x; then
16787        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16788$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16789      fi
16790      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16791    fi
16792  fi
16793
16794  # Now new_path has a complete unix path to the binary
16795  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16796    # Keep paths in /bin as-is, but remove trailing .exe if any
16797    new_path="${new_path/%.exe/}"
16798    # Do not save /bin paths to all_fixpath_prefixes!
16799  else
16800    # Not in mixed or Windows style, start by that.
16801    new_path=`cmd //c echo $new_path`
16802
16803  input_path="$new_path"
16804  # Check if we need to convert this using DOS-style short mode. If the path
16805  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16806  # take no chances and rewrite it.
16807  # Note: m4 eats our [], so we need to use [ and ] instead.
16808  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16809  if test "x$has_forbidden_chars" != x; then
16810    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16811    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16812  fi
16813
16814    # Output is in $new_path
16815
16816  windows_path="$new_path"
16817  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16818    unix_path=`$CYGPATH -u "$windows_path"`
16819    new_path="$unix_path"
16820  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16821    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16822    new_path="$unix_path"
16823  fi
16824
16825    # remove trailing .exe if any
16826    new_path="${new_path/%.exe/}"
16827
16828    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16829    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16830  fi
16831
16832    else
16833      # We're on a unix platform. Hooray! :)
16834      # First separate the path from the arguments. This will split at the first
16835      # space.
16836      complete="$FOUND_MAKE"
16837      path="${complete%% *}"
16838      tmp="$complete EOL"
16839      arguments="${tmp#* }"
16840
16841      # Cannot rely on the command "which" here since it doesn't always work.
16842      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16843      if test -z "$is_absolute_path"; then
16844        # Path to executable is not absolute. Find it.
16845        IFS_save="$IFS"
16846        IFS=:
16847        for p in $PATH; do
16848          if test -f "$p/$path" && test -x "$p/$path"; then
16849            new_path="$p/$path"
16850            break
16851          fi
16852        done
16853        IFS="$IFS_save"
16854      else
16855        # This is an absolute path, we can use it without further modifications.
16856        new_path="$path"
16857      fi
16858
16859      if test "x$new_path" = x; then
16860        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16861$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16862        has_space=`$ECHO "$complete" | $GREP " "`
16863        if test "x$has_space" != x; then
16864          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16865$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16866        fi
16867        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16868      fi
16869    fi
16870
16871    # Now join together the path and the arguments once again
16872    if test "x$arguments" != xEOL; then
16873      new_complete="$new_path ${arguments% *}"
16874    else
16875      new_complete="$new_path"
16876    fi
16877
16878    if test "x$complete" != "x$new_complete"; then
16879      FOUND_MAKE="$new_complete"
16880      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16881$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16882    fi
16883  fi
16884
16885        fi
16886      fi
16887    fi
16888  fi
16889
16890        if test "x$FOUND_MAKE" = x; then
16891          for ac_prog in make
16892do
16893  # Extract the first word of "$ac_prog", so it can be a program name with args.
16894set dummy $ac_prog; ac_word=$2
16895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16896$as_echo_n "checking for $ac_word... " >&6; }
16897if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
16898  $as_echo_n "(cached) " >&6
16899else
16900  case $CHECK_TOOLSDIR_MAKE in
16901  [\\/]* | ?:[\\/]*)
16902  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
16903  ;;
16904  *)
16905  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16906for as_dir in $PATH
16907do
16908  IFS=$as_save_IFS
16909  test -z "$as_dir" && as_dir=.
16910    for ac_exec_ext in '' $ac_executable_extensions; do
16911  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16912    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
16913    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16914    break 2
16915  fi
16916done
16917  done
16918IFS=$as_save_IFS
16919
16920  ;;
16921esac
16922fi
16923CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
16924if test -n "$CHECK_TOOLSDIR_MAKE"; then
16925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
16926$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
16927else
16928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16929$as_echo "no" >&6; }
16930fi
16931
16932
16933  test -n "$CHECK_TOOLSDIR_MAKE" && break
16934done
16935
16936
16937  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
16938  DESCRIPTION="make in tools-dir"
16939
16940  # On Cygwin, we require a newer version of make than on other platforms
16941  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16942    MAKE_VERSION_EXPR="-e 4\."
16943    MAKE_REQUIRED_VERSION="4.0"
16944   else
16945    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16946    MAKE_REQUIRED_VERSION="3.81"
16947  fi
16948
16949  if test "x$MAKE_CANDIDATE" != x; then
16950    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16951$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16952    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16953    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16954    if test "x$IS_GNU_MAKE" = x; then
16955      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16956$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16957    else
16958      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
16959      if test "x$IS_MODERN_MAKE" = x; then
16960        { $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
16961$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;}
16962      else
16963        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16964          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16965            MAKE_EXPECTED_ENV='cygwin'
16966          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16967            MAKE_EXPECTED_ENV='msys'
16968          else
16969            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16970          fi
16971          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16972          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16973        else
16974          # Not relevant for non-Windows
16975          IS_MAKE_CORRECT_ENV=true
16976        fi
16977        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16978          { $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
16979$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;}
16980        else
16981          FOUND_MAKE=$MAKE_CANDIDATE
16982
16983  # Only process if variable expands to non-empty
16984
16985  if test "x$FOUND_MAKE" != x; then
16986    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16987
16988  # First separate the path from the arguments. This will split at the first
16989  # space.
16990  complete="$FOUND_MAKE"
16991  path="${complete%% *}"
16992  tmp="$complete EOL"
16993  arguments="${tmp#* }"
16994
16995  # Input might be given as Windows format, start by converting to
16996  # unix format.
16997  new_path=`$CYGPATH -u "$path"`
16998
16999  # Now try to locate executable using which
17000  new_path=`$WHICH "$new_path" 2> /dev/null`
17001  # bat and cmd files are not always considered executable in cygwin causing which
17002  # to not find them
17003  if test "x$new_path" = x \
17004      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17005      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17006    new_path=`$CYGPATH -u "$path"`
17007  fi
17008  if test "x$new_path" = x; then
17009    # Oops. Which didn't find the executable.
17010    # The splitting of arguments from the executable at a space might have been incorrect,
17011    # since paths with space are more likely in Windows. Give it another try with the whole
17012    # argument.
17013    path="$complete"
17014    arguments="EOL"
17015    new_path=`$CYGPATH -u "$path"`
17016    new_path=`$WHICH "$new_path" 2> /dev/null`
17017    # bat and cmd files are not always considered executable in cygwin causing which
17018    # to not find them
17019    if test "x$new_path" = x \
17020        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17021        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17022      new_path=`$CYGPATH -u "$path"`
17023    fi
17024    if test "x$new_path" = x; then
17025      # It's still not found. Now this is an unrecoverable error.
17026      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17027$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17028      has_space=`$ECHO "$complete" | $GREP " "`
17029      if test "x$has_space" != x; then
17030        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17031$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17032      fi
17033      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17034    fi
17035  fi
17036
17037  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17038  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17039  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17040  # "foo.exe" is OK but "foo" is an error.
17041  #
17042  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17043  # It is also a way to make sure we got the proper file name for the real test later on.
17044  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17045  if test "x$test_shortpath" = x; then
17046    # Short path failed, file does not exist as specified.
17047    # Try adding .exe or .cmd
17048    if test -f "${new_path}.exe"; then
17049      input_to_shortpath="${new_path}.exe"
17050    elif test -f "${new_path}.cmd"; then
17051      input_to_shortpath="${new_path}.cmd"
17052    else
17053      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17054$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17055      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17056$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17057      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17058    fi
17059  else
17060    input_to_shortpath="$new_path"
17061  fi
17062
17063  # Call helper function which possibly converts this using DOS-style short mode.
17064  # If so, the updated path is stored in $new_path.
17065  new_path="$input_to_shortpath"
17066
17067  input_path="$input_to_shortpath"
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    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17076    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17077    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17078      # Going to short mode and back again did indeed matter. Since short mode is
17079      # case insensitive, let's make it lowercase to improve readability.
17080      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17081      # Now convert it back to Unix-style (cygpath)
17082      input_path=`$CYGPATH -u "$shortmode_path"`
17083      new_path="$input_path"
17084    fi
17085  fi
17086
17087  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17088  if test "x$test_cygdrive_prefix" = x; then
17089    # As a simple fix, exclude /usr/bin since it's not a real path.
17090    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17091      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17092      # a path prefixed by /cygdrive for fixpath to work.
17093      new_path="$CYGWIN_ROOT_PATH$input_path"
17094    fi
17095  fi
17096
17097  # remove trailing .exe if any
17098  new_path="${new_path/%.exe/}"
17099
17100    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17101
17102  # First separate the path from the arguments. This will split at the first
17103  # space.
17104  complete="$FOUND_MAKE"
17105  path="${complete%% *}"
17106  tmp="$complete EOL"
17107  arguments="${tmp#* }"
17108
17109  # Input might be given as Windows format, start by converting to
17110  # unix format.
17111  new_path="$path"
17112
17113  windows_path="$new_path"
17114  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17115    unix_path=`$CYGPATH -u "$windows_path"`
17116    new_path="$unix_path"
17117  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17118    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17119    new_path="$unix_path"
17120  fi
17121
17122
17123  # Now try to locate executable using which
17124  new_path=`$WHICH "$new_path" 2> /dev/null`
17125
17126  if test "x$new_path" = x; then
17127    # Oops. Which didn't find the executable.
17128    # The splitting of arguments from the executable at a space might have been incorrect,
17129    # since paths with space are more likely in Windows. Give it another try with the whole
17130    # argument.
17131    path="$complete"
17132    arguments="EOL"
17133    new_path="$path"
17134
17135  windows_path="$new_path"
17136  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17137    unix_path=`$CYGPATH -u "$windows_path"`
17138    new_path="$unix_path"
17139  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17140    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17141    new_path="$unix_path"
17142  fi
17143
17144
17145    new_path=`$WHICH "$new_path" 2> /dev/null`
17146    # bat and cmd files are not always considered executable in MSYS causing which
17147    # to not find them
17148    if test "x$new_path" = x \
17149        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17150        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17151      new_path="$path"
17152
17153  windows_path="$new_path"
17154  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17155    unix_path=`$CYGPATH -u "$windows_path"`
17156    new_path="$unix_path"
17157  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17158    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17159    new_path="$unix_path"
17160  fi
17161
17162    fi
17163
17164    if test "x$new_path" = x; then
17165      # It's still not found. Now this is an unrecoverable error.
17166      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17167$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17168      has_space=`$ECHO "$complete" | $GREP " "`
17169      if test "x$has_space" != x; then
17170        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17171$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17172      fi
17173      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17174    fi
17175  fi
17176
17177  # Now new_path has a complete unix path to the binary
17178  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17179    # Keep paths in /bin as-is, but remove trailing .exe if any
17180    new_path="${new_path/%.exe/}"
17181    # Do not save /bin paths to all_fixpath_prefixes!
17182  else
17183    # Not in mixed or Windows style, start by that.
17184    new_path=`cmd //c echo $new_path`
17185
17186  input_path="$new_path"
17187  # Check if we need to convert this using DOS-style short mode. If the path
17188  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17189  # take no chances and rewrite it.
17190  # Note: m4 eats our [], so we need to use [ and ] instead.
17191  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17192  if test "x$has_forbidden_chars" != x; then
17193    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17194    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17195  fi
17196
17197    # Output is in $new_path
17198
17199  windows_path="$new_path"
17200  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17201    unix_path=`$CYGPATH -u "$windows_path"`
17202    new_path="$unix_path"
17203  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17204    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17205    new_path="$unix_path"
17206  fi
17207
17208    # remove trailing .exe if any
17209    new_path="${new_path/%.exe/}"
17210
17211    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17212    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17213  fi
17214
17215    else
17216      # We're on a unix platform. Hooray! :)
17217      # First separate the path from the arguments. This will split at the first
17218      # space.
17219      complete="$FOUND_MAKE"
17220      path="${complete%% *}"
17221      tmp="$complete EOL"
17222      arguments="${tmp#* }"
17223
17224      # Cannot rely on the command "which" here since it doesn't always work.
17225      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17226      if test -z "$is_absolute_path"; then
17227        # Path to executable is not absolute. Find it.
17228        IFS_save="$IFS"
17229        IFS=:
17230        for p in $PATH; do
17231          if test -f "$p/$path" && test -x "$p/$path"; then
17232            new_path="$p/$path"
17233            break
17234          fi
17235        done
17236        IFS="$IFS_save"
17237      else
17238        # This is an absolute path, we can use it without further modifications.
17239        new_path="$path"
17240      fi
17241
17242      if test "x$new_path" = x; then
17243        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17244$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17245        has_space=`$ECHO "$complete" | $GREP " "`
17246        if test "x$has_space" != x; then
17247          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17248$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17249        fi
17250        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17251      fi
17252    fi
17253
17254    # Now join together the path and the arguments once again
17255    if test "x$arguments" != xEOL; then
17256      new_complete="$new_path ${arguments% *}"
17257    else
17258      new_complete="$new_path"
17259    fi
17260
17261    if test "x$complete" != "x$new_complete"; then
17262      FOUND_MAKE="$new_complete"
17263      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17264$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17265    fi
17266  fi
17267
17268        fi
17269      fi
17270    fi
17271  fi
17272
17273        fi
17274        PATH=$OLD_PATH
17275      fi
17276    fi
17277
17278    if test "x$FOUND_MAKE" = x; then
17279      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
17280    fi
17281  fi
17282
17283  MAKE=$FOUND_MAKE
17284
17285  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
17286$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
17287
17288
17289  # Check if make supports the output sync option and if so, setup using it.
17290  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
17291$as_echo_n "checking if make --output-sync is supported... " >&6; }
17292  if $MAKE --version -O > /dev/null 2>&1; then
17293    OUTPUT_SYNC_SUPPORTED=true
17294    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17295$as_echo "yes" >&6; }
17296    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
17297$as_echo_n "checking for output-sync value... " >&6; }
17298
17299# Check whether --with-output-sync was given.
17300if test "${with_output_sync+set}" = set; then :
17301  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
17302fi
17303
17304    if test "x$OUTPUT_SYNC" = "x"; then
17305      OUTPUT_SYNC=none
17306    fi
17307    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
17308$as_echo "$OUTPUT_SYNC" >&6; }
17309    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
17310      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
17311    fi
17312  else
17313    OUTPUT_SYNC_SUPPORTED=false
17314    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17315$as_echo "no" >&6; }
17316  fi
17317
17318
17319
17320
17321
17322
17323  # Test if find supports -delete
17324  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
17325$as_echo_n "checking if find supports -delete... " >&6; }
17326  FIND_DELETE="-delete"
17327
17328  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
17329
17330  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
17331
17332  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
17333  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
17334    # No, it does not.
17335    rm $DELETEDIR/TestIfFindSupportsDelete
17336    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
17337      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
17338      FIND_DELETE="-print | xargs rm"
17339    else
17340      FIND_DELETE="-exec rm \{\} \+"
17341    fi
17342    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17343$as_echo "no" >&6; }
17344  else
17345    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17346$as_echo "yes" >&6; }
17347  fi
17348  rmdir $DELETEDIR
17349
17350
17351
17352  # These tools might not be installed by default,
17353  # need hint on how to install them.
17354
17355
17356
17357  # Publish this variable in the help.
17358
17359
17360  if test "x$UNZIP" = x; then
17361    # The variable is not set by user, try to locate tool using the code snippet
17362    for ac_prog in unzip
17363do
17364  # Extract the first word of "$ac_prog", so it can be a program name with args.
17365set dummy $ac_prog; ac_word=$2
17366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17367$as_echo_n "checking for $ac_word... " >&6; }
17368if ${ac_cv_path_UNZIP+:} false; then :
17369  $as_echo_n "(cached) " >&6
17370else
17371  case $UNZIP in
17372  [\\/]* | ?:[\\/]*)
17373  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17374  ;;
17375  *)
17376  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17377for as_dir in $PATH
17378do
17379  IFS=$as_save_IFS
17380  test -z "$as_dir" && as_dir=.
17381    for ac_exec_ext in '' $ac_executable_extensions; do
17382  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17383    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17384    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17385    break 2
17386  fi
17387done
17388  done
17389IFS=$as_save_IFS
17390
17391  ;;
17392esac
17393fi
17394UNZIP=$ac_cv_path_UNZIP
17395if test -n "$UNZIP"; then
17396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17397$as_echo "$UNZIP" >&6; }
17398else
17399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17400$as_echo "no" >&6; }
17401fi
17402
17403
17404  test -n "$UNZIP" && break
17405done
17406
17407  else
17408    # The variable is set, but is it from the command line or the environment?
17409
17410    # Try to remove the string !UNZIP! from our list.
17411    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
17412    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17413      # If it failed, the variable was not from the command line. Ignore it,
17414      # but warn the user (except for BASH, which is always set by the calling BASH).
17415      if test "xUNZIP" != xBASH; then
17416        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
17417$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
17418      fi
17419      # Try to locate tool using the code snippet
17420      for ac_prog in unzip
17421do
17422  # Extract the first word of "$ac_prog", so it can be a program name with args.
17423set dummy $ac_prog; ac_word=$2
17424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17425$as_echo_n "checking for $ac_word... " >&6; }
17426if ${ac_cv_path_UNZIP+:} false; then :
17427  $as_echo_n "(cached) " >&6
17428else
17429  case $UNZIP in
17430  [\\/]* | ?:[\\/]*)
17431  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17432  ;;
17433  *)
17434  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17435for as_dir in $PATH
17436do
17437  IFS=$as_save_IFS
17438  test -z "$as_dir" && as_dir=.
17439    for ac_exec_ext in '' $ac_executable_extensions; do
17440  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17441    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17442    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17443    break 2
17444  fi
17445done
17446  done
17447IFS=$as_save_IFS
17448
17449  ;;
17450esac
17451fi
17452UNZIP=$ac_cv_path_UNZIP
17453if test -n "$UNZIP"; then
17454  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17455$as_echo "$UNZIP" >&6; }
17456else
17457  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17458$as_echo "no" >&6; }
17459fi
17460
17461
17462  test -n "$UNZIP" && break
17463done
17464
17465    else
17466      # If it succeeded, then it was overridden by the user. We will use it
17467      # for the tool.
17468
17469      # First remove it from the list of overridden variables, so we can test
17470      # for unknown variables in the end.
17471      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17472
17473      # Check if the provided tool contains a complete path.
17474      tool_specified="$UNZIP"
17475      tool_basename="${tool_specified##*/}"
17476      if test "x$tool_basename" = "x$tool_specified"; then
17477        # A command without a complete path is provided, search $PATH.
17478        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
17479$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
17480        # Extract the first word of "$tool_basename", so it can be a program name with args.
17481set dummy $tool_basename; ac_word=$2
17482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17483$as_echo_n "checking for $ac_word... " >&6; }
17484if ${ac_cv_path_UNZIP+:} false; then :
17485  $as_echo_n "(cached) " >&6
17486else
17487  case $UNZIP in
17488  [\\/]* | ?:[\\/]*)
17489  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17490  ;;
17491  *)
17492  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17493for as_dir in $PATH
17494do
17495  IFS=$as_save_IFS
17496  test -z "$as_dir" && as_dir=.
17497    for ac_exec_ext in '' $ac_executable_extensions; do
17498  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17499    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17500    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17501    break 2
17502  fi
17503done
17504  done
17505IFS=$as_save_IFS
17506
17507  ;;
17508esac
17509fi
17510UNZIP=$ac_cv_path_UNZIP
17511if test -n "$UNZIP"; then
17512  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17513$as_echo "$UNZIP" >&6; }
17514else
17515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17516$as_echo "no" >&6; }
17517fi
17518
17519
17520        if test "x$UNZIP" = x; then
17521          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17522        fi
17523      else
17524        # Otherwise we believe it is a complete path. Use it as it is.
17525        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
17526$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
17527        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
17528$as_echo_n "checking for UNZIP... " >&6; }
17529        if test ! -x "$tool_specified"; then
17530          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17531$as_echo "not found" >&6; }
17532          as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17533        fi
17534        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17535$as_echo "$tool_specified" >&6; }
17536      fi
17537    fi
17538  fi
17539
17540
17541
17542  if test "x$UNZIP" = x; then
17543    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
17544  fi
17545
17546
17547
17548
17549
17550  # Publish this variable in the help.
17551
17552
17553  if test "x$ZIP" = x; then
17554    # The variable is not set by user, try to locate tool using the code snippet
17555    for ac_prog in zip
17556do
17557  # Extract the first word of "$ac_prog", so it can be a program name with args.
17558set dummy $ac_prog; ac_word=$2
17559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17560$as_echo_n "checking for $ac_word... " >&6; }
17561if ${ac_cv_path_ZIP+:} false; then :
17562  $as_echo_n "(cached) " >&6
17563else
17564  case $ZIP in
17565  [\\/]* | ?:[\\/]*)
17566  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17567  ;;
17568  *)
17569  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17570for as_dir in $PATH
17571do
17572  IFS=$as_save_IFS
17573  test -z "$as_dir" && as_dir=.
17574    for ac_exec_ext in '' $ac_executable_extensions; do
17575  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17576    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17577    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17578    break 2
17579  fi
17580done
17581  done
17582IFS=$as_save_IFS
17583
17584  ;;
17585esac
17586fi
17587ZIP=$ac_cv_path_ZIP
17588if test -n "$ZIP"; then
17589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17590$as_echo "$ZIP" >&6; }
17591else
17592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17593$as_echo "no" >&6; }
17594fi
17595
17596
17597  test -n "$ZIP" && break
17598done
17599
17600  else
17601    # The variable is set, but is it from the command line or the environment?
17602
17603    # Try to remove the string !ZIP! from our list.
17604    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
17605    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17606      # If it failed, the variable was not from the command line. Ignore it,
17607      # but warn the user (except for BASH, which is always set by the calling BASH).
17608      if test "xZIP" != xBASH; then
17609        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
17610$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
17611      fi
17612      # Try to locate tool using the code snippet
17613      for ac_prog in zip
17614do
17615  # Extract the first word of "$ac_prog", so it can be a program name with args.
17616set dummy $ac_prog; ac_word=$2
17617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17618$as_echo_n "checking for $ac_word... " >&6; }
17619if ${ac_cv_path_ZIP+:} false; then :
17620  $as_echo_n "(cached) " >&6
17621else
17622  case $ZIP in
17623  [\\/]* | ?:[\\/]*)
17624  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17625  ;;
17626  *)
17627  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17628for as_dir in $PATH
17629do
17630  IFS=$as_save_IFS
17631  test -z "$as_dir" && as_dir=.
17632    for ac_exec_ext in '' $ac_executable_extensions; do
17633  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17634    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17635    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17636    break 2
17637  fi
17638done
17639  done
17640IFS=$as_save_IFS
17641
17642  ;;
17643esac
17644fi
17645ZIP=$ac_cv_path_ZIP
17646if test -n "$ZIP"; then
17647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17648$as_echo "$ZIP" >&6; }
17649else
17650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17651$as_echo "no" >&6; }
17652fi
17653
17654
17655  test -n "$ZIP" && break
17656done
17657
17658    else
17659      # If it succeeded, then it was overridden by the user. We will use it
17660      # for the tool.
17661
17662      # First remove it from the list of overridden variables, so we can test
17663      # for unknown variables in the end.
17664      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17665
17666      # Check if the provided tool contains a complete path.
17667      tool_specified="$ZIP"
17668      tool_basename="${tool_specified##*/}"
17669      if test "x$tool_basename" = "x$tool_specified"; then
17670        # A command without a complete path is provided, search $PATH.
17671        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
17672$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
17673        # Extract the first word of "$tool_basename", so it can be a program name with args.
17674set dummy $tool_basename; ac_word=$2
17675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17676$as_echo_n "checking for $ac_word... " >&6; }
17677if ${ac_cv_path_ZIP+:} false; then :
17678  $as_echo_n "(cached) " >&6
17679else
17680  case $ZIP in
17681  [\\/]* | ?:[\\/]*)
17682  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17683  ;;
17684  *)
17685  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17686for as_dir in $PATH
17687do
17688  IFS=$as_save_IFS
17689  test -z "$as_dir" && as_dir=.
17690    for ac_exec_ext in '' $ac_executable_extensions; do
17691  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17692    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17693    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17694    break 2
17695  fi
17696done
17697  done
17698IFS=$as_save_IFS
17699
17700  ;;
17701esac
17702fi
17703ZIP=$ac_cv_path_ZIP
17704if test -n "$ZIP"; then
17705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17706$as_echo "$ZIP" >&6; }
17707else
17708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17709$as_echo "no" >&6; }
17710fi
17711
17712
17713        if test "x$ZIP" = x; then
17714          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17715        fi
17716      else
17717        # Otherwise we believe it is a complete path. Use it as it is.
17718        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
17719$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
17720        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
17721$as_echo_n "checking for ZIP... " >&6; }
17722        if test ! -x "$tool_specified"; then
17723          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17724$as_echo "not found" >&6; }
17725          as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17726        fi
17727        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17728$as_echo "$tool_specified" >&6; }
17729      fi
17730    fi
17731  fi
17732
17733
17734
17735  if test "x$ZIP" = x; then
17736    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
17737  fi
17738
17739
17740
17741  # Non-required basic tools
17742
17743
17744
17745  # Publish this variable in the help.
17746
17747
17748  if test "x$LDD" = x; then
17749    # The variable is not set by user, try to locate tool using the code snippet
17750    for ac_prog in ldd
17751do
17752  # Extract the first word of "$ac_prog", so it can be a program name with args.
17753set dummy $ac_prog; ac_word=$2
17754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17755$as_echo_n "checking for $ac_word... " >&6; }
17756if ${ac_cv_path_LDD+:} false; then :
17757  $as_echo_n "(cached) " >&6
17758else
17759  case $LDD in
17760  [\\/]* | ?:[\\/]*)
17761  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17762  ;;
17763  *)
17764  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17765for as_dir in $PATH
17766do
17767  IFS=$as_save_IFS
17768  test -z "$as_dir" && as_dir=.
17769    for ac_exec_ext in '' $ac_executable_extensions; do
17770  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17771    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17772    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17773    break 2
17774  fi
17775done
17776  done
17777IFS=$as_save_IFS
17778
17779  ;;
17780esac
17781fi
17782LDD=$ac_cv_path_LDD
17783if test -n "$LDD"; then
17784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17785$as_echo "$LDD" >&6; }
17786else
17787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17788$as_echo "no" >&6; }
17789fi
17790
17791
17792  test -n "$LDD" && break
17793done
17794
17795  else
17796    # The variable is set, but is it from the command line or the environment?
17797
17798    # Try to remove the string !LDD! from our list.
17799    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
17800    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17801      # If it failed, the variable was not from the command line. Ignore it,
17802      # but warn the user (except for BASH, which is always set by the calling BASH).
17803      if test "xLDD" != xBASH; then
17804        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
17805$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
17806      fi
17807      # Try to locate tool using the code snippet
17808      for ac_prog in ldd
17809do
17810  # Extract the first word of "$ac_prog", so it can be a program name with args.
17811set dummy $ac_prog; ac_word=$2
17812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17813$as_echo_n "checking for $ac_word... " >&6; }
17814if ${ac_cv_path_LDD+:} false; then :
17815  $as_echo_n "(cached) " >&6
17816else
17817  case $LDD in
17818  [\\/]* | ?:[\\/]*)
17819  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17820  ;;
17821  *)
17822  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17823for as_dir in $PATH
17824do
17825  IFS=$as_save_IFS
17826  test -z "$as_dir" && as_dir=.
17827    for ac_exec_ext in '' $ac_executable_extensions; do
17828  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17829    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17830    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17831    break 2
17832  fi
17833done
17834  done
17835IFS=$as_save_IFS
17836
17837  ;;
17838esac
17839fi
17840LDD=$ac_cv_path_LDD
17841if test -n "$LDD"; then
17842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17843$as_echo "$LDD" >&6; }
17844else
17845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17846$as_echo "no" >&6; }
17847fi
17848
17849
17850  test -n "$LDD" && break
17851done
17852
17853    else
17854      # If it succeeded, then it was overridden by the user. We will use it
17855      # for the tool.
17856
17857      # First remove it from the list of overridden variables, so we can test
17858      # for unknown variables in the end.
17859      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17860
17861      # Check if the provided tool contains a complete path.
17862      tool_specified="$LDD"
17863      tool_basename="${tool_specified##*/}"
17864      if test "x$tool_basename" = "x$tool_specified"; then
17865        # A command without a complete path is provided, search $PATH.
17866        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
17867$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
17868        # Extract the first word of "$tool_basename", so it can be a program name with args.
17869set dummy $tool_basename; ac_word=$2
17870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17871$as_echo_n "checking for $ac_word... " >&6; }
17872if ${ac_cv_path_LDD+:} false; then :
17873  $as_echo_n "(cached) " >&6
17874else
17875  case $LDD in
17876  [\\/]* | ?:[\\/]*)
17877  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17878  ;;
17879  *)
17880  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17881for as_dir in $PATH
17882do
17883  IFS=$as_save_IFS
17884  test -z "$as_dir" && as_dir=.
17885    for ac_exec_ext in '' $ac_executable_extensions; do
17886  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17887    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17888    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17889    break 2
17890  fi
17891done
17892  done
17893IFS=$as_save_IFS
17894
17895  ;;
17896esac
17897fi
17898LDD=$ac_cv_path_LDD
17899if test -n "$LDD"; then
17900  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17901$as_echo "$LDD" >&6; }
17902else
17903  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17904$as_echo "no" >&6; }
17905fi
17906
17907
17908        if test "x$LDD" = x; then
17909          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17910        fi
17911      else
17912        # Otherwise we believe it is a complete path. Use it as it is.
17913        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
17914$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
17915        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
17916$as_echo_n "checking for LDD... " >&6; }
17917        if test ! -x "$tool_specified"; then
17918          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17919$as_echo "not found" >&6; }
17920          as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
17921        fi
17922        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17923$as_echo "$tool_specified" >&6; }
17924      fi
17925    fi
17926  fi
17927
17928
17929  if test "x$LDD" = "x"; then
17930    # List shared lib dependencies is used for
17931    # debug output and checking for forbidden dependencies.
17932    # We can build without it.
17933    LDD="true"
17934  fi
17935
17936
17937  # Publish this variable in the help.
17938
17939
17940  if test "x$OTOOL" = x; then
17941    # The variable is not set by user, try to locate tool using the code snippet
17942    for ac_prog in otool
17943do
17944  # Extract the first word of "$ac_prog", so it can be a program name with args.
17945set dummy $ac_prog; ac_word=$2
17946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17947$as_echo_n "checking for $ac_word... " >&6; }
17948if ${ac_cv_path_OTOOL+:} false; then :
17949  $as_echo_n "(cached) " >&6
17950else
17951  case $OTOOL in
17952  [\\/]* | ?:[\\/]*)
17953  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17954  ;;
17955  *)
17956  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17957for as_dir in $PATH
17958do
17959  IFS=$as_save_IFS
17960  test -z "$as_dir" && as_dir=.
17961    for ac_exec_ext in '' $ac_executable_extensions; do
17962  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17963    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17964    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17965    break 2
17966  fi
17967done
17968  done
17969IFS=$as_save_IFS
17970
17971  ;;
17972esac
17973fi
17974OTOOL=$ac_cv_path_OTOOL
17975if test -n "$OTOOL"; then
17976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17977$as_echo "$OTOOL" >&6; }
17978else
17979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17980$as_echo "no" >&6; }
17981fi
17982
17983
17984  test -n "$OTOOL" && break
17985done
17986
17987  else
17988    # The variable is set, but is it from the command line or the environment?
17989
17990    # Try to remove the string !OTOOL! from our list.
17991    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
17992    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17993      # If it failed, the variable was not from the command line. Ignore it,
17994      # but warn the user (except for BASH, which is always set by the calling BASH).
17995      if test "xOTOOL" != xBASH; then
17996        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
17997$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
17998      fi
17999      # Try to locate tool using the code snippet
18000      for ac_prog in otool
18001do
18002  # Extract the first word of "$ac_prog", so it can be a program name with args.
18003set dummy $ac_prog; ac_word=$2
18004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18005$as_echo_n "checking for $ac_word... " >&6; }
18006if ${ac_cv_path_OTOOL+:} false; then :
18007  $as_echo_n "(cached) " >&6
18008else
18009  case $OTOOL in
18010  [\\/]* | ?:[\\/]*)
18011  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
18012  ;;
18013  *)
18014  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18015for as_dir in $PATH
18016do
18017  IFS=$as_save_IFS
18018  test -z "$as_dir" && as_dir=.
18019    for ac_exec_ext in '' $ac_executable_extensions; do
18020  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18021    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18022    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18023    break 2
18024  fi
18025done
18026  done
18027IFS=$as_save_IFS
18028
18029  ;;
18030esac
18031fi
18032OTOOL=$ac_cv_path_OTOOL
18033if test -n "$OTOOL"; then
18034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18035$as_echo "$OTOOL" >&6; }
18036else
18037  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18038$as_echo "no" >&6; }
18039fi
18040
18041
18042  test -n "$OTOOL" && break
18043done
18044
18045    else
18046      # If it succeeded, then it was overridden by the user. We will use it
18047      # for the tool.
18048
18049      # First remove it from the list of overridden variables, so we can test
18050      # for unknown variables in the end.
18051      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18052
18053      # Check if the provided tool contains a complete path.
18054      tool_specified="$OTOOL"
18055      tool_basename="${tool_specified##*/}"
18056      if test "x$tool_basename" = "x$tool_specified"; then
18057        # A command without a complete path is provided, search $PATH.
18058        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
18059$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
18060        # Extract the first word of "$tool_basename", so it can be a program name with args.
18061set dummy $tool_basename; ac_word=$2
18062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18063$as_echo_n "checking for $ac_word... " >&6; }
18064if ${ac_cv_path_OTOOL+:} false; then :
18065  $as_echo_n "(cached) " >&6
18066else
18067  case $OTOOL in
18068  [\\/]* | ?:[\\/]*)
18069  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
18070  ;;
18071  *)
18072  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18073for as_dir in $PATH
18074do
18075  IFS=$as_save_IFS
18076  test -z "$as_dir" && as_dir=.
18077    for ac_exec_ext in '' $ac_executable_extensions; do
18078  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18079    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18080    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18081    break 2
18082  fi
18083done
18084  done
18085IFS=$as_save_IFS
18086
18087  ;;
18088esac
18089fi
18090OTOOL=$ac_cv_path_OTOOL
18091if test -n "$OTOOL"; then
18092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18093$as_echo "$OTOOL" >&6; }
18094else
18095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18096$as_echo "no" >&6; }
18097fi
18098
18099
18100        if test "x$OTOOL" = x; then
18101          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18102        fi
18103      else
18104        # Otherwise we believe it is a complete path. Use it as it is.
18105        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
18106$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
18107        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
18108$as_echo_n "checking for OTOOL... " >&6; }
18109        if test ! -x "$tool_specified"; then
18110          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18111$as_echo "not found" >&6; }
18112          as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
18113        fi
18114        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18115$as_echo "$tool_specified" >&6; }
18116      fi
18117    fi
18118  fi
18119
18120
18121  if test "x$OTOOL" = "x"; then
18122    OTOOL="true"
18123  fi
18124
18125
18126  # Publish this variable in the help.
18127
18128
18129  if test "x$READELF" = x; then
18130    # The variable is not set by user, try to locate tool using the code snippet
18131    for ac_prog in greadelf readelf
18132do
18133  # Extract the first word of "$ac_prog", so it can be a program name with args.
18134set dummy $ac_prog; ac_word=$2
18135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18136$as_echo_n "checking for $ac_word... " >&6; }
18137if ${ac_cv_path_READELF+:} false; then :
18138  $as_echo_n "(cached) " >&6
18139else
18140  case $READELF in
18141  [\\/]* | ?:[\\/]*)
18142  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18143  ;;
18144  *)
18145  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18146for as_dir in $PATH
18147do
18148  IFS=$as_save_IFS
18149  test -z "$as_dir" && as_dir=.
18150    for ac_exec_ext in '' $ac_executable_extensions; do
18151  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18152    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18153    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18154    break 2
18155  fi
18156done
18157  done
18158IFS=$as_save_IFS
18159
18160  ;;
18161esac
18162fi
18163READELF=$ac_cv_path_READELF
18164if test -n "$READELF"; then
18165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18166$as_echo "$READELF" >&6; }
18167else
18168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18169$as_echo "no" >&6; }
18170fi
18171
18172
18173  test -n "$READELF" && break
18174done
18175
18176  else
18177    # The variable is set, but is it from the command line or the environment?
18178
18179    # Try to remove the string !READELF! from our list.
18180    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
18181    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18182      # If it failed, the variable was not from the command line. Ignore it,
18183      # but warn the user (except for BASH, which is always set by the calling BASH).
18184      if test "xREADELF" != xBASH; then
18185        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
18186$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
18187      fi
18188      # Try to locate tool using the code snippet
18189      for ac_prog in greadelf readelf
18190do
18191  # Extract the first word of "$ac_prog", so it can be a program name with args.
18192set dummy $ac_prog; ac_word=$2
18193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18194$as_echo_n "checking for $ac_word... " >&6; }
18195if ${ac_cv_path_READELF+:} false; then :
18196  $as_echo_n "(cached) " >&6
18197else
18198  case $READELF in
18199  [\\/]* | ?:[\\/]*)
18200  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18201  ;;
18202  *)
18203  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18204for as_dir in $PATH
18205do
18206  IFS=$as_save_IFS
18207  test -z "$as_dir" && as_dir=.
18208    for ac_exec_ext in '' $ac_executable_extensions; do
18209  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18210    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18211    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18212    break 2
18213  fi
18214done
18215  done
18216IFS=$as_save_IFS
18217
18218  ;;
18219esac
18220fi
18221READELF=$ac_cv_path_READELF
18222if test -n "$READELF"; then
18223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18224$as_echo "$READELF" >&6; }
18225else
18226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18227$as_echo "no" >&6; }
18228fi
18229
18230
18231  test -n "$READELF" && break
18232done
18233
18234    else
18235      # If it succeeded, then it was overridden by the user. We will use it
18236      # for the tool.
18237
18238      # First remove it from the list of overridden variables, so we can test
18239      # for unknown variables in the end.
18240      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18241
18242      # Check if the provided tool contains a complete path.
18243      tool_specified="$READELF"
18244      tool_basename="${tool_specified##*/}"
18245      if test "x$tool_basename" = "x$tool_specified"; then
18246        # A command without a complete path is provided, search $PATH.
18247        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
18248$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
18249        # Extract the first word of "$tool_basename", so it can be a program name with args.
18250set dummy $tool_basename; ac_word=$2
18251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18252$as_echo_n "checking for $ac_word... " >&6; }
18253if ${ac_cv_path_READELF+:} false; then :
18254  $as_echo_n "(cached) " >&6
18255else
18256  case $READELF in
18257  [\\/]* | ?:[\\/]*)
18258  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18259  ;;
18260  *)
18261  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18262for as_dir in $PATH
18263do
18264  IFS=$as_save_IFS
18265  test -z "$as_dir" && as_dir=.
18266    for ac_exec_ext in '' $ac_executable_extensions; do
18267  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18268    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18269    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18270    break 2
18271  fi
18272done
18273  done
18274IFS=$as_save_IFS
18275
18276  ;;
18277esac
18278fi
18279READELF=$ac_cv_path_READELF
18280if test -n "$READELF"; then
18281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18282$as_echo "$READELF" >&6; }
18283else
18284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18285$as_echo "no" >&6; }
18286fi
18287
18288
18289        if test "x$READELF" = x; then
18290          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18291        fi
18292      else
18293        # Otherwise we believe it is a complete path. Use it as it is.
18294        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
18295$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
18296        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
18297$as_echo_n "checking for READELF... " >&6; }
18298        if test ! -x "$tool_specified"; then
18299          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18300$as_echo "not found" >&6; }
18301          as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
18302        fi
18303        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18304$as_echo "$tool_specified" >&6; }
18305      fi
18306    fi
18307  fi
18308
18309
18310
18311
18312  # Publish this variable in the help.
18313
18314
18315  if test "x$HG" = x; then
18316    # The variable is not set by user, try to locate tool using the code snippet
18317    for ac_prog in hg
18318do
18319  # Extract the first word of "$ac_prog", so it can be a program name with args.
18320set dummy $ac_prog; ac_word=$2
18321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18322$as_echo_n "checking for $ac_word... " >&6; }
18323if ${ac_cv_path_HG+:} false; then :
18324  $as_echo_n "(cached) " >&6
18325else
18326  case $HG in
18327  [\\/]* | ?:[\\/]*)
18328  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18329  ;;
18330  *)
18331  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18332for as_dir in $PATH
18333do
18334  IFS=$as_save_IFS
18335  test -z "$as_dir" && as_dir=.
18336    for ac_exec_ext in '' $ac_executable_extensions; do
18337  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18338    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18339    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18340    break 2
18341  fi
18342done
18343  done
18344IFS=$as_save_IFS
18345
18346  ;;
18347esac
18348fi
18349HG=$ac_cv_path_HG
18350if test -n "$HG"; then
18351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18352$as_echo "$HG" >&6; }
18353else
18354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18355$as_echo "no" >&6; }
18356fi
18357
18358
18359  test -n "$HG" && break
18360done
18361
18362  else
18363    # The variable is set, but is it from the command line or the environment?
18364
18365    # Try to remove the string !HG! from our list.
18366    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
18367    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18368      # If it failed, the variable was not from the command line. Ignore it,
18369      # but warn the user (except for BASH, which is always set by the calling BASH).
18370      if test "xHG" != xBASH; then
18371        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
18372$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
18373      fi
18374      # Try to locate tool using the code snippet
18375      for ac_prog in hg
18376do
18377  # Extract the first word of "$ac_prog", so it can be a program name with args.
18378set dummy $ac_prog; ac_word=$2
18379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18380$as_echo_n "checking for $ac_word... " >&6; }
18381if ${ac_cv_path_HG+:} false; then :
18382  $as_echo_n "(cached) " >&6
18383else
18384  case $HG in
18385  [\\/]* | ?:[\\/]*)
18386  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18387  ;;
18388  *)
18389  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18390for as_dir in $PATH
18391do
18392  IFS=$as_save_IFS
18393  test -z "$as_dir" && as_dir=.
18394    for ac_exec_ext in '' $ac_executable_extensions; do
18395  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18396    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18397    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18398    break 2
18399  fi
18400done
18401  done
18402IFS=$as_save_IFS
18403
18404  ;;
18405esac
18406fi
18407HG=$ac_cv_path_HG
18408if test -n "$HG"; then
18409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18410$as_echo "$HG" >&6; }
18411else
18412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18413$as_echo "no" >&6; }
18414fi
18415
18416
18417  test -n "$HG" && break
18418done
18419
18420    else
18421      # If it succeeded, then it was overridden by the user. We will use it
18422      # for the tool.
18423
18424      # First remove it from the list of overridden variables, so we can test
18425      # for unknown variables in the end.
18426      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18427
18428      # Check if the provided tool contains a complete path.
18429      tool_specified="$HG"
18430      tool_basename="${tool_specified##*/}"
18431      if test "x$tool_basename" = "x$tool_specified"; then
18432        # A command without a complete path is provided, search $PATH.
18433        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
18434$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
18435        # Extract the first word of "$tool_basename", so it can be a program name with args.
18436set dummy $tool_basename; ac_word=$2
18437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18438$as_echo_n "checking for $ac_word... " >&6; }
18439if ${ac_cv_path_HG+:} false; then :
18440  $as_echo_n "(cached) " >&6
18441else
18442  case $HG in
18443  [\\/]* | ?:[\\/]*)
18444  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18445  ;;
18446  *)
18447  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18448for as_dir in $PATH
18449do
18450  IFS=$as_save_IFS
18451  test -z "$as_dir" && as_dir=.
18452    for ac_exec_ext in '' $ac_executable_extensions; do
18453  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18454    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18455    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18456    break 2
18457  fi
18458done
18459  done
18460IFS=$as_save_IFS
18461
18462  ;;
18463esac
18464fi
18465HG=$ac_cv_path_HG
18466if test -n "$HG"; then
18467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18468$as_echo "$HG" >&6; }
18469else
18470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18471$as_echo "no" >&6; }
18472fi
18473
18474
18475        if test "x$HG" = x; then
18476          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18477        fi
18478      else
18479        # Otherwise we believe it is a complete path. Use it as it is.
18480        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
18481$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
18482        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
18483$as_echo_n "checking for HG... " >&6; }
18484        if test ! -x "$tool_specified"; then
18485          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18486$as_echo "not found" >&6; }
18487          as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
18488        fi
18489        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18490$as_echo "$tool_specified" >&6; }
18491      fi
18492    fi
18493  fi
18494
18495
18496
18497
18498  # Publish this variable in the help.
18499
18500
18501  if test "x$STAT" = x; then
18502    # The variable is not set by user, try to locate tool using the code snippet
18503    for ac_prog in stat
18504do
18505  # Extract the first word of "$ac_prog", so it can be a program name with args.
18506set dummy $ac_prog; ac_word=$2
18507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18508$as_echo_n "checking for $ac_word... " >&6; }
18509if ${ac_cv_path_STAT+:} false; then :
18510  $as_echo_n "(cached) " >&6
18511else
18512  case $STAT in
18513  [\\/]* | ?:[\\/]*)
18514  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18515  ;;
18516  *)
18517  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18518for as_dir in $PATH
18519do
18520  IFS=$as_save_IFS
18521  test -z "$as_dir" && as_dir=.
18522    for ac_exec_ext in '' $ac_executable_extensions; do
18523  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18524    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18525    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18526    break 2
18527  fi
18528done
18529  done
18530IFS=$as_save_IFS
18531
18532  ;;
18533esac
18534fi
18535STAT=$ac_cv_path_STAT
18536if test -n "$STAT"; then
18537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18538$as_echo "$STAT" >&6; }
18539else
18540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18541$as_echo "no" >&6; }
18542fi
18543
18544
18545  test -n "$STAT" && break
18546done
18547
18548  else
18549    # The variable is set, but is it from the command line or the environment?
18550
18551    # Try to remove the string !STAT! from our list.
18552    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
18553    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18554      # If it failed, the variable was not from the command line. Ignore it,
18555      # but warn the user (except for BASH, which is always set by the calling BASH).
18556      if test "xSTAT" != xBASH; then
18557        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
18558$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
18559      fi
18560      # Try to locate tool using the code snippet
18561      for ac_prog in stat
18562do
18563  # Extract the first word of "$ac_prog", so it can be a program name with args.
18564set dummy $ac_prog; ac_word=$2
18565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18566$as_echo_n "checking for $ac_word... " >&6; }
18567if ${ac_cv_path_STAT+:} false; then :
18568  $as_echo_n "(cached) " >&6
18569else
18570  case $STAT in
18571  [\\/]* | ?:[\\/]*)
18572  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18573  ;;
18574  *)
18575  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18576for as_dir in $PATH
18577do
18578  IFS=$as_save_IFS
18579  test -z "$as_dir" && as_dir=.
18580    for ac_exec_ext in '' $ac_executable_extensions; do
18581  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18582    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18583    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18584    break 2
18585  fi
18586done
18587  done
18588IFS=$as_save_IFS
18589
18590  ;;
18591esac
18592fi
18593STAT=$ac_cv_path_STAT
18594if test -n "$STAT"; then
18595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18596$as_echo "$STAT" >&6; }
18597else
18598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18599$as_echo "no" >&6; }
18600fi
18601
18602
18603  test -n "$STAT" && break
18604done
18605
18606    else
18607      # If it succeeded, then it was overridden by the user. We will use it
18608      # for the tool.
18609
18610      # First remove it from the list of overridden variables, so we can test
18611      # for unknown variables in the end.
18612      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18613
18614      # Check if the provided tool contains a complete path.
18615      tool_specified="$STAT"
18616      tool_basename="${tool_specified##*/}"
18617      if test "x$tool_basename" = "x$tool_specified"; then
18618        # A command without a complete path is provided, search $PATH.
18619        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
18620$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
18621        # Extract the first word of "$tool_basename", so it can be a program name with args.
18622set dummy $tool_basename; ac_word=$2
18623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18624$as_echo_n "checking for $ac_word... " >&6; }
18625if ${ac_cv_path_STAT+:} false; then :
18626  $as_echo_n "(cached) " >&6
18627else
18628  case $STAT in
18629  [\\/]* | ?:[\\/]*)
18630  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18631  ;;
18632  *)
18633  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18634for as_dir in $PATH
18635do
18636  IFS=$as_save_IFS
18637  test -z "$as_dir" && as_dir=.
18638    for ac_exec_ext in '' $ac_executable_extensions; do
18639  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18640    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18641    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18642    break 2
18643  fi
18644done
18645  done
18646IFS=$as_save_IFS
18647
18648  ;;
18649esac
18650fi
18651STAT=$ac_cv_path_STAT
18652if test -n "$STAT"; then
18653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18654$as_echo "$STAT" >&6; }
18655else
18656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18657$as_echo "no" >&6; }
18658fi
18659
18660
18661        if test "x$STAT" = x; then
18662          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18663        fi
18664      else
18665        # Otherwise we believe it is a complete path. Use it as it is.
18666        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
18667$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
18668        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
18669$as_echo_n "checking for STAT... " >&6; }
18670        if test ! -x "$tool_specified"; then
18671          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18672$as_echo "not found" >&6; }
18673          as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
18674        fi
18675        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18676$as_echo "$tool_specified" >&6; }
18677      fi
18678    fi
18679  fi
18680
18681
18682
18683
18684  # Publish this variable in the help.
18685
18686
18687  if test "x$TIME" = x; then
18688    # The variable is not set by user, try to locate tool using the code snippet
18689    for ac_prog in time
18690do
18691  # Extract the first word of "$ac_prog", so it can be a program name with args.
18692set dummy $ac_prog; ac_word=$2
18693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18694$as_echo_n "checking for $ac_word... " >&6; }
18695if ${ac_cv_path_TIME+:} false; then :
18696  $as_echo_n "(cached) " >&6
18697else
18698  case $TIME in
18699  [\\/]* | ?:[\\/]*)
18700  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18701  ;;
18702  *)
18703  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18704for as_dir in $PATH
18705do
18706  IFS=$as_save_IFS
18707  test -z "$as_dir" && as_dir=.
18708    for ac_exec_ext in '' $ac_executable_extensions; do
18709  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18710    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18711    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18712    break 2
18713  fi
18714done
18715  done
18716IFS=$as_save_IFS
18717
18718  ;;
18719esac
18720fi
18721TIME=$ac_cv_path_TIME
18722if test -n "$TIME"; then
18723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18724$as_echo "$TIME" >&6; }
18725else
18726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18727$as_echo "no" >&6; }
18728fi
18729
18730
18731  test -n "$TIME" && break
18732done
18733
18734  else
18735    # The variable is set, but is it from the command line or the environment?
18736
18737    # Try to remove the string !TIME! from our list.
18738    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
18739    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18740      # If it failed, the variable was not from the command line. Ignore it,
18741      # but warn the user (except for BASH, which is always set by the calling BASH).
18742      if test "xTIME" != xBASH; then
18743        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
18744$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
18745      fi
18746      # Try to locate tool using the code snippet
18747      for ac_prog in time
18748do
18749  # Extract the first word of "$ac_prog", so it can be a program name with args.
18750set dummy $ac_prog; ac_word=$2
18751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18752$as_echo_n "checking for $ac_word... " >&6; }
18753if ${ac_cv_path_TIME+:} false; then :
18754  $as_echo_n "(cached) " >&6
18755else
18756  case $TIME in
18757  [\\/]* | ?:[\\/]*)
18758  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18759  ;;
18760  *)
18761  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18762for as_dir in $PATH
18763do
18764  IFS=$as_save_IFS
18765  test -z "$as_dir" && as_dir=.
18766    for ac_exec_ext in '' $ac_executable_extensions; do
18767  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18768    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18769    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18770    break 2
18771  fi
18772done
18773  done
18774IFS=$as_save_IFS
18775
18776  ;;
18777esac
18778fi
18779TIME=$ac_cv_path_TIME
18780if test -n "$TIME"; then
18781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18782$as_echo "$TIME" >&6; }
18783else
18784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18785$as_echo "no" >&6; }
18786fi
18787
18788
18789  test -n "$TIME" && break
18790done
18791
18792    else
18793      # If it succeeded, then it was overridden by the user. We will use it
18794      # for the tool.
18795
18796      # First remove it from the list of overridden variables, so we can test
18797      # for unknown variables in the end.
18798      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18799
18800      # Check if the provided tool contains a complete path.
18801      tool_specified="$TIME"
18802      tool_basename="${tool_specified##*/}"
18803      if test "x$tool_basename" = "x$tool_specified"; then
18804        # A command without a complete path is provided, search $PATH.
18805        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
18806$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
18807        # Extract the first word of "$tool_basename", so it can be a program name with args.
18808set dummy $tool_basename; ac_word=$2
18809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18810$as_echo_n "checking for $ac_word... " >&6; }
18811if ${ac_cv_path_TIME+:} false; then :
18812  $as_echo_n "(cached) " >&6
18813else
18814  case $TIME in
18815  [\\/]* | ?:[\\/]*)
18816  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18817  ;;
18818  *)
18819  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18820for as_dir in $PATH
18821do
18822  IFS=$as_save_IFS
18823  test -z "$as_dir" && as_dir=.
18824    for ac_exec_ext in '' $ac_executable_extensions; do
18825  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18826    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18827    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18828    break 2
18829  fi
18830done
18831  done
18832IFS=$as_save_IFS
18833
18834  ;;
18835esac
18836fi
18837TIME=$ac_cv_path_TIME
18838if test -n "$TIME"; then
18839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18840$as_echo "$TIME" >&6; }
18841else
18842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18843$as_echo "no" >&6; }
18844fi
18845
18846
18847        if test "x$TIME" = x; then
18848          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18849        fi
18850      else
18851        # Otherwise we believe it is a complete path. Use it as it is.
18852        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
18853$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
18854        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
18855$as_echo_n "checking for TIME... " >&6; }
18856        if test ! -x "$tool_specified"; then
18857          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18858$as_echo "not found" >&6; }
18859          as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
18860        fi
18861        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18862$as_echo "$tool_specified" >&6; }
18863      fi
18864    fi
18865  fi
18866
18867
18868  # Check if it's GNU time
18869  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
18870  if test "x$IS_GNU_TIME" != x; then
18871    IS_GNU_TIME=yes
18872  else
18873    IS_GNU_TIME=no
18874  fi
18875
18876
18877  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
18878
18879
18880
18881  # Publish this variable in the help.
18882
18883
18884  if test "x$DSYMUTIL" = x; then
18885    # The variable is not set by user, try to locate tool using the code snippet
18886    for ac_prog in dsymutil
18887do
18888  # Extract the first word of "$ac_prog", so it can be a program name with args.
18889set dummy $ac_prog; ac_word=$2
18890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18891$as_echo_n "checking for $ac_word... " >&6; }
18892if ${ac_cv_path_DSYMUTIL+:} false; then :
18893  $as_echo_n "(cached) " >&6
18894else
18895  case $DSYMUTIL in
18896  [\\/]* | ?:[\\/]*)
18897  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18898  ;;
18899  *)
18900  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18901for as_dir in $PATH
18902do
18903  IFS=$as_save_IFS
18904  test -z "$as_dir" && as_dir=.
18905    for ac_exec_ext in '' $ac_executable_extensions; do
18906  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18907    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18908    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18909    break 2
18910  fi
18911done
18912  done
18913IFS=$as_save_IFS
18914
18915  ;;
18916esac
18917fi
18918DSYMUTIL=$ac_cv_path_DSYMUTIL
18919if test -n "$DSYMUTIL"; then
18920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18921$as_echo "$DSYMUTIL" >&6; }
18922else
18923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18924$as_echo "no" >&6; }
18925fi
18926
18927
18928  test -n "$DSYMUTIL" && break
18929done
18930
18931  else
18932    # The variable is set, but is it from the command line or the environment?
18933
18934    # Try to remove the string !DSYMUTIL! from our list.
18935    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
18936    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18937      # If it failed, the variable was not from the command line. Ignore it,
18938      # but warn the user (except for BASH, which is always set by the calling BASH).
18939      if test "xDSYMUTIL" != xBASH; then
18940        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
18941$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
18942      fi
18943      # Try to locate tool using the code snippet
18944      for ac_prog in dsymutil
18945do
18946  # Extract the first word of "$ac_prog", so it can be a program name with args.
18947set dummy $ac_prog; ac_word=$2
18948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18949$as_echo_n "checking for $ac_word... " >&6; }
18950if ${ac_cv_path_DSYMUTIL+:} false; then :
18951  $as_echo_n "(cached) " >&6
18952else
18953  case $DSYMUTIL in
18954  [\\/]* | ?:[\\/]*)
18955  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18956  ;;
18957  *)
18958  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18959for as_dir in $PATH
18960do
18961  IFS=$as_save_IFS
18962  test -z "$as_dir" && as_dir=.
18963    for ac_exec_ext in '' $ac_executable_extensions; do
18964  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18965    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18966    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18967    break 2
18968  fi
18969done
18970  done
18971IFS=$as_save_IFS
18972
18973  ;;
18974esac
18975fi
18976DSYMUTIL=$ac_cv_path_DSYMUTIL
18977if test -n "$DSYMUTIL"; then
18978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18979$as_echo "$DSYMUTIL" >&6; }
18980else
18981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18982$as_echo "no" >&6; }
18983fi
18984
18985
18986  test -n "$DSYMUTIL" && break
18987done
18988
18989    else
18990      # If it succeeded, then it was overridden by the user. We will use it
18991      # for the tool.
18992
18993      # First remove it from the list of overridden variables, so we can test
18994      # for unknown variables in the end.
18995      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18996
18997      # Check if the provided tool contains a complete path.
18998      tool_specified="$DSYMUTIL"
18999      tool_basename="${tool_specified##*/}"
19000      if test "x$tool_basename" = "x$tool_specified"; then
19001        # A command without a complete path is provided, search $PATH.
19002        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
19003$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
19004        # Extract the first word of "$tool_basename", so it can be a program name with args.
19005set dummy $tool_basename; ac_word=$2
19006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19007$as_echo_n "checking for $ac_word... " >&6; }
19008if ${ac_cv_path_DSYMUTIL+:} false; then :
19009  $as_echo_n "(cached) " >&6
19010else
19011  case $DSYMUTIL in
19012  [\\/]* | ?:[\\/]*)
19013  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19014  ;;
19015  *)
19016  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19017for as_dir in $PATH
19018do
19019  IFS=$as_save_IFS
19020  test -z "$as_dir" && as_dir=.
19021    for ac_exec_ext in '' $ac_executable_extensions; do
19022  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19023    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19024    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19025    break 2
19026  fi
19027done
19028  done
19029IFS=$as_save_IFS
19030
19031  ;;
19032esac
19033fi
19034DSYMUTIL=$ac_cv_path_DSYMUTIL
19035if test -n "$DSYMUTIL"; then
19036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19037$as_echo "$DSYMUTIL" >&6; }
19038else
19039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19040$as_echo "no" >&6; }
19041fi
19042
19043
19044        if test "x$DSYMUTIL" = x; then
19045          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19046        fi
19047      else
19048        # Otherwise we believe it is a complete path. Use it as it is.
19049        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
19050$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
19051        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
19052$as_echo_n "checking for DSYMUTIL... " >&6; }
19053        if test ! -x "$tool_specified"; then
19054          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19055$as_echo "not found" >&6; }
19056          as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
19057        fi
19058        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19059$as_echo "$tool_specified" >&6; }
19060      fi
19061    fi
19062  fi
19063
19064
19065
19066  if test "x$DSYMUTIL" = x; then
19067    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
19068  fi
19069
19070
19071
19072
19073
19074  # Publish this variable in the help.
19075
19076
19077  if test "x$XATTR" = x; then
19078    # The variable is not set by user, try to locate tool using the code snippet
19079    for ac_prog in xattr
19080do
19081  # Extract the first word of "$ac_prog", so it can be a program name with args.
19082set dummy $ac_prog; ac_word=$2
19083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19084$as_echo_n "checking for $ac_word... " >&6; }
19085if ${ac_cv_path_XATTR+:} false; then :
19086  $as_echo_n "(cached) " >&6
19087else
19088  case $XATTR in
19089  [\\/]* | ?:[\\/]*)
19090  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19091  ;;
19092  *)
19093  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19094for as_dir in $PATH
19095do
19096  IFS=$as_save_IFS
19097  test -z "$as_dir" && as_dir=.
19098    for ac_exec_ext in '' $ac_executable_extensions; do
19099  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19100    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19101    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19102    break 2
19103  fi
19104done
19105  done
19106IFS=$as_save_IFS
19107
19108  ;;
19109esac
19110fi
19111XATTR=$ac_cv_path_XATTR
19112if test -n "$XATTR"; then
19113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19114$as_echo "$XATTR" >&6; }
19115else
19116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19117$as_echo "no" >&6; }
19118fi
19119
19120
19121  test -n "$XATTR" && break
19122done
19123
19124  else
19125    # The variable is set, but is it from the command line or the environment?
19126
19127    # Try to remove the string !XATTR! from our list.
19128    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
19129    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19130      # If it failed, the variable was not from the command line. Ignore it,
19131      # but warn the user (except for BASH, which is always set by the calling BASH).
19132      if test "xXATTR" != xBASH; then
19133        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
19134$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
19135      fi
19136      # Try to locate tool using the code snippet
19137      for ac_prog in xattr
19138do
19139  # Extract the first word of "$ac_prog", so it can be a program name with args.
19140set dummy $ac_prog; ac_word=$2
19141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19142$as_echo_n "checking for $ac_word... " >&6; }
19143if ${ac_cv_path_XATTR+:} false; then :
19144  $as_echo_n "(cached) " >&6
19145else
19146  case $XATTR in
19147  [\\/]* | ?:[\\/]*)
19148  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19149  ;;
19150  *)
19151  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19152for as_dir in $PATH
19153do
19154  IFS=$as_save_IFS
19155  test -z "$as_dir" && as_dir=.
19156    for ac_exec_ext in '' $ac_executable_extensions; do
19157  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19158    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19159    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19160    break 2
19161  fi
19162done
19163  done
19164IFS=$as_save_IFS
19165
19166  ;;
19167esac
19168fi
19169XATTR=$ac_cv_path_XATTR
19170if test -n "$XATTR"; then
19171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19172$as_echo "$XATTR" >&6; }
19173else
19174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19175$as_echo "no" >&6; }
19176fi
19177
19178
19179  test -n "$XATTR" && break
19180done
19181
19182    else
19183      # If it succeeded, then it was overridden by the user. We will use it
19184      # for the tool.
19185
19186      # First remove it from the list of overridden variables, so we can test
19187      # for unknown variables in the end.
19188      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19189
19190      # Check if the provided tool contains a complete path.
19191      tool_specified="$XATTR"
19192      tool_basename="${tool_specified##*/}"
19193      if test "x$tool_basename" = "x$tool_specified"; then
19194        # A command without a complete path is provided, search $PATH.
19195        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
19196$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
19197        # Extract the first word of "$tool_basename", so it can be a program name with args.
19198set dummy $tool_basename; ac_word=$2
19199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19200$as_echo_n "checking for $ac_word... " >&6; }
19201if ${ac_cv_path_XATTR+:} false; then :
19202  $as_echo_n "(cached) " >&6
19203else
19204  case $XATTR in
19205  [\\/]* | ?:[\\/]*)
19206  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19207  ;;
19208  *)
19209  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19210for as_dir in $PATH
19211do
19212  IFS=$as_save_IFS
19213  test -z "$as_dir" && as_dir=.
19214    for ac_exec_ext in '' $ac_executable_extensions; do
19215  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19216    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19217    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19218    break 2
19219  fi
19220done
19221  done
19222IFS=$as_save_IFS
19223
19224  ;;
19225esac
19226fi
19227XATTR=$ac_cv_path_XATTR
19228if test -n "$XATTR"; then
19229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19230$as_echo "$XATTR" >&6; }
19231else
19232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19233$as_echo "no" >&6; }
19234fi
19235
19236
19237        if test "x$XATTR" = x; then
19238          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19239        fi
19240      else
19241        # Otherwise we believe it is a complete path. Use it as it is.
19242        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
19243$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
19244        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
19245$as_echo_n "checking for XATTR... " >&6; }
19246        if test ! -x "$tool_specified"; then
19247          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19248$as_echo "not found" >&6; }
19249          as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
19250        fi
19251        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19252$as_echo "$tool_specified" >&6; }
19253      fi
19254    fi
19255  fi
19256
19257
19258
19259  if test "x$XATTR" = x; then
19260    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
19261  fi
19262
19263
19264
19265
19266  # Publish this variable in the help.
19267
19268
19269  if test "x$CODESIGN" = x; then
19270    # The variable is not set by user, try to locate tool using the code snippet
19271    for ac_prog in codesign
19272do
19273  # Extract the first word of "$ac_prog", so it can be a program name with args.
19274set dummy $ac_prog; ac_word=$2
19275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19276$as_echo_n "checking for $ac_word... " >&6; }
19277if ${ac_cv_path_CODESIGN+:} false; then :
19278  $as_echo_n "(cached) " >&6
19279else
19280  case $CODESIGN in
19281  [\\/]* | ?:[\\/]*)
19282  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19283  ;;
19284  *)
19285  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19286for as_dir in $PATH
19287do
19288  IFS=$as_save_IFS
19289  test -z "$as_dir" && as_dir=.
19290    for ac_exec_ext in '' $ac_executable_extensions; do
19291  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19292    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19293    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19294    break 2
19295  fi
19296done
19297  done
19298IFS=$as_save_IFS
19299
19300  ;;
19301esac
19302fi
19303CODESIGN=$ac_cv_path_CODESIGN
19304if test -n "$CODESIGN"; then
19305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19306$as_echo "$CODESIGN" >&6; }
19307else
19308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19309$as_echo "no" >&6; }
19310fi
19311
19312
19313  test -n "$CODESIGN" && break
19314done
19315
19316  else
19317    # The variable is set, but is it from the command line or the environment?
19318
19319    # Try to remove the string !CODESIGN! from our list.
19320    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
19321    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19322      # If it failed, the variable was not from the command line. Ignore it,
19323      # but warn the user (except for BASH, which is always set by the calling BASH).
19324      if test "xCODESIGN" != xBASH; then
19325        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
19326$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
19327      fi
19328      # Try to locate tool using the code snippet
19329      for ac_prog in codesign
19330do
19331  # Extract the first word of "$ac_prog", so it can be a program name with args.
19332set dummy $ac_prog; ac_word=$2
19333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19334$as_echo_n "checking for $ac_word... " >&6; }
19335if ${ac_cv_path_CODESIGN+:} false; then :
19336  $as_echo_n "(cached) " >&6
19337else
19338  case $CODESIGN in
19339  [\\/]* | ?:[\\/]*)
19340  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19341  ;;
19342  *)
19343  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19344for as_dir in $PATH
19345do
19346  IFS=$as_save_IFS
19347  test -z "$as_dir" && as_dir=.
19348    for ac_exec_ext in '' $ac_executable_extensions; do
19349  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19350    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19351    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19352    break 2
19353  fi
19354done
19355  done
19356IFS=$as_save_IFS
19357
19358  ;;
19359esac
19360fi
19361CODESIGN=$ac_cv_path_CODESIGN
19362if test -n "$CODESIGN"; then
19363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19364$as_echo "$CODESIGN" >&6; }
19365else
19366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19367$as_echo "no" >&6; }
19368fi
19369
19370
19371  test -n "$CODESIGN" && break
19372done
19373
19374    else
19375      # If it succeeded, then it was overridden by the user. We will use it
19376      # for the tool.
19377
19378      # First remove it from the list of overridden variables, so we can test
19379      # for unknown variables in the end.
19380      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19381
19382      # Check if the provided tool contains a complete path.
19383      tool_specified="$CODESIGN"
19384      tool_basename="${tool_specified##*/}"
19385      if test "x$tool_basename" = "x$tool_specified"; then
19386        # A command without a complete path is provided, search $PATH.
19387        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
19388$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
19389        # Extract the first word of "$tool_basename", so it can be a program name with args.
19390set dummy $tool_basename; ac_word=$2
19391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19392$as_echo_n "checking for $ac_word... " >&6; }
19393if ${ac_cv_path_CODESIGN+:} false; then :
19394  $as_echo_n "(cached) " >&6
19395else
19396  case $CODESIGN in
19397  [\\/]* | ?:[\\/]*)
19398  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19399  ;;
19400  *)
19401  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19402for as_dir in $PATH
19403do
19404  IFS=$as_save_IFS
19405  test -z "$as_dir" && as_dir=.
19406    for ac_exec_ext in '' $ac_executable_extensions; do
19407  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19408    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19409    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19410    break 2
19411  fi
19412done
19413  done
19414IFS=$as_save_IFS
19415
19416  ;;
19417esac
19418fi
19419CODESIGN=$ac_cv_path_CODESIGN
19420if test -n "$CODESIGN"; then
19421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19422$as_echo "$CODESIGN" >&6; }
19423else
19424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19425$as_echo "no" >&6; }
19426fi
19427
19428
19429        if test "x$CODESIGN" = x; then
19430          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19431        fi
19432      else
19433        # Otherwise we believe it is a complete path. Use it as it is.
19434        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
19435$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
19436        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
19437$as_echo_n "checking for CODESIGN... " >&6; }
19438        if test ! -x "$tool_specified"; then
19439          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19440$as_echo "not found" >&6; }
19441          as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
19442        fi
19443        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19444$as_echo "$tool_specified" >&6; }
19445      fi
19446    fi
19447  fi
19448
19449
19450    if test "x$CODESIGN" != "x"; then
19451      # Verify that the openjdk_codesign certificate is present
19452      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
19453$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
19454      rm -f codesign-testfile
19455      touch codesign-testfile
19456      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
19457      rm -f codesign-testfile
19458      if test "x$CODESIGN" = x; then
19459        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19460$as_echo "no" >&6; }
19461      else
19462        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19463$as_echo "yes" >&6; }
19464      fi
19465    fi
19466
19467
19468
19469  # Publish this variable in the help.
19470
19471
19472  if test "x$SETFILE" = x; then
19473    # The variable is not set by user, try to locate tool using the code snippet
19474    for ac_prog in SetFile
19475do
19476  # Extract the first word of "$ac_prog", so it can be a program name with args.
19477set dummy $ac_prog; ac_word=$2
19478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19479$as_echo_n "checking for $ac_word... " >&6; }
19480if ${ac_cv_path_SETFILE+:} false; then :
19481  $as_echo_n "(cached) " >&6
19482else
19483  case $SETFILE in
19484  [\\/]* | ?:[\\/]*)
19485  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
19486  ;;
19487  *)
19488  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19489for as_dir in $PATH
19490do
19491  IFS=$as_save_IFS
19492  test -z "$as_dir" && as_dir=.
19493    for ac_exec_ext in '' $ac_executable_extensions; do
19494  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19495    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
19496    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19497    break 2
19498  fi
19499done
19500  done
19501IFS=$as_save_IFS
19502
19503  ;;
19504esac
19505fi
19506SETFILE=$ac_cv_path_SETFILE
19507if test -n "$SETFILE"; then
19508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
19509$as_echo "$SETFILE" >&6; }
19510else
19511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19512$as_echo "no" >&6; }
19513fi
19514
19515
19516  test -n "$SETFILE" && break
19517done
19518
19519  else
19520    # The variable is set, but is it from the command line or the environment?
19521
19522    # Try to remove the string !SETFILE! from our list.
19523    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
19524    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19525      # If it failed, the variable was not from the command line. Ignore it,
19526      # but warn the user (except for BASH, which is always set by the calling BASH).
19527      if test "xSETFILE" != xBASH; then
19528        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
19529$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
19530      fi
19531      # Try to locate tool using the code snippet
19532      for ac_prog in SetFile
19533do
19534  # Extract the first word of "$ac_prog", so it can be a program name with args.
19535set dummy $ac_prog; ac_word=$2
19536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19537$as_echo_n "checking for $ac_word... " >&6; }
19538if ${ac_cv_path_SETFILE+:} false; then :
19539  $as_echo_n "(cached) " >&6
19540else
19541  case $SETFILE in
19542  [\\/]* | ?:[\\/]*)
19543  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
19544  ;;
19545  *)
19546  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19547for as_dir in $PATH
19548do
19549  IFS=$as_save_IFS
19550  test -z "$as_dir" && as_dir=.
19551    for ac_exec_ext in '' $ac_executable_extensions; do
19552  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19553    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
19554    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19555    break 2
19556  fi
19557done
19558  done
19559IFS=$as_save_IFS
19560
19561  ;;
19562esac
19563fi
19564SETFILE=$ac_cv_path_SETFILE
19565if test -n "$SETFILE"; then
19566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
19567$as_echo "$SETFILE" >&6; }
19568else
19569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19570$as_echo "no" >&6; }
19571fi
19572
19573
19574  test -n "$SETFILE" && break
19575done
19576
19577    else
19578      # If it succeeded, then it was overridden by the user. We will use it
19579      # for the tool.
19580
19581      # First remove it from the list of overridden variables, so we can test
19582      # for unknown variables in the end.
19583      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19584
19585      # Check if the provided tool contains a complete path.
19586      tool_specified="$SETFILE"
19587      tool_basename="${tool_specified##*/}"
19588      if test "x$tool_basename" = "x$tool_specified"; then
19589        # A command without a complete path is provided, search $PATH.
19590        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
19591$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
19592        # Extract the first word of "$tool_basename", so it can be a program name with args.
19593set dummy $tool_basename; ac_word=$2
19594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19595$as_echo_n "checking for $ac_word... " >&6; }
19596if ${ac_cv_path_SETFILE+:} false; then :
19597  $as_echo_n "(cached) " >&6
19598else
19599  case $SETFILE in
19600  [\\/]* | ?:[\\/]*)
19601  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
19602  ;;
19603  *)
19604  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19605for as_dir in $PATH
19606do
19607  IFS=$as_save_IFS
19608  test -z "$as_dir" && as_dir=.
19609    for ac_exec_ext in '' $ac_executable_extensions; do
19610  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19611    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
19612    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19613    break 2
19614  fi
19615done
19616  done
19617IFS=$as_save_IFS
19618
19619  ;;
19620esac
19621fi
19622SETFILE=$ac_cv_path_SETFILE
19623if test -n "$SETFILE"; then
19624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
19625$as_echo "$SETFILE" >&6; }
19626else
19627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19628$as_echo "no" >&6; }
19629fi
19630
19631
19632        if test "x$SETFILE" = x; then
19633          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19634        fi
19635      else
19636        # Otherwise we believe it is a complete path. Use it as it is.
19637        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
19638$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
19639        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
19640$as_echo_n "checking for SETFILE... " >&6; }
19641        if test ! -x "$tool_specified"; then
19642          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19643$as_echo "not found" >&6; }
19644          as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
19645        fi
19646        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19647$as_echo "$tool_specified" >&6; }
19648      fi
19649    fi
19650  fi
19651
19652
19653
19654  if test "x$SETFILE" = x; then
19655    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
19656  fi
19657
19658
19659  fi
19660
19661
19662  # Test if bash supports pipefail.
19663  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
19664$as_echo_n "checking if bash supports pipefail... " >&6; }
19665  if ${BASH} -c 'set -o pipefail'; then
19666    BASH_ARGS="$BASH_ARGS -o pipefail"
19667    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19668$as_echo "yes" >&6; }
19669  else
19670    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19671$as_echo "no" >&6; }
19672  fi
19673
19674  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
19675$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
19676  if ${BASH} -e -c 'true'; then
19677    BASH_ARGS="$BASH_ARGS -e"
19678    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19679$as_echo "yes" >&6; }
19680  else
19681    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19682$as_echo "no" >&6; }
19683  fi
19684
19685
19686
19687
19688# Check if pkg-config is available.
19689
19690
19691if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
19692	if test -n "$ac_tool_prefix"; then
19693  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
19694set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
19695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19696$as_echo_n "checking for $ac_word... " >&6; }
19697if ${ac_cv_path_PKG_CONFIG+:} false; then :
19698  $as_echo_n "(cached) " >&6
19699else
19700  case $PKG_CONFIG in
19701  [\\/]* | ?:[\\/]*)
19702  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
19703  ;;
19704  *)
19705  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19706for as_dir in $PATH
19707do
19708  IFS=$as_save_IFS
19709  test -z "$as_dir" && as_dir=.
19710    for ac_exec_ext in '' $ac_executable_extensions; do
19711  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19712    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19713    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19714    break 2
19715  fi
19716done
19717  done
19718IFS=$as_save_IFS
19719
19720  ;;
19721esac
19722fi
19723PKG_CONFIG=$ac_cv_path_PKG_CONFIG
19724if test -n "$PKG_CONFIG"; then
19725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
19726$as_echo "$PKG_CONFIG" >&6; }
19727else
19728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19729$as_echo "no" >&6; }
19730fi
19731
19732
19733fi
19734if test -z "$ac_cv_path_PKG_CONFIG"; then
19735  ac_pt_PKG_CONFIG=$PKG_CONFIG
19736  # Extract the first word of "pkg-config", so it can be a program name with args.
19737set dummy pkg-config; ac_word=$2
19738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19739$as_echo_n "checking for $ac_word... " >&6; }
19740if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
19741  $as_echo_n "(cached) " >&6
19742else
19743  case $ac_pt_PKG_CONFIG in
19744  [\\/]* | ?:[\\/]*)
19745  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
19746  ;;
19747  *)
19748  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19749for as_dir in $PATH
19750do
19751  IFS=$as_save_IFS
19752  test -z "$as_dir" && as_dir=.
19753    for ac_exec_ext in '' $ac_executable_extensions; do
19754  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19755    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19756    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19757    break 2
19758  fi
19759done
19760  done
19761IFS=$as_save_IFS
19762
19763  ;;
19764esac
19765fi
19766ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
19767if test -n "$ac_pt_PKG_CONFIG"; then
19768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
19769$as_echo "$ac_pt_PKG_CONFIG" >&6; }
19770else
19771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19772$as_echo "no" >&6; }
19773fi
19774
19775  if test "x$ac_pt_PKG_CONFIG" = x; then
19776    PKG_CONFIG=""
19777  else
19778    case $cross_compiling:$ac_tool_warned in
19779yes:)
19780{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19781$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19782ac_tool_warned=yes ;;
19783esac
19784    PKG_CONFIG=$ac_pt_PKG_CONFIG
19785  fi
19786else
19787  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
19788fi
19789
19790fi
19791if test -n "$PKG_CONFIG"; then
19792	_pkg_min_version=0.9.0
19793	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
19794$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
19795	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
19796		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19797$as_echo "yes" >&6; }
19798	else
19799		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19800$as_echo "no" >&6; }
19801		PKG_CONFIG=""
19802	fi
19803
19804fi
19805
19806# After basic tools have been setup, we can check build os specific details.
19807
19808  ###############################################################################
19809
19810  # Note that this is the build platform OS version!
19811
19812  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
19813  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
19814  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
19815  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
19816
19817
19818
19819
19820
19821# Setup builddeps, for automatic downloading of tools we need.
19822# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
19823# boot-jdk setup, but we need to have basic tools setup first.
19824
19825
19826# Check whether --with-builddeps-conf was given.
19827if test "${with_builddeps_conf+set}" = set; then :
19828  withval=$with_builddeps_conf;
19829fi
19830
19831
19832
19833# Check whether --with-builddeps-server was given.
19834if test "${with_builddeps_server+set}" = set; then :
19835  withval=$with_builddeps_server;
19836fi
19837
19838
19839
19840# Check whether --with-builddeps-dir was given.
19841if test "${with_builddeps_dir+set}" = set; then :
19842  withval=$with_builddeps_dir;
19843else
19844  with_builddeps_dir=/localhome/builddeps
19845fi
19846
19847
19848
19849# Check whether --with-builddeps-group was given.
19850if test "${with_builddeps_group+set}" = set; then :
19851  withval=$with_builddeps_group;
19852fi
19853
19854
19855
19856
19857  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
19858    if test "x$with_builddeps_conf" != x; then
19859      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
19860$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
19861      builddepsfile=$with_builddeps_conf
19862      if test -s $builddepsfile; then
19863        . $builddepsfile
19864        { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
19865$as_echo "loaded!" >&6; }
19866      else
19867        as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
19868      fi
19869    else
19870      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
19871$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
19872      builddepsfile=`mktemp`
19873      touch $builddepsfile
19874      # Put all found confs into a single file.
19875      find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
19876      # Source the file to acquire the variables
19877      if test -s $builddepsfile; then
19878        . $builddepsfile
19879        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
19880$as_echo "found at least one!" >&6; }
19881      else
19882        as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
19883      fi
19884    fi
19885    # Create build and target names that use _ instead of "-" and ".".
19886    # This is necessary to use them in variable names.
19887    build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19888    target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19889    # Extract rewrite information for build and target
19890    eval rewritten_build=\${REWRITE_${build_var}}
19891    if test "x$rewritten_build" = x; then
19892      rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
19893      echo Build stays the same $rewritten_build
19894    else
19895      echo Rewriting build for builddeps into $rewritten_build
19896    fi
19897    eval rewritten_target=\${REWRITE_${target_var}}
19898    if test "x$rewritten_target" = x; then
19899      rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
19900      echo Target stays the same $rewritten_target
19901    else
19902      echo Rewriting target for builddeps into $rewritten_target
19903    fi
19904    rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
19905    rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
19906  fi
19907  for ac_prog in 7z unzip
19908do
19909  # Extract the first word of "$ac_prog", so it can be a program name with args.
19910set dummy $ac_prog; ac_word=$2
19911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19912$as_echo_n "checking for $ac_word... " >&6; }
19913if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
19914  $as_echo_n "(cached) " >&6
19915else
19916  if test -n "$BDEPS_UNZIP"; then
19917  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
19918else
19919as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19920for as_dir in $PATH
19921do
19922  IFS=$as_save_IFS
19923  test -z "$as_dir" && as_dir=.
19924    for ac_exec_ext in '' $ac_executable_extensions; do
19925  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19926    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
19927    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19928    break 2
19929  fi
19930done
19931  done
19932IFS=$as_save_IFS
19933
19934fi
19935fi
19936BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
19937if test -n "$BDEPS_UNZIP"; then
19938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
19939$as_echo "$BDEPS_UNZIP" >&6; }
19940else
19941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19942$as_echo "no" >&6; }
19943fi
19944
19945
19946  test -n "$BDEPS_UNZIP" && break
19947done
19948
19949  if test "x$BDEPS_UNZIP" = x7z; then
19950    BDEPS_UNZIP="7z x"
19951  fi
19952
19953  for ac_prog in wget lftp ftp
19954do
19955  # Extract the first word of "$ac_prog", so it can be a program name with args.
19956set dummy $ac_prog; ac_word=$2
19957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19958$as_echo_n "checking for $ac_word... " >&6; }
19959if ${ac_cv_prog_BDEPS_FTP+:} false; then :
19960  $as_echo_n "(cached) " >&6
19961else
19962  if test -n "$BDEPS_FTP"; then
19963  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
19964else
19965as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19966for as_dir in $PATH
19967do
19968  IFS=$as_save_IFS
19969  test -z "$as_dir" && as_dir=.
19970    for ac_exec_ext in '' $ac_executable_extensions; do
19971  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19972    ac_cv_prog_BDEPS_FTP="$ac_prog"
19973    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19974    break 2
19975  fi
19976done
19977  done
19978IFS=$as_save_IFS
19979
19980fi
19981fi
19982BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
19983if test -n "$BDEPS_FTP"; then
19984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
19985$as_echo "$BDEPS_FTP" >&6; }
19986else
19987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19988$as_echo "no" >&6; }
19989fi
19990
19991
19992  test -n "$BDEPS_FTP" && break
19993done
19994
19995
19996
19997###############################################################################
19998#
19999# Determine OpenJDK variants, options and version numbers.
20000#
20001###############################################################################
20002
20003# We need build & target for this.
20004
20005
20006  ###############################################################################
20007  #
20008  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
20009  # We always build headless support.
20010  #
20011  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
20012$as_echo_n "checking headful support... " >&6; }
20013  # Check whether --enable-headful was given.
20014if test "${enable_headful+set}" = set; then :
20015  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
20016else
20017  SUPPORT_HEADFUL=yes
20018fi
20019
20020
20021  SUPPORT_HEADLESS=yes
20022  BUILD_HEADLESS="BUILD_HEADLESS:=true"
20023
20024  if test "x$SUPPORT_HEADFUL" = xyes; then
20025    # We are building both headful and headless.
20026    headful_msg="include support for both headful and headless"
20027  fi
20028
20029  if test "x$SUPPORT_HEADFUL" = xno; then
20030    # Thus we are building headless only.
20031    BUILD_HEADLESS="BUILD_HEADLESS:=true"
20032    headful_msg="headless only"
20033  fi
20034
20035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
20036$as_echo "$headful_msg" >&6; }
20037
20038
20039
20040
20041
20042  # Control wether Hotspot runs Queens test after build.
20043  # Check whether --enable-hotspot-test-in-build was given.
20044if test "${enable_hotspot_test_in_build+set}" = set; then :
20045  enableval=$enable_hotspot_test_in_build;
20046else
20047  enable_hotspot_test_in_build=no
20048fi
20049
20050  if test "x$enable_hotspot_test_in_build" = "xyes"; then
20051    TEST_IN_BUILD=true
20052  else
20053    TEST_IN_BUILD=false
20054  fi
20055
20056
20057  ###############################################################################
20058  #
20059  # Choose cacerts source file
20060  #
20061
20062# Check whether --with-cacerts-file was given.
20063if test "${with_cacerts_file+set}" = set; then :
20064  withval=$with_cacerts_file;
20065fi
20066
20067  if test "x$with_cacerts_file" != x; then
20068    CACERTS_FILE=$with_cacerts_file
20069  fi
20070
20071
20072  ###############################################################################
20073  #
20074  # Enable or disable unlimited crypto
20075  #
20076  # Check whether --enable-unlimited-crypto was given.
20077if test "${enable_unlimited_crypto+set}" = set; then :
20078  enableval=$enable_unlimited_crypto;
20079else
20080  enable_unlimited_crypto=no
20081fi
20082
20083  if test "x$enable_unlimited_crypto" = "xyes"; then
20084    UNLIMITED_CRYPTO=true
20085  else
20086    UNLIMITED_CRYPTO=false
20087  fi
20088
20089
20090  ###############################################################################
20091  #
20092  # Enable or disable the elliptic curve crypto implementation
20093  #
20094
20095
20096  ###############################################################################
20097  #
20098  # Compress jars
20099  #
20100  COMPRESS_JARS=false
20101
20102
20103
20104
20105  # Source the version numbers
20106  . $AUTOCONF_DIR/version-numbers
20107
20108  # Get the settings from parameters
20109
20110# Check whether --with-milestone was given.
20111if test "${with_milestone+set}" = set; then :
20112  withval=$with_milestone;
20113fi
20114
20115  if test "x$with_milestone" = xyes; then
20116    as_fn_error $? "Milestone must have a value" "$LINENO" 5
20117  elif test "x$with_milestone" != x; then
20118    MILESTONE="$with_milestone"
20119  fi
20120  if test "x$MILESTONE" = x; then
20121    MILESTONE=internal
20122  fi
20123
20124
20125# Check whether --with-update-version was given.
20126if test "${with_update_version+set}" = set; then :
20127  withval=$with_update_version;
20128fi
20129
20130  if test "x$with_update_version" = xyes; then
20131    as_fn_error $? "Update version must have a value" "$LINENO" 5
20132  elif test "x$with_update_version" != x; then
20133    JDK_UPDATE_VERSION="$with_update_version"
20134    # On macosx 10.7, it's not possible to set --with-update-version=0X due
20135    # to a bug in expr (which reduces it to just X). To work around this, we
20136    # always add a 0 to one digit update versions.
20137    if test "${#JDK_UPDATE_VERSION}" = "1"; then
20138      JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
20139    fi
20140  fi
20141
20142
20143# Check whether --with-user-release-suffix was given.
20144if test "${with_user_release_suffix+set}" = set; then :
20145  withval=$with_user_release_suffix;
20146fi
20147
20148  if test "x$with_user_release_suffix" = xyes; then
20149    as_fn_error $? "Release suffix must have a value" "$LINENO" 5
20150  elif test "x$with_user_release_suffix" != x; then
20151    USER_RELEASE_SUFFIX="$with_user_release_suffix"
20152  fi
20153
20154
20155# Check whether --with-build-number was given.
20156if test "${with_build_number+set}" = set; then :
20157  withval=$with_build_number;
20158fi
20159
20160  if test "x$with_build_number" = xyes; then
20161    as_fn_error $? "Build number must have a value" "$LINENO" 5
20162  elif test "x$with_build_number" != x; then
20163    JDK_BUILD_NUMBER="$with_build_number"
20164  fi
20165  # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
20166  if test "x$JDK_BUILD_NUMBER" = x; then
20167    JDK_BUILD_NUMBER=b00
20168    if test "x$USER_RELEASE_SUFFIX" = x; then
20169      BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
20170      # Avoid [:alnum:] since it depends on the locale.
20171      CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
20172      USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20173    fi
20174  fi
20175
20176  # Now set the JDK version, milestone, build number etc.
20177
20178
20179
20180
20181
20182
20183
20184
20185
20186
20187
20188
20189
20190
20191
20192
20193# Check whether --with-copyright-year was given.
20194if test "${with_copyright_year+set}" = set; then :
20195  withval=$with_copyright_year;
20196fi
20197
20198  if test "x$with_copyright_year" = xyes; then
20199    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
20200  elif test "x$with_copyright_year" != x; then
20201    COPYRIGHT_YEAR="$with_copyright_year"
20202  else
20203    COPYRIGHT_YEAR=`date +'%Y'`
20204  fi
20205
20206
20207  if test "x$JDK_UPDATE_VERSION" != x; then
20208    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
20209  else
20210    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
20211  fi
20212
20213
20214  COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
20215
20216
20217
20218###############################################################################
20219#
20220# Setup BootJDK, used to bootstrap the build.
20221#
20222###############################################################################
20223
20224
20225  BOOT_JDK_FOUND=no
20226
20227# Check whether --with-boot-jdk was given.
20228if test "${with_boot_jdk+set}" = set; then :
20229  withval=$with_boot_jdk;
20230fi
20231
20232
20233  # We look for the Boot JDK through various means, going from more certain to
20234  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
20235  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
20236  # must check if this is indeed valid; otherwise we'll continue looking.
20237
20238  # Test: Is bootjdk explicitely set by command line arguments?
20239
20240  if test "x$BOOT_JDK_FOUND" = xno; then
20241    # Now execute the test
20242
20243  if test "x$with_boot_jdk" != x; then
20244    BOOT_JDK=$with_boot_jdk
20245    BOOT_JDK_FOUND=maybe
20246    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
20247$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
20248  fi
20249
20250
20251    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20252    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20253      # Do we have a bin/java?
20254      if test ! -x "$BOOT_JDK/bin/java"; then
20255        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20256$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20257        BOOT_JDK_FOUND=no
20258      else
20259        # Do we have a bin/javac?
20260        if test ! -x "$BOOT_JDK/bin/javac"; then
20261          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20262$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20263          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20264$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20265          BOOT_JDK_FOUND=no
20266        else
20267          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20268          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20269
20270          # Extra M4 quote needed to protect [] in grep expression.
20271          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20272          if test "x$FOUND_CORRECT_VERSION" = x; then
20273            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20274$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20275            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20276$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20277            BOOT_JDK_FOUND=no
20278          else
20279            # We're done! :-)
20280            BOOT_JDK_FOUND=yes
20281
20282  # Only process if variable expands to non-empty
20283
20284  if test "x$BOOT_JDK" != x; then
20285    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20286
20287  # Input might be given as Windows format, start by converting to
20288  # unix format.
20289  path="$BOOT_JDK"
20290  new_path=`$CYGPATH -u "$path"`
20291
20292  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20293  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20294  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20295  # "foo.exe" is OK but "foo" is an error.
20296  #
20297  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20298  # It is also a way to make sure we got the proper file name for the real test later on.
20299  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20300  if test "x$test_shortpath" = x; then
20301    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20302$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20303    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20304  fi
20305
20306  # Call helper function which possibly converts this using DOS-style short mode.
20307  # If so, the updated path is stored in $new_path.
20308
20309  input_path="$new_path"
20310  # Check if we need to convert this using DOS-style short mode. If the path
20311  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20312  # take no chances and rewrite it.
20313  # Note: m4 eats our [], so we need to use [ and ] instead.
20314  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20315  if test "x$has_forbidden_chars" != x; then
20316    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20317    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20318    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20319    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20320      # Going to short mode and back again did indeed matter. Since short mode is
20321      # case insensitive, let's make it lowercase to improve readability.
20322      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20323      # Now convert it back to Unix-style (cygpath)
20324      input_path=`$CYGPATH -u "$shortmode_path"`
20325      new_path="$input_path"
20326    fi
20327  fi
20328
20329  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20330  if test "x$test_cygdrive_prefix" = x; then
20331    # As a simple fix, exclude /usr/bin since it's not a real path.
20332    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20333      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20334      # a path prefixed by /cygdrive for fixpath to work.
20335      new_path="$CYGWIN_ROOT_PATH$input_path"
20336    fi
20337  fi
20338
20339
20340  if test "x$path" != "x$new_path"; then
20341    BOOT_JDK="$new_path"
20342    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20343$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20344  fi
20345
20346    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20347
20348  path="$BOOT_JDK"
20349  has_colon=`$ECHO $path | $GREP ^.:`
20350  new_path="$path"
20351  if test "x$has_colon" = x; then
20352    # Not in mixed or Windows style, start by that.
20353    new_path=`cmd //c echo $path`
20354  fi
20355
20356
20357  input_path="$new_path"
20358  # Check if we need to convert this using DOS-style short mode. If the path
20359  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20360  # take no chances and rewrite it.
20361  # Note: m4 eats our [], so we need to use [ and ] instead.
20362  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20363  if test "x$has_forbidden_chars" != x; then
20364    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20365    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20366  fi
20367
20368
20369  windows_path="$new_path"
20370  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20371    unix_path=`$CYGPATH -u "$windows_path"`
20372    new_path="$unix_path"
20373  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20374    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20375    new_path="$unix_path"
20376  fi
20377
20378  if test "x$path" != "x$new_path"; then
20379    BOOT_JDK="$new_path"
20380    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20381$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20382  fi
20383
20384  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20385  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20386
20387    else
20388      # We're on a unix platform. Hooray! :)
20389      path="$BOOT_JDK"
20390      has_space=`$ECHO "$path" | $GREP " "`
20391      if test "x$has_space" != x; then
20392        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20393$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20394        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20395      fi
20396
20397      # Use eval to expand a potential ~
20398      eval path="$path"
20399      if test ! -f "$path" && test ! -d "$path"; then
20400        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20401      fi
20402
20403      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20404    fi
20405  fi
20406
20407            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20408$as_echo_n "checking for Boot JDK... " >&6; }
20409            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20410$as_echo "$BOOT_JDK" >&6; }
20411            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20412$as_echo_n "checking Boot JDK version... " >&6; }
20413            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20414            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20415$as_echo "$BOOT_JDK_VERSION" >&6; }
20416          fi # end check jdk version
20417        fi # end check javac
20418      fi # end check java
20419    fi # end check boot jdk found
20420  fi
20421
20422  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
20423    # Having specified an argument which is incorrect will produce an instant failure;
20424    # we should not go on looking
20425    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
20426  fi
20427
20428  # Test: Is bootjdk available from builddeps?
20429
20430  if test "x$BOOT_JDK_FOUND" = xno; then
20431    # Now execute the test
20432
20433
20434
20435  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
20436    # Source the builddeps file again, to make sure it uses the latest variables!
20437    . $builddepsfile
20438    # Look for a target and build machine specific resource!
20439    eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
20440    if test "x$resource" = x; then
20441      # Ok, lets instead look for a target specific resource
20442      eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
20443    fi
20444    if test "x$resource" = x; then
20445      # Ok, lets instead look for a build specific resource
20446      eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
20447    fi
20448    if test "x$resource" = x; then
20449      # Ok, lets instead look for a generic resource
20450      # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
20451      resource=${builddep_bootjdk}
20452    fi
20453    if test "x$resource" != x; then
20454      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
20455$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
20456      # If the resource in the builddeps.conf file is an existing directory,
20457      # for example /java/linux/cups
20458      if test -d ${resource}; then
20459        depdir=${resource}
20460      else
20461
20462  # bootjdk is for example mymodule
20463  # $resource is for example libs/general/libmymod_1_2_3.zip
20464  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
20465  # $with_builddeps_dir is for example /localhome/builddeps
20466  # depdir is the name of the variable into which we store the depdir, eg MYMOD
20467  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
20468  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
20469  filename=`basename $resource`
20470  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
20471  filebase=${filename%%.*}
20472  extension=${filename#*.}
20473  installdir=$with_builddeps_dir/$filebase
20474  if test ! -f $installdir/$filename.unpacked; then
20475    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
20476$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
20477    if test ! -d $installdir; then
20478      mkdir -p $installdir
20479    fi
20480    if test ! -d $installdir; then
20481      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
20482    fi
20483    tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
20484    touch $tmpfile
20485    if test ! -f $tmpfile; then
20486      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
20487    fi
20488
20489  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
20490  # $tmpfile is the local file name for the downloaded file.
20491  VALID_TOOL=no
20492  if test "x$BDEPS_FTP" = xwget; then
20493    VALID_TOOL=yes
20494    wget -O $tmpfile $with_builddeps_server/$resource
20495  fi
20496  if test "x$BDEPS_FTP" = xlftp; then
20497    VALID_TOOL=yes
20498    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
20499  fi
20500  if test "x$BDEPS_FTP" = xftp; then
20501    VALID_TOOL=yes
20502    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
20503    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
20504    FTPUSERPWD=${FTPSERVER%%@*}
20505    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
20506      FTPUSER=${userpwd%%:*}
20507      FTPPWD=${userpwd#*@}
20508      FTPSERVER=${FTPSERVER#*@}
20509    else
20510      FTPUSER=ftp
20511      FTPPWD=ftp
20512    fi
20513    # the "pass" command does not work on some
20514    # ftp clients (read ftp.exe) but if it works,
20515    # passive mode is better!
20516    ( \
20517        echo "user $FTPUSER $FTPPWD"        ; \
20518        echo "pass"                         ; \
20519        echo "bin"                          ; \
20520        echo "get $FTPPATH $tmpfile"              ; \
20521    ) | ftp -in $FTPSERVER
20522  fi
20523  if test "x$VALID_TOOL" != xyes; then
20524    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
20525  fi
20526
20527    mv $tmpfile $installdir/$filename
20528    if test ! -s $installdir/$filename; then
20529      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
20530    fi
20531    case "$extension" in
20532      zip)  echo "Unzipping $installdir/$filename..."
20533        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
20534        ;;
20535      tar.gz) echo "Untaring $installdir/$filename..."
20536        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20537        ;;
20538      tgz) echo "Untaring $installdir/$filename..."
20539        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20540        ;;
20541      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
20542        ;;
20543    esac
20544  fi
20545  if test -f $installdir/$filename.unpacked; then
20546    depdir=$installdir
20547  fi
20548
20549      fi
20550      # Source the builddeps file again, because in the previous command, the depdir
20551      # was updated to point at the current build dependency install directory.
20552      . $builddepsfile
20553      # Now extract variables from the builddeps.conf files.
20554      theroot=${builddep_bootjdk_ROOT}
20555      thecflags=${builddep_bootjdk_CFLAGS}
20556      thelibs=${builddep_bootjdk_LIBS}
20557      if test "x$depdir" = x; then
20558        as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
20559      fi
20560      BOOT_JDK=$depdir
20561      if test "x$theroot" != x; then
20562        BOOT_JDK="$theroot"
20563      fi
20564      if test "x$thecflags" != x; then
20565        BOOT_JDK_CFLAGS="$thecflags"
20566      fi
20567      if test "x$thelibs" != x; then
20568        BOOT_JDK_LIBS="$thelibs"
20569      fi
20570      BOOT_JDK_FOUND=maybe
20571      else BOOT_JDK_FOUND=no
20572
20573    fi
20574    else BOOT_JDK_FOUND=no
20575
20576  fi
20577
20578
20579
20580    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20581    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20582      # Do we have a bin/java?
20583      if test ! -x "$BOOT_JDK/bin/java"; then
20584        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20585$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20586        BOOT_JDK_FOUND=no
20587      else
20588        # Do we have a bin/javac?
20589        if test ! -x "$BOOT_JDK/bin/javac"; then
20590          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20591$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20592          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20593$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20594          BOOT_JDK_FOUND=no
20595        else
20596          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20597          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20598
20599          # Extra M4 quote needed to protect [] in grep expression.
20600          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20601          if test "x$FOUND_CORRECT_VERSION" = x; then
20602            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20603$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20604            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20605$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20606            BOOT_JDK_FOUND=no
20607          else
20608            # We're done! :-)
20609            BOOT_JDK_FOUND=yes
20610
20611  # Only process if variable expands to non-empty
20612
20613  if test "x$BOOT_JDK" != x; then
20614    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20615
20616  # Input might be given as Windows format, start by converting to
20617  # unix format.
20618  path="$BOOT_JDK"
20619  new_path=`$CYGPATH -u "$path"`
20620
20621  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20622  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20623  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20624  # "foo.exe" is OK but "foo" is an error.
20625  #
20626  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20627  # It is also a way to make sure we got the proper file name for the real test later on.
20628  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20629  if test "x$test_shortpath" = x; then
20630    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20631$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20632    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20633  fi
20634
20635  # Call helper function which possibly converts this using DOS-style short mode.
20636  # If so, the updated path is stored in $new_path.
20637
20638  input_path="$new_path"
20639  # Check if we need to convert this using DOS-style short mode. If the path
20640  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20641  # take no chances and rewrite it.
20642  # Note: m4 eats our [], so we need to use [ and ] instead.
20643  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20644  if test "x$has_forbidden_chars" != x; then
20645    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20646    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20647    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20648    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20649      # Going to short mode and back again did indeed matter. Since short mode is
20650      # case insensitive, let's make it lowercase to improve readability.
20651      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20652      # Now convert it back to Unix-style (cygpath)
20653      input_path=`$CYGPATH -u "$shortmode_path"`
20654      new_path="$input_path"
20655    fi
20656  fi
20657
20658  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20659  if test "x$test_cygdrive_prefix" = x; then
20660    # As a simple fix, exclude /usr/bin since it's not a real path.
20661    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20662      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20663      # a path prefixed by /cygdrive for fixpath to work.
20664      new_path="$CYGWIN_ROOT_PATH$input_path"
20665    fi
20666  fi
20667
20668
20669  if test "x$path" != "x$new_path"; then
20670    BOOT_JDK="$new_path"
20671    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20672$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20673  fi
20674
20675    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20676
20677  path="$BOOT_JDK"
20678  has_colon=`$ECHO $path | $GREP ^.:`
20679  new_path="$path"
20680  if test "x$has_colon" = x; then
20681    # Not in mixed or Windows style, start by that.
20682    new_path=`cmd //c echo $path`
20683  fi
20684
20685
20686  input_path="$new_path"
20687  # Check if we need to convert this using DOS-style short mode. If the path
20688  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20689  # take no chances and rewrite it.
20690  # Note: m4 eats our [], so we need to use [ and ] instead.
20691  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20692  if test "x$has_forbidden_chars" != x; then
20693    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20694    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20695  fi
20696
20697
20698  windows_path="$new_path"
20699  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20700    unix_path=`$CYGPATH -u "$windows_path"`
20701    new_path="$unix_path"
20702  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20703    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20704    new_path="$unix_path"
20705  fi
20706
20707  if test "x$path" != "x$new_path"; then
20708    BOOT_JDK="$new_path"
20709    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20710$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20711  fi
20712
20713  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20714  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20715
20716    else
20717      # We're on a unix platform. Hooray! :)
20718      path="$BOOT_JDK"
20719      has_space=`$ECHO "$path" | $GREP " "`
20720      if test "x$has_space" != x; then
20721        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20722$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20723        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20724      fi
20725
20726      # Use eval to expand a potential ~
20727      eval path="$path"
20728      if test ! -f "$path" && test ! -d "$path"; then
20729        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20730      fi
20731
20732      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20733    fi
20734  fi
20735
20736            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20737$as_echo_n "checking for Boot JDK... " >&6; }
20738            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20739$as_echo "$BOOT_JDK" >&6; }
20740            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20741$as_echo_n "checking Boot JDK version... " >&6; }
20742            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20743            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20744$as_echo "$BOOT_JDK_VERSION" >&6; }
20745          fi # end check jdk version
20746        fi # end check javac
20747      fi # end check java
20748    fi # end check boot jdk found
20749  fi
20750
20751
20752  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
20753
20754  if test "x$BOOT_JDK_FOUND" = xno; then
20755    # Now execute the test
20756
20757  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
20758    # First check at user selected default
20759
20760  if test "x$BOOT_JDK_FOUND" = xno; then
20761    # Now execute the test
20762
20763  if test -x /usr/libexec/java_home; then
20764    BOOT_JDK=`/usr/libexec/java_home `
20765    BOOT_JDK_FOUND=maybe
20766    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
20767$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
20768  fi
20769
20770
20771    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20772    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20773      # Do we have a bin/java?
20774      if test ! -x "$BOOT_JDK/bin/java"; then
20775        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20776$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20777        BOOT_JDK_FOUND=no
20778      else
20779        # Do we have a bin/javac?
20780        if test ! -x "$BOOT_JDK/bin/javac"; then
20781          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20782$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20783          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20784$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20785          BOOT_JDK_FOUND=no
20786        else
20787          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20788          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20789
20790          # Extra M4 quote needed to protect [] in grep expression.
20791          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20792          if test "x$FOUND_CORRECT_VERSION" = x; then
20793            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20794$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20795            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20796$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20797            BOOT_JDK_FOUND=no
20798          else
20799            # We're done! :-)
20800            BOOT_JDK_FOUND=yes
20801
20802  # Only process if variable expands to non-empty
20803
20804  if test "x$BOOT_JDK" != x; then
20805    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20806
20807  # Input might be given as Windows format, start by converting to
20808  # unix format.
20809  path="$BOOT_JDK"
20810  new_path=`$CYGPATH -u "$path"`
20811
20812  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20813  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20814  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20815  # "foo.exe" is OK but "foo" is an error.
20816  #
20817  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20818  # It is also a way to make sure we got the proper file name for the real test later on.
20819  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20820  if test "x$test_shortpath" = x; then
20821    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20822$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20823    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20824  fi
20825
20826  # Call helper function which possibly converts this using DOS-style short mode.
20827  # If so, the updated path is stored in $new_path.
20828
20829  input_path="$new_path"
20830  # Check if we need to convert this using DOS-style short mode. If the path
20831  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20832  # take no chances and rewrite it.
20833  # Note: m4 eats our [], so we need to use [ and ] instead.
20834  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20835  if test "x$has_forbidden_chars" != x; then
20836    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20837    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20838    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20839    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20840      # Going to short mode and back again did indeed matter. Since short mode is
20841      # case insensitive, let's make it lowercase to improve readability.
20842      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20843      # Now convert it back to Unix-style (cygpath)
20844      input_path=`$CYGPATH -u "$shortmode_path"`
20845      new_path="$input_path"
20846    fi
20847  fi
20848
20849  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20850  if test "x$test_cygdrive_prefix" = x; then
20851    # As a simple fix, exclude /usr/bin since it's not a real path.
20852    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20853      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20854      # a path prefixed by /cygdrive for fixpath to work.
20855      new_path="$CYGWIN_ROOT_PATH$input_path"
20856    fi
20857  fi
20858
20859
20860  if test "x$path" != "x$new_path"; then
20861    BOOT_JDK="$new_path"
20862    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20863$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20864  fi
20865
20866    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20867
20868  path="$BOOT_JDK"
20869  has_colon=`$ECHO $path | $GREP ^.:`
20870  new_path="$path"
20871  if test "x$has_colon" = x; then
20872    # Not in mixed or Windows style, start by that.
20873    new_path=`cmd //c echo $path`
20874  fi
20875
20876
20877  input_path="$new_path"
20878  # Check if we need to convert this using DOS-style short mode. If the path
20879  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20880  # take no chances and rewrite it.
20881  # Note: m4 eats our [], so we need to use [ and ] instead.
20882  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20883  if test "x$has_forbidden_chars" != x; then
20884    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20885    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20886  fi
20887
20888
20889  windows_path="$new_path"
20890  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20891    unix_path=`$CYGPATH -u "$windows_path"`
20892    new_path="$unix_path"
20893  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20894    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20895    new_path="$unix_path"
20896  fi
20897
20898  if test "x$path" != "x$new_path"; then
20899    BOOT_JDK="$new_path"
20900    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20901$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20902  fi
20903
20904  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20905  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20906
20907    else
20908      # We're on a unix platform. Hooray! :)
20909      path="$BOOT_JDK"
20910      has_space=`$ECHO "$path" | $GREP " "`
20911      if test "x$has_space" != x; then
20912        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20913$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20914        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20915      fi
20916
20917      # Use eval to expand a potential ~
20918      eval path="$path"
20919      if test ! -f "$path" && test ! -d "$path"; then
20920        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20921      fi
20922
20923      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20924    fi
20925  fi
20926
20927            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20928$as_echo_n "checking for Boot JDK... " >&6; }
20929            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20930$as_echo "$BOOT_JDK" >&6; }
20931            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20932$as_echo_n "checking Boot JDK version... " >&6; }
20933            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20934            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20935$as_echo "$BOOT_JDK_VERSION" >&6; }
20936          fi # end check jdk version
20937        fi # end check javac
20938      fi # end check java
20939    fi # end check boot jdk found
20940  fi
20941
20942    # If that did not work out (e.g. too old), try explicit versions instead
20943
20944  if test "x$BOOT_JDK_FOUND" = xno; then
20945    # Now execute the test
20946
20947  if test -x /usr/libexec/java_home; then
20948    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
20949    BOOT_JDK_FOUND=maybe
20950    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
20951$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
20952  fi
20953
20954
20955    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20956    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20957      # Do we have a bin/java?
20958      if test ! -x "$BOOT_JDK/bin/java"; then
20959        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20960$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20961        BOOT_JDK_FOUND=no
20962      else
20963        # Do we have a bin/javac?
20964        if test ! -x "$BOOT_JDK/bin/javac"; then
20965          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20966$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20967          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20968$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20969          BOOT_JDK_FOUND=no
20970        else
20971          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20972          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20973
20974          # Extra M4 quote needed to protect [] in grep expression.
20975          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20976          if test "x$FOUND_CORRECT_VERSION" = x; then
20977            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20978$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20979            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20980$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20981            BOOT_JDK_FOUND=no
20982          else
20983            # We're done! :-)
20984            BOOT_JDK_FOUND=yes
20985
20986  # Only process if variable expands to non-empty
20987
20988  if test "x$BOOT_JDK" != x; then
20989    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20990
20991  # Input might be given as Windows format, start by converting to
20992  # unix format.
20993  path="$BOOT_JDK"
20994  new_path=`$CYGPATH -u "$path"`
20995
20996  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20997  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20998  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20999  # "foo.exe" is OK but "foo" is an error.
21000  #
21001  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21002  # It is also a way to make sure we got the proper file name for the real test later on.
21003  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21004  if test "x$test_shortpath" = x; then
21005    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21006$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21007    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21008  fi
21009
21010  # Call helper function which possibly converts this using DOS-style short mode.
21011  # If so, the updated path is stored in $new_path.
21012
21013  input_path="$new_path"
21014  # Check if we need to convert this using DOS-style short mode. If the path
21015  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21016  # take no chances and rewrite it.
21017  # Note: m4 eats our [], so we need to use [ and ] instead.
21018  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21019  if test "x$has_forbidden_chars" != x; then
21020    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21021    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21022    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21023    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21024      # Going to short mode and back again did indeed matter. Since short mode is
21025      # case insensitive, let's make it lowercase to improve readability.
21026      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21027      # Now convert it back to Unix-style (cygpath)
21028      input_path=`$CYGPATH -u "$shortmode_path"`
21029      new_path="$input_path"
21030    fi
21031  fi
21032
21033  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21034  if test "x$test_cygdrive_prefix" = x; then
21035    # As a simple fix, exclude /usr/bin since it's not a real path.
21036    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21037      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21038      # a path prefixed by /cygdrive for fixpath to work.
21039      new_path="$CYGWIN_ROOT_PATH$input_path"
21040    fi
21041  fi
21042
21043
21044  if test "x$path" != "x$new_path"; then
21045    BOOT_JDK="$new_path"
21046    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21047$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21048  fi
21049
21050    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21051
21052  path="$BOOT_JDK"
21053  has_colon=`$ECHO $path | $GREP ^.:`
21054  new_path="$path"
21055  if test "x$has_colon" = x; then
21056    # Not in mixed or Windows style, start by that.
21057    new_path=`cmd //c echo $path`
21058  fi
21059
21060
21061  input_path="$new_path"
21062  # Check if we need to convert this using DOS-style short mode. If the path
21063  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21064  # take no chances and rewrite it.
21065  # Note: m4 eats our [], so we need to use [ and ] instead.
21066  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21067  if test "x$has_forbidden_chars" != x; then
21068    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21069    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21070  fi
21071
21072
21073  windows_path="$new_path"
21074  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21075    unix_path=`$CYGPATH -u "$windows_path"`
21076    new_path="$unix_path"
21077  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21078    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21079    new_path="$unix_path"
21080  fi
21081
21082  if test "x$path" != "x$new_path"; then
21083    BOOT_JDK="$new_path"
21084    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21085$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21086  fi
21087
21088  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21089  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21090
21091    else
21092      # We're on a unix platform. Hooray! :)
21093      path="$BOOT_JDK"
21094      has_space=`$ECHO "$path" | $GREP " "`
21095      if test "x$has_space" != x; then
21096        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21097$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21098        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21099      fi
21100
21101      # Use eval to expand a potential ~
21102      eval path="$path"
21103      if test ! -f "$path" && test ! -d "$path"; then
21104        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21105      fi
21106
21107      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21108    fi
21109  fi
21110
21111            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21112$as_echo_n "checking for Boot JDK... " >&6; }
21113            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21114$as_echo "$BOOT_JDK" >&6; }
21115            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21116$as_echo_n "checking Boot JDK version... " >&6; }
21117            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21118            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21119$as_echo "$BOOT_JDK_VERSION" >&6; }
21120          fi # end check jdk version
21121        fi # end check javac
21122      fi # end check java
21123    fi # end check boot jdk found
21124  fi
21125
21126
21127  if test "x$BOOT_JDK_FOUND" = xno; then
21128    # Now execute the test
21129
21130  if test -x /usr/libexec/java_home; then
21131    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
21132    BOOT_JDK_FOUND=maybe
21133    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
21134$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
21135  fi
21136
21137
21138    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21139    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21140      # Do we have a bin/java?
21141      if test ! -x "$BOOT_JDK/bin/java"; then
21142        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21143$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21144        BOOT_JDK_FOUND=no
21145      else
21146        # Do we have a bin/javac?
21147        if test ! -x "$BOOT_JDK/bin/javac"; then
21148          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21149$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21150          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21151$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21152          BOOT_JDK_FOUND=no
21153        else
21154          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21155          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21156
21157          # Extra M4 quote needed to protect [] in grep expression.
21158          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21159          if test "x$FOUND_CORRECT_VERSION" = x; then
21160            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21161$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21162            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21163$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21164            BOOT_JDK_FOUND=no
21165          else
21166            # We're done! :-)
21167            BOOT_JDK_FOUND=yes
21168
21169  # Only process if variable expands to non-empty
21170
21171  if test "x$BOOT_JDK" != x; then
21172    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21173
21174  # Input might be given as Windows format, start by converting to
21175  # unix format.
21176  path="$BOOT_JDK"
21177  new_path=`$CYGPATH -u "$path"`
21178
21179  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21180  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21181  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21182  # "foo.exe" is OK but "foo" is an error.
21183  #
21184  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21185  # It is also a way to make sure we got the proper file name for the real test later on.
21186  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21187  if test "x$test_shortpath" = x; then
21188    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21189$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21190    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21191  fi
21192
21193  # Call helper function which possibly converts this using DOS-style short mode.
21194  # If so, the updated path is stored in $new_path.
21195
21196  input_path="$new_path"
21197  # Check if we need to convert this using DOS-style short mode. If the path
21198  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21199  # take no chances and rewrite it.
21200  # Note: m4 eats our [], so we need to use [ and ] instead.
21201  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21202  if test "x$has_forbidden_chars" != x; then
21203    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21204    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21205    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21206    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21207      # Going to short mode and back again did indeed matter. Since short mode is
21208      # case insensitive, let's make it lowercase to improve readability.
21209      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21210      # Now convert it back to Unix-style (cygpath)
21211      input_path=`$CYGPATH -u "$shortmode_path"`
21212      new_path="$input_path"
21213    fi
21214  fi
21215
21216  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21217  if test "x$test_cygdrive_prefix" = x; then
21218    # As a simple fix, exclude /usr/bin since it's not a real path.
21219    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21220      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21221      # a path prefixed by /cygdrive for fixpath to work.
21222      new_path="$CYGWIN_ROOT_PATH$input_path"
21223    fi
21224  fi
21225
21226
21227  if test "x$path" != "x$new_path"; then
21228    BOOT_JDK="$new_path"
21229    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21230$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21231  fi
21232
21233    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21234
21235  path="$BOOT_JDK"
21236  has_colon=`$ECHO $path | $GREP ^.:`
21237  new_path="$path"
21238  if test "x$has_colon" = x; then
21239    # Not in mixed or Windows style, start by that.
21240    new_path=`cmd //c echo $path`
21241  fi
21242
21243
21244  input_path="$new_path"
21245  # Check if we need to convert this using DOS-style short mode. If the path
21246  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21247  # take no chances and rewrite it.
21248  # Note: m4 eats our [], so we need to use [ and ] instead.
21249  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21250  if test "x$has_forbidden_chars" != x; then
21251    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21252    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21253  fi
21254
21255
21256  windows_path="$new_path"
21257  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21258    unix_path=`$CYGPATH -u "$windows_path"`
21259    new_path="$unix_path"
21260  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21261    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21262    new_path="$unix_path"
21263  fi
21264
21265  if test "x$path" != "x$new_path"; then
21266    BOOT_JDK="$new_path"
21267    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21268$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21269  fi
21270
21271  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21272  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21273
21274    else
21275      # We're on a unix platform. Hooray! :)
21276      path="$BOOT_JDK"
21277      has_space=`$ECHO "$path" | $GREP " "`
21278      if test "x$has_space" != x; then
21279        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21280$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21281        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21282      fi
21283
21284      # Use eval to expand a potential ~
21285      eval path="$path"
21286      if test ! -f "$path" && test ! -d "$path"; then
21287        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21288      fi
21289
21290      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21291    fi
21292  fi
21293
21294            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21295$as_echo_n "checking for Boot JDK... " >&6; }
21296            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21297$as_echo "$BOOT_JDK" >&6; }
21298            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21299$as_echo_n "checking Boot JDK version... " >&6; }
21300            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21301            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21302$as_echo "$BOOT_JDK_VERSION" >&6; }
21303          fi # end check jdk version
21304        fi # end check javac
21305      fi # end check java
21306    fi # end check boot jdk found
21307  fi
21308
21309
21310  if test "x$BOOT_JDK_FOUND" = xno; then
21311    # Now execute the test
21312
21313  if test -x /usr/libexec/java_home; then
21314    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
21315    BOOT_JDK_FOUND=maybe
21316    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
21317$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
21318  fi
21319
21320
21321    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21322    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21323      # Do we have a bin/java?
21324      if test ! -x "$BOOT_JDK/bin/java"; then
21325        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21326$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21327        BOOT_JDK_FOUND=no
21328      else
21329        # Do we have a bin/javac?
21330        if test ! -x "$BOOT_JDK/bin/javac"; then
21331          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21332$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21333          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21334$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21335          BOOT_JDK_FOUND=no
21336        else
21337          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21338          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21339
21340          # Extra M4 quote needed to protect [] in grep expression.
21341          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21342          if test "x$FOUND_CORRECT_VERSION" = x; then
21343            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21344$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21345            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21346$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21347            BOOT_JDK_FOUND=no
21348          else
21349            # We're done! :-)
21350            BOOT_JDK_FOUND=yes
21351
21352  # Only process if variable expands to non-empty
21353
21354  if test "x$BOOT_JDK" != x; then
21355    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21356
21357  # Input might be given as Windows format, start by converting to
21358  # unix format.
21359  path="$BOOT_JDK"
21360  new_path=`$CYGPATH -u "$path"`
21361
21362  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21363  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21364  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21365  # "foo.exe" is OK but "foo" is an error.
21366  #
21367  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21368  # It is also a way to make sure we got the proper file name for the real test later on.
21369  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21370  if test "x$test_shortpath" = x; then
21371    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21372$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21373    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21374  fi
21375
21376  # Call helper function which possibly converts this using DOS-style short mode.
21377  # If so, the updated path is stored in $new_path.
21378
21379  input_path="$new_path"
21380  # Check if we need to convert this using DOS-style short mode. If the path
21381  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21382  # take no chances and rewrite it.
21383  # Note: m4 eats our [], so we need to use [ and ] instead.
21384  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21385  if test "x$has_forbidden_chars" != x; then
21386    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21387    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21388    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21389    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21390      # Going to short mode and back again did indeed matter. Since short mode is
21391      # case insensitive, let's make it lowercase to improve readability.
21392      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21393      # Now convert it back to Unix-style (cygpath)
21394      input_path=`$CYGPATH -u "$shortmode_path"`
21395      new_path="$input_path"
21396    fi
21397  fi
21398
21399  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21400  if test "x$test_cygdrive_prefix" = x; then
21401    # As a simple fix, exclude /usr/bin since it's not a real path.
21402    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21403      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21404      # a path prefixed by /cygdrive for fixpath to work.
21405      new_path="$CYGWIN_ROOT_PATH$input_path"
21406    fi
21407  fi
21408
21409
21410  if test "x$path" != "x$new_path"; then
21411    BOOT_JDK="$new_path"
21412    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21413$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21414  fi
21415
21416    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21417
21418  path="$BOOT_JDK"
21419  has_colon=`$ECHO $path | $GREP ^.:`
21420  new_path="$path"
21421  if test "x$has_colon" = x; then
21422    # Not in mixed or Windows style, start by that.
21423    new_path=`cmd //c echo $path`
21424  fi
21425
21426
21427  input_path="$new_path"
21428  # Check if we need to convert this using DOS-style short mode. If the path
21429  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21430  # take no chances and rewrite it.
21431  # Note: m4 eats our [], so we need to use [ and ] instead.
21432  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21433  if test "x$has_forbidden_chars" != x; then
21434    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21435    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21436  fi
21437
21438
21439  windows_path="$new_path"
21440  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21441    unix_path=`$CYGPATH -u "$windows_path"`
21442    new_path="$unix_path"
21443  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21444    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21445    new_path="$unix_path"
21446  fi
21447
21448  if test "x$path" != "x$new_path"; then
21449    BOOT_JDK="$new_path"
21450    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21451$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21452  fi
21453
21454  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21455  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21456
21457    else
21458      # We're on a unix platform. Hooray! :)
21459      path="$BOOT_JDK"
21460      has_space=`$ECHO "$path" | $GREP " "`
21461      if test "x$has_space" != x; then
21462        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21463$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21464        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21465      fi
21466
21467      # Use eval to expand a potential ~
21468      eval path="$path"
21469      if test ! -f "$path" && test ! -d "$path"; then
21470        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21471      fi
21472
21473      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21474    fi
21475  fi
21476
21477            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21478$as_echo_n "checking for Boot JDK... " >&6; }
21479            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21480$as_echo "$BOOT_JDK" >&6; }
21481            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21482$as_echo_n "checking Boot JDK version... " >&6; }
21483            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21484            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21485$as_echo "$BOOT_JDK_VERSION" >&6; }
21486          fi # end check jdk version
21487        fi # end check javac
21488      fi # end check java
21489    fi # end check boot jdk found
21490  fi
21491
21492  fi
21493
21494
21495    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21496    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21497      # Do we have a bin/java?
21498      if test ! -x "$BOOT_JDK/bin/java"; then
21499        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21500$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21501        BOOT_JDK_FOUND=no
21502      else
21503        # Do we have a bin/javac?
21504        if test ! -x "$BOOT_JDK/bin/javac"; then
21505          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21506$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21507          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21508$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21509          BOOT_JDK_FOUND=no
21510        else
21511          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21512          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21513
21514          # Extra M4 quote needed to protect [] in grep expression.
21515          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21516          if test "x$FOUND_CORRECT_VERSION" = x; then
21517            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21518$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21519            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21520$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21521            BOOT_JDK_FOUND=no
21522          else
21523            # We're done! :-)
21524            BOOT_JDK_FOUND=yes
21525
21526  # Only process if variable expands to non-empty
21527
21528  if test "x$BOOT_JDK" != x; then
21529    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21530
21531  # Input might be given as Windows format, start by converting to
21532  # unix format.
21533  path="$BOOT_JDK"
21534  new_path=`$CYGPATH -u "$path"`
21535
21536  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21537  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21538  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21539  # "foo.exe" is OK but "foo" is an error.
21540  #
21541  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21542  # It is also a way to make sure we got the proper file name for the real test later on.
21543  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21544  if test "x$test_shortpath" = x; then
21545    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21546$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21547    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21548  fi
21549
21550  # Call helper function which possibly converts this using DOS-style short mode.
21551  # If so, the updated path is stored in $new_path.
21552
21553  input_path="$new_path"
21554  # Check if we need to convert this using DOS-style short mode. If the path
21555  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21556  # take no chances and rewrite it.
21557  # Note: m4 eats our [], so we need to use [ and ] instead.
21558  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21559  if test "x$has_forbidden_chars" != x; then
21560    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21561    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21562    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21563    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21564      # Going to short mode and back again did indeed matter. Since short mode is
21565      # case insensitive, let's make it lowercase to improve readability.
21566      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21567      # Now convert it back to Unix-style (cygpath)
21568      input_path=`$CYGPATH -u "$shortmode_path"`
21569      new_path="$input_path"
21570    fi
21571  fi
21572
21573  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21574  if test "x$test_cygdrive_prefix" = x; then
21575    # As a simple fix, exclude /usr/bin since it's not a real path.
21576    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21577      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21578      # a path prefixed by /cygdrive for fixpath to work.
21579      new_path="$CYGWIN_ROOT_PATH$input_path"
21580    fi
21581  fi
21582
21583
21584  if test "x$path" != "x$new_path"; then
21585    BOOT_JDK="$new_path"
21586    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21587$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21588  fi
21589
21590    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21591
21592  path="$BOOT_JDK"
21593  has_colon=`$ECHO $path | $GREP ^.:`
21594  new_path="$path"
21595  if test "x$has_colon" = x; then
21596    # Not in mixed or Windows style, start by that.
21597    new_path=`cmd //c echo $path`
21598  fi
21599
21600
21601  input_path="$new_path"
21602  # Check if we need to convert this using DOS-style short mode. If the path
21603  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21604  # take no chances and rewrite it.
21605  # Note: m4 eats our [], so we need to use [ and ] instead.
21606  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21607  if test "x$has_forbidden_chars" != x; then
21608    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21609    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21610  fi
21611
21612
21613  windows_path="$new_path"
21614  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21615    unix_path=`$CYGPATH -u "$windows_path"`
21616    new_path="$unix_path"
21617  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21618    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21619    new_path="$unix_path"
21620  fi
21621
21622  if test "x$path" != "x$new_path"; then
21623    BOOT_JDK="$new_path"
21624    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21625$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21626  fi
21627
21628  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21629  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21630
21631    else
21632      # We're on a unix platform. Hooray! :)
21633      path="$BOOT_JDK"
21634      has_space=`$ECHO "$path" | $GREP " "`
21635      if test "x$has_space" != x; then
21636        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21637$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21638        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21639      fi
21640
21641      # Use eval to expand a potential ~
21642      eval path="$path"
21643      if test ! -f "$path" && test ! -d "$path"; then
21644        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21645      fi
21646
21647      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21648    fi
21649  fi
21650
21651            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21652$as_echo_n "checking for Boot JDK... " >&6; }
21653            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21654$as_echo "$BOOT_JDK" >&6; }
21655            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21656$as_echo_n "checking Boot JDK version... " >&6; }
21657            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21658            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21659$as_echo "$BOOT_JDK_VERSION" >&6; }
21660          fi # end check jdk version
21661        fi # end check javac
21662      fi # end check java
21663    fi # end check boot jdk found
21664  fi
21665
21666
21667  # Test: Is $JAVA_HOME set?
21668
21669  if test "x$BOOT_JDK_FOUND" = xno; then
21670    # Now execute the test
21671
21672  if test "x$JAVA_HOME" != x; then
21673    JAVA_HOME_PROCESSED="$JAVA_HOME"
21674
21675  # Only process if variable expands to non-empty
21676
21677  if test "x$JAVA_HOME_PROCESSED" != x; then
21678    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21679
21680  # Input might be given as Windows format, start by converting to
21681  # unix format.
21682  path="$JAVA_HOME_PROCESSED"
21683  new_path=`$CYGPATH -u "$path"`
21684
21685  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21686  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21687  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21688  # "foo.exe" is OK but "foo" is an error.
21689  #
21690  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21691  # It is also a way to make sure we got the proper file name for the real test later on.
21692  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21693  if test "x$test_shortpath" = x; then
21694    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21695$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21696    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
21697  fi
21698
21699  # Call helper function which possibly converts this using DOS-style short mode.
21700  # If so, the updated path is stored in $new_path.
21701
21702  input_path="$new_path"
21703  # Check if we need to convert this using DOS-style short mode. If the path
21704  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21705  # take no chances and rewrite it.
21706  # Note: m4 eats our [], so we need to use [ and ] instead.
21707  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21708  if test "x$has_forbidden_chars" != x; then
21709    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21710    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21711    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21712    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21713      # Going to short mode and back again did indeed matter. Since short mode is
21714      # case insensitive, let's make it lowercase to improve readability.
21715      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21716      # Now convert it back to Unix-style (cygpath)
21717      input_path=`$CYGPATH -u "$shortmode_path"`
21718      new_path="$input_path"
21719    fi
21720  fi
21721
21722  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21723  if test "x$test_cygdrive_prefix" = x; then
21724    # As a simple fix, exclude /usr/bin since it's not a real path.
21725    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21726      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21727      # a path prefixed by /cygdrive for fixpath to work.
21728      new_path="$CYGWIN_ROOT_PATH$input_path"
21729    fi
21730  fi
21731
21732
21733  if test "x$path" != "x$new_path"; then
21734    JAVA_HOME_PROCESSED="$new_path"
21735    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21736$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21737  fi
21738
21739    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21740
21741  path="$JAVA_HOME_PROCESSED"
21742  has_colon=`$ECHO $path | $GREP ^.:`
21743  new_path="$path"
21744  if test "x$has_colon" = x; then
21745    # Not in mixed or Windows style, start by that.
21746    new_path=`cmd //c echo $path`
21747  fi
21748
21749
21750  input_path="$new_path"
21751  # Check if we need to convert this using DOS-style short mode. If the path
21752  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21753  # take no chances and rewrite it.
21754  # Note: m4 eats our [], so we need to use [ and ] instead.
21755  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21756  if test "x$has_forbidden_chars" != x; then
21757    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21758    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21759  fi
21760
21761
21762  windows_path="$new_path"
21763  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21764    unix_path=`$CYGPATH -u "$windows_path"`
21765    new_path="$unix_path"
21766  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21767    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21768    new_path="$unix_path"
21769  fi
21770
21771  if test "x$path" != "x$new_path"; then
21772    JAVA_HOME_PROCESSED="$new_path"
21773    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21774$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21775  fi
21776
21777  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21778  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21779
21780    else
21781      # We're on a unix platform. Hooray! :)
21782      path="$JAVA_HOME_PROCESSED"
21783      has_space=`$ECHO "$path" | $GREP " "`
21784      if test "x$has_space" != x; then
21785        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21786$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21787        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21788      fi
21789
21790      # Use eval to expand a potential ~
21791      eval path="$path"
21792      if test ! -f "$path" && test ! -d "$path"; then
21793        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
21794      fi
21795
21796      JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
21797    fi
21798  fi
21799
21800    if test ! -d "$JAVA_HOME_PROCESSED"; then
21801      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
21802$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
21803    else
21804      # Aha, the user has set a JAVA_HOME
21805      # let us use that as the Boot JDK.
21806      BOOT_JDK="$JAVA_HOME_PROCESSED"
21807      BOOT_JDK_FOUND=maybe
21808      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
21809$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
21810    fi
21811  fi
21812
21813
21814    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21815    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21816      # Do we have a bin/java?
21817      if test ! -x "$BOOT_JDK/bin/java"; then
21818        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21819$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21820        BOOT_JDK_FOUND=no
21821      else
21822        # Do we have a bin/javac?
21823        if test ! -x "$BOOT_JDK/bin/javac"; then
21824          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21825$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21826          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21827$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21828          BOOT_JDK_FOUND=no
21829        else
21830          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21831          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21832
21833          # Extra M4 quote needed to protect [] in grep expression.
21834          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21835          if test "x$FOUND_CORRECT_VERSION" = x; then
21836            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21837$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21838            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21839$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21840            BOOT_JDK_FOUND=no
21841          else
21842            # We're done! :-)
21843            BOOT_JDK_FOUND=yes
21844
21845  # Only process if variable expands to non-empty
21846
21847  if test "x$BOOT_JDK" != x; then
21848    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21849
21850  # Input might be given as Windows format, start by converting to
21851  # unix format.
21852  path="$BOOT_JDK"
21853  new_path=`$CYGPATH -u "$path"`
21854
21855  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21856  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21857  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21858  # "foo.exe" is OK but "foo" is an error.
21859  #
21860  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21861  # It is also a way to make sure we got the proper file name for the real test later on.
21862  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21863  if test "x$test_shortpath" = x; then
21864    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21865$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21866    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21867  fi
21868
21869  # Call helper function which possibly converts this using DOS-style short mode.
21870  # If so, the updated path is stored in $new_path.
21871
21872  input_path="$new_path"
21873  # Check if we need to convert this using DOS-style short mode. If the path
21874  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21875  # take no chances and rewrite it.
21876  # Note: m4 eats our [], so we need to use [ and ] instead.
21877  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21878  if test "x$has_forbidden_chars" != x; then
21879    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21880    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21881    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21882    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21883      # Going to short mode and back again did indeed matter. Since short mode is
21884      # case insensitive, let's make it lowercase to improve readability.
21885      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21886      # Now convert it back to Unix-style (cygpath)
21887      input_path=`$CYGPATH -u "$shortmode_path"`
21888      new_path="$input_path"
21889    fi
21890  fi
21891
21892  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21893  if test "x$test_cygdrive_prefix" = x; then
21894    # As a simple fix, exclude /usr/bin since it's not a real path.
21895    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21896      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21897      # a path prefixed by /cygdrive for fixpath to work.
21898      new_path="$CYGWIN_ROOT_PATH$input_path"
21899    fi
21900  fi
21901
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    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21910
21911  path="$BOOT_JDK"
21912  has_colon=`$ECHO $path | $GREP ^.:`
21913  new_path="$path"
21914  if test "x$has_colon" = x; then
21915    # Not in mixed or Windows style, start by that.
21916    new_path=`cmd //c echo $path`
21917  fi
21918
21919
21920  input_path="$new_path"
21921  # Check if we need to convert this using DOS-style short mode. If the path
21922  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21923  # take no chances and rewrite it.
21924  # Note: m4 eats our [], so we need to use [ and ] instead.
21925  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21926  if test "x$has_forbidden_chars" != x; then
21927    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21928    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21929  fi
21930
21931
21932  windows_path="$new_path"
21933  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21934    unix_path=`$CYGPATH -u "$windows_path"`
21935    new_path="$unix_path"
21936  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21937    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21938    new_path="$unix_path"
21939  fi
21940
21941  if test "x$path" != "x$new_path"; then
21942    BOOT_JDK="$new_path"
21943    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21944$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21945  fi
21946
21947  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21948  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21949
21950    else
21951      # We're on a unix platform. Hooray! :)
21952      path="$BOOT_JDK"
21953      has_space=`$ECHO "$path" | $GREP " "`
21954      if test "x$has_space" != x; then
21955        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21956$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21957        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21958      fi
21959
21960      # Use eval to expand a potential ~
21961      eval path="$path"
21962      if test ! -f "$path" && test ! -d "$path"; then
21963        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21964      fi
21965
21966      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21967    fi
21968  fi
21969
21970            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21971$as_echo_n "checking for Boot JDK... " >&6; }
21972            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21973$as_echo "$BOOT_JDK" >&6; }
21974            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21975$as_echo_n "checking Boot JDK version... " >&6; }
21976            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21977            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21978$as_echo "$BOOT_JDK_VERSION" >&6; }
21979          fi # end check jdk version
21980        fi # end check javac
21981      fi # end check java
21982    fi # end check boot jdk found
21983  fi
21984
21985
21986  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
21987
21988  if test "x$BOOT_JDK_FOUND" = xno; then
21989    # Now execute the test
21990
21991  # Extract the first word of "javac", so it can be a program name with args.
21992set dummy javac; ac_word=$2
21993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21994$as_echo_n "checking for $ac_word... " >&6; }
21995if ${ac_cv_path_JAVAC_CHECK+:} false; then :
21996  $as_echo_n "(cached) " >&6
21997else
21998  case $JAVAC_CHECK in
21999  [\\/]* | ?:[\\/]*)
22000  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
22001  ;;
22002  *)
22003  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22004for as_dir in $PATH
22005do
22006  IFS=$as_save_IFS
22007  test -z "$as_dir" && as_dir=.
22008    for ac_exec_ext in '' $ac_executable_extensions; do
22009  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22010    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
22011    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22012    break 2
22013  fi
22014done
22015  done
22016IFS=$as_save_IFS
22017
22018  ;;
22019esac
22020fi
22021JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
22022if test -n "$JAVAC_CHECK"; then
22023  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
22024$as_echo "$JAVAC_CHECK" >&6; }
22025else
22026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22027$as_echo "no" >&6; }
22028fi
22029
22030
22031  # Extract the first word of "java", so it can be a program name with args.
22032set dummy java; ac_word=$2
22033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22034$as_echo_n "checking for $ac_word... " >&6; }
22035if ${ac_cv_path_JAVA_CHECK+:} false; then :
22036  $as_echo_n "(cached) " >&6
22037else
22038  case $JAVA_CHECK in
22039  [\\/]* | ?:[\\/]*)
22040  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
22041  ;;
22042  *)
22043  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22044for as_dir in $PATH
22045do
22046  IFS=$as_save_IFS
22047  test -z "$as_dir" && as_dir=.
22048    for ac_exec_ext in '' $ac_executable_extensions; do
22049  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22050    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
22051    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22052    break 2
22053  fi
22054done
22055  done
22056IFS=$as_save_IFS
22057
22058  ;;
22059esac
22060fi
22061JAVA_CHECK=$ac_cv_path_JAVA_CHECK
22062if test -n "$JAVA_CHECK"; then
22063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
22064$as_echo "$JAVA_CHECK" >&6; }
22065else
22066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22067$as_echo "no" >&6; }
22068fi
22069
22070
22071  BINARY="$JAVAC_CHECK"
22072  if test "x$JAVAC_CHECK" = x; then
22073    BINARY="$JAVA_CHECK"
22074  fi
22075  if test "x$BINARY" != x; then
22076    # So there is a java(c) binary, it might be part of a JDK.
22077    # Lets find the JDK/JRE directory by following symbolic links.
22078    # Linux/GNU systems often have links from /usr/bin/java to
22079    # /etc/alternatives/java to the real JDK binary.
22080
22081  if test "x$OPENJDK_BUILD_OS" != xwindows; then
22082    # Follow a chain of symbolic links. Use readlink
22083    # where it exists, else fall back to horribly
22084    # complicated shell code.
22085    if test "x$READLINK_TESTED" != yes; then
22086      # On MacOSX there is a readlink tool with a different
22087      # purpose than the GNU readlink tool. Check the found readlink.
22088      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
22089      if test "x$ISGNU" = x; then
22090        # A readlink that we do not know how to use.
22091        # Are there other non-GNU readlinks out there?
22092        READLINK_TESTED=yes
22093        READLINK=
22094      fi
22095    fi
22096
22097    if test "x$READLINK" != x; then
22098      BINARY=`$READLINK -f $BINARY`
22099    else
22100      # Save the current directory for restoring afterwards
22101      STARTDIR=$PWD
22102      COUNTER=0
22103      sym_link_dir=`$DIRNAME $BINARY`
22104      sym_link_file=`$BASENAME $BINARY`
22105      cd $sym_link_dir
22106      # Use -P flag to resolve symlinks in directories.
22107      cd `$THEPWDCMD -P`
22108      sym_link_dir=`$THEPWDCMD -P`
22109      # Resolve file symlinks
22110      while test $COUNTER -lt 20; do
22111        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
22112        if test "x$ISLINK" == x; then
22113          # This is not a symbolic link! We are done!
22114          break
22115        fi
22116        # Again resolve directory symlinks since the target of the just found
22117        # link could be in a different directory
22118        cd `$DIRNAME $ISLINK`
22119        sym_link_dir=`$THEPWDCMD -P`
22120        sym_link_file=`$BASENAME $ISLINK`
22121        let COUNTER=COUNTER+1
22122      done
22123      cd $STARTDIR
22124      BINARY=$sym_link_dir/$sym_link_file
22125    fi
22126  fi
22127
22128    BOOT_JDK=`dirname "$BINARY"`
22129    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
22130    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
22131      # Looks like we found ourselves an JDK
22132      BOOT_JDK_FOUND=maybe
22133      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
22134$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
22135    fi
22136  fi
22137
22138
22139    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22140    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22141      # Do we have a bin/java?
22142      if test ! -x "$BOOT_JDK/bin/java"; then
22143        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22144$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22145        BOOT_JDK_FOUND=no
22146      else
22147        # Do we have a bin/javac?
22148        if test ! -x "$BOOT_JDK/bin/javac"; then
22149          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22150$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22151          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22152$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22153          BOOT_JDK_FOUND=no
22154        else
22155          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22156          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22157
22158          # Extra M4 quote needed to protect [] in grep expression.
22159          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22160          if test "x$FOUND_CORRECT_VERSION" = x; then
22161            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22162$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22163            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22164$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22165            BOOT_JDK_FOUND=no
22166          else
22167            # We're done! :-)
22168            BOOT_JDK_FOUND=yes
22169
22170  # Only process if variable expands to non-empty
22171
22172  if test "x$BOOT_JDK" != x; then
22173    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22174
22175  # Input might be given as Windows format, start by converting to
22176  # unix format.
22177  path="$BOOT_JDK"
22178  new_path=`$CYGPATH -u "$path"`
22179
22180  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22181  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22182  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22183  # "foo.exe" is OK but "foo" is an error.
22184  #
22185  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22186  # It is also a way to make sure we got the proper file name for the real test later on.
22187  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22188  if test "x$test_shortpath" = x; then
22189    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22190$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22191    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22192  fi
22193
22194  # Call helper function which possibly converts this using DOS-style short mode.
22195  # If so, the updated path is stored in $new_path.
22196
22197  input_path="$new_path"
22198  # Check if we need to convert this using DOS-style short mode. If the path
22199  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22200  # take no chances and rewrite it.
22201  # Note: m4 eats our [], so we need to use [ and ] instead.
22202  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22203  if test "x$has_forbidden_chars" != x; then
22204    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22205    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22206    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22207    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22208      # Going to short mode and back again did indeed matter. Since short mode is
22209      # case insensitive, let's make it lowercase to improve readability.
22210      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22211      # Now convert it back to Unix-style (cygpath)
22212      input_path=`$CYGPATH -u "$shortmode_path"`
22213      new_path="$input_path"
22214    fi
22215  fi
22216
22217  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22218  if test "x$test_cygdrive_prefix" = x; then
22219    # As a simple fix, exclude /usr/bin since it's not a real path.
22220    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22221      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22222      # a path prefixed by /cygdrive for fixpath to work.
22223      new_path="$CYGWIN_ROOT_PATH$input_path"
22224    fi
22225  fi
22226
22227
22228  if test "x$path" != "x$new_path"; then
22229    BOOT_JDK="$new_path"
22230    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22231$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22232  fi
22233
22234    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22235
22236  path="$BOOT_JDK"
22237  has_colon=`$ECHO $path | $GREP ^.:`
22238  new_path="$path"
22239  if test "x$has_colon" = x; then
22240    # Not in mixed or Windows style, start by that.
22241    new_path=`cmd //c echo $path`
22242  fi
22243
22244
22245  input_path="$new_path"
22246  # Check if we need to convert this using DOS-style short mode. If the path
22247  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22248  # take no chances and rewrite it.
22249  # Note: m4 eats our [], so we need to use [ and ] instead.
22250  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22251  if test "x$has_forbidden_chars" != x; then
22252    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22253    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22254  fi
22255
22256
22257  windows_path="$new_path"
22258  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22259    unix_path=`$CYGPATH -u "$windows_path"`
22260    new_path="$unix_path"
22261  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22262    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22263    new_path="$unix_path"
22264  fi
22265
22266  if test "x$path" != "x$new_path"; then
22267    BOOT_JDK="$new_path"
22268    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22269$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22270  fi
22271
22272  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22273  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22274
22275    else
22276      # We're on a unix platform. Hooray! :)
22277      path="$BOOT_JDK"
22278      has_space=`$ECHO "$path" | $GREP " "`
22279      if test "x$has_space" != x; then
22280        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22281$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22282        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22283      fi
22284
22285      # Use eval to expand a potential ~
22286      eval path="$path"
22287      if test ! -f "$path" && test ! -d "$path"; then
22288        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22289      fi
22290
22291      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22292    fi
22293  fi
22294
22295            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22296$as_echo_n "checking for Boot JDK... " >&6; }
22297            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22298$as_echo "$BOOT_JDK" >&6; }
22299            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22300$as_echo_n "checking Boot JDK version... " >&6; }
22301            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22302            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22303$as_echo "$BOOT_JDK_VERSION" >&6; }
22304          fi # end check jdk version
22305        fi # end check javac
22306      fi # end check java
22307    fi # end check boot jdk found
22308  fi
22309
22310
22311  # Test: Is there a JDK installed in default, well-known locations?
22312
22313  if test "x$BOOT_JDK_FOUND" = xno; then
22314    # Now execute the test
22315
22316  if test "x$OPENJDK_TARGET_OS" = xwindows; then
22317
22318  if test "x$BOOT_JDK_FOUND" = xno; then
22319    # Now execute the test
22320
22321  if test "x$ProgramW6432" != x; then
22322    VIRTUAL_DIR="$ProgramW6432/Java"
22323
22324  windows_path="$VIRTUAL_DIR"
22325  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22326    unix_path=`$CYGPATH -u "$windows_path"`
22327    VIRTUAL_DIR="$unix_path"
22328  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22329    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22330    VIRTUAL_DIR="$unix_path"
22331  fi
22332
22333
22334  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22335  BOOT_JDK_SUFFIX=""
22336  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22337  if test "x$ALL_JDKS_FOUND" != x; then
22338    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22339
22340  if test "x$BOOT_JDK_FOUND" = xno; then
22341    # Now execute the test
22342
22343        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22344        if test -d "$BOOT_JDK"; then
22345          BOOT_JDK_FOUND=maybe
22346          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22347$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22348        fi
22349
22350
22351    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22352    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22353      # Do we have a bin/java?
22354      if test ! -x "$BOOT_JDK/bin/java"; then
22355        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22356$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22357        BOOT_JDK_FOUND=no
22358      else
22359        # Do we have a bin/javac?
22360        if test ! -x "$BOOT_JDK/bin/javac"; then
22361          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22362$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22363          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22364$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22365          BOOT_JDK_FOUND=no
22366        else
22367          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22368          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22369
22370          # Extra M4 quote needed to protect [] in grep expression.
22371          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22372          if test "x$FOUND_CORRECT_VERSION" = x; then
22373            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22374$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22375            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22376$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22377            BOOT_JDK_FOUND=no
22378          else
22379            # We're done! :-)
22380            BOOT_JDK_FOUND=yes
22381
22382  # Only process if variable expands to non-empty
22383
22384  if test "x$BOOT_JDK" != x; then
22385    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22386
22387  # Input might be given as Windows format, start by converting to
22388  # unix format.
22389  path="$BOOT_JDK"
22390  new_path=`$CYGPATH -u "$path"`
22391
22392  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22393  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22394  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22395  # "foo.exe" is OK but "foo" is an error.
22396  #
22397  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22398  # It is also a way to make sure we got the proper file name for the real test later on.
22399  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22400  if test "x$test_shortpath" = x; then
22401    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22402$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22403    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22404  fi
22405
22406  # Call helper function which possibly converts this using DOS-style short mode.
22407  # If so, the updated path is stored in $new_path.
22408
22409  input_path="$new_path"
22410  # Check if we need to convert this using DOS-style short mode. If the path
22411  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22412  # take no chances and rewrite it.
22413  # Note: m4 eats our [], so we need to use [ and ] instead.
22414  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22415  if test "x$has_forbidden_chars" != x; then
22416    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22417    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22418    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22419    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22420      # Going to short mode and back again did indeed matter. Since short mode is
22421      # case insensitive, let's make it lowercase to improve readability.
22422      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22423      # Now convert it back to Unix-style (cygpath)
22424      input_path=`$CYGPATH -u "$shortmode_path"`
22425      new_path="$input_path"
22426    fi
22427  fi
22428
22429  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22430  if test "x$test_cygdrive_prefix" = x; then
22431    # As a simple fix, exclude /usr/bin since it's not a real path.
22432    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22433      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22434      # a path prefixed by /cygdrive for fixpath to work.
22435      new_path="$CYGWIN_ROOT_PATH$input_path"
22436    fi
22437  fi
22438
22439
22440  if test "x$path" != "x$new_path"; then
22441    BOOT_JDK="$new_path"
22442    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22443$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22444  fi
22445
22446    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22447
22448  path="$BOOT_JDK"
22449  has_colon=`$ECHO $path | $GREP ^.:`
22450  new_path="$path"
22451  if test "x$has_colon" = x; then
22452    # Not in mixed or Windows style, start by that.
22453    new_path=`cmd //c echo $path`
22454  fi
22455
22456
22457  input_path="$new_path"
22458  # Check if we need to convert this using DOS-style short mode. If the path
22459  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22460  # take no chances and rewrite it.
22461  # Note: m4 eats our [], so we need to use [ and ] instead.
22462  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22463  if test "x$has_forbidden_chars" != x; then
22464    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22465    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22466  fi
22467
22468
22469  windows_path="$new_path"
22470  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22471    unix_path=`$CYGPATH -u "$windows_path"`
22472    new_path="$unix_path"
22473  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22474    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22475    new_path="$unix_path"
22476  fi
22477
22478  if test "x$path" != "x$new_path"; then
22479    BOOT_JDK="$new_path"
22480    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22481$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22482  fi
22483
22484  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22485  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22486
22487    else
22488      # We're on a unix platform. Hooray! :)
22489      path="$BOOT_JDK"
22490      has_space=`$ECHO "$path" | $GREP " "`
22491      if test "x$has_space" != x; then
22492        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22493$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22494        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22495      fi
22496
22497      # Use eval to expand a potential ~
22498      eval path="$path"
22499      if test ! -f "$path" && test ! -d "$path"; then
22500        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22501      fi
22502
22503      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22504    fi
22505  fi
22506
22507            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22508$as_echo_n "checking for Boot JDK... " >&6; }
22509            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22510$as_echo "$BOOT_JDK" >&6; }
22511            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22512$as_echo_n "checking Boot JDK version... " >&6; }
22513            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22514            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22515$as_echo "$BOOT_JDK_VERSION" >&6; }
22516          fi # end check jdk version
22517        fi # end check javac
22518      fi # end check java
22519    fi # end check boot jdk found
22520  fi
22521
22522    done
22523  fi
22524
22525  fi
22526
22527
22528    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22529    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22530      # Do we have a bin/java?
22531      if test ! -x "$BOOT_JDK/bin/java"; then
22532        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22533$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22534        BOOT_JDK_FOUND=no
22535      else
22536        # Do we have a bin/javac?
22537        if test ! -x "$BOOT_JDK/bin/javac"; then
22538          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22539$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22540          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22541$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22542          BOOT_JDK_FOUND=no
22543        else
22544          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22545          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22546
22547          # Extra M4 quote needed to protect [] in grep expression.
22548          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22549          if test "x$FOUND_CORRECT_VERSION" = x; then
22550            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22551$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22552            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22553$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22554            BOOT_JDK_FOUND=no
22555          else
22556            # We're done! :-)
22557            BOOT_JDK_FOUND=yes
22558
22559  # Only process if variable expands to non-empty
22560
22561  if test "x$BOOT_JDK" != x; then
22562    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22563
22564  # Input might be given as Windows format, start by converting to
22565  # unix format.
22566  path="$BOOT_JDK"
22567  new_path=`$CYGPATH -u "$path"`
22568
22569  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22570  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22571  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22572  # "foo.exe" is OK but "foo" is an error.
22573  #
22574  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22575  # It is also a way to make sure we got the proper file name for the real test later on.
22576  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22577  if test "x$test_shortpath" = x; then
22578    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22579$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22580    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22581  fi
22582
22583  # Call helper function which possibly converts this using DOS-style short mode.
22584  # If so, the updated path is stored in $new_path.
22585
22586  input_path="$new_path"
22587  # Check if we need to convert this using DOS-style short mode. If the path
22588  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22589  # take no chances and rewrite it.
22590  # Note: m4 eats our [], so we need to use [ and ] instead.
22591  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22592  if test "x$has_forbidden_chars" != x; then
22593    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22594    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22595    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22596    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22597      # Going to short mode and back again did indeed matter. Since short mode is
22598      # case insensitive, let's make it lowercase to improve readability.
22599      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22600      # Now convert it back to Unix-style (cygpath)
22601      input_path=`$CYGPATH -u "$shortmode_path"`
22602      new_path="$input_path"
22603    fi
22604  fi
22605
22606  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22607  if test "x$test_cygdrive_prefix" = x; then
22608    # As a simple fix, exclude /usr/bin since it's not a real path.
22609    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22610      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22611      # a path prefixed by /cygdrive for fixpath to work.
22612      new_path="$CYGWIN_ROOT_PATH$input_path"
22613    fi
22614  fi
22615
22616
22617  if test "x$path" != "x$new_path"; then
22618    BOOT_JDK="$new_path"
22619    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22620$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22621  fi
22622
22623    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22624
22625  path="$BOOT_JDK"
22626  has_colon=`$ECHO $path | $GREP ^.:`
22627  new_path="$path"
22628  if test "x$has_colon" = x; then
22629    # Not in mixed or Windows style, start by that.
22630    new_path=`cmd //c echo $path`
22631  fi
22632
22633
22634  input_path="$new_path"
22635  # Check if we need to convert this using DOS-style short mode. If the path
22636  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22637  # take no chances and rewrite it.
22638  # Note: m4 eats our [], so we need to use [ and ] instead.
22639  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22640  if test "x$has_forbidden_chars" != x; then
22641    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22642    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22643  fi
22644
22645
22646  windows_path="$new_path"
22647  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22648    unix_path=`$CYGPATH -u "$windows_path"`
22649    new_path="$unix_path"
22650  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22651    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22652    new_path="$unix_path"
22653  fi
22654
22655  if test "x$path" != "x$new_path"; then
22656    BOOT_JDK="$new_path"
22657    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22658$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22659  fi
22660
22661  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22662  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22663
22664    else
22665      # We're on a unix platform. Hooray! :)
22666      path="$BOOT_JDK"
22667      has_space=`$ECHO "$path" | $GREP " "`
22668      if test "x$has_space" != x; then
22669        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22670$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22671        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22672      fi
22673
22674      # Use eval to expand a potential ~
22675      eval path="$path"
22676      if test ! -f "$path" && test ! -d "$path"; then
22677        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22678      fi
22679
22680      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22681    fi
22682  fi
22683
22684            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22685$as_echo_n "checking for Boot JDK... " >&6; }
22686            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22687$as_echo "$BOOT_JDK" >&6; }
22688            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22689$as_echo_n "checking Boot JDK version... " >&6; }
22690            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22691            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22692$as_echo "$BOOT_JDK_VERSION" >&6; }
22693          fi # end check jdk version
22694        fi # end check javac
22695      fi # end check java
22696    fi # end check boot jdk found
22697  fi
22698
22699
22700  if test "x$BOOT_JDK_FOUND" = xno; then
22701    # Now execute the test
22702
22703  if test "x$PROGRAMW6432" != x; then
22704    VIRTUAL_DIR="$PROGRAMW6432/Java"
22705
22706  windows_path="$VIRTUAL_DIR"
22707  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22708    unix_path=`$CYGPATH -u "$windows_path"`
22709    VIRTUAL_DIR="$unix_path"
22710  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22711    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22712    VIRTUAL_DIR="$unix_path"
22713  fi
22714
22715
22716  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22717  BOOT_JDK_SUFFIX=""
22718  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22719  if test "x$ALL_JDKS_FOUND" != x; then
22720    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22721
22722  if test "x$BOOT_JDK_FOUND" = xno; then
22723    # Now execute the test
22724
22725        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22726        if test -d "$BOOT_JDK"; then
22727          BOOT_JDK_FOUND=maybe
22728          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22729$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22730        fi
22731
22732
22733    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22734    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22735      # Do we have a bin/java?
22736      if test ! -x "$BOOT_JDK/bin/java"; then
22737        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22738$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22739        BOOT_JDK_FOUND=no
22740      else
22741        # Do we have a bin/javac?
22742        if test ! -x "$BOOT_JDK/bin/javac"; then
22743          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22744$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22745          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22746$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22747          BOOT_JDK_FOUND=no
22748        else
22749          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22750          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22751
22752          # Extra M4 quote needed to protect [] in grep expression.
22753          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22754          if test "x$FOUND_CORRECT_VERSION" = x; then
22755            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22756$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22757            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22758$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22759            BOOT_JDK_FOUND=no
22760          else
22761            # We're done! :-)
22762            BOOT_JDK_FOUND=yes
22763
22764  # Only process if variable expands to non-empty
22765
22766  if test "x$BOOT_JDK" != x; then
22767    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22768
22769  # Input might be given as Windows format, start by converting to
22770  # unix format.
22771  path="$BOOT_JDK"
22772  new_path=`$CYGPATH -u "$path"`
22773
22774  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22775  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22776  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22777  # "foo.exe" is OK but "foo" is an error.
22778  #
22779  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22780  # It is also a way to make sure we got the proper file name for the real test later on.
22781  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22782  if test "x$test_shortpath" = x; then
22783    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22784$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22785    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22786  fi
22787
22788  # Call helper function which possibly converts this using DOS-style short mode.
22789  # If so, the updated path is stored in $new_path.
22790
22791  input_path="$new_path"
22792  # Check if we need to convert this using DOS-style short mode. If the path
22793  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22794  # take no chances and rewrite it.
22795  # Note: m4 eats our [], so we need to use [ and ] instead.
22796  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22797  if test "x$has_forbidden_chars" != x; then
22798    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22799    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22800    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22801    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22802      # Going to short mode and back again did indeed matter. Since short mode is
22803      # case insensitive, let's make it lowercase to improve readability.
22804      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22805      # Now convert it back to Unix-style (cygpath)
22806      input_path=`$CYGPATH -u "$shortmode_path"`
22807      new_path="$input_path"
22808    fi
22809  fi
22810
22811  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22812  if test "x$test_cygdrive_prefix" = x; then
22813    # As a simple fix, exclude /usr/bin since it's not a real path.
22814    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22815      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22816      # a path prefixed by /cygdrive for fixpath to work.
22817      new_path="$CYGWIN_ROOT_PATH$input_path"
22818    fi
22819  fi
22820
22821
22822  if test "x$path" != "x$new_path"; then
22823    BOOT_JDK="$new_path"
22824    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22825$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22826  fi
22827
22828    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22829
22830  path="$BOOT_JDK"
22831  has_colon=`$ECHO $path | $GREP ^.:`
22832  new_path="$path"
22833  if test "x$has_colon" = x; then
22834    # Not in mixed or Windows style, start by that.
22835    new_path=`cmd //c echo $path`
22836  fi
22837
22838
22839  input_path="$new_path"
22840  # Check if we need to convert this using DOS-style short mode. If the path
22841  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22842  # take no chances and rewrite it.
22843  # Note: m4 eats our [], so we need to use [ and ] instead.
22844  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22845  if test "x$has_forbidden_chars" != x; then
22846    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22847    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22848  fi
22849
22850
22851  windows_path="$new_path"
22852  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22853    unix_path=`$CYGPATH -u "$windows_path"`
22854    new_path="$unix_path"
22855  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22856    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22857    new_path="$unix_path"
22858  fi
22859
22860  if test "x$path" != "x$new_path"; then
22861    BOOT_JDK="$new_path"
22862    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22863$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22864  fi
22865
22866  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22867  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22868
22869    else
22870      # We're on a unix platform. Hooray! :)
22871      path="$BOOT_JDK"
22872      has_space=`$ECHO "$path" | $GREP " "`
22873      if test "x$has_space" != x; then
22874        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22875$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22876        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22877      fi
22878
22879      # Use eval to expand a potential ~
22880      eval path="$path"
22881      if test ! -f "$path" && test ! -d "$path"; then
22882        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22883      fi
22884
22885      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22886    fi
22887  fi
22888
22889            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22890$as_echo_n "checking for Boot JDK... " >&6; }
22891            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22892$as_echo "$BOOT_JDK" >&6; }
22893            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22894$as_echo_n "checking Boot JDK version... " >&6; }
22895            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22896            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22897$as_echo "$BOOT_JDK_VERSION" >&6; }
22898          fi # end check jdk version
22899        fi # end check javac
22900      fi # end check java
22901    fi # end check boot jdk found
22902  fi
22903
22904    done
22905  fi
22906
22907  fi
22908
22909
22910    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22911    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22912      # Do we have a bin/java?
22913      if test ! -x "$BOOT_JDK/bin/java"; then
22914        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22915$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22916        BOOT_JDK_FOUND=no
22917      else
22918        # Do we have a bin/javac?
22919        if test ! -x "$BOOT_JDK/bin/javac"; then
22920          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22921$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22922          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22923$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22924          BOOT_JDK_FOUND=no
22925        else
22926          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22927          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22928
22929          # Extra M4 quote needed to protect [] in grep expression.
22930          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22931          if test "x$FOUND_CORRECT_VERSION" = x; then
22932            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22933$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22934            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22935$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22936            BOOT_JDK_FOUND=no
22937          else
22938            # We're done! :-)
22939            BOOT_JDK_FOUND=yes
22940
22941  # Only process if variable expands to non-empty
22942
22943  if test "x$BOOT_JDK" != x; then
22944    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22945
22946  # Input might be given as Windows format, start by converting to
22947  # unix format.
22948  path="$BOOT_JDK"
22949  new_path=`$CYGPATH -u "$path"`
22950
22951  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22952  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22953  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22954  # "foo.exe" is OK but "foo" is an error.
22955  #
22956  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22957  # It is also a way to make sure we got the proper file name for the real test later on.
22958  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22959  if test "x$test_shortpath" = x; then
22960    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22961$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22962    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22963  fi
22964
22965  # Call helper function which possibly converts this using DOS-style short mode.
22966  # If so, the updated path is stored in $new_path.
22967
22968  input_path="$new_path"
22969  # Check if we need to convert this using DOS-style short mode. If the path
22970  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22971  # take no chances and rewrite it.
22972  # Note: m4 eats our [], so we need to use [ and ] instead.
22973  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22974  if test "x$has_forbidden_chars" != x; then
22975    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22976    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22977    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22978    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22979      # Going to short mode and back again did indeed matter. Since short mode is
22980      # case insensitive, let's make it lowercase to improve readability.
22981      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22982      # Now convert it back to Unix-style (cygpath)
22983      input_path=`$CYGPATH -u "$shortmode_path"`
22984      new_path="$input_path"
22985    fi
22986  fi
22987
22988  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22989  if test "x$test_cygdrive_prefix" = x; then
22990    # As a simple fix, exclude /usr/bin since it's not a real path.
22991    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22992      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22993      # a path prefixed by /cygdrive for fixpath to work.
22994      new_path="$CYGWIN_ROOT_PATH$input_path"
22995    fi
22996  fi
22997
22998
22999  if test "x$path" != "x$new_path"; then
23000    BOOT_JDK="$new_path"
23001    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23002$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23003  fi
23004
23005    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23006
23007  path="$BOOT_JDK"
23008  has_colon=`$ECHO $path | $GREP ^.:`
23009  new_path="$path"
23010  if test "x$has_colon" = x; then
23011    # Not in mixed or Windows style, start by that.
23012    new_path=`cmd //c echo $path`
23013  fi
23014
23015
23016  input_path="$new_path"
23017  # Check if we need to convert this using DOS-style short mode. If the path
23018  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23019  # take no chances and rewrite it.
23020  # Note: m4 eats our [], so we need to use [ and ] instead.
23021  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23022  if test "x$has_forbidden_chars" != x; then
23023    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23024    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23025  fi
23026
23027
23028  windows_path="$new_path"
23029  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23030    unix_path=`$CYGPATH -u "$windows_path"`
23031    new_path="$unix_path"
23032  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23033    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23034    new_path="$unix_path"
23035  fi
23036
23037  if test "x$path" != "x$new_path"; then
23038    BOOT_JDK="$new_path"
23039    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23040$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23041  fi
23042
23043  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23044  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23045
23046    else
23047      # We're on a unix platform. Hooray! :)
23048      path="$BOOT_JDK"
23049      has_space=`$ECHO "$path" | $GREP " "`
23050      if test "x$has_space" != x; then
23051        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23052$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23053        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23054      fi
23055
23056      # Use eval to expand a potential ~
23057      eval path="$path"
23058      if test ! -f "$path" && test ! -d "$path"; then
23059        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23060      fi
23061
23062      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23063    fi
23064  fi
23065
23066            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23067$as_echo_n "checking for Boot JDK... " >&6; }
23068            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23069$as_echo "$BOOT_JDK" >&6; }
23070            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23071$as_echo_n "checking Boot JDK version... " >&6; }
23072            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23073            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23074$as_echo "$BOOT_JDK_VERSION" >&6; }
23075          fi # end check jdk version
23076        fi # end check javac
23077      fi # end check java
23078    fi # end check boot jdk found
23079  fi
23080
23081
23082  if test "x$BOOT_JDK_FOUND" = xno; then
23083    # Now execute the test
23084
23085  if test "x$PROGRAMFILES" != x; then
23086    VIRTUAL_DIR="$PROGRAMFILES/Java"
23087
23088  windows_path="$VIRTUAL_DIR"
23089  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23090    unix_path=`$CYGPATH -u "$windows_path"`
23091    VIRTUAL_DIR="$unix_path"
23092  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23093    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23094    VIRTUAL_DIR="$unix_path"
23095  fi
23096
23097
23098  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23099  BOOT_JDK_SUFFIX=""
23100  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23101  if test "x$ALL_JDKS_FOUND" != x; then
23102    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23103
23104  if test "x$BOOT_JDK_FOUND" = xno; then
23105    # Now execute the test
23106
23107        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23108        if test -d "$BOOT_JDK"; then
23109          BOOT_JDK_FOUND=maybe
23110          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23111$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23112        fi
23113
23114
23115    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23116    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23117      # Do we have a bin/java?
23118      if test ! -x "$BOOT_JDK/bin/java"; then
23119        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23120$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23121        BOOT_JDK_FOUND=no
23122      else
23123        # Do we have a bin/javac?
23124        if test ! -x "$BOOT_JDK/bin/javac"; then
23125          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23126$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23127          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23128$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23129          BOOT_JDK_FOUND=no
23130        else
23131          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23132          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23133
23134          # Extra M4 quote needed to protect [] in grep expression.
23135          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23136          if test "x$FOUND_CORRECT_VERSION" = x; then
23137            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23138$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23139            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23140$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23141            BOOT_JDK_FOUND=no
23142          else
23143            # We're done! :-)
23144            BOOT_JDK_FOUND=yes
23145
23146  # Only process if variable expands to non-empty
23147
23148  if test "x$BOOT_JDK" != x; then
23149    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23150
23151  # Input might be given as Windows format, start by converting to
23152  # unix format.
23153  path="$BOOT_JDK"
23154  new_path=`$CYGPATH -u "$path"`
23155
23156  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23157  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23158  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23159  # "foo.exe" is OK but "foo" is an error.
23160  #
23161  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23162  # It is also a way to make sure we got the proper file name for the real test later on.
23163  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23164  if test "x$test_shortpath" = x; then
23165    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23166$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23167    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23168  fi
23169
23170  # Call helper function which possibly converts this using DOS-style short mode.
23171  # If so, the updated path is stored in $new_path.
23172
23173  input_path="$new_path"
23174  # Check if we need to convert this using DOS-style short mode. If the path
23175  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23176  # take no chances and rewrite it.
23177  # Note: m4 eats our [], so we need to use [ and ] instead.
23178  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23179  if test "x$has_forbidden_chars" != x; then
23180    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23181    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23182    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23183    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23184      # Going to short mode and back again did indeed matter. Since short mode is
23185      # case insensitive, let's make it lowercase to improve readability.
23186      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23187      # Now convert it back to Unix-style (cygpath)
23188      input_path=`$CYGPATH -u "$shortmode_path"`
23189      new_path="$input_path"
23190    fi
23191  fi
23192
23193  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23194  if test "x$test_cygdrive_prefix" = x; then
23195    # As a simple fix, exclude /usr/bin since it's not a real path.
23196    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23197      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23198      # a path prefixed by /cygdrive for fixpath to work.
23199      new_path="$CYGWIN_ROOT_PATH$input_path"
23200    fi
23201  fi
23202
23203
23204  if test "x$path" != "x$new_path"; then
23205    BOOT_JDK="$new_path"
23206    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23207$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23208  fi
23209
23210    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23211
23212  path="$BOOT_JDK"
23213  has_colon=`$ECHO $path | $GREP ^.:`
23214  new_path="$path"
23215  if test "x$has_colon" = x; then
23216    # Not in mixed or Windows style, start by that.
23217    new_path=`cmd //c echo $path`
23218  fi
23219
23220
23221  input_path="$new_path"
23222  # Check if we need to convert this using DOS-style short mode. If the path
23223  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23224  # take no chances and rewrite it.
23225  # Note: m4 eats our [], so we need to use [ and ] instead.
23226  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23227  if test "x$has_forbidden_chars" != x; then
23228    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23229    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23230  fi
23231
23232
23233  windows_path="$new_path"
23234  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23235    unix_path=`$CYGPATH -u "$windows_path"`
23236    new_path="$unix_path"
23237  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23238    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23239    new_path="$unix_path"
23240  fi
23241
23242  if test "x$path" != "x$new_path"; then
23243    BOOT_JDK="$new_path"
23244    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23245$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23246  fi
23247
23248  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23249  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23250
23251    else
23252      # We're on a unix platform. Hooray! :)
23253      path="$BOOT_JDK"
23254      has_space=`$ECHO "$path" | $GREP " "`
23255      if test "x$has_space" != x; then
23256        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23257$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23258        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23259      fi
23260
23261      # Use eval to expand a potential ~
23262      eval path="$path"
23263      if test ! -f "$path" && test ! -d "$path"; then
23264        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23265      fi
23266
23267      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23268    fi
23269  fi
23270
23271            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23272$as_echo_n "checking for Boot JDK... " >&6; }
23273            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23274$as_echo "$BOOT_JDK" >&6; }
23275            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23276$as_echo_n "checking Boot JDK version... " >&6; }
23277            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23278            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23279$as_echo "$BOOT_JDK_VERSION" >&6; }
23280          fi # end check jdk version
23281        fi # end check javac
23282      fi # end check java
23283    fi # end check boot jdk found
23284  fi
23285
23286    done
23287  fi
23288
23289  fi
23290
23291
23292    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23293    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23294      # Do we have a bin/java?
23295      if test ! -x "$BOOT_JDK/bin/java"; then
23296        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23297$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23298        BOOT_JDK_FOUND=no
23299      else
23300        # Do we have a bin/javac?
23301        if test ! -x "$BOOT_JDK/bin/javac"; then
23302          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23303$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23304          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23305$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23306          BOOT_JDK_FOUND=no
23307        else
23308          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23309          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23310
23311          # Extra M4 quote needed to protect [] in grep expression.
23312          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23313          if test "x$FOUND_CORRECT_VERSION" = x; then
23314            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23315$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23316            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23317$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23318            BOOT_JDK_FOUND=no
23319          else
23320            # We're done! :-)
23321            BOOT_JDK_FOUND=yes
23322
23323  # Only process if variable expands to non-empty
23324
23325  if test "x$BOOT_JDK" != x; then
23326    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23327
23328  # Input might be given as Windows format, start by converting to
23329  # unix format.
23330  path="$BOOT_JDK"
23331  new_path=`$CYGPATH -u "$path"`
23332
23333  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23334  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23335  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23336  # "foo.exe" is OK but "foo" is an error.
23337  #
23338  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23339  # It is also a way to make sure we got the proper file name for the real test later on.
23340  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23341  if test "x$test_shortpath" = x; then
23342    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23343$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23344    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23345  fi
23346
23347  # Call helper function which possibly converts this using DOS-style short mode.
23348  # If so, the updated path is stored in $new_path.
23349
23350  input_path="$new_path"
23351  # Check if we need to convert this using DOS-style short mode. If the path
23352  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23353  # take no chances and rewrite it.
23354  # Note: m4 eats our [], so we need to use [ and ] instead.
23355  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23356  if test "x$has_forbidden_chars" != x; then
23357    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23358    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23359    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23360    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23361      # Going to short mode and back again did indeed matter. Since short mode is
23362      # case insensitive, let's make it lowercase to improve readability.
23363      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23364      # Now convert it back to Unix-style (cygpath)
23365      input_path=`$CYGPATH -u "$shortmode_path"`
23366      new_path="$input_path"
23367    fi
23368  fi
23369
23370  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23371  if test "x$test_cygdrive_prefix" = x; then
23372    # As a simple fix, exclude /usr/bin since it's not a real path.
23373    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23374      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23375      # a path prefixed by /cygdrive for fixpath to work.
23376      new_path="$CYGWIN_ROOT_PATH$input_path"
23377    fi
23378  fi
23379
23380
23381  if test "x$path" != "x$new_path"; then
23382    BOOT_JDK="$new_path"
23383    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23384$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23385  fi
23386
23387    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23388
23389  path="$BOOT_JDK"
23390  has_colon=`$ECHO $path | $GREP ^.:`
23391  new_path="$path"
23392  if test "x$has_colon" = x; then
23393    # Not in mixed or Windows style, start by that.
23394    new_path=`cmd //c echo $path`
23395  fi
23396
23397
23398  input_path="$new_path"
23399  # Check if we need to convert this using DOS-style short mode. If the path
23400  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23401  # take no chances and rewrite it.
23402  # Note: m4 eats our [], so we need to use [ and ] instead.
23403  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23404  if test "x$has_forbidden_chars" != x; then
23405    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23406    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23407  fi
23408
23409
23410  windows_path="$new_path"
23411  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23412    unix_path=`$CYGPATH -u "$windows_path"`
23413    new_path="$unix_path"
23414  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23415    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23416    new_path="$unix_path"
23417  fi
23418
23419  if test "x$path" != "x$new_path"; then
23420    BOOT_JDK="$new_path"
23421    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23422$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23423  fi
23424
23425  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23426  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23427
23428    else
23429      # We're on a unix platform. Hooray! :)
23430      path="$BOOT_JDK"
23431      has_space=`$ECHO "$path" | $GREP " "`
23432      if test "x$has_space" != x; then
23433        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23434$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23435        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23436      fi
23437
23438      # Use eval to expand a potential ~
23439      eval path="$path"
23440      if test ! -f "$path" && test ! -d "$path"; then
23441        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23442      fi
23443
23444      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23445    fi
23446  fi
23447
23448            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23449$as_echo_n "checking for Boot JDK... " >&6; }
23450            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23451$as_echo "$BOOT_JDK" >&6; }
23452            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23453$as_echo_n "checking Boot JDK version... " >&6; }
23454            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23455            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23456$as_echo "$BOOT_JDK_VERSION" >&6; }
23457          fi # end check jdk version
23458        fi # end check javac
23459      fi # end check java
23460    fi # end check boot jdk found
23461  fi
23462
23463
23464  if test "x$BOOT_JDK_FOUND" = xno; then
23465    # Now execute the test
23466
23467  if test "x$ProgramFiles" != x; then
23468    VIRTUAL_DIR="$ProgramFiles/Java"
23469
23470  windows_path="$VIRTUAL_DIR"
23471  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23472    unix_path=`$CYGPATH -u "$windows_path"`
23473    VIRTUAL_DIR="$unix_path"
23474  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23475    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23476    VIRTUAL_DIR="$unix_path"
23477  fi
23478
23479
23480  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23481  BOOT_JDK_SUFFIX=""
23482  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23483  if test "x$ALL_JDKS_FOUND" != x; then
23484    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23485
23486  if test "x$BOOT_JDK_FOUND" = xno; then
23487    # Now execute the test
23488
23489        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23490        if test -d "$BOOT_JDK"; then
23491          BOOT_JDK_FOUND=maybe
23492          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23493$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23494        fi
23495
23496
23497    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23498    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23499      # Do we have a bin/java?
23500      if test ! -x "$BOOT_JDK/bin/java"; then
23501        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23502$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23503        BOOT_JDK_FOUND=no
23504      else
23505        # Do we have a bin/javac?
23506        if test ! -x "$BOOT_JDK/bin/javac"; then
23507          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23508$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23509          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23510$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23511          BOOT_JDK_FOUND=no
23512        else
23513          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23514          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23515
23516          # Extra M4 quote needed to protect [] in grep expression.
23517          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23518          if test "x$FOUND_CORRECT_VERSION" = x; then
23519            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23520$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23521            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23522$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23523            BOOT_JDK_FOUND=no
23524          else
23525            # We're done! :-)
23526            BOOT_JDK_FOUND=yes
23527
23528  # Only process if variable expands to non-empty
23529
23530  if test "x$BOOT_JDK" != x; then
23531    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23532
23533  # Input might be given as Windows format, start by converting to
23534  # unix format.
23535  path="$BOOT_JDK"
23536  new_path=`$CYGPATH -u "$path"`
23537
23538  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23539  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23540  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23541  # "foo.exe" is OK but "foo" is an error.
23542  #
23543  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23544  # It is also a way to make sure we got the proper file name for the real test later on.
23545  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23546  if test "x$test_shortpath" = x; then
23547    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23548$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23549    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23550  fi
23551
23552  # Call helper function which possibly converts this using DOS-style short mode.
23553  # If so, the updated path is stored in $new_path.
23554
23555  input_path="$new_path"
23556  # Check if we need to convert this using DOS-style short mode. If the path
23557  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23558  # take no chances and rewrite it.
23559  # Note: m4 eats our [], so we need to use [ and ] instead.
23560  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23561  if test "x$has_forbidden_chars" != x; then
23562    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23563    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23564    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23565    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23566      # Going to short mode and back again did indeed matter. Since short mode is
23567      # case insensitive, let's make it lowercase to improve readability.
23568      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23569      # Now convert it back to Unix-style (cygpath)
23570      input_path=`$CYGPATH -u "$shortmode_path"`
23571      new_path="$input_path"
23572    fi
23573  fi
23574
23575  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23576  if test "x$test_cygdrive_prefix" = x; then
23577    # As a simple fix, exclude /usr/bin since it's not a real path.
23578    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23579      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23580      # a path prefixed by /cygdrive for fixpath to work.
23581      new_path="$CYGWIN_ROOT_PATH$input_path"
23582    fi
23583  fi
23584
23585
23586  if test "x$path" != "x$new_path"; then
23587    BOOT_JDK="$new_path"
23588    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23589$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23590  fi
23591
23592    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23593
23594  path="$BOOT_JDK"
23595  has_colon=`$ECHO $path | $GREP ^.:`
23596  new_path="$path"
23597  if test "x$has_colon" = x; then
23598    # Not in mixed or Windows style, start by that.
23599    new_path=`cmd //c echo $path`
23600  fi
23601
23602
23603  input_path="$new_path"
23604  # Check if we need to convert this using DOS-style short mode. If the path
23605  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23606  # take no chances and rewrite it.
23607  # Note: m4 eats our [], so we need to use [ and ] instead.
23608  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23609  if test "x$has_forbidden_chars" != x; then
23610    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23611    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23612  fi
23613
23614
23615  windows_path="$new_path"
23616  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23617    unix_path=`$CYGPATH -u "$windows_path"`
23618    new_path="$unix_path"
23619  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23620    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23621    new_path="$unix_path"
23622  fi
23623
23624  if test "x$path" != "x$new_path"; then
23625    BOOT_JDK="$new_path"
23626    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23627$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23628  fi
23629
23630  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23631  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23632
23633    else
23634      # We're on a unix platform. Hooray! :)
23635      path="$BOOT_JDK"
23636      has_space=`$ECHO "$path" | $GREP " "`
23637      if test "x$has_space" != x; then
23638        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23639$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23640        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23641      fi
23642
23643      # Use eval to expand a potential ~
23644      eval path="$path"
23645      if test ! -f "$path" && test ! -d "$path"; then
23646        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23647      fi
23648
23649      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23650    fi
23651  fi
23652
23653            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23654$as_echo_n "checking for Boot JDK... " >&6; }
23655            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23656$as_echo "$BOOT_JDK" >&6; }
23657            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23658$as_echo_n "checking Boot JDK version... " >&6; }
23659            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23660            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23661$as_echo "$BOOT_JDK_VERSION" >&6; }
23662          fi # end check jdk version
23663        fi # end check javac
23664      fi # end check java
23665    fi # end check boot jdk found
23666  fi
23667
23668    done
23669  fi
23670
23671  fi
23672
23673
23674    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23675    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23676      # Do we have a bin/java?
23677      if test ! -x "$BOOT_JDK/bin/java"; then
23678        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23679$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23680        BOOT_JDK_FOUND=no
23681      else
23682        # Do we have a bin/javac?
23683        if test ! -x "$BOOT_JDK/bin/javac"; then
23684          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23685$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23686          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23687$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23688          BOOT_JDK_FOUND=no
23689        else
23690          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23691          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23692
23693          # Extra M4 quote needed to protect [] in grep expression.
23694          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23695          if test "x$FOUND_CORRECT_VERSION" = x; then
23696            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23697$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23698            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23699$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23700            BOOT_JDK_FOUND=no
23701          else
23702            # We're done! :-)
23703            BOOT_JDK_FOUND=yes
23704
23705  # Only process if variable expands to non-empty
23706
23707  if test "x$BOOT_JDK" != x; then
23708    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23709
23710  # Input might be given as Windows format, start by converting to
23711  # unix format.
23712  path="$BOOT_JDK"
23713  new_path=`$CYGPATH -u "$path"`
23714
23715  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23716  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23717  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23718  # "foo.exe" is OK but "foo" is an error.
23719  #
23720  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23721  # It is also a way to make sure we got the proper file name for the real test later on.
23722  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23723  if test "x$test_shortpath" = x; then
23724    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23725$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23726    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23727  fi
23728
23729  # Call helper function which possibly converts this using DOS-style short mode.
23730  # If so, the updated path is stored in $new_path.
23731
23732  input_path="$new_path"
23733  # Check if we need to convert this using DOS-style short mode. If the path
23734  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23735  # take no chances and rewrite it.
23736  # Note: m4 eats our [], so we need to use [ and ] instead.
23737  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23738  if test "x$has_forbidden_chars" != x; then
23739    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23740    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23741    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23742    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23743      # Going to short mode and back again did indeed matter. Since short mode is
23744      # case insensitive, let's make it lowercase to improve readability.
23745      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23746      # Now convert it back to Unix-style (cygpath)
23747      input_path=`$CYGPATH -u "$shortmode_path"`
23748      new_path="$input_path"
23749    fi
23750  fi
23751
23752  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23753  if test "x$test_cygdrive_prefix" = x; then
23754    # As a simple fix, exclude /usr/bin since it's not a real path.
23755    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23756      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23757      # a path prefixed by /cygdrive for fixpath to work.
23758      new_path="$CYGWIN_ROOT_PATH$input_path"
23759    fi
23760  fi
23761
23762
23763  if test "x$path" != "x$new_path"; then
23764    BOOT_JDK="$new_path"
23765    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23766$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23767  fi
23768
23769    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23770
23771  path="$BOOT_JDK"
23772  has_colon=`$ECHO $path | $GREP ^.:`
23773  new_path="$path"
23774  if test "x$has_colon" = x; then
23775    # Not in mixed or Windows style, start by that.
23776    new_path=`cmd //c echo $path`
23777  fi
23778
23779
23780  input_path="$new_path"
23781  # Check if we need to convert this using DOS-style short mode. If the path
23782  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23783  # take no chances and rewrite it.
23784  # Note: m4 eats our [], so we need to use [ and ] instead.
23785  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23786  if test "x$has_forbidden_chars" != x; then
23787    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23788    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23789  fi
23790
23791
23792  windows_path="$new_path"
23793  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23794    unix_path=`$CYGPATH -u "$windows_path"`
23795    new_path="$unix_path"
23796  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23797    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23798    new_path="$unix_path"
23799  fi
23800
23801  if test "x$path" != "x$new_path"; then
23802    BOOT_JDK="$new_path"
23803    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23804$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23805  fi
23806
23807  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23808  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23809
23810    else
23811      # We're on a unix platform. Hooray! :)
23812      path="$BOOT_JDK"
23813      has_space=`$ECHO "$path" | $GREP " "`
23814      if test "x$has_space" != x; then
23815        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23816$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23817        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23818      fi
23819
23820      # Use eval to expand a potential ~
23821      eval path="$path"
23822      if test ! -f "$path" && test ! -d "$path"; then
23823        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23824      fi
23825
23826      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23827    fi
23828  fi
23829
23830            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23831$as_echo_n "checking for Boot JDK... " >&6; }
23832            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23833$as_echo "$BOOT_JDK" >&6; }
23834            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23835$as_echo_n "checking Boot JDK version... " >&6; }
23836            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23837            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23838$as_echo "$BOOT_JDK_VERSION" >&6; }
23839          fi # end check jdk version
23840        fi # end check javac
23841      fi # end check java
23842    fi # end check boot jdk found
23843  fi
23844
23845
23846  if test "x$BOOT_JDK_FOUND" = xno; then
23847    # Now execute the test
23848
23849  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
23850  BOOT_JDK_SUFFIX=""
23851  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23852  if test "x$ALL_JDKS_FOUND" != x; then
23853    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23854
23855  if test "x$BOOT_JDK_FOUND" = xno; then
23856    # Now execute the test
23857
23858        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23859        if test -d "$BOOT_JDK"; then
23860          BOOT_JDK_FOUND=maybe
23861          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23862$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23863        fi
23864
23865
23866    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23867    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23868      # Do we have a bin/java?
23869      if test ! -x "$BOOT_JDK/bin/java"; then
23870        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23871$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23872        BOOT_JDK_FOUND=no
23873      else
23874        # Do we have a bin/javac?
23875        if test ! -x "$BOOT_JDK/bin/javac"; then
23876          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23877$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23878          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23879$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23880          BOOT_JDK_FOUND=no
23881        else
23882          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23883          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23884
23885          # Extra M4 quote needed to protect [] in grep expression.
23886          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23887          if test "x$FOUND_CORRECT_VERSION" = x; then
23888            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23889$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23890            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23891$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23892            BOOT_JDK_FOUND=no
23893          else
23894            # We're done! :-)
23895            BOOT_JDK_FOUND=yes
23896
23897  # Only process if variable expands to non-empty
23898
23899  if test "x$BOOT_JDK" != x; then
23900    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23901
23902  # Input might be given as Windows format, start by converting to
23903  # unix format.
23904  path="$BOOT_JDK"
23905  new_path=`$CYGPATH -u "$path"`
23906
23907  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23908  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23909  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23910  # "foo.exe" is OK but "foo" is an error.
23911  #
23912  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23913  # It is also a way to make sure we got the proper file name for the real test later on.
23914  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23915  if test "x$test_shortpath" = x; then
23916    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23917$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23918    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23919  fi
23920
23921  # Call helper function which possibly converts this using DOS-style short mode.
23922  # If so, the updated path is stored in $new_path.
23923
23924  input_path="$new_path"
23925  # Check if we need to convert this using DOS-style short mode. If the path
23926  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23927  # take no chances and rewrite it.
23928  # Note: m4 eats our [], so we need to use [ and ] instead.
23929  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23930  if test "x$has_forbidden_chars" != x; then
23931    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23932    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23933    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23934    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23935      # Going to short mode and back again did indeed matter. Since short mode is
23936      # case insensitive, let's make it lowercase to improve readability.
23937      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23938      # Now convert it back to Unix-style (cygpath)
23939      input_path=`$CYGPATH -u "$shortmode_path"`
23940      new_path="$input_path"
23941    fi
23942  fi
23943
23944  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23945  if test "x$test_cygdrive_prefix" = x; then
23946    # As a simple fix, exclude /usr/bin since it's not a real path.
23947    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23948      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23949      # a path prefixed by /cygdrive for fixpath to work.
23950      new_path="$CYGWIN_ROOT_PATH$input_path"
23951    fi
23952  fi
23953
23954
23955  if test "x$path" != "x$new_path"; then
23956    BOOT_JDK="$new_path"
23957    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23958$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23959  fi
23960
23961    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23962
23963  path="$BOOT_JDK"
23964  has_colon=`$ECHO $path | $GREP ^.:`
23965  new_path="$path"
23966  if test "x$has_colon" = x; then
23967    # Not in mixed or Windows style, start by that.
23968    new_path=`cmd //c echo $path`
23969  fi
23970
23971
23972  input_path="$new_path"
23973  # Check if we need to convert this using DOS-style short mode. If the path
23974  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23975  # take no chances and rewrite it.
23976  # Note: m4 eats our [], so we need to use [ and ] instead.
23977  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23978  if test "x$has_forbidden_chars" != x; then
23979    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23980    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23981  fi
23982
23983
23984  windows_path="$new_path"
23985  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23986    unix_path=`$CYGPATH -u "$windows_path"`
23987    new_path="$unix_path"
23988  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23989    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23990    new_path="$unix_path"
23991  fi
23992
23993  if test "x$path" != "x$new_path"; then
23994    BOOT_JDK="$new_path"
23995    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23996$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23997  fi
23998
23999  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24000  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24001
24002    else
24003      # We're on a unix platform. Hooray! :)
24004      path="$BOOT_JDK"
24005      has_space=`$ECHO "$path" | $GREP " "`
24006      if test "x$has_space" != x; then
24007        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24008$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24009        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24010      fi
24011
24012      # Use eval to expand a potential ~
24013      eval path="$path"
24014      if test ! -f "$path" && test ! -d "$path"; then
24015        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24016      fi
24017
24018      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24019    fi
24020  fi
24021
24022            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24023$as_echo_n "checking for Boot JDK... " >&6; }
24024            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24025$as_echo "$BOOT_JDK" >&6; }
24026            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24027$as_echo_n "checking Boot JDK version... " >&6; }
24028            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24029            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24030$as_echo "$BOOT_JDK_VERSION" >&6; }
24031          fi # end check jdk version
24032        fi # end check javac
24033      fi # end check java
24034    fi # end check boot jdk found
24035  fi
24036
24037    done
24038  fi
24039
24040
24041    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24042    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24043      # Do we have a bin/java?
24044      if test ! -x "$BOOT_JDK/bin/java"; then
24045        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24046$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24047        BOOT_JDK_FOUND=no
24048      else
24049        # Do we have a bin/javac?
24050        if test ! -x "$BOOT_JDK/bin/javac"; then
24051          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24052$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24053          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24054$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24055          BOOT_JDK_FOUND=no
24056        else
24057          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24058          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24059
24060          # Extra M4 quote needed to protect [] in grep expression.
24061          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24062          if test "x$FOUND_CORRECT_VERSION" = x; then
24063            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24064$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24065            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24066$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24067            BOOT_JDK_FOUND=no
24068          else
24069            # We're done! :-)
24070            BOOT_JDK_FOUND=yes
24071
24072  # Only process if variable expands to non-empty
24073
24074  if test "x$BOOT_JDK" != x; then
24075    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24076
24077  # Input might be given as Windows format, start by converting to
24078  # unix format.
24079  path="$BOOT_JDK"
24080  new_path=`$CYGPATH -u "$path"`
24081
24082  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24083  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24084  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24085  # "foo.exe" is OK but "foo" is an error.
24086  #
24087  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24088  # It is also a way to make sure we got the proper file name for the real test later on.
24089  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24090  if test "x$test_shortpath" = x; then
24091    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24092$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24093    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24094  fi
24095
24096  # Call helper function which possibly converts this using DOS-style short mode.
24097  # If so, the updated path is stored in $new_path.
24098
24099  input_path="$new_path"
24100  # Check if we need to convert this using DOS-style short mode. If the path
24101  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24102  # take no chances and rewrite it.
24103  # Note: m4 eats our [], so we need to use [ and ] instead.
24104  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24105  if test "x$has_forbidden_chars" != x; then
24106    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24107    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24108    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24109    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24110      # Going to short mode and back again did indeed matter. Since short mode is
24111      # case insensitive, let's make it lowercase to improve readability.
24112      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24113      # Now convert it back to Unix-style (cygpath)
24114      input_path=`$CYGPATH -u "$shortmode_path"`
24115      new_path="$input_path"
24116    fi
24117  fi
24118
24119  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24120  if test "x$test_cygdrive_prefix" = x; then
24121    # As a simple fix, exclude /usr/bin since it's not a real path.
24122    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24123      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24124      # a path prefixed by /cygdrive for fixpath to work.
24125      new_path="$CYGWIN_ROOT_PATH$input_path"
24126    fi
24127  fi
24128
24129
24130  if test "x$path" != "x$new_path"; then
24131    BOOT_JDK="$new_path"
24132    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24133$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24134  fi
24135
24136    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24137
24138  path="$BOOT_JDK"
24139  has_colon=`$ECHO $path | $GREP ^.:`
24140  new_path="$path"
24141  if test "x$has_colon" = x; then
24142    # Not in mixed or Windows style, start by that.
24143    new_path=`cmd //c echo $path`
24144  fi
24145
24146
24147  input_path="$new_path"
24148  # Check if we need to convert this using DOS-style short mode. If the path
24149  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24150  # take no chances and rewrite it.
24151  # Note: m4 eats our [], so we need to use [ and ] instead.
24152  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24153  if test "x$has_forbidden_chars" != x; then
24154    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24155    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24156  fi
24157
24158
24159  windows_path="$new_path"
24160  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24161    unix_path=`$CYGPATH -u "$windows_path"`
24162    new_path="$unix_path"
24163  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24164    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24165    new_path="$unix_path"
24166  fi
24167
24168  if test "x$path" != "x$new_path"; then
24169    BOOT_JDK="$new_path"
24170    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24171$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24172  fi
24173
24174  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24175  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24176
24177    else
24178      # We're on a unix platform. Hooray! :)
24179      path="$BOOT_JDK"
24180      has_space=`$ECHO "$path" | $GREP " "`
24181      if test "x$has_space" != x; then
24182        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24183$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24184        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24185      fi
24186
24187      # Use eval to expand a potential ~
24188      eval path="$path"
24189      if test ! -f "$path" && test ! -d "$path"; then
24190        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24191      fi
24192
24193      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24194    fi
24195  fi
24196
24197            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24198$as_echo_n "checking for Boot JDK... " >&6; }
24199            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24200$as_echo "$BOOT_JDK" >&6; }
24201            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24202$as_echo_n "checking Boot JDK version... " >&6; }
24203            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24204            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24205$as_echo "$BOOT_JDK_VERSION" >&6; }
24206          fi # end check jdk version
24207        fi # end check javac
24208      fi # end check java
24209    fi # end check boot jdk found
24210  fi
24211
24212  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
24213
24214  if test "x$BOOT_JDK_FOUND" = xno; then
24215    # Now execute the test
24216
24217  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
24218  BOOT_JDK_SUFFIX="/Contents/Home"
24219  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24220  if test "x$ALL_JDKS_FOUND" != x; then
24221    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24222
24223  if test "x$BOOT_JDK_FOUND" = xno; then
24224    # Now execute the test
24225
24226        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24227        if test -d "$BOOT_JDK"; then
24228          BOOT_JDK_FOUND=maybe
24229          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24230$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24231        fi
24232
24233
24234    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24235    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24236      # Do we have a bin/java?
24237      if test ! -x "$BOOT_JDK/bin/java"; then
24238        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24239$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24240        BOOT_JDK_FOUND=no
24241      else
24242        # Do we have a bin/javac?
24243        if test ! -x "$BOOT_JDK/bin/javac"; then
24244          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24245$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24246          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24247$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24248          BOOT_JDK_FOUND=no
24249        else
24250          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24251          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24252
24253          # Extra M4 quote needed to protect [] in grep expression.
24254          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24255          if test "x$FOUND_CORRECT_VERSION" = x; then
24256            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24257$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24258            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24259$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24260            BOOT_JDK_FOUND=no
24261          else
24262            # We're done! :-)
24263            BOOT_JDK_FOUND=yes
24264
24265  # Only process if variable expands to non-empty
24266
24267  if test "x$BOOT_JDK" != x; then
24268    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24269
24270  # Input might be given as Windows format, start by converting to
24271  # unix format.
24272  path="$BOOT_JDK"
24273  new_path=`$CYGPATH -u "$path"`
24274
24275  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24276  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24277  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24278  # "foo.exe" is OK but "foo" is an error.
24279  #
24280  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24281  # It is also a way to make sure we got the proper file name for the real test later on.
24282  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24283  if test "x$test_shortpath" = x; then
24284    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24285$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24286    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24287  fi
24288
24289  # Call helper function which possibly converts this using DOS-style short mode.
24290  # If so, the updated path is stored in $new_path.
24291
24292  input_path="$new_path"
24293  # Check if we need to convert this using DOS-style short mode. If the path
24294  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24295  # take no chances and rewrite it.
24296  # Note: m4 eats our [], so we need to use [ and ] instead.
24297  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24298  if test "x$has_forbidden_chars" != x; then
24299    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24300    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24301    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24302    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24303      # Going to short mode and back again did indeed matter. Since short mode is
24304      # case insensitive, let's make it lowercase to improve readability.
24305      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24306      # Now convert it back to Unix-style (cygpath)
24307      input_path=`$CYGPATH -u "$shortmode_path"`
24308      new_path="$input_path"
24309    fi
24310  fi
24311
24312  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24313  if test "x$test_cygdrive_prefix" = x; then
24314    # As a simple fix, exclude /usr/bin since it's not a real path.
24315    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24316      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24317      # a path prefixed by /cygdrive for fixpath to work.
24318      new_path="$CYGWIN_ROOT_PATH$input_path"
24319    fi
24320  fi
24321
24322
24323  if test "x$path" != "x$new_path"; then
24324    BOOT_JDK="$new_path"
24325    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24326$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24327  fi
24328
24329    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24330
24331  path="$BOOT_JDK"
24332  has_colon=`$ECHO $path | $GREP ^.:`
24333  new_path="$path"
24334  if test "x$has_colon" = x; then
24335    # Not in mixed or Windows style, start by that.
24336    new_path=`cmd //c echo $path`
24337  fi
24338
24339
24340  input_path="$new_path"
24341  # Check if we need to convert this using DOS-style short mode. If the path
24342  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24343  # take no chances and rewrite it.
24344  # Note: m4 eats our [], so we need to use [ and ] instead.
24345  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24346  if test "x$has_forbidden_chars" != x; then
24347    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24348    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24349  fi
24350
24351
24352  windows_path="$new_path"
24353  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24354    unix_path=`$CYGPATH -u "$windows_path"`
24355    new_path="$unix_path"
24356  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24357    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24358    new_path="$unix_path"
24359  fi
24360
24361  if test "x$path" != "x$new_path"; then
24362    BOOT_JDK="$new_path"
24363    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24364$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24365  fi
24366
24367  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24368  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24369
24370    else
24371      # We're on a unix platform. Hooray! :)
24372      path="$BOOT_JDK"
24373      has_space=`$ECHO "$path" | $GREP " "`
24374      if test "x$has_space" != x; then
24375        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24376$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24377        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24378      fi
24379
24380      # Use eval to expand a potential ~
24381      eval path="$path"
24382      if test ! -f "$path" && test ! -d "$path"; then
24383        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24384      fi
24385
24386      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24387    fi
24388  fi
24389
24390            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24391$as_echo_n "checking for Boot JDK... " >&6; }
24392            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24393$as_echo "$BOOT_JDK" >&6; }
24394            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24395$as_echo_n "checking Boot JDK version... " >&6; }
24396            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24397            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24398$as_echo "$BOOT_JDK_VERSION" >&6; }
24399          fi # end check jdk version
24400        fi # end check javac
24401      fi # end check java
24402    fi # end check boot jdk found
24403  fi
24404
24405    done
24406  fi
24407
24408
24409    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24410    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24411      # Do we have a bin/java?
24412      if test ! -x "$BOOT_JDK/bin/java"; then
24413        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24414$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24415        BOOT_JDK_FOUND=no
24416      else
24417        # Do we have a bin/javac?
24418        if test ! -x "$BOOT_JDK/bin/javac"; then
24419          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24420$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24421          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24422$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24423          BOOT_JDK_FOUND=no
24424        else
24425          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24426          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24427
24428          # Extra M4 quote needed to protect [] in grep expression.
24429          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24430          if test "x$FOUND_CORRECT_VERSION" = x; then
24431            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24432$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24433            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24434$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24435            BOOT_JDK_FOUND=no
24436          else
24437            # We're done! :-)
24438            BOOT_JDK_FOUND=yes
24439
24440  # Only process if variable expands to non-empty
24441
24442  if test "x$BOOT_JDK" != x; then
24443    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24444
24445  # Input might be given as Windows format, start by converting to
24446  # unix format.
24447  path="$BOOT_JDK"
24448  new_path=`$CYGPATH -u "$path"`
24449
24450  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24451  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24452  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24453  # "foo.exe" is OK but "foo" is an error.
24454  #
24455  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24456  # It is also a way to make sure we got the proper file name for the real test later on.
24457  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24458  if test "x$test_shortpath" = x; then
24459    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24460$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24461    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24462  fi
24463
24464  # Call helper function which possibly converts this using DOS-style short mode.
24465  # If so, the updated path is stored in $new_path.
24466
24467  input_path="$new_path"
24468  # Check if we need to convert this using DOS-style short mode. If the path
24469  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24470  # take no chances and rewrite it.
24471  # Note: m4 eats our [], so we need to use [ and ] instead.
24472  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24473  if test "x$has_forbidden_chars" != x; then
24474    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24475    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24476    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24477    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24478      # Going to short mode and back again did indeed matter. Since short mode is
24479      # case insensitive, let's make it lowercase to improve readability.
24480      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24481      # Now convert it back to Unix-style (cygpath)
24482      input_path=`$CYGPATH -u "$shortmode_path"`
24483      new_path="$input_path"
24484    fi
24485  fi
24486
24487  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24488  if test "x$test_cygdrive_prefix" = x; then
24489    # As a simple fix, exclude /usr/bin since it's not a real path.
24490    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24491      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24492      # a path prefixed by /cygdrive for fixpath to work.
24493      new_path="$CYGWIN_ROOT_PATH$input_path"
24494    fi
24495  fi
24496
24497
24498  if test "x$path" != "x$new_path"; then
24499    BOOT_JDK="$new_path"
24500    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24501$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24502  fi
24503
24504    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24505
24506  path="$BOOT_JDK"
24507  has_colon=`$ECHO $path | $GREP ^.:`
24508  new_path="$path"
24509  if test "x$has_colon" = x; then
24510    # Not in mixed or Windows style, start by that.
24511    new_path=`cmd //c echo $path`
24512  fi
24513
24514
24515  input_path="$new_path"
24516  # Check if we need to convert this using DOS-style short mode. If the path
24517  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24518  # take no chances and rewrite it.
24519  # Note: m4 eats our [], so we need to use [ and ] instead.
24520  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24521  if test "x$has_forbidden_chars" != x; then
24522    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24523    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24524  fi
24525
24526
24527  windows_path="$new_path"
24528  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24529    unix_path=`$CYGPATH -u "$windows_path"`
24530    new_path="$unix_path"
24531  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24532    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24533    new_path="$unix_path"
24534  fi
24535
24536  if test "x$path" != "x$new_path"; then
24537    BOOT_JDK="$new_path"
24538    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24539$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24540  fi
24541
24542  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24543  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24544
24545    else
24546      # We're on a unix platform. Hooray! :)
24547      path="$BOOT_JDK"
24548      has_space=`$ECHO "$path" | $GREP " "`
24549      if test "x$has_space" != x; then
24550        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24551$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24552        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24553      fi
24554
24555      # Use eval to expand a potential ~
24556      eval path="$path"
24557      if test ! -f "$path" && test ! -d "$path"; then
24558        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24559      fi
24560
24561      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24562    fi
24563  fi
24564
24565            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24566$as_echo_n "checking for Boot JDK... " >&6; }
24567            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24568$as_echo "$BOOT_JDK" >&6; }
24569            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24570$as_echo_n "checking Boot JDK version... " >&6; }
24571            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24572            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24573$as_echo "$BOOT_JDK_VERSION" >&6; }
24574          fi # end check jdk version
24575        fi # end check javac
24576      fi # end check java
24577    fi # end check boot jdk found
24578  fi
24579
24580
24581  if test "x$BOOT_JDK_FOUND" = xno; then
24582    # Now execute the test
24583
24584  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
24585  BOOT_JDK_SUFFIX="/Contents/Home"
24586  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24587  if test "x$ALL_JDKS_FOUND" != x; then
24588    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24589
24590  if test "x$BOOT_JDK_FOUND" = xno; then
24591    # Now execute the test
24592
24593        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24594        if test -d "$BOOT_JDK"; then
24595          BOOT_JDK_FOUND=maybe
24596          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24597$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24598        fi
24599
24600
24601    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24602    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24603      # Do we have a bin/java?
24604      if test ! -x "$BOOT_JDK/bin/java"; then
24605        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24606$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24607        BOOT_JDK_FOUND=no
24608      else
24609        # Do we have a bin/javac?
24610        if test ! -x "$BOOT_JDK/bin/javac"; then
24611          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24612$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24613          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24614$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24615          BOOT_JDK_FOUND=no
24616        else
24617          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24618          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24619
24620          # Extra M4 quote needed to protect [] in grep expression.
24621          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24622          if test "x$FOUND_CORRECT_VERSION" = x; then
24623            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24624$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24625            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24626$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24627            BOOT_JDK_FOUND=no
24628          else
24629            # We're done! :-)
24630            BOOT_JDK_FOUND=yes
24631
24632  # Only process if variable expands to non-empty
24633
24634  if test "x$BOOT_JDK" != x; then
24635    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24636
24637  # Input might be given as Windows format, start by converting to
24638  # unix format.
24639  path="$BOOT_JDK"
24640  new_path=`$CYGPATH -u "$path"`
24641
24642  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24643  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24644  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24645  # "foo.exe" is OK but "foo" is an error.
24646  #
24647  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24648  # It is also a way to make sure we got the proper file name for the real test later on.
24649  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24650  if test "x$test_shortpath" = x; then
24651    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24652$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24653    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24654  fi
24655
24656  # Call helper function which possibly converts this using DOS-style short mode.
24657  # If so, the updated path is stored in $new_path.
24658
24659  input_path="$new_path"
24660  # Check if we need to convert this using DOS-style short mode. If the path
24661  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24662  # take no chances and rewrite it.
24663  # Note: m4 eats our [], so we need to use [ and ] instead.
24664  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24665  if test "x$has_forbidden_chars" != x; then
24666    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24667    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24668    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24669    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24670      # Going to short mode and back again did indeed matter. Since short mode is
24671      # case insensitive, let's make it lowercase to improve readability.
24672      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24673      # Now convert it back to Unix-style (cygpath)
24674      input_path=`$CYGPATH -u "$shortmode_path"`
24675      new_path="$input_path"
24676    fi
24677  fi
24678
24679  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24680  if test "x$test_cygdrive_prefix" = x; then
24681    # As a simple fix, exclude /usr/bin since it's not a real path.
24682    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24683      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24684      # a path prefixed by /cygdrive for fixpath to work.
24685      new_path="$CYGWIN_ROOT_PATH$input_path"
24686    fi
24687  fi
24688
24689
24690  if test "x$path" != "x$new_path"; then
24691    BOOT_JDK="$new_path"
24692    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24693$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24694  fi
24695
24696    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24697
24698  path="$BOOT_JDK"
24699  has_colon=`$ECHO $path | $GREP ^.:`
24700  new_path="$path"
24701  if test "x$has_colon" = x; then
24702    # Not in mixed or Windows style, start by that.
24703    new_path=`cmd //c echo $path`
24704  fi
24705
24706
24707  input_path="$new_path"
24708  # Check if we need to convert this using DOS-style short mode. If the path
24709  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24710  # take no chances and rewrite it.
24711  # Note: m4 eats our [], so we need to use [ and ] instead.
24712  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24713  if test "x$has_forbidden_chars" != x; then
24714    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24715    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24716  fi
24717
24718
24719  windows_path="$new_path"
24720  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24721    unix_path=`$CYGPATH -u "$windows_path"`
24722    new_path="$unix_path"
24723  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24724    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24725    new_path="$unix_path"
24726  fi
24727
24728  if test "x$path" != "x$new_path"; then
24729    BOOT_JDK="$new_path"
24730    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24731$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24732  fi
24733
24734  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24735  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24736
24737    else
24738      # We're on a unix platform. Hooray! :)
24739      path="$BOOT_JDK"
24740      has_space=`$ECHO "$path" | $GREP " "`
24741      if test "x$has_space" != x; then
24742        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24743$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24744        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24745      fi
24746
24747      # Use eval to expand a potential ~
24748      eval path="$path"
24749      if test ! -f "$path" && test ! -d "$path"; then
24750        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24751      fi
24752
24753      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24754    fi
24755  fi
24756
24757            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24758$as_echo_n "checking for Boot JDK... " >&6; }
24759            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24760$as_echo "$BOOT_JDK" >&6; }
24761            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24762$as_echo_n "checking Boot JDK version... " >&6; }
24763            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24764            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24765$as_echo "$BOOT_JDK_VERSION" >&6; }
24766          fi # end check jdk version
24767        fi # end check javac
24768      fi # end check java
24769    fi # end check boot jdk found
24770  fi
24771
24772    done
24773  fi
24774
24775
24776    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24777    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24778      # Do we have a bin/java?
24779      if test ! -x "$BOOT_JDK/bin/java"; then
24780        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24781$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24782        BOOT_JDK_FOUND=no
24783      else
24784        # Do we have a bin/javac?
24785        if test ! -x "$BOOT_JDK/bin/javac"; then
24786          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24787$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24788          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24789$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24790          BOOT_JDK_FOUND=no
24791        else
24792          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24793          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24794
24795          # Extra M4 quote needed to protect [] in grep expression.
24796          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24797          if test "x$FOUND_CORRECT_VERSION" = x; then
24798            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24799$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24800            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24801$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24802            BOOT_JDK_FOUND=no
24803          else
24804            # We're done! :-)
24805            BOOT_JDK_FOUND=yes
24806
24807  # Only process if variable expands to non-empty
24808
24809  if test "x$BOOT_JDK" != x; then
24810    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24811
24812  # Input might be given as Windows format, start by converting to
24813  # unix format.
24814  path="$BOOT_JDK"
24815  new_path=`$CYGPATH -u "$path"`
24816
24817  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24818  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24819  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24820  # "foo.exe" is OK but "foo" is an error.
24821  #
24822  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24823  # It is also a way to make sure we got the proper file name for the real test later on.
24824  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24825  if test "x$test_shortpath" = x; then
24826    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24827$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24828    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24829  fi
24830
24831  # Call helper function which possibly converts this using DOS-style short mode.
24832  # If so, the updated path is stored in $new_path.
24833
24834  input_path="$new_path"
24835  # Check if we need to convert this using DOS-style short mode. If the path
24836  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24837  # take no chances and rewrite it.
24838  # Note: m4 eats our [], so we need to use [ and ] instead.
24839  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24840  if test "x$has_forbidden_chars" != x; then
24841    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24842    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24843    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24844    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24845      # Going to short mode and back again did indeed matter. Since short mode is
24846      # case insensitive, let's make it lowercase to improve readability.
24847      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24848      # Now convert it back to Unix-style (cygpath)
24849      input_path=`$CYGPATH -u "$shortmode_path"`
24850      new_path="$input_path"
24851    fi
24852  fi
24853
24854  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24855  if test "x$test_cygdrive_prefix" = x; then
24856    # As a simple fix, exclude /usr/bin since it's not a real path.
24857    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24858      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24859      # a path prefixed by /cygdrive for fixpath to work.
24860      new_path="$CYGWIN_ROOT_PATH$input_path"
24861    fi
24862  fi
24863
24864
24865  if test "x$path" != "x$new_path"; then
24866    BOOT_JDK="$new_path"
24867    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24868$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24869  fi
24870
24871    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24872
24873  path="$BOOT_JDK"
24874  has_colon=`$ECHO $path | $GREP ^.:`
24875  new_path="$path"
24876  if test "x$has_colon" = x; then
24877    # Not in mixed or Windows style, start by that.
24878    new_path=`cmd //c echo $path`
24879  fi
24880
24881
24882  input_path="$new_path"
24883  # Check if we need to convert this using DOS-style short mode. If the path
24884  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24885  # take no chances and rewrite it.
24886  # Note: m4 eats our [], so we need to use [ and ] instead.
24887  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24888  if test "x$has_forbidden_chars" != x; then
24889    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24890    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24891  fi
24892
24893
24894  windows_path="$new_path"
24895  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24896    unix_path=`$CYGPATH -u "$windows_path"`
24897    new_path="$unix_path"
24898  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24899    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24900    new_path="$unix_path"
24901  fi
24902
24903  if test "x$path" != "x$new_path"; then
24904    BOOT_JDK="$new_path"
24905    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24906$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24907  fi
24908
24909  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24910  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24911
24912    else
24913      # We're on a unix platform. Hooray! :)
24914      path="$BOOT_JDK"
24915      has_space=`$ECHO "$path" | $GREP " "`
24916      if test "x$has_space" != x; then
24917        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24918$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24919        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24920      fi
24921
24922      # Use eval to expand a potential ~
24923      eval path="$path"
24924      if test ! -f "$path" && test ! -d "$path"; then
24925        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24926      fi
24927
24928      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24929    fi
24930  fi
24931
24932            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24933$as_echo_n "checking for Boot JDK... " >&6; }
24934            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24935$as_echo "$BOOT_JDK" >&6; }
24936            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24937$as_echo_n "checking Boot JDK version... " >&6; }
24938            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24939            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24940$as_echo "$BOOT_JDK_VERSION" >&6; }
24941          fi # end check jdk version
24942        fi # end check javac
24943      fi # end check java
24944    fi # end check boot jdk found
24945  fi
24946
24947  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
24948
24949  if test "x$BOOT_JDK_FOUND" = xno; then
24950    # Now execute the test
24951
24952  BOOT_JDK_PREFIX="/usr/lib/jvm"
24953  BOOT_JDK_SUFFIX=""
24954  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24955  if test "x$ALL_JDKS_FOUND" != x; then
24956    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24957
24958  if test "x$BOOT_JDK_FOUND" = xno; then
24959    # Now execute the test
24960
24961        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24962        if test -d "$BOOT_JDK"; then
24963          BOOT_JDK_FOUND=maybe
24964          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24965$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24966        fi
24967
24968
24969    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24970    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24971      # Do we have a bin/java?
24972      if test ! -x "$BOOT_JDK/bin/java"; then
24973        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24974$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24975        BOOT_JDK_FOUND=no
24976      else
24977        # Do we have a bin/javac?
24978        if test ! -x "$BOOT_JDK/bin/javac"; then
24979          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24980$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24981          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24982$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24983          BOOT_JDK_FOUND=no
24984        else
24985          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24986          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24987
24988          # Extra M4 quote needed to protect [] in grep expression.
24989          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24990          if test "x$FOUND_CORRECT_VERSION" = x; then
24991            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24992$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24993            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24994$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24995            BOOT_JDK_FOUND=no
24996          else
24997            # We're done! :-)
24998            BOOT_JDK_FOUND=yes
24999
25000  # Only process if variable expands to non-empty
25001
25002  if test "x$BOOT_JDK" != x; then
25003    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25004
25005  # Input might be given as Windows format, start by converting to
25006  # unix format.
25007  path="$BOOT_JDK"
25008  new_path=`$CYGPATH -u "$path"`
25009
25010  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25011  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25012  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25013  # "foo.exe" is OK but "foo" is an error.
25014  #
25015  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25016  # It is also a way to make sure we got the proper file name for the real test later on.
25017  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25018  if test "x$test_shortpath" = x; then
25019    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25020$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25021    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25022  fi
25023
25024  # Call helper function which possibly converts this using DOS-style short mode.
25025  # If so, the updated path is stored in $new_path.
25026
25027  input_path="$new_path"
25028  # Check if we need to convert this using DOS-style short mode. If the path
25029  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25030  # take no chances and rewrite it.
25031  # Note: m4 eats our [], so we need to use [ and ] instead.
25032  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25033  if test "x$has_forbidden_chars" != x; then
25034    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25035    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25036    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25037    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25038      # Going to short mode and back again did indeed matter. Since short mode is
25039      # case insensitive, let's make it lowercase to improve readability.
25040      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25041      # Now convert it back to Unix-style (cygpath)
25042      input_path=`$CYGPATH -u "$shortmode_path"`
25043      new_path="$input_path"
25044    fi
25045  fi
25046
25047  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25048  if test "x$test_cygdrive_prefix" = x; then
25049    # As a simple fix, exclude /usr/bin since it's not a real path.
25050    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25051      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25052      # a path prefixed by /cygdrive for fixpath to work.
25053      new_path="$CYGWIN_ROOT_PATH$input_path"
25054    fi
25055  fi
25056
25057
25058  if test "x$path" != "x$new_path"; then
25059    BOOT_JDK="$new_path"
25060    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25061$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25062  fi
25063
25064    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25065
25066  path="$BOOT_JDK"
25067  has_colon=`$ECHO $path | $GREP ^.:`
25068  new_path="$path"
25069  if test "x$has_colon" = x; then
25070    # Not in mixed or Windows style, start by that.
25071    new_path=`cmd //c echo $path`
25072  fi
25073
25074
25075  input_path="$new_path"
25076  # Check if we need to convert this using DOS-style short mode. If the path
25077  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25078  # take no chances and rewrite it.
25079  # Note: m4 eats our [], so we need to use [ and ] instead.
25080  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25081  if test "x$has_forbidden_chars" != x; then
25082    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25083    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25084  fi
25085
25086
25087  windows_path="$new_path"
25088  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25089    unix_path=`$CYGPATH -u "$windows_path"`
25090    new_path="$unix_path"
25091  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25092    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25093    new_path="$unix_path"
25094  fi
25095
25096  if test "x$path" != "x$new_path"; then
25097    BOOT_JDK="$new_path"
25098    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25099$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25100  fi
25101
25102  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25103  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25104
25105    else
25106      # We're on a unix platform. Hooray! :)
25107      path="$BOOT_JDK"
25108      has_space=`$ECHO "$path" | $GREP " "`
25109      if test "x$has_space" != x; then
25110        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25111$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25112        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25113      fi
25114
25115      # Use eval to expand a potential ~
25116      eval path="$path"
25117      if test ! -f "$path" && test ! -d "$path"; then
25118        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25119      fi
25120
25121      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25122    fi
25123  fi
25124
25125            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25126$as_echo_n "checking for Boot JDK... " >&6; }
25127            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25128$as_echo "$BOOT_JDK" >&6; }
25129            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25130$as_echo_n "checking Boot JDK version... " >&6; }
25131            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25132            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25133$as_echo "$BOOT_JDK_VERSION" >&6; }
25134          fi # end check jdk version
25135        fi # end check javac
25136      fi # end check java
25137    fi # end check boot jdk found
25138  fi
25139
25140    done
25141  fi
25142
25143
25144    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25145    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25146      # Do we have a bin/java?
25147      if test ! -x "$BOOT_JDK/bin/java"; then
25148        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25149$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25150        BOOT_JDK_FOUND=no
25151      else
25152        # Do we have a bin/javac?
25153        if test ! -x "$BOOT_JDK/bin/javac"; then
25154          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25155$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25156          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25157$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25158          BOOT_JDK_FOUND=no
25159        else
25160          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25161          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25162
25163          # Extra M4 quote needed to protect [] in grep expression.
25164          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25165          if test "x$FOUND_CORRECT_VERSION" = x; then
25166            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25167$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25168            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25169$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25170            BOOT_JDK_FOUND=no
25171          else
25172            # We're done! :-)
25173            BOOT_JDK_FOUND=yes
25174
25175  # Only process if variable expands to non-empty
25176
25177  if test "x$BOOT_JDK" != x; then
25178    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25179
25180  # Input might be given as Windows format, start by converting to
25181  # unix format.
25182  path="$BOOT_JDK"
25183  new_path=`$CYGPATH -u "$path"`
25184
25185  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25186  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25187  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25188  # "foo.exe" is OK but "foo" is an error.
25189  #
25190  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25191  # It is also a way to make sure we got the proper file name for the real test later on.
25192  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25193  if test "x$test_shortpath" = x; then
25194    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25195$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25196    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25197  fi
25198
25199  # Call helper function which possibly converts this using DOS-style short mode.
25200  # If so, the updated path is stored in $new_path.
25201
25202  input_path="$new_path"
25203  # Check if we need to convert this using DOS-style short mode. If the path
25204  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25205  # take no chances and rewrite it.
25206  # Note: m4 eats our [], so we need to use [ and ] instead.
25207  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25208  if test "x$has_forbidden_chars" != x; then
25209    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25210    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25211    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25212    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25213      # Going to short mode and back again did indeed matter. Since short mode is
25214      # case insensitive, let's make it lowercase to improve readability.
25215      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25216      # Now convert it back to Unix-style (cygpath)
25217      input_path=`$CYGPATH -u "$shortmode_path"`
25218      new_path="$input_path"
25219    fi
25220  fi
25221
25222  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25223  if test "x$test_cygdrive_prefix" = x; then
25224    # As a simple fix, exclude /usr/bin since it's not a real path.
25225    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25226      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25227      # a path prefixed by /cygdrive for fixpath to work.
25228      new_path="$CYGWIN_ROOT_PATH$input_path"
25229    fi
25230  fi
25231
25232
25233  if test "x$path" != "x$new_path"; then
25234    BOOT_JDK="$new_path"
25235    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25236$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25237  fi
25238
25239    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25240
25241  path="$BOOT_JDK"
25242  has_colon=`$ECHO $path | $GREP ^.:`
25243  new_path="$path"
25244  if test "x$has_colon" = x; then
25245    # Not in mixed or Windows style, start by that.
25246    new_path=`cmd //c echo $path`
25247  fi
25248
25249
25250  input_path="$new_path"
25251  # Check if we need to convert this using DOS-style short mode. If the path
25252  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25253  # take no chances and rewrite it.
25254  # Note: m4 eats our [], so we need to use [ and ] instead.
25255  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25256  if test "x$has_forbidden_chars" != x; then
25257    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25258    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25259  fi
25260
25261
25262  windows_path="$new_path"
25263  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25264    unix_path=`$CYGPATH -u "$windows_path"`
25265    new_path="$unix_path"
25266  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25267    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25268    new_path="$unix_path"
25269  fi
25270
25271  if test "x$path" != "x$new_path"; then
25272    BOOT_JDK="$new_path"
25273    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25274$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25275  fi
25276
25277  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25278  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25279
25280    else
25281      # We're on a unix platform. Hooray! :)
25282      path="$BOOT_JDK"
25283      has_space=`$ECHO "$path" | $GREP " "`
25284      if test "x$has_space" != x; then
25285        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25286$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25287        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25288      fi
25289
25290      # Use eval to expand a potential ~
25291      eval path="$path"
25292      if test ! -f "$path" && test ! -d "$path"; then
25293        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25294      fi
25295
25296      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25297    fi
25298  fi
25299
25300            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25301$as_echo_n "checking for Boot JDK... " >&6; }
25302            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25303$as_echo "$BOOT_JDK" >&6; }
25304            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25305$as_echo_n "checking Boot JDK version... " >&6; }
25306            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25307            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25308$as_echo "$BOOT_JDK_VERSION" >&6; }
25309          fi # end check jdk version
25310        fi # end check javac
25311      fi # end check java
25312    fi # end check boot jdk found
25313  fi
25314
25315  fi
25316
25317
25318    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25319    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25320      # Do we have a bin/java?
25321      if test ! -x "$BOOT_JDK/bin/java"; then
25322        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25323$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25324        BOOT_JDK_FOUND=no
25325      else
25326        # Do we have a bin/javac?
25327        if test ! -x "$BOOT_JDK/bin/javac"; then
25328          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25329$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25330          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25331$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25332          BOOT_JDK_FOUND=no
25333        else
25334          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25335          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25336
25337          # Extra M4 quote needed to protect [] in grep expression.
25338          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25339          if test "x$FOUND_CORRECT_VERSION" = x; then
25340            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25341$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25342            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25343$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25344            BOOT_JDK_FOUND=no
25345          else
25346            # We're done! :-)
25347            BOOT_JDK_FOUND=yes
25348
25349  # Only process if variable expands to non-empty
25350
25351  if test "x$BOOT_JDK" != x; then
25352    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25353
25354  # Input might be given as Windows format, start by converting to
25355  # unix format.
25356  path="$BOOT_JDK"
25357  new_path=`$CYGPATH -u "$path"`
25358
25359  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25360  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25361  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25362  # "foo.exe" is OK but "foo" is an error.
25363  #
25364  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25365  # It is also a way to make sure we got the proper file name for the real test later on.
25366  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25367  if test "x$test_shortpath" = x; then
25368    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25369$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25370    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25371  fi
25372
25373  # Call helper function which possibly converts this using DOS-style short mode.
25374  # If so, the updated path is stored in $new_path.
25375
25376  input_path="$new_path"
25377  # Check if we need to convert this using DOS-style short mode. If the path
25378  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25379  # take no chances and rewrite it.
25380  # Note: m4 eats our [], so we need to use [ and ] instead.
25381  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25382  if test "x$has_forbidden_chars" != x; then
25383    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25384    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25385    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25386    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25387      # Going to short mode and back again did indeed matter. Since short mode is
25388      # case insensitive, let's make it lowercase to improve readability.
25389      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25390      # Now convert it back to Unix-style (cygpath)
25391      input_path=`$CYGPATH -u "$shortmode_path"`
25392      new_path="$input_path"
25393    fi
25394  fi
25395
25396  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25397  if test "x$test_cygdrive_prefix" = x; then
25398    # As a simple fix, exclude /usr/bin since it's not a real path.
25399    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25400      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25401      # a path prefixed by /cygdrive for fixpath to work.
25402      new_path="$CYGWIN_ROOT_PATH$input_path"
25403    fi
25404  fi
25405
25406
25407  if test "x$path" != "x$new_path"; then
25408    BOOT_JDK="$new_path"
25409    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25410$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25411  fi
25412
25413    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25414
25415  path="$BOOT_JDK"
25416  has_colon=`$ECHO $path | $GREP ^.:`
25417  new_path="$path"
25418  if test "x$has_colon" = x; then
25419    # Not in mixed or Windows style, start by that.
25420    new_path=`cmd //c echo $path`
25421  fi
25422
25423
25424  input_path="$new_path"
25425  # Check if we need to convert this using DOS-style short mode. If the path
25426  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25427  # take no chances and rewrite it.
25428  # Note: m4 eats our [], so we need to use [ and ] instead.
25429  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25430  if test "x$has_forbidden_chars" != x; then
25431    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25432    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25433  fi
25434
25435
25436  windows_path="$new_path"
25437  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25438    unix_path=`$CYGPATH -u "$windows_path"`
25439    new_path="$unix_path"
25440  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25441    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25442    new_path="$unix_path"
25443  fi
25444
25445  if test "x$path" != "x$new_path"; then
25446    BOOT_JDK="$new_path"
25447    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25448$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25449  fi
25450
25451  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25452  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25453
25454    else
25455      # We're on a unix platform. Hooray! :)
25456      path="$BOOT_JDK"
25457      has_space=`$ECHO "$path" | $GREP " "`
25458      if test "x$has_space" != x; then
25459        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25460$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25461        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25462      fi
25463
25464      # Use eval to expand a potential ~
25465      eval path="$path"
25466      if test ! -f "$path" && test ! -d "$path"; then
25467        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25468      fi
25469
25470      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25471    fi
25472  fi
25473
25474            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25475$as_echo_n "checking for Boot JDK... " >&6; }
25476            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25477$as_echo "$BOOT_JDK" >&6; }
25478            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25479$as_echo_n "checking Boot JDK version... " >&6; }
25480            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25481            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25482$as_echo "$BOOT_JDK_VERSION" >&6; }
25483          fi # end check jdk version
25484        fi # end check javac
25485      fi # end check java
25486    fi # end check boot jdk found
25487  fi
25488
25489
25490  # If we haven't found anything yet, we've truly lost. Give up.
25491  if test "x$BOOT_JDK_FOUND" = xno; then
25492
25493  # Print a helpful message on how to acquire the necessary build dependency.
25494  # openjdk is the help tag: freetype, cups, pulse, alsa etc
25495  MISSING_DEPENDENCY=openjdk
25496
25497  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25498    cygwin_help $MISSING_DEPENDENCY
25499  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25500    msys_help $MISSING_DEPENDENCY
25501  else
25502    PKGHANDLER_COMMAND=
25503
25504    case $PKGHANDLER in
25505      apt-get)
25506        apt_help     $MISSING_DEPENDENCY ;;
25507      yum)
25508        yum_help     $MISSING_DEPENDENCY ;;
25509      port)
25510        port_help    $MISSING_DEPENDENCY ;;
25511      pkgutil)
25512        pkgutil_help $MISSING_DEPENDENCY ;;
25513      pkgadd)
25514        pkgadd_help  $MISSING_DEPENDENCY ;;
25515    esac
25516
25517    if test "x$PKGHANDLER_COMMAND" != x; then
25518      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
25519    fi
25520  fi
25521
25522    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
25523$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
25524    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
25525$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25526    as_fn_error $? "Cannot continue" "$LINENO" 5
25527  fi
25528
25529
25530
25531  # Setup tools from the Boot JDK.
25532
25533  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25534
25535  # Publish this variable in the help.
25536
25537
25538  if test "x$JAVA" = x; then
25539    # The variable is not set by user, try to locate tool using the code snippet
25540
25541      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25542$as_echo_n "checking for java in Boot JDK... " >&6; }
25543      JAVA=$BOOT_JDK/bin/java
25544      if test ! -x $JAVA; then
25545        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25546$as_echo "not found" >&6; }
25547        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25548$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25549        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25550      fi
25551      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25552$as_echo "ok" >&6; }
25553
25554
25555  else
25556    # The variable is set, but is it from the command line or the environment?
25557
25558    # Try to remove the string !JAVA! from our list.
25559    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
25560    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25561      # If it failed, the variable was not from the command line. Ignore it,
25562      # but warn the user (except for BASH, which is always set by the calling BASH).
25563      if test "xJAVA" != xBASH; then
25564        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
25565$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
25566      fi
25567      # Try to locate tool using the code snippet
25568
25569      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25570$as_echo_n "checking for java in Boot JDK... " >&6; }
25571      JAVA=$BOOT_JDK/bin/java
25572      if test ! -x $JAVA; then
25573        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25574$as_echo "not found" >&6; }
25575        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25576$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25577        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25578      fi
25579      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25580$as_echo "ok" >&6; }
25581
25582
25583    else
25584      # If it succeeded, then it was overridden by the user. We will use it
25585      # for the tool.
25586
25587      # First remove it from the list of overridden variables, so we can test
25588      # for unknown variables in the end.
25589      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25590
25591      # Check if the provided tool contains a complete path.
25592      tool_specified="$JAVA"
25593      tool_basename="${tool_specified##*/}"
25594      if test "x$tool_basename" = "x$tool_specified"; then
25595        # A command without a complete path is provided, search $PATH.
25596        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
25597$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
25598        # Extract the first word of "$tool_basename", so it can be a program name with args.
25599set dummy $tool_basename; ac_word=$2
25600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25601$as_echo_n "checking for $ac_word... " >&6; }
25602if ${ac_cv_path_JAVA+:} false; then :
25603  $as_echo_n "(cached) " >&6
25604else
25605  case $JAVA in
25606  [\\/]* | ?:[\\/]*)
25607  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
25608  ;;
25609  *)
25610  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25611for as_dir in $PATH
25612do
25613  IFS=$as_save_IFS
25614  test -z "$as_dir" && as_dir=.
25615    for ac_exec_ext in '' $ac_executable_extensions; do
25616  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25617    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
25618    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25619    break 2
25620  fi
25621done
25622  done
25623IFS=$as_save_IFS
25624
25625  ;;
25626esac
25627fi
25628JAVA=$ac_cv_path_JAVA
25629if test -n "$JAVA"; then
25630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
25631$as_echo "$JAVA" >&6; }
25632else
25633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25634$as_echo "no" >&6; }
25635fi
25636
25637
25638        if test "x$JAVA" = x; then
25639          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25640        fi
25641      else
25642        # Otherwise we believe it is a complete path. Use it as it is.
25643        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
25644$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
25645        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
25646$as_echo_n "checking for JAVA... " >&6; }
25647        if test ! -x "$tool_specified"; then
25648          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25649$as_echo "not found" >&6; }
25650          as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
25651        fi
25652        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25653$as_echo "$tool_specified" >&6; }
25654      fi
25655    fi
25656  fi
25657
25658
25659
25660  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25661
25662  # Publish this variable in the help.
25663
25664
25665  if test "x$JAVAC" = x; then
25666    # The variable is not set by user, try to locate tool using the code snippet
25667
25668      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25669$as_echo_n "checking for javac in Boot JDK... " >&6; }
25670      JAVAC=$BOOT_JDK/bin/javac
25671      if test ! -x $JAVAC; then
25672        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25673$as_echo "not found" >&6; }
25674        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25675$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25676        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25677      fi
25678      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25679$as_echo "ok" >&6; }
25680
25681
25682  else
25683    # The variable is set, but is it from the command line or the environment?
25684
25685    # Try to remove the string !JAVAC! from our list.
25686    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
25687    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25688      # If it failed, the variable was not from the command line. Ignore it,
25689      # but warn the user (except for BASH, which is always set by the calling BASH).
25690      if test "xJAVAC" != xBASH; then
25691        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
25692$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
25693      fi
25694      # Try to locate tool using the code snippet
25695
25696      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25697$as_echo_n "checking for javac in Boot JDK... " >&6; }
25698      JAVAC=$BOOT_JDK/bin/javac
25699      if test ! -x $JAVAC; then
25700        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25701$as_echo "not found" >&6; }
25702        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25703$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25704        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25705      fi
25706      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25707$as_echo "ok" >&6; }
25708
25709
25710    else
25711      # If it succeeded, then it was overridden by the user. We will use it
25712      # for the tool.
25713
25714      # First remove it from the list of overridden variables, so we can test
25715      # for unknown variables in the end.
25716      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25717
25718      # Check if the provided tool contains a complete path.
25719      tool_specified="$JAVAC"
25720      tool_basename="${tool_specified##*/}"
25721      if test "x$tool_basename" = "x$tool_specified"; then
25722        # A command without a complete path is provided, search $PATH.
25723        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
25724$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
25725        # Extract the first word of "$tool_basename", so it can be a program name with args.
25726set dummy $tool_basename; ac_word=$2
25727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25728$as_echo_n "checking for $ac_word... " >&6; }
25729if ${ac_cv_path_JAVAC+:} false; then :
25730  $as_echo_n "(cached) " >&6
25731else
25732  case $JAVAC in
25733  [\\/]* | ?:[\\/]*)
25734  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
25735  ;;
25736  *)
25737  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25738for as_dir in $PATH
25739do
25740  IFS=$as_save_IFS
25741  test -z "$as_dir" && as_dir=.
25742    for ac_exec_ext in '' $ac_executable_extensions; do
25743  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25744    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
25745    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25746    break 2
25747  fi
25748done
25749  done
25750IFS=$as_save_IFS
25751
25752  ;;
25753esac
25754fi
25755JAVAC=$ac_cv_path_JAVAC
25756if test -n "$JAVAC"; then
25757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
25758$as_echo "$JAVAC" >&6; }
25759else
25760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25761$as_echo "no" >&6; }
25762fi
25763
25764
25765        if test "x$JAVAC" = x; then
25766          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25767        fi
25768      else
25769        # Otherwise we believe it is a complete path. Use it as it is.
25770        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
25771$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
25772        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
25773$as_echo_n "checking for JAVAC... " >&6; }
25774        if test ! -x "$tool_specified"; then
25775          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25776$as_echo "not found" >&6; }
25777          as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
25778        fi
25779        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25780$as_echo "$tool_specified" >&6; }
25781      fi
25782    fi
25783  fi
25784
25785
25786
25787  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25788
25789  # Publish this variable in the help.
25790
25791
25792  if test "x$JAVAH" = x; then
25793    # The variable is not set by user, try to locate tool using the code snippet
25794
25795      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25796$as_echo_n "checking for javah in Boot JDK... " >&6; }
25797      JAVAH=$BOOT_JDK/bin/javah
25798      if test ! -x $JAVAH; then
25799        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25800$as_echo "not found" >&6; }
25801        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25802$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25803        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25804      fi
25805      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25806$as_echo "ok" >&6; }
25807
25808
25809  else
25810    # The variable is set, but is it from the command line or the environment?
25811
25812    # Try to remove the string !JAVAH! from our list.
25813    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
25814    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25815      # If it failed, the variable was not from the command line. Ignore it,
25816      # but warn the user (except for BASH, which is always set by the calling BASH).
25817      if test "xJAVAH" != xBASH; then
25818        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
25819$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
25820      fi
25821      # Try to locate tool using the code snippet
25822
25823      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25824$as_echo_n "checking for javah in Boot JDK... " >&6; }
25825      JAVAH=$BOOT_JDK/bin/javah
25826      if test ! -x $JAVAH; then
25827        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25828$as_echo "not found" >&6; }
25829        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25830$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25831        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25832      fi
25833      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25834$as_echo "ok" >&6; }
25835
25836
25837    else
25838      # If it succeeded, then it was overridden by the user. We will use it
25839      # for the tool.
25840
25841      # First remove it from the list of overridden variables, so we can test
25842      # for unknown variables in the end.
25843      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25844
25845      # Check if the provided tool contains a complete path.
25846      tool_specified="$JAVAH"
25847      tool_basename="${tool_specified##*/}"
25848      if test "x$tool_basename" = "x$tool_specified"; then
25849        # A command without a complete path is provided, search $PATH.
25850        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
25851$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
25852        # Extract the first word of "$tool_basename", so it can be a program name with args.
25853set dummy $tool_basename; ac_word=$2
25854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25855$as_echo_n "checking for $ac_word... " >&6; }
25856if ${ac_cv_path_JAVAH+:} false; then :
25857  $as_echo_n "(cached) " >&6
25858else
25859  case $JAVAH in
25860  [\\/]* | ?:[\\/]*)
25861  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
25862  ;;
25863  *)
25864  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25865for as_dir in $PATH
25866do
25867  IFS=$as_save_IFS
25868  test -z "$as_dir" && as_dir=.
25869    for ac_exec_ext in '' $ac_executable_extensions; do
25870  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25871    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
25872    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25873    break 2
25874  fi
25875done
25876  done
25877IFS=$as_save_IFS
25878
25879  ;;
25880esac
25881fi
25882JAVAH=$ac_cv_path_JAVAH
25883if test -n "$JAVAH"; then
25884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
25885$as_echo "$JAVAH" >&6; }
25886else
25887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25888$as_echo "no" >&6; }
25889fi
25890
25891
25892        if test "x$JAVAH" = x; then
25893          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25894        fi
25895      else
25896        # Otherwise we believe it is a complete path. Use it as it is.
25897        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
25898$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
25899        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
25900$as_echo_n "checking for JAVAH... " >&6; }
25901        if test ! -x "$tool_specified"; then
25902          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25903$as_echo "not found" >&6; }
25904          as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
25905        fi
25906        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25907$as_echo "$tool_specified" >&6; }
25908      fi
25909    fi
25910  fi
25911
25912
25913
25914  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25915
25916  # Publish this variable in the help.
25917
25918
25919  if test "x$JAR" = x; then
25920    # The variable is not set by user, try to locate tool using the code snippet
25921
25922      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25923$as_echo_n "checking for jar in Boot JDK... " >&6; }
25924      JAR=$BOOT_JDK/bin/jar
25925      if test ! -x $JAR; then
25926        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25927$as_echo "not found" >&6; }
25928        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25929$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25930        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25931      fi
25932      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25933$as_echo "ok" >&6; }
25934
25935
25936  else
25937    # The variable is set, but is it from the command line or the environment?
25938
25939    # Try to remove the string !JAR! from our list.
25940    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
25941    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25942      # If it failed, the variable was not from the command line. Ignore it,
25943      # but warn the user (except for BASH, which is always set by the calling BASH).
25944      if test "xJAR" != xBASH; then
25945        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
25946$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
25947      fi
25948      # Try to locate tool using the code snippet
25949
25950      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25951$as_echo_n "checking for jar in Boot JDK... " >&6; }
25952      JAR=$BOOT_JDK/bin/jar
25953      if test ! -x $JAR; then
25954        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25955$as_echo "not found" >&6; }
25956        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25957$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25958        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25959      fi
25960      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25961$as_echo "ok" >&6; }
25962
25963
25964    else
25965      # If it succeeded, then it was overridden by the user. We will use it
25966      # for the tool.
25967
25968      # First remove it from the list of overridden variables, so we can test
25969      # for unknown variables in the end.
25970      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25971
25972      # Check if the provided tool contains a complete path.
25973      tool_specified="$JAR"
25974      tool_basename="${tool_specified##*/}"
25975      if test "x$tool_basename" = "x$tool_specified"; then
25976        # A command without a complete path is provided, search $PATH.
25977        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
25978$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
25979        # Extract the first word of "$tool_basename", so it can be a program name with args.
25980set dummy $tool_basename; ac_word=$2
25981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25982$as_echo_n "checking for $ac_word... " >&6; }
25983if ${ac_cv_path_JAR+:} false; then :
25984  $as_echo_n "(cached) " >&6
25985else
25986  case $JAR in
25987  [\\/]* | ?:[\\/]*)
25988  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
25989  ;;
25990  *)
25991  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25992for as_dir in $PATH
25993do
25994  IFS=$as_save_IFS
25995  test -z "$as_dir" && as_dir=.
25996    for ac_exec_ext in '' $ac_executable_extensions; do
25997  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25998    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
25999    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26000    break 2
26001  fi
26002done
26003  done
26004IFS=$as_save_IFS
26005
26006  ;;
26007esac
26008fi
26009JAR=$ac_cv_path_JAR
26010if test -n "$JAR"; then
26011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
26012$as_echo "$JAR" >&6; }
26013else
26014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26015$as_echo "no" >&6; }
26016fi
26017
26018
26019        if test "x$JAR" = x; then
26020          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26021        fi
26022      else
26023        # Otherwise we believe it is a complete path. Use it as it is.
26024        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
26025$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
26026        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
26027$as_echo_n "checking for JAR... " >&6; }
26028        if test ! -x "$tool_specified"; then
26029          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26030$as_echo "not found" >&6; }
26031          as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
26032        fi
26033        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26034$as_echo "$tool_specified" >&6; }
26035      fi
26036    fi
26037  fi
26038
26039
26040
26041  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26042
26043  # Publish this variable in the help.
26044
26045
26046  if test "x$JARSIGNER" = x; then
26047    # The variable is not set by user, try to locate tool using the code snippet
26048
26049      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
26050$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
26051      JARSIGNER=$BOOT_JDK/bin/jarsigner
26052      if test ! -x $JARSIGNER; then
26053        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26054$as_echo "not found" >&6; }
26055        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26056$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26057        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
26058      fi
26059      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26060$as_echo "ok" >&6; }
26061
26062
26063  else
26064    # The variable is set, but is it from the command line or the environment?
26065
26066    # Try to remove the string !JARSIGNER! from our list.
26067    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
26068    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26069      # If it failed, the variable was not from the command line. Ignore it,
26070      # but warn the user (except for BASH, which is always set by the calling BASH).
26071      if test "xJARSIGNER" != xBASH; then
26072        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
26073$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
26074      fi
26075      # Try to locate tool using the code snippet
26076
26077      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
26078$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
26079      JARSIGNER=$BOOT_JDK/bin/jarsigner
26080      if test ! -x $JARSIGNER; then
26081        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26082$as_echo "not found" >&6; }
26083        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26084$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26085        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
26086      fi
26087      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26088$as_echo "ok" >&6; }
26089
26090
26091    else
26092      # If it succeeded, then it was overridden by the user. We will use it
26093      # for the tool.
26094
26095      # First remove it from the list of overridden variables, so we can test
26096      # for unknown variables in the end.
26097      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26098
26099      # Check if the provided tool contains a complete path.
26100      tool_specified="$JARSIGNER"
26101      tool_basename="${tool_specified##*/}"
26102      if test "x$tool_basename" = "x$tool_specified"; then
26103        # A command without a complete path is provided, search $PATH.
26104        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
26105$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
26106        # Extract the first word of "$tool_basename", so it can be a program name with args.
26107set dummy $tool_basename; ac_word=$2
26108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26109$as_echo_n "checking for $ac_word... " >&6; }
26110if ${ac_cv_path_JARSIGNER+:} false; then :
26111  $as_echo_n "(cached) " >&6
26112else
26113  case $JARSIGNER in
26114  [\\/]* | ?:[\\/]*)
26115  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
26116  ;;
26117  *)
26118  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26119for as_dir in $PATH
26120do
26121  IFS=$as_save_IFS
26122  test -z "$as_dir" && as_dir=.
26123    for ac_exec_ext in '' $ac_executable_extensions; do
26124  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26125    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
26126    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26127    break 2
26128  fi
26129done
26130  done
26131IFS=$as_save_IFS
26132
26133  ;;
26134esac
26135fi
26136JARSIGNER=$ac_cv_path_JARSIGNER
26137if test -n "$JARSIGNER"; then
26138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
26139$as_echo "$JARSIGNER" >&6; }
26140else
26141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26142$as_echo "no" >&6; }
26143fi
26144
26145
26146        if test "x$JARSIGNER" = x; then
26147          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26148        fi
26149      else
26150        # Otherwise we believe it is a complete path. Use it as it is.
26151        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
26152$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
26153        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
26154$as_echo_n "checking for JARSIGNER... " >&6; }
26155        if test ! -x "$tool_specified"; then
26156          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26157$as_echo "not found" >&6; }
26158          as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
26159        fi
26160        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26161$as_echo "$tool_specified" >&6; }
26162      fi
26163    fi
26164  fi
26165
26166
26167
26168  # Finally, set some other options...
26169
26170  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
26171  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
26172
26173
26174
26175
26176###############################################################################
26177#
26178# Configure the sources to use. We can add or override individual directories.
26179#
26180###############################################################################
26181
26182
26183  # Where are the sources. Any of these can be overridden
26184  # using --with-override-corba and the likes.
26185  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
26186  CORBA_TOPDIR="$SRC_ROOT/corba"
26187  JAXP_TOPDIR="$SRC_ROOT/jaxp"
26188  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
26189  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
26190  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
26191  JDK_TOPDIR="$SRC_ROOT/jdk"
26192
26193
26194
26195
26196
26197
26198
26199
26200
26201
26202  ###############################################################################
26203  #
26204  # Pickup additional source for a component from outside of the source root
26205  # or override source for a component.
26206  #
26207
26208# Check whether --with-add-source-root was given.
26209if test "${with_add_source_root+set}" = set; then :
26210  withval=$with_add_source_root;
26211fi
26212
26213
26214
26215# Check whether --with-override-source-root was given.
26216if test "${with_override_source_root+set}" = set; then :
26217  withval=$with_override_source_root;
26218fi
26219
26220
26221
26222# Check whether --with-adds-and-overrides was given.
26223if test "${with_adds_and_overrides+set}" = set; then :
26224  withval=$with_adds_and_overrides;
26225fi
26226
26227
26228  if test "x$with_adds_and_overrides" != x; then
26229    with_add_source_root="$with_adds_and_overrides/adds"
26230    with_override_source_root="$with_adds_and_overrides/overrides"
26231  fi
26232
26233  if test "x$with_add_source_root" != x; then
26234    if ! test -d $with_add_source_root; then
26235      as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
26236    fi
26237    CURDIR="$PWD"
26238    cd "$with_add_source_root"
26239    ADD_SRC_ROOT="`pwd`"
26240    cd "$CURDIR"
26241    # Verify that the addon source root does not have any root makefiles.
26242    # If it does, then it is usually an error, prevent this.
26243    if test -f $with_add_source_root/langtools/make/Makefile; then
26244      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
26245    fi
26246    if test -f $with_add_source_root/corba/make/Makefile; then
26247      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
26248    fi
26249    if test -f $with_add_source_root/jaxp/make/Makefile; then
26250      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
26251    fi
26252    if test -f $with_add_source_root/jaxws/make/Makefile; then
26253      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
26254    fi
26255    if test -f $with_add_source_root/hotspot/make/Makefile; then
26256      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
26257    fi
26258    if test -f $with_add_source_root/nashorn/make/Makefile; then
26259      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
26260    fi
26261    if test -f $with_add_source_root/jdk/make/Makefile; then
26262      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
26263    fi
26264  fi
26265
26266
26267  if test "x$with_override_source_root" != x; then
26268    if ! test -d $with_override_source_root; then
26269      as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
26270    fi
26271    CURDIR="$PWD"
26272    cd "$with_override_source_root"
26273    OVERRIDE_SRC_ROOT="`pwd`"
26274    cd "$CURDIR"
26275    if test -f $with_override_source_root/langtools/make/Makefile; then
26276      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
26277    fi
26278    if test -f $with_override_source_root/corba/make/Makefile; then
26279      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
26280    fi
26281    if test -f $with_override_source_root/jaxp/make/Makefile; then
26282      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
26283    fi
26284    if test -f $with_override_source_root/jaxws/make/Makefile; then
26285      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
26286    fi
26287    if test -f $with_override_source_root/hotspot/make/Makefile; then
26288      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
26289    fi
26290    if test -f $with_override_source_root/nashorn/make/Makefile; then
26291      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
26292    fi
26293    if test -f $with_override_source_root/jdk/make/Makefile; then
26294      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
26295    fi
26296  fi
26297
26298
26299  ###############################################################################
26300  #
26301  # Override a repo completely, this is used for example when you have 3 small
26302  # development sandboxes of the langtools sources and want to avoid having 3 full
26303  # OpenJDK sources checked out on disk.
26304  #
26305  # Assuming that the 3 langtools sandboxes are located here:
26306  # /home/fredrik/sandbox1/langtools
26307  # /home/fredrik/sandbox2/langtools
26308  # /home/fredrik/sandbox3/langtools
26309  #
26310  # From the source root you create build subdirs manually:
26311  #     mkdir -p build1 build2 build3
26312  # in each build directory run:
26313  #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
26314  #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
26315  #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
26316  #
26317
26318
26319# Check whether --with-override-langtools was given.
26320if test "${with_override_langtools+set}" = set; then :
26321  withval=$with_override_langtools;
26322fi
26323
26324
26325
26326# Check whether --with-override-corba was given.
26327if test "${with_override_corba+set}" = set; then :
26328  withval=$with_override_corba;
26329fi
26330
26331
26332
26333# Check whether --with-override-jaxp was given.
26334if test "${with_override_jaxp+set}" = set; then :
26335  withval=$with_override_jaxp;
26336fi
26337
26338
26339
26340# Check whether --with-override-jaxws was given.
26341if test "${with_override_jaxws+set}" = set; then :
26342  withval=$with_override_jaxws;
26343fi
26344
26345
26346
26347# Check whether --with-override-hotspot was given.
26348if test "${with_override_hotspot+set}" = set; then :
26349  withval=$with_override_hotspot;
26350fi
26351
26352
26353
26354# Check whether --with-override-nashorn was given.
26355if test "${with_override_nashorn+set}" = set; then :
26356  withval=$with_override_nashorn;
26357fi
26358
26359
26360
26361# Check whether --with-override-jdk was given.
26362if test "${with_override_jdk+set}" = set; then :
26363  withval=$with_override_jdk;
26364fi
26365
26366
26367  if test "x$with_override_langtools" != x; then
26368    CURDIR="$PWD"
26369    cd "$with_override_langtools"
26370    LANGTOOLS_TOPDIR="`pwd`"
26371    cd "$CURDIR"
26372    if ! test -f $LANGTOOLS_TOPDIR/make/Makefile; then
26373      as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
26374    fi
26375    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
26376$as_echo_n "checking if langtools should be overridden... " >&6; }
26377    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
26378$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
26379  fi
26380  if test "x$with_override_corba" != x; then
26381    CURDIR="$PWD"
26382    cd "$with_override_corba"
26383    CORBA_TOPDIR="`pwd`"
26384    cd "$CURDIR"
26385    if ! test -f $CORBA_TOPDIR/make/Makefile; then
26386      as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
26387    fi
26388    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
26389$as_echo_n "checking if corba should be overridden... " >&6; }
26390    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
26391$as_echo "yes with $CORBA_TOPDIR" >&6; }
26392  fi
26393  if test "x$with_override_jaxp" != x; then
26394    CURDIR="$PWD"
26395    cd "$with_override_jaxp"
26396    JAXP_TOPDIR="`pwd`"
26397    cd "$CURDIR"
26398    if ! test -f $JAXP_TOPDIR/make/Makefile; then
26399      as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
26400    fi
26401    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
26402$as_echo_n "checking if jaxp should be overridden... " >&6; }
26403    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
26404$as_echo "yes with $JAXP_TOPDIR" >&6; }
26405  fi
26406  if test "x$with_override_jaxws" != x; then
26407    CURDIR="$PWD"
26408    cd "$with_override_jaxws"
26409    JAXWS_TOPDIR="`pwd`"
26410    cd "$CURDIR"
26411    if ! test -f $JAXWS_TOPDIR/make/Makefile; then
26412      as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
26413    fi
26414    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
26415$as_echo_n "checking if jaxws should be overridden... " >&6; }
26416    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
26417$as_echo "yes with $JAXWS_TOPDIR" >&6; }
26418  fi
26419  if test "x$with_override_hotspot" != x; then
26420    CURDIR="$PWD"
26421    cd "$with_override_hotspot"
26422    HOTSPOT_TOPDIR="`pwd`"
26423    cd "$CURDIR"
26424    if ! test -f $HOTSPOT_TOPDIR/make/Makefile; then
26425      as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
26426    fi
26427    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
26428$as_echo_n "checking if hotspot should be overridden... " >&6; }
26429    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
26430$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
26431  fi
26432  if test "x$with_override_nashorn" != x; then
26433    CURDIR="$PWD"
26434    cd "$with_override_nashorn"
26435    NASHORN_TOPDIR="`pwd`"
26436    cd "$CURDIR"
26437    if ! test -f $NASHORN_TOPDIR/make/Makefile; then
26438      as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
26439    fi
26440    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
26441$as_echo_n "checking if nashorn should be overridden... " >&6; }
26442    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
26443$as_echo "yes with $NASHORN_TOPDIR" >&6; }
26444  fi
26445  if test "x$with_override_jdk" != x; then
26446    CURDIR="$PWD"
26447    cd "$with_override_jdk"
26448    JDK_TOPDIR="`pwd`"
26449    cd "$CURDIR"
26450    if ! test -f $JDK_TOPDIR/make/Makefile; then
26451      as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
26452    fi
26453    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
26454$as_echo_n "checking if JDK should be overridden... " >&6; }
26455    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
26456$as_echo "yes with $JDK_TOPDIR" >&6; }
26457  fi
26458
26459
26460  BUILD_OUTPUT="$OUTPUT_ROOT"
26461
26462
26463  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
26464  BUILD_HOTSPOT=true
26465
26466
26467
26468# Check whether --with-import-hotspot was given.
26469if test "${with_import_hotspot+set}" = set; then :
26470  withval=$with_import_hotspot;
26471fi
26472
26473  if test "x$with_import_hotspot" != x; then
26474    CURDIR="$PWD"
26475    cd "$with_import_hotspot"
26476    HOTSPOT_DIST="`pwd`"
26477    cd "$CURDIR"
26478    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
26479      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
26480    fi
26481    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
26482$as_echo_n "checking if hotspot should be imported... " >&6; }
26483    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
26484$as_echo "yes from $HOTSPOT_DIST" >&6; }
26485    BUILD_HOTSPOT=false
26486  fi
26487
26488  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
26489
26490
26491###############################################################################
26492#
26493# Setup the toolchain (compilers etc), i.e. tools used to compile and process
26494# native code.
26495#
26496###############################################################################
26497
26498# First determine the toolchain type (compiler family)
26499
26500
26501# Check whether --with-toolchain-type was given.
26502if test "${with_toolchain_type+set}" = set; then :
26503  withval=$with_toolchain_type;
26504fi
26505
26506
26507  # Use indirect variable referencing
26508  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
26509  VALID_TOOLCHAINS=${!toolchain_var_name}
26510
26511  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26512    if test -n "$XCODEBUILD"; then
26513      # On Mac OS X, default toolchain to clang after Xcode 5
26514      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
26515      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
26516      if test $? -ne 0; then
26517        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
26518      fi
26519      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
26520          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
26521          $CUT -f 1 -d .`
26522      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
26523$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
26524      if test $XCODE_MAJOR_VERSION -ge 5; then
26525          DEFAULT_TOOLCHAIN="clang"
26526      else
26527          DEFAULT_TOOLCHAIN="gcc"
26528      fi
26529    else
26530      # If Xcode is not installed, but the command line tools are
26531      # then we can't run xcodebuild. On these systems we should
26532      # default to clang
26533      DEFAULT_TOOLCHAIN="clang"
26534    fi
26535  else
26536    # First toolchain type in the list is the default
26537    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
26538  fi
26539
26540  if test "x$with_toolchain_type" = xlist; then
26541    # List all toolchains
26542    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
26543$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
26544    for toolchain in $VALID_TOOLCHAINS; do
26545      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
26546      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26547      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
26548    done
26549
26550    exit 0
26551  elif test "x$with_toolchain_type" != x; then
26552    # User override; check that it is valid
26553    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
26554      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
26555$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
26556      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
26557$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
26558      as_fn_error $? "Cannot continue." "$LINENO" 5
26559    fi
26560    TOOLCHAIN_TYPE=$with_toolchain_type
26561  else
26562    # No flag given, use default
26563    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
26564  fi
26565
26566
26567  TOOLCHAIN_CC_BINARY_clang="clang"
26568  TOOLCHAIN_CC_BINARY_gcc="gcc"
26569  TOOLCHAIN_CC_BINARY_microsoft="cl"
26570  TOOLCHAIN_CC_BINARY_solstudio="cc"
26571  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
26572
26573  TOOLCHAIN_CXX_BINARY_clang="clang++"
26574  TOOLCHAIN_CXX_BINARY_gcc="g++"
26575  TOOLCHAIN_CXX_BINARY_microsoft="cl"
26576  TOOLCHAIN_CXX_BINARY_solstudio="CC"
26577  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
26578
26579  # Use indirect variable referencing
26580  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
26581  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26582  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
26583  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
26584  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
26585  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
26586
26587
26588  # Define filename patterns
26589  if test "x$OPENJDK_TARGET_OS" = xwindows; then
26590    LIBRARY_PREFIX=
26591    SHARED_LIBRARY_SUFFIX='.dll'
26592    STATIC_LIBRARY_SUFFIX='.lib'
26593    SHARED_LIBRARY='$1.dll'
26594    STATIC_LIBRARY='$1.lib'
26595    OBJ_SUFFIX='.obj'
26596    EXE_SUFFIX='.exe'
26597  else
26598    LIBRARY_PREFIX=lib
26599    SHARED_LIBRARY_SUFFIX='.so'
26600    STATIC_LIBRARY_SUFFIX='.a'
26601    SHARED_LIBRARY='lib$1.so'
26602    STATIC_LIBRARY='lib$1.a'
26603    OBJ_SUFFIX='.o'
26604    EXE_SUFFIX=''
26605    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26606      SHARED_LIBRARY='lib$1.dylib'
26607      SHARED_LIBRARY_SUFFIX='.dylib'
26608    fi
26609  fi
26610
26611
26612
26613
26614
26615
26616
26617
26618
26619
26620  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
26621    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
26622$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
26623  else
26624    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
26625$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
26626  fi
26627
26628
26629# Then detect the actual binaries needed
26630
26631  # FIXME: Is this needed?
26632  ac_ext=cpp
26633ac_cpp='$CXXCPP $CPPFLAGS'
26634ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
26635ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
26636ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26637
26638
26639  # Store the CFLAGS etc passed to the configure script.
26640  ORG_CFLAGS="$CFLAGS"
26641  ORG_CXXFLAGS="$CXXFLAGS"
26642
26643  # autoconf magic only relies on PATH, so update it if tools dir is specified
26644  OLD_PATH="$PATH"
26645
26646  # On Windows, we need to detect the visual studio installation first.
26647  # This will change the PATH, but we need to keep that new PATH even
26648  # after toolchain detection is done, since the compiler (on x86) uses
26649  # it for DLL resolution in runtime.
26650  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
26651      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
26652
26653  # Store path to cygwin link.exe to help excluding it when searching for
26654  # VS linker. This must be done before changing the PATH when looking for VS.
26655  # Extract the first word of "link", so it can be a program name with args.
26656set dummy link; ac_word=$2
26657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26658$as_echo_n "checking for $ac_word... " >&6; }
26659if ${ac_cv_path_CYGWIN_LINK+:} false; then :
26660  $as_echo_n "(cached) " >&6
26661else
26662  case $CYGWIN_LINK in
26663  [\\/]* | ?:[\\/]*)
26664  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
26665  ;;
26666  *)
26667  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26668for as_dir in $PATH
26669do
26670  IFS=$as_save_IFS
26671  test -z "$as_dir" && as_dir=.
26672    for ac_exec_ext in '' $ac_executable_extensions; do
26673  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26674    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
26675    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26676    break 2
26677  fi
26678done
26679  done
26680IFS=$as_save_IFS
26681
26682  ;;
26683esac
26684fi
26685CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
26686if test -n "$CYGWIN_LINK"; then
26687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
26688$as_echo "$CYGWIN_LINK" >&6; }
26689else
26690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26691$as_echo "no" >&6; }
26692fi
26693
26694
26695  if test "x$CYGWIN_LINK" != x; then
26696    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
26697$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
26698    "$CYGWIN_LINK" --version > /dev/null
26699    if test $? -eq 0 ; then
26700      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
26701$as_echo "yes" >&6; }
26702    else
26703      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26704$as_echo "no" >&6; }
26705      # This might be the VS linker. Don't exclude it later on.
26706      CYGWIN_LINK=""
26707    fi
26708  fi
26709
26710  # First-hand choice is to locate and run the vsvars bat file.
26711
26712
26713# Check whether --with-toolchain-version was given.
26714if test "${with_toolchain_version+set}" = set; then :
26715  withval=$with_toolchain_version;
26716fi
26717
26718
26719  if test "x$with_toolchain_version" = xlist; then
26720    # List all toolchains
26721    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
26722$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
26723    for version in $VALID_VS_VERSIONS; do
26724      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
26725      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
26726    done
26727
26728    exit 0
26729  elif test "x$DEVKIT_VS_VERSION" != x; then
26730    VS_VERSION=$DEVKIT_VS_VERSION
26731    TOOLCHAIN_VERSION=$VS_VERSION
26732    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
26733    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
26734    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
26735    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
26736    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26737    VS_PATH="$TOOLCHAIN_PATH:$PATH"
26738
26739    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
26740    # can still be exported as INCLUDE for compiler invocations without
26741    # SYSROOT_CFLAGS
26742    OLDIFS="$IFS"
26743    IFS=";"
26744    for i in $DEVKIT_VS_INCLUDE; do
26745      ipath=$i
26746
26747  unix_path="$ipath"
26748  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26749    windows_path=`$CYGPATH -m "$unix_path"`
26750    ipath="$windows_path"
26751  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26752    windows_path=`cmd //c echo $unix_path`
26753    ipath="$windows_path"
26754  fi
26755
26756      VS_INCLUDE="$VS_INCLUDE;$ipath"
26757    done
26758    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
26759    # as LIB for compiler invocations without SYSROOT_LDFLAGS
26760    for i in $DEVKIT_VS_LIB; do
26761      libpath=$i
26762
26763  unix_path="$libpath"
26764  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26765    windows_path=`$CYGPATH -m "$unix_path"`
26766    libpath="$windows_path"
26767  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26768    windows_path=`cmd //c echo $unix_path`
26769    libpath="$windows_path"
26770  fi
26771
26772      VS_LIB="$VS_LIB;$libpath"
26773    done
26774    IFS="$OLDIFS"
26775
26776    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
26777$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
26778
26779  elif test "x$with_toolchain_version" != x; then
26780    # User override; check that it is valid
26781    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
26782      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
26783$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
26784      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
26785$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
26786      as_fn_error $? "Cannot continue." "$LINENO" 5
26787    fi
26788    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
26789  else
26790    # No flag given, use default
26791    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
26792  fi
26793
26794  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
26795
26796  VS_VERSION="$VS_VERSION"
26797  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
26798  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
26799  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
26800  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
26801
26802  # When using --with-tools-dir, assume it points to the correct and default
26803  # version of Visual Studio or that --with-toolchain-version was also set.
26804  if test "x$with_tools_dir" != x; then
26805
26806  if test "x$VS_ENV_CMD" = x; then
26807    VS_VERSION="${VS_VERSION}"
26808    VS_BASE="$with_tools_dir/../.."
26809    METHOD="--with-tools-dir"
26810
26811    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26812      VCVARSFILE="vc/bin/vcvars32.bat"
26813    else
26814      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26815    fi
26816
26817
26818  windows_path="$VS_BASE"
26819  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26820    unix_path=`$CYGPATH -u "$windows_path"`
26821    VS_BASE="$unix_path"
26822  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26823    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26824    VS_BASE="$unix_path"
26825  fi
26826
26827    if test -d "$VS_BASE"; then
26828      if test -f "$VS_BASE/$VCVARSFILE"; then
26829        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26830$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26831        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26832        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26833        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26834        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26835      else
26836        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26837$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26838        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26839$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26840      fi
26841    fi
26842  fi
26843
26844
26845  if test "x$VS_ENV_CMD" = x; then
26846    VS_VERSION="${VS_VERSION}"
26847    VS_BASE="$with_tools_dir/../../.."
26848    METHOD="--with-tools-dir"
26849
26850    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26851      VCVARSFILE="vc/bin/vcvars32.bat"
26852    else
26853      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26854    fi
26855
26856
26857  windows_path="$VS_BASE"
26858  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26859    unix_path=`$CYGPATH -u "$windows_path"`
26860    VS_BASE="$unix_path"
26861  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26862    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26863    VS_BASE="$unix_path"
26864  fi
26865
26866    if test -d "$VS_BASE"; then
26867      if test -f "$VS_BASE/$VCVARSFILE"; then
26868        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26869$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26870        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26871        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26872        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26873        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26874      else
26875        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26876$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26877        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26878$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26879      fi
26880    fi
26881  fi
26882
26883    if test "x$VS_ENV_CMD" = x; then
26884      # Having specified an argument which is incorrect will produce an instant failure;
26885      # we should not go on looking
26886      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
26887$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
26888      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
26889$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
26890      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
26891$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
26892      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
26893    fi
26894  fi
26895
26896  VS_ENV_CMD=""
26897  VS_ENV_ARGS=""
26898
26899  if test "x$VS_COMNTOOLS" != x; then
26900
26901  if test "x$VS_ENV_CMD" = x; then
26902    VS_VERSION="${VS_VERSION}"
26903    VS_BASE="$VS_COMNTOOLS/../.."
26904    METHOD="$VS_COMNTOOLS_VAR variable"
26905
26906    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26907      VCVARSFILE="vc/bin/vcvars32.bat"
26908    else
26909      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26910    fi
26911
26912
26913  windows_path="$VS_BASE"
26914  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26915    unix_path=`$CYGPATH -u "$windows_path"`
26916    VS_BASE="$unix_path"
26917  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26918    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26919    VS_BASE="$unix_path"
26920  fi
26921
26922    if test -d "$VS_BASE"; then
26923      if test -f "$VS_BASE/$VCVARSFILE"; then
26924        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26925$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26926        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26927        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26928        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26929        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26930      else
26931        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26932$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26933        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26934$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26935      fi
26936    fi
26937  fi
26938
26939  fi
26940  if test "x$PROGRAMFILES" != x; then
26941
26942  if test "x$VS_ENV_CMD" = x; then
26943    VS_VERSION="${VS_VERSION}"
26944    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
26945    METHOD="well-known name"
26946
26947    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26948      VCVARSFILE="vc/bin/vcvars32.bat"
26949    else
26950      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26951    fi
26952
26953
26954  windows_path="$VS_BASE"
26955  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26956    unix_path=`$CYGPATH -u "$windows_path"`
26957    VS_BASE="$unix_path"
26958  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26959    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26960    VS_BASE="$unix_path"
26961  fi
26962
26963    if test -d "$VS_BASE"; then
26964      if test -f "$VS_BASE/$VCVARSFILE"; then
26965        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26966$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26967        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26968        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26969        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26970        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26971      else
26972        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26973$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26974        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26975$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26976      fi
26977    fi
26978  fi
26979
26980  fi
26981  # Work around the insanely named ProgramFiles(x86) env variable
26982  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
26983  if test "x$PROGRAMFILES_X86" != x; then
26984
26985  if test "x$VS_ENV_CMD" = x; then
26986    VS_VERSION="${VS_VERSION}"
26987    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
26988    METHOD="well-known name"
26989
26990    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26991      VCVARSFILE="vc/bin/vcvars32.bat"
26992    else
26993      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26994    fi
26995
26996
26997  windows_path="$VS_BASE"
26998  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26999    unix_path=`$CYGPATH -u "$windows_path"`
27000    VS_BASE="$unix_path"
27001  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27002    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27003    VS_BASE="$unix_path"
27004  fi
27005
27006    if test -d "$VS_BASE"; then
27007      if test -f "$VS_BASE/$VCVARSFILE"; then
27008        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27009$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27010        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27011        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27012        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27013        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27014      else
27015        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27016$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27017        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27018$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27019      fi
27020    fi
27021  fi
27022
27023  fi
27024
27025  if test "x$VS_ENV_CMD" = x; then
27026    VS_VERSION="${VS_VERSION}"
27027    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
27028    METHOD="well-known name"
27029
27030    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27031      VCVARSFILE="vc/bin/vcvars32.bat"
27032    else
27033      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27034    fi
27035
27036
27037  windows_path="$VS_BASE"
27038  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27039    unix_path=`$CYGPATH -u "$windows_path"`
27040    VS_BASE="$unix_path"
27041  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27042    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27043    VS_BASE="$unix_path"
27044  fi
27045
27046    if test -d "$VS_BASE"; then
27047      if test -f "$VS_BASE/$VCVARSFILE"; then
27048        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27049$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27050        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27051        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27052        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27053        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27054      else
27055        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27056$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27057        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27058$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27059      fi
27060    fi
27061  fi
27062
27063
27064  if test "x$VS_ENV_CMD" = x; then
27065    VS_VERSION="${VS_VERSION}"
27066    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
27067    METHOD="well-known name"
27068
27069    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27070      VCVARSFILE="vc/bin/vcvars32.bat"
27071    else
27072      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27073    fi
27074
27075
27076  windows_path="$VS_BASE"
27077  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27078    unix_path=`$CYGPATH -u "$windows_path"`
27079    VS_BASE="$unix_path"
27080  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27081    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27082    VS_BASE="$unix_path"
27083  fi
27084
27085    if test -d "$VS_BASE"; then
27086      if test -f "$VS_BASE/$VCVARSFILE"; then
27087        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27088$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27089        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27090        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27091        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27092        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27093      else
27094        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27095$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27096        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27097$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27098      fi
27099    fi
27100  fi
27101
27102
27103  if test "x$SDK_INSTALL_DIR" != x; then
27104    if test "x$ProgramW6432" != x; then
27105
27106  if test "x$VS_ENV_CMD" = x; then
27107    VS_VERSION="${VS_VERSION}"
27108    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
27109    METHOD="well-known name"
27110
27111  windows_path="$WIN_SDK_BASE"
27112  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27113    unix_path=`$CYGPATH -u "$windows_path"`
27114    WIN_SDK_BASE="$unix_path"
27115  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27116    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27117    WIN_SDK_BASE="$unix_path"
27118  fi
27119
27120    if test -d "$WIN_SDK_BASE"; then
27121      # There have been cases of partial or broken SDK installations. A missing
27122      # lib dir is not going to work.
27123      if test ! -d "$WIN_SDK_BASE/lib"; then
27124        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27125$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27126        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27127$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27128      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27129        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27130$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27131        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27132        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27133          VS_ENV_ARGS="/x86"
27134        else
27135          VS_ENV_ARGS="/x64"
27136        fi
27137        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27138        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27139        # TODO: improve detection for other versions of SDK
27140        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27141      else
27142        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27143$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27144        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27145$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27146      fi
27147    fi
27148  fi
27149
27150    fi
27151    if test "x$PROGRAMW6432" != x; then
27152
27153  if test "x$VS_ENV_CMD" = x; then
27154    VS_VERSION="${VS_VERSION}"
27155    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
27156    METHOD="well-known name"
27157
27158  windows_path="$WIN_SDK_BASE"
27159  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27160    unix_path=`$CYGPATH -u "$windows_path"`
27161    WIN_SDK_BASE="$unix_path"
27162  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27163    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27164    WIN_SDK_BASE="$unix_path"
27165  fi
27166
27167    if test -d "$WIN_SDK_BASE"; then
27168      # There have been cases of partial or broken SDK installations. A missing
27169      # lib dir is not going to work.
27170      if test ! -d "$WIN_SDK_BASE/lib"; then
27171        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27172$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27173        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27174$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27175      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27176        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27177$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27178        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27179        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27180          VS_ENV_ARGS="/x86"
27181        else
27182          VS_ENV_ARGS="/x64"
27183        fi
27184        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27185        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27186        # TODO: improve detection for other versions of SDK
27187        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27188      else
27189        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27190$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27191        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27192$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27193      fi
27194    fi
27195  fi
27196
27197    fi
27198    if test "x$PROGRAMFILES" != x; then
27199
27200  if test "x$VS_ENV_CMD" = x; then
27201    VS_VERSION="${VS_VERSION}"
27202    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
27203    METHOD="well-known name"
27204
27205  windows_path="$WIN_SDK_BASE"
27206  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27207    unix_path=`$CYGPATH -u "$windows_path"`
27208    WIN_SDK_BASE="$unix_path"
27209  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27210    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27211    WIN_SDK_BASE="$unix_path"
27212  fi
27213
27214    if test -d "$WIN_SDK_BASE"; then
27215      # There have been cases of partial or broken SDK installations. A missing
27216      # lib dir is not going to work.
27217      if test ! -d "$WIN_SDK_BASE/lib"; then
27218        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27219$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27220        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27221$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27222      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27223        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27224$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27225        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27226        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27227          VS_ENV_ARGS="/x86"
27228        else
27229          VS_ENV_ARGS="/x64"
27230        fi
27231        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27232        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27233        # TODO: improve detection for other versions of SDK
27234        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27235      else
27236        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27237$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27238        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27239$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27240      fi
27241    fi
27242  fi
27243
27244    fi
27245
27246  if test "x$VS_ENV_CMD" = x; then
27247    VS_VERSION="${VS_VERSION}"
27248    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
27249    METHOD="well-known name"
27250
27251  windows_path="$WIN_SDK_BASE"
27252  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27253    unix_path=`$CYGPATH -u "$windows_path"`
27254    WIN_SDK_BASE="$unix_path"
27255  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27256    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27257    WIN_SDK_BASE="$unix_path"
27258  fi
27259
27260    if test -d "$WIN_SDK_BASE"; then
27261      # There have been cases of partial or broken SDK installations. A missing
27262      # lib dir is not going to work.
27263      if test ! -d "$WIN_SDK_BASE/lib"; then
27264        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27265$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27266        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27267$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27268      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27269        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27270$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27271        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27272        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27273          VS_ENV_ARGS="/x86"
27274        else
27275          VS_ENV_ARGS="/x64"
27276        fi
27277        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27278        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27279        # TODO: improve detection for other versions of SDK
27280        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27281      else
27282        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27283$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27284        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27285$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27286      fi
27287    fi
27288  fi
27289
27290
27291  if test "x$VS_ENV_CMD" = x; then
27292    VS_VERSION="${VS_VERSION}"
27293    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
27294    METHOD="well-known name"
27295
27296  windows_path="$WIN_SDK_BASE"
27297  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27298    unix_path=`$CYGPATH -u "$windows_path"`
27299    WIN_SDK_BASE="$unix_path"
27300  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27301    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27302    WIN_SDK_BASE="$unix_path"
27303  fi
27304
27305    if test -d "$WIN_SDK_BASE"; then
27306      # There have been cases of partial or broken SDK installations. A missing
27307      # lib dir is not going to work.
27308      if test ! -d "$WIN_SDK_BASE/lib"; then
27309        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27310$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27311        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27312$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27313      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27314        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27315$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27316        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27317        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27318          VS_ENV_ARGS="/x86"
27319        else
27320          VS_ENV_ARGS="/x64"
27321        fi
27322        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27323        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27324        # TODO: improve detection for other versions of SDK
27325        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27326      else
27327        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27328$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27329        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27330$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27331      fi
27332    fi
27333  fi
27334
27335  fi
27336
27337    if test "x$VS_ENV_CMD" != x; then
27338      TOOLCHAIN_VERSION=$VS_VERSION
27339      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
27340      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
27341      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
27342      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
27343      # The rest of the variables are already evaled while probing
27344      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
27345$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
27346      break
27347    fi
27348  done
27349
27350
27351  # If we have a devkit, skip all of the below.
27352  if test "x$DEVKIT_VS_VERSION" = x; then
27353    if test "x$VS_ENV_CMD" != x; then
27354      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
27355
27356  # Only process if variable expands to non-empty
27357
27358  if test "x$VS_ENV_CMD" != x; then
27359    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27360
27361  # First separate the path from the arguments. This will split at the first
27362  # space.
27363  complete="$VS_ENV_CMD"
27364  path="${complete%% *}"
27365  tmp="$complete EOL"
27366  arguments="${tmp#* }"
27367
27368  # Input might be given as Windows format, start by converting to
27369  # unix format.
27370  new_path=`$CYGPATH -u "$path"`
27371
27372  # Now try to locate executable using which
27373  new_path=`$WHICH "$new_path" 2> /dev/null`
27374  # bat and cmd files are not always considered executable in cygwin causing which
27375  # to not find them
27376  if test "x$new_path" = x \
27377      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27378      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27379    new_path=`$CYGPATH -u "$path"`
27380  fi
27381  if test "x$new_path" = x; then
27382    # Oops. Which didn't find the executable.
27383    # The splitting of arguments from the executable at a space might have been incorrect,
27384    # since paths with space are more likely in Windows. Give it another try with the whole
27385    # argument.
27386    path="$complete"
27387    arguments="EOL"
27388    new_path=`$CYGPATH -u "$path"`
27389    new_path=`$WHICH "$new_path" 2> /dev/null`
27390    # bat and cmd files are not always considered executable in cygwin causing which
27391    # to not find them
27392    if test "x$new_path" = x \
27393        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27394        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27395      new_path=`$CYGPATH -u "$path"`
27396    fi
27397    if test "x$new_path" = x; then
27398      # It's still not found. Now this is an unrecoverable error.
27399      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27400$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27401      has_space=`$ECHO "$complete" | $GREP " "`
27402      if test "x$has_space" != x; then
27403        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27404$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27405      fi
27406      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27407    fi
27408  fi
27409
27410  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27411  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27412  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27413  # "foo.exe" is OK but "foo" is an error.
27414  #
27415  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27416  # It is also a way to make sure we got the proper file name for the real test later on.
27417  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27418  if test "x$test_shortpath" = x; then
27419    # Short path failed, file does not exist as specified.
27420    # Try adding .exe or .cmd
27421    if test -f "${new_path}.exe"; then
27422      input_to_shortpath="${new_path}.exe"
27423    elif test -f "${new_path}.cmd"; then
27424      input_to_shortpath="${new_path}.cmd"
27425    else
27426      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
27427$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
27428      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27429$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27430      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27431    fi
27432  else
27433    input_to_shortpath="$new_path"
27434  fi
27435
27436  # Call helper function which possibly converts this using DOS-style short mode.
27437  # If so, the updated path is stored in $new_path.
27438  new_path="$input_to_shortpath"
27439
27440  input_path="$input_to_shortpath"
27441  # Check if we need to convert this using DOS-style short mode. If the path
27442  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27443  # take no chances and rewrite it.
27444  # Note: m4 eats our [], so we need to use [ and ] instead.
27445  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27446  if test "x$has_forbidden_chars" != x; then
27447    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27448    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27449    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27450    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27451      # Going to short mode and back again did indeed matter. Since short mode is
27452      # case insensitive, let's make it lowercase to improve readability.
27453      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27454      # Now convert it back to Unix-style (cygpath)
27455      input_path=`$CYGPATH -u "$shortmode_path"`
27456      new_path="$input_path"
27457    fi
27458  fi
27459
27460  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27461  if test "x$test_cygdrive_prefix" = x; then
27462    # As a simple fix, exclude /usr/bin since it's not a real path.
27463    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27464      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27465      # a path prefixed by /cygdrive for fixpath to work.
27466      new_path="$CYGWIN_ROOT_PATH$input_path"
27467    fi
27468  fi
27469
27470  # remove trailing .exe if any
27471  new_path="${new_path/%.exe/}"
27472
27473    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27474
27475  # First separate the path from the arguments. This will split at the first
27476  # space.
27477  complete="$VS_ENV_CMD"
27478  path="${complete%% *}"
27479  tmp="$complete EOL"
27480  arguments="${tmp#* }"
27481
27482  # Input might be given as Windows format, start by converting to
27483  # unix format.
27484  new_path="$path"
27485
27486  windows_path="$new_path"
27487  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27488    unix_path=`$CYGPATH -u "$windows_path"`
27489    new_path="$unix_path"
27490  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27491    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27492    new_path="$unix_path"
27493  fi
27494
27495
27496  # Now try to locate executable using which
27497  new_path=`$WHICH "$new_path" 2> /dev/null`
27498
27499  if test "x$new_path" = x; then
27500    # Oops. Which didn't find the executable.
27501    # The splitting of arguments from the executable at a space might have been incorrect,
27502    # since paths with space are more likely in Windows. Give it another try with the whole
27503    # argument.
27504    path="$complete"
27505    arguments="EOL"
27506    new_path="$path"
27507
27508  windows_path="$new_path"
27509  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27510    unix_path=`$CYGPATH -u "$windows_path"`
27511    new_path="$unix_path"
27512  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27513    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27514    new_path="$unix_path"
27515  fi
27516
27517
27518    new_path=`$WHICH "$new_path" 2> /dev/null`
27519    # bat and cmd files are not always considered executable in MSYS causing which
27520    # to not find them
27521    if test "x$new_path" = x \
27522        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27523        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27524      new_path="$path"
27525
27526  windows_path="$new_path"
27527  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27528    unix_path=`$CYGPATH -u "$windows_path"`
27529    new_path="$unix_path"
27530  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27531    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27532    new_path="$unix_path"
27533  fi
27534
27535    fi
27536
27537    if test "x$new_path" = x; then
27538      # It's still not found. Now this is an unrecoverable error.
27539      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27540$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27541      has_space=`$ECHO "$complete" | $GREP " "`
27542      if test "x$has_space" != x; then
27543        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27544$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27545      fi
27546      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27547    fi
27548  fi
27549
27550  # Now new_path has a complete unix path to the binary
27551  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27552    # Keep paths in /bin as-is, but remove trailing .exe if any
27553    new_path="${new_path/%.exe/}"
27554    # Do not save /bin paths to all_fixpath_prefixes!
27555  else
27556    # Not in mixed or Windows style, start by that.
27557    new_path=`cmd //c echo $new_path`
27558
27559  input_path="$new_path"
27560  # Check if we need to convert this using DOS-style short mode. If the path
27561  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27562  # take no chances and rewrite it.
27563  # Note: m4 eats our [], so we need to use [ and ] instead.
27564  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27565  if test "x$has_forbidden_chars" != x; then
27566    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27567    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27568  fi
27569
27570    # Output is in $new_path
27571
27572  windows_path="$new_path"
27573  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27574    unix_path=`$CYGPATH -u "$windows_path"`
27575    new_path="$unix_path"
27576  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27577    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27578    new_path="$unix_path"
27579  fi
27580
27581    # remove trailing .exe if any
27582    new_path="${new_path/%.exe/}"
27583
27584    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27585    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27586  fi
27587
27588    else
27589      # We're on a unix platform. Hooray! :)
27590      # First separate the path from the arguments. This will split at the first
27591      # space.
27592      complete="$VS_ENV_CMD"
27593      path="${complete%% *}"
27594      tmp="$complete EOL"
27595      arguments="${tmp#* }"
27596
27597      # Cannot rely on the command "which" here since it doesn't always work.
27598      is_absolute_path=`$ECHO "$path" | $GREP ^/`
27599      if test -z "$is_absolute_path"; then
27600        # Path to executable is not absolute. Find it.
27601        IFS_save="$IFS"
27602        IFS=:
27603        for p in $PATH; do
27604          if test -f "$p/$path" && test -x "$p/$path"; then
27605            new_path="$p/$path"
27606            break
27607          fi
27608        done
27609        IFS="$IFS_save"
27610      else
27611        # This is an absolute path, we can use it without further modifications.
27612        new_path="$path"
27613      fi
27614
27615      if test "x$new_path" = x; then
27616        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27617$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27618        has_space=`$ECHO "$complete" | $GREP " "`
27619        if test "x$has_space" != x; then
27620          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27621$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27622        fi
27623        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27624      fi
27625    fi
27626
27627    # Now join together the path and the arguments once again
27628    if test "x$arguments" != xEOL; then
27629      new_complete="$new_path ${arguments% *}"
27630    else
27631      new_complete="$new_path"
27632    fi
27633
27634    if test "x$complete" != "x$new_complete"; then
27635      VS_ENV_CMD="$new_complete"
27636      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
27637$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
27638    fi
27639  fi
27640
27641
27642      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
27643      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
27644$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
27645
27646      # We need to create a couple of temporary files.
27647      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
27648      $MKDIR -p $VS_ENV_TMP_DIR
27649
27650      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
27651      # Instead create a shell script which will set the relevant variables when run.
27652      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
27653
27654  unix_path="$WINPATH_VS_ENV_CMD"
27655  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27656    windows_path=`$CYGPATH -m "$unix_path"`
27657    WINPATH_VS_ENV_CMD="$windows_path"
27658  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27659    windows_path=`cmd //c echo $unix_path`
27660    WINPATH_VS_ENV_CMD="$windows_path"
27661  fi
27662
27663      WINPATH_BASH="$BASH"
27664
27665  unix_path="$WINPATH_BASH"
27666  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27667    windows_path=`$CYGPATH -m "$unix_path"`
27668    WINPATH_BASH="$windows_path"
27669  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27670    windows_path=`cmd //c echo $unix_path`
27671    WINPATH_BASH="$windows_path"
27672  fi
27673
27674
27675      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
27676      # script (executable by bash) that will setup the important variables.
27677      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
27678      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
27679      # This will end up something like:
27680      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
27681      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
27682      # These will end up something like:
27683      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
27684      # The trailing space for everyone except PATH is no typo, but is needed due
27685      # to trailing \ in the Windows paths. These will be stripped later.
27686      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
27687          >> $EXTRACT_VC_ENV_BAT_FILE
27688      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
27689          >> $EXTRACT_VC_ENV_BAT_FILE
27690      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
27691          >> $EXTRACT_VC_ENV_BAT_FILE
27692      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
27693          >> $EXTRACT_VC_ENV_BAT_FILE
27694      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
27695          >> $EXTRACT_VC_ENV_BAT_FILE
27696      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
27697          >> $EXTRACT_VC_ENV_BAT_FILE
27698
27699      # Now execute the newly created bat file.
27700      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
27701      # Change directory so we don't need to mess with Windows paths in redirects.
27702      cd $VS_ENV_TMP_DIR
27703      cmd /c extract-vs-env.bat | $CAT
27704      cd $CURDIR
27705
27706      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
27707        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
27708$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
27709        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27710$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27711        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27712$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27713        as_fn_error $? "Cannot continue" "$LINENO" 5
27714      fi
27715
27716      # Now set all paths and other env variables. This will allow the rest of
27717      # the configure script to find and run the compiler in the proper way.
27718      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
27719$as_echo "$as_me: Setting extracted environment variables" >&6;}
27720      . $VS_ENV_TMP_DIR/set-vs-env.sh
27721      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
27722      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
27723    else
27724      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
27725      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
27726$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
27727    fi
27728  fi
27729
27730  # At this point, we should have correct variables in the environment, or we can't continue.
27731  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
27732$as_echo_n "checking for Visual Studio variables... " >&6; }
27733
27734  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
27735      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
27736    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
27737      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
27738$as_echo "present but broken" >&6; }
27739      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
27740    else
27741      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
27742$as_echo "ok" >&6; }
27743      # Remove any trailing "\" ";" and " " from the variables.
27744      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
27745      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
27746      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
27747      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
27748      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
27749      # Remove any paths containing # (typically F#) as that messes up make. This
27750      # is needed if visual studio was installed with F# support.
27751      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
27752
27753
27754
27755
27756
27757      # Convert VS_INCLUDE into SYSROOT_CFLAGS
27758      OLDIFS="$IFS"
27759      IFS=";"
27760      for i in $VS_INCLUDE; do
27761        ipath=$i
27762        # Only process non-empty elements
27763        if test "x$ipath" != x; then
27764          IFS="$OLDIFS"
27765          # Check that directory exists before calling fixup_path
27766          testpath=$ipath
27767
27768  windows_path="$testpath"
27769  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27770    unix_path=`$CYGPATH -u "$windows_path"`
27771    testpath="$unix_path"
27772  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27773    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27774    testpath="$unix_path"
27775  fi
27776
27777          if test -d "$testpath"; then
27778
27779  # Only process if variable expands to non-empty
27780
27781  if test "x$ipath" != x; then
27782    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27783
27784  # Input might be given as Windows format, start by converting to
27785  # unix format.
27786  path="$ipath"
27787  new_path=`$CYGPATH -u "$path"`
27788
27789  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27790  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27791  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27792  # "foo.exe" is OK but "foo" is an error.
27793  #
27794  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27795  # It is also a way to make sure we got the proper file name for the real test later on.
27796  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27797  if test "x$test_shortpath" = x; then
27798    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
27799$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
27800    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
27801  fi
27802
27803  # Call helper function which possibly converts this using DOS-style short mode.
27804  # If so, the updated path is stored in $new_path.
27805
27806  input_path="$new_path"
27807  # Check if we need to convert this using DOS-style short mode. If the path
27808  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27809  # take no chances and rewrite it.
27810  # Note: m4 eats our [], so we need to use [ and ] instead.
27811  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27812  if test "x$has_forbidden_chars" != x; then
27813    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27814    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27815    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27816    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27817      # Going to short mode and back again did indeed matter. Since short mode is
27818      # case insensitive, let's make it lowercase to improve readability.
27819      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27820      # Now convert it back to Unix-style (cygpath)
27821      input_path=`$CYGPATH -u "$shortmode_path"`
27822      new_path="$input_path"
27823    fi
27824  fi
27825
27826  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27827  if test "x$test_cygdrive_prefix" = x; then
27828    # As a simple fix, exclude /usr/bin since it's not a real path.
27829    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27830      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27831      # a path prefixed by /cygdrive for fixpath to work.
27832      new_path="$CYGWIN_ROOT_PATH$input_path"
27833    fi
27834  fi
27835
27836
27837  if test "x$path" != "x$new_path"; then
27838    ipath="$new_path"
27839    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
27840$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
27841  fi
27842
27843    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27844
27845  path="$ipath"
27846  has_colon=`$ECHO $path | $GREP ^.:`
27847  new_path="$path"
27848  if test "x$has_colon" = x; then
27849    # Not in mixed or Windows style, start by that.
27850    new_path=`cmd //c echo $path`
27851  fi
27852
27853
27854  input_path="$new_path"
27855  # Check if we need to convert this using DOS-style short mode. If the path
27856  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27857  # take no chances and rewrite it.
27858  # Note: m4 eats our [], so we need to use [ and ] instead.
27859  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27860  if test "x$has_forbidden_chars" != x; then
27861    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27862    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27863  fi
27864
27865
27866  windows_path="$new_path"
27867  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27868    unix_path=`$CYGPATH -u "$windows_path"`
27869    new_path="$unix_path"
27870  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27871    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27872    new_path="$unix_path"
27873  fi
27874
27875  if test "x$path" != "x$new_path"; then
27876    ipath="$new_path"
27877    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
27878$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
27879  fi
27880
27881  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27882  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27883
27884    else
27885      # We're on a unix platform. Hooray! :)
27886      path="$ipath"
27887      has_space=`$ECHO "$path" | $GREP " "`
27888      if test "x$has_space" != x; then
27889        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
27890$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
27891        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27892      fi
27893
27894      # Use eval to expand a potential ~
27895      eval path="$path"
27896      if test ! -f "$path" && test ! -d "$path"; then
27897        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
27898      fi
27899
27900      ipath="`cd "$path"; $THEPWDCMD -L`"
27901    fi
27902  fi
27903
27904            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
27905          fi
27906          IFS=";"
27907        fi
27908      done
27909      # Convert VS_LIB into SYSROOT_LDFLAGS
27910      for i in $VS_LIB; do
27911        libpath=$i
27912        # Only process non-empty elements
27913        if test "x$libpath" != x; then
27914          IFS="$OLDIFS"
27915          # Check that directory exists before calling fixup_path
27916          testpath=$libpath
27917
27918  windows_path="$testpath"
27919  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27920    unix_path=`$CYGPATH -u "$windows_path"`
27921    testpath="$unix_path"
27922  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27923    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27924    testpath="$unix_path"
27925  fi
27926
27927          if test -d "$testpath"; then
27928
27929  # Only process if variable expands to non-empty
27930
27931  if test "x$libpath" != x; then
27932    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27933
27934  # Input might be given as Windows format, start by converting to
27935  # unix format.
27936  path="$libpath"
27937  new_path=`$CYGPATH -u "$path"`
27938
27939  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27940  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27941  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27942  # "foo.exe" is OK but "foo" is an error.
27943  #
27944  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27945  # It is also a way to make sure we got the proper file name for the real test later on.
27946  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27947  if test "x$test_shortpath" = x; then
27948    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
27949$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
27950    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
27951  fi
27952
27953  # Call helper function which possibly converts this using DOS-style short mode.
27954  # If so, the updated path is stored in $new_path.
27955
27956  input_path="$new_path"
27957  # Check if we need to convert this using DOS-style short mode. If the path
27958  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27959  # take no chances and rewrite it.
27960  # Note: m4 eats our [], so we need to use [ and ] instead.
27961  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27962  if test "x$has_forbidden_chars" != x; then
27963    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27964    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27965    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27966    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27967      # Going to short mode and back again did indeed matter. Since short mode is
27968      # case insensitive, let's make it lowercase to improve readability.
27969      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27970      # Now convert it back to Unix-style (cygpath)
27971      input_path=`$CYGPATH -u "$shortmode_path"`
27972      new_path="$input_path"
27973    fi
27974  fi
27975
27976  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27977  if test "x$test_cygdrive_prefix" = x; then
27978    # As a simple fix, exclude /usr/bin since it's not a real path.
27979    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27980      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27981      # a path prefixed by /cygdrive for fixpath to work.
27982      new_path="$CYGWIN_ROOT_PATH$input_path"
27983    fi
27984  fi
27985
27986
27987  if test "x$path" != "x$new_path"; then
27988    libpath="$new_path"
27989    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
27990$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
27991  fi
27992
27993    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27994
27995  path="$libpath"
27996  has_colon=`$ECHO $path | $GREP ^.:`
27997  new_path="$path"
27998  if test "x$has_colon" = x; then
27999    # Not in mixed or Windows style, start by that.
28000    new_path=`cmd //c echo $path`
28001  fi
28002
28003
28004  input_path="$new_path"
28005  # Check if we need to convert this using DOS-style short mode. If the path
28006  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28007  # take no chances and rewrite it.
28008  # Note: m4 eats our [], so we need to use [ and ] instead.
28009  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28010  if test "x$has_forbidden_chars" != x; then
28011    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28012    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28013  fi
28014
28015
28016  windows_path="$new_path"
28017  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28018    unix_path=`$CYGPATH -u "$windows_path"`
28019    new_path="$unix_path"
28020  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28021    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28022    new_path="$unix_path"
28023  fi
28024
28025  if test "x$path" != "x$new_path"; then
28026    libpath="$new_path"
28027    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
28028$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
28029  fi
28030
28031  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28032  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28033
28034    else
28035      # We're on a unix platform. Hooray! :)
28036      path="$libpath"
28037      has_space=`$ECHO "$path" | $GREP " "`
28038      if test "x$has_space" != x; then
28039        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
28040$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
28041        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28042      fi
28043
28044      # Use eval to expand a potential ~
28045      eval path="$path"
28046      if test ! -f "$path" && test ! -d "$path"; then
28047        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
28048      fi
28049
28050      libpath="`cd "$path"; $THEPWDCMD -L`"
28051    fi
28052  fi
28053
28054            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
28055          fi
28056          IFS=";"
28057        fi
28058      done
28059      IFS="$OLDIFS"
28060    fi
28061  else
28062    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28063$as_echo "not found" >&6; }
28064
28065    if test "x$VS_ENV_CMD" = x; then
28066      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
28067$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
28068      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
28069$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
28070    else
28071      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
28072$as_echo "$as_me: Running the extraction script failed." >&6;}
28073    fi
28074    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
28075$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
28076    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
28077$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
28078    as_fn_error $? "Cannot continue" "$LINENO" 5
28079  fi
28080
28081    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
28082    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
28083    PATH="$VS_PATH"
28084    # The microsoft toolchain also requires INCLUDE and LIB to be set.
28085    export INCLUDE="$VS_INCLUDE"
28086    export LIB="$VS_LIB"
28087  fi
28088
28089  # For solaris we really need solaris tools, and not the GNU equivalent.
28090  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
28091  # so add that to path before starting to probe.
28092  # FIXME: This was originally only done for AS,NM,GNM,STRIP,OBJCOPY,OBJDUMP.
28093  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
28094    PATH="/usr/ccs/bin:$PATH"
28095  fi
28096
28097  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
28098  # override all other locations.
28099  if test "x$TOOLCHAIN_PATH" != x; then
28100    PATH=$TOOLCHAIN_PATH:$PATH
28101  fi
28102
28103
28104  #
28105  # Setup the compilers (CC and CXX)
28106  #
28107
28108  COMPILER_NAME=C
28109  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
28110
28111  if test "x$CC" != x; then
28112    # User has supplied compiler name already, always let that override.
28113    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
28114$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
28115    if test "x`basename $CC`" = "x$CC"; then
28116      # A command without a complete path is provided, search $PATH.
28117
28118      for ac_prog in $CC
28119do
28120  # Extract the first word of "$ac_prog", so it can be a program name with args.
28121set dummy $ac_prog; ac_word=$2
28122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28123$as_echo_n "checking for $ac_word... " >&6; }
28124if ${ac_cv_path_POTENTIAL_CC+:} false; then :
28125  $as_echo_n "(cached) " >&6
28126else
28127  case $POTENTIAL_CC in
28128  [\\/]* | ?:[\\/]*)
28129  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
28130  ;;
28131  *)
28132  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28133for as_dir in $PATH
28134do
28135  IFS=$as_save_IFS
28136  test -z "$as_dir" && as_dir=.
28137    for ac_exec_ext in '' $ac_executable_extensions; do
28138  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28139    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
28140    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28141    break 2
28142  fi
28143done
28144  done
28145IFS=$as_save_IFS
28146
28147  ;;
28148esac
28149fi
28150POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
28151if test -n "$POTENTIAL_CC"; then
28152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
28153$as_echo "$POTENTIAL_CC" >&6; }
28154else
28155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28156$as_echo "no" >&6; }
28157fi
28158
28159
28160  test -n "$POTENTIAL_CC" && break
28161done
28162
28163      if test "x$POTENTIAL_CC" != x; then
28164        CC=$POTENTIAL_CC
28165      else
28166        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
28167      fi
28168    else
28169      # Otherwise it might already be a complete path
28170      if test ! -x "$CC"; then
28171        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
28172      fi
28173    fi
28174  else
28175    # No user supplied value. Locate compiler ourselves.
28176
28177    # If we are cross compiling, assume cross compilation tools follows the
28178    # cross compilation standard where they are prefixed with the autoconf
28179    # standard name for the target. For example the binary
28180    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
28181    # If we are not cross compiling, then the default compiler name will be
28182    # used.
28183
28184    CC=
28185    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
28186    # before checking the rest of the PATH.
28187    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
28188    # step, this should not be necessary.
28189    if test -n "$TOOLCHAIN_PATH"; then
28190      PATH_save="$PATH"
28191      PATH="$TOOLCHAIN_PATH"
28192      for ac_prog in $SEARCH_LIST
28193do
28194  # Extract the first word of "$ac_prog", so it can be a program name with args.
28195set dummy $ac_prog; ac_word=$2
28196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28197$as_echo_n "checking for $ac_word... " >&6; }
28198if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
28199  $as_echo_n "(cached) " >&6
28200else
28201  case $TOOLCHAIN_PATH_CC in
28202  [\\/]* | ?:[\\/]*)
28203  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
28204  ;;
28205  *)
28206  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28207for as_dir in $PATH
28208do
28209  IFS=$as_save_IFS
28210  test -z "$as_dir" && as_dir=.
28211    for ac_exec_ext in '' $ac_executable_extensions; do
28212  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28213    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
28214    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28215    break 2
28216  fi
28217done
28218  done
28219IFS=$as_save_IFS
28220
28221  ;;
28222esac
28223fi
28224TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
28225if test -n "$TOOLCHAIN_PATH_CC"; then
28226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
28227$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
28228else
28229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28230$as_echo "no" >&6; }
28231fi
28232
28233
28234  test -n "$TOOLCHAIN_PATH_CC" && break
28235done
28236
28237      CC=$TOOLCHAIN_PATH_CC
28238      PATH="$PATH_save"
28239    fi
28240
28241    # AC_PATH_PROGS can't be run multiple times with the same variable,
28242    # so create a new name for this run.
28243    if test "x$CC" = x; then
28244      for ac_prog in $SEARCH_LIST
28245do
28246  # Extract the first word of "$ac_prog", so it can be a program name with args.
28247set dummy $ac_prog; ac_word=$2
28248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28249$as_echo_n "checking for $ac_word... " >&6; }
28250if ${ac_cv_path_POTENTIAL_CC+:} false; then :
28251  $as_echo_n "(cached) " >&6
28252else
28253  case $POTENTIAL_CC in
28254  [\\/]* | ?:[\\/]*)
28255  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
28256  ;;
28257  *)
28258  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28259for as_dir in $PATH
28260do
28261  IFS=$as_save_IFS
28262  test -z "$as_dir" && as_dir=.
28263    for ac_exec_ext in '' $ac_executable_extensions; do
28264  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28265    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
28266    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28267    break 2
28268  fi
28269done
28270  done
28271IFS=$as_save_IFS
28272
28273  ;;
28274esac
28275fi
28276POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
28277if test -n "$POTENTIAL_CC"; then
28278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
28279$as_echo "$POTENTIAL_CC" >&6; }
28280else
28281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28282$as_echo "no" >&6; }
28283fi
28284
28285
28286  test -n "$POTENTIAL_CC" && break
28287done
28288
28289      CC=$POTENTIAL_CC
28290    fi
28291
28292    if test "x$CC" = x; then
28293
28294  # Print a helpful message on how to acquire the necessary build dependency.
28295  # devkit is the help tag: freetype, cups, pulse, alsa etc
28296  MISSING_DEPENDENCY=devkit
28297
28298  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28299    cygwin_help $MISSING_DEPENDENCY
28300  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28301    msys_help $MISSING_DEPENDENCY
28302  else
28303    PKGHANDLER_COMMAND=
28304
28305    case $PKGHANDLER in
28306      apt-get)
28307        apt_help     $MISSING_DEPENDENCY ;;
28308      yum)
28309        yum_help     $MISSING_DEPENDENCY ;;
28310      port)
28311        port_help    $MISSING_DEPENDENCY ;;
28312      pkgutil)
28313        pkgutil_help $MISSING_DEPENDENCY ;;
28314      pkgadd)
28315        pkgadd_help  $MISSING_DEPENDENCY ;;
28316    esac
28317
28318    if test "x$PKGHANDLER_COMMAND" != x; then
28319      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
28320    fi
28321  fi
28322
28323      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
28324    fi
28325  fi
28326
28327  # Now we have a compiler binary in CC. Make sure it's okay.
28328
28329  # Only process if variable expands to non-empty
28330
28331  if test "x$CC" != x; then
28332    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28333
28334  # First separate the path from the arguments. This will split at the first
28335  # space.
28336  complete="$CC"
28337  path="${complete%% *}"
28338  tmp="$complete EOL"
28339  arguments="${tmp#* }"
28340
28341  # Input might be given as Windows format, start by converting to
28342  # unix format.
28343  new_path=`$CYGPATH -u "$path"`
28344
28345  # Now try to locate executable using which
28346  new_path=`$WHICH "$new_path" 2> /dev/null`
28347  # bat and cmd files are not always considered executable in cygwin causing which
28348  # to not find them
28349  if test "x$new_path" = x \
28350      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28351      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28352    new_path=`$CYGPATH -u "$path"`
28353  fi
28354  if test "x$new_path" = x; then
28355    # Oops. Which didn't find the executable.
28356    # The splitting of arguments from the executable at a space might have been incorrect,
28357    # since paths with space are more likely in Windows. Give it another try with the whole
28358    # argument.
28359    path="$complete"
28360    arguments="EOL"
28361    new_path=`$CYGPATH -u "$path"`
28362    new_path=`$WHICH "$new_path" 2> /dev/null`
28363    # bat and cmd files are not always considered executable in cygwin causing which
28364    # to not find them
28365    if test "x$new_path" = x \
28366        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28367        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28368      new_path=`$CYGPATH -u "$path"`
28369    fi
28370    if test "x$new_path" = x; then
28371      # It's still not found. Now this is an unrecoverable error.
28372      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28373$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28374      has_space=`$ECHO "$complete" | $GREP " "`
28375      if test "x$has_space" != x; then
28376        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28377$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28378      fi
28379      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28380    fi
28381  fi
28382
28383  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28384  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28385  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28386  # "foo.exe" is OK but "foo" is an error.
28387  #
28388  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28389  # It is also a way to make sure we got the proper file name for the real test later on.
28390  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28391  if test "x$test_shortpath" = x; then
28392    # Short path failed, file does not exist as specified.
28393    # Try adding .exe or .cmd
28394    if test -f "${new_path}.exe"; then
28395      input_to_shortpath="${new_path}.exe"
28396    elif test -f "${new_path}.cmd"; then
28397      input_to_shortpath="${new_path}.cmd"
28398    else
28399      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
28400$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
28401      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28402$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28403      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28404    fi
28405  else
28406    input_to_shortpath="$new_path"
28407  fi
28408
28409  # Call helper function which possibly converts this using DOS-style short mode.
28410  # If so, the updated path is stored in $new_path.
28411  new_path="$input_to_shortpath"
28412
28413  input_path="$input_to_shortpath"
28414  # Check if we need to convert this using DOS-style short mode. If the path
28415  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28416  # take no chances and rewrite it.
28417  # Note: m4 eats our [], so we need to use [ and ] instead.
28418  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28419  if test "x$has_forbidden_chars" != x; then
28420    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28421    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28422    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28423    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28424      # Going to short mode and back again did indeed matter. Since short mode is
28425      # case insensitive, let's make it lowercase to improve readability.
28426      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28427      # Now convert it back to Unix-style (cygpath)
28428      input_path=`$CYGPATH -u "$shortmode_path"`
28429      new_path="$input_path"
28430    fi
28431  fi
28432
28433  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28434  if test "x$test_cygdrive_prefix" = x; then
28435    # As a simple fix, exclude /usr/bin since it's not a real path.
28436    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28437      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28438      # a path prefixed by /cygdrive for fixpath to work.
28439      new_path="$CYGWIN_ROOT_PATH$input_path"
28440    fi
28441  fi
28442
28443  # remove trailing .exe if any
28444  new_path="${new_path/%.exe/}"
28445
28446    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28447
28448  # First separate the path from the arguments. This will split at the first
28449  # space.
28450  complete="$CC"
28451  path="${complete%% *}"
28452  tmp="$complete EOL"
28453  arguments="${tmp#* }"
28454
28455  # Input might be given as Windows format, start by converting to
28456  # unix format.
28457  new_path="$path"
28458
28459  windows_path="$new_path"
28460  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28461    unix_path=`$CYGPATH -u "$windows_path"`
28462    new_path="$unix_path"
28463  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28464    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28465    new_path="$unix_path"
28466  fi
28467
28468
28469  # Now try to locate executable using which
28470  new_path=`$WHICH "$new_path" 2> /dev/null`
28471
28472  if test "x$new_path" = x; then
28473    # Oops. Which didn't find the executable.
28474    # The splitting of arguments from the executable at a space might have been incorrect,
28475    # since paths with space are more likely in Windows. Give it another try with the whole
28476    # argument.
28477    path="$complete"
28478    arguments="EOL"
28479    new_path="$path"
28480
28481  windows_path="$new_path"
28482  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28483    unix_path=`$CYGPATH -u "$windows_path"`
28484    new_path="$unix_path"
28485  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28486    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28487    new_path="$unix_path"
28488  fi
28489
28490
28491    new_path=`$WHICH "$new_path" 2> /dev/null`
28492    # bat and cmd files are not always considered executable in MSYS causing which
28493    # to not find them
28494    if test "x$new_path" = x \
28495        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28496        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28497      new_path="$path"
28498
28499  windows_path="$new_path"
28500  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28501    unix_path=`$CYGPATH -u "$windows_path"`
28502    new_path="$unix_path"
28503  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28504    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28505    new_path="$unix_path"
28506  fi
28507
28508    fi
28509
28510    if test "x$new_path" = x; then
28511      # It's still not found. Now this is an unrecoverable error.
28512      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28513$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28514      has_space=`$ECHO "$complete" | $GREP " "`
28515      if test "x$has_space" != x; then
28516        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28517$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28518      fi
28519      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28520    fi
28521  fi
28522
28523  # Now new_path has a complete unix path to the binary
28524  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28525    # Keep paths in /bin as-is, but remove trailing .exe if any
28526    new_path="${new_path/%.exe/}"
28527    # Do not save /bin paths to all_fixpath_prefixes!
28528  else
28529    # Not in mixed or Windows style, start by that.
28530    new_path=`cmd //c echo $new_path`
28531
28532  input_path="$new_path"
28533  # Check if we need to convert this using DOS-style short mode. If the path
28534  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28535  # take no chances and rewrite it.
28536  # Note: m4 eats our [], so we need to use [ and ] instead.
28537  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28538  if test "x$has_forbidden_chars" != x; then
28539    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28540    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28541  fi
28542
28543    # Output is in $new_path
28544
28545  windows_path="$new_path"
28546  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28547    unix_path=`$CYGPATH -u "$windows_path"`
28548    new_path="$unix_path"
28549  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28550    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28551    new_path="$unix_path"
28552  fi
28553
28554    # remove trailing .exe if any
28555    new_path="${new_path/%.exe/}"
28556
28557    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28558    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28559  fi
28560
28561    else
28562      # We're on a unix platform. Hooray! :)
28563      # First separate the path from the arguments. This will split at the first
28564      # space.
28565      complete="$CC"
28566      path="${complete%% *}"
28567      tmp="$complete EOL"
28568      arguments="${tmp#* }"
28569
28570      # Cannot rely on the command "which" here since it doesn't always work.
28571      is_absolute_path=`$ECHO "$path" | $GREP ^/`
28572      if test -z "$is_absolute_path"; then
28573        # Path to executable is not absolute. Find it.
28574        IFS_save="$IFS"
28575        IFS=:
28576        for p in $PATH; do
28577          if test -f "$p/$path" && test -x "$p/$path"; then
28578            new_path="$p/$path"
28579            break
28580          fi
28581        done
28582        IFS="$IFS_save"
28583      else
28584        # This is an absolute path, we can use it without further modifications.
28585        new_path="$path"
28586      fi
28587
28588      if test "x$new_path" = x; then
28589        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28590$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28591        has_space=`$ECHO "$complete" | $GREP " "`
28592        if test "x$has_space" != x; then
28593          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28594$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28595        fi
28596        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28597      fi
28598    fi
28599
28600    # Now join together the path and the arguments once again
28601    if test "x$arguments" != xEOL; then
28602      new_complete="$new_path ${arguments% *}"
28603    else
28604      new_complete="$new_path"
28605    fi
28606
28607    if test "x$complete" != "x$new_complete"; then
28608      CC="$new_complete"
28609      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
28610$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
28611    fi
28612  fi
28613
28614  TEST_COMPILER="$CC"
28615  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
28616  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
28617  if test "x$OPENJDK_BUILD_OS" != xaix; then
28618    # FIXME: This test should not be needed anymore; we don't do that for any platform.
28619    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
28620$as_echo_n "checking resolved symbolic links for CC... " >&6; }
28621
28622  if test "x$OPENJDK_BUILD_OS" != xwindows; then
28623    # Follow a chain of symbolic links. Use readlink
28624    # where it exists, else fall back to horribly
28625    # complicated shell code.
28626    if test "x$READLINK_TESTED" != yes; then
28627      # On MacOSX there is a readlink tool with a different
28628      # purpose than the GNU readlink tool. Check the found readlink.
28629      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
28630      if test "x$ISGNU" = x; then
28631        # A readlink that we do not know how to use.
28632        # Are there other non-GNU readlinks out there?
28633        READLINK_TESTED=yes
28634        READLINK=
28635      fi
28636    fi
28637
28638    if test "x$READLINK" != x; then
28639      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
28640    else
28641      # Save the current directory for restoring afterwards
28642      STARTDIR=$PWD
28643      COUNTER=0
28644      sym_link_dir=`$DIRNAME $TEST_COMPILER`
28645      sym_link_file=`$BASENAME $TEST_COMPILER`
28646      cd $sym_link_dir
28647      # Use -P flag to resolve symlinks in directories.
28648      cd `$THEPWDCMD -P`
28649      sym_link_dir=`$THEPWDCMD -P`
28650      # Resolve file symlinks
28651      while test $COUNTER -lt 20; do
28652        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
28653        if test "x$ISLINK" == x; then
28654          # This is not a symbolic link! We are done!
28655          break
28656        fi
28657        # Again resolve directory symlinks since the target of the just found
28658        # link could be in a different directory
28659        cd `$DIRNAME $ISLINK`
28660        sym_link_dir=`$THEPWDCMD -P`
28661        sym_link_file=`$BASENAME $ISLINK`
28662        let COUNTER=COUNTER+1
28663      done
28664      cd $STARTDIR
28665      TEST_COMPILER=$sym_link_dir/$sym_link_file
28666    fi
28667  fi
28668
28669    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
28670$as_echo "$TEST_COMPILER" >&6; }
28671  fi
28672  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
28673$as_echo_n "checking if CC is disguised ccache... " >&6; }
28674
28675  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
28676  if test "x$COMPILER_BASENAME" = "xccache"; then
28677    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
28678$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
28679    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
28680    # We want to control ccache invocation ourselves, so ignore this cc and try
28681    # searching again.
28682
28683    # Remove the path to the fake ccache cc from the PATH
28684    RETRY_COMPILER_SAVED_PATH="$PATH"
28685    COMPILER_DIRNAME=`$DIRNAME $CC`
28686    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
28687
28688    # Try again looking for our compiler
28689    if test -n "$ac_tool_prefix"; then
28690  for ac_prog in $TOOLCHAIN_CC_BINARY
28691  do
28692    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28693set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28695$as_echo_n "checking for $ac_word... " >&6; }
28696if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
28697  $as_echo_n "(cached) " >&6
28698else
28699  if test -n "$PROPER_COMPILER_CC"; then
28700  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
28701else
28702as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28703for as_dir in $PATH
28704do
28705  IFS=$as_save_IFS
28706  test -z "$as_dir" && as_dir=.
28707    for ac_exec_ext in '' $ac_executable_extensions; do
28708  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28709    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
28710    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28711    break 2
28712  fi
28713done
28714  done
28715IFS=$as_save_IFS
28716
28717fi
28718fi
28719PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
28720if test -n "$PROPER_COMPILER_CC"; then
28721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
28722$as_echo "$PROPER_COMPILER_CC" >&6; }
28723else
28724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28725$as_echo "no" >&6; }
28726fi
28727
28728
28729    test -n "$PROPER_COMPILER_CC" && break
28730  done
28731fi
28732if test -z "$PROPER_COMPILER_CC"; then
28733  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
28734  for ac_prog in $TOOLCHAIN_CC_BINARY
28735do
28736  # Extract the first word of "$ac_prog", so it can be a program name with args.
28737set dummy $ac_prog; ac_word=$2
28738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28739$as_echo_n "checking for $ac_word... " >&6; }
28740if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
28741  $as_echo_n "(cached) " >&6
28742else
28743  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28744  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
28745else
28746as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28747for as_dir in $PATH
28748do
28749  IFS=$as_save_IFS
28750  test -z "$as_dir" && as_dir=.
28751    for ac_exec_ext in '' $ac_executable_extensions; do
28752  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28753    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
28754    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28755    break 2
28756  fi
28757done
28758  done
28759IFS=$as_save_IFS
28760
28761fi
28762fi
28763ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
28764if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
28766$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
28767else
28768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28769$as_echo "no" >&6; }
28770fi
28771
28772
28773  test -n "$ac_ct_PROPER_COMPILER_CC" && break
28774done
28775
28776  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
28777    PROPER_COMPILER_CC=""
28778  else
28779    case $cross_compiling:$ac_tool_warned in
28780yes:)
28781{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28782$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28783ac_tool_warned=yes ;;
28784esac
28785    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
28786  fi
28787fi
28788
28789
28790  # Only process if variable expands to non-empty
28791
28792  if test "x$PROPER_COMPILER_CC" != x; then
28793    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28794
28795  # First separate the path from the arguments. This will split at the first
28796  # space.
28797  complete="$PROPER_COMPILER_CC"
28798  path="${complete%% *}"
28799  tmp="$complete EOL"
28800  arguments="${tmp#* }"
28801
28802  # Input might be given as Windows format, start by converting to
28803  # unix format.
28804  new_path=`$CYGPATH -u "$path"`
28805
28806  # Now try to locate executable using which
28807  new_path=`$WHICH "$new_path" 2> /dev/null`
28808  # bat and cmd files are not always considered executable in cygwin causing which
28809  # to not find them
28810  if test "x$new_path" = x \
28811      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28812      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28813    new_path=`$CYGPATH -u "$path"`
28814  fi
28815  if test "x$new_path" = x; then
28816    # Oops. Which didn't find the executable.
28817    # The splitting of arguments from the executable at a space might have been incorrect,
28818    # since paths with space are more likely in Windows. Give it another try with the whole
28819    # argument.
28820    path="$complete"
28821    arguments="EOL"
28822    new_path=`$CYGPATH -u "$path"`
28823    new_path=`$WHICH "$new_path" 2> /dev/null`
28824    # bat and cmd files are not always considered executable in cygwin causing which
28825    # to not find them
28826    if test "x$new_path" = x \
28827        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28828        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28829      new_path=`$CYGPATH -u "$path"`
28830    fi
28831    if test "x$new_path" = x; then
28832      # It's still not found. Now this is an unrecoverable error.
28833      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28834$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28835      has_space=`$ECHO "$complete" | $GREP " "`
28836      if test "x$has_space" != x; then
28837        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28838$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28839      fi
28840      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28841    fi
28842  fi
28843
28844  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28845  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28846  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28847  # "foo.exe" is OK but "foo" is an error.
28848  #
28849  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28850  # It is also a way to make sure we got the proper file name for the real test later on.
28851  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28852  if test "x$test_shortpath" = x; then
28853    # Short path failed, file does not exist as specified.
28854    # Try adding .exe or .cmd
28855    if test -f "${new_path}.exe"; then
28856      input_to_shortpath="${new_path}.exe"
28857    elif test -f "${new_path}.cmd"; then
28858      input_to_shortpath="${new_path}.cmd"
28859    else
28860      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
28861$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
28862      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28863$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28864      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28865    fi
28866  else
28867    input_to_shortpath="$new_path"
28868  fi
28869
28870  # Call helper function which possibly converts this using DOS-style short mode.
28871  # If so, the updated path is stored in $new_path.
28872  new_path="$input_to_shortpath"
28873
28874  input_path="$input_to_shortpath"
28875  # Check if we need to convert this using DOS-style short mode. If the path
28876  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28877  # take no chances and rewrite it.
28878  # Note: m4 eats our [], so we need to use [ and ] instead.
28879  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28880  if test "x$has_forbidden_chars" != x; then
28881    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28882    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28883    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28884    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28885      # Going to short mode and back again did indeed matter. Since short mode is
28886      # case insensitive, let's make it lowercase to improve readability.
28887      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28888      # Now convert it back to Unix-style (cygpath)
28889      input_path=`$CYGPATH -u "$shortmode_path"`
28890      new_path="$input_path"
28891    fi
28892  fi
28893
28894  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28895  if test "x$test_cygdrive_prefix" = x; then
28896    # As a simple fix, exclude /usr/bin since it's not a real path.
28897    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28898      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28899      # a path prefixed by /cygdrive for fixpath to work.
28900      new_path="$CYGWIN_ROOT_PATH$input_path"
28901    fi
28902  fi
28903
28904  # remove trailing .exe if any
28905  new_path="${new_path/%.exe/}"
28906
28907    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28908
28909  # First separate the path from the arguments. This will split at the first
28910  # space.
28911  complete="$PROPER_COMPILER_CC"
28912  path="${complete%% *}"
28913  tmp="$complete EOL"
28914  arguments="${tmp#* }"
28915
28916  # Input might be given as Windows format, start by converting to
28917  # unix format.
28918  new_path="$path"
28919
28920  windows_path="$new_path"
28921  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28922    unix_path=`$CYGPATH -u "$windows_path"`
28923    new_path="$unix_path"
28924  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28925    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28926    new_path="$unix_path"
28927  fi
28928
28929
28930  # Now try to locate executable using which
28931  new_path=`$WHICH "$new_path" 2> /dev/null`
28932
28933  if test "x$new_path" = x; then
28934    # Oops. Which didn't find the executable.
28935    # The splitting of arguments from the executable at a space might have been incorrect,
28936    # since paths with space are more likely in Windows. Give it another try with the whole
28937    # argument.
28938    path="$complete"
28939    arguments="EOL"
28940    new_path="$path"
28941
28942  windows_path="$new_path"
28943  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28944    unix_path=`$CYGPATH -u "$windows_path"`
28945    new_path="$unix_path"
28946  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28947    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28948    new_path="$unix_path"
28949  fi
28950
28951
28952    new_path=`$WHICH "$new_path" 2> /dev/null`
28953    # bat and cmd files are not always considered executable in MSYS causing which
28954    # to not find them
28955    if test "x$new_path" = x \
28956        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28957        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28958      new_path="$path"
28959
28960  windows_path="$new_path"
28961  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28962    unix_path=`$CYGPATH -u "$windows_path"`
28963    new_path="$unix_path"
28964  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28965    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28966    new_path="$unix_path"
28967  fi
28968
28969    fi
28970
28971    if test "x$new_path" = x; then
28972      # It's still not found. Now this is an unrecoverable error.
28973      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28974$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28975      has_space=`$ECHO "$complete" | $GREP " "`
28976      if test "x$has_space" != x; then
28977        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28978$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28979      fi
28980      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28981    fi
28982  fi
28983
28984  # Now new_path has a complete unix path to the binary
28985  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28986    # Keep paths in /bin as-is, but remove trailing .exe if any
28987    new_path="${new_path/%.exe/}"
28988    # Do not save /bin paths to all_fixpath_prefixes!
28989  else
28990    # Not in mixed or Windows style, start by that.
28991    new_path=`cmd //c echo $new_path`
28992
28993  input_path="$new_path"
28994  # Check if we need to convert this using DOS-style short mode. If the path
28995  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28996  # take no chances and rewrite it.
28997  # Note: m4 eats our [], so we need to use [ and ] instead.
28998  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28999  if test "x$has_forbidden_chars" != x; then
29000    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29001    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29002  fi
29003
29004    # Output is in $new_path
29005
29006  windows_path="$new_path"
29007  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29008    unix_path=`$CYGPATH -u "$windows_path"`
29009    new_path="$unix_path"
29010  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29011    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29012    new_path="$unix_path"
29013  fi
29014
29015    # remove trailing .exe if any
29016    new_path="${new_path/%.exe/}"
29017
29018    # Save the first 10 bytes of this path to the storage, so fixpath can work.
29019    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29020  fi
29021
29022    else
29023      # We're on a unix platform. Hooray! :)
29024      # First separate the path from the arguments. This will split at the first
29025      # space.
29026      complete="$PROPER_COMPILER_CC"
29027      path="${complete%% *}"
29028      tmp="$complete EOL"
29029      arguments="${tmp#* }"
29030
29031      # Cannot rely on the command "which" here since it doesn't always work.
29032      is_absolute_path=`$ECHO "$path" | $GREP ^/`
29033      if test -z "$is_absolute_path"; then
29034        # Path to executable is not absolute. Find it.
29035        IFS_save="$IFS"
29036        IFS=:
29037        for p in $PATH; do
29038          if test -f "$p/$path" && test -x "$p/$path"; then
29039            new_path="$p/$path"
29040            break
29041          fi
29042        done
29043        IFS="$IFS_save"
29044      else
29045        # This is an absolute path, we can use it without further modifications.
29046        new_path="$path"
29047      fi
29048
29049      if test "x$new_path" = x; then
29050        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
29051$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
29052        has_space=`$ECHO "$complete" | $GREP " "`
29053        if test "x$has_space" != x; then
29054          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
29055$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
29056        fi
29057        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
29058      fi
29059    fi
29060
29061    # Now join together the path and the arguments once again
29062    if test "x$arguments" != xEOL; then
29063      new_complete="$new_path ${arguments% *}"
29064    else
29065      new_complete="$new_path"
29066    fi
29067
29068    if test "x$complete" != "x$new_complete"; then
29069      PROPER_COMPILER_CC="$new_complete"
29070      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
29071$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
29072    fi
29073  fi
29074
29075    PATH="$RETRY_COMPILER_SAVED_PATH"
29076
29077    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
29078$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
29079
29080  if test "x$OPENJDK_BUILD_OS" != xwindows; then
29081    # Follow a chain of symbolic links. Use readlink
29082    # where it exists, else fall back to horribly
29083    # complicated shell code.
29084    if test "x$READLINK_TESTED" != yes; then
29085      # On MacOSX there is a readlink tool with a different
29086      # purpose than the GNU readlink tool. Check the found readlink.
29087      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
29088      if test "x$ISGNU" = x; then
29089        # A readlink that we do not know how to use.
29090        # Are there other non-GNU readlinks out there?
29091        READLINK_TESTED=yes
29092        READLINK=
29093      fi
29094    fi
29095
29096    if test "x$READLINK" != x; then
29097      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
29098    else
29099      # Save the current directory for restoring afterwards
29100      STARTDIR=$PWD
29101      COUNTER=0
29102      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
29103      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
29104      cd $sym_link_dir
29105      # Use -P flag to resolve symlinks in directories.
29106      cd `$THEPWDCMD -P`
29107      sym_link_dir=`$THEPWDCMD -P`
29108      # Resolve file symlinks
29109      while test $COUNTER -lt 20; do
29110        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
29111        if test "x$ISLINK" == x; then
29112          # This is not a symbolic link! We are done!
29113          break
29114        fi
29115        # Again resolve directory symlinks since the target of the just found
29116        # link could be in a different directory
29117        cd `$DIRNAME $ISLINK`
29118        sym_link_dir=`$THEPWDCMD -P`
29119        sym_link_file=`$BASENAME $ISLINK`
29120        let COUNTER=COUNTER+1
29121      done
29122      cd $STARTDIR
29123      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
29124    fi
29125  fi
29126
29127    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
29128$as_echo "$PROPER_COMPILER_CC" >&6; }
29129    CC="$PROPER_COMPILER_CC"
29130  else
29131    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
29132$as_echo "no, keeping CC" >&6; }
29133  fi
29134
29135
29136  COMPILER=$CC
29137  COMPILER_NAME=$COMPILER_NAME
29138
29139  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
29140    # cc -V output typically looks like
29141    #     cc: Sun C 5.12 Linux_i386 2011/11/16
29142    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
29143    # Check that this is likely to be the Solaris Studio cc.
29144    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
29145    if test $? -ne 0; then
29146      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29147      { $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
29148$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29149      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29150$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29151      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
29152$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
29153      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29154    fi
29155    # Remove usage instructions (if present), and
29156    # collapse compiler output into a single line
29157    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
29158        $SED -e 's/ *[Uu]sage:.*//'`
29159    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29160        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
29161  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
29162    # xlc -qversion output typically looks like
29163    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
29164    #     Version: 11.01.0000.0015
29165    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
29166    # Check that this is likely to be the IBM XL C compiler.
29167    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
29168    if test $? -ne 0; then
29169      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29170      { $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
29171$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29172      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29173$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29174      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
29175$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
29176      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29177    fi
29178    # Collapse compiler output into a single line
29179    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
29180    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29181        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
29182  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
29183    # There is no specific version flag, but all output starts with a version string.
29184    # First line typically looks something like:
29185    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
29186    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
29187    # Check that this is likely to be Microsoft CL.EXE.
29188    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
29189    if test $? -ne 0; then
29190      { $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
29191$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29192      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29193$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29194      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29195    fi
29196    # Collapse compiler output into a single line
29197    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
29198    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29199        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
29200  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
29201    # gcc --version output typically looks like
29202    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
29203    #     Copyright (C) 2013 Free Software Foundation, Inc.
29204    #     This is free software; see the source for copying conditions.  There is NO
29205    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
29206    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29207    # Check that this is likely to be GCC.
29208    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
29209    if test $? -ne 0; then
29210      { $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
29211$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29212      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
29213$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
29214      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29215    fi
29216    # Remove Copyright and legalese from version string, and
29217    # collapse into a single line
29218    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
29219        $SED -e 's/ *Copyright .*//'`
29220    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29221        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
29222  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
29223    # clang --version output typically looks like
29224    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
29225    #    clang version 3.3 (tags/RELEASE_33/final)
29226    # or
29227    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
29228    #    Target: x86_64-pc-linux-gnu
29229    #    Thread model: posix
29230    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29231    # Check that this is likely to be clang
29232    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
29233    if test $? -ne 0; then
29234      { $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
29235$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29236      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29237$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29238      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29239    fi
29240    # Collapse compiler output into a single line
29241    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
29242    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29243        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
29244  else
29245      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
29246  fi
29247  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
29248  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
29249  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
29250  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
29251
29252  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
29253$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
29254
29255
29256  # Now that we have resolved CC ourself, let autoconf have its go at it
29257  ac_ext=c
29258ac_cpp='$CPP $CPPFLAGS'
29259ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29260ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29261ac_compiler_gnu=$ac_cv_c_compiler_gnu
29262if test -n "$ac_tool_prefix"; then
29263  for ac_prog in $CC
29264  do
29265    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
29266set dummy $ac_tool_prefix$ac_prog; ac_word=$2
29267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29268$as_echo_n "checking for $ac_word... " >&6; }
29269if ${ac_cv_prog_CC+:} false; then :
29270  $as_echo_n "(cached) " >&6
29271else
29272  if test -n "$CC"; then
29273  ac_cv_prog_CC="$CC" # Let the user override the test.
29274else
29275as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29276for as_dir in $PATH
29277do
29278  IFS=$as_save_IFS
29279  test -z "$as_dir" && as_dir=.
29280    for ac_exec_ext in '' $ac_executable_extensions; do
29281  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29282    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
29283    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29284    break 2
29285  fi
29286done
29287  done
29288IFS=$as_save_IFS
29289
29290fi
29291fi
29292CC=$ac_cv_prog_CC
29293if test -n "$CC"; then
29294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
29295$as_echo "$CC" >&6; }
29296else
29297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29298$as_echo "no" >&6; }
29299fi
29300
29301
29302    test -n "$CC" && break
29303  done
29304fi
29305if test -z "$CC"; then
29306  ac_ct_CC=$CC
29307  for ac_prog in $CC
29308do
29309  # Extract the first word of "$ac_prog", so it can be a program name with args.
29310set dummy $ac_prog; ac_word=$2
29311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29312$as_echo_n "checking for $ac_word... " >&6; }
29313if ${ac_cv_prog_ac_ct_CC+:} false; then :
29314  $as_echo_n "(cached) " >&6
29315else
29316  if test -n "$ac_ct_CC"; then
29317  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
29318else
29319as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29320for as_dir in $PATH
29321do
29322  IFS=$as_save_IFS
29323  test -z "$as_dir" && as_dir=.
29324    for ac_exec_ext in '' $ac_executable_extensions; do
29325  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29326    ac_cv_prog_ac_ct_CC="$ac_prog"
29327    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29328    break 2
29329  fi
29330done
29331  done
29332IFS=$as_save_IFS
29333
29334fi
29335fi
29336ac_ct_CC=$ac_cv_prog_ac_ct_CC
29337if test -n "$ac_ct_CC"; then
29338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
29339$as_echo "$ac_ct_CC" >&6; }
29340else
29341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29342$as_echo "no" >&6; }
29343fi
29344
29345
29346  test -n "$ac_ct_CC" && break
29347done
29348
29349  if test "x$ac_ct_CC" = x; then
29350    CC=""
29351  else
29352    case $cross_compiling:$ac_tool_warned in
29353yes:)
29354{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
29355$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
29356ac_tool_warned=yes ;;
29357esac
29358    CC=$ac_ct_CC
29359  fi
29360fi
29361
29362
29363test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29364$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29365as_fn_error $? "no acceptable C compiler found in \$PATH
29366See \`config.log' for more details" "$LINENO" 5; }
29367
29368# Provide some information about the compiler.
29369$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
29370set X $ac_compile
29371ac_compiler=$2
29372for ac_option in --version -v -V -qversion; do
29373  { { ac_try="$ac_compiler $ac_option >&5"
29374case "(($ac_try" in
29375  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29376  *) ac_try_echo=$ac_try;;
29377esac
29378eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29379$as_echo "$ac_try_echo"; } >&5
29380  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
29381  ac_status=$?
29382  if test -s conftest.err; then
29383    sed '10a\
29384... rest of stderr output deleted ...
29385         10q' conftest.err >conftest.er1
29386    cat conftest.er1 >&5
29387  fi
29388  rm -f conftest.er1 conftest.err
29389  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29390  test $ac_status = 0; }
29391done
29392
29393cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29394/* end confdefs.h.  */
29395
29396int
29397main ()
29398{
29399
29400  ;
29401  return 0;
29402}
29403_ACEOF
29404ac_clean_files_save=$ac_clean_files
29405ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
29406# Try to create an executable without -o first, disregard a.out.
29407# It will help us diagnose broken compilers, and finding out an intuition
29408# of exeext.
29409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
29410$as_echo_n "checking whether the C compiler works... " >&6; }
29411ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
29412
29413# The possible output files:
29414ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
29415
29416ac_rmfiles=
29417for ac_file in $ac_files
29418do
29419  case $ac_file in
29420    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
29421    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
29422  esac
29423done
29424rm -f $ac_rmfiles
29425
29426if { { ac_try="$ac_link_default"
29427case "(($ac_try" in
29428  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29429  *) ac_try_echo=$ac_try;;
29430esac
29431eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29432$as_echo "$ac_try_echo"; } >&5
29433  (eval "$ac_link_default") 2>&5
29434  ac_status=$?
29435  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29436  test $ac_status = 0; }; then :
29437  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
29438# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
29439# in a Makefile.  We should not override ac_cv_exeext if it was cached,
29440# so that the user can short-circuit this test for compilers unknown to
29441# Autoconf.
29442for ac_file in $ac_files ''
29443do
29444  test -f "$ac_file" || continue
29445  case $ac_file in
29446    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
29447	;;
29448    [ab].out )
29449	# We found the default executable, but exeext='' is most
29450	# certainly right.
29451	break;;
29452    *.* )
29453	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
29454	then :; else
29455	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
29456	fi
29457	# We set ac_cv_exeext here because the later test for it is not
29458	# safe: cross compilers may not add the suffix if given an `-o'
29459	# argument, so we may need to know it at that point already.
29460	# Even if this section looks crufty: it has the advantage of
29461	# actually working.
29462	break;;
29463    * )
29464	break;;
29465  esac
29466done
29467test "$ac_cv_exeext" = no && ac_cv_exeext=
29468
29469else
29470  ac_file=''
29471fi
29472if test -z "$ac_file"; then :
29473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29474$as_echo "no" >&6; }
29475$as_echo "$as_me: failed program was:" >&5
29476sed 's/^/| /' conftest.$ac_ext >&5
29477
29478{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29479$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29480as_fn_error 77 "C compiler cannot create executables
29481See \`config.log' for more details" "$LINENO" 5; }
29482else
29483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29484$as_echo "yes" >&6; }
29485fi
29486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
29487$as_echo_n "checking for C compiler default output file name... " >&6; }
29488{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
29489$as_echo "$ac_file" >&6; }
29490ac_exeext=$ac_cv_exeext
29491
29492rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
29493ac_clean_files=$ac_clean_files_save
29494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
29495$as_echo_n "checking for suffix of executables... " >&6; }
29496if { { ac_try="$ac_link"
29497case "(($ac_try" in
29498  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29499  *) ac_try_echo=$ac_try;;
29500esac
29501eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29502$as_echo "$ac_try_echo"; } >&5
29503  (eval "$ac_link") 2>&5
29504  ac_status=$?
29505  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29506  test $ac_status = 0; }; then :
29507  # If both `conftest.exe' and `conftest' are `present' (well, observable)
29508# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
29509# work properly (i.e., refer to `conftest.exe'), while it won't with
29510# `rm'.
29511for ac_file in conftest.exe conftest conftest.*; do
29512  test -f "$ac_file" || continue
29513  case $ac_file in
29514    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
29515    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
29516	  break;;
29517    * ) break;;
29518  esac
29519done
29520else
29521  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29522$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29523as_fn_error $? "cannot compute suffix of executables: cannot compile and link
29524See \`config.log' for more details" "$LINENO" 5; }
29525fi
29526rm -f conftest conftest$ac_cv_exeext
29527{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
29528$as_echo "$ac_cv_exeext" >&6; }
29529
29530rm -f conftest.$ac_ext
29531EXEEXT=$ac_cv_exeext
29532ac_exeext=$EXEEXT
29533cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29534/* end confdefs.h.  */
29535#include <stdio.h>
29536int
29537main ()
29538{
29539FILE *f = fopen ("conftest.out", "w");
29540 return ferror (f) || fclose (f) != 0;
29541
29542  ;
29543  return 0;
29544}
29545_ACEOF
29546ac_clean_files="$ac_clean_files conftest.out"
29547# Check that the compiler produces executables we can run.  If not, either
29548# the compiler is broken, or we cross compile.
29549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
29550$as_echo_n "checking whether we are cross compiling... " >&6; }
29551if test "$cross_compiling" != yes; then
29552  { { ac_try="$ac_link"
29553case "(($ac_try" in
29554  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29555  *) ac_try_echo=$ac_try;;
29556esac
29557eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29558$as_echo "$ac_try_echo"; } >&5
29559  (eval "$ac_link") 2>&5
29560  ac_status=$?
29561  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29562  test $ac_status = 0; }
29563  if { ac_try='./conftest$ac_cv_exeext'
29564  { { case "(($ac_try" in
29565  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29566  *) ac_try_echo=$ac_try;;
29567esac
29568eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29569$as_echo "$ac_try_echo"; } >&5
29570  (eval "$ac_try") 2>&5
29571  ac_status=$?
29572  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29573  test $ac_status = 0; }; }; then
29574    cross_compiling=no
29575  else
29576    if test "$cross_compiling" = maybe; then
29577	cross_compiling=yes
29578    else
29579	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29580$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29581as_fn_error $? "cannot run C compiled programs.
29582If you meant to cross compile, use \`--host'.
29583See \`config.log' for more details" "$LINENO" 5; }
29584    fi
29585  fi
29586fi
29587{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
29588$as_echo "$cross_compiling" >&6; }
29589
29590rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
29591ac_clean_files=$ac_clean_files_save
29592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
29593$as_echo_n "checking for suffix of object files... " >&6; }
29594if ${ac_cv_objext+:} false; then :
29595  $as_echo_n "(cached) " >&6
29596else
29597  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29598/* end confdefs.h.  */
29599
29600int
29601main ()
29602{
29603
29604  ;
29605  return 0;
29606}
29607_ACEOF
29608rm -f conftest.o conftest.obj
29609if { { ac_try="$ac_compile"
29610case "(($ac_try" in
29611  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29612  *) ac_try_echo=$ac_try;;
29613esac
29614eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29615$as_echo "$ac_try_echo"; } >&5
29616  (eval "$ac_compile") 2>&5
29617  ac_status=$?
29618  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29619  test $ac_status = 0; }; then :
29620  for ac_file in conftest.o conftest.obj conftest.*; do
29621  test -f "$ac_file" || continue;
29622  case $ac_file in
29623    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
29624    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
29625       break;;
29626  esac
29627done
29628else
29629  $as_echo "$as_me: failed program was:" >&5
29630sed 's/^/| /' conftest.$ac_ext >&5
29631
29632{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29633$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29634as_fn_error $? "cannot compute suffix of object files: cannot compile
29635See \`config.log' for more details" "$LINENO" 5; }
29636fi
29637rm -f conftest.$ac_cv_objext conftest.$ac_ext
29638fi
29639{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
29640$as_echo "$ac_cv_objext" >&6; }
29641OBJEXT=$ac_cv_objext
29642ac_objext=$OBJEXT
29643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
29644$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
29645if ${ac_cv_c_compiler_gnu+:} false; then :
29646  $as_echo_n "(cached) " >&6
29647else
29648  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29649/* end confdefs.h.  */
29650
29651int
29652main ()
29653{
29654#ifndef __GNUC__
29655       choke me
29656#endif
29657
29658  ;
29659  return 0;
29660}
29661_ACEOF
29662if ac_fn_c_try_compile "$LINENO"; then :
29663  ac_compiler_gnu=yes
29664else
29665  ac_compiler_gnu=no
29666fi
29667rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29668ac_cv_c_compiler_gnu=$ac_compiler_gnu
29669
29670fi
29671{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
29672$as_echo "$ac_cv_c_compiler_gnu" >&6; }
29673if test $ac_compiler_gnu = yes; then
29674  GCC=yes
29675else
29676  GCC=
29677fi
29678ac_test_CFLAGS=${CFLAGS+set}
29679ac_save_CFLAGS=$CFLAGS
29680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
29681$as_echo_n "checking whether $CC accepts -g... " >&6; }
29682if ${ac_cv_prog_cc_g+:} false; then :
29683  $as_echo_n "(cached) " >&6
29684else
29685  ac_save_c_werror_flag=$ac_c_werror_flag
29686   ac_c_werror_flag=yes
29687   ac_cv_prog_cc_g=no
29688   CFLAGS="-g"
29689   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29690/* end confdefs.h.  */
29691
29692int
29693main ()
29694{
29695
29696  ;
29697  return 0;
29698}
29699_ACEOF
29700if ac_fn_c_try_compile "$LINENO"; then :
29701  ac_cv_prog_cc_g=yes
29702else
29703  CFLAGS=""
29704      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29705/* end confdefs.h.  */
29706
29707int
29708main ()
29709{
29710
29711  ;
29712  return 0;
29713}
29714_ACEOF
29715if ac_fn_c_try_compile "$LINENO"; then :
29716
29717else
29718  ac_c_werror_flag=$ac_save_c_werror_flag
29719	 CFLAGS="-g"
29720	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29721/* end confdefs.h.  */
29722
29723int
29724main ()
29725{
29726
29727  ;
29728  return 0;
29729}
29730_ACEOF
29731if ac_fn_c_try_compile "$LINENO"; then :
29732  ac_cv_prog_cc_g=yes
29733fi
29734rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29735fi
29736rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29737fi
29738rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29739   ac_c_werror_flag=$ac_save_c_werror_flag
29740fi
29741{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
29742$as_echo "$ac_cv_prog_cc_g" >&6; }
29743if test "$ac_test_CFLAGS" = set; then
29744  CFLAGS=$ac_save_CFLAGS
29745elif test $ac_cv_prog_cc_g = yes; then
29746  if test "$GCC" = yes; then
29747    CFLAGS="-g -O2"
29748  else
29749    CFLAGS="-g"
29750  fi
29751else
29752  if test "$GCC" = yes; then
29753    CFLAGS="-O2"
29754  else
29755    CFLAGS=
29756  fi
29757fi
29758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
29759$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
29760if ${ac_cv_prog_cc_c89+:} false; then :
29761  $as_echo_n "(cached) " >&6
29762else
29763  ac_cv_prog_cc_c89=no
29764ac_save_CC=$CC
29765cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29766/* end confdefs.h.  */
29767#include <stdarg.h>
29768#include <stdio.h>
29769struct stat;
29770/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
29771struct buf { int x; };
29772FILE * (*rcsopen) (struct buf *, struct stat *, int);
29773static char *e (p, i)
29774     char **p;
29775     int i;
29776{
29777  return p[i];
29778}
29779static char *f (char * (*g) (char **, int), char **p, ...)
29780{
29781  char *s;
29782  va_list v;
29783  va_start (v,p);
29784  s = g (p, va_arg (v,int));
29785  va_end (v);
29786  return s;
29787}
29788
29789/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
29790   function prototypes and stuff, but not '\xHH' hex character constants.
29791   These don't provoke an error unfortunately, instead are silently treated
29792   as 'x'.  The following induces an error, until -std is added to get
29793   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
29794   array size at least.  It's necessary to write '\x00'==0 to get something
29795   that's true only with -std.  */
29796int osf4_cc_array ['\x00' == 0 ? 1 : -1];
29797
29798/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
29799   inside strings and character constants.  */
29800#define FOO(x) 'x'
29801int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
29802
29803int test (int i, double x);
29804struct s1 {int (*f) (int a);};
29805struct s2 {int (*f) (double a);};
29806int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
29807int argc;
29808char **argv;
29809int
29810main ()
29811{
29812return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
29813  ;
29814  return 0;
29815}
29816_ACEOF
29817for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
29818	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
29819do
29820  CC="$ac_save_CC $ac_arg"
29821  if ac_fn_c_try_compile "$LINENO"; then :
29822  ac_cv_prog_cc_c89=$ac_arg
29823fi
29824rm -f core conftest.err conftest.$ac_objext
29825  test "x$ac_cv_prog_cc_c89" != "xno" && break
29826done
29827rm -f conftest.$ac_ext
29828CC=$ac_save_CC
29829
29830fi
29831# AC_CACHE_VAL
29832case "x$ac_cv_prog_cc_c89" in
29833  x)
29834    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
29835$as_echo "none needed" >&6; } ;;
29836  xno)
29837    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
29838$as_echo "unsupported" >&6; } ;;
29839  *)
29840    CC="$CC $ac_cv_prog_cc_c89"
29841    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
29842$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
29843esac
29844if test "x$ac_cv_prog_cc_c89" != xno; then :
29845
29846fi
29847
29848ac_ext=cpp
29849ac_cpp='$CXXCPP $CPPFLAGS'
29850ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29851ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29852ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29853
29854
29855
29856  COMPILER_NAME=C++
29857  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
29858
29859  if test "x$CXX" != x; then
29860    # User has supplied compiler name already, always let that override.
29861    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
29862$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
29863    if test "x`basename $CXX`" = "x$CXX"; then
29864      # A command without a complete path is provided, search $PATH.
29865
29866      for ac_prog in $CXX
29867do
29868  # Extract the first word of "$ac_prog", so it can be a program name with args.
29869set dummy $ac_prog; ac_word=$2
29870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29871$as_echo_n "checking for $ac_word... " >&6; }
29872if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29873  $as_echo_n "(cached) " >&6
29874else
29875  case $POTENTIAL_CXX in
29876  [\\/]* | ?:[\\/]*)
29877  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29878  ;;
29879  *)
29880  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29881for as_dir in $PATH
29882do
29883  IFS=$as_save_IFS
29884  test -z "$as_dir" && as_dir=.
29885    for ac_exec_ext in '' $ac_executable_extensions; do
29886  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29887    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29888    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29889    break 2
29890  fi
29891done
29892  done
29893IFS=$as_save_IFS
29894
29895  ;;
29896esac
29897fi
29898POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29899if test -n "$POTENTIAL_CXX"; then
29900  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
29901$as_echo "$POTENTIAL_CXX" >&6; }
29902else
29903  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29904$as_echo "no" >&6; }
29905fi
29906
29907
29908  test -n "$POTENTIAL_CXX" && break
29909done
29910
29911      if test "x$POTENTIAL_CXX" != x; then
29912        CXX=$POTENTIAL_CXX
29913      else
29914        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
29915      fi
29916    else
29917      # Otherwise it might already be a complete path
29918      if test ! -x "$CXX"; then
29919        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
29920      fi
29921    fi
29922  else
29923    # No user supplied value. Locate compiler ourselves.
29924
29925    # If we are cross compiling, assume cross compilation tools follows the
29926    # cross compilation standard where they are prefixed with the autoconf
29927    # standard name for the target. For example the binary
29928    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
29929    # If we are not cross compiling, then the default compiler name will be
29930    # used.
29931
29932    CXX=
29933    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
29934    # before checking the rest of the PATH.
29935    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
29936    # step, this should not be necessary.
29937    if test -n "$TOOLCHAIN_PATH"; then
29938      PATH_save="$PATH"
29939      PATH="$TOOLCHAIN_PATH"
29940      for ac_prog in $SEARCH_LIST
29941do
29942  # Extract the first word of "$ac_prog", so it can be a program name with args.
29943set dummy $ac_prog; ac_word=$2
29944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29945$as_echo_n "checking for $ac_word... " >&6; }
29946if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
29947  $as_echo_n "(cached) " >&6
29948else
29949  case $TOOLCHAIN_PATH_CXX in
29950  [\\/]* | ?:[\\/]*)
29951  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
29952  ;;
29953  *)
29954  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29955for as_dir in $PATH
29956do
29957  IFS=$as_save_IFS
29958  test -z "$as_dir" && as_dir=.
29959    for ac_exec_ext in '' $ac_executable_extensions; do
29960  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29961    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
29962    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29963    break 2
29964  fi
29965done
29966  done
29967IFS=$as_save_IFS
29968
29969  ;;
29970esac
29971fi
29972TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
29973if test -n "$TOOLCHAIN_PATH_CXX"; then
29974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
29975$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
29976else
29977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29978$as_echo "no" >&6; }
29979fi
29980
29981
29982  test -n "$TOOLCHAIN_PATH_CXX" && break
29983done
29984
29985      CXX=$TOOLCHAIN_PATH_CXX
29986      PATH="$PATH_save"
29987    fi
29988
29989    # AC_PATH_PROGS can't be run multiple times with the same variable,
29990    # so create a new name for this run.
29991    if test "x$CXX" = x; then
29992      for ac_prog in $SEARCH_LIST
29993do
29994  # Extract the first word of "$ac_prog", so it can be a program name with args.
29995set dummy $ac_prog; ac_word=$2
29996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29997$as_echo_n "checking for $ac_word... " >&6; }
29998if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29999  $as_echo_n "(cached) " >&6
30000else
30001  case $POTENTIAL_CXX in
30002  [\\/]* | ?:[\\/]*)
30003  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
30004  ;;
30005  *)
30006  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30007for as_dir in $PATH
30008do
30009  IFS=$as_save_IFS
30010  test -z "$as_dir" && as_dir=.
30011    for ac_exec_ext in '' $ac_executable_extensions; do
30012  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30013    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
30014    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30015    break 2
30016  fi
30017done
30018  done
30019IFS=$as_save_IFS
30020
30021  ;;
30022esac
30023fi
30024POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
30025if test -n "$POTENTIAL_CXX"; then
30026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
30027$as_echo "$POTENTIAL_CXX" >&6; }
30028else
30029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30030$as_echo "no" >&6; }
30031fi
30032
30033
30034  test -n "$POTENTIAL_CXX" && break
30035done
30036
30037      CXX=$POTENTIAL_CXX
30038    fi
30039
30040    if test "x$CXX" = x; then
30041
30042  # Print a helpful message on how to acquire the necessary build dependency.
30043  # devkit is the help tag: freetype, cups, pulse, alsa etc
30044  MISSING_DEPENDENCY=devkit
30045
30046  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30047    cygwin_help $MISSING_DEPENDENCY
30048  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30049    msys_help $MISSING_DEPENDENCY
30050  else
30051    PKGHANDLER_COMMAND=
30052
30053    case $PKGHANDLER in
30054      apt-get)
30055        apt_help     $MISSING_DEPENDENCY ;;
30056      yum)
30057        yum_help     $MISSING_DEPENDENCY ;;
30058      port)
30059        port_help    $MISSING_DEPENDENCY ;;
30060      pkgutil)
30061        pkgutil_help $MISSING_DEPENDENCY ;;
30062      pkgadd)
30063        pkgadd_help  $MISSING_DEPENDENCY ;;
30064    esac
30065
30066    if test "x$PKGHANDLER_COMMAND" != x; then
30067      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30068    fi
30069  fi
30070
30071      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
30072    fi
30073  fi
30074
30075  # Now we have a compiler binary in CXX. Make sure it's okay.
30076
30077  # Only process if variable expands to non-empty
30078
30079  if test "x$CXX" != x; then
30080    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30081
30082  # First separate the path from the arguments. This will split at the first
30083  # space.
30084  complete="$CXX"
30085  path="${complete%% *}"
30086  tmp="$complete EOL"
30087  arguments="${tmp#* }"
30088
30089  # Input might be given as Windows format, start by converting to
30090  # unix format.
30091  new_path=`$CYGPATH -u "$path"`
30092
30093  # Now try to locate executable using which
30094  new_path=`$WHICH "$new_path" 2> /dev/null`
30095  # bat and cmd files are not always considered executable in cygwin causing which
30096  # to not find them
30097  if test "x$new_path" = x \
30098      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30099      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30100    new_path=`$CYGPATH -u "$path"`
30101  fi
30102  if test "x$new_path" = x; then
30103    # Oops. Which didn't find the executable.
30104    # The splitting of arguments from the executable at a space might have been incorrect,
30105    # since paths with space are more likely in Windows. Give it another try with the whole
30106    # argument.
30107    path="$complete"
30108    arguments="EOL"
30109    new_path=`$CYGPATH -u "$path"`
30110    new_path=`$WHICH "$new_path" 2> /dev/null`
30111    # bat and cmd files are not always considered executable in cygwin causing which
30112    # to not find them
30113    if test "x$new_path" = x \
30114        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30115        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30116      new_path=`$CYGPATH -u "$path"`
30117    fi
30118    if test "x$new_path" = x; then
30119      # It's still not found. Now this is an unrecoverable error.
30120      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
30121$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
30122      has_space=`$ECHO "$complete" | $GREP " "`
30123      if test "x$has_space" != x; then
30124        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30125$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30126      fi
30127      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30128    fi
30129  fi
30130
30131  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30132  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30133  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30134  # "foo.exe" is OK but "foo" is an error.
30135  #
30136  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30137  # It is also a way to make sure we got the proper file name for the real test later on.
30138  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30139  if test "x$test_shortpath" = x; then
30140    # Short path failed, file does not exist as specified.
30141    # Try adding .exe or .cmd
30142    if test -f "${new_path}.exe"; then
30143      input_to_shortpath="${new_path}.exe"
30144    elif test -f "${new_path}.cmd"; then
30145      input_to_shortpath="${new_path}.cmd"
30146    else
30147      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
30148$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
30149      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30150$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30151      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30152    fi
30153  else
30154    input_to_shortpath="$new_path"
30155  fi
30156
30157  # Call helper function which possibly converts this using DOS-style short mode.
30158  # If so, the updated path is stored in $new_path.
30159  new_path="$input_to_shortpath"
30160
30161  input_path="$input_to_shortpath"
30162  # Check if we need to convert this using DOS-style short mode. If the path
30163  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30164  # take no chances and rewrite it.
30165  # Note: m4 eats our [], so we need to use [ and ] instead.
30166  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30167  if test "x$has_forbidden_chars" != x; then
30168    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30169    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30170    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30171    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30172      # Going to short mode and back again did indeed matter. Since short mode is
30173      # case insensitive, let's make it lowercase to improve readability.
30174      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30175      # Now convert it back to Unix-style (cygpath)
30176      input_path=`$CYGPATH -u "$shortmode_path"`
30177      new_path="$input_path"
30178    fi
30179  fi
30180
30181  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30182  if test "x$test_cygdrive_prefix" = x; then
30183    # As a simple fix, exclude /usr/bin since it's not a real path.
30184    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30185      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30186      # a path prefixed by /cygdrive for fixpath to work.
30187      new_path="$CYGWIN_ROOT_PATH$input_path"
30188    fi
30189  fi
30190
30191  # remove trailing .exe if any
30192  new_path="${new_path/%.exe/}"
30193
30194    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30195
30196  # First separate the path from the arguments. This will split at the first
30197  # space.
30198  complete="$CXX"
30199  path="${complete%% *}"
30200  tmp="$complete EOL"
30201  arguments="${tmp#* }"
30202
30203  # Input might be given as Windows format, start by converting to
30204  # unix format.
30205  new_path="$path"
30206
30207  windows_path="$new_path"
30208  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30209    unix_path=`$CYGPATH -u "$windows_path"`
30210    new_path="$unix_path"
30211  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30212    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30213    new_path="$unix_path"
30214  fi
30215
30216
30217  # Now try to locate executable using which
30218  new_path=`$WHICH "$new_path" 2> /dev/null`
30219
30220  if test "x$new_path" = x; then
30221    # Oops. Which didn't find the executable.
30222    # The splitting of arguments from the executable at a space might have been incorrect,
30223    # since paths with space are more likely in Windows. Give it another try with the whole
30224    # argument.
30225    path="$complete"
30226    arguments="EOL"
30227    new_path="$path"
30228
30229  windows_path="$new_path"
30230  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30231    unix_path=`$CYGPATH -u "$windows_path"`
30232    new_path="$unix_path"
30233  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30234    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30235    new_path="$unix_path"
30236  fi
30237
30238
30239    new_path=`$WHICH "$new_path" 2> /dev/null`
30240    # bat and cmd files are not always considered executable in MSYS causing which
30241    # to not find them
30242    if test "x$new_path" = x \
30243        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30244        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30245      new_path="$path"
30246
30247  windows_path="$new_path"
30248  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30249    unix_path=`$CYGPATH -u "$windows_path"`
30250    new_path="$unix_path"
30251  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30252    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30253    new_path="$unix_path"
30254  fi
30255
30256    fi
30257
30258    if test "x$new_path" = x; then
30259      # It's still not found. Now this is an unrecoverable error.
30260      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
30261$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
30262      has_space=`$ECHO "$complete" | $GREP " "`
30263      if test "x$has_space" != x; then
30264        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30265$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30266      fi
30267      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30268    fi
30269  fi
30270
30271  # Now new_path has a complete unix path to the binary
30272  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30273    # Keep paths in /bin as-is, but remove trailing .exe if any
30274    new_path="${new_path/%.exe/}"
30275    # Do not save /bin paths to all_fixpath_prefixes!
30276  else
30277    # Not in mixed or Windows style, start by that.
30278    new_path=`cmd //c echo $new_path`
30279
30280  input_path="$new_path"
30281  # Check if we need to convert this using DOS-style short mode. If the path
30282  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30283  # take no chances and rewrite it.
30284  # Note: m4 eats our [], so we need to use [ and ] instead.
30285  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30286  if test "x$has_forbidden_chars" != x; then
30287    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30288    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30289  fi
30290
30291    # Output is in $new_path
30292
30293  windows_path="$new_path"
30294  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30295    unix_path=`$CYGPATH -u "$windows_path"`
30296    new_path="$unix_path"
30297  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30298    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30299    new_path="$unix_path"
30300  fi
30301
30302    # remove trailing .exe if any
30303    new_path="${new_path/%.exe/}"
30304
30305    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30306    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30307  fi
30308
30309    else
30310      # We're on a unix platform. Hooray! :)
30311      # First separate the path from the arguments. This will split at the first
30312      # space.
30313      complete="$CXX"
30314      path="${complete%% *}"
30315      tmp="$complete EOL"
30316      arguments="${tmp#* }"
30317
30318      # Cannot rely on the command "which" here since it doesn't always work.
30319      is_absolute_path=`$ECHO "$path" | $GREP ^/`
30320      if test -z "$is_absolute_path"; then
30321        # Path to executable is not absolute. Find it.
30322        IFS_save="$IFS"
30323        IFS=:
30324        for p in $PATH; do
30325          if test -f "$p/$path" && test -x "$p/$path"; then
30326            new_path="$p/$path"
30327            break
30328          fi
30329        done
30330        IFS="$IFS_save"
30331      else
30332        # This is an absolute path, we can use it without further modifications.
30333        new_path="$path"
30334      fi
30335
30336      if test "x$new_path" = x; then
30337        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
30338$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
30339        has_space=`$ECHO "$complete" | $GREP " "`
30340        if test "x$has_space" != x; then
30341          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30342$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30343        fi
30344        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30345      fi
30346    fi
30347
30348    # Now join together the path and the arguments once again
30349    if test "x$arguments" != xEOL; then
30350      new_complete="$new_path ${arguments% *}"
30351    else
30352      new_complete="$new_path"
30353    fi
30354
30355    if test "x$complete" != "x$new_complete"; then
30356      CXX="$new_complete"
30357      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
30358$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
30359    fi
30360  fi
30361
30362  TEST_COMPILER="$CXX"
30363  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
30364  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
30365  if test "x$OPENJDK_BUILD_OS" != xaix; then
30366    # FIXME: This test should not be needed anymore; we don't do that for any platform.
30367    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
30368$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
30369
30370  if test "x$OPENJDK_BUILD_OS" != xwindows; then
30371    # Follow a chain of symbolic links. Use readlink
30372    # where it exists, else fall back to horribly
30373    # complicated shell code.
30374    if test "x$READLINK_TESTED" != yes; then
30375      # On MacOSX there is a readlink tool with a different
30376      # purpose than the GNU readlink tool. Check the found readlink.
30377      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
30378      if test "x$ISGNU" = x; then
30379        # A readlink that we do not know how to use.
30380        # Are there other non-GNU readlinks out there?
30381        READLINK_TESTED=yes
30382        READLINK=
30383      fi
30384    fi
30385
30386    if test "x$READLINK" != x; then
30387      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
30388    else
30389      # Save the current directory for restoring afterwards
30390      STARTDIR=$PWD
30391      COUNTER=0
30392      sym_link_dir=`$DIRNAME $TEST_COMPILER`
30393      sym_link_file=`$BASENAME $TEST_COMPILER`
30394      cd $sym_link_dir
30395      # Use -P flag to resolve symlinks in directories.
30396      cd `$THEPWDCMD -P`
30397      sym_link_dir=`$THEPWDCMD -P`
30398      # Resolve file symlinks
30399      while test $COUNTER -lt 20; do
30400        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
30401        if test "x$ISLINK" == x; then
30402          # This is not a symbolic link! We are done!
30403          break
30404        fi
30405        # Again resolve directory symlinks since the target of the just found
30406        # link could be in a different directory
30407        cd `$DIRNAME $ISLINK`
30408        sym_link_dir=`$THEPWDCMD -P`
30409        sym_link_file=`$BASENAME $ISLINK`
30410        let COUNTER=COUNTER+1
30411      done
30412      cd $STARTDIR
30413      TEST_COMPILER=$sym_link_dir/$sym_link_file
30414    fi
30415  fi
30416
30417    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
30418$as_echo "$TEST_COMPILER" >&6; }
30419  fi
30420  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
30421$as_echo_n "checking if CXX is disguised ccache... " >&6; }
30422
30423  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
30424  if test "x$COMPILER_BASENAME" = "xccache"; then
30425    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
30426$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
30427    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
30428    # We want to control ccache invocation ourselves, so ignore this cc and try
30429    # searching again.
30430
30431    # Remove the path to the fake ccache cc from the PATH
30432    RETRY_COMPILER_SAVED_PATH="$PATH"
30433    COMPILER_DIRNAME=`$DIRNAME $CXX`
30434    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
30435
30436    # Try again looking for our compiler
30437    if test -n "$ac_tool_prefix"; then
30438  for ac_prog in $TOOLCHAIN_CXX_BINARY
30439  do
30440    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
30441set dummy $ac_tool_prefix$ac_prog; ac_word=$2
30442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30443$as_echo_n "checking for $ac_word... " >&6; }
30444if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
30445  $as_echo_n "(cached) " >&6
30446else
30447  if test -n "$PROPER_COMPILER_CXX"; then
30448  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
30449else
30450as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30451for as_dir in $PATH
30452do
30453  IFS=$as_save_IFS
30454  test -z "$as_dir" && as_dir=.
30455    for ac_exec_ext in '' $ac_executable_extensions; do
30456  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30457    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
30458    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30459    break 2
30460  fi
30461done
30462  done
30463IFS=$as_save_IFS
30464
30465fi
30466fi
30467PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
30468if test -n "$PROPER_COMPILER_CXX"; then
30469  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
30470$as_echo "$PROPER_COMPILER_CXX" >&6; }
30471else
30472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30473$as_echo "no" >&6; }
30474fi
30475
30476
30477    test -n "$PROPER_COMPILER_CXX" && break
30478  done
30479fi
30480if test -z "$PROPER_COMPILER_CXX"; then
30481  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
30482  for ac_prog in $TOOLCHAIN_CXX_BINARY
30483do
30484  # Extract the first word of "$ac_prog", so it can be a program name with args.
30485set dummy $ac_prog; ac_word=$2
30486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30487$as_echo_n "checking for $ac_word... " >&6; }
30488if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
30489  $as_echo_n "(cached) " >&6
30490else
30491  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
30492  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
30493else
30494as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30495for as_dir in $PATH
30496do
30497  IFS=$as_save_IFS
30498  test -z "$as_dir" && as_dir=.
30499    for ac_exec_ext in '' $ac_executable_extensions; do
30500  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30501    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
30502    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30503    break 2
30504  fi
30505done
30506  done
30507IFS=$as_save_IFS
30508
30509fi
30510fi
30511ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
30512if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
30513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
30514$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
30515else
30516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30517$as_echo "no" >&6; }
30518fi
30519
30520
30521  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
30522done
30523
30524  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
30525    PROPER_COMPILER_CXX=""
30526  else
30527    case $cross_compiling:$ac_tool_warned in
30528yes:)
30529{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30530$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30531ac_tool_warned=yes ;;
30532esac
30533    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
30534  fi
30535fi
30536
30537
30538  # Only process if variable expands to non-empty
30539
30540  if test "x$PROPER_COMPILER_CXX" != x; then
30541    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30542
30543  # First separate the path from the arguments. This will split at the first
30544  # space.
30545  complete="$PROPER_COMPILER_CXX"
30546  path="${complete%% *}"
30547  tmp="$complete EOL"
30548  arguments="${tmp#* }"
30549
30550  # Input might be given as Windows format, start by converting to
30551  # unix format.
30552  new_path=`$CYGPATH -u "$path"`
30553
30554  # Now try to locate executable using which
30555  new_path=`$WHICH "$new_path" 2> /dev/null`
30556  # bat and cmd files are not always considered executable in cygwin causing which
30557  # to not find them
30558  if test "x$new_path" = x \
30559      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30560      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30561    new_path=`$CYGPATH -u "$path"`
30562  fi
30563  if test "x$new_path" = x; then
30564    # Oops. Which didn't find the executable.
30565    # The splitting of arguments from the executable at a space might have been incorrect,
30566    # since paths with space are more likely in Windows. Give it another try with the whole
30567    # argument.
30568    path="$complete"
30569    arguments="EOL"
30570    new_path=`$CYGPATH -u "$path"`
30571    new_path=`$WHICH "$new_path" 2> /dev/null`
30572    # bat and cmd files are not always considered executable in cygwin causing which
30573    # to not find them
30574    if test "x$new_path" = x \
30575        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30576        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30577      new_path=`$CYGPATH -u "$path"`
30578    fi
30579    if test "x$new_path" = x; then
30580      # It's still not found. Now this is an unrecoverable error.
30581      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30582$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30583      has_space=`$ECHO "$complete" | $GREP " "`
30584      if test "x$has_space" != x; then
30585        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30586$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30587      fi
30588      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30589    fi
30590  fi
30591
30592  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30593  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30594  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30595  # "foo.exe" is OK but "foo" is an error.
30596  #
30597  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30598  # It is also a way to make sure we got the proper file name for the real test later on.
30599  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30600  if test "x$test_shortpath" = x; then
30601    # Short path failed, file does not exist as specified.
30602    # Try adding .exe or .cmd
30603    if test -f "${new_path}.exe"; then
30604      input_to_shortpath="${new_path}.exe"
30605    elif test -f "${new_path}.cmd"; then
30606      input_to_shortpath="${new_path}.cmd"
30607    else
30608      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
30609$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
30610      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30611$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30612      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30613    fi
30614  else
30615    input_to_shortpath="$new_path"
30616  fi
30617
30618  # Call helper function which possibly converts this using DOS-style short mode.
30619  # If so, the updated path is stored in $new_path.
30620  new_path="$input_to_shortpath"
30621
30622  input_path="$input_to_shortpath"
30623  # Check if we need to convert this using DOS-style short mode. If the path
30624  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30625  # take no chances and rewrite it.
30626  # Note: m4 eats our [], so we need to use [ and ] instead.
30627  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30628  if test "x$has_forbidden_chars" != x; then
30629    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30630    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30631    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30632    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30633      # Going to short mode and back again did indeed matter. Since short mode is
30634      # case insensitive, let's make it lowercase to improve readability.
30635      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30636      # Now convert it back to Unix-style (cygpath)
30637      input_path=`$CYGPATH -u "$shortmode_path"`
30638      new_path="$input_path"
30639    fi
30640  fi
30641
30642  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30643  if test "x$test_cygdrive_prefix" = x; then
30644    # As a simple fix, exclude /usr/bin since it's not a real path.
30645    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30646      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30647      # a path prefixed by /cygdrive for fixpath to work.
30648      new_path="$CYGWIN_ROOT_PATH$input_path"
30649    fi
30650  fi
30651
30652  # remove trailing .exe if any
30653  new_path="${new_path/%.exe/}"
30654
30655    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30656
30657  # First separate the path from the arguments. This will split at the first
30658  # space.
30659  complete="$PROPER_COMPILER_CXX"
30660  path="${complete%% *}"
30661  tmp="$complete EOL"
30662  arguments="${tmp#* }"
30663
30664  # Input might be given as Windows format, start by converting to
30665  # unix format.
30666  new_path="$path"
30667
30668  windows_path="$new_path"
30669  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30670    unix_path=`$CYGPATH -u "$windows_path"`
30671    new_path="$unix_path"
30672  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30673    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30674    new_path="$unix_path"
30675  fi
30676
30677
30678  # Now try to locate executable using which
30679  new_path=`$WHICH "$new_path" 2> /dev/null`
30680
30681  if test "x$new_path" = x; then
30682    # Oops. Which didn't find the executable.
30683    # The splitting of arguments from the executable at a space might have been incorrect,
30684    # since paths with space are more likely in Windows. Give it another try with the whole
30685    # argument.
30686    path="$complete"
30687    arguments="EOL"
30688    new_path="$path"
30689
30690  windows_path="$new_path"
30691  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30692    unix_path=`$CYGPATH -u "$windows_path"`
30693    new_path="$unix_path"
30694  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30695    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30696    new_path="$unix_path"
30697  fi
30698
30699
30700    new_path=`$WHICH "$new_path" 2> /dev/null`
30701    # bat and cmd files are not always considered executable in MSYS causing which
30702    # to not find them
30703    if test "x$new_path" = x \
30704        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30705        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30706      new_path="$path"
30707
30708  windows_path="$new_path"
30709  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30710    unix_path=`$CYGPATH -u "$windows_path"`
30711    new_path="$unix_path"
30712  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30713    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30714    new_path="$unix_path"
30715  fi
30716
30717    fi
30718
30719    if test "x$new_path" = x; then
30720      # It's still not found. Now this is an unrecoverable error.
30721      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30722$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30723      has_space=`$ECHO "$complete" | $GREP " "`
30724      if test "x$has_space" != x; then
30725        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30726$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30727      fi
30728      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30729    fi
30730  fi
30731
30732  # Now new_path has a complete unix path to the binary
30733  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30734    # Keep paths in /bin as-is, but remove trailing .exe if any
30735    new_path="${new_path/%.exe/}"
30736    # Do not save /bin paths to all_fixpath_prefixes!
30737  else
30738    # Not in mixed or Windows style, start by that.
30739    new_path=`cmd //c echo $new_path`
30740
30741  input_path="$new_path"
30742  # Check if we need to convert this using DOS-style short mode. If the path
30743  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30744  # take no chances and rewrite it.
30745  # Note: m4 eats our [], so we need to use [ and ] instead.
30746  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30747  if test "x$has_forbidden_chars" != x; then
30748    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30749    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30750  fi
30751
30752    # Output is in $new_path
30753
30754  windows_path="$new_path"
30755  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30756    unix_path=`$CYGPATH -u "$windows_path"`
30757    new_path="$unix_path"
30758  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30759    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30760    new_path="$unix_path"
30761  fi
30762
30763    # remove trailing .exe if any
30764    new_path="${new_path/%.exe/}"
30765
30766    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30767    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30768  fi
30769
30770    else
30771      # We're on a unix platform. Hooray! :)
30772      # First separate the path from the arguments. This will split at the first
30773      # space.
30774      complete="$PROPER_COMPILER_CXX"
30775      path="${complete%% *}"
30776      tmp="$complete EOL"
30777      arguments="${tmp#* }"
30778
30779      # Cannot rely on the command "which" here since it doesn't always work.
30780      is_absolute_path=`$ECHO "$path" | $GREP ^/`
30781      if test -z "$is_absolute_path"; then
30782        # Path to executable is not absolute. Find it.
30783        IFS_save="$IFS"
30784        IFS=:
30785        for p in $PATH; do
30786          if test -f "$p/$path" && test -x "$p/$path"; then
30787            new_path="$p/$path"
30788            break
30789          fi
30790        done
30791        IFS="$IFS_save"
30792      else
30793        # This is an absolute path, we can use it without further modifications.
30794        new_path="$path"
30795      fi
30796
30797      if test "x$new_path" = x; then
30798        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30799$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30800        has_space=`$ECHO "$complete" | $GREP " "`
30801        if test "x$has_space" != x; then
30802          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30803$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30804        fi
30805        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30806      fi
30807    fi
30808
30809    # Now join together the path and the arguments once again
30810    if test "x$arguments" != xEOL; then
30811      new_complete="$new_path ${arguments% *}"
30812    else
30813      new_complete="$new_path"
30814    fi
30815
30816    if test "x$complete" != "x$new_complete"; then
30817      PROPER_COMPILER_CXX="$new_complete"
30818      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
30819$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
30820    fi
30821  fi
30822
30823    PATH="$RETRY_COMPILER_SAVED_PATH"
30824
30825    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
30826$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
30827
30828  if test "x$OPENJDK_BUILD_OS" != xwindows; then
30829    # Follow a chain of symbolic links. Use readlink
30830    # where it exists, else fall back to horribly
30831    # complicated shell code.
30832    if test "x$READLINK_TESTED" != yes; then
30833      # On MacOSX there is a readlink tool with a different
30834      # purpose than the GNU readlink tool. Check the found readlink.
30835      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
30836      if test "x$ISGNU" = x; then
30837        # A readlink that we do not know how to use.
30838        # Are there other non-GNU readlinks out there?
30839        READLINK_TESTED=yes
30840        READLINK=
30841      fi
30842    fi
30843
30844    if test "x$READLINK" != x; then
30845      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
30846    else
30847      # Save the current directory for restoring afterwards
30848      STARTDIR=$PWD
30849      COUNTER=0
30850      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
30851      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
30852      cd $sym_link_dir
30853      # Use -P flag to resolve symlinks in directories.
30854      cd `$THEPWDCMD -P`
30855      sym_link_dir=`$THEPWDCMD -P`
30856      # Resolve file symlinks
30857      while test $COUNTER -lt 20; do
30858        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
30859        if test "x$ISLINK" == x; then
30860          # This is not a symbolic link! We are done!
30861          break
30862        fi
30863        # Again resolve directory symlinks since the target of the just found
30864        # link could be in a different directory
30865        cd `$DIRNAME $ISLINK`
30866        sym_link_dir=`$THEPWDCMD -P`
30867        sym_link_file=`$BASENAME $ISLINK`
30868        let COUNTER=COUNTER+1
30869      done
30870      cd $STARTDIR
30871      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
30872    fi
30873  fi
30874
30875    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
30876$as_echo "$PROPER_COMPILER_CXX" >&6; }
30877    CXX="$PROPER_COMPILER_CXX"
30878  else
30879    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
30880$as_echo "no, keeping CXX" >&6; }
30881  fi
30882
30883
30884  COMPILER=$CXX
30885  COMPILER_NAME=$COMPILER_NAME
30886
30887  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
30888    # cc -V output typically looks like
30889    #     cc: Sun C 5.12 Linux_i386 2011/11/16
30890    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
30891    # Check that this is likely to be the Solaris Studio cc.
30892    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
30893    if test $? -ne 0; then
30894      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30895      { $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
30896$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30897      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30898$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30899      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30900$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30901      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30902    fi
30903    # Remove usage instructions (if present), and
30904    # collapse compiler output into a single line
30905    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30906        $SED -e 's/ *[Uu]sage:.*//'`
30907    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30908        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
30909  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
30910    # xlc -qversion output typically looks like
30911    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
30912    #     Version: 11.01.0000.0015
30913    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
30914    # Check that this is likely to be the IBM XL C compiler.
30915    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
30916    if test $? -ne 0; then
30917      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30918      { $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
30919$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30920      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30921$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30922      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30923$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30924      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30925    fi
30926    # Collapse compiler output into a single line
30927    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30928    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30929        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
30930  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
30931    # There is no specific version flag, but all output starts with a version string.
30932    # First line typically looks something like:
30933    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
30934    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
30935    # Check that this is likely to be Microsoft CL.EXE.
30936    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
30937    if test $? -ne 0; then
30938      { $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
30939$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30940      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30941$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30942      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30943    fi
30944    # Collapse compiler output into a single line
30945    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30946    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30947        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
30948  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
30949    # gcc --version output typically looks like
30950    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
30951    #     Copyright (C) 2013 Free Software Foundation, Inc.
30952    #     This is free software; see the source for copying conditions.  There is NO
30953    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
30954    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30955    # Check that this is likely to be GCC.
30956    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
30957    if test $? -ne 0; then
30958      { $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
30959$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30960      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
30961$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
30962      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30963    fi
30964    # Remove Copyright and legalese from version string, and
30965    # collapse into a single line
30966    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30967        $SED -e 's/ *Copyright .*//'`
30968    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30969        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
30970  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
30971    # clang --version output typically looks like
30972    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
30973    #    clang version 3.3 (tags/RELEASE_33/final)
30974    # or
30975    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
30976    #    Target: x86_64-pc-linux-gnu
30977    #    Thread model: posix
30978    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30979    # Check that this is likely to be clang
30980    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
30981    if test $? -ne 0; then
30982      { $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
30983$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30984      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30985$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30986      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30987    fi
30988    # Collapse compiler output into a single line
30989    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30990    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30991        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
30992  else
30993      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
30994  fi
30995  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
30996  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
30997  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
30998  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
30999
31000  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
31001$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
31002
31003
31004  # Now that we have resolved CXX ourself, let autoconf have its go at it
31005  ac_ext=cpp
31006ac_cpp='$CXXCPP $CPPFLAGS'
31007ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31008ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31009ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31010if test -z "$CXX"; then
31011  if test -n "$CCC"; then
31012    CXX=$CCC
31013  else
31014    if test -n "$ac_tool_prefix"; then
31015  for ac_prog in $CXX
31016  do
31017    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
31018set dummy $ac_tool_prefix$ac_prog; ac_word=$2
31019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31020$as_echo_n "checking for $ac_word... " >&6; }
31021if ${ac_cv_prog_CXX+:} false; then :
31022  $as_echo_n "(cached) " >&6
31023else
31024  if test -n "$CXX"; then
31025  ac_cv_prog_CXX="$CXX" # Let the user override the test.
31026else
31027as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31028for as_dir in $PATH
31029do
31030  IFS=$as_save_IFS
31031  test -z "$as_dir" && as_dir=.
31032    for ac_exec_ext in '' $ac_executable_extensions; do
31033  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31034    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
31035    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31036    break 2
31037  fi
31038done
31039  done
31040IFS=$as_save_IFS
31041
31042fi
31043fi
31044CXX=$ac_cv_prog_CXX
31045if test -n "$CXX"; then
31046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
31047$as_echo "$CXX" >&6; }
31048else
31049  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31050$as_echo "no" >&6; }
31051fi
31052
31053
31054    test -n "$CXX" && break
31055  done
31056fi
31057if test -z "$CXX"; then
31058  ac_ct_CXX=$CXX
31059  for ac_prog in $CXX
31060do
31061  # Extract the first word of "$ac_prog", so it can be a program name with args.
31062set dummy $ac_prog; ac_word=$2
31063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31064$as_echo_n "checking for $ac_word... " >&6; }
31065if ${ac_cv_prog_ac_ct_CXX+:} false; then :
31066  $as_echo_n "(cached) " >&6
31067else
31068  if test -n "$ac_ct_CXX"; then
31069  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
31070else
31071as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31072for as_dir in $PATH
31073do
31074  IFS=$as_save_IFS
31075  test -z "$as_dir" && as_dir=.
31076    for ac_exec_ext in '' $ac_executable_extensions; do
31077  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31078    ac_cv_prog_ac_ct_CXX="$ac_prog"
31079    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31080    break 2
31081  fi
31082done
31083  done
31084IFS=$as_save_IFS
31085
31086fi
31087fi
31088ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
31089if test -n "$ac_ct_CXX"; then
31090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
31091$as_echo "$ac_ct_CXX" >&6; }
31092else
31093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31094$as_echo "no" >&6; }
31095fi
31096
31097
31098  test -n "$ac_ct_CXX" && break
31099done
31100
31101  if test "x$ac_ct_CXX" = x; then
31102    CXX="g++"
31103  else
31104    case $cross_compiling:$ac_tool_warned in
31105yes:)
31106{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
31107$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
31108ac_tool_warned=yes ;;
31109esac
31110    CXX=$ac_ct_CXX
31111  fi
31112fi
31113
31114  fi
31115fi
31116# Provide some information about the compiler.
31117$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
31118set X $ac_compile
31119ac_compiler=$2
31120for ac_option in --version -v -V -qversion; do
31121  { { ac_try="$ac_compiler $ac_option >&5"
31122case "(($ac_try" in
31123  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
31124  *) ac_try_echo=$ac_try;;
31125esac
31126eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
31127$as_echo "$ac_try_echo"; } >&5
31128  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
31129  ac_status=$?
31130  if test -s conftest.err; then
31131    sed '10a\
31132... rest of stderr output deleted ...
31133         10q' conftest.err >conftest.er1
31134    cat conftest.er1 >&5
31135  fi
31136  rm -f conftest.er1 conftest.err
31137  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31138  test $ac_status = 0; }
31139done
31140
31141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
31142$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
31143if ${ac_cv_cxx_compiler_gnu+:} false; then :
31144  $as_echo_n "(cached) " >&6
31145else
31146  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31147/* end confdefs.h.  */
31148
31149int
31150main ()
31151{
31152#ifndef __GNUC__
31153       choke me
31154#endif
31155
31156  ;
31157  return 0;
31158}
31159_ACEOF
31160if ac_fn_cxx_try_compile "$LINENO"; then :
31161  ac_compiler_gnu=yes
31162else
31163  ac_compiler_gnu=no
31164fi
31165rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31166ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
31167
31168fi
31169{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
31170$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
31171if test $ac_compiler_gnu = yes; then
31172  GXX=yes
31173else
31174  GXX=
31175fi
31176ac_test_CXXFLAGS=${CXXFLAGS+set}
31177ac_save_CXXFLAGS=$CXXFLAGS
31178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
31179$as_echo_n "checking whether $CXX accepts -g... " >&6; }
31180if ${ac_cv_prog_cxx_g+:} false; then :
31181  $as_echo_n "(cached) " >&6
31182else
31183  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
31184   ac_cxx_werror_flag=yes
31185   ac_cv_prog_cxx_g=no
31186   CXXFLAGS="-g"
31187   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31188/* end confdefs.h.  */
31189
31190int
31191main ()
31192{
31193
31194  ;
31195  return 0;
31196}
31197_ACEOF
31198if ac_fn_cxx_try_compile "$LINENO"; then :
31199  ac_cv_prog_cxx_g=yes
31200else
31201  CXXFLAGS=""
31202      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31203/* end confdefs.h.  */
31204
31205int
31206main ()
31207{
31208
31209  ;
31210  return 0;
31211}
31212_ACEOF
31213if ac_fn_cxx_try_compile "$LINENO"; then :
31214
31215else
31216  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
31217	 CXXFLAGS="-g"
31218	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31219/* end confdefs.h.  */
31220
31221int
31222main ()
31223{
31224
31225  ;
31226  return 0;
31227}
31228_ACEOF
31229if ac_fn_cxx_try_compile "$LINENO"; then :
31230  ac_cv_prog_cxx_g=yes
31231fi
31232rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31233fi
31234rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31235fi
31236rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31237   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
31238fi
31239{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
31240$as_echo "$ac_cv_prog_cxx_g" >&6; }
31241if test "$ac_test_CXXFLAGS" = set; then
31242  CXXFLAGS=$ac_save_CXXFLAGS
31243elif test $ac_cv_prog_cxx_g = yes; then
31244  if test "$GXX" = yes; then
31245    CXXFLAGS="-g -O2"
31246  else
31247    CXXFLAGS="-g"
31248  fi
31249else
31250  if test "$GXX" = yes; then
31251    CXXFLAGS="-O2"
31252  else
31253    CXXFLAGS=
31254  fi
31255fi
31256ac_ext=cpp
31257ac_cpp='$CXXCPP $CPPFLAGS'
31258ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31259ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31260ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31261
31262
31263  #
31264  # Setup the preprocessor (CPP and CXXCPP)
31265  #
31266  ac_ext=c
31267ac_cpp='$CPP $CPPFLAGS'
31268ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31269ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31270ac_compiler_gnu=$ac_cv_c_compiler_gnu
31271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
31272$as_echo_n "checking how to run the C preprocessor... " >&6; }
31273# On Suns, sometimes $CPP names a directory.
31274if test -n "$CPP" && test -d "$CPP"; then
31275  CPP=
31276fi
31277if test -z "$CPP"; then
31278  if ${ac_cv_prog_CPP+:} false; then :
31279  $as_echo_n "(cached) " >&6
31280else
31281      # Double quotes because CPP needs to be expanded
31282    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
31283    do
31284      ac_preproc_ok=false
31285for ac_c_preproc_warn_flag in '' yes
31286do
31287  # Use a header file that comes with gcc, so configuring glibc
31288  # with a fresh cross-compiler works.
31289  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31290  # <limits.h> exists even on freestanding compilers.
31291  # On the NeXT, cc -E runs the code through the compiler's parser,
31292  # not just through cpp. "Syntax error" is here to catch this case.
31293  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31294/* end confdefs.h.  */
31295#ifdef __STDC__
31296# include <limits.h>
31297#else
31298# include <assert.h>
31299#endif
31300		     Syntax error
31301_ACEOF
31302if ac_fn_c_try_cpp "$LINENO"; then :
31303
31304else
31305  # Broken: fails on valid input.
31306continue
31307fi
31308rm -f conftest.err conftest.i conftest.$ac_ext
31309
31310  # OK, works on sane cases.  Now check whether nonexistent headers
31311  # can be detected and how.
31312  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31313/* end confdefs.h.  */
31314#include <ac_nonexistent.h>
31315_ACEOF
31316if ac_fn_c_try_cpp "$LINENO"; then :
31317  # Broken: success on invalid input.
31318continue
31319else
31320  # Passes both tests.
31321ac_preproc_ok=:
31322break
31323fi
31324rm -f conftest.err conftest.i conftest.$ac_ext
31325
31326done
31327# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31328rm -f conftest.i conftest.err conftest.$ac_ext
31329if $ac_preproc_ok; then :
31330  break
31331fi
31332
31333    done
31334    ac_cv_prog_CPP=$CPP
31335
31336fi
31337  CPP=$ac_cv_prog_CPP
31338else
31339  ac_cv_prog_CPP=$CPP
31340fi
31341{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
31342$as_echo "$CPP" >&6; }
31343ac_preproc_ok=false
31344for ac_c_preproc_warn_flag in '' yes
31345do
31346  # Use a header file that comes with gcc, so configuring glibc
31347  # with a fresh cross-compiler works.
31348  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31349  # <limits.h> exists even on freestanding compilers.
31350  # On the NeXT, cc -E runs the code through the compiler's parser,
31351  # not just through cpp. "Syntax error" is here to catch this case.
31352  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31353/* end confdefs.h.  */
31354#ifdef __STDC__
31355# include <limits.h>
31356#else
31357# include <assert.h>
31358#endif
31359		     Syntax error
31360_ACEOF
31361if ac_fn_c_try_cpp "$LINENO"; then :
31362
31363else
31364  # Broken: fails on valid input.
31365continue
31366fi
31367rm -f conftest.err conftest.i conftest.$ac_ext
31368
31369  # OK, works on sane cases.  Now check whether nonexistent headers
31370  # can be detected and how.
31371  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31372/* end confdefs.h.  */
31373#include <ac_nonexistent.h>
31374_ACEOF
31375if ac_fn_c_try_cpp "$LINENO"; then :
31376  # Broken: success on invalid input.
31377continue
31378else
31379  # Passes both tests.
31380ac_preproc_ok=:
31381break
31382fi
31383rm -f conftest.err conftest.i conftest.$ac_ext
31384
31385done
31386# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31387rm -f conftest.i conftest.err conftest.$ac_ext
31388if $ac_preproc_ok; then :
31389
31390else
31391  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
31392$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
31393as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
31394See \`config.log' for more details" "$LINENO" 5; }
31395fi
31396
31397ac_ext=cpp
31398ac_cpp='$CXXCPP $CPPFLAGS'
31399ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31400ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31401ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31402
31403
31404  # Only process if variable expands to non-empty
31405
31406  if test "x$CPP" != x; then
31407    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31408
31409  # First separate the path from the arguments. This will split at the first
31410  # space.
31411  complete="$CPP"
31412  path="${complete%% *}"
31413  tmp="$complete EOL"
31414  arguments="${tmp#* }"
31415
31416  # Input might be given as Windows format, start by converting to
31417  # unix format.
31418  new_path=`$CYGPATH -u "$path"`
31419
31420  # Now try to locate executable using which
31421  new_path=`$WHICH "$new_path" 2> /dev/null`
31422  # bat and cmd files are not always considered executable in cygwin causing which
31423  # to not find them
31424  if test "x$new_path" = x \
31425      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31426      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31427    new_path=`$CYGPATH -u "$path"`
31428  fi
31429  if test "x$new_path" = x; then
31430    # Oops. Which didn't find the executable.
31431    # The splitting of arguments from the executable at a space might have been incorrect,
31432    # since paths with space are more likely in Windows. Give it another try with the whole
31433    # argument.
31434    path="$complete"
31435    arguments="EOL"
31436    new_path=`$CYGPATH -u "$path"`
31437    new_path=`$WHICH "$new_path" 2> /dev/null`
31438    # bat and cmd files are not always considered executable in cygwin causing which
31439    # to not find them
31440    if test "x$new_path" = x \
31441        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31442        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31443      new_path=`$CYGPATH -u "$path"`
31444    fi
31445    if test "x$new_path" = x; then
31446      # It's still not found. Now this is an unrecoverable error.
31447      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31448$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31449      has_space=`$ECHO "$complete" | $GREP " "`
31450      if test "x$has_space" != x; then
31451        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31452$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31453      fi
31454      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31455    fi
31456  fi
31457
31458  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31459  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31460  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31461  # "foo.exe" is OK but "foo" is an error.
31462  #
31463  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31464  # It is also a way to make sure we got the proper file name for the real test later on.
31465  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31466  if test "x$test_shortpath" = x; then
31467    # Short path failed, file does not exist as specified.
31468    # Try adding .exe or .cmd
31469    if test -f "${new_path}.exe"; then
31470      input_to_shortpath="${new_path}.exe"
31471    elif test -f "${new_path}.cmd"; then
31472      input_to_shortpath="${new_path}.cmd"
31473    else
31474      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
31475$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
31476      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31477$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31478      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31479    fi
31480  else
31481    input_to_shortpath="$new_path"
31482  fi
31483
31484  # Call helper function which possibly converts this using DOS-style short mode.
31485  # If so, the updated path is stored in $new_path.
31486  new_path="$input_to_shortpath"
31487
31488  input_path="$input_to_shortpath"
31489  # Check if we need to convert this using DOS-style short mode. If the path
31490  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31491  # take no chances and rewrite it.
31492  # Note: m4 eats our [], so we need to use [ and ] instead.
31493  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31494  if test "x$has_forbidden_chars" != x; then
31495    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31496    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31497    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31498    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31499      # Going to short mode and back again did indeed matter. Since short mode is
31500      # case insensitive, let's make it lowercase to improve readability.
31501      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31502      # Now convert it back to Unix-style (cygpath)
31503      input_path=`$CYGPATH -u "$shortmode_path"`
31504      new_path="$input_path"
31505    fi
31506  fi
31507
31508  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31509  if test "x$test_cygdrive_prefix" = x; then
31510    # As a simple fix, exclude /usr/bin since it's not a real path.
31511    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31512      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31513      # a path prefixed by /cygdrive for fixpath to work.
31514      new_path="$CYGWIN_ROOT_PATH$input_path"
31515    fi
31516  fi
31517
31518  # remove trailing .exe if any
31519  new_path="${new_path/%.exe/}"
31520
31521    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31522
31523  # First separate the path from the arguments. This will split at the first
31524  # space.
31525  complete="$CPP"
31526  path="${complete%% *}"
31527  tmp="$complete EOL"
31528  arguments="${tmp#* }"
31529
31530  # Input might be given as Windows format, start by converting to
31531  # unix format.
31532  new_path="$path"
31533
31534  windows_path="$new_path"
31535  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31536    unix_path=`$CYGPATH -u "$windows_path"`
31537    new_path="$unix_path"
31538  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31539    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31540    new_path="$unix_path"
31541  fi
31542
31543
31544  # Now try to locate executable using which
31545  new_path=`$WHICH "$new_path" 2> /dev/null`
31546
31547  if test "x$new_path" = x; then
31548    # Oops. Which didn't find the executable.
31549    # The splitting of arguments from the executable at a space might have been incorrect,
31550    # since paths with space are more likely in Windows. Give it another try with the whole
31551    # argument.
31552    path="$complete"
31553    arguments="EOL"
31554    new_path="$path"
31555
31556  windows_path="$new_path"
31557  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31558    unix_path=`$CYGPATH -u "$windows_path"`
31559    new_path="$unix_path"
31560  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31561    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31562    new_path="$unix_path"
31563  fi
31564
31565
31566    new_path=`$WHICH "$new_path" 2> /dev/null`
31567    # bat and cmd files are not always considered executable in MSYS causing which
31568    # to not find them
31569    if test "x$new_path" = x \
31570        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31571        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31572      new_path="$path"
31573
31574  windows_path="$new_path"
31575  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31576    unix_path=`$CYGPATH -u "$windows_path"`
31577    new_path="$unix_path"
31578  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31579    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31580    new_path="$unix_path"
31581  fi
31582
31583    fi
31584
31585    if test "x$new_path" = x; then
31586      # It's still not found. Now this is an unrecoverable error.
31587      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31588$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31589      has_space=`$ECHO "$complete" | $GREP " "`
31590      if test "x$has_space" != x; then
31591        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31592$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31593      fi
31594      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31595    fi
31596  fi
31597
31598  # Now new_path has a complete unix path to the binary
31599  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31600    # Keep paths in /bin as-is, but remove trailing .exe if any
31601    new_path="${new_path/%.exe/}"
31602    # Do not save /bin paths to all_fixpath_prefixes!
31603  else
31604    # Not in mixed or Windows style, start by that.
31605    new_path=`cmd //c echo $new_path`
31606
31607  input_path="$new_path"
31608  # Check if we need to convert this using DOS-style short mode. If the path
31609  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31610  # take no chances and rewrite it.
31611  # Note: m4 eats our [], so we need to use [ and ] instead.
31612  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31613  if test "x$has_forbidden_chars" != x; then
31614    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31615    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31616  fi
31617
31618    # Output is in $new_path
31619
31620  windows_path="$new_path"
31621  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31622    unix_path=`$CYGPATH -u "$windows_path"`
31623    new_path="$unix_path"
31624  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31625    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31626    new_path="$unix_path"
31627  fi
31628
31629    # remove trailing .exe if any
31630    new_path="${new_path/%.exe/}"
31631
31632    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31633    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31634  fi
31635
31636    else
31637      # We're on a unix platform. Hooray! :)
31638      # First separate the path from the arguments. This will split at the first
31639      # space.
31640      complete="$CPP"
31641      path="${complete%% *}"
31642      tmp="$complete EOL"
31643      arguments="${tmp#* }"
31644
31645      # Cannot rely on the command "which" here since it doesn't always work.
31646      is_absolute_path=`$ECHO "$path" | $GREP ^/`
31647      if test -z "$is_absolute_path"; then
31648        # Path to executable is not absolute. Find it.
31649        IFS_save="$IFS"
31650        IFS=:
31651        for p in $PATH; do
31652          if test -f "$p/$path" && test -x "$p/$path"; then
31653            new_path="$p/$path"
31654            break
31655          fi
31656        done
31657        IFS="$IFS_save"
31658      else
31659        # This is an absolute path, we can use it without further modifications.
31660        new_path="$path"
31661      fi
31662
31663      if test "x$new_path" = x; then
31664        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31665$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31666        has_space=`$ECHO "$complete" | $GREP " "`
31667        if test "x$has_space" != x; then
31668          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31669$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31670        fi
31671        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31672      fi
31673    fi
31674
31675    # Now join together the path and the arguments once again
31676    if test "x$arguments" != xEOL; then
31677      new_complete="$new_path ${arguments% *}"
31678    else
31679      new_complete="$new_path"
31680    fi
31681
31682    if test "x$complete" != "x$new_complete"; then
31683      CPP="$new_complete"
31684      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
31685$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
31686    fi
31687  fi
31688
31689  ac_ext=cpp
31690ac_cpp='$CXXCPP $CPPFLAGS'
31691ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31692ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31693ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
31695$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
31696if test -z "$CXXCPP"; then
31697  if ${ac_cv_prog_CXXCPP+:} false; then :
31698  $as_echo_n "(cached) " >&6
31699else
31700      # Double quotes because CXXCPP needs to be expanded
31701    for CXXCPP in "$CXX -E" "/lib/cpp"
31702    do
31703      ac_preproc_ok=false
31704for ac_cxx_preproc_warn_flag in '' yes
31705do
31706  # Use a header file that comes with gcc, so configuring glibc
31707  # with a fresh cross-compiler works.
31708  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31709  # <limits.h> exists even on freestanding compilers.
31710  # On the NeXT, cc -E runs the code through the compiler's parser,
31711  # not just through cpp. "Syntax error" is here to catch this case.
31712  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31713/* end confdefs.h.  */
31714#ifdef __STDC__
31715# include <limits.h>
31716#else
31717# include <assert.h>
31718#endif
31719		     Syntax error
31720_ACEOF
31721if ac_fn_cxx_try_cpp "$LINENO"; then :
31722
31723else
31724  # Broken: fails on valid input.
31725continue
31726fi
31727rm -f conftest.err conftest.i conftest.$ac_ext
31728
31729  # OK, works on sane cases.  Now check whether nonexistent headers
31730  # can be detected and how.
31731  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31732/* end confdefs.h.  */
31733#include <ac_nonexistent.h>
31734_ACEOF
31735if ac_fn_cxx_try_cpp "$LINENO"; then :
31736  # Broken: success on invalid input.
31737continue
31738else
31739  # Passes both tests.
31740ac_preproc_ok=:
31741break
31742fi
31743rm -f conftest.err conftest.i conftest.$ac_ext
31744
31745done
31746# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31747rm -f conftest.i conftest.err conftest.$ac_ext
31748if $ac_preproc_ok; then :
31749  break
31750fi
31751
31752    done
31753    ac_cv_prog_CXXCPP=$CXXCPP
31754
31755fi
31756  CXXCPP=$ac_cv_prog_CXXCPP
31757else
31758  ac_cv_prog_CXXCPP=$CXXCPP
31759fi
31760{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
31761$as_echo "$CXXCPP" >&6; }
31762ac_preproc_ok=false
31763for ac_cxx_preproc_warn_flag in '' yes
31764do
31765  # Use a header file that comes with gcc, so configuring glibc
31766  # with a fresh cross-compiler works.
31767  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31768  # <limits.h> exists even on freestanding compilers.
31769  # On the NeXT, cc -E runs the code through the compiler's parser,
31770  # not just through cpp. "Syntax error" is here to catch this case.
31771  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31772/* end confdefs.h.  */
31773#ifdef __STDC__
31774# include <limits.h>
31775#else
31776# include <assert.h>
31777#endif
31778		     Syntax error
31779_ACEOF
31780if ac_fn_cxx_try_cpp "$LINENO"; then :
31781
31782else
31783  # Broken: fails on valid input.
31784continue
31785fi
31786rm -f conftest.err conftest.i conftest.$ac_ext
31787
31788  # OK, works on sane cases.  Now check whether nonexistent headers
31789  # can be detected and how.
31790  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31791/* end confdefs.h.  */
31792#include <ac_nonexistent.h>
31793_ACEOF
31794if ac_fn_cxx_try_cpp "$LINENO"; then :
31795  # Broken: success on invalid input.
31796continue
31797else
31798  # Passes both tests.
31799ac_preproc_ok=:
31800break
31801fi
31802rm -f conftest.err conftest.i conftest.$ac_ext
31803
31804done
31805# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31806rm -f conftest.i conftest.err conftest.$ac_ext
31807if $ac_preproc_ok; then :
31808
31809else
31810  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
31811$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
31812as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
31813See \`config.log' for more details" "$LINENO" 5; }
31814fi
31815
31816ac_ext=cpp
31817ac_cpp='$CXXCPP $CPPFLAGS'
31818ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31819ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31820ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31821
31822
31823  # Only process if variable expands to non-empty
31824
31825  if test "x$CXXCPP" != x; then
31826    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31827
31828  # First separate the path from the arguments. This will split at the first
31829  # space.
31830  complete="$CXXCPP"
31831  path="${complete%% *}"
31832  tmp="$complete EOL"
31833  arguments="${tmp#* }"
31834
31835  # Input might be given as Windows format, start by converting to
31836  # unix format.
31837  new_path=`$CYGPATH -u "$path"`
31838
31839  # Now try to locate executable using which
31840  new_path=`$WHICH "$new_path" 2> /dev/null`
31841  # bat and cmd files are not always considered executable in cygwin causing which
31842  # to not find them
31843  if test "x$new_path" = x \
31844      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31845      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31846    new_path=`$CYGPATH -u "$path"`
31847  fi
31848  if test "x$new_path" = x; then
31849    # Oops. Which didn't find the executable.
31850    # The splitting of arguments from the executable at a space might have been incorrect,
31851    # since paths with space are more likely in Windows. Give it another try with the whole
31852    # argument.
31853    path="$complete"
31854    arguments="EOL"
31855    new_path=`$CYGPATH -u "$path"`
31856    new_path=`$WHICH "$new_path" 2> /dev/null`
31857    # bat and cmd files are not always considered executable in cygwin causing which
31858    # to not find them
31859    if test "x$new_path" = x \
31860        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31861        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31862      new_path=`$CYGPATH -u "$path"`
31863    fi
31864    if test "x$new_path" = x; then
31865      # It's still not found. Now this is an unrecoverable error.
31866      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31867$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31868      has_space=`$ECHO "$complete" | $GREP " "`
31869      if test "x$has_space" != x; then
31870        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31871$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31872      fi
31873      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31874    fi
31875  fi
31876
31877  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31878  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31879  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31880  # "foo.exe" is OK but "foo" is an error.
31881  #
31882  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31883  # It is also a way to make sure we got the proper file name for the real test later on.
31884  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31885  if test "x$test_shortpath" = x; then
31886    # Short path failed, file does not exist as specified.
31887    # Try adding .exe or .cmd
31888    if test -f "${new_path}.exe"; then
31889      input_to_shortpath="${new_path}.exe"
31890    elif test -f "${new_path}.cmd"; then
31891      input_to_shortpath="${new_path}.cmd"
31892    else
31893      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
31894$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
31895      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31896$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31897      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31898    fi
31899  else
31900    input_to_shortpath="$new_path"
31901  fi
31902
31903  # Call helper function which possibly converts this using DOS-style short mode.
31904  # If so, the updated path is stored in $new_path.
31905  new_path="$input_to_shortpath"
31906
31907  input_path="$input_to_shortpath"
31908  # Check if we need to convert this using DOS-style short mode. If the path
31909  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31910  # take no chances and rewrite it.
31911  # Note: m4 eats our [], so we need to use [ and ] instead.
31912  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31913  if test "x$has_forbidden_chars" != x; then
31914    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31915    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31916    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31917    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31918      # Going to short mode and back again did indeed matter. Since short mode is
31919      # case insensitive, let's make it lowercase to improve readability.
31920      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31921      # Now convert it back to Unix-style (cygpath)
31922      input_path=`$CYGPATH -u "$shortmode_path"`
31923      new_path="$input_path"
31924    fi
31925  fi
31926
31927  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31928  if test "x$test_cygdrive_prefix" = x; then
31929    # As a simple fix, exclude /usr/bin since it's not a real path.
31930    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31931      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31932      # a path prefixed by /cygdrive for fixpath to work.
31933      new_path="$CYGWIN_ROOT_PATH$input_path"
31934    fi
31935  fi
31936
31937  # remove trailing .exe if any
31938  new_path="${new_path/%.exe/}"
31939
31940    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31941
31942  # First separate the path from the arguments. This will split at the first
31943  # space.
31944  complete="$CXXCPP"
31945  path="${complete%% *}"
31946  tmp="$complete EOL"
31947  arguments="${tmp#* }"
31948
31949  # Input might be given as Windows format, start by converting to
31950  # unix format.
31951  new_path="$path"
31952
31953  windows_path="$new_path"
31954  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31955    unix_path=`$CYGPATH -u "$windows_path"`
31956    new_path="$unix_path"
31957  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31958    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31959    new_path="$unix_path"
31960  fi
31961
31962
31963  # Now try to locate executable using which
31964  new_path=`$WHICH "$new_path" 2> /dev/null`
31965
31966  if test "x$new_path" = x; then
31967    # Oops. Which didn't find the executable.
31968    # The splitting of arguments from the executable at a space might have been incorrect,
31969    # since paths with space are more likely in Windows. Give it another try with the whole
31970    # argument.
31971    path="$complete"
31972    arguments="EOL"
31973    new_path="$path"
31974
31975  windows_path="$new_path"
31976  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31977    unix_path=`$CYGPATH -u "$windows_path"`
31978    new_path="$unix_path"
31979  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31980    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31981    new_path="$unix_path"
31982  fi
31983
31984
31985    new_path=`$WHICH "$new_path" 2> /dev/null`
31986    # bat and cmd files are not always considered executable in MSYS causing which
31987    # to not find them
31988    if test "x$new_path" = x \
31989        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31990        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31991      new_path="$path"
31992
31993  windows_path="$new_path"
31994  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31995    unix_path=`$CYGPATH -u "$windows_path"`
31996    new_path="$unix_path"
31997  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31998    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31999    new_path="$unix_path"
32000  fi
32001
32002    fi
32003
32004    if test "x$new_path" = x; then
32005      # It's still not found. Now this is an unrecoverable error.
32006      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
32007$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
32008      has_space=`$ECHO "$complete" | $GREP " "`
32009      if test "x$has_space" != x; then
32010        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32011$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32012      fi
32013      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
32014    fi
32015  fi
32016
32017  # Now new_path has a complete unix path to the binary
32018  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32019    # Keep paths in /bin as-is, but remove trailing .exe if any
32020    new_path="${new_path/%.exe/}"
32021    # Do not save /bin paths to all_fixpath_prefixes!
32022  else
32023    # Not in mixed or Windows style, start by that.
32024    new_path=`cmd //c echo $new_path`
32025
32026  input_path="$new_path"
32027  # Check if we need to convert this using DOS-style short mode. If the path
32028  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32029  # take no chances and rewrite it.
32030  # Note: m4 eats our [], so we need to use [ and ] instead.
32031  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32032  if test "x$has_forbidden_chars" != x; then
32033    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32034    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32035  fi
32036
32037    # Output is in $new_path
32038
32039  windows_path="$new_path"
32040  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32041    unix_path=`$CYGPATH -u "$windows_path"`
32042    new_path="$unix_path"
32043  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32044    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32045    new_path="$unix_path"
32046  fi
32047
32048    # remove trailing .exe if any
32049    new_path="${new_path/%.exe/}"
32050
32051    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32052    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32053  fi
32054
32055    else
32056      # We're on a unix platform. Hooray! :)
32057      # First separate the path from the arguments. This will split at the first
32058      # space.
32059      complete="$CXXCPP"
32060      path="${complete%% *}"
32061      tmp="$complete EOL"
32062      arguments="${tmp#* }"
32063
32064      # Cannot rely on the command "which" here since it doesn't always work.
32065      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32066      if test -z "$is_absolute_path"; then
32067        # Path to executable is not absolute. Find it.
32068        IFS_save="$IFS"
32069        IFS=:
32070        for p in $PATH; do
32071          if test -f "$p/$path" && test -x "$p/$path"; then
32072            new_path="$p/$path"
32073            break
32074          fi
32075        done
32076        IFS="$IFS_save"
32077      else
32078        # This is an absolute path, we can use it without further modifications.
32079        new_path="$path"
32080      fi
32081
32082      if test "x$new_path" = x; then
32083        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
32084$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
32085        has_space=`$ECHO "$complete" | $GREP " "`
32086        if test "x$has_space" != x; then
32087          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32088$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32089        fi
32090        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
32091      fi
32092    fi
32093
32094    # Now join together the path and the arguments once again
32095    if test "x$arguments" != xEOL; then
32096      new_complete="$new_path ${arguments% *}"
32097    else
32098      new_complete="$new_path"
32099    fi
32100
32101    if test "x$complete" != "x$new_complete"; then
32102      CXXCPP="$new_complete"
32103      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
32104$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
32105    fi
32106  fi
32107
32108
32109  #
32110  # Setup the linker (LD)
32111  #
32112  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32113    # In the Microsoft toolchain we have a separate LD command "link".
32114    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
32115    # a cygwin program for something completely different.
32116    # Extract the first word of "link", so it can be a program name with args.
32117set dummy link; ac_word=$2
32118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32119$as_echo_n "checking for $ac_word... " >&6; }
32120if ${ac_cv_prog_LD+:} false; then :
32121  $as_echo_n "(cached) " >&6
32122else
32123  if test -n "$LD"; then
32124  ac_cv_prog_LD="$LD" # Let the user override the test.
32125else
32126  ac_prog_rejected=no
32127as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32128for as_dir in $PATH
32129do
32130  IFS=$as_save_IFS
32131  test -z "$as_dir" && as_dir=.
32132    for ac_exec_ext in '' $ac_executable_extensions; do
32133  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32134    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
32135       ac_prog_rejected=yes
32136       continue
32137     fi
32138    ac_cv_prog_LD="link"
32139    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32140    break 2
32141  fi
32142done
32143  done
32144IFS=$as_save_IFS
32145
32146if test $ac_prog_rejected = yes; then
32147  # We found a bogon in the path, so make sure we never use it.
32148  set dummy $ac_cv_prog_LD
32149  shift
32150  if test $# != 0; then
32151    # We chose a different compiler from the bogus one.
32152    # However, it has the same basename, so the bogon will be chosen
32153    # first if we set LD to just the basename; use the full file name.
32154    shift
32155    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
32156  fi
32157fi
32158fi
32159fi
32160LD=$ac_cv_prog_LD
32161if test -n "$LD"; then
32162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
32163$as_echo "$LD" >&6; }
32164else
32165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32166$as_echo "no" >&6; }
32167fi
32168
32169
32170
32171  # Only process if variable expands to non-empty
32172
32173  if test "x$LD" != x; then
32174    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32175
32176  # First separate the path from the arguments. This will split at the first
32177  # space.
32178  complete="$LD"
32179  path="${complete%% *}"
32180  tmp="$complete EOL"
32181  arguments="${tmp#* }"
32182
32183  # Input might be given as Windows format, start by converting to
32184  # unix format.
32185  new_path=`$CYGPATH -u "$path"`
32186
32187  # Now try to locate executable using which
32188  new_path=`$WHICH "$new_path" 2> /dev/null`
32189  # bat and cmd files are not always considered executable in cygwin causing which
32190  # to not find them
32191  if test "x$new_path" = x \
32192      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32193      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32194    new_path=`$CYGPATH -u "$path"`
32195  fi
32196  if test "x$new_path" = x; then
32197    # Oops. Which didn't find the executable.
32198    # The splitting of arguments from the executable at a space might have been incorrect,
32199    # since paths with space are more likely in Windows. Give it another try with the whole
32200    # argument.
32201    path="$complete"
32202    arguments="EOL"
32203    new_path=`$CYGPATH -u "$path"`
32204    new_path=`$WHICH "$new_path" 2> /dev/null`
32205    # bat and cmd files are not always considered executable in cygwin causing which
32206    # to not find them
32207    if test "x$new_path" = x \
32208        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32209        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32210      new_path=`$CYGPATH -u "$path"`
32211    fi
32212    if test "x$new_path" = x; then
32213      # It's still not found. Now this is an unrecoverable error.
32214      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
32215$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
32216      has_space=`$ECHO "$complete" | $GREP " "`
32217      if test "x$has_space" != x; then
32218        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32219$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32220      fi
32221      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32222    fi
32223  fi
32224
32225  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32226  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32227  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32228  # "foo.exe" is OK but "foo" is an error.
32229  #
32230  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32231  # It is also a way to make sure we got the proper file name for the real test later on.
32232  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32233  if test "x$test_shortpath" = x; then
32234    # Short path failed, file does not exist as specified.
32235    # Try adding .exe or .cmd
32236    if test -f "${new_path}.exe"; then
32237      input_to_shortpath="${new_path}.exe"
32238    elif test -f "${new_path}.cmd"; then
32239      input_to_shortpath="${new_path}.cmd"
32240    else
32241      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
32242$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
32243      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32244$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32245      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32246    fi
32247  else
32248    input_to_shortpath="$new_path"
32249  fi
32250
32251  # Call helper function which possibly converts this using DOS-style short mode.
32252  # If so, the updated path is stored in $new_path.
32253  new_path="$input_to_shortpath"
32254
32255  input_path="$input_to_shortpath"
32256  # Check if we need to convert this using DOS-style short mode. If the path
32257  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32258  # take no chances and rewrite it.
32259  # Note: m4 eats our [], so we need to use [ and ] instead.
32260  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32261  if test "x$has_forbidden_chars" != x; then
32262    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32263    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32264    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32265    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32266      # Going to short mode and back again did indeed matter. Since short mode is
32267      # case insensitive, let's make it lowercase to improve readability.
32268      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32269      # Now convert it back to Unix-style (cygpath)
32270      input_path=`$CYGPATH -u "$shortmode_path"`
32271      new_path="$input_path"
32272    fi
32273  fi
32274
32275  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32276  if test "x$test_cygdrive_prefix" = x; then
32277    # As a simple fix, exclude /usr/bin since it's not a real path.
32278    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32279      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32280      # a path prefixed by /cygdrive for fixpath to work.
32281      new_path="$CYGWIN_ROOT_PATH$input_path"
32282    fi
32283  fi
32284
32285  # remove trailing .exe if any
32286  new_path="${new_path/%.exe/}"
32287
32288    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32289
32290  # First separate the path from the arguments. This will split at the first
32291  # space.
32292  complete="$LD"
32293  path="${complete%% *}"
32294  tmp="$complete EOL"
32295  arguments="${tmp#* }"
32296
32297  # Input might be given as Windows format, start by converting to
32298  # unix format.
32299  new_path="$path"
32300
32301  windows_path="$new_path"
32302  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32303    unix_path=`$CYGPATH -u "$windows_path"`
32304    new_path="$unix_path"
32305  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32306    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32307    new_path="$unix_path"
32308  fi
32309
32310
32311  # Now try to locate executable using which
32312  new_path=`$WHICH "$new_path" 2> /dev/null`
32313
32314  if test "x$new_path" = x; then
32315    # Oops. Which didn't find the executable.
32316    # The splitting of arguments from the executable at a space might have been incorrect,
32317    # since paths with space are more likely in Windows. Give it another try with the whole
32318    # argument.
32319    path="$complete"
32320    arguments="EOL"
32321    new_path="$path"
32322
32323  windows_path="$new_path"
32324  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32325    unix_path=`$CYGPATH -u "$windows_path"`
32326    new_path="$unix_path"
32327  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32328    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32329    new_path="$unix_path"
32330  fi
32331
32332
32333    new_path=`$WHICH "$new_path" 2> /dev/null`
32334    # bat and cmd files are not always considered executable in MSYS causing which
32335    # to not find them
32336    if test "x$new_path" = x \
32337        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32338        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32339      new_path="$path"
32340
32341  windows_path="$new_path"
32342  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32343    unix_path=`$CYGPATH -u "$windows_path"`
32344    new_path="$unix_path"
32345  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32346    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32347    new_path="$unix_path"
32348  fi
32349
32350    fi
32351
32352    if test "x$new_path" = x; then
32353      # It's still not found. Now this is an unrecoverable error.
32354      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
32355$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
32356      has_space=`$ECHO "$complete" | $GREP " "`
32357      if test "x$has_space" != x; then
32358        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32359$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32360      fi
32361      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32362    fi
32363  fi
32364
32365  # Now new_path has a complete unix path to the binary
32366  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32367    # Keep paths in /bin as-is, but remove trailing .exe if any
32368    new_path="${new_path/%.exe/}"
32369    # Do not save /bin paths to all_fixpath_prefixes!
32370  else
32371    # Not in mixed or Windows style, start by that.
32372    new_path=`cmd //c echo $new_path`
32373
32374  input_path="$new_path"
32375  # Check if we need to convert this using DOS-style short mode. If the path
32376  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32377  # take no chances and rewrite it.
32378  # Note: m4 eats our [], so we need to use [ and ] instead.
32379  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32380  if test "x$has_forbidden_chars" != x; then
32381    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32382    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32383  fi
32384
32385    # Output is in $new_path
32386
32387  windows_path="$new_path"
32388  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32389    unix_path=`$CYGPATH -u "$windows_path"`
32390    new_path="$unix_path"
32391  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32392    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32393    new_path="$unix_path"
32394  fi
32395
32396    # remove trailing .exe if any
32397    new_path="${new_path/%.exe/}"
32398
32399    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32400    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32401  fi
32402
32403    else
32404      # We're on a unix platform. Hooray! :)
32405      # First separate the path from the arguments. This will split at the first
32406      # space.
32407      complete="$LD"
32408      path="${complete%% *}"
32409      tmp="$complete EOL"
32410      arguments="${tmp#* }"
32411
32412      # Cannot rely on the command "which" here since it doesn't always work.
32413      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32414      if test -z "$is_absolute_path"; then
32415        # Path to executable is not absolute. Find it.
32416        IFS_save="$IFS"
32417        IFS=:
32418        for p in $PATH; do
32419          if test -f "$p/$path" && test -x "$p/$path"; then
32420            new_path="$p/$path"
32421            break
32422          fi
32423        done
32424        IFS="$IFS_save"
32425      else
32426        # This is an absolute path, we can use it without further modifications.
32427        new_path="$path"
32428      fi
32429
32430      if test "x$new_path" = x; then
32431        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
32432$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
32433        has_space=`$ECHO "$complete" | $GREP " "`
32434        if test "x$has_space" != x; then
32435          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32436$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32437        fi
32438        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32439      fi
32440    fi
32441
32442    # Now join together the path and the arguments once again
32443    if test "x$arguments" != xEOL; then
32444      new_complete="$new_path ${arguments% *}"
32445    else
32446      new_complete="$new_path"
32447    fi
32448
32449    if test "x$complete" != "x$new_complete"; then
32450      LD="$new_complete"
32451      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
32452$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
32453    fi
32454  fi
32455
32456    # Verify that we indeed succeeded with this trick.
32457    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
32458$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
32459    "$LD" --version > /dev/null
32460    if test $? -eq 0 ; then
32461      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32462$as_echo "no" >&6; }
32463      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
32464    else
32465      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32466$as_echo "yes" >&6; }
32467    fi
32468    LDCXX="$LD"
32469  else
32470    # All other toolchains use the compiler to link.
32471    LD="$CC"
32472    LDCXX="$CXX"
32473  fi
32474
32475  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
32476
32477
32478  #
32479  # Setup the assembler (AS)
32480  #
32481  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
32482    # FIXME: should this really be solaris, or solstudio?
32483
32484
32485  # Publish this variable in the help.
32486
32487
32488  if test "x$AS" = x; then
32489    # The variable is not set by user, try to locate tool using the code snippet
32490    for ac_prog in as
32491do
32492  # Extract the first word of "$ac_prog", so it can be a program name with args.
32493set dummy $ac_prog; ac_word=$2
32494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32495$as_echo_n "checking for $ac_word... " >&6; }
32496if ${ac_cv_path_AS+:} false; then :
32497  $as_echo_n "(cached) " >&6
32498else
32499  case $AS in
32500  [\\/]* | ?:[\\/]*)
32501  ac_cv_path_AS="$AS" # Let the user override the test with a path.
32502  ;;
32503  *)
32504  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32505for as_dir in $PATH
32506do
32507  IFS=$as_save_IFS
32508  test -z "$as_dir" && as_dir=.
32509    for ac_exec_ext in '' $ac_executable_extensions; do
32510  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32511    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32512    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32513    break 2
32514  fi
32515done
32516  done
32517IFS=$as_save_IFS
32518
32519  ;;
32520esac
32521fi
32522AS=$ac_cv_path_AS
32523if test -n "$AS"; then
32524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32525$as_echo "$AS" >&6; }
32526else
32527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32528$as_echo "no" >&6; }
32529fi
32530
32531
32532  test -n "$AS" && break
32533done
32534
32535  else
32536    # The variable is set, but is it from the command line or the environment?
32537
32538    # Try to remove the string !AS! from our list.
32539    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
32540    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
32541      # If it failed, the variable was not from the command line. Ignore it,
32542      # but warn the user (except for BASH, which is always set by the calling BASH).
32543      if test "xAS" != xBASH; then
32544        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
32545$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
32546      fi
32547      # Try to locate tool using the code snippet
32548      for ac_prog in as
32549do
32550  # Extract the first word of "$ac_prog", so it can be a program name with args.
32551set dummy $ac_prog; ac_word=$2
32552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32553$as_echo_n "checking for $ac_word... " >&6; }
32554if ${ac_cv_path_AS+:} false; then :
32555  $as_echo_n "(cached) " >&6
32556else
32557  case $AS in
32558  [\\/]* | ?:[\\/]*)
32559  ac_cv_path_AS="$AS" # Let the user override the test with a path.
32560  ;;
32561  *)
32562  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32563for as_dir in $PATH
32564do
32565  IFS=$as_save_IFS
32566  test -z "$as_dir" && as_dir=.
32567    for ac_exec_ext in '' $ac_executable_extensions; do
32568  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32569    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32570    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32571    break 2
32572  fi
32573done
32574  done
32575IFS=$as_save_IFS
32576
32577  ;;
32578esac
32579fi
32580AS=$ac_cv_path_AS
32581if test -n "$AS"; then
32582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32583$as_echo "$AS" >&6; }
32584else
32585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32586$as_echo "no" >&6; }
32587fi
32588
32589
32590  test -n "$AS" && break
32591done
32592
32593    else
32594      # If it succeeded, then it was overridden by the user. We will use it
32595      # for the tool.
32596
32597      # First remove it from the list of overridden variables, so we can test
32598      # for unknown variables in the end.
32599      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
32600
32601      # Check if the provided tool contains a complete path.
32602      tool_specified="$AS"
32603      tool_basename="${tool_specified##*/}"
32604      if test "x$tool_basename" = "x$tool_specified"; then
32605        # A command without a complete path is provided, search $PATH.
32606        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
32607$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
32608        # Extract the first word of "$tool_basename", so it can be a program name with args.
32609set dummy $tool_basename; ac_word=$2
32610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32611$as_echo_n "checking for $ac_word... " >&6; }
32612if ${ac_cv_path_AS+:} false; then :
32613  $as_echo_n "(cached) " >&6
32614else
32615  case $AS in
32616  [\\/]* | ?:[\\/]*)
32617  ac_cv_path_AS="$AS" # Let the user override the test with a path.
32618  ;;
32619  *)
32620  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32621for as_dir in $PATH
32622do
32623  IFS=$as_save_IFS
32624  test -z "$as_dir" && as_dir=.
32625    for ac_exec_ext in '' $ac_executable_extensions; do
32626  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32627    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32628    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32629    break 2
32630  fi
32631done
32632  done
32633IFS=$as_save_IFS
32634
32635  ;;
32636esac
32637fi
32638AS=$ac_cv_path_AS
32639if test -n "$AS"; then
32640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32641$as_echo "$AS" >&6; }
32642else
32643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32644$as_echo "no" >&6; }
32645fi
32646
32647
32648        if test "x$AS" = x; then
32649          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
32650        fi
32651      else
32652        # Otherwise we believe it is a complete path. Use it as it is.
32653        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
32654$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
32655        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
32656$as_echo_n "checking for AS... " >&6; }
32657        if test ! -x "$tool_specified"; then
32658          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32659$as_echo "not found" >&6; }
32660          as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
32661        fi
32662        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
32663$as_echo "$tool_specified" >&6; }
32664      fi
32665    fi
32666  fi
32667
32668
32669
32670  # Only process if variable expands to non-empty
32671
32672  if test "x$AS" != x; then
32673    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32674
32675  # First separate the path from the arguments. This will split at the first
32676  # space.
32677  complete="$AS"
32678  path="${complete%% *}"
32679  tmp="$complete EOL"
32680  arguments="${tmp#* }"
32681
32682  # Input might be given as Windows format, start by converting to
32683  # unix format.
32684  new_path=`$CYGPATH -u "$path"`
32685
32686  # Now try to locate executable using which
32687  new_path=`$WHICH "$new_path" 2> /dev/null`
32688  # bat and cmd files are not always considered executable in cygwin causing which
32689  # to not find them
32690  if test "x$new_path" = x \
32691      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32692      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32693    new_path=`$CYGPATH -u "$path"`
32694  fi
32695  if test "x$new_path" = x; then
32696    # Oops. Which didn't find the executable.
32697    # The splitting of arguments from the executable at a space might have been incorrect,
32698    # since paths with space are more likely in Windows. Give it another try with the whole
32699    # argument.
32700    path="$complete"
32701    arguments="EOL"
32702    new_path=`$CYGPATH -u "$path"`
32703    new_path=`$WHICH "$new_path" 2> /dev/null`
32704    # bat and cmd files are not always considered executable in cygwin causing which
32705    # to not find them
32706    if test "x$new_path" = x \
32707        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32708        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32709      new_path=`$CYGPATH -u "$path"`
32710    fi
32711    if test "x$new_path" = x; then
32712      # It's still not found. Now this is an unrecoverable error.
32713      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32714$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32715      has_space=`$ECHO "$complete" | $GREP " "`
32716      if test "x$has_space" != x; then
32717        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32718$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32719      fi
32720      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32721    fi
32722  fi
32723
32724  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32725  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32726  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32727  # "foo.exe" is OK but "foo" is an error.
32728  #
32729  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32730  # It is also a way to make sure we got the proper file name for the real test later on.
32731  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32732  if test "x$test_shortpath" = x; then
32733    # Short path failed, file does not exist as specified.
32734    # Try adding .exe or .cmd
32735    if test -f "${new_path}.exe"; then
32736      input_to_shortpath="${new_path}.exe"
32737    elif test -f "${new_path}.cmd"; then
32738      input_to_shortpath="${new_path}.cmd"
32739    else
32740      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
32741$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
32742      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32743$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32744      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32745    fi
32746  else
32747    input_to_shortpath="$new_path"
32748  fi
32749
32750  # Call helper function which possibly converts this using DOS-style short mode.
32751  # If so, the updated path is stored in $new_path.
32752  new_path="$input_to_shortpath"
32753
32754  input_path="$input_to_shortpath"
32755  # Check if we need to convert this using DOS-style short mode. If the path
32756  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32757  # take no chances and rewrite it.
32758  # Note: m4 eats our [], so we need to use [ and ] instead.
32759  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32760  if test "x$has_forbidden_chars" != x; then
32761    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32762    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32763    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32764    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32765      # Going to short mode and back again did indeed matter. Since short mode is
32766      # case insensitive, let's make it lowercase to improve readability.
32767      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32768      # Now convert it back to Unix-style (cygpath)
32769      input_path=`$CYGPATH -u "$shortmode_path"`
32770      new_path="$input_path"
32771    fi
32772  fi
32773
32774  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32775  if test "x$test_cygdrive_prefix" = x; then
32776    # As a simple fix, exclude /usr/bin since it's not a real path.
32777    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32778      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32779      # a path prefixed by /cygdrive for fixpath to work.
32780      new_path="$CYGWIN_ROOT_PATH$input_path"
32781    fi
32782  fi
32783
32784  # remove trailing .exe if any
32785  new_path="${new_path/%.exe/}"
32786
32787    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32788
32789  # First separate the path from the arguments. This will split at the first
32790  # space.
32791  complete="$AS"
32792  path="${complete%% *}"
32793  tmp="$complete EOL"
32794  arguments="${tmp#* }"
32795
32796  # Input might be given as Windows format, start by converting to
32797  # unix format.
32798  new_path="$path"
32799
32800  windows_path="$new_path"
32801  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32802    unix_path=`$CYGPATH -u "$windows_path"`
32803    new_path="$unix_path"
32804  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32805    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32806    new_path="$unix_path"
32807  fi
32808
32809
32810  # Now try to locate executable using which
32811  new_path=`$WHICH "$new_path" 2> /dev/null`
32812
32813  if test "x$new_path" = x; then
32814    # Oops. Which didn't find the executable.
32815    # The splitting of arguments from the executable at a space might have been incorrect,
32816    # since paths with space are more likely in Windows. Give it another try with the whole
32817    # argument.
32818    path="$complete"
32819    arguments="EOL"
32820    new_path="$path"
32821
32822  windows_path="$new_path"
32823  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32824    unix_path=`$CYGPATH -u "$windows_path"`
32825    new_path="$unix_path"
32826  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32827    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32828    new_path="$unix_path"
32829  fi
32830
32831
32832    new_path=`$WHICH "$new_path" 2> /dev/null`
32833    # bat and cmd files are not always considered executable in MSYS causing which
32834    # to not find them
32835    if test "x$new_path" = x \
32836        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32837        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32838      new_path="$path"
32839
32840  windows_path="$new_path"
32841  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32842    unix_path=`$CYGPATH -u "$windows_path"`
32843    new_path="$unix_path"
32844  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32845    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32846    new_path="$unix_path"
32847  fi
32848
32849    fi
32850
32851    if test "x$new_path" = x; then
32852      # It's still not found. Now this is an unrecoverable error.
32853      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32854$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32855      has_space=`$ECHO "$complete" | $GREP " "`
32856      if test "x$has_space" != x; then
32857        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32858$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32859      fi
32860      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32861    fi
32862  fi
32863
32864  # Now new_path has a complete unix path to the binary
32865  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32866    # Keep paths in /bin as-is, but remove trailing .exe if any
32867    new_path="${new_path/%.exe/}"
32868    # Do not save /bin paths to all_fixpath_prefixes!
32869  else
32870    # Not in mixed or Windows style, start by that.
32871    new_path=`cmd //c echo $new_path`
32872
32873  input_path="$new_path"
32874  # Check if we need to convert this using DOS-style short mode. If the path
32875  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32876  # take no chances and rewrite it.
32877  # Note: m4 eats our [], so we need to use [ and ] instead.
32878  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32879  if test "x$has_forbidden_chars" != x; then
32880    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32881    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32882  fi
32883
32884    # Output is in $new_path
32885
32886  windows_path="$new_path"
32887  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32888    unix_path=`$CYGPATH -u "$windows_path"`
32889    new_path="$unix_path"
32890  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32891    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32892    new_path="$unix_path"
32893  fi
32894
32895    # remove trailing .exe if any
32896    new_path="${new_path/%.exe/}"
32897
32898    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32899    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32900  fi
32901
32902    else
32903      # We're on a unix platform. Hooray! :)
32904      # First separate the path from the arguments. This will split at the first
32905      # space.
32906      complete="$AS"
32907      path="${complete%% *}"
32908      tmp="$complete EOL"
32909      arguments="${tmp#* }"
32910
32911      # Cannot rely on the command "which" here since it doesn't always work.
32912      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32913      if test -z "$is_absolute_path"; then
32914        # Path to executable is not absolute. Find it.
32915        IFS_save="$IFS"
32916        IFS=:
32917        for p in $PATH; do
32918          if test -f "$p/$path" && test -x "$p/$path"; then
32919            new_path="$p/$path"
32920            break
32921          fi
32922        done
32923        IFS="$IFS_save"
32924      else
32925        # This is an absolute path, we can use it without further modifications.
32926        new_path="$path"
32927      fi
32928
32929      if test "x$new_path" = x; then
32930        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32931$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32932        has_space=`$ECHO "$complete" | $GREP " "`
32933        if test "x$has_space" != x; then
32934          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32935$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32936        fi
32937        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32938      fi
32939    fi
32940
32941    # Now join together the path and the arguments once again
32942    if test "x$arguments" != xEOL; then
32943      new_complete="$new_path ${arguments% *}"
32944    else
32945      new_complete="$new_path"
32946    fi
32947
32948    if test "x$complete" != "x$new_complete"; then
32949      AS="$new_complete"
32950      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
32951$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
32952    fi
32953  fi
32954
32955  else
32956    # FIXME: is this correct for microsoft?
32957    AS="$CC -c"
32958  fi
32959
32960
32961  #
32962  # Setup the archiver (AR)
32963  #
32964  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32965    # The corresponding ar tool is lib.exe (used to create static libraries)
32966    # Extract the first word of "lib", so it can be a program name with args.
32967set dummy lib; ac_word=$2
32968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32969$as_echo_n "checking for $ac_word... " >&6; }
32970if ${ac_cv_prog_AR+:} false; then :
32971  $as_echo_n "(cached) " >&6
32972else
32973  if test -n "$AR"; then
32974  ac_cv_prog_AR="$AR" # Let the user override the test.
32975else
32976as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32977for as_dir in $PATH
32978do
32979  IFS=$as_save_IFS
32980  test -z "$as_dir" && as_dir=.
32981    for ac_exec_ext in '' $ac_executable_extensions; do
32982  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32983    ac_cv_prog_AR="lib"
32984    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32985    break 2
32986  fi
32987done
32988  done
32989IFS=$as_save_IFS
32990
32991fi
32992fi
32993AR=$ac_cv_prog_AR
32994if test -n "$AR"; then
32995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32996$as_echo "$AR" >&6; }
32997else
32998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32999$as_echo "no" >&6; }
33000fi
33001
33002
33003  else
33004
33005
33006  # Publish this variable in the help.
33007
33008
33009  if test "x$AR" = x; then
33010    # The variable is not set by user, try to locate tool using the code snippet
33011    if test -n "$ac_tool_prefix"; then
33012  for ac_prog in ar
33013  do
33014    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33015set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33017$as_echo_n "checking for $ac_word... " >&6; }
33018if ${ac_cv_prog_AR+:} false; then :
33019  $as_echo_n "(cached) " >&6
33020else
33021  if test -n "$AR"; then
33022  ac_cv_prog_AR="$AR" # Let the user override the test.
33023else
33024as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33025for as_dir in $PATH
33026do
33027  IFS=$as_save_IFS
33028  test -z "$as_dir" && as_dir=.
33029    for ac_exec_ext in '' $ac_executable_extensions; do
33030  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33031    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
33032    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33033    break 2
33034  fi
33035done
33036  done
33037IFS=$as_save_IFS
33038
33039fi
33040fi
33041AR=$ac_cv_prog_AR
33042if test -n "$AR"; then
33043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33044$as_echo "$AR" >&6; }
33045else
33046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33047$as_echo "no" >&6; }
33048fi
33049
33050
33051    test -n "$AR" && break
33052  done
33053fi
33054if test -z "$AR"; then
33055  ac_ct_AR=$AR
33056  for ac_prog in ar
33057do
33058  # Extract the first word of "$ac_prog", so it can be a program name with args.
33059set dummy $ac_prog; ac_word=$2
33060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33061$as_echo_n "checking for $ac_word... " >&6; }
33062if ${ac_cv_prog_ac_ct_AR+:} false; then :
33063  $as_echo_n "(cached) " >&6
33064else
33065  if test -n "$ac_ct_AR"; then
33066  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
33067else
33068as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33069for as_dir in $PATH
33070do
33071  IFS=$as_save_IFS
33072  test -z "$as_dir" && as_dir=.
33073    for ac_exec_ext in '' $ac_executable_extensions; do
33074  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33075    ac_cv_prog_ac_ct_AR="$ac_prog"
33076    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33077    break 2
33078  fi
33079done
33080  done
33081IFS=$as_save_IFS
33082
33083fi
33084fi
33085ac_ct_AR=$ac_cv_prog_ac_ct_AR
33086if test -n "$ac_ct_AR"; then
33087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
33088$as_echo "$ac_ct_AR" >&6; }
33089else
33090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33091$as_echo "no" >&6; }
33092fi
33093
33094
33095  test -n "$ac_ct_AR" && break
33096done
33097
33098  if test "x$ac_ct_AR" = x; then
33099    AR=""
33100  else
33101    case $cross_compiling:$ac_tool_warned in
33102yes:)
33103{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33104$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33105ac_tool_warned=yes ;;
33106esac
33107    AR=$ac_ct_AR
33108  fi
33109fi
33110
33111  else
33112    # The variable is set, but is it from the command line or the environment?
33113
33114    # Try to remove the string !AR! from our list.
33115    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
33116    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
33117      # If it failed, the variable was not from the command line. Ignore it,
33118      # but warn the user (except for BASH, which is always set by the calling BASH).
33119      if test "xAR" != xBASH; then
33120        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
33121$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
33122      fi
33123      # Try to locate tool using the code snippet
33124      if test -n "$ac_tool_prefix"; then
33125  for ac_prog in ar
33126  do
33127    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33128set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33130$as_echo_n "checking for $ac_word... " >&6; }
33131if ${ac_cv_prog_AR+:} false; then :
33132  $as_echo_n "(cached) " >&6
33133else
33134  if test -n "$AR"; then
33135  ac_cv_prog_AR="$AR" # Let the user override the test.
33136else
33137as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33138for as_dir in $PATH
33139do
33140  IFS=$as_save_IFS
33141  test -z "$as_dir" && as_dir=.
33142    for ac_exec_ext in '' $ac_executable_extensions; do
33143  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33144    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
33145    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33146    break 2
33147  fi
33148done
33149  done
33150IFS=$as_save_IFS
33151
33152fi
33153fi
33154AR=$ac_cv_prog_AR
33155if test -n "$AR"; then
33156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33157$as_echo "$AR" >&6; }
33158else
33159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33160$as_echo "no" >&6; }
33161fi
33162
33163
33164    test -n "$AR" && break
33165  done
33166fi
33167if test -z "$AR"; then
33168  ac_ct_AR=$AR
33169  for ac_prog in ar
33170do
33171  # Extract the first word of "$ac_prog", so it can be a program name with args.
33172set dummy $ac_prog; ac_word=$2
33173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33174$as_echo_n "checking for $ac_word... " >&6; }
33175if ${ac_cv_prog_ac_ct_AR+:} false; then :
33176  $as_echo_n "(cached) " >&6
33177else
33178  if test -n "$ac_ct_AR"; then
33179  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
33180else
33181as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33182for as_dir in $PATH
33183do
33184  IFS=$as_save_IFS
33185  test -z "$as_dir" && as_dir=.
33186    for ac_exec_ext in '' $ac_executable_extensions; do
33187  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33188    ac_cv_prog_ac_ct_AR="$ac_prog"
33189    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33190    break 2
33191  fi
33192done
33193  done
33194IFS=$as_save_IFS
33195
33196fi
33197fi
33198ac_ct_AR=$ac_cv_prog_ac_ct_AR
33199if test -n "$ac_ct_AR"; then
33200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
33201$as_echo "$ac_ct_AR" >&6; }
33202else
33203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33204$as_echo "no" >&6; }
33205fi
33206
33207
33208  test -n "$ac_ct_AR" && break
33209done
33210
33211  if test "x$ac_ct_AR" = x; then
33212    AR=""
33213  else
33214    case $cross_compiling:$ac_tool_warned in
33215yes:)
33216{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33217$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33218ac_tool_warned=yes ;;
33219esac
33220    AR=$ac_ct_AR
33221  fi
33222fi
33223
33224    else
33225      # If it succeeded, then it was overridden by the user. We will use it
33226      # for the tool.
33227
33228      # First remove it from the list of overridden variables, so we can test
33229      # for unknown variables in the end.
33230      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33231
33232      # Check if the provided tool contains a complete path.
33233      tool_specified="$AR"
33234      tool_basename="${tool_specified##*/}"
33235      if test "x$tool_basename" = "x$tool_specified"; then
33236        # A command without a complete path is provided, search $PATH.
33237        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
33238$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
33239        # Extract the first word of "$tool_basename", so it can be a program name with args.
33240set dummy $tool_basename; ac_word=$2
33241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33242$as_echo_n "checking for $ac_word... " >&6; }
33243if ${ac_cv_path_AR+:} false; then :
33244  $as_echo_n "(cached) " >&6
33245else
33246  case $AR in
33247  [\\/]* | ?:[\\/]*)
33248  ac_cv_path_AR="$AR" # Let the user override the test with a path.
33249  ;;
33250  *)
33251  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33252for as_dir in $PATH
33253do
33254  IFS=$as_save_IFS
33255  test -z "$as_dir" && as_dir=.
33256    for ac_exec_ext in '' $ac_executable_extensions; do
33257  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33258    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
33259    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33260    break 2
33261  fi
33262done
33263  done
33264IFS=$as_save_IFS
33265
33266  ;;
33267esac
33268fi
33269AR=$ac_cv_path_AR
33270if test -n "$AR"; then
33271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33272$as_echo "$AR" >&6; }
33273else
33274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33275$as_echo "no" >&6; }
33276fi
33277
33278
33279        if test "x$AR" = x; then
33280          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
33281        fi
33282      else
33283        # Otherwise we believe it is a complete path. Use it as it is.
33284        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
33285$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
33286        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
33287$as_echo_n "checking for AR... " >&6; }
33288        if test ! -x "$tool_specified"; then
33289          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33290$as_echo "not found" >&6; }
33291          as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
33292        fi
33293        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33294$as_echo "$tool_specified" >&6; }
33295      fi
33296    fi
33297  fi
33298
33299
33300  fi
33301
33302  # Only process if variable expands to non-empty
33303
33304  if test "x$AR" != x; then
33305    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33306
33307  # First separate the path from the arguments. This will split at the first
33308  # space.
33309  complete="$AR"
33310  path="${complete%% *}"
33311  tmp="$complete EOL"
33312  arguments="${tmp#* }"
33313
33314  # Input might be given as Windows format, start by converting to
33315  # unix format.
33316  new_path=`$CYGPATH -u "$path"`
33317
33318  # Now try to locate executable using which
33319  new_path=`$WHICH "$new_path" 2> /dev/null`
33320  # bat and cmd files are not always considered executable in cygwin causing which
33321  # to not find them
33322  if test "x$new_path" = x \
33323      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33324      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33325    new_path=`$CYGPATH -u "$path"`
33326  fi
33327  if test "x$new_path" = x; then
33328    # Oops. Which didn't find the executable.
33329    # The splitting of arguments from the executable at a space might have been incorrect,
33330    # since paths with space are more likely in Windows. Give it another try with the whole
33331    # argument.
33332    path="$complete"
33333    arguments="EOL"
33334    new_path=`$CYGPATH -u "$path"`
33335    new_path=`$WHICH "$new_path" 2> /dev/null`
33336    # bat and cmd files are not always considered executable in cygwin causing which
33337    # to not find them
33338    if test "x$new_path" = x \
33339        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33340        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33341      new_path=`$CYGPATH -u "$path"`
33342    fi
33343    if test "x$new_path" = x; then
33344      # It's still not found. Now this is an unrecoverable error.
33345      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33346$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33347      has_space=`$ECHO "$complete" | $GREP " "`
33348      if test "x$has_space" != x; then
33349        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33350$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33351      fi
33352      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33353    fi
33354  fi
33355
33356  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33357  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33358  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33359  # "foo.exe" is OK but "foo" is an error.
33360  #
33361  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33362  # It is also a way to make sure we got the proper file name for the real test later on.
33363  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33364  if test "x$test_shortpath" = x; then
33365    # Short path failed, file does not exist as specified.
33366    # Try adding .exe or .cmd
33367    if test -f "${new_path}.exe"; then
33368      input_to_shortpath="${new_path}.exe"
33369    elif test -f "${new_path}.cmd"; then
33370      input_to_shortpath="${new_path}.cmd"
33371    else
33372      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
33373$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
33374      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33375$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33376      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33377    fi
33378  else
33379    input_to_shortpath="$new_path"
33380  fi
33381
33382  # Call helper function which possibly converts this using DOS-style short mode.
33383  # If so, the updated path is stored in $new_path.
33384  new_path="$input_to_shortpath"
33385
33386  input_path="$input_to_shortpath"
33387  # Check if we need to convert this using DOS-style short mode. If the path
33388  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33389  # take no chances and rewrite it.
33390  # Note: m4 eats our [], so we need to use [ and ] instead.
33391  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33392  if test "x$has_forbidden_chars" != x; then
33393    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33394    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33395    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33396    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33397      # Going to short mode and back again did indeed matter. Since short mode is
33398      # case insensitive, let's make it lowercase to improve readability.
33399      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33400      # Now convert it back to Unix-style (cygpath)
33401      input_path=`$CYGPATH -u "$shortmode_path"`
33402      new_path="$input_path"
33403    fi
33404  fi
33405
33406  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33407  if test "x$test_cygdrive_prefix" = x; then
33408    # As a simple fix, exclude /usr/bin since it's not a real path.
33409    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33410      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33411      # a path prefixed by /cygdrive for fixpath to work.
33412      new_path="$CYGWIN_ROOT_PATH$input_path"
33413    fi
33414  fi
33415
33416  # remove trailing .exe if any
33417  new_path="${new_path/%.exe/}"
33418
33419    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33420
33421  # First separate the path from the arguments. This will split at the first
33422  # space.
33423  complete="$AR"
33424  path="${complete%% *}"
33425  tmp="$complete EOL"
33426  arguments="${tmp#* }"
33427
33428  # Input might be given as Windows format, start by converting to
33429  # unix format.
33430  new_path="$path"
33431
33432  windows_path="$new_path"
33433  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33434    unix_path=`$CYGPATH -u "$windows_path"`
33435    new_path="$unix_path"
33436  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33437    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33438    new_path="$unix_path"
33439  fi
33440
33441
33442  # Now try to locate executable using which
33443  new_path=`$WHICH "$new_path" 2> /dev/null`
33444
33445  if test "x$new_path" = x; then
33446    # Oops. Which didn't find the executable.
33447    # The splitting of arguments from the executable at a space might have been incorrect,
33448    # since paths with space are more likely in Windows. Give it another try with the whole
33449    # argument.
33450    path="$complete"
33451    arguments="EOL"
33452    new_path="$path"
33453
33454  windows_path="$new_path"
33455  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33456    unix_path=`$CYGPATH -u "$windows_path"`
33457    new_path="$unix_path"
33458  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33459    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33460    new_path="$unix_path"
33461  fi
33462
33463
33464    new_path=`$WHICH "$new_path" 2> /dev/null`
33465    # bat and cmd files are not always considered executable in MSYS causing which
33466    # to not find them
33467    if test "x$new_path" = x \
33468        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33469        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33470      new_path="$path"
33471
33472  windows_path="$new_path"
33473  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33474    unix_path=`$CYGPATH -u "$windows_path"`
33475    new_path="$unix_path"
33476  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33477    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33478    new_path="$unix_path"
33479  fi
33480
33481    fi
33482
33483    if test "x$new_path" = x; then
33484      # It's still not found. Now this is an unrecoverable error.
33485      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33486$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33487      has_space=`$ECHO "$complete" | $GREP " "`
33488      if test "x$has_space" != x; then
33489        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33490$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33491      fi
33492      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33493    fi
33494  fi
33495
33496  # Now new_path has a complete unix path to the binary
33497  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33498    # Keep paths in /bin as-is, but remove trailing .exe if any
33499    new_path="${new_path/%.exe/}"
33500    # Do not save /bin paths to all_fixpath_prefixes!
33501  else
33502    # Not in mixed or Windows style, start by that.
33503    new_path=`cmd //c echo $new_path`
33504
33505  input_path="$new_path"
33506  # Check if we need to convert this using DOS-style short mode. If the path
33507  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33508  # take no chances and rewrite it.
33509  # Note: m4 eats our [], so we need to use [ and ] instead.
33510  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33511  if test "x$has_forbidden_chars" != x; then
33512    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33513    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33514  fi
33515
33516    # Output is in $new_path
33517
33518  windows_path="$new_path"
33519  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33520    unix_path=`$CYGPATH -u "$windows_path"`
33521    new_path="$unix_path"
33522  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33523    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33524    new_path="$unix_path"
33525  fi
33526
33527    # remove trailing .exe if any
33528    new_path="${new_path/%.exe/}"
33529
33530    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33531    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33532  fi
33533
33534    else
33535      # We're on a unix platform. Hooray! :)
33536      # First separate the path from the arguments. This will split at the first
33537      # space.
33538      complete="$AR"
33539      path="${complete%% *}"
33540      tmp="$complete EOL"
33541      arguments="${tmp#* }"
33542
33543      # Cannot rely on the command "which" here since it doesn't always work.
33544      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33545      if test -z "$is_absolute_path"; then
33546        # Path to executable is not absolute. Find it.
33547        IFS_save="$IFS"
33548        IFS=:
33549        for p in $PATH; do
33550          if test -f "$p/$path" && test -x "$p/$path"; then
33551            new_path="$p/$path"
33552            break
33553          fi
33554        done
33555        IFS="$IFS_save"
33556      else
33557        # This is an absolute path, we can use it without further modifications.
33558        new_path="$path"
33559      fi
33560
33561      if test "x$new_path" = x; then
33562        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33563$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33564        has_space=`$ECHO "$complete" | $GREP " "`
33565        if test "x$has_space" != x; then
33566          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33567$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33568        fi
33569        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33570      fi
33571    fi
33572
33573    # Now join together the path and the arguments once again
33574    if test "x$arguments" != xEOL; then
33575      new_complete="$new_path ${arguments% *}"
33576    else
33577      new_complete="$new_path"
33578    fi
33579
33580    if test "x$complete" != "x$new_complete"; then
33581      AR="$new_complete"
33582      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
33583$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
33584    fi
33585  fi
33586
33587
33588
33589  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
33590
33591
33592  # Publish this variable in the help.
33593
33594
33595  if test "x$LIPO" = x; then
33596    # The variable is not set by user, try to locate tool using the code snippet
33597    for ac_prog in lipo
33598do
33599  # Extract the first word of "$ac_prog", so it can be a program name with args.
33600set dummy $ac_prog; ac_word=$2
33601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33602$as_echo_n "checking for $ac_word... " >&6; }
33603if ${ac_cv_path_LIPO+:} false; then :
33604  $as_echo_n "(cached) " >&6
33605else
33606  case $LIPO in
33607  [\\/]* | ?:[\\/]*)
33608  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33609  ;;
33610  *)
33611  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33612for as_dir in $PATH
33613do
33614  IFS=$as_save_IFS
33615  test -z "$as_dir" && as_dir=.
33616    for ac_exec_ext in '' $ac_executable_extensions; do
33617  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33618    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33619    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33620    break 2
33621  fi
33622done
33623  done
33624IFS=$as_save_IFS
33625
33626  ;;
33627esac
33628fi
33629LIPO=$ac_cv_path_LIPO
33630if test -n "$LIPO"; then
33631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33632$as_echo "$LIPO" >&6; }
33633else
33634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33635$as_echo "no" >&6; }
33636fi
33637
33638
33639  test -n "$LIPO" && break
33640done
33641
33642  else
33643    # The variable is set, but is it from the command line or the environment?
33644
33645    # Try to remove the string !LIPO! from our list.
33646    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
33647    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
33648      # If it failed, the variable was not from the command line. Ignore it,
33649      # but warn the user (except for BASH, which is always set by the calling BASH).
33650      if test "xLIPO" != xBASH; then
33651        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
33652$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
33653      fi
33654      # Try to locate tool using the code snippet
33655      for ac_prog in lipo
33656do
33657  # Extract the first word of "$ac_prog", so it can be a program name with args.
33658set dummy $ac_prog; ac_word=$2
33659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33660$as_echo_n "checking for $ac_word... " >&6; }
33661if ${ac_cv_path_LIPO+:} false; then :
33662  $as_echo_n "(cached) " >&6
33663else
33664  case $LIPO in
33665  [\\/]* | ?:[\\/]*)
33666  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33667  ;;
33668  *)
33669  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33670for as_dir in $PATH
33671do
33672  IFS=$as_save_IFS
33673  test -z "$as_dir" && as_dir=.
33674    for ac_exec_ext in '' $ac_executable_extensions; do
33675  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33676    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33677    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33678    break 2
33679  fi
33680done
33681  done
33682IFS=$as_save_IFS
33683
33684  ;;
33685esac
33686fi
33687LIPO=$ac_cv_path_LIPO
33688if test -n "$LIPO"; then
33689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33690$as_echo "$LIPO" >&6; }
33691else
33692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33693$as_echo "no" >&6; }
33694fi
33695
33696
33697  test -n "$LIPO" && break
33698done
33699
33700    else
33701      # If it succeeded, then it was overridden by the user. We will use it
33702      # for the tool.
33703
33704      # First remove it from the list of overridden variables, so we can test
33705      # for unknown variables in the end.
33706      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33707
33708      # Check if the provided tool contains a complete path.
33709      tool_specified="$LIPO"
33710      tool_basename="${tool_specified##*/}"
33711      if test "x$tool_basename" = "x$tool_specified"; then
33712        # A command without a complete path is provided, search $PATH.
33713        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
33714$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
33715        # Extract the first word of "$tool_basename", so it can be a program name with args.
33716set dummy $tool_basename; ac_word=$2
33717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33718$as_echo_n "checking for $ac_word... " >&6; }
33719if ${ac_cv_path_LIPO+:} false; then :
33720  $as_echo_n "(cached) " >&6
33721else
33722  case $LIPO in
33723  [\\/]* | ?:[\\/]*)
33724  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33725  ;;
33726  *)
33727  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33728for as_dir in $PATH
33729do
33730  IFS=$as_save_IFS
33731  test -z "$as_dir" && as_dir=.
33732    for ac_exec_ext in '' $ac_executable_extensions; do
33733  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33734    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33735    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33736    break 2
33737  fi
33738done
33739  done
33740IFS=$as_save_IFS
33741
33742  ;;
33743esac
33744fi
33745LIPO=$ac_cv_path_LIPO
33746if test -n "$LIPO"; then
33747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33748$as_echo "$LIPO" >&6; }
33749else
33750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33751$as_echo "no" >&6; }
33752fi
33753
33754
33755        if test "x$LIPO" = x; then
33756          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
33757        fi
33758      else
33759        # Otherwise we believe it is a complete path. Use it as it is.
33760        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
33761$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
33762        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
33763$as_echo_n "checking for LIPO... " >&6; }
33764        if test ! -x "$tool_specified"; then
33765          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33766$as_echo "not found" >&6; }
33767          as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
33768        fi
33769        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33770$as_echo "$tool_specified" >&6; }
33771      fi
33772    fi
33773  fi
33774
33775
33776
33777  # Only process if variable expands to non-empty
33778
33779  if test "x$LIPO" != x; then
33780    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33781
33782  # First separate the path from the arguments. This will split at the first
33783  # space.
33784  complete="$LIPO"
33785  path="${complete%% *}"
33786  tmp="$complete EOL"
33787  arguments="${tmp#* }"
33788
33789  # Input might be given as Windows format, start by converting to
33790  # unix format.
33791  new_path=`$CYGPATH -u "$path"`
33792
33793  # Now try to locate executable using which
33794  new_path=`$WHICH "$new_path" 2> /dev/null`
33795  # bat and cmd files are not always considered executable in cygwin causing which
33796  # to not find them
33797  if test "x$new_path" = x \
33798      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33799      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33800    new_path=`$CYGPATH -u "$path"`
33801  fi
33802  if test "x$new_path" = x; then
33803    # Oops. Which didn't find the executable.
33804    # The splitting of arguments from the executable at a space might have been incorrect,
33805    # since paths with space are more likely in Windows. Give it another try with the whole
33806    # argument.
33807    path="$complete"
33808    arguments="EOL"
33809    new_path=`$CYGPATH -u "$path"`
33810    new_path=`$WHICH "$new_path" 2> /dev/null`
33811    # bat and cmd files are not always considered executable in cygwin causing which
33812    # to not find them
33813    if test "x$new_path" = x \
33814        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33815        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33816      new_path=`$CYGPATH -u "$path"`
33817    fi
33818    if test "x$new_path" = x; then
33819      # It's still not found. Now this is an unrecoverable error.
33820      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33821$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33822      has_space=`$ECHO "$complete" | $GREP " "`
33823      if test "x$has_space" != x; then
33824        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33825$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33826      fi
33827      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33828    fi
33829  fi
33830
33831  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33832  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33833  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33834  # "foo.exe" is OK but "foo" is an error.
33835  #
33836  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33837  # It is also a way to make sure we got the proper file name for the real test later on.
33838  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33839  if test "x$test_shortpath" = x; then
33840    # Short path failed, file does not exist as specified.
33841    # Try adding .exe or .cmd
33842    if test -f "${new_path}.exe"; then
33843      input_to_shortpath="${new_path}.exe"
33844    elif test -f "${new_path}.cmd"; then
33845      input_to_shortpath="${new_path}.cmd"
33846    else
33847      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
33848$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
33849      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33850$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33851      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33852    fi
33853  else
33854    input_to_shortpath="$new_path"
33855  fi
33856
33857  # Call helper function which possibly converts this using DOS-style short mode.
33858  # If so, the updated path is stored in $new_path.
33859  new_path="$input_to_shortpath"
33860
33861  input_path="$input_to_shortpath"
33862  # Check if we need to convert this using DOS-style short mode. If the path
33863  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33864  # take no chances and rewrite it.
33865  # Note: m4 eats our [], so we need to use [ and ] instead.
33866  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33867  if test "x$has_forbidden_chars" != x; then
33868    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33869    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33870    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33871    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33872      # Going to short mode and back again did indeed matter. Since short mode is
33873      # case insensitive, let's make it lowercase to improve readability.
33874      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33875      # Now convert it back to Unix-style (cygpath)
33876      input_path=`$CYGPATH -u "$shortmode_path"`
33877      new_path="$input_path"
33878    fi
33879  fi
33880
33881  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33882  if test "x$test_cygdrive_prefix" = x; then
33883    # As a simple fix, exclude /usr/bin since it's not a real path.
33884    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33885      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33886      # a path prefixed by /cygdrive for fixpath to work.
33887      new_path="$CYGWIN_ROOT_PATH$input_path"
33888    fi
33889  fi
33890
33891  # remove trailing .exe if any
33892  new_path="${new_path/%.exe/}"
33893
33894    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33895
33896  # First separate the path from the arguments. This will split at the first
33897  # space.
33898  complete="$LIPO"
33899  path="${complete%% *}"
33900  tmp="$complete EOL"
33901  arguments="${tmp#* }"
33902
33903  # Input might be given as Windows format, start by converting to
33904  # unix format.
33905  new_path="$path"
33906
33907  windows_path="$new_path"
33908  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33909    unix_path=`$CYGPATH -u "$windows_path"`
33910    new_path="$unix_path"
33911  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33912    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33913    new_path="$unix_path"
33914  fi
33915
33916
33917  # Now try to locate executable using which
33918  new_path=`$WHICH "$new_path" 2> /dev/null`
33919
33920  if test "x$new_path" = x; then
33921    # Oops. Which didn't find the executable.
33922    # The splitting of arguments from the executable at a space might have been incorrect,
33923    # since paths with space are more likely in Windows. Give it another try with the whole
33924    # argument.
33925    path="$complete"
33926    arguments="EOL"
33927    new_path="$path"
33928
33929  windows_path="$new_path"
33930  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33931    unix_path=`$CYGPATH -u "$windows_path"`
33932    new_path="$unix_path"
33933  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33934    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33935    new_path="$unix_path"
33936  fi
33937
33938
33939    new_path=`$WHICH "$new_path" 2> /dev/null`
33940    # bat and cmd files are not always considered executable in MSYS causing which
33941    # to not find them
33942    if test "x$new_path" = x \
33943        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33944        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33945      new_path="$path"
33946
33947  windows_path="$new_path"
33948  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33949    unix_path=`$CYGPATH -u "$windows_path"`
33950    new_path="$unix_path"
33951  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33952    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33953    new_path="$unix_path"
33954  fi
33955
33956    fi
33957
33958    if test "x$new_path" = x; then
33959      # It's still not found. Now this is an unrecoverable error.
33960      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33961$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33962      has_space=`$ECHO "$complete" | $GREP " "`
33963      if test "x$has_space" != x; then
33964        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33965$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33966      fi
33967      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33968    fi
33969  fi
33970
33971  # Now new_path has a complete unix path to the binary
33972  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33973    # Keep paths in /bin as-is, but remove trailing .exe if any
33974    new_path="${new_path/%.exe/}"
33975    # Do not save /bin paths to all_fixpath_prefixes!
33976  else
33977    # Not in mixed or Windows style, start by that.
33978    new_path=`cmd //c echo $new_path`
33979
33980  input_path="$new_path"
33981  # Check if we need to convert this using DOS-style short mode. If the path
33982  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33983  # take no chances and rewrite it.
33984  # Note: m4 eats our [], so we need to use [ and ] instead.
33985  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33986  if test "x$has_forbidden_chars" != x; then
33987    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33988    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33989  fi
33990
33991    # Output is in $new_path
33992
33993  windows_path="$new_path"
33994  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33995    unix_path=`$CYGPATH -u "$windows_path"`
33996    new_path="$unix_path"
33997  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33998    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33999    new_path="$unix_path"
34000  fi
34001
34002    # remove trailing .exe if any
34003    new_path="${new_path/%.exe/}"
34004
34005    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34006    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34007  fi
34008
34009    else
34010      # We're on a unix platform. Hooray! :)
34011      # First separate the path from the arguments. This will split at the first
34012      # space.
34013      complete="$LIPO"
34014      path="${complete%% *}"
34015      tmp="$complete EOL"
34016      arguments="${tmp#* }"
34017
34018      # Cannot rely on the command "which" here since it doesn't always work.
34019      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34020      if test -z "$is_absolute_path"; then
34021        # Path to executable is not absolute. Find it.
34022        IFS_save="$IFS"
34023        IFS=:
34024        for p in $PATH; do
34025          if test -f "$p/$path" && test -x "$p/$path"; then
34026            new_path="$p/$path"
34027            break
34028          fi
34029        done
34030        IFS="$IFS_save"
34031      else
34032        # This is an absolute path, we can use it without further modifications.
34033        new_path="$path"
34034      fi
34035
34036      if test "x$new_path" = x; then
34037        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
34038$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
34039        has_space=`$ECHO "$complete" | $GREP " "`
34040        if test "x$has_space" != x; then
34041          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34042$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34043        fi
34044        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34045      fi
34046    fi
34047
34048    # Now join together the path and the arguments once again
34049    if test "x$arguments" != xEOL; then
34050      new_complete="$new_path ${arguments% *}"
34051    else
34052      new_complete="$new_path"
34053    fi
34054
34055    if test "x$complete" != "x$new_complete"; then
34056      LIPO="$new_complete"
34057      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
34058$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
34059    fi
34060  fi
34061
34062  fi
34063
34064  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34065    # Extract the first word of "mt", so it can be a program name with args.
34066set dummy mt; ac_word=$2
34067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34068$as_echo_n "checking for $ac_word... " >&6; }
34069if ${ac_cv_prog_MT+:} false; then :
34070  $as_echo_n "(cached) " >&6
34071else
34072  if test -n "$MT"; then
34073  ac_cv_prog_MT="$MT" # Let the user override the test.
34074else
34075  ac_prog_rejected=no
34076as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34077for as_dir in $PATH
34078do
34079  IFS=$as_save_IFS
34080  test -z "$as_dir" && as_dir=.
34081    for ac_exec_ext in '' $ac_executable_extensions; do
34082  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34083    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
34084       ac_prog_rejected=yes
34085       continue
34086     fi
34087    ac_cv_prog_MT="mt"
34088    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34089    break 2
34090  fi
34091done
34092  done
34093IFS=$as_save_IFS
34094
34095if test $ac_prog_rejected = yes; then
34096  # We found a bogon in the path, so make sure we never use it.
34097  set dummy $ac_cv_prog_MT
34098  shift
34099  if test $# != 0; then
34100    # We chose a different compiler from the bogus one.
34101    # However, it has the same basename, so the bogon will be chosen
34102    # first if we set MT to just the basename; use the full file name.
34103    shift
34104    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
34105  fi
34106fi
34107fi
34108fi
34109MT=$ac_cv_prog_MT
34110if test -n "$MT"; then
34111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
34112$as_echo "$MT" >&6; }
34113else
34114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34115$as_echo "no" >&6; }
34116fi
34117
34118
34119
34120  # Only process if variable expands to non-empty
34121
34122  if test "x$MT" != x; then
34123    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34124
34125  # First separate the path from the arguments. This will split at the first
34126  # space.
34127  complete="$MT"
34128  path="${complete%% *}"
34129  tmp="$complete EOL"
34130  arguments="${tmp#* }"
34131
34132  # Input might be given as Windows format, start by converting to
34133  # unix format.
34134  new_path=`$CYGPATH -u "$path"`
34135
34136  # Now try to locate executable using which
34137  new_path=`$WHICH "$new_path" 2> /dev/null`
34138  # bat and cmd files are not always considered executable in cygwin causing which
34139  # to not find them
34140  if test "x$new_path" = x \
34141      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34142      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34143    new_path=`$CYGPATH -u "$path"`
34144  fi
34145  if test "x$new_path" = x; then
34146    # Oops. Which didn't find the executable.
34147    # The splitting of arguments from the executable at a space might have been incorrect,
34148    # since paths with space are more likely in Windows. Give it another try with the whole
34149    # argument.
34150    path="$complete"
34151    arguments="EOL"
34152    new_path=`$CYGPATH -u "$path"`
34153    new_path=`$WHICH "$new_path" 2> /dev/null`
34154    # bat and cmd files are not always considered executable in cygwin causing which
34155    # to not find them
34156    if test "x$new_path" = x \
34157        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34158        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34159      new_path=`$CYGPATH -u "$path"`
34160    fi
34161    if test "x$new_path" = x; then
34162      # It's still not found. Now this is an unrecoverable error.
34163      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34164$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34165      has_space=`$ECHO "$complete" | $GREP " "`
34166      if test "x$has_space" != x; then
34167        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34168$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34169      fi
34170      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34171    fi
34172  fi
34173
34174  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34175  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34176  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34177  # "foo.exe" is OK but "foo" is an error.
34178  #
34179  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34180  # It is also a way to make sure we got the proper file name for the real test later on.
34181  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34182  if test "x$test_shortpath" = x; then
34183    # Short path failed, file does not exist as specified.
34184    # Try adding .exe or .cmd
34185    if test -f "${new_path}.exe"; then
34186      input_to_shortpath="${new_path}.exe"
34187    elif test -f "${new_path}.cmd"; then
34188      input_to_shortpath="${new_path}.cmd"
34189    else
34190      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
34191$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
34192      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34193$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34194      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34195    fi
34196  else
34197    input_to_shortpath="$new_path"
34198  fi
34199
34200  # Call helper function which possibly converts this using DOS-style short mode.
34201  # If so, the updated path is stored in $new_path.
34202  new_path="$input_to_shortpath"
34203
34204  input_path="$input_to_shortpath"
34205  # Check if we need to convert this using DOS-style short mode. If the path
34206  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34207  # take no chances and rewrite it.
34208  # Note: m4 eats our [], so we need to use [ and ] instead.
34209  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34210  if test "x$has_forbidden_chars" != x; then
34211    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34212    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34213    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34214    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34215      # Going to short mode and back again did indeed matter. Since short mode is
34216      # case insensitive, let's make it lowercase to improve readability.
34217      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34218      # Now convert it back to Unix-style (cygpath)
34219      input_path=`$CYGPATH -u "$shortmode_path"`
34220      new_path="$input_path"
34221    fi
34222  fi
34223
34224  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34225  if test "x$test_cygdrive_prefix" = x; then
34226    # As a simple fix, exclude /usr/bin since it's not a real path.
34227    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34228      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34229      # a path prefixed by /cygdrive for fixpath to work.
34230      new_path="$CYGWIN_ROOT_PATH$input_path"
34231    fi
34232  fi
34233
34234  # remove trailing .exe if any
34235  new_path="${new_path/%.exe/}"
34236
34237    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34238
34239  # First separate the path from the arguments. This will split at the first
34240  # space.
34241  complete="$MT"
34242  path="${complete%% *}"
34243  tmp="$complete EOL"
34244  arguments="${tmp#* }"
34245
34246  # Input might be given as Windows format, start by converting to
34247  # unix format.
34248  new_path="$path"
34249
34250  windows_path="$new_path"
34251  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34252    unix_path=`$CYGPATH -u "$windows_path"`
34253    new_path="$unix_path"
34254  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34255    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34256    new_path="$unix_path"
34257  fi
34258
34259
34260  # Now try to locate executable using which
34261  new_path=`$WHICH "$new_path" 2> /dev/null`
34262
34263  if test "x$new_path" = x; then
34264    # Oops. Which didn't find the executable.
34265    # The splitting of arguments from the executable at a space might have been incorrect,
34266    # since paths with space are more likely in Windows. Give it another try with the whole
34267    # argument.
34268    path="$complete"
34269    arguments="EOL"
34270    new_path="$path"
34271
34272  windows_path="$new_path"
34273  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34274    unix_path=`$CYGPATH -u "$windows_path"`
34275    new_path="$unix_path"
34276  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34277    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34278    new_path="$unix_path"
34279  fi
34280
34281
34282    new_path=`$WHICH "$new_path" 2> /dev/null`
34283    # bat and cmd files are not always considered executable in MSYS causing which
34284    # to not find them
34285    if test "x$new_path" = x \
34286        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34287        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34288      new_path="$path"
34289
34290  windows_path="$new_path"
34291  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34292    unix_path=`$CYGPATH -u "$windows_path"`
34293    new_path="$unix_path"
34294  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34295    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34296    new_path="$unix_path"
34297  fi
34298
34299    fi
34300
34301    if test "x$new_path" = x; then
34302      # It's still not found. Now this is an unrecoverable error.
34303      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34304$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34305      has_space=`$ECHO "$complete" | $GREP " "`
34306      if test "x$has_space" != x; then
34307        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34308$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34309      fi
34310      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34311    fi
34312  fi
34313
34314  # Now new_path has a complete unix path to the binary
34315  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34316    # Keep paths in /bin as-is, but remove trailing .exe if any
34317    new_path="${new_path/%.exe/}"
34318    # Do not save /bin paths to all_fixpath_prefixes!
34319  else
34320    # Not in mixed or Windows style, start by that.
34321    new_path=`cmd //c echo $new_path`
34322
34323  input_path="$new_path"
34324  # Check if we need to convert this using DOS-style short mode. If the path
34325  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34326  # take no chances and rewrite it.
34327  # Note: m4 eats our [], so we need to use [ and ] instead.
34328  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34329  if test "x$has_forbidden_chars" != x; then
34330    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34331    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34332  fi
34333
34334    # Output is in $new_path
34335
34336  windows_path="$new_path"
34337  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34338    unix_path=`$CYGPATH -u "$windows_path"`
34339    new_path="$unix_path"
34340  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34341    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34342    new_path="$unix_path"
34343  fi
34344
34345    # remove trailing .exe if any
34346    new_path="${new_path/%.exe/}"
34347
34348    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34349    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34350  fi
34351
34352    else
34353      # We're on a unix platform. Hooray! :)
34354      # First separate the path from the arguments. This will split at the first
34355      # space.
34356      complete="$MT"
34357      path="${complete%% *}"
34358      tmp="$complete EOL"
34359      arguments="${tmp#* }"
34360
34361      # Cannot rely on the command "which" here since it doesn't always work.
34362      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34363      if test -z "$is_absolute_path"; then
34364        # Path to executable is not absolute. Find it.
34365        IFS_save="$IFS"
34366        IFS=:
34367        for p in $PATH; do
34368          if test -f "$p/$path" && test -x "$p/$path"; then
34369            new_path="$p/$path"
34370            break
34371          fi
34372        done
34373        IFS="$IFS_save"
34374      else
34375        # This is an absolute path, we can use it without further modifications.
34376        new_path="$path"
34377      fi
34378
34379      if test "x$new_path" = x; then
34380        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34381$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34382        has_space=`$ECHO "$complete" | $GREP " "`
34383        if test "x$has_space" != x; then
34384          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34385$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34386        fi
34387        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34388      fi
34389    fi
34390
34391    # Now join together the path and the arguments once again
34392    if test "x$arguments" != xEOL; then
34393      new_complete="$new_path ${arguments% *}"
34394    else
34395      new_complete="$new_path"
34396    fi
34397
34398    if test "x$complete" != "x$new_complete"; then
34399      MT="$new_complete"
34400      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
34401$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
34402    fi
34403  fi
34404
34405    # Setup the resource compiler (RC)
34406    # Extract the first word of "rc", so it can be a program name with args.
34407set dummy rc; ac_word=$2
34408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34409$as_echo_n "checking for $ac_word... " >&6; }
34410if ${ac_cv_prog_RC+:} false; then :
34411  $as_echo_n "(cached) " >&6
34412else
34413  if test -n "$RC"; then
34414  ac_cv_prog_RC="$RC" # Let the user override the test.
34415else
34416  ac_prog_rejected=no
34417as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34418for as_dir in $PATH
34419do
34420  IFS=$as_save_IFS
34421  test -z "$as_dir" && as_dir=.
34422    for ac_exec_ext in '' $ac_executable_extensions; do
34423  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34424    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
34425       ac_prog_rejected=yes
34426       continue
34427     fi
34428    ac_cv_prog_RC="rc"
34429    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34430    break 2
34431  fi
34432done
34433  done
34434IFS=$as_save_IFS
34435
34436if test $ac_prog_rejected = yes; then
34437  # We found a bogon in the path, so make sure we never use it.
34438  set dummy $ac_cv_prog_RC
34439  shift
34440  if test $# != 0; then
34441    # We chose a different compiler from the bogus one.
34442    # However, it has the same basename, so the bogon will be chosen
34443    # first if we set RC to just the basename; use the full file name.
34444    shift
34445    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
34446  fi
34447fi
34448fi
34449fi
34450RC=$ac_cv_prog_RC
34451if test -n "$RC"; then
34452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
34453$as_echo "$RC" >&6; }
34454else
34455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34456$as_echo "no" >&6; }
34457fi
34458
34459
34460
34461  # Only process if variable expands to non-empty
34462
34463  if test "x$RC" != x; then
34464    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34465
34466  # First separate the path from the arguments. This will split at the first
34467  # space.
34468  complete="$RC"
34469  path="${complete%% *}"
34470  tmp="$complete EOL"
34471  arguments="${tmp#* }"
34472
34473  # Input might be given as Windows format, start by converting to
34474  # unix format.
34475  new_path=`$CYGPATH -u "$path"`
34476
34477  # Now try to locate executable using which
34478  new_path=`$WHICH "$new_path" 2> /dev/null`
34479  # bat and cmd files are not always considered executable in cygwin causing which
34480  # to not find them
34481  if test "x$new_path" = x \
34482      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34483      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34484    new_path=`$CYGPATH -u "$path"`
34485  fi
34486  if test "x$new_path" = x; then
34487    # Oops. Which didn't find the executable.
34488    # The splitting of arguments from the executable at a space might have been incorrect,
34489    # since paths with space are more likely in Windows. Give it another try with the whole
34490    # argument.
34491    path="$complete"
34492    arguments="EOL"
34493    new_path=`$CYGPATH -u "$path"`
34494    new_path=`$WHICH "$new_path" 2> /dev/null`
34495    # bat and cmd files are not always considered executable in cygwin causing which
34496    # to not find them
34497    if test "x$new_path" = x \
34498        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34499        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34500      new_path=`$CYGPATH -u "$path"`
34501    fi
34502    if test "x$new_path" = x; then
34503      # It's still not found. Now this is an unrecoverable error.
34504      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34505$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34506      has_space=`$ECHO "$complete" | $GREP " "`
34507      if test "x$has_space" != x; then
34508        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34509$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34510      fi
34511      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34512    fi
34513  fi
34514
34515  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34516  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34517  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34518  # "foo.exe" is OK but "foo" is an error.
34519  #
34520  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34521  # It is also a way to make sure we got the proper file name for the real test later on.
34522  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34523  if test "x$test_shortpath" = x; then
34524    # Short path failed, file does not exist as specified.
34525    # Try adding .exe or .cmd
34526    if test -f "${new_path}.exe"; then
34527      input_to_shortpath="${new_path}.exe"
34528    elif test -f "${new_path}.cmd"; then
34529      input_to_shortpath="${new_path}.cmd"
34530    else
34531      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
34532$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
34533      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34534$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34535      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34536    fi
34537  else
34538    input_to_shortpath="$new_path"
34539  fi
34540
34541  # Call helper function which possibly converts this using DOS-style short mode.
34542  # If so, the updated path is stored in $new_path.
34543  new_path="$input_to_shortpath"
34544
34545  input_path="$input_to_shortpath"
34546  # Check if we need to convert this using DOS-style short mode. If the path
34547  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34548  # take no chances and rewrite it.
34549  # Note: m4 eats our [], so we need to use [ and ] instead.
34550  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34551  if test "x$has_forbidden_chars" != x; then
34552    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34553    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34554    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34555    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34556      # Going to short mode and back again did indeed matter. Since short mode is
34557      # case insensitive, let's make it lowercase to improve readability.
34558      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34559      # Now convert it back to Unix-style (cygpath)
34560      input_path=`$CYGPATH -u "$shortmode_path"`
34561      new_path="$input_path"
34562    fi
34563  fi
34564
34565  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34566  if test "x$test_cygdrive_prefix" = x; then
34567    # As a simple fix, exclude /usr/bin since it's not a real path.
34568    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34569      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34570      # a path prefixed by /cygdrive for fixpath to work.
34571      new_path="$CYGWIN_ROOT_PATH$input_path"
34572    fi
34573  fi
34574
34575  # remove trailing .exe if any
34576  new_path="${new_path/%.exe/}"
34577
34578    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34579
34580  # First separate the path from the arguments. This will split at the first
34581  # space.
34582  complete="$RC"
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="$path"
34590
34591  windows_path="$new_path"
34592  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34593    unix_path=`$CYGPATH -u "$windows_path"`
34594    new_path="$unix_path"
34595  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34596    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34597    new_path="$unix_path"
34598  fi
34599
34600
34601  # Now try to locate executable using which
34602  new_path=`$WHICH "$new_path" 2> /dev/null`
34603
34604  if test "x$new_path" = x; then
34605    # Oops. Which didn't find the executable.
34606    # The splitting of arguments from the executable at a space might have been incorrect,
34607    # since paths with space are more likely in Windows. Give it another try with the whole
34608    # argument.
34609    path="$complete"
34610    arguments="EOL"
34611    new_path="$path"
34612
34613  windows_path="$new_path"
34614  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34615    unix_path=`$CYGPATH -u "$windows_path"`
34616    new_path="$unix_path"
34617  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34618    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34619    new_path="$unix_path"
34620  fi
34621
34622
34623    new_path=`$WHICH "$new_path" 2> /dev/null`
34624    # bat and cmd files are not always considered executable in MSYS causing which
34625    # to not find them
34626    if test "x$new_path" = x \
34627        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34628        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34629      new_path="$path"
34630
34631  windows_path="$new_path"
34632  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34633    unix_path=`$CYGPATH -u "$windows_path"`
34634    new_path="$unix_path"
34635  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34636    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34637    new_path="$unix_path"
34638  fi
34639
34640    fi
34641
34642    if test "x$new_path" = x; then
34643      # It's still not found. Now this is an unrecoverable error.
34644      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34645$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34646      has_space=`$ECHO "$complete" | $GREP " "`
34647      if test "x$has_space" != x; then
34648        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34649$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34650      fi
34651      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34652    fi
34653  fi
34654
34655  # Now new_path has a complete unix path to the binary
34656  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34657    # Keep paths in /bin as-is, but remove trailing .exe if any
34658    new_path="${new_path/%.exe/}"
34659    # Do not save /bin paths to all_fixpath_prefixes!
34660  else
34661    # Not in mixed or Windows style, start by that.
34662    new_path=`cmd //c echo $new_path`
34663
34664  input_path="$new_path"
34665  # Check if we need to convert this using DOS-style short mode. If the path
34666  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34667  # take no chances and rewrite it.
34668  # Note: m4 eats our [], so we need to use [ and ] instead.
34669  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34670  if test "x$has_forbidden_chars" != x; then
34671    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34672    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34673  fi
34674
34675    # Output is in $new_path
34676
34677  windows_path="$new_path"
34678  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34679    unix_path=`$CYGPATH -u "$windows_path"`
34680    new_path="$unix_path"
34681  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34682    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34683    new_path="$unix_path"
34684  fi
34685
34686    # remove trailing .exe if any
34687    new_path="${new_path/%.exe/}"
34688
34689    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34690    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34691  fi
34692
34693    else
34694      # We're on a unix platform. Hooray! :)
34695      # First separate the path from the arguments. This will split at the first
34696      # space.
34697      complete="$RC"
34698      path="${complete%% *}"
34699      tmp="$complete EOL"
34700      arguments="${tmp#* }"
34701
34702      # Cannot rely on the command "which" here since it doesn't always work.
34703      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34704      if test -z "$is_absolute_path"; then
34705        # Path to executable is not absolute. Find it.
34706        IFS_save="$IFS"
34707        IFS=:
34708        for p in $PATH; do
34709          if test -f "$p/$path" && test -x "$p/$path"; then
34710            new_path="$p/$path"
34711            break
34712          fi
34713        done
34714        IFS="$IFS_save"
34715      else
34716        # This is an absolute path, we can use it without further modifications.
34717        new_path="$path"
34718      fi
34719
34720      if test "x$new_path" = x; then
34721        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34722$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34723        has_space=`$ECHO "$complete" | $GREP " "`
34724        if test "x$has_space" != x; then
34725          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34726$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34727        fi
34728        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34729      fi
34730    fi
34731
34732    # Now join together the path and the arguments once again
34733    if test "x$arguments" != xEOL; then
34734      new_complete="$new_path ${arguments% *}"
34735    else
34736      new_complete="$new_path"
34737    fi
34738
34739    if test "x$complete" != "x$new_complete"; then
34740      RC="$new_complete"
34741      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
34742$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
34743    fi
34744  fi
34745
34746    # Extract the first word of "dumpbin", so it can be a program name with args.
34747set dummy dumpbin; ac_word=$2
34748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34749$as_echo_n "checking for $ac_word... " >&6; }
34750if ${ac_cv_prog_DUMPBIN+:} false; then :
34751  $as_echo_n "(cached) " >&6
34752else
34753  if test -n "$DUMPBIN"; then
34754  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
34755else
34756as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34757for as_dir in $PATH
34758do
34759  IFS=$as_save_IFS
34760  test -z "$as_dir" && as_dir=.
34761    for ac_exec_ext in '' $ac_executable_extensions; do
34762  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34763    ac_cv_prog_DUMPBIN="dumpbin"
34764    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34765    break 2
34766  fi
34767done
34768  done
34769IFS=$as_save_IFS
34770
34771fi
34772fi
34773DUMPBIN=$ac_cv_prog_DUMPBIN
34774if test -n "$DUMPBIN"; then
34775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
34776$as_echo "$DUMPBIN" >&6; }
34777else
34778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34779$as_echo "no" >&6; }
34780fi
34781
34782
34783
34784  # Only process if variable expands to non-empty
34785
34786  if test "x$DUMPBIN" != x; then
34787    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34788
34789  # First separate the path from the arguments. This will split at the first
34790  # space.
34791  complete="$DUMPBIN"
34792  path="${complete%% *}"
34793  tmp="$complete EOL"
34794  arguments="${tmp#* }"
34795
34796  # Input might be given as Windows format, start by converting to
34797  # unix format.
34798  new_path=`$CYGPATH -u "$path"`
34799
34800  # Now try to locate executable using which
34801  new_path=`$WHICH "$new_path" 2> /dev/null`
34802  # bat and cmd files are not always considered executable in cygwin causing which
34803  # to not find them
34804  if test "x$new_path" = x \
34805      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34806      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34807    new_path=`$CYGPATH -u "$path"`
34808  fi
34809  if test "x$new_path" = x; then
34810    # Oops. Which didn't find the executable.
34811    # The splitting of arguments from the executable at a space might have been incorrect,
34812    # since paths with space are more likely in Windows. Give it another try with the whole
34813    # argument.
34814    path="$complete"
34815    arguments="EOL"
34816    new_path=`$CYGPATH -u "$path"`
34817    new_path=`$WHICH "$new_path" 2> /dev/null`
34818    # bat and cmd files are not always considered executable in cygwin causing which
34819    # to not find them
34820    if test "x$new_path" = x \
34821        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34822        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34823      new_path=`$CYGPATH -u "$path"`
34824    fi
34825    if test "x$new_path" = x; then
34826      # It's still not found. Now this is an unrecoverable error.
34827      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34828$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34829      has_space=`$ECHO "$complete" | $GREP " "`
34830      if test "x$has_space" != x; then
34831        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34832$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34833      fi
34834      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34835    fi
34836  fi
34837
34838  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34839  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34840  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34841  # "foo.exe" is OK but "foo" is an error.
34842  #
34843  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34844  # It is also a way to make sure we got the proper file name for the real test later on.
34845  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34846  if test "x$test_shortpath" = x; then
34847    # Short path failed, file does not exist as specified.
34848    # Try adding .exe or .cmd
34849    if test -f "${new_path}.exe"; then
34850      input_to_shortpath="${new_path}.exe"
34851    elif test -f "${new_path}.cmd"; then
34852      input_to_shortpath="${new_path}.cmd"
34853    else
34854      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
34855$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
34856      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34857$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34858      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34859    fi
34860  else
34861    input_to_shortpath="$new_path"
34862  fi
34863
34864  # Call helper function which possibly converts this using DOS-style short mode.
34865  # If so, the updated path is stored in $new_path.
34866  new_path="$input_to_shortpath"
34867
34868  input_path="$input_to_shortpath"
34869  # Check if we need to convert this using DOS-style short mode. If the path
34870  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34871  # take no chances and rewrite it.
34872  # Note: m4 eats our [], so we need to use [ and ] instead.
34873  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34874  if test "x$has_forbidden_chars" != x; then
34875    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34876    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34877    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34878    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34879      # Going to short mode and back again did indeed matter. Since short mode is
34880      # case insensitive, let's make it lowercase to improve readability.
34881      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34882      # Now convert it back to Unix-style (cygpath)
34883      input_path=`$CYGPATH -u "$shortmode_path"`
34884      new_path="$input_path"
34885    fi
34886  fi
34887
34888  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34889  if test "x$test_cygdrive_prefix" = x; then
34890    # As a simple fix, exclude /usr/bin since it's not a real path.
34891    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34892      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34893      # a path prefixed by /cygdrive for fixpath to work.
34894      new_path="$CYGWIN_ROOT_PATH$input_path"
34895    fi
34896  fi
34897
34898  # remove trailing .exe if any
34899  new_path="${new_path/%.exe/}"
34900
34901    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34902
34903  # First separate the path from the arguments. This will split at the first
34904  # space.
34905  complete="$DUMPBIN"
34906  path="${complete%% *}"
34907  tmp="$complete EOL"
34908  arguments="${tmp#* }"
34909
34910  # Input might be given as Windows format, start by converting to
34911  # unix format.
34912  new_path="$path"
34913
34914  windows_path="$new_path"
34915  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34916    unix_path=`$CYGPATH -u "$windows_path"`
34917    new_path="$unix_path"
34918  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34919    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34920    new_path="$unix_path"
34921  fi
34922
34923
34924  # Now try to locate executable using which
34925  new_path=`$WHICH "$new_path" 2> /dev/null`
34926
34927  if test "x$new_path" = x; then
34928    # Oops. Which didn't find the executable.
34929    # The splitting of arguments from the executable at a space might have been incorrect,
34930    # since paths with space are more likely in Windows. Give it another try with the whole
34931    # argument.
34932    path="$complete"
34933    arguments="EOL"
34934    new_path="$path"
34935
34936  windows_path="$new_path"
34937  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34938    unix_path=`$CYGPATH -u "$windows_path"`
34939    new_path="$unix_path"
34940  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34941    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34942    new_path="$unix_path"
34943  fi
34944
34945
34946    new_path=`$WHICH "$new_path" 2> /dev/null`
34947    # bat and cmd files are not always considered executable in MSYS causing which
34948    # to not find them
34949    if test "x$new_path" = x \
34950        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34951        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34952      new_path="$path"
34953
34954  windows_path="$new_path"
34955  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34956    unix_path=`$CYGPATH -u "$windows_path"`
34957    new_path="$unix_path"
34958  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34959    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34960    new_path="$unix_path"
34961  fi
34962
34963    fi
34964
34965    if test "x$new_path" = x; then
34966      # It's still not found. Now this is an unrecoverable error.
34967      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34968$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34969      has_space=`$ECHO "$complete" | $GREP " "`
34970      if test "x$has_space" != x; then
34971        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34972$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34973      fi
34974      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34975    fi
34976  fi
34977
34978  # Now new_path has a complete unix path to the binary
34979  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34980    # Keep paths in /bin as-is, but remove trailing .exe if any
34981    new_path="${new_path/%.exe/}"
34982    # Do not save /bin paths to all_fixpath_prefixes!
34983  else
34984    # Not in mixed or Windows style, start by that.
34985    new_path=`cmd //c echo $new_path`
34986
34987  input_path="$new_path"
34988  # Check if we need to convert this using DOS-style short mode. If the path
34989  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34990  # take no chances and rewrite it.
34991  # Note: m4 eats our [], so we need to use [ and ] instead.
34992  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34993  if test "x$has_forbidden_chars" != x; then
34994    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34995    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34996  fi
34997
34998    # Output is in $new_path
34999
35000  windows_path="$new_path"
35001  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35002    unix_path=`$CYGPATH -u "$windows_path"`
35003    new_path="$unix_path"
35004  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35005    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35006    new_path="$unix_path"
35007  fi
35008
35009    # remove trailing .exe if any
35010    new_path="${new_path/%.exe/}"
35011
35012    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35013    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35014  fi
35015
35016    else
35017      # We're on a unix platform. Hooray! :)
35018      # First separate the path from the arguments. This will split at the first
35019      # space.
35020      complete="$DUMPBIN"
35021      path="${complete%% *}"
35022      tmp="$complete EOL"
35023      arguments="${tmp#* }"
35024
35025      # Cannot rely on the command "which" here since it doesn't always work.
35026      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35027      if test -z "$is_absolute_path"; then
35028        # Path to executable is not absolute. Find it.
35029        IFS_save="$IFS"
35030        IFS=:
35031        for p in $PATH; do
35032          if test -f "$p/$path" && test -x "$p/$path"; then
35033            new_path="$p/$path"
35034            break
35035          fi
35036        done
35037        IFS="$IFS_save"
35038      else
35039        # This is an absolute path, we can use it without further modifications.
35040        new_path="$path"
35041      fi
35042
35043      if test "x$new_path" = x; then
35044        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35045$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35046        has_space=`$ECHO "$complete" | $GREP " "`
35047        if test "x$has_space" != x; then
35048          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35049$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35050        fi
35051        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35052      fi
35053    fi
35054
35055    # Now join together the path and the arguments once again
35056    if test "x$arguments" != xEOL; then
35057      new_complete="$new_path ${arguments% *}"
35058    else
35059      new_complete="$new_path"
35060    fi
35061
35062    if test "x$complete" != "x$new_complete"; then
35063      DUMPBIN="$new_complete"
35064      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
35065$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
35066    fi
35067  fi
35068
35069    # We need to check for 'msbuild.exe' because at the place where we expect to
35070    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
35071    # won't find the 'msbuild.exe' executable in that case (and the
35072    # 'ac_executable_extensions' is unusable due to performance reasons).
35073    # Notice that we intentionally don't fix up the path to MSBUILD because we
35074    # will call it in a DOS shell during freetype detection on Windows (see
35075    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
35076    # Extract the first word of "msbuild.exe", so it can be a program name with args.
35077set dummy msbuild.exe; ac_word=$2
35078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35079$as_echo_n "checking for $ac_word... " >&6; }
35080if ${ac_cv_prog_MSBUILD+:} false; then :
35081  $as_echo_n "(cached) " >&6
35082else
35083  if test -n "$MSBUILD"; then
35084  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
35085else
35086as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35087for as_dir in $PATH
35088do
35089  IFS=$as_save_IFS
35090  test -z "$as_dir" && as_dir=.
35091    for ac_exec_ext in '' $ac_executable_extensions; do
35092  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35093    ac_cv_prog_MSBUILD="msbuild.exe"
35094    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35095    break 2
35096  fi
35097done
35098  done
35099IFS=$as_save_IFS
35100
35101fi
35102fi
35103MSBUILD=$ac_cv_prog_MSBUILD
35104if test -n "$MSBUILD"; then
35105  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
35106$as_echo "$MSBUILD" >&6; }
35107else
35108  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35109$as_echo "no" >&6; }
35110fi
35111
35112
35113  fi
35114
35115  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
35116
35117
35118  # Publish this variable in the help.
35119
35120
35121  if test "x$STRIP" = x; then
35122    # The variable is not set by user, try to locate tool using the code snippet
35123    for ac_prog in strip
35124do
35125  # Extract the first word of "$ac_prog", so it can be a program name with args.
35126set dummy $ac_prog; ac_word=$2
35127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35128$as_echo_n "checking for $ac_word... " >&6; }
35129if ${ac_cv_path_STRIP+:} false; then :
35130  $as_echo_n "(cached) " >&6
35131else
35132  case $STRIP in
35133  [\\/]* | ?:[\\/]*)
35134  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35135  ;;
35136  *)
35137  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35138for as_dir in $PATH
35139do
35140  IFS=$as_save_IFS
35141  test -z "$as_dir" && as_dir=.
35142    for ac_exec_ext in '' $ac_executable_extensions; do
35143  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35144    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35145    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35146    break 2
35147  fi
35148done
35149  done
35150IFS=$as_save_IFS
35151
35152  ;;
35153esac
35154fi
35155STRIP=$ac_cv_path_STRIP
35156if test -n "$STRIP"; then
35157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35158$as_echo "$STRIP" >&6; }
35159else
35160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35161$as_echo "no" >&6; }
35162fi
35163
35164
35165  test -n "$STRIP" && break
35166done
35167
35168  else
35169    # The variable is set, but is it from the command line or the environment?
35170
35171    # Try to remove the string !STRIP! from our list.
35172    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
35173    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35174      # If it failed, the variable was not from the command line. Ignore it,
35175      # but warn the user (except for BASH, which is always set by the calling BASH).
35176      if test "xSTRIP" != xBASH; then
35177        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
35178$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
35179      fi
35180      # Try to locate tool using the code snippet
35181      for ac_prog in strip
35182do
35183  # Extract the first word of "$ac_prog", so it can be a program name with args.
35184set dummy $ac_prog; ac_word=$2
35185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35186$as_echo_n "checking for $ac_word... " >&6; }
35187if ${ac_cv_path_STRIP+:} false; then :
35188  $as_echo_n "(cached) " >&6
35189else
35190  case $STRIP in
35191  [\\/]* | ?:[\\/]*)
35192  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35193  ;;
35194  *)
35195  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35196for as_dir in $PATH
35197do
35198  IFS=$as_save_IFS
35199  test -z "$as_dir" && as_dir=.
35200    for ac_exec_ext in '' $ac_executable_extensions; do
35201  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35202    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35203    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35204    break 2
35205  fi
35206done
35207  done
35208IFS=$as_save_IFS
35209
35210  ;;
35211esac
35212fi
35213STRIP=$ac_cv_path_STRIP
35214if test -n "$STRIP"; then
35215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35216$as_echo "$STRIP" >&6; }
35217else
35218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35219$as_echo "no" >&6; }
35220fi
35221
35222
35223  test -n "$STRIP" && break
35224done
35225
35226    else
35227      # If it succeeded, then it was overridden by the user. We will use it
35228      # for the tool.
35229
35230      # First remove it from the list of overridden variables, so we can test
35231      # for unknown variables in the end.
35232      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35233
35234      # Check if the provided tool contains a complete path.
35235      tool_specified="$STRIP"
35236      tool_basename="${tool_specified##*/}"
35237      if test "x$tool_basename" = "x$tool_specified"; then
35238        # A command without a complete path is provided, search $PATH.
35239        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
35240$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
35241        # Extract the first word of "$tool_basename", so it can be a program name with args.
35242set dummy $tool_basename; ac_word=$2
35243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35244$as_echo_n "checking for $ac_word... " >&6; }
35245if ${ac_cv_path_STRIP+:} false; then :
35246  $as_echo_n "(cached) " >&6
35247else
35248  case $STRIP in
35249  [\\/]* | ?:[\\/]*)
35250  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35251  ;;
35252  *)
35253  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35254for as_dir in $PATH
35255do
35256  IFS=$as_save_IFS
35257  test -z "$as_dir" && as_dir=.
35258    for ac_exec_ext in '' $ac_executable_extensions; do
35259  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35260    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35261    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35262    break 2
35263  fi
35264done
35265  done
35266IFS=$as_save_IFS
35267
35268  ;;
35269esac
35270fi
35271STRIP=$ac_cv_path_STRIP
35272if test -n "$STRIP"; then
35273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35274$as_echo "$STRIP" >&6; }
35275else
35276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35277$as_echo "no" >&6; }
35278fi
35279
35280
35281        if test "x$STRIP" = x; then
35282          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35283        fi
35284      else
35285        # Otherwise we believe it is a complete path. Use it as it is.
35286        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
35287$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
35288        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
35289$as_echo_n "checking for STRIP... " >&6; }
35290        if test ! -x "$tool_specified"; then
35291          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35292$as_echo "not found" >&6; }
35293          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
35294        fi
35295        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35296$as_echo "$tool_specified" >&6; }
35297      fi
35298    fi
35299  fi
35300
35301
35302
35303  # Only process if variable expands to non-empty
35304
35305  if test "x$STRIP" != x; then
35306    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35307
35308  # First separate the path from the arguments. This will split at the first
35309  # space.
35310  complete="$STRIP"
35311  path="${complete%% *}"
35312  tmp="$complete EOL"
35313  arguments="${tmp#* }"
35314
35315  # Input might be given as Windows format, start by converting to
35316  # unix format.
35317  new_path=`$CYGPATH -u "$path"`
35318
35319  # Now try to locate executable using which
35320  new_path=`$WHICH "$new_path" 2> /dev/null`
35321  # bat and cmd files are not always considered executable in cygwin causing which
35322  # to not find them
35323  if test "x$new_path" = x \
35324      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35325      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35326    new_path=`$CYGPATH -u "$path"`
35327  fi
35328  if test "x$new_path" = x; then
35329    # Oops. Which didn't find the executable.
35330    # The splitting of arguments from the executable at a space might have been incorrect,
35331    # since paths with space are more likely in Windows. Give it another try with the whole
35332    # argument.
35333    path="$complete"
35334    arguments="EOL"
35335    new_path=`$CYGPATH -u "$path"`
35336    new_path=`$WHICH "$new_path" 2> /dev/null`
35337    # bat and cmd files are not always considered executable in cygwin causing which
35338    # to not find them
35339    if test "x$new_path" = x \
35340        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35341        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35342      new_path=`$CYGPATH -u "$path"`
35343    fi
35344    if test "x$new_path" = x; then
35345      # It's still not found. Now this is an unrecoverable error.
35346      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35347$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35348      has_space=`$ECHO "$complete" | $GREP " "`
35349      if test "x$has_space" != x; then
35350        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35351$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35352      fi
35353      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35354    fi
35355  fi
35356
35357  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35358  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35359  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35360  # "foo.exe" is OK but "foo" is an error.
35361  #
35362  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35363  # It is also a way to make sure we got the proper file name for the real test later on.
35364  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35365  if test "x$test_shortpath" = x; then
35366    # Short path failed, file does not exist as specified.
35367    # Try adding .exe or .cmd
35368    if test -f "${new_path}.exe"; then
35369      input_to_shortpath="${new_path}.exe"
35370    elif test -f "${new_path}.cmd"; then
35371      input_to_shortpath="${new_path}.cmd"
35372    else
35373      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
35374$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
35375      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35376$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35377      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35378    fi
35379  else
35380    input_to_shortpath="$new_path"
35381  fi
35382
35383  # Call helper function which possibly converts this using DOS-style short mode.
35384  # If so, the updated path is stored in $new_path.
35385  new_path="$input_to_shortpath"
35386
35387  input_path="$input_to_shortpath"
35388  # Check if we need to convert this using DOS-style short mode. If the path
35389  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35390  # take no chances and rewrite it.
35391  # Note: m4 eats our [], so we need to use [ and ] instead.
35392  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35393  if test "x$has_forbidden_chars" != x; then
35394    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35395    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35396    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35397    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35398      # Going to short mode and back again did indeed matter. Since short mode is
35399      # case insensitive, let's make it lowercase to improve readability.
35400      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35401      # Now convert it back to Unix-style (cygpath)
35402      input_path=`$CYGPATH -u "$shortmode_path"`
35403      new_path="$input_path"
35404    fi
35405  fi
35406
35407  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35408  if test "x$test_cygdrive_prefix" = x; then
35409    # As a simple fix, exclude /usr/bin since it's not a real path.
35410    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35411      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35412      # a path prefixed by /cygdrive for fixpath to work.
35413      new_path="$CYGWIN_ROOT_PATH$input_path"
35414    fi
35415  fi
35416
35417  # remove trailing .exe if any
35418  new_path="${new_path/%.exe/}"
35419
35420    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35421
35422  # First separate the path from the arguments. This will split at the first
35423  # space.
35424  complete="$STRIP"
35425  path="${complete%% *}"
35426  tmp="$complete EOL"
35427  arguments="${tmp#* }"
35428
35429  # Input might be given as Windows format, start by converting to
35430  # unix format.
35431  new_path="$path"
35432
35433  windows_path="$new_path"
35434  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35435    unix_path=`$CYGPATH -u "$windows_path"`
35436    new_path="$unix_path"
35437  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35438    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35439    new_path="$unix_path"
35440  fi
35441
35442
35443  # Now try to locate executable using which
35444  new_path=`$WHICH "$new_path" 2> /dev/null`
35445
35446  if test "x$new_path" = x; then
35447    # Oops. Which didn't find the executable.
35448    # The splitting of arguments from the executable at a space might have been incorrect,
35449    # since paths with space are more likely in Windows. Give it another try with the whole
35450    # argument.
35451    path="$complete"
35452    arguments="EOL"
35453    new_path="$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
35465    new_path=`$WHICH "$new_path" 2> /dev/null`
35466    # bat and cmd files are not always considered executable in MSYS causing which
35467    # to not find them
35468    if test "x$new_path" = x \
35469        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35470        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35471      new_path="$path"
35472
35473  windows_path="$new_path"
35474  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35475    unix_path=`$CYGPATH -u "$windows_path"`
35476    new_path="$unix_path"
35477  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35478    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35479    new_path="$unix_path"
35480  fi
35481
35482    fi
35483
35484    if test "x$new_path" = x; then
35485      # It's still not found. Now this is an unrecoverable error.
35486      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35487$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35488      has_space=`$ECHO "$complete" | $GREP " "`
35489      if test "x$has_space" != x; then
35490        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35491$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35492      fi
35493      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35494    fi
35495  fi
35496
35497  # Now new_path has a complete unix path to the binary
35498  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35499    # Keep paths in /bin as-is, but remove trailing .exe if any
35500    new_path="${new_path/%.exe/}"
35501    # Do not save /bin paths to all_fixpath_prefixes!
35502  else
35503    # Not in mixed or Windows style, start by that.
35504    new_path=`cmd //c echo $new_path`
35505
35506  input_path="$new_path"
35507  # Check if we need to convert this using DOS-style short mode. If the path
35508  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35509  # take no chances and rewrite it.
35510  # Note: m4 eats our [], so we need to use [ and ] instead.
35511  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35512  if test "x$has_forbidden_chars" != x; then
35513    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35514    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35515  fi
35516
35517    # Output is in $new_path
35518
35519  windows_path="$new_path"
35520  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35521    unix_path=`$CYGPATH -u "$windows_path"`
35522    new_path="$unix_path"
35523  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35524    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35525    new_path="$unix_path"
35526  fi
35527
35528    # remove trailing .exe if any
35529    new_path="${new_path/%.exe/}"
35530
35531    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35532    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35533  fi
35534
35535    else
35536      # We're on a unix platform. Hooray! :)
35537      # First separate the path from the arguments. This will split at the first
35538      # space.
35539      complete="$STRIP"
35540      path="${complete%% *}"
35541      tmp="$complete EOL"
35542      arguments="${tmp#* }"
35543
35544      # Cannot rely on the command "which" here since it doesn't always work.
35545      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35546      if test -z "$is_absolute_path"; then
35547        # Path to executable is not absolute. Find it.
35548        IFS_save="$IFS"
35549        IFS=:
35550        for p in $PATH; do
35551          if test -f "$p/$path" && test -x "$p/$path"; then
35552            new_path="$p/$path"
35553            break
35554          fi
35555        done
35556        IFS="$IFS_save"
35557      else
35558        # This is an absolute path, we can use it without further modifications.
35559        new_path="$path"
35560      fi
35561
35562      if test "x$new_path" = x; then
35563        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35564$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35565        has_space=`$ECHO "$complete" | $GREP " "`
35566        if test "x$has_space" != x; then
35567          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35568$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35569        fi
35570        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35571      fi
35572    fi
35573
35574    # Now join together the path and the arguments once again
35575    if test "x$arguments" != xEOL; then
35576      new_complete="$new_path ${arguments% *}"
35577    else
35578      new_complete="$new_path"
35579    fi
35580
35581    if test "x$complete" != "x$new_complete"; then
35582      STRIP="$new_complete"
35583      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
35584$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
35585    fi
35586  fi
35587
35588
35589
35590  # Publish this variable in the help.
35591
35592
35593  if test "x$NM" = x; then
35594    # The variable is not set by user, try to locate tool using the code snippet
35595    for ac_prog in nm
35596do
35597  # Extract the first word of "$ac_prog", so it can be a program name with args.
35598set dummy $ac_prog; ac_word=$2
35599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35600$as_echo_n "checking for $ac_word... " >&6; }
35601if ${ac_cv_path_NM+:} false; then :
35602  $as_echo_n "(cached) " >&6
35603else
35604  case $NM in
35605  [\\/]* | ?:[\\/]*)
35606  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35607  ;;
35608  *)
35609  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35610for as_dir in $PATH
35611do
35612  IFS=$as_save_IFS
35613  test -z "$as_dir" && as_dir=.
35614    for ac_exec_ext in '' $ac_executable_extensions; do
35615  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35616    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35617    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35618    break 2
35619  fi
35620done
35621  done
35622IFS=$as_save_IFS
35623
35624  ;;
35625esac
35626fi
35627NM=$ac_cv_path_NM
35628if test -n "$NM"; then
35629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35630$as_echo "$NM" >&6; }
35631else
35632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35633$as_echo "no" >&6; }
35634fi
35635
35636
35637  test -n "$NM" && break
35638done
35639
35640  else
35641    # The variable is set, but is it from the command line or the environment?
35642
35643    # Try to remove the string !NM! from our list.
35644    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
35645    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35646      # If it failed, the variable was not from the command line. Ignore it,
35647      # but warn the user (except for BASH, which is always set by the calling BASH).
35648      if test "xNM" != xBASH; then
35649        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
35650$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
35651      fi
35652      # Try to locate tool using the code snippet
35653      for ac_prog in nm
35654do
35655  # Extract the first word of "$ac_prog", so it can be a program name with args.
35656set dummy $ac_prog; ac_word=$2
35657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35658$as_echo_n "checking for $ac_word... " >&6; }
35659if ${ac_cv_path_NM+:} false; then :
35660  $as_echo_n "(cached) " >&6
35661else
35662  case $NM in
35663  [\\/]* | ?:[\\/]*)
35664  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35665  ;;
35666  *)
35667  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35668for as_dir in $PATH
35669do
35670  IFS=$as_save_IFS
35671  test -z "$as_dir" && as_dir=.
35672    for ac_exec_ext in '' $ac_executable_extensions; do
35673  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35674    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35675    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35676    break 2
35677  fi
35678done
35679  done
35680IFS=$as_save_IFS
35681
35682  ;;
35683esac
35684fi
35685NM=$ac_cv_path_NM
35686if test -n "$NM"; then
35687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35688$as_echo "$NM" >&6; }
35689else
35690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35691$as_echo "no" >&6; }
35692fi
35693
35694
35695  test -n "$NM" && break
35696done
35697
35698    else
35699      # If it succeeded, then it was overridden by the user. We will use it
35700      # for the tool.
35701
35702      # First remove it from the list of overridden variables, so we can test
35703      # for unknown variables in the end.
35704      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35705
35706      # Check if the provided tool contains a complete path.
35707      tool_specified="$NM"
35708      tool_basename="${tool_specified##*/}"
35709      if test "x$tool_basename" = "x$tool_specified"; then
35710        # A command without a complete path is provided, search $PATH.
35711        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
35712$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
35713        # Extract the first word of "$tool_basename", so it can be a program name with args.
35714set dummy $tool_basename; ac_word=$2
35715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35716$as_echo_n "checking for $ac_word... " >&6; }
35717if ${ac_cv_path_NM+:} false; then :
35718  $as_echo_n "(cached) " >&6
35719else
35720  case $NM in
35721  [\\/]* | ?:[\\/]*)
35722  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35723  ;;
35724  *)
35725  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35726for as_dir in $PATH
35727do
35728  IFS=$as_save_IFS
35729  test -z "$as_dir" && as_dir=.
35730    for ac_exec_ext in '' $ac_executable_extensions; do
35731  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35732    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35733    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35734    break 2
35735  fi
35736done
35737  done
35738IFS=$as_save_IFS
35739
35740  ;;
35741esac
35742fi
35743NM=$ac_cv_path_NM
35744if test -n "$NM"; then
35745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35746$as_echo "$NM" >&6; }
35747else
35748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35749$as_echo "no" >&6; }
35750fi
35751
35752
35753        if test "x$NM" = x; then
35754          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35755        fi
35756      else
35757        # Otherwise we believe it is a complete path. Use it as it is.
35758        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
35759$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
35760        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
35761$as_echo_n "checking for NM... " >&6; }
35762        if test ! -x "$tool_specified"; then
35763          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35764$as_echo "not found" >&6; }
35765          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
35766        fi
35767        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35768$as_echo "$tool_specified" >&6; }
35769      fi
35770    fi
35771  fi
35772
35773
35774
35775  # Only process if variable expands to non-empty
35776
35777  if test "x$NM" != x; then
35778    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35779
35780  # First separate the path from the arguments. This will split at the first
35781  # space.
35782  complete="$NM"
35783  path="${complete%% *}"
35784  tmp="$complete EOL"
35785  arguments="${tmp#* }"
35786
35787  # Input might be given as Windows format, start by converting to
35788  # unix format.
35789  new_path=`$CYGPATH -u "$path"`
35790
35791  # Now try to locate executable using which
35792  new_path=`$WHICH "$new_path" 2> /dev/null`
35793  # bat and cmd files are not always considered executable in cygwin causing which
35794  # to not find them
35795  if test "x$new_path" = x \
35796      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35797      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35798    new_path=`$CYGPATH -u "$path"`
35799  fi
35800  if test "x$new_path" = x; then
35801    # Oops. Which didn't find the executable.
35802    # The splitting of arguments from the executable at a space might have been incorrect,
35803    # since paths with space are more likely in Windows. Give it another try with the whole
35804    # argument.
35805    path="$complete"
35806    arguments="EOL"
35807    new_path=`$CYGPATH -u "$path"`
35808    new_path=`$WHICH "$new_path" 2> /dev/null`
35809    # bat and cmd files are not always considered executable in cygwin causing which
35810    # to not find them
35811    if test "x$new_path" = x \
35812        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35813        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35814      new_path=`$CYGPATH -u "$path"`
35815    fi
35816    if test "x$new_path" = x; then
35817      # It's still not found. Now this is an unrecoverable error.
35818      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35819$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35820      has_space=`$ECHO "$complete" | $GREP " "`
35821      if test "x$has_space" != x; then
35822        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35823$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35824      fi
35825      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35826    fi
35827  fi
35828
35829  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35830  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35831  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35832  # "foo.exe" is OK but "foo" is an error.
35833  #
35834  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35835  # It is also a way to make sure we got the proper file name for the real test later on.
35836  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35837  if test "x$test_shortpath" = x; then
35838    # Short path failed, file does not exist as specified.
35839    # Try adding .exe or .cmd
35840    if test -f "${new_path}.exe"; then
35841      input_to_shortpath="${new_path}.exe"
35842    elif test -f "${new_path}.cmd"; then
35843      input_to_shortpath="${new_path}.cmd"
35844    else
35845      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
35846$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
35847      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35848$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35849      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35850    fi
35851  else
35852    input_to_shortpath="$new_path"
35853  fi
35854
35855  # Call helper function which possibly converts this using DOS-style short mode.
35856  # If so, the updated path is stored in $new_path.
35857  new_path="$input_to_shortpath"
35858
35859  input_path="$input_to_shortpath"
35860  # Check if we need to convert this using DOS-style short mode. If the path
35861  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35862  # take no chances and rewrite it.
35863  # Note: m4 eats our [], so we need to use [ and ] instead.
35864  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35865  if test "x$has_forbidden_chars" != x; then
35866    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35867    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35868    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35869    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35870      # Going to short mode and back again did indeed matter. Since short mode is
35871      # case insensitive, let's make it lowercase to improve readability.
35872      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35873      # Now convert it back to Unix-style (cygpath)
35874      input_path=`$CYGPATH -u "$shortmode_path"`
35875      new_path="$input_path"
35876    fi
35877  fi
35878
35879  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35880  if test "x$test_cygdrive_prefix" = x; then
35881    # As a simple fix, exclude /usr/bin since it's not a real path.
35882    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35883      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35884      # a path prefixed by /cygdrive for fixpath to work.
35885      new_path="$CYGWIN_ROOT_PATH$input_path"
35886    fi
35887  fi
35888
35889  # remove trailing .exe if any
35890  new_path="${new_path/%.exe/}"
35891
35892    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35893
35894  # First separate the path from the arguments. This will split at the first
35895  # space.
35896  complete="$NM"
35897  path="${complete%% *}"
35898  tmp="$complete EOL"
35899  arguments="${tmp#* }"
35900
35901  # Input might be given as Windows format, start by converting to
35902  # unix format.
35903  new_path="$path"
35904
35905  windows_path="$new_path"
35906  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35907    unix_path=`$CYGPATH -u "$windows_path"`
35908    new_path="$unix_path"
35909  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35910    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35911    new_path="$unix_path"
35912  fi
35913
35914
35915  # Now try to locate executable using which
35916  new_path=`$WHICH "$new_path" 2> /dev/null`
35917
35918  if test "x$new_path" = x; then
35919    # Oops. Which didn't find the executable.
35920    # The splitting of arguments from the executable at a space might have been incorrect,
35921    # since paths with space are more likely in Windows. Give it another try with the whole
35922    # argument.
35923    path="$complete"
35924    arguments="EOL"
35925    new_path="$path"
35926
35927  windows_path="$new_path"
35928  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35929    unix_path=`$CYGPATH -u "$windows_path"`
35930    new_path="$unix_path"
35931  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35932    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35933    new_path="$unix_path"
35934  fi
35935
35936
35937    new_path=`$WHICH "$new_path" 2> /dev/null`
35938    # bat and cmd files are not always considered executable in MSYS causing which
35939    # to not find them
35940    if test "x$new_path" = x \
35941        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35942        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35943      new_path="$path"
35944
35945  windows_path="$new_path"
35946  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35947    unix_path=`$CYGPATH -u "$windows_path"`
35948    new_path="$unix_path"
35949  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35950    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35951    new_path="$unix_path"
35952  fi
35953
35954    fi
35955
35956    if test "x$new_path" = x; then
35957      # It's still not found. Now this is an unrecoverable error.
35958      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35959$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35960      has_space=`$ECHO "$complete" | $GREP " "`
35961      if test "x$has_space" != x; then
35962        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35963$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35964      fi
35965      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35966    fi
35967  fi
35968
35969  # Now new_path has a complete unix path to the binary
35970  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35971    # Keep paths in /bin as-is, but remove trailing .exe if any
35972    new_path="${new_path/%.exe/}"
35973    # Do not save /bin paths to all_fixpath_prefixes!
35974  else
35975    # Not in mixed or Windows style, start by that.
35976    new_path=`cmd //c echo $new_path`
35977
35978  input_path="$new_path"
35979  # Check if we need to convert this using DOS-style short mode. If the path
35980  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35981  # take no chances and rewrite it.
35982  # Note: m4 eats our [], so we need to use [ and ] instead.
35983  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35984  if test "x$has_forbidden_chars" != x; then
35985    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35986    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35987  fi
35988
35989    # Output is in $new_path
35990
35991  windows_path="$new_path"
35992  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35993    unix_path=`$CYGPATH -u "$windows_path"`
35994    new_path="$unix_path"
35995  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35996    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35997    new_path="$unix_path"
35998  fi
35999
36000    # remove trailing .exe if any
36001    new_path="${new_path/%.exe/}"
36002
36003    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36004    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36005  fi
36006
36007    else
36008      # We're on a unix platform. Hooray! :)
36009      # First separate the path from the arguments. This will split at the first
36010      # space.
36011      complete="$NM"
36012      path="${complete%% *}"
36013      tmp="$complete EOL"
36014      arguments="${tmp#* }"
36015
36016      # Cannot rely on the command "which" here since it doesn't always work.
36017      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36018      if test -z "$is_absolute_path"; then
36019        # Path to executable is not absolute. Find it.
36020        IFS_save="$IFS"
36021        IFS=:
36022        for p in $PATH; do
36023          if test -f "$p/$path" && test -x "$p/$path"; then
36024            new_path="$p/$path"
36025            break
36026          fi
36027        done
36028        IFS="$IFS_save"
36029      else
36030        # This is an absolute path, we can use it without further modifications.
36031        new_path="$path"
36032      fi
36033
36034      if test "x$new_path" = x; then
36035        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36036$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36037        has_space=`$ECHO "$complete" | $GREP " "`
36038        if test "x$has_space" != x; then
36039          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36040$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36041        fi
36042        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36043      fi
36044    fi
36045
36046    # Now join together the path and the arguments once again
36047    if test "x$arguments" != xEOL; then
36048      new_complete="$new_path ${arguments% *}"
36049    else
36050      new_complete="$new_path"
36051    fi
36052
36053    if test "x$complete" != "x$new_complete"; then
36054      NM="$new_complete"
36055      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
36056$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
36057    fi
36058  fi
36059
36060
36061
36062  # Publish this variable in the help.
36063
36064
36065  if test "x$GNM" = x; then
36066    # The variable is not set by user, try to locate tool using the code snippet
36067    for ac_prog in gnm
36068do
36069  # Extract the first word of "$ac_prog", so it can be a program name with args.
36070set dummy $ac_prog; ac_word=$2
36071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36072$as_echo_n "checking for $ac_word... " >&6; }
36073if ${ac_cv_path_GNM+:} false; then :
36074  $as_echo_n "(cached) " >&6
36075else
36076  case $GNM in
36077  [\\/]* | ?:[\\/]*)
36078  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36079  ;;
36080  *)
36081  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36082for as_dir in $PATH
36083do
36084  IFS=$as_save_IFS
36085  test -z "$as_dir" && as_dir=.
36086    for ac_exec_ext in '' $ac_executable_extensions; do
36087  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36088    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36089    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36090    break 2
36091  fi
36092done
36093  done
36094IFS=$as_save_IFS
36095
36096  ;;
36097esac
36098fi
36099GNM=$ac_cv_path_GNM
36100if test -n "$GNM"; then
36101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36102$as_echo "$GNM" >&6; }
36103else
36104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36105$as_echo "no" >&6; }
36106fi
36107
36108
36109  test -n "$GNM" && break
36110done
36111
36112  else
36113    # The variable is set, but is it from the command line or the environment?
36114
36115    # Try to remove the string !GNM! from our list.
36116    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
36117    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36118      # If it failed, the variable was not from the command line. Ignore it,
36119      # but warn the user (except for BASH, which is always set by the calling BASH).
36120      if test "xGNM" != xBASH; then
36121        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
36122$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
36123      fi
36124      # Try to locate tool using the code snippet
36125      for ac_prog in gnm
36126do
36127  # Extract the first word of "$ac_prog", so it can be a program name with args.
36128set dummy $ac_prog; ac_word=$2
36129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36130$as_echo_n "checking for $ac_word... " >&6; }
36131if ${ac_cv_path_GNM+:} false; then :
36132  $as_echo_n "(cached) " >&6
36133else
36134  case $GNM in
36135  [\\/]* | ?:[\\/]*)
36136  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36137  ;;
36138  *)
36139  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36140for as_dir in $PATH
36141do
36142  IFS=$as_save_IFS
36143  test -z "$as_dir" && as_dir=.
36144    for ac_exec_ext in '' $ac_executable_extensions; do
36145  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36146    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36147    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36148    break 2
36149  fi
36150done
36151  done
36152IFS=$as_save_IFS
36153
36154  ;;
36155esac
36156fi
36157GNM=$ac_cv_path_GNM
36158if test -n "$GNM"; then
36159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36160$as_echo "$GNM" >&6; }
36161else
36162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36163$as_echo "no" >&6; }
36164fi
36165
36166
36167  test -n "$GNM" && break
36168done
36169
36170    else
36171      # If it succeeded, then it was overridden by the user. We will use it
36172      # for the tool.
36173
36174      # First remove it from the list of overridden variables, so we can test
36175      # for unknown variables in the end.
36176      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36177
36178      # Check if the provided tool contains a complete path.
36179      tool_specified="$GNM"
36180      tool_basename="${tool_specified##*/}"
36181      if test "x$tool_basename" = "x$tool_specified"; then
36182        # A command without a complete path is provided, search $PATH.
36183        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
36184$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
36185        # Extract the first word of "$tool_basename", so it can be a program name with args.
36186set dummy $tool_basename; ac_word=$2
36187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36188$as_echo_n "checking for $ac_word... " >&6; }
36189if ${ac_cv_path_GNM+:} false; then :
36190  $as_echo_n "(cached) " >&6
36191else
36192  case $GNM in
36193  [\\/]* | ?:[\\/]*)
36194  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36195  ;;
36196  *)
36197  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36198for as_dir in $PATH
36199do
36200  IFS=$as_save_IFS
36201  test -z "$as_dir" && as_dir=.
36202    for ac_exec_ext in '' $ac_executable_extensions; do
36203  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36204    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36205    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36206    break 2
36207  fi
36208done
36209  done
36210IFS=$as_save_IFS
36211
36212  ;;
36213esac
36214fi
36215GNM=$ac_cv_path_GNM
36216if test -n "$GNM"; then
36217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36218$as_echo "$GNM" >&6; }
36219else
36220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36221$as_echo "no" >&6; }
36222fi
36223
36224
36225        if test "x$GNM" = x; then
36226          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36227        fi
36228      else
36229        # Otherwise we believe it is a complete path. Use it as it is.
36230        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
36231$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
36232        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
36233$as_echo_n "checking for GNM... " >&6; }
36234        if test ! -x "$tool_specified"; then
36235          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36236$as_echo "not found" >&6; }
36237          as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
36238        fi
36239        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36240$as_echo "$tool_specified" >&6; }
36241      fi
36242    fi
36243  fi
36244
36245
36246
36247  # Only process if variable expands to non-empty
36248
36249  if test "x$GNM" != x; then
36250    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36251
36252  # First separate the path from the arguments. This will split at the first
36253  # space.
36254  complete="$GNM"
36255  path="${complete%% *}"
36256  tmp="$complete EOL"
36257  arguments="${tmp#* }"
36258
36259  # Input might be given as Windows format, start by converting to
36260  # unix format.
36261  new_path=`$CYGPATH -u "$path"`
36262
36263  # Now try to locate executable using which
36264  new_path=`$WHICH "$new_path" 2> /dev/null`
36265  # bat and cmd files are not always considered executable in cygwin causing which
36266  # to not find them
36267  if test "x$new_path" = x \
36268      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36269      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36270    new_path=`$CYGPATH -u "$path"`
36271  fi
36272  if test "x$new_path" = x; then
36273    # Oops. Which didn't find the executable.
36274    # The splitting of arguments from the executable at a space might have been incorrect,
36275    # since paths with space are more likely in Windows. Give it another try with the whole
36276    # argument.
36277    path="$complete"
36278    arguments="EOL"
36279    new_path=`$CYGPATH -u "$path"`
36280    new_path=`$WHICH "$new_path" 2> /dev/null`
36281    # bat and cmd files are not always considered executable in cygwin causing which
36282    # to not find them
36283    if test "x$new_path" = x \
36284        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36285        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36286      new_path=`$CYGPATH -u "$path"`
36287    fi
36288    if test "x$new_path" = x; then
36289      # It's still not found. Now this is an unrecoverable error.
36290      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36291$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36292      has_space=`$ECHO "$complete" | $GREP " "`
36293      if test "x$has_space" != x; then
36294        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36295$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36296      fi
36297      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36298    fi
36299  fi
36300
36301  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36302  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36303  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36304  # "foo.exe" is OK but "foo" is an error.
36305  #
36306  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36307  # It is also a way to make sure we got the proper file name for the real test later on.
36308  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36309  if test "x$test_shortpath" = x; then
36310    # Short path failed, file does not exist as specified.
36311    # Try adding .exe or .cmd
36312    if test -f "${new_path}.exe"; then
36313      input_to_shortpath="${new_path}.exe"
36314    elif test -f "${new_path}.cmd"; then
36315      input_to_shortpath="${new_path}.cmd"
36316    else
36317      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
36318$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
36319      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36320$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36321      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36322    fi
36323  else
36324    input_to_shortpath="$new_path"
36325  fi
36326
36327  # Call helper function which possibly converts this using DOS-style short mode.
36328  # If so, the updated path is stored in $new_path.
36329  new_path="$input_to_shortpath"
36330
36331  input_path="$input_to_shortpath"
36332  # Check if we need to convert this using DOS-style short mode. If the path
36333  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36334  # take no chances and rewrite it.
36335  # Note: m4 eats our [], so we need to use [ and ] instead.
36336  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36337  if test "x$has_forbidden_chars" != x; then
36338    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36339    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36340    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36341    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36342      # Going to short mode and back again did indeed matter. Since short mode is
36343      # case insensitive, let's make it lowercase to improve readability.
36344      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36345      # Now convert it back to Unix-style (cygpath)
36346      input_path=`$CYGPATH -u "$shortmode_path"`
36347      new_path="$input_path"
36348    fi
36349  fi
36350
36351  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36352  if test "x$test_cygdrive_prefix" = x; then
36353    # As a simple fix, exclude /usr/bin since it's not a real path.
36354    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36355      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36356      # a path prefixed by /cygdrive for fixpath to work.
36357      new_path="$CYGWIN_ROOT_PATH$input_path"
36358    fi
36359  fi
36360
36361  # remove trailing .exe if any
36362  new_path="${new_path/%.exe/}"
36363
36364    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36365
36366  # First separate the path from the arguments. This will split at the first
36367  # space.
36368  complete="$GNM"
36369  path="${complete%% *}"
36370  tmp="$complete EOL"
36371  arguments="${tmp#* }"
36372
36373  # Input might be given as Windows format, start by converting to
36374  # unix format.
36375  new_path="$path"
36376
36377  windows_path="$new_path"
36378  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36379    unix_path=`$CYGPATH -u "$windows_path"`
36380    new_path="$unix_path"
36381  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36382    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36383    new_path="$unix_path"
36384  fi
36385
36386
36387  # Now try to locate executable using which
36388  new_path=`$WHICH "$new_path" 2> /dev/null`
36389
36390  if test "x$new_path" = x; then
36391    # Oops. Which didn't find the executable.
36392    # The splitting of arguments from the executable at a space might have been incorrect,
36393    # since paths with space are more likely in Windows. Give it another try with the whole
36394    # argument.
36395    path="$complete"
36396    arguments="EOL"
36397    new_path="$path"
36398
36399  windows_path="$new_path"
36400  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36401    unix_path=`$CYGPATH -u "$windows_path"`
36402    new_path="$unix_path"
36403  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36404    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36405    new_path="$unix_path"
36406  fi
36407
36408
36409    new_path=`$WHICH "$new_path" 2> /dev/null`
36410    # bat and cmd files are not always considered executable in MSYS causing which
36411    # to not find them
36412    if test "x$new_path" = x \
36413        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36414        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36415      new_path="$path"
36416
36417  windows_path="$new_path"
36418  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36419    unix_path=`$CYGPATH -u "$windows_path"`
36420    new_path="$unix_path"
36421  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36422    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36423    new_path="$unix_path"
36424  fi
36425
36426    fi
36427
36428    if test "x$new_path" = x; then
36429      # It's still not found. Now this is an unrecoverable error.
36430      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36431$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36432      has_space=`$ECHO "$complete" | $GREP " "`
36433      if test "x$has_space" != x; then
36434        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36435$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36436      fi
36437      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36438    fi
36439  fi
36440
36441  # Now new_path has a complete unix path to the binary
36442  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36443    # Keep paths in /bin as-is, but remove trailing .exe if any
36444    new_path="${new_path/%.exe/}"
36445    # Do not save /bin paths to all_fixpath_prefixes!
36446  else
36447    # Not in mixed or Windows style, start by that.
36448    new_path=`cmd //c echo $new_path`
36449
36450  input_path="$new_path"
36451  # Check if we need to convert this using DOS-style short mode. If the path
36452  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36453  # take no chances and rewrite it.
36454  # Note: m4 eats our [], so we need to use [ and ] instead.
36455  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36456  if test "x$has_forbidden_chars" != x; then
36457    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36458    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36459  fi
36460
36461    # Output is in $new_path
36462
36463  windows_path="$new_path"
36464  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36465    unix_path=`$CYGPATH -u "$windows_path"`
36466    new_path="$unix_path"
36467  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36468    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36469    new_path="$unix_path"
36470  fi
36471
36472    # remove trailing .exe if any
36473    new_path="${new_path/%.exe/}"
36474
36475    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36476    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36477  fi
36478
36479    else
36480      # We're on a unix platform. Hooray! :)
36481      # First separate the path from the arguments. This will split at the first
36482      # space.
36483      complete="$GNM"
36484      path="${complete%% *}"
36485      tmp="$complete EOL"
36486      arguments="${tmp#* }"
36487
36488      # Cannot rely on the command "which" here since it doesn't always work.
36489      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36490      if test -z "$is_absolute_path"; then
36491        # Path to executable is not absolute. Find it.
36492        IFS_save="$IFS"
36493        IFS=:
36494        for p in $PATH; do
36495          if test -f "$p/$path" && test -x "$p/$path"; then
36496            new_path="$p/$path"
36497            break
36498          fi
36499        done
36500        IFS="$IFS_save"
36501      else
36502        # This is an absolute path, we can use it without further modifications.
36503        new_path="$path"
36504      fi
36505
36506      if test "x$new_path" = x; then
36507        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36508$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36509        has_space=`$ECHO "$complete" | $GREP " "`
36510        if test "x$has_space" != x; then
36511          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36512$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36513        fi
36514        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36515      fi
36516    fi
36517
36518    # Now join together the path and the arguments once again
36519    if test "x$arguments" != xEOL; then
36520      new_complete="$new_path ${arguments% *}"
36521    else
36522      new_complete="$new_path"
36523    fi
36524
36525    if test "x$complete" != "x$new_complete"; then
36526      GNM="$new_complete"
36527      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
36528$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
36529    fi
36530  fi
36531
36532  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
36533    # FIXME: we should unify this with the solaris case above.
36534
36535
36536  # Publish this variable in the help.
36537
36538
36539  if test "x$STRIP" = x; then
36540    # The variable is not set by user, try to locate tool using the code snippet
36541    if test -n "$ac_tool_prefix"; then
36542  for ac_prog in strip
36543  do
36544    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36545set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36547$as_echo_n "checking for $ac_word... " >&6; }
36548if ${ac_cv_prog_STRIP+:} false; then :
36549  $as_echo_n "(cached) " >&6
36550else
36551  if test -n "$STRIP"; then
36552  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
36553else
36554as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36555for as_dir in $PATH
36556do
36557  IFS=$as_save_IFS
36558  test -z "$as_dir" && as_dir=.
36559    for ac_exec_ext in '' $ac_executable_extensions; do
36560  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36561    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
36562    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36563    break 2
36564  fi
36565done
36566  done
36567IFS=$as_save_IFS
36568
36569fi
36570fi
36571STRIP=$ac_cv_prog_STRIP
36572if test -n "$STRIP"; then
36573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36574$as_echo "$STRIP" >&6; }
36575else
36576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36577$as_echo "no" >&6; }
36578fi
36579
36580
36581    test -n "$STRIP" && break
36582  done
36583fi
36584if test -z "$STRIP"; then
36585  ac_ct_STRIP=$STRIP
36586  for ac_prog in strip
36587do
36588  # Extract the first word of "$ac_prog", so it can be a program name with args.
36589set dummy $ac_prog; ac_word=$2
36590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36591$as_echo_n "checking for $ac_word... " >&6; }
36592if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
36593  $as_echo_n "(cached) " >&6
36594else
36595  if test -n "$ac_ct_STRIP"; then
36596  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
36597else
36598as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36599for as_dir in $PATH
36600do
36601  IFS=$as_save_IFS
36602  test -z "$as_dir" && as_dir=.
36603    for ac_exec_ext in '' $ac_executable_extensions; do
36604  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36605    ac_cv_prog_ac_ct_STRIP="$ac_prog"
36606    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36607    break 2
36608  fi
36609done
36610  done
36611IFS=$as_save_IFS
36612
36613fi
36614fi
36615ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
36616if test -n "$ac_ct_STRIP"; then
36617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
36618$as_echo "$ac_ct_STRIP" >&6; }
36619else
36620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36621$as_echo "no" >&6; }
36622fi
36623
36624
36625  test -n "$ac_ct_STRIP" && break
36626done
36627
36628  if test "x$ac_ct_STRIP" = x; then
36629    STRIP=""
36630  else
36631    case $cross_compiling:$ac_tool_warned in
36632yes:)
36633{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36634$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36635ac_tool_warned=yes ;;
36636esac
36637    STRIP=$ac_ct_STRIP
36638  fi
36639fi
36640
36641  else
36642    # The variable is set, but is it from the command line or the environment?
36643
36644    # Try to remove the string !STRIP! from our list.
36645    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
36646    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36647      # If it failed, the variable was not from the command line. Ignore it,
36648      # but warn the user (except for BASH, which is always set by the calling BASH).
36649      if test "xSTRIP" != xBASH; then
36650        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
36651$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
36652      fi
36653      # Try to locate tool using the code snippet
36654      if test -n "$ac_tool_prefix"; then
36655  for ac_prog in strip
36656  do
36657    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36658set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36660$as_echo_n "checking for $ac_word... " >&6; }
36661if ${ac_cv_prog_STRIP+:} false; then :
36662  $as_echo_n "(cached) " >&6
36663else
36664  if test -n "$STRIP"; then
36665  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
36666else
36667as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36668for as_dir in $PATH
36669do
36670  IFS=$as_save_IFS
36671  test -z "$as_dir" && as_dir=.
36672    for ac_exec_ext in '' $ac_executable_extensions; do
36673  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36674    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
36675    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36676    break 2
36677  fi
36678done
36679  done
36680IFS=$as_save_IFS
36681
36682fi
36683fi
36684STRIP=$ac_cv_prog_STRIP
36685if test -n "$STRIP"; then
36686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36687$as_echo "$STRIP" >&6; }
36688else
36689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36690$as_echo "no" >&6; }
36691fi
36692
36693
36694    test -n "$STRIP" && break
36695  done
36696fi
36697if test -z "$STRIP"; then
36698  ac_ct_STRIP=$STRIP
36699  for ac_prog in strip
36700do
36701  # Extract the first word of "$ac_prog", so it can be a program name with args.
36702set dummy $ac_prog; ac_word=$2
36703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36704$as_echo_n "checking for $ac_word... " >&6; }
36705if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
36706  $as_echo_n "(cached) " >&6
36707else
36708  if test -n "$ac_ct_STRIP"; then
36709  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
36710else
36711as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36712for as_dir in $PATH
36713do
36714  IFS=$as_save_IFS
36715  test -z "$as_dir" && as_dir=.
36716    for ac_exec_ext in '' $ac_executable_extensions; do
36717  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36718    ac_cv_prog_ac_ct_STRIP="$ac_prog"
36719    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36720    break 2
36721  fi
36722done
36723  done
36724IFS=$as_save_IFS
36725
36726fi
36727fi
36728ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
36729if test -n "$ac_ct_STRIP"; then
36730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
36731$as_echo "$ac_ct_STRIP" >&6; }
36732else
36733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36734$as_echo "no" >&6; }
36735fi
36736
36737
36738  test -n "$ac_ct_STRIP" && break
36739done
36740
36741  if test "x$ac_ct_STRIP" = x; then
36742    STRIP=""
36743  else
36744    case $cross_compiling:$ac_tool_warned in
36745yes:)
36746{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36747$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36748ac_tool_warned=yes ;;
36749esac
36750    STRIP=$ac_ct_STRIP
36751  fi
36752fi
36753
36754    else
36755      # If it succeeded, then it was overridden by the user. We will use it
36756      # for the tool.
36757
36758      # First remove it from the list of overridden variables, so we can test
36759      # for unknown variables in the end.
36760      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36761
36762      # Check if the provided tool contains a complete path.
36763      tool_specified="$STRIP"
36764      tool_basename="${tool_specified##*/}"
36765      if test "x$tool_basename" = "x$tool_specified"; then
36766        # A command without a complete path is provided, search $PATH.
36767        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
36768$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
36769        # Extract the first word of "$tool_basename", so it can be a program name with args.
36770set dummy $tool_basename; ac_word=$2
36771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36772$as_echo_n "checking for $ac_word... " >&6; }
36773if ${ac_cv_path_STRIP+:} false; then :
36774  $as_echo_n "(cached) " >&6
36775else
36776  case $STRIP in
36777  [\\/]* | ?:[\\/]*)
36778  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
36779  ;;
36780  *)
36781  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36782for as_dir in $PATH
36783do
36784  IFS=$as_save_IFS
36785  test -z "$as_dir" && as_dir=.
36786    for ac_exec_ext in '' $ac_executable_extensions; do
36787  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36788    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
36789    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36790    break 2
36791  fi
36792done
36793  done
36794IFS=$as_save_IFS
36795
36796  ;;
36797esac
36798fi
36799STRIP=$ac_cv_path_STRIP
36800if test -n "$STRIP"; then
36801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36802$as_echo "$STRIP" >&6; }
36803else
36804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36805$as_echo "no" >&6; }
36806fi
36807
36808
36809        if test "x$STRIP" = x; then
36810          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36811        fi
36812      else
36813        # Otherwise we believe it is a complete path. Use it as it is.
36814        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
36815$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
36816        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
36817$as_echo_n "checking for STRIP... " >&6; }
36818        if test ! -x "$tool_specified"; then
36819          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36820$as_echo "not found" >&6; }
36821          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
36822        fi
36823        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36824$as_echo "$tool_specified" >&6; }
36825      fi
36826    fi
36827  fi
36828
36829
36830
36831  # Only process if variable expands to non-empty
36832
36833  if test "x$STRIP" != x; then
36834    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36835
36836  # First separate the path from the arguments. This will split at the first
36837  # space.
36838  complete="$STRIP"
36839  path="${complete%% *}"
36840  tmp="$complete EOL"
36841  arguments="${tmp#* }"
36842
36843  # Input might be given as Windows format, start by converting to
36844  # unix format.
36845  new_path=`$CYGPATH -u "$path"`
36846
36847  # Now try to locate executable using which
36848  new_path=`$WHICH "$new_path" 2> /dev/null`
36849  # bat and cmd files are not always considered executable in cygwin causing which
36850  # to not find them
36851  if test "x$new_path" = x \
36852      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36853      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36854    new_path=`$CYGPATH -u "$path"`
36855  fi
36856  if test "x$new_path" = x; then
36857    # Oops. Which didn't find the executable.
36858    # The splitting of arguments from the executable at a space might have been incorrect,
36859    # since paths with space are more likely in Windows. Give it another try with the whole
36860    # argument.
36861    path="$complete"
36862    arguments="EOL"
36863    new_path=`$CYGPATH -u "$path"`
36864    new_path=`$WHICH "$new_path" 2> /dev/null`
36865    # bat and cmd files are not always considered executable in cygwin 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=`$CYGPATH -u "$path"`
36871    fi
36872    if test "x$new_path" = x; then
36873      # It's still not found. Now this is an unrecoverable error.
36874      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
36875$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
36876      has_space=`$ECHO "$complete" | $GREP " "`
36877      if test "x$has_space" != x; then
36878        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36879$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36880      fi
36881      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36882    fi
36883  fi
36884
36885  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36886  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36887  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36888  # "foo.exe" is OK but "foo" is an error.
36889  #
36890  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36891  # It is also a way to make sure we got the proper file name for the real test later on.
36892  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36893  if test "x$test_shortpath" = x; then
36894    # Short path failed, file does not exist as specified.
36895    # Try adding .exe or .cmd
36896    if test -f "${new_path}.exe"; then
36897      input_to_shortpath="${new_path}.exe"
36898    elif test -f "${new_path}.cmd"; then
36899      input_to_shortpath="${new_path}.cmd"
36900    else
36901      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
36902$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
36903      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36904$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36905      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36906    fi
36907  else
36908    input_to_shortpath="$new_path"
36909  fi
36910
36911  # Call helper function which possibly converts this using DOS-style short mode.
36912  # If so, the updated path is stored in $new_path.
36913  new_path="$input_to_shortpath"
36914
36915  input_path="$input_to_shortpath"
36916  # Check if we need to convert this using DOS-style short mode. If the path
36917  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36918  # take no chances and rewrite it.
36919  # Note: m4 eats our [], so we need to use [ and ] instead.
36920  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36921  if test "x$has_forbidden_chars" != x; then
36922    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36923    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36924    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36925    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36926      # Going to short mode and back again did indeed matter. Since short mode is
36927      # case insensitive, let's make it lowercase to improve readability.
36928      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36929      # Now convert it back to Unix-style (cygpath)
36930      input_path=`$CYGPATH -u "$shortmode_path"`
36931      new_path="$input_path"
36932    fi
36933  fi
36934
36935  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36936  if test "x$test_cygdrive_prefix" = x; then
36937    # As a simple fix, exclude /usr/bin since it's not a real path.
36938    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36939      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36940      # a path prefixed by /cygdrive for fixpath to work.
36941      new_path="$CYGWIN_ROOT_PATH$input_path"
36942    fi
36943  fi
36944
36945  # remove trailing .exe if any
36946  new_path="${new_path/%.exe/}"
36947
36948    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36949
36950  # First separate the path from the arguments. This will split at the first
36951  # space.
36952  complete="$STRIP"
36953  path="${complete%% *}"
36954  tmp="$complete EOL"
36955  arguments="${tmp#* }"
36956
36957  # Input might be given as Windows format, start by converting to
36958  # unix format.
36959  new_path="$path"
36960
36961  windows_path="$new_path"
36962  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36963    unix_path=`$CYGPATH -u "$windows_path"`
36964    new_path="$unix_path"
36965  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36966    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36967    new_path="$unix_path"
36968  fi
36969
36970
36971  # Now try to locate executable using which
36972  new_path=`$WHICH "$new_path" 2> /dev/null`
36973
36974  if test "x$new_path" = x; then
36975    # Oops. Which didn't find the executable.
36976    # The splitting of arguments from the executable at a space might have been incorrect,
36977    # since paths with space are more likely in Windows. Give it another try with the whole
36978    # argument.
36979    path="$complete"
36980    arguments="EOL"
36981    new_path="$path"
36982
36983  windows_path="$new_path"
36984  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36985    unix_path=`$CYGPATH -u "$windows_path"`
36986    new_path="$unix_path"
36987  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36988    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36989    new_path="$unix_path"
36990  fi
36991
36992
36993    new_path=`$WHICH "$new_path" 2> /dev/null`
36994    # bat and cmd files are not always considered executable in MSYS causing which
36995    # to not find them
36996    if test "x$new_path" = x \
36997        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36998        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36999      new_path="$path"
37000
37001  windows_path="$new_path"
37002  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37003    unix_path=`$CYGPATH -u "$windows_path"`
37004    new_path="$unix_path"
37005  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37006    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37007    new_path="$unix_path"
37008  fi
37009
37010    fi
37011
37012    if test "x$new_path" = x; then
37013      # It's still not found. Now this is an unrecoverable error.
37014      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37015$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37016      has_space=`$ECHO "$complete" | $GREP " "`
37017      if test "x$has_space" != x; then
37018        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37019$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37020      fi
37021      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37022    fi
37023  fi
37024
37025  # Now new_path has a complete unix path to the binary
37026  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37027    # Keep paths in /bin as-is, but remove trailing .exe if any
37028    new_path="${new_path/%.exe/}"
37029    # Do not save /bin paths to all_fixpath_prefixes!
37030  else
37031    # Not in mixed or Windows style, start by that.
37032    new_path=`cmd //c echo $new_path`
37033
37034  input_path="$new_path"
37035  # Check if we need to convert this using DOS-style short mode. If the path
37036  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37037  # take no chances and rewrite it.
37038  # Note: m4 eats our [], so we need to use [ and ] instead.
37039  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37040  if test "x$has_forbidden_chars" != x; then
37041    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37042    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37043  fi
37044
37045    # Output is in $new_path
37046
37047  windows_path="$new_path"
37048  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37049    unix_path=`$CYGPATH -u "$windows_path"`
37050    new_path="$unix_path"
37051  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37052    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37053    new_path="$unix_path"
37054  fi
37055
37056    # remove trailing .exe if any
37057    new_path="${new_path/%.exe/}"
37058
37059    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37060    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37061  fi
37062
37063    else
37064      # We're on a unix platform. Hooray! :)
37065      # First separate the path from the arguments. This will split at the first
37066      # space.
37067      complete="$STRIP"
37068      path="${complete%% *}"
37069      tmp="$complete EOL"
37070      arguments="${tmp#* }"
37071
37072      # Cannot rely on the command "which" here since it doesn't always work.
37073      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37074      if test -z "$is_absolute_path"; then
37075        # Path to executable is not absolute. Find it.
37076        IFS_save="$IFS"
37077        IFS=:
37078        for p in $PATH; do
37079          if test -f "$p/$path" && test -x "$p/$path"; then
37080            new_path="$p/$path"
37081            break
37082          fi
37083        done
37084        IFS="$IFS_save"
37085      else
37086        # This is an absolute path, we can use it without further modifications.
37087        new_path="$path"
37088      fi
37089
37090      if test "x$new_path" = x; then
37091        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37092$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37093        has_space=`$ECHO "$complete" | $GREP " "`
37094        if test "x$has_space" != x; then
37095          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37096$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37097        fi
37098        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37099      fi
37100    fi
37101
37102    # Now join together the path and the arguments once again
37103    if test "x$arguments" != xEOL; then
37104      new_complete="$new_path ${arguments% *}"
37105    else
37106      new_complete="$new_path"
37107    fi
37108
37109    if test "x$complete" != "x$new_complete"; then
37110      STRIP="$new_complete"
37111      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
37112$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
37113    fi
37114  fi
37115
37116
37117
37118  # Publish this variable in the help.
37119
37120
37121  if test "x$NM" = x; then
37122    # The variable is not set by user, try to locate tool using the code snippet
37123    if test -n "$ac_tool_prefix"; then
37124  for ac_prog in nm
37125  do
37126    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37127set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37129$as_echo_n "checking for $ac_word... " >&6; }
37130if ${ac_cv_prog_NM+:} false; then :
37131  $as_echo_n "(cached) " >&6
37132else
37133  if test -n "$NM"; then
37134  ac_cv_prog_NM="$NM" # Let the user override the test.
37135else
37136as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37137for as_dir in $PATH
37138do
37139  IFS=$as_save_IFS
37140  test -z "$as_dir" && as_dir=.
37141    for ac_exec_ext in '' $ac_executable_extensions; do
37142  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37143    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37144    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37145    break 2
37146  fi
37147done
37148  done
37149IFS=$as_save_IFS
37150
37151fi
37152fi
37153NM=$ac_cv_prog_NM
37154if test -n "$NM"; then
37155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37156$as_echo "$NM" >&6; }
37157else
37158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37159$as_echo "no" >&6; }
37160fi
37161
37162
37163    test -n "$NM" && break
37164  done
37165fi
37166if test -z "$NM"; then
37167  ac_ct_NM=$NM
37168  for ac_prog in nm
37169do
37170  # Extract the first word of "$ac_prog", so it can be a program name with args.
37171set dummy $ac_prog; ac_word=$2
37172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37173$as_echo_n "checking for $ac_word... " >&6; }
37174if ${ac_cv_prog_ac_ct_NM+:} false; then :
37175  $as_echo_n "(cached) " >&6
37176else
37177  if test -n "$ac_ct_NM"; then
37178  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37179else
37180as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37181for as_dir in $PATH
37182do
37183  IFS=$as_save_IFS
37184  test -z "$as_dir" && as_dir=.
37185    for ac_exec_ext in '' $ac_executable_extensions; do
37186  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37187    ac_cv_prog_ac_ct_NM="$ac_prog"
37188    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37189    break 2
37190  fi
37191done
37192  done
37193IFS=$as_save_IFS
37194
37195fi
37196fi
37197ac_ct_NM=$ac_cv_prog_ac_ct_NM
37198if test -n "$ac_ct_NM"; then
37199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37200$as_echo "$ac_ct_NM" >&6; }
37201else
37202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37203$as_echo "no" >&6; }
37204fi
37205
37206
37207  test -n "$ac_ct_NM" && break
37208done
37209
37210  if test "x$ac_ct_NM" = x; then
37211    NM=""
37212  else
37213    case $cross_compiling:$ac_tool_warned in
37214yes:)
37215{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37216$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37217ac_tool_warned=yes ;;
37218esac
37219    NM=$ac_ct_NM
37220  fi
37221fi
37222
37223  else
37224    # The variable is set, but is it from the command line or the environment?
37225
37226    # Try to remove the string !NM! from our list.
37227    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
37228    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37229      # If it failed, the variable was not from the command line. Ignore it,
37230      # but warn the user (except for BASH, which is always set by the calling BASH).
37231      if test "xNM" != xBASH; then
37232        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
37233$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
37234      fi
37235      # Try to locate tool using the code snippet
37236      if test -n "$ac_tool_prefix"; then
37237  for ac_prog in nm
37238  do
37239    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37240set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37242$as_echo_n "checking for $ac_word... " >&6; }
37243if ${ac_cv_prog_NM+:} false; then :
37244  $as_echo_n "(cached) " >&6
37245else
37246  if test -n "$NM"; then
37247  ac_cv_prog_NM="$NM" # Let the user override the test.
37248else
37249as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37250for as_dir in $PATH
37251do
37252  IFS=$as_save_IFS
37253  test -z "$as_dir" && as_dir=.
37254    for ac_exec_ext in '' $ac_executable_extensions; do
37255  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37256    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37257    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37258    break 2
37259  fi
37260done
37261  done
37262IFS=$as_save_IFS
37263
37264fi
37265fi
37266NM=$ac_cv_prog_NM
37267if test -n "$NM"; then
37268  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37269$as_echo "$NM" >&6; }
37270else
37271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37272$as_echo "no" >&6; }
37273fi
37274
37275
37276    test -n "$NM" && break
37277  done
37278fi
37279if test -z "$NM"; then
37280  ac_ct_NM=$NM
37281  for ac_prog in nm
37282do
37283  # Extract the first word of "$ac_prog", so it can be a program name with args.
37284set dummy $ac_prog; ac_word=$2
37285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37286$as_echo_n "checking for $ac_word... " >&6; }
37287if ${ac_cv_prog_ac_ct_NM+:} false; then :
37288  $as_echo_n "(cached) " >&6
37289else
37290  if test -n "$ac_ct_NM"; then
37291  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37292else
37293as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37294for as_dir in $PATH
37295do
37296  IFS=$as_save_IFS
37297  test -z "$as_dir" && as_dir=.
37298    for ac_exec_ext in '' $ac_executable_extensions; do
37299  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37300    ac_cv_prog_ac_ct_NM="$ac_prog"
37301    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37302    break 2
37303  fi
37304done
37305  done
37306IFS=$as_save_IFS
37307
37308fi
37309fi
37310ac_ct_NM=$ac_cv_prog_ac_ct_NM
37311if test -n "$ac_ct_NM"; then
37312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37313$as_echo "$ac_ct_NM" >&6; }
37314else
37315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37316$as_echo "no" >&6; }
37317fi
37318
37319
37320  test -n "$ac_ct_NM" && break
37321done
37322
37323  if test "x$ac_ct_NM" = x; then
37324    NM=""
37325  else
37326    case $cross_compiling:$ac_tool_warned in
37327yes:)
37328{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37329$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37330ac_tool_warned=yes ;;
37331esac
37332    NM=$ac_ct_NM
37333  fi
37334fi
37335
37336    else
37337      # If it succeeded, then it was overridden by the user. We will use it
37338      # for the tool.
37339
37340      # First remove it from the list of overridden variables, so we can test
37341      # for unknown variables in the end.
37342      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37343
37344      # Check if the provided tool contains a complete path.
37345      tool_specified="$NM"
37346      tool_basename="${tool_specified##*/}"
37347      if test "x$tool_basename" = "x$tool_specified"; then
37348        # A command without a complete path is provided, search $PATH.
37349        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
37350$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
37351        # Extract the first word of "$tool_basename", so it can be a program name with args.
37352set dummy $tool_basename; ac_word=$2
37353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37354$as_echo_n "checking for $ac_word... " >&6; }
37355if ${ac_cv_path_NM+:} false; then :
37356  $as_echo_n "(cached) " >&6
37357else
37358  case $NM in
37359  [\\/]* | ?:[\\/]*)
37360  ac_cv_path_NM="$NM" # Let the user override the test with a path.
37361  ;;
37362  *)
37363  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37364for as_dir in $PATH
37365do
37366  IFS=$as_save_IFS
37367  test -z "$as_dir" && as_dir=.
37368    for ac_exec_ext in '' $ac_executable_extensions; do
37369  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37370    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
37371    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37372    break 2
37373  fi
37374done
37375  done
37376IFS=$as_save_IFS
37377
37378  ;;
37379esac
37380fi
37381NM=$ac_cv_path_NM
37382if test -n "$NM"; then
37383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37384$as_echo "$NM" >&6; }
37385else
37386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37387$as_echo "no" >&6; }
37388fi
37389
37390
37391        if test "x$NM" = x; then
37392          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37393        fi
37394      else
37395        # Otherwise we believe it is a complete path. Use it as it is.
37396        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
37397$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
37398        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
37399$as_echo_n "checking for NM... " >&6; }
37400        if test ! -x "$tool_specified"; then
37401          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37402$as_echo "not found" >&6; }
37403          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
37404        fi
37405        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37406$as_echo "$tool_specified" >&6; }
37407      fi
37408    fi
37409  fi
37410
37411
37412
37413  # Only process if variable expands to non-empty
37414
37415  if test "x$NM" != x; then
37416    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37417
37418  # First separate the path from the arguments. This will split at the first
37419  # space.
37420  complete="$NM"
37421  path="${complete%% *}"
37422  tmp="$complete EOL"
37423  arguments="${tmp#* }"
37424
37425  # Input might be given as Windows format, start by converting to
37426  # unix format.
37427  new_path=`$CYGPATH -u "$path"`
37428
37429  # Now try to locate executable using which
37430  new_path=`$WHICH "$new_path" 2> /dev/null`
37431  # bat and cmd files are not always considered executable in cygwin causing which
37432  # to not find them
37433  if test "x$new_path" = x \
37434      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37435      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37436    new_path=`$CYGPATH -u "$path"`
37437  fi
37438  if test "x$new_path" = x; then
37439    # Oops. Which didn't find the executable.
37440    # The splitting of arguments from the executable at a space might have been incorrect,
37441    # since paths with space are more likely in Windows. Give it another try with the whole
37442    # argument.
37443    path="$complete"
37444    arguments="EOL"
37445    new_path=`$CYGPATH -u "$path"`
37446    new_path=`$WHICH "$new_path" 2> /dev/null`
37447    # bat and cmd files are not always considered executable in cygwin causing which
37448    # to not find them
37449    if test "x$new_path" = x \
37450        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37451        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37452      new_path=`$CYGPATH -u "$path"`
37453    fi
37454    if test "x$new_path" = x; then
37455      # It's still not found. Now this is an unrecoverable error.
37456      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37457$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37458      has_space=`$ECHO "$complete" | $GREP " "`
37459      if test "x$has_space" != x; then
37460        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37461$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37462      fi
37463      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37464    fi
37465  fi
37466
37467  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37468  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37469  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37470  # "foo.exe" is OK but "foo" is an error.
37471  #
37472  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37473  # It is also a way to make sure we got the proper file name for the real test later on.
37474  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37475  if test "x$test_shortpath" = x; then
37476    # Short path failed, file does not exist as specified.
37477    # Try adding .exe or .cmd
37478    if test -f "${new_path}.exe"; then
37479      input_to_shortpath="${new_path}.exe"
37480    elif test -f "${new_path}.cmd"; then
37481      input_to_shortpath="${new_path}.cmd"
37482    else
37483      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
37484$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
37485      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37486$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37487      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37488    fi
37489  else
37490    input_to_shortpath="$new_path"
37491  fi
37492
37493  # Call helper function which possibly converts this using DOS-style short mode.
37494  # If so, the updated path is stored in $new_path.
37495  new_path="$input_to_shortpath"
37496
37497  input_path="$input_to_shortpath"
37498  # Check if we need to convert this using DOS-style short mode. If the path
37499  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37500  # take no chances and rewrite it.
37501  # Note: m4 eats our [], so we need to use [ and ] instead.
37502  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37503  if test "x$has_forbidden_chars" != x; then
37504    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37505    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37506    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37507    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37508      # Going to short mode and back again did indeed matter. Since short mode is
37509      # case insensitive, let's make it lowercase to improve readability.
37510      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37511      # Now convert it back to Unix-style (cygpath)
37512      input_path=`$CYGPATH -u "$shortmode_path"`
37513      new_path="$input_path"
37514    fi
37515  fi
37516
37517  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37518  if test "x$test_cygdrive_prefix" = x; then
37519    # As a simple fix, exclude /usr/bin since it's not a real path.
37520    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37521      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37522      # a path prefixed by /cygdrive for fixpath to work.
37523      new_path="$CYGWIN_ROOT_PATH$input_path"
37524    fi
37525  fi
37526
37527  # remove trailing .exe if any
37528  new_path="${new_path/%.exe/}"
37529
37530    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37531
37532  # First separate the path from the arguments. This will split at the first
37533  # space.
37534  complete="$NM"
37535  path="${complete%% *}"
37536  tmp="$complete EOL"
37537  arguments="${tmp#* }"
37538
37539  # Input might be given as Windows format, start by converting to
37540  # unix format.
37541  new_path="$path"
37542
37543  windows_path="$new_path"
37544  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37545    unix_path=`$CYGPATH -u "$windows_path"`
37546    new_path="$unix_path"
37547  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37548    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37549    new_path="$unix_path"
37550  fi
37551
37552
37553  # Now try to locate executable using which
37554  new_path=`$WHICH "$new_path" 2> /dev/null`
37555
37556  if test "x$new_path" = x; then
37557    # Oops. Which didn't find the executable.
37558    # The splitting of arguments from the executable at a space might have been incorrect,
37559    # since paths with space are more likely in Windows. Give it another try with the whole
37560    # argument.
37561    path="$complete"
37562    arguments="EOL"
37563    new_path="$path"
37564
37565  windows_path="$new_path"
37566  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37567    unix_path=`$CYGPATH -u "$windows_path"`
37568    new_path="$unix_path"
37569  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37570    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37571    new_path="$unix_path"
37572  fi
37573
37574
37575    new_path=`$WHICH "$new_path" 2> /dev/null`
37576    # bat and cmd files are not always considered executable in MSYS causing which
37577    # to not find them
37578    if test "x$new_path" = x \
37579        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37580        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37581      new_path="$path"
37582
37583  windows_path="$new_path"
37584  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37585    unix_path=`$CYGPATH -u "$windows_path"`
37586    new_path="$unix_path"
37587  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37588    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37589    new_path="$unix_path"
37590  fi
37591
37592    fi
37593
37594    if test "x$new_path" = x; then
37595      # It's still not found. Now this is an unrecoverable error.
37596      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37597$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37598      has_space=`$ECHO "$complete" | $GREP " "`
37599      if test "x$has_space" != x; then
37600        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37601$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37602      fi
37603      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37604    fi
37605  fi
37606
37607  # Now new_path has a complete unix path to the binary
37608  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37609    # Keep paths in /bin as-is, but remove trailing .exe if any
37610    new_path="${new_path/%.exe/}"
37611    # Do not save /bin paths to all_fixpath_prefixes!
37612  else
37613    # Not in mixed or Windows style, start by that.
37614    new_path=`cmd //c echo $new_path`
37615
37616  input_path="$new_path"
37617  # Check if we need to convert this using DOS-style short mode. If the path
37618  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37619  # take no chances and rewrite it.
37620  # Note: m4 eats our [], so we need to use [ and ] instead.
37621  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37622  if test "x$has_forbidden_chars" != x; then
37623    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37624    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37625  fi
37626
37627    # Output is in $new_path
37628
37629  windows_path="$new_path"
37630  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37631    unix_path=`$CYGPATH -u "$windows_path"`
37632    new_path="$unix_path"
37633  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37634    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37635    new_path="$unix_path"
37636  fi
37637
37638    # remove trailing .exe if any
37639    new_path="${new_path/%.exe/}"
37640
37641    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37642    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37643  fi
37644
37645    else
37646      # We're on a unix platform. Hooray! :)
37647      # First separate the path from the arguments. This will split at the first
37648      # space.
37649      complete="$NM"
37650      path="${complete%% *}"
37651      tmp="$complete EOL"
37652      arguments="${tmp#* }"
37653
37654      # Cannot rely on the command "which" here since it doesn't always work.
37655      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37656      if test -z "$is_absolute_path"; then
37657        # Path to executable is not absolute. Find it.
37658        IFS_save="$IFS"
37659        IFS=:
37660        for p in $PATH; do
37661          if test -f "$p/$path" && test -x "$p/$path"; then
37662            new_path="$p/$path"
37663            break
37664          fi
37665        done
37666        IFS="$IFS_save"
37667      else
37668        # This is an absolute path, we can use it without further modifications.
37669        new_path="$path"
37670      fi
37671
37672      if test "x$new_path" = x; then
37673        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37674$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37675        has_space=`$ECHO "$complete" | $GREP " "`
37676        if test "x$has_space" != x; then
37677          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37678$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37679        fi
37680        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37681      fi
37682    fi
37683
37684    # Now join together the path and the arguments once again
37685    if test "x$arguments" != xEOL; then
37686      new_complete="$new_path ${arguments% *}"
37687    else
37688      new_complete="$new_path"
37689    fi
37690
37691    if test "x$complete" != "x$new_complete"; then
37692      NM="$new_complete"
37693      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
37694$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
37695    fi
37696  fi
37697
37698    GNM="$NM"
37699
37700  fi
37701
37702  # objcopy is used for moving debug symbols to separate files when
37703  # full debug symbols are enabled.
37704  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
37705
37706
37707  # Publish this variable in the help.
37708
37709
37710  if test "x$OBJCOPY" = x; then
37711    # The variable is not set by user, try to locate tool using the code snippet
37712    if test -n "$ac_tool_prefix"; then
37713  for ac_prog in gobjcopy objcopy
37714  do
37715    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37716set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37718$as_echo_n "checking for $ac_word... " >&6; }
37719if ${ac_cv_prog_OBJCOPY+:} false; then :
37720  $as_echo_n "(cached) " >&6
37721else
37722  if test -n "$OBJCOPY"; then
37723  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
37724else
37725as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37726for as_dir in $PATH
37727do
37728  IFS=$as_save_IFS
37729  test -z "$as_dir" && as_dir=.
37730    for ac_exec_ext in '' $ac_executable_extensions; do
37731  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37732    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
37733    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37734    break 2
37735  fi
37736done
37737  done
37738IFS=$as_save_IFS
37739
37740fi
37741fi
37742OBJCOPY=$ac_cv_prog_OBJCOPY
37743if test -n "$OBJCOPY"; then
37744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
37745$as_echo "$OBJCOPY" >&6; }
37746else
37747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37748$as_echo "no" >&6; }
37749fi
37750
37751
37752    test -n "$OBJCOPY" && break
37753  done
37754fi
37755if test -z "$OBJCOPY"; then
37756  ac_ct_OBJCOPY=$OBJCOPY
37757  for ac_prog in gobjcopy objcopy
37758do
37759  # Extract the first word of "$ac_prog", so it can be a program name with args.
37760set dummy $ac_prog; ac_word=$2
37761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37762$as_echo_n "checking for $ac_word... " >&6; }
37763if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
37764  $as_echo_n "(cached) " >&6
37765else
37766  if test -n "$ac_ct_OBJCOPY"; then
37767  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
37768else
37769as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37770for as_dir in $PATH
37771do
37772  IFS=$as_save_IFS
37773  test -z "$as_dir" && as_dir=.
37774    for ac_exec_ext in '' $ac_executable_extensions; do
37775  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37776    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
37777    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37778    break 2
37779  fi
37780done
37781  done
37782IFS=$as_save_IFS
37783
37784fi
37785fi
37786ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
37787if test -n "$ac_ct_OBJCOPY"; then
37788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
37789$as_echo "$ac_ct_OBJCOPY" >&6; }
37790else
37791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37792$as_echo "no" >&6; }
37793fi
37794
37795
37796  test -n "$ac_ct_OBJCOPY" && break
37797done
37798
37799  if test "x$ac_ct_OBJCOPY" = x; then
37800    OBJCOPY=""
37801  else
37802    case $cross_compiling:$ac_tool_warned in
37803yes:)
37804{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37805$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37806ac_tool_warned=yes ;;
37807esac
37808    OBJCOPY=$ac_ct_OBJCOPY
37809  fi
37810fi
37811
37812  else
37813    # The variable is set, but is it from the command line or the environment?
37814
37815    # Try to remove the string !OBJCOPY! from our list.
37816    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
37817    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37818      # If it failed, the variable was not from the command line. Ignore it,
37819      # but warn the user (except for BASH, which is always set by the calling BASH).
37820      if test "xOBJCOPY" != xBASH; then
37821        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
37822$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
37823      fi
37824      # Try to locate tool using the code snippet
37825      if test -n "$ac_tool_prefix"; then
37826  for ac_prog in gobjcopy objcopy
37827  do
37828    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37829set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37831$as_echo_n "checking for $ac_word... " >&6; }
37832if ${ac_cv_prog_OBJCOPY+:} false; then :
37833  $as_echo_n "(cached) " >&6
37834else
37835  if test -n "$OBJCOPY"; then
37836  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
37837else
37838as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37839for as_dir in $PATH
37840do
37841  IFS=$as_save_IFS
37842  test -z "$as_dir" && as_dir=.
37843    for ac_exec_ext in '' $ac_executable_extensions; do
37844  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37845    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
37846    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37847    break 2
37848  fi
37849done
37850  done
37851IFS=$as_save_IFS
37852
37853fi
37854fi
37855OBJCOPY=$ac_cv_prog_OBJCOPY
37856if test -n "$OBJCOPY"; then
37857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
37858$as_echo "$OBJCOPY" >&6; }
37859else
37860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37861$as_echo "no" >&6; }
37862fi
37863
37864
37865    test -n "$OBJCOPY" && break
37866  done
37867fi
37868if test -z "$OBJCOPY"; then
37869  ac_ct_OBJCOPY=$OBJCOPY
37870  for ac_prog in gobjcopy objcopy
37871do
37872  # Extract the first word of "$ac_prog", so it can be a program name with args.
37873set dummy $ac_prog; ac_word=$2
37874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37875$as_echo_n "checking for $ac_word... " >&6; }
37876if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
37877  $as_echo_n "(cached) " >&6
37878else
37879  if test -n "$ac_ct_OBJCOPY"; then
37880  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
37881else
37882as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37883for as_dir in $PATH
37884do
37885  IFS=$as_save_IFS
37886  test -z "$as_dir" && as_dir=.
37887    for ac_exec_ext in '' $ac_executable_extensions; do
37888  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37889    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
37890    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37891    break 2
37892  fi
37893done
37894  done
37895IFS=$as_save_IFS
37896
37897fi
37898fi
37899ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
37900if test -n "$ac_ct_OBJCOPY"; then
37901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
37902$as_echo "$ac_ct_OBJCOPY" >&6; }
37903else
37904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37905$as_echo "no" >&6; }
37906fi
37907
37908
37909  test -n "$ac_ct_OBJCOPY" && break
37910done
37911
37912  if test "x$ac_ct_OBJCOPY" = x; then
37913    OBJCOPY=""
37914  else
37915    case $cross_compiling:$ac_tool_warned in
37916yes:)
37917{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37918$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37919ac_tool_warned=yes ;;
37920esac
37921    OBJCOPY=$ac_ct_OBJCOPY
37922  fi
37923fi
37924
37925    else
37926      # If it succeeded, then it was overridden by the user. We will use it
37927      # for the tool.
37928
37929      # First remove it from the list of overridden variables, so we can test
37930      # for unknown variables in the end.
37931      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37932
37933      # Check if the provided tool contains a complete path.
37934      tool_specified="$OBJCOPY"
37935      tool_basename="${tool_specified##*/}"
37936      if test "x$tool_basename" = "x$tool_specified"; then
37937        # A command without a complete path is provided, search $PATH.
37938        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
37939$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
37940        # Extract the first word of "$tool_basename", so it can be a program name with args.
37941set dummy $tool_basename; ac_word=$2
37942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37943$as_echo_n "checking for $ac_word... " >&6; }
37944if ${ac_cv_path_OBJCOPY+:} false; then :
37945  $as_echo_n "(cached) " >&6
37946else
37947  case $OBJCOPY in
37948  [\\/]* | ?:[\\/]*)
37949  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
37950  ;;
37951  *)
37952  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37953for as_dir in $PATH
37954do
37955  IFS=$as_save_IFS
37956  test -z "$as_dir" && as_dir=.
37957    for ac_exec_ext in '' $ac_executable_extensions; do
37958  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37959    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
37960    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37961    break 2
37962  fi
37963done
37964  done
37965IFS=$as_save_IFS
37966
37967  ;;
37968esac
37969fi
37970OBJCOPY=$ac_cv_path_OBJCOPY
37971if test -n "$OBJCOPY"; then
37972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
37973$as_echo "$OBJCOPY" >&6; }
37974else
37975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37976$as_echo "no" >&6; }
37977fi
37978
37979
37980        if test "x$OBJCOPY" = x; then
37981          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37982        fi
37983      else
37984        # Otherwise we believe it is a complete path. Use it as it is.
37985        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
37986$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
37987        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
37988$as_echo_n "checking for OBJCOPY... " >&6; }
37989        if test ! -x "$tool_specified"; then
37990          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37991$as_echo "not found" >&6; }
37992          as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
37993        fi
37994        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37995$as_echo "$tool_specified" >&6; }
37996      fi
37997    fi
37998  fi
37999
38000
38001    # Only call fixup if objcopy was found.
38002    if test -n "$OBJCOPY"; then
38003
38004  # Only process if variable expands to non-empty
38005
38006  if test "x$OBJCOPY" != x; then
38007    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38008
38009  # First separate the path from the arguments. This will split at the first
38010  # space.
38011  complete="$OBJCOPY"
38012  path="${complete%% *}"
38013  tmp="$complete EOL"
38014  arguments="${tmp#* }"
38015
38016  # Input might be given as Windows format, start by converting to
38017  # unix format.
38018  new_path=`$CYGPATH -u "$path"`
38019
38020  # Now try to locate executable using which
38021  new_path=`$WHICH "$new_path" 2> /dev/null`
38022  # bat and cmd files are not always considered executable in cygwin causing which
38023  # to not find them
38024  if test "x$new_path" = x \
38025      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38026      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38027    new_path=`$CYGPATH -u "$path"`
38028  fi
38029  if test "x$new_path" = x; then
38030    # Oops. Which didn't find the executable.
38031    # The splitting of arguments from the executable at a space might have been incorrect,
38032    # since paths with space are more likely in Windows. Give it another try with the whole
38033    # argument.
38034    path="$complete"
38035    arguments="EOL"
38036    new_path=`$CYGPATH -u "$path"`
38037    new_path=`$WHICH "$new_path" 2> /dev/null`
38038    # bat and cmd files are not always considered executable in cygwin causing which
38039    # to not find them
38040    if test "x$new_path" = x \
38041        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38042        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38043      new_path=`$CYGPATH -u "$path"`
38044    fi
38045    if test "x$new_path" = x; then
38046      # It's still not found. Now this is an unrecoverable error.
38047      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38048$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38049      has_space=`$ECHO "$complete" | $GREP " "`
38050      if test "x$has_space" != x; then
38051        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38052$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38053      fi
38054      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38055    fi
38056  fi
38057
38058  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38059  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38060  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38061  # "foo.exe" is OK but "foo" is an error.
38062  #
38063  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38064  # It is also a way to make sure we got the proper file name for the real test later on.
38065  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38066  if test "x$test_shortpath" = x; then
38067    # Short path failed, file does not exist as specified.
38068    # Try adding .exe or .cmd
38069    if test -f "${new_path}.exe"; then
38070      input_to_shortpath="${new_path}.exe"
38071    elif test -f "${new_path}.cmd"; then
38072      input_to_shortpath="${new_path}.cmd"
38073    else
38074      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
38075$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
38076      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38077$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38078      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38079    fi
38080  else
38081    input_to_shortpath="$new_path"
38082  fi
38083
38084  # Call helper function which possibly converts this using DOS-style short mode.
38085  # If so, the updated path is stored in $new_path.
38086  new_path="$input_to_shortpath"
38087
38088  input_path="$input_to_shortpath"
38089  # Check if we need to convert this using DOS-style short mode. If the path
38090  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38091  # take no chances and rewrite it.
38092  # Note: m4 eats our [], so we need to use [ and ] instead.
38093  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38094  if test "x$has_forbidden_chars" != x; then
38095    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38096    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38097    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38098    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38099      # Going to short mode and back again did indeed matter. Since short mode is
38100      # case insensitive, let's make it lowercase to improve readability.
38101      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38102      # Now convert it back to Unix-style (cygpath)
38103      input_path=`$CYGPATH -u "$shortmode_path"`
38104      new_path="$input_path"
38105    fi
38106  fi
38107
38108  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38109  if test "x$test_cygdrive_prefix" = x; then
38110    # As a simple fix, exclude /usr/bin since it's not a real path.
38111    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38112      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38113      # a path prefixed by /cygdrive for fixpath to work.
38114      new_path="$CYGWIN_ROOT_PATH$input_path"
38115    fi
38116  fi
38117
38118  # remove trailing .exe if any
38119  new_path="${new_path/%.exe/}"
38120
38121    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38122
38123  # First separate the path from the arguments. This will split at the first
38124  # space.
38125  complete="$OBJCOPY"
38126  path="${complete%% *}"
38127  tmp="$complete EOL"
38128  arguments="${tmp#* }"
38129
38130  # Input might be given as Windows format, start by converting to
38131  # unix format.
38132  new_path="$path"
38133
38134  windows_path="$new_path"
38135  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38136    unix_path=`$CYGPATH -u "$windows_path"`
38137    new_path="$unix_path"
38138  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38139    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38140    new_path="$unix_path"
38141  fi
38142
38143
38144  # Now try to locate executable using which
38145  new_path=`$WHICH "$new_path" 2> /dev/null`
38146
38147  if test "x$new_path" = x; then
38148    # Oops. Which didn't find the executable.
38149    # The splitting of arguments from the executable at a space might have been incorrect,
38150    # since paths with space are more likely in Windows. Give it another try with the whole
38151    # argument.
38152    path="$complete"
38153    arguments="EOL"
38154    new_path="$path"
38155
38156  windows_path="$new_path"
38157  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38158    unix_path=`$CYGPATH -u "$windows_path"`
38159    new_path="$unix_path"
38160  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38161    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38162    new_path="$unix_path"
38163  fi
38164
38165
38166    new_path=`$WHICH "$new_path" 2> /dev/null`
38167    # bat and cmd files are not always considered executable in MSYS causing which
38168    # to not find them
38169    if test "x$new_path" = x \
38170        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38171        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38172      new_path="$path"
38173
38174  windows_path="$new_path"
38175  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38176    unix_path=`$CYGPATH -u "$windows_path"`
38177    new_path="$unix_path"
38178  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38179    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38180    new_path="$unix_path"
38181  fi
38182
38183    fi
38184
38185    if test "x$new_path" = x; then
38186      # It's still not found. Now this is an unrecoverable error.
38187      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38188$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38189      has_space=`$ECHO "$complete" | $GREP " "`
38190      if test "x$has_space" != x; then
38191        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38192$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38193      fi
38194      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38195    fi
38196  fi
38197
38198  # Now new_path has a complete unix path to the binary
38199  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38200    # Keep paths in /bin as-is, but remove trailing .exe if any
38201    new_path="${new_path/%.exe/}"
38202    # Do not save /bin paths to all_fixpath_prefixes!
38203  else
38204    # Not in mixed or Windows style, start by that.
38205    new_path=`cmd //c echo $new_path`
38206
38207  input_path="$new_path"
38208  # Check if we need to convert this using DOS-style short mode. If the path
38209  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38210  # take no chances and rewrite it.
38211  # Note: m4 eats our [], so we need to use [ and ] instead.
38212  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38213  if test "x$has_forbidden_chars" != x; then
38214    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38215    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38216  fi
38217
38218    # Output is in $new_path
38219
38220  windows_path="$new_path"
38221  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38222    unix_path=`$CYGPATH -u "$windows_path"`
38223    new_path="$unix_path"
38224  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38225    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38226    new_path="$unix_path"
38227  fi
38228
38229    # remove trailing .exe if any
38230    new_path="${new_path/%.exe/}"
38231
38232    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38233    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38234  fi
38235
38236    else
38237      # We're on a unix platform. Hooray! :)
38238      # First separate the path from the arguments. This will split at the first
38239      # space.
38240      complete="$OBJCOPY"
38241      path="${complete%% *}"
38242      tmp="$complete EOL"
38243      arguments="${tmp#* }"
38244
38245      # Cannot rely on the command "which" here since it doesn't always work.
38246      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38247      if test -z "$is_absolute_path"; then
38248        # Path to executable is not absolute. Find it.
38249        IFS_save="$IFS"
38250        IFS=:
38251        for p in $PATH; do
38252          if test -f "$p/$path" && test -x "$p/$path"; then
38253            new_path="$p/$path"
38254            break
38255          fi
38256        done
38257        IFS="$IFS_save"
38258      else
38259        # This is an absolute path, we can use it without further modifications.
38260        new_path="$path"
38261      fi
38262
38263      if test "x$new_path" = x; then
38264        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38265$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38266        has_space=`$ECHO "$complete" | $GREP " "`
38267        if test "x$has_space" != x; then
38268          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38269$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38270        fi
38271        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38272      fi
38273    fi
38274
38275    # Now join together the path and the arguments once again
38276    if test "x$arguments" != xEOL; then
38277      new_complete="$new_path ${arguments% *}"
38278    else
38279      new_complete="$new_path"
38280    fi
38281
38282    if test "x$complete" != "x$new_complete"; then
38283      OBJCOPY="$new_complete"
38284      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
38285$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
38286    fi
38287  fi
38288
38289    fi
38290  fi
38291
38292
38293
38294  # Publish this variable in the help.
38295
38296
38297  if test "x$OBJDUMP" = x; then
38298    # The variable is not set by user, try to locate tool using the code snippet
38299    if test -n "$ac_tool_prefix"; then
38300  for ac_prog in gobjdump objdump
38301  do
38302    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38303set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38305$as_echo_n "checking for $ac_word... " >&6; }
38306if ${ac_cv_prog_OBJDUMP+:} false; then :
38307  $as_echo_n "(cached) " >&6
38308else
38309  if test -n "$OBJDUMP"; then
38310  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38311else
38312as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38313for as_dir in $PATH
38314do
38315  IFS=$as_save_IFS
38316  test -z "$as_dir" && as_dir=.
38317    for ac_exec_ext in '' $ac_executable_extensions; do
38318  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38319    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38320    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38321    break 2
38322  fi
38323done
38324  done
38325IFS=$as_save_IFS
38326
38327fi
38328fi
38329OBJDUMP=$ac_cv_prog_OBJDUMP
38330if test -n "$OBJDUMP"; then
38331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38332$as_echo "$OBJDUMP" >&6; }
38333else
38334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38335$as_echo "no" >&6; }
38336fi
38337
38338
38339    test -n "$OBJDUMP" && break
38340  done
38341fi
38342if test -z "$OBJDUMP"; then
38343  ac_ct_OBJDUMP=$OBJDUMP
38344  for ac_prog in gobjdump objdump
38345do
38346  # Extract the first word of "$ac_prog", so it can be a program name with args.
38347set dummy $ac_prog; ac_word=$2
38348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38349$as_echo_n "checking for $ac_word... " >&6; }
38350if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38351  $as_echo_n "(cached) " >&6
38352else
38353  if test -n "$ac_ct_OBJDUMP"; then
38354  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38355else
38356as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38357for as_dir in $PATH
38358do
38359  IFS=$as_save_IFS
38360  test -z "$as_dir" && as_dir=.
38361    for ac_exec_ext in '' $ac_executable_extensions; do
38362  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38363    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38364    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38365    break 2
38366  fi
38367done
38368  done
38369IFS=$as_save_IFS
38370
38371fi
38372fi
38373ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38374if test -n "$ac_ct_OBJDUMP"; then
38375  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38376$as_echo "$ac_ct_OBJDUMP" >&6; }
38377else
38378  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38379$as_echo "no" >&6; }
38380fi
38381
38382
38383  test -n "$ac_ct_OBJDUMP" && break
38384done
38385
38386  if test "x$ac_ct_OBJDUMP" = x; then
38387    OBJDUMP=""
38388  else
38389    case $cross_compiling:$ac_tool_warned in
38390yes:)
38391{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38392$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38393ac_tool_warned=yes ;;
38394esac
38395    OBJDUMP=$ac_ct_OBJDUMP
38396  fi
38397fi
38398
38399  else
38400    # The variable is set, but is it from the command line or the environment?
38401
38402    # Try to remove the string !OBJDUMP! from our list.
38403    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
38404    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38405      # If it failed, the variable was not from the command line. Ignore it,
38406      # but warn the user (except for BASH, which is always set by the calling BASH).
38407      if test "xOBJDUMP" != xBASH; then
38408        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
38409$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
38410      fi
38411      # Try to locate tool using the code snippet
38412      if test -n "$ac_tool_prefix"; then
38413  for ac_prog in gobjdump objdump
38414  do
38415    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38416set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38418$as_echo_n "checking for $ac_word... " >&6; }
38419if ${ac_cv_prog_OBJDUMP+:} false; then :
38420  $as_echo_n "(cached) " >&6
38421else
38422  if test -n "$OBJDUMP"; then
38423  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38424else
38425as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38426for as_dir in $PATH
38427do
38428  IFS=$as_save_IFS
38429  test -z "$as_dir" && as_dir=.
38430    for ac_exec_ext in '' $ac_executable_extensions; do
38431  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38432    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38433    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38434    break 2
38435  fi
38436done
38437  done
38438IFS=$as_save_IFS
38439
38440fi
38441fi
38442OBJDUMP=$ac_cv_prog_OBJDUMP
38443if test -n "$OBJDUMP"; then
38444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38445$as_echo "$OBJDUMP" >&6; }
38446else
38447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38448$as_echo "no" >&6; }
38449fi
38450
38451
38452    test -n "$OBJDUMP" && break
38453  done
38454fi
38455if test -z "$OBJDUMP"; then
38456  ac_ct_OBJDUMP=$OBJDUMP
38457  for ac_prog in gobjdump objdump
38458do
38459  # Extract the first word of "$ac_prog", so it can be a program name with args.
38460set dummy $ac_prog; ac_word=$2
38461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38462$as_echo_n "checking for $ac_word... " >&6; }
38463if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38464  $as_echo_n "(cached) " >&6
38465else
38466  if test -n "$ac_ct_OBJDUMP"; then
38467  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38468else
38469as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38470for as_dir in $PATH
38471do
38472  IFS=$as_save_IFS
38473  test -z "$as_dir" && as_dir=.
38474    for ac_exec_ext in '' $ac_executable_extensions; do
38475  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38476    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38477    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38478    break 2
38479  fi
38480done
38481  done
38482IFS=$as_save_IFS
38483
38484fi
38485fi
38486ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38487if test -n "$ac_ct_OBJDUMP"; then
38488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38489$as_echo "$ac_ct_OBJDUMP" >&6; }
38490else
38491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38492$as_echo "no" >&6; }
38493fi
38494
38495
38496  test -n "$ac_ct_OBJDUMP" && break
38497done
38498
38499  if test "x$ac_ct_OBJDUMP" = x; then
38500    OBJDUMP=""
38501  else
38502    case $cross_compiling:$ac_tool_warned in
38503yes:)
38504{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38505$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38506ac_tool_warned=yes ;;
38507esac
38508    OBJDUMP=$ac_ct_OBJDUMP
38509  fi
38510fi
38511
38512    else
38513      # If it succeeded, then it was overridden by the user. We will use it
38514      # for the tool.
38515
38516      # First remove it from the list of overridden variables, so we can test
38517      # for unknown variables in the end.
38518      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38519
38520      # Check if the provided tool contains a complete path.
38521      tool_specified="$OBJDUMP"
38522      tool_basename="${tool_specified##*/}"
38523      if test "x$tool_basename" = "x$tool_specified"; then
38524        # A command without a complete path is provided, search $PATH.
38525        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
38526$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
38527        # Extract the first word of "$tool_basename", so it can be a program name with args.
38528set dummy $tool_basename; ac_word=$2
38529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38530$as_echo_n "checking for $ac_word... " >&6; }
38531if ${ac_cv_path_OBJDUMP+:} false; then :
38532  $as_echo_n "(cached) " >&6
38533else
38534  case $OBJDUMP in
38535  [\\/]* | ?:[\\/]*)
38536  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
38537  ;;
38538  *)
38539  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38540for as_dir in $PATH
38541do
38542  IFS=$as_save_IFS
38543  test -z "$as_dir" && as_dir=.
38544    for ac_exec_ext in '' $ac_executable_extensions; do
38545  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38546    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
38547    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38548    break 2
38549  fi
38550done
38551  done
38552IFS=$as_save_IFS
38553
38554  ;;
38555esac
38556fi
38557OBJDUMP=$ac_cv_path_OBJDUMP
38558if test -n "$OBJDUMP"; then
38559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38560$as_echo "$OBJDUMP" >&6; }
38561else
38562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38563$as_echo "no" >&6; }
38564fi
38565
38566
38567        if test "x$OBJDUMP" = x; then
38568          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38569        fi
38570      else
38571        # Otherwise we believe it is a complete path. Use it as it is.
38572        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
38573$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
38574        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
38575$as_echo_n "checking for OBJDUMP... " >&6; }
38576        if test ! -x "$tool_specified"; then
38577          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38578$as_echo "not found" >&6; }
38579          as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
38580        fi
38581        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38582$as_echo "$tool_specified" >&6; }
38583      fi
38584    fi
38585  fi
38586
38587
38588  if test "x$OBJDUMP" != x; then
38589    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
38590    # bails if argument is missing.
38591
38592  # Only process if variable expands to non-empty
38593
38594  if test "x$OBJDUMP" != x; then
38595    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38596
38597  # First separate the path from the arguments. This will split at the first
38598  # space.
38599  complete="$OBJDUMP"
38600  path="${complete%% *}"
38601  tmp="$complete EOL"
38602  arguments="${tmp#* }"
38603
38604  # Input might be given as Windows format, start by converting to
38605  # unix format.
38606  new_path=`$CYGPATH -u "$path"`
38607
38608  # Now try to locate executable using which
38609  new_path=`$WHICH "$new_path" 2> /dev/null`
38610  # bat and cmd files are not always considered executable in cygwin causing which
38611  # to not find them
38612  if test "x$new_path" = x \
38613      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38614      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38615    new_path=`$CYGPATH -u "$path"`
38616  fi
38617  if test "x$new_path" = x; then
38618    # Oops. Which didn't find the executable.
38619    # The splitting of arguments from the executable at a space might have been incorrect,
38620    # since paths with space are more likely in Windows. Give it another try with the whole
38621    # argument.
38622    path="$complete"
38623    arguments="EOL"
38624    new_path=`$CYGPATH -u "$path"`
38625    new_path=`$WHICH "$new_path" 2> /dev/null`
38626    # bat and cmd files are not always considered executable in cygwin causing which
38627    # to not find them
38628    if test "x$new_path" = x \
38629        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38630        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38631      new_path=`$CYGPATH -u "$path"`
38632    fi
38633    if test "x$new_path" = x; then
38634      # It's still not found. Now this is an unrecoverable error.
38635      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38636$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38637      has_space=`$ECHO "$complete" | $GREP " "`
38638      if test "x$has_space" != x; then
38639        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38640$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38641      fi
38642      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38643    fi
38644  fi
38645
38646  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38647  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38648  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38649  # "foo.exe" is OK but "foo" is an error.
38650  #
38651  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38652  # It is also a way to make sure we got the proper file name for the real test later on.
38653  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38654  if test "x$test_shortpath" = x; then
38655    # Short path failed, file does not exist as specified.
38656    # Try adding .exe or .cmd
38657    if test -f "${new_path}.exe"; then
38658      input_to_shortpath="${new_path}.exe"
38659    elif test -f "${new_path}.cmd"; then
38660      input_to_shortpath="${new_path}.cmd"
38661    else
38662      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
38663$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
38664      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38665$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38666      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38667    fi
38668  else
38669    input_to_shortpath="$new_path"
38670  fi
38671
38672  # Call helper function which possibly converts this using DOS-style short mode.
38673  # If so, the updated path is stored in $new_path.
38674  new_path="$input_to_shortpath"
38675
38676  input_path="$input_to_shortpath"
38677  # Check if we need to convert this using DOS-style short mode. If the path
38678  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38679  # take no chances and rewrite it.
38680  # Note: m4 eats our [], so we need to use [ and ] instead.
38681  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38682  if test "x$has_forbidden_chars" != x; then
38683    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38684    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38685    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38686    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38687      # Going to short mode and back again did indeed matter. Since short mode is
38688      # case insensitive, let's make it lowercase to improve readability.
38689      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38690      # Now convert it back to Unix-style (cygpath)
38691      input_path=`$CYGPATH -u "$shortmode_path"`
38692      new_path="$input_path"
38693    fi
38694  fi
38695
38696  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38697  if test "x$test_cygdrive_prefix" = x; then
38698    # As a simple fix, exclude /usr/bin since it's not a real path.
38699    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38700      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38701      # a path prefixed by /cygdrive for fixpath to work.
38702      new_path="$CYGWIN_ROOT_PATH$input_path"
38703    fi
38704  fi
38705
38706  # remove trailing .exe if any
38707  new_path="${new_path/%.exe/}"
38708
38709    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38710
38711  # First separate the path from the arguments. This will split at the first
38712  # space.
38713  complete="$OBJDUMP"
38714  path="${complete%% *}"
38715  tmp="$complete EOL"
38716  arguments="${tmp#* }"
38717
38718  # Input might be given as Windows format, start by converting to
38719  # unix format.
38720  new_path="$path"
38721
38722  windows_path="$new_path"
38723  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38724    unix_path=`$CYGPATH -u "$windows_path"`
38725    new_path="$unix_path"
38726  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38727    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38728    new_path="$unix_path"
38729  fi
38730
38731
38732  # Now try to locate executable using which
38733  new_path=`$WHICH "$new_path" 2> /dev/null`
38734
38735  if test "x$new_path" = x; then
38736    # Oops. Which didn't find the executable.
38737    # The splitting of arguments from the executable at a space might have been incorrect,
38738    # since paths with space are more likely in Windows. Give it another try with the whole
38739    # argument.
38740    path="$complete"
38741    arguments="EOL"
38742    new_path="$path"
38743
38744  windows_path="$new_path"
38745  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38746    unix_path=`$CYGPATH -u "$windows_path"`
38747    new_path="$unix_path"
38748  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38749    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38750    new_path="$unix_path"
38751  fi
38752
38753
38754    new_path=`$WHICH "$new_path" 2> /dev/null`
38755    # bat and cmd files are not always considered executable in MSYS causing which
38756    # to not find them
38757    if test "x$new_path" = x \
38758        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38759        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38760      new_path="$path"
38761
38762  windows_path="$new_path"
38763  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38764    unix_path=`$CYGPATH -u "$windows_path"`
38765    new_path="$unix_path"
38766  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38767    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38768    new_path="$unix_path"
38769  fi
38770
38771    fi
38772
38773    if test "x$new_path" = x; then
38774      # It's still not found. Now this is an unrecoverable error.
38775      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38776$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38777      has_space=`$ECHO "$complete" | $GREP " "`
38778      if test "x$has_space" != x; then
38779        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38780$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38781      fi
38782      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38783    fi
38784  fi
38785
38786  # Now new_path has a complete unix path to the binary
38787  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38788    # Keep paths in /bin as-is, but remove trailing .exe if any
38789    new_path="${new_path/%.exe/}"
38790    # Do not save /bin paths to all_fixpath_prefixes!
38791  else
38792    # Not in mixed or Windows style, start by that.
38793    new_path=`cmd //c echo $new_path`
38794
38795  input_path="$new_path"
38796  # Check if we need to convert this using DOS-style short mode. If the path
38797  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38798  # take no chances and rewrite it.
38799  # Note: m4 eats our [], so we need to use [ and ] instead.
38800  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38801  if test "x$has_forbidden_chars" != x; then
38802    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38803    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38804  fi
38805
38806    # Output is in $new_path
38807
38808  windows_path="$new_path"
38809  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38810    unix_path=`$CYGPATH -u "$windows_path"`
38811    new_path="$unix_path"
38812  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38813    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38814    new_path="$unix_path"
38815  fi
38816
38817    # remove trailing .exe if any
38818    new_path="${new_path/%.exe/}"
38819
38820    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38821    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38822  fi
38823
38824    else
38825      # We're on a unix platform. Hooray! :)
38826      # First separate the path from the arguments. This will split at the first
38827      # space.
38828      complete="$OBJDUMP"
38829      path="${complete%% *}"
38830      tmp="$complete EOL"
38831      arguments="${tmp#* }"
38832
38833      # Cannot rely on the command "which" here since it doesn't always work.
38834      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38835      if test -z "$is_absolute_path"; then
38836        # Path to executable is not absolute. Find it.
38837        IFS_save="$IFS"
38838        IFS=:
38839        for p in $PATH; do
38840          if test -f "$p/$path" && test -x "$p/$path"; then
38841            new_path="$p/$path"
38842            break
38843          fi
38844        done
38845        IFS="$IFS_save"
38846      else
38847        # This is an absolute path, we can use it without further modifications.
38848        new_path="$path"
38849      fi
38850
38851      if test "x$new_path" = x; then
38852        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38853$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38854        has_space=`$ECHO "$complete" | $GREP " "`
38855        if test "x$has_space" != x; then
38856          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38857$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38858        fi
38859        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38860      fi
38861    fi
38862
38863    # Now join together the path and the arguments once again
38864    if test "x$arguments" != xEOL; then
38865      new_complete="$new_path ${arguments% *}"
38866    else
38867      new_complete="$new_path"
38868    fi
38869
38870    if test "x$complete" != "x$new_complete"; then
38871      OBJDUMP="$new_complete"
38872      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
38873$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
38874    fi
38875  fi
38876
38877  fi
38878
38879
38880  # Restore old path.
38881  PATH="$OLD_PATH"
38882
38883  # Restore the flags to the user specified values.
38884  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
38885  CFLAGS="$ORG_CFLAGS"
38886  CXXFLAGS="$ORG_CXXFLAGS"
38887
38888
38889# Finally do some processing after the detection phase
38890
38891  if test "x$COMPILE_TYPE" = "xcross"; then
38892    # Now we need to find a C/C++ compiler that can build executables for the
38893    # build platform. We can't use the AC_PROG_CC macro, since it can only be
38894    # used once. Also, we need to do this without adding a tools dir to the
38895    # path, otherwise we might pick up cross-compilers which don't use standard
38896    # naming.
38897
38898    # FIXME: we should list the discovered compilers as an exclude pattern!
38899    # If we do that, we can do this detection before POST_DETECTION, and still
38900    # find the build compilers in the tools dir, if needed.
38901
38902
38903  # Publish this variable in the help.
38904
38905
38906  if test "x$BUILD_CC" = x; then
38907    # The variable is not set by user, try to locate tool using the code snippet
38908    for ac_prog in cl cc gcc
38909do
38910  # Extract the first word of "$ac_prog", so it can be a program name with args.
38911set dummy $ac_prog; ac_word=$2
38912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38913$as_echo_n "checking for $ac_word... " >&6; }
38914if ${ac_cv_path_BUILD_CC+:} false; then :
38915  $as_echo_n "(cached) " >&6
38916else
38917  case $BUILD_CC in
38918  [\\/]* | ?:[\\/]*)
38919  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
38920  ;;
38921  *)
38922  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38923for as_dir in $PATH
38924do
38925  IFS=$as_save_IFS
38926  test -z "$as_dir" && as_dir=.
38927    for ac_exec_ext in '' $ac_executable_extensions; do
38928  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38929    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
38930    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38931    break 2
38932  fi
38933done
38934  done
38935IFS=$as_save_IFS
38936
38937  ;;
38938esac
38939fi
38940BUILD_CC=$ac_cv_path_BUILD_CC
38941if test -n "$BUILD_CC"; then
38942  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
38943$as_echo "$BUILD_CC" >&6; }
38944else
38945  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38946$as_echo "no" >&6; }
38947fi
38948
38949
38950  test -n "$BUILD_CC" && break
38951done
38952
38953  else
38954    # The variable is set, but is it from the command line or the environment?
38955
38956    # Try to remove the string !BUILD_CC! from our list.
38957    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
38958    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38959      # If it failed, the variable was not from the command line. Ignore it,
38960      # but warn the user (except for BASH, which is always set by the calling BASH).
38961      if test "xBUILD_CC" != xBASH; then
38962        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
38963$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
38964      fi
38965      # Try to locate tool using the code snippet
38966      for ac_prog in cl cc gcc
38967do
38968  # Extract the first word of "$ac_prog", so it can be a program name with args.
38969set dummy $ac_prog; ac_word=$2
38970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38971$as_echo_n "checking for $ac_word... " >&6; }
38972if ${ac_cv_path_BUILD_CC+:} false; then :
38973  $as_echo_n "(cached) " >&6
38974else
38975  case $BUILD_CC in
38976  [\\/]* | ?:[\\/]*)
38977  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
38978  ;;
38979  *)
38980  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38981for as_dir in $PATH
38982do
38983  IFS=$as_save_IFS
38984  test -z "$as_dir" && as_dir=.
38985    for ac_exec_ext in '' $ac_executable_extensions; do
38986  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38987    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
38988    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38989    break 2
38990  fi
38991done
38992  done
38993IFS=$as_save_IFS
38994
38995  ;;
38996esac
38997fi
38998BUILD_CC=$ac_cv_path_BUILD_CC
38999if test -n "$BUILD_CC"; then
39000  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39001$as_echo "$BUILD_CC" >&6; }
39002else
39003  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39004$as_echo "no" >&6; }
39005fi
39006
39007
39008  test -n "$BUILD_CC" && break
39009done
39010
39011    else
39012      # If it succeeded, then it was overridden by the user. We will use it
39013      # for the tool.
39014
39015      # First remove it from the list of overridden variables, so we can test
39016      # for unknown variables in the end.
39017      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39018
39019      # Check if the provided tool contains a complete path.
39020      tool_specified="$BUILD_CC"
39021      tool_basename="${tool_specified##*/}"
39022      if test "x$tool_basename" = "x$tool_specified"; then
39023        # A command without a complete path is provided, search $PATH.
39024        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
39025$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
39026        # Extract the first word of "$tool_basename", so it can be a program name with args.
39027set dummy $tool_basename; ac_word=$2
39028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39029$as_echo_n "checking for $ac_word... " >&6; }
39030if ${ac_cv_path_BUILD_CC+:} false; then :
39031  $as_echo_n "(cached) " >&6
39032else
39033  case $BUILD_CC in
39034  [\\/]* | ?:[\\/]*)
39035  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39036  ;;
39037  *)
39038  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39039for as_dir in $PATH
39040do
39041  IFS=$as_save_IFS
39042  test -z "$as_dir" && as_dir=.
39043    for ac_exec_ext in '' $ac_executable_extensions; do
39044  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39045    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39046    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39047    break 2
39048  fi
39049done
39050  done
39051IFS=$as_save_IFS
39052
39053  ;;
39054esac
39055fi
39056BUILD_CC=$ac_cv_path_BUILD_CC
39057if test -n "$BUILD_CC"; then
39058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39059$as_echo "$BUILD_CC" >&6; }
39060else
39061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39062$as_echo "no" >&6; }
39063fi
39064
39065
39066        if test "x$BUILD_CC" = x; then
39067          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39068        fi
39069      else
39070        # Otherwise we believe it is a complete path. Use it as it is.
39071        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
39072$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
39073        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
39074$as_echo_n "checking for BUILD_CC... " >&6; }
39075        if test ! -x "$tool_specified"; then
39076          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39077$as_echo "not found" >&6; }
39078          as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
39079        fi
39080        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39081$as_echo "$tool_specified" >&6; }
39082      fi
39083    fi
39084  fi
39085
39086
39087
39088  # Only process if variable expands to non-empty
39089
39090  if test "x$BUILD_CC" != x; then
39091    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39092
39093  # First separate the path from the arguments. This will split at the first
39094  # space.
39095  complete="$BUILD_CC"
39096  path="${complete%% *}"
39097  tmp="$complete EOL"
39098  arguments="${tmp#* }"
39099
39100  # Input might be given as Windows format, start by converting to
39101  # unix format.
39102  new_path=`$CYGPATH -u "$path"`
39103
39104  # Now try to locate executable using which
39105  new_path=`$WHICH "$new_path" 2> /dev/null`
39106  # bat and cmd files are not always considered executable in cygwin causing which
39107  # to not find them
39108  if test "x$new_path" = x \
39109      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39110      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39111    new_path=`$CYGPATH -u "$path"`
39112  fi
39113  if test "x$new_path" = x; then
39114    # Oops. Which didn't find the executable.
39115    # The splitting of arguments from the executable at a space might have been incorrect,
39116    # since paths with space are more likely in Windows. Give it another try with the whole
39117    # argument.
39118    path="$complete"
39119    arguments="EOL"
39120    new_path=`$CYGPATH -u "$path"`
39121    new_path=`$WHICH "$new_path" 2> /dev/null`
39122    # bat and cmd files are not always considered executable in cygwin causing which
39123    # to not find them
39124    if test "x$new_path" = x \
39125        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39126        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39127      new_path=`$CYGPATH -u "$path"`
39128    fi
39129    if test "x$new_path" = x; then
39130      # It's still not found. Now this is an unrecoverable error.
39131      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39132$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39133      has_space=`$ECHO "$complete" | $GREP " "`
39134      if test "x$has_space" != x; then
39135        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39136$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39137      fi
39138      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39139    fi
39140  fi
39141
39142  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39143  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39144  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39145  # "foo.exe" is OK but "foo" is an error.
39146  #
39147  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39148  # It is also a way to make sure we got the proper file name for the real test later on.
39149  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39150  if test "x$test_shortpath" = x; then
39151    # Short path failed, file does not exist as specified.
39152    # Try adding .exe or .cmd
39153    if test -f "${new_path}.exe"; then
39154      input_to_shortpath="${new_path}.exe"
39155    elif test -f "${new_path}.cmd"; then
39156      input_to_shortpath="${new_path}.cmd"
39157    else
39158      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
39159$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
39160      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39161$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39162      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39163    fi
39164  else
39165    input_to_shortpath="$new_path"
39166  fi
39167
39168  # Call helper function which possibly converts this using DOS-style short mode.
39169  # If so, the updated path is stored in $new_path.
39170  new_path="$input_to_shortpath"
39171
39172  input_path="$input_to_shortpath"
39173  # Check if we need to convert this using DOS-style short mode. If the path
39174  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39175  # take no chances and rewrite it.
39176  # Note: m4 eats our [], so we need to use [ and ] instead.
39177  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39178  if test "x$has_forbidden_chars" != x; then
39179    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39180    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39181    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39182    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39183      # Going to short mode and back again did indeed matter. Since short mode is
39184      # case insensitive, let's make it lowercase to improve readability.
39185      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39186      # Now convert it back to Unix-style (cygpath)
39187      input_path=`$CYGPATH -u "$shortmode_path"`
39188      new_path="$input_path"
39189    fi
39190  fi
39191
39192  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39193  if test "x$test_cygdrive_prefix" = x; then
39194    # As a simple fix, exclude /usr/bin since it's not a real path.
39195    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39196      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39197      # a path prefixed by /cygdrive for fixpath to work.
39198      new_path="$CYGWIN_ROOT_PATH$input_path"
39199    fi
39200  fi
39201
39202  # remove trailing .exe if any
39203  new_path="${new_path/%.exe/}"
39204
39205    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39206
39207  # First separate the path from the arguments. This will split at the first
39208  # space.
39209  complete="$BUILD_CC"
39210  path="${complete%% *}"
39211  tmp="$complete EOL"
39212  arguments="${tmp#* }"
39213
39214  # Input might be given as Windows format, start by converting to
39215  # unix format.
39216  new_path="$path"
39217
39218  windows_path="$new_path"
39219  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39220    unix_path=`$CYGPATH -u "$windows_path"`
39221    new_path="$unix_path"
39222  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39223    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39224    new_path="$unix_path"
39225  fi
39226
39227
39228  # Now try to locate executable using which
39229  new_path=`$WHICH "$new_path" 2> /dev/null`
39230
39231  if test "x$new_path" = x; then
39232    # Oops. Which didn't find the executable.
39233    # The splitting of arguments from the executable at a space might have been incorrect,
39234    # since paths with space are more likely in Windows. Give it another try with the whole
39235    # argument.
39236    path="$complete"
39237    arguments="EOL"
39238    new_path="$path"
39239
39240  windows_path="$new_path"
39241  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39242    unix_path=`$CYGPATH -u "$windows_path"`
39243    new_path="$unix_path"
39244  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39245    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39246    new_path="$unix_path"
39247  fi
39248
39249
39250    new_path=`$WHICH "$new_path" 2> /dev/null`
39251    # bat and cmd files are not always considered executable in MSYS causing which
39252    # to not find them
39253    if test "x$new_path" = x \
39254        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39255        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39256      new_path="$path"
39257
39258  windows_path="$new_path"
39259  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39260    unix_path=`$CYGPATH -u "$windows_path"`
39261    new_path="$unix_path"
39262  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39263    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39264    new_path="$unix_path"
39265  fi
39266
39267    fi
39268
39269    if test "x$new_path" = x; then
39270      # It's still not found. Now this is an unrecoverable error.
39271      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39272$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39273      has_space=`$ECHO "$complete" | $GREP " "`
39274      if test "x$has_space" != x; then
39275        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39276$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39277      fi
39278      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39279    fi
39280  fi
39281
39282  # Now new_path has a complete unix path to the binary
39283  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39284    # Keep paths in /bin as-is, but remove trailing .exe if any
39285    new_path="${new_path/%.exe/}"
39286    # Do not save /bin paths to all_fixpath_prefixes!
39287  else
39288    # Not in mixed or Windows style, start by that.
39289    new_path=`cmd //c echo $new_path`
39290
39291  input_path="$new_path"
39292  # Check if we need to convert this using DOS-style short mode. If the path
39293  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39294  # take no chances and rewrite it.
39295  # Note: m4 eats our [], so we need to use [ and ] instead.
39296  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39297  if test "x$has_forbidden_chars" != x; then
39298    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39299    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39300  fi
39301
39302    # Output is in $new_path
39303
39304  windows_path="$new_path"
39305  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39306    unix_path=`$CYGPATH -u "$windows_path"`
39307    new_path="$unix_path"
39308  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39309    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39310    new_path="$unix_path"
39311  fi
39312
39313    # remove trailing .exe if any
39314    new_path="${new_path/%.exe/}"
39315
39316    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39317    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39318  fi
39319
39320    else
39321      # We're on a unix platform. Hooray! :)
39322      # First separate the path from the arguments. This will split at the first
39323      # space.
39324      complete="$BUILD_CC"
39325      path="${complete%% *}"
39326      tmp="$complete EOL"
39327      arguments="${tmp#* }"
39328
39329      # Cannot rely on the command "which" here since it doesn't always work.
39330      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39331      if test -z "$is_absolute_path"; then
39332        # Path to executable is not absolute. Find it.
39333        IFS_save="$IFS"
39334        IFS=:
39335        for p in $PATH; do
39336          if test -f "$p/$path" && test -x "$p/$path"; then
39337            new_path="$p/$path"
39338            break
39339          fi
39340        done
39341        IFS="$IFS_save"
39342      else
39343        # This is an absolute path, we can use it without further modifications.
39344        new_path="$path"
39345      fi
39346
39347      if test "x$new_path" = x; then
39348        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39349$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39350        has_space=`$ECHO "$complete" | $GREP " "`
39351        if test "x$has_space" != x; then
39352          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39353$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39354        fi
39355        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39356      fi
39357    fi
39358
39359    # Now join together the path and the arguments once again
39360    if test "x$arguments" != xEOL; then
39361      new_complete="$new_path ${arguments% *}"
39362    else
39363      new_complete="$new_path"
39364    fi
39365
39366    if test "x$complete" != "x$new_complete"; then
39367      BUILD_CC="$new_complete"
39368      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
39369$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
39370    fi
39371  fi
39372
39373
39374
39375  # Publish this variable in the help.
39376
39377
39378  if test "x$BUILD_CXX" = x; then
39379    # The variable is not set by user, try to locate tool using the code snippet
39380    for ac_prog in cl CC g++
39381do
39382  # Extract the first word of "$ac_prog", so it can be a program name with args.
39383set dummy $ac_prog; ac_word=$2
39384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39385$as_echo_n "checking for $ac_word... " >&6; }
39386if ${ac_cv_path_BUILD_CXX+:} false; then :
39387  $as_echo_n "(cached) " >&6
39388else
39389  case $BUILD_CXX in
39390  [\\/]* | ?:[\\/]*)
39391  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39392  ;;
39393  *)
39394  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39395for as_dir in $PATH
39396do
39397  IFS=$as_save_IFS
39398  test -z "$as_dir" && as_dir=.
39399    for ac_exec_ext in '' $ac_executable_extensions; do
39400  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39401    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39402    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39403    break 2
39404  fi
39405done
39406  done
39407IFS=$as_save_IFS
39408
39409  ;;
39410esac
39411fi
39412BUILD_CXX=$ac_cv_path_BUILD_CXX
39413if test -n "$BUILD_CXX"; then
39414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39415$as_echo "$BUILD_CXX" >&6; }
39416else
39417  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39418$as_echo "no" >&6; }
39419fi
39420
39421
39422  test -n "$BUILD_CXX" && break
39423done
39424
39425  else
39426    # The variable is set, but is it from the command line or the environment?
39427
39428    # Try to remove the string !BUILD_CXX! from our list.
39429    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
39430    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39431      # If it failed, the variable was not from the command line. Ignore it,
39432      # but warn the user (except for BASH, which is always set by the calling BASH).
39433      if test "xBUILD_CXX" != xBASH; then
39434        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
39435$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
39436      fi
39437      # Try to locate tool using the code snippet
39438      for ac_prog in cl CC g++
39439do
39440  # Extract the first word of "$ac_prog", so it can be a program name with args.
39441set dummy $ac_prog; ac_word=$2
39442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39443$as_echo_n "checking for $ac_word... " >&6; }
39444if ${ac_cv_path_BUILD_CXX+:} false; then :
39445  $as_echo_n "(cached) " >&6
39446else
39447  case $BUILD_CXX in
39448  [\\/]* | ?:[\\/]*)
39449  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39450  ;;
39451  *)
39452  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39453for as_dir in $PATH
39454do
39455  IFS=$as_save_IFS
39456  test -z "$as_dir" && as_dir=.
39457    for ac_exec_ext in '' $ac_executable_extensions; do
39458  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39459    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39460    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39461    break 2
39462  fi
39463done
39464  done
39465IFS=$as_save_IFS
39466
39467  ;;
39468esac
39469fi
39470BUILD_CXX=$ac_cv_path_BUILD_CXX
39471if test -n "$BUILD_CXX"; then
39472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39473$as_echo "$BUILD_CXX" >&6; }
39474else
39475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39476$as_echo "no" >&6; }
39477fi
39478
39479
39480  test -n "$BUILD_CXX" && break
39481done
39482
39483    else
39484      # If it succeeded, then it was overridden by the user. We will use it
39485      # for the tool.
39486
39487      # First remove it from the list of overridden variables, so we can test
39488      # for unknown variables in the end.
39489      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39490
39491      # Check if the provided tool contains a complete path.
39492      tool_specified="$BUILD_CXX"
39493      tool_basename="${tool_specified##*/}"
39494      if test "x$tool_basename" = "x$tool_specified"; then
39495        # A command without a complete path is provided, search $PATH.
39496        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
39497$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
39498        # Extract the first word of "$tool_basename", so it can be a program name with args.
39499set dummy $tool_basename; ac_word=$2
39500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39501$as_echo_n "checking for $ac_word... " >&6; }
39502if ${ac_cv_path_BUILD_CXX+:} false; then :
39503  $as_echo_n "(cached) " >&6
39504else
39505  case $BUILD_CXX in
39506  [\\/]* | ?:[\\/]*)
39507  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39508  ;;
39509  *)
39510  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39511for as_dir in $PATH
39512do
39513  IFS=$as_save_IFS
39514  test -z "$as_dir" && as_dir=.
39515    for ac_exec_ext in '' $ac_executable_extensions; do
39516  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39517    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39518    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39519    break 2
39520  fi
39521done
39522  done
39523IFS=$as_save_IFS
39524
39525  ;;
39526esac
39527fi
39528BUILD_CXX=$ac_cv_path_BUILD_CXX
39529if test -n "$BUILD_CXX"; then
39530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39531$as_echo "$BUILD_CXX" >&6; }
39532else
39533  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39534$as_echo "no" >&6; }
39535fi
39536
39537
39538        if test "x$BUILD_CXX" = x; then
39539          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39540        fi
39541      else
39542        # Otherwise we believe it is a complete path. Use it as it is.
39543        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
39544$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
39545        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
39546$as_echo_n "checking for BUILD_CXX... " >&6; }
39547        if test ! -x "$tool_specified"; then
39548          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39549$as_echo "not found" >&6; }
39550          as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
39551        fi
39552        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39553$as_echo "$tool_specified" >&6; }
39554      fi
39555    fi
39556  fi
39557
39558
39559
39560  # Only process if variable expands to non-empty
39561
39562  if test "x$BUILD_CXX" != x; then
39563    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39564
39565  # First separate the path from the arguments. This will split at the first
39566  # space.
39567  complete="$BUILD_CXX"
39568  path="${complete%% *}"
39569  tmp="$complete EOL"
39570  arguments="${tmp#* }"
39571
39572  # Input might be given as Windows format, start by converting to
39573  # unix format.
39574  new_path=`$CYGPATH -u "$path"`
39575
39576  # Now try to locate executable using which
39577  new_path=`$WHICH "$new_path" 2> /dev/null`
39578  # bat and cmd files are not always considered executable in cygwin causing which
39579  # to not find them
39580  if test "x$new_path" = x \
39581      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39582      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39583    new_path=`$CYGPATH -u "$path"`
39584  fi
39585  if test "x$new_path" = x; then
39586    # Oops. Which didn't find the executable.
39587    # The splitting of arguments from the executable at a space might have been incorrect,
39588    # since paths with space are more likely in Windows. Give it another try with the whole
39589    # argument.
39590    path="$complete"
39591    arguments="EOL"
39592    new_path=`$CYGPATH -u "$path"`
39593    new_path=`$WHICH "$new_path" 2> /dev/null`
39594    # bat and cmd files are not always considered executable in cygwin causing which
39595    # to not find them
39596    if test "x$new_path" = x \
39597        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39598        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39599      new_path=`$CYGPATH -u "$path"`
39600    fi
39601    if test "x$new_path" = x; then
39602      # It's still not found. Now this is an unrecoverable error.
39603      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39604$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39605      has_space=`$ECHO "$complete" | $GREP " "`
39606      if test "x$has_space" != x; then
39607        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39608$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39609      fi
39610      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39611    fi
39612  fi
39613
39614  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39615  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39616  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39617  # "foo.exe" is OK but "foo" is an error.
39618  #
39619  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39620  # It is also a way to make sure we got the proper file name for the real test later on.
39621  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39622  if test "x$test_shortpath" = x; then
39623    # Short path failed, file does not exist as specified.
39624    # Try adding .exe or .cmd
39625    if test -f "${new_path}.exe"; then
39626      input_to_shortpath="${new_path}.exe"
39627    elif test -f "${new_path}.cmd"; then
39628      input_to_shortpath="${new_path}.cmd"
39629    else
39630      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
39631$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
39632      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39633$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39634      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39635    fi
39636  else
39637    input_to_shortpath="$new_path"
39638  fi
39639
39640  # Call helper function which possibly converts this using DOS-style short mode.
39641  # If so, the updated path is stored in $new_path.
39642  new_path="$input_to_shortpath"
39643
39644  input_path="$input_to_shortpath"
39645  # Check if we need to convert this using DOS-style short mode. If the path
39646  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39647  # take no chances and rewrite it.
39648  # Note: m4 eats our [], so we need to use [ and ] instead.
39649  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39650  if test "x$has_forbidden_chars" != x; then
39651    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39652    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39653    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39654    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39655      # Going to short mode and back again did indeed matter. Since short mode is
39656      # case insensitive, let's make it lowercase to improve readability.
39657      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39658      # Now convert it back to Unix-style (cygpath)
39659      input_path=`$CYGPATH -u "$shortmode_path"`
39660      new_path="$input_path"
39661    fi
39662  fi
39663
39664  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39665  if test "x$test_cygdrive_prefix" = x; then
39666    # As a simple fix, exclude /usr/bin since it's not a real path.
39667    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39668      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39669      # a path prefixed by /cygdrive for fixpath to work.
39670      new_path="$CYGWIN_ROOT_PATH$input_path"
39671    fi
39672  fi
39673
39674  # remove trailing .exe if any
39675  new_path="${new_path/%.exe/}"
39676
39677    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39678
39679  # First separate the path from the arguments. This will split at the first
39680  # space.
39681  complete="$BUILD_CXX"
39682  path="${complete%% *}"
39683  tmp="$complete EOL"
39684  arguments="${tmp#* }"
39685
39686  # Input might be given as Windows format, start by converting to
39687  # unix format.
39688  new_path="$path"
39689
39690  windows_path="$new_path"
39691  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39692    unix_path=`$CYGPATH -u "$windows_path"`
39693    new_path="$unix_path"
39694  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39695    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39696    new_path="$unix_path"
39697  fi
39698
39699
39700  # Now try to locate executable using which
39701  new_path=`$WHICH "$new_path" 2> /dev/null`
39702
39703  if test "x$new_path" = x; then
39704    # Oops. Which didn't find the executable.
39705    # The splitting of arguments from the executable at a space might have been incorrect,
39706    # since paths with space are more likely in Windows. Give it another try with the whole
39707    # argument.
39708    path="$complete"
39709    arguments="EOL"
39710    new_path="$path"
39711
39712  windows_path="$new_path"
39713  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39714    unix_path=`$CYGPATH -u "$windows_path"`
39715    new_path="$unix_path"
39716  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39717    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39718    new_path="$unix_path"
39719  fi
39720
39721
39722    new_path=`$WHICH "$new_path" 2> /dev/null`
39723    # bat and cmd files are not always considered executable in MSYS causing which
39724    # to not find them
39725    if test "x$new_path" = x \
39726        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39727        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39728      new_path="$path"
39729
39730  windows_path="$new_path"
39731  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39732    unix_path=`$CYGPATH -u "$windows_path"`
39733    new_path="$unix_path"
39734  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39735    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39736    new_path="$unix_path"
39737  fi
39738
39739    fi
39740
39741    if test "x$new_path" = x; then
39742      # It's still not found. Now this is an unrecoverable error.
39743      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39744$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39745      has_space=`$ECHO "$complete" | $GREP " "`
39746      if test "x$has_space" != x; then
39747        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39748$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39749      fi
39750      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39751    fi
39752  fi
39753
39754  # Now new_path has a complete unix path to the binary
39755  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39756    # Keep paths in /bin as-is, but remove trailing .exe if any
39757    new_path="${new_path/%.exe/}"
39758    # Do not save /bin paths to all_fixpath_prefixes!
39759  else
39760    # Not in mixed or Windows style, start by that.
39761    new_path=`cmd //c echo $new_path`
39762
39763  input_path="$new_path"
39764  # Check if we need to convert this using DOS-style short mode. If the path
39765  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39766  # take no chances and rewrite it.
39767  # Note: m4 eats our [], so we need to use [ and ] instead.
39768  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39769  if test "x$has_forbidden_chars" != x; then
39770    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39771    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39772  fi
39773
39774    # Output is in $new_path
39775
39776  windows_path="$new_path"
39777  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39778    unix_path=`$CYGPATH -u "$windows_path"`
39779    new_path="$unix_path"
39780  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39781    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39782    new_path="$unix_path"
39783  fi
39784
39785    # remove trailing .exe if any
39786    new_path="${new_path/%.exe/}"
39787
39788    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39789    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39790  fi
39791
39792    else
39793      # We're on a unix platform. Hooray! :)
39794      # First separate the path from the arguments. This will split at the first
39795      # space.
39796      complete="$BUILD_CXX"
39797      path="${complete%% *}"
39798      tmp="$complete EOL"
39799      arguments="${tmp#* }"
39800
39801      # Cannot rely on the command "which" here since it doesn't always work.
39802      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39803      if test -z "$is_absolute_path"; then
39804        # Path to executable is not absolute. Find it.
39805        IFS_save="$IFS"
39806        IFS=:
39807        for p in $PATH; do
39808          if test -f "$p/$path" && test -x "$p/$path"; then
39809            new_path="$p/$path"
39810            break
39811          fi
39812        done
39813        IFS="$IFS_save"
39814      else
39815        # This is an absolute path, we can use it without further modifications.
39816        new_path="$path"
39817      fi
39818
39819      if test "x$new_path" = x; then
39820        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39821$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39822        has_space=`$ECHO "$complete" | $GREP " "`
39823        if test "x$has_space" != x; then
39824          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39825$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39826        fi
39827        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39828      fi
39829    fi
39830
39831    # Now join together the path and the arguments once again
39832    if test "x$arguments" != xEOL; then
39833      new_complete="$new_path ${arguments% *}"
39834    else
39835      new_complete="$new_path"
39836    fi
39837
39838    if test "x$complete" != "x$new_complete"; then
39839      BUILD_CXX="$new_complete"
39840      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
39841$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
39842    fi
39843  fi
39844
39845
39846
39847  # Publish this variable in the help.
39848
39849
39850  if test "x$BUILD_LD" = x; then
39851    # The variable is not set by user, try to locate tool using the code snippet
39852    for ac_prog in ld
39853do
39854  # Extract the first word of "$ac_prog", so it can be a program name with args.
39855set dummy $ac_prog; ac_word=$2
39856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39857$as_echo_n "checking for $ac_word... " >&6; }
39858if ${ac_cv_path_BUILD_LD+:} false; then :
39859  $as_echo_n "(cached) " >&6
39860else
39861  case $BUILD_LD in
39862  [\\/]* | ?:[\\/]*)
39863  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
39864  ;;
39865  *)
39866  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39867for as_dir in $PATH
39868do
39869  IFS=$as_save_IFS
39870  test -z "$as_dir" && as_dir=.
39871    for ac_exec_ext in '' $ac_executable_extensions; do
39872  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39873    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
39874    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39875    break 2
39876  fi
39877done
39878  done
39879IFS=$as_save_IFS
39880
39881  ;;
39882esac
39883fi
39884BUILD_LD=$ac_cv_path_BUILD_LD
39885if test -n "$BUILD_LD"; then
39886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
39887$as_echo "$BUILD_LD" >&6; }
39888else
39889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39890$as_echo "no" >&6; }
39891fi
39892
39893
39894  test -n "$BUILD_LD" && break
39895done
39896
39897  else
39898    # The variable is set, but is it from the command line or the environment?
39899
39900    # Try to remove the string !BUILD_LD! from our list.
39901    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_LD!/}
39902    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39903      # If it failed, the variable was not from the command line. Ignore it,
39904      # but warn the user (except for BASH, which is always set by the calling BASH).
39905      if test "xBUILD_LD" != xBASH; then
39906        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&5
39907$as_echo "$as_me: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&2;}
39908      fi
39909      # Try to locate tool using the code snippet
39910      for ac_prog in ld
39911do
39912  # Extract the first word of "$ac_prog", so it can be a program name with args.
39913set dummy $ac_prog; ac_word=$2
39914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39915$as_echo_n "checking for $ac_word... " >&6; }
39916if ${ac_cv_path_BUILD_LD+:} false; then :
39917  $as_echo_n "(cached) " >&6
39918else
39919  case $BUILD_LD in
39920  [\\/]* | ?:[\\/]*)
39921  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
39922  ;;
39923  *)
39924  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39925for as_dir in $PATH
39926do
39927  IFS=$as_save_IFS
39928  test -z "$as_dir" && as_dir=.
39929    for ac_exec_ext in '' $ac_executable_extensions; do
39930  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39931    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
39932    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39933    break 2
39934  fi
39935done
39936  done
39937IFS=$as_save_IFS
39938
39939  ;;
39940esac
39941fi
39942BUILD_LD=$ac_cv_path_BUILD_LD
39943if test -n "$BUILD_LD"; then
39944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
39945$as_echo "$BUILD_LD" >&6; }
39946else
39947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39948$as_echo "no" >&6; }
39949fi
39950
39951
39952  test -n "$BUILD_LD" && break
39953done
39954
39955    else
39956      # If it succeeded, then it was overridden by the user. We will use it
39957      # for the tool.
39958
39959      # First remove it from the list of overridden variables, so we can test
39960      # for unknown variables in the end.
39961      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39962
39963      # Check if the provided tool contains a complete path.
39964      tool_specified="$BUILD_LD"
39965      tool_basename="${tool_specified##*/}"
39966      if test "x$tool_basename" = "x$tool_specified"; then
39967        # A command without a complete path is provided, search $PATH.
39968        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_LD=$tool_basename" >&5
39969$as_echo "$as_me: Will search for user supplied tool BUILD_LD=$tool_basename" >&6;}
39970        # Extract the first word of "$tool_basename", so it can be a program name with args.
39971set dummy $tool_basename; ac_word=$2
39972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39973$as_echo_n "checking for $ac_word... " >&6; }
39974if ${ac_cv_path_BUILD_LD+:} false; then :
39975  $as_echo_n "(cached) " >&6
39976else
39977  case $BUILD_LD in
39978  [\\/]* | ?:[\\/]*)
39979  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
39980  ;;
39981  *)
39982  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39983for as_dir in $PATH
39984do
39985  IFS=$as_save_IFS
39986  test -z "$as_dir" && as_dir=.
39987    for ac_exec_ext in '' $ac_executable_extensions; do
39988  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39989    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
39990    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39991    break 2
39992  fi
39993done
39994  done
39995IFS=$as_save_IFS
39996
39997  ;;
39998esac
39999fi
40000BUILD_LD=$ac_cv_path_BUILD_LD
40001if test -n "$BUILD_LD"; then
40002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40003$as_echo "$BUILD_LD" >&6; }
40004else
40005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40006$as_echo "no" >&6; }
40007fi
40008
40009
40010        if test "x$BUILD_LD" = x; then
40011          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40012        fi
40013      else
40014        # Otherwise we believe it is a complete path. Use it as it is.
40015        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_LD=$tool_specified" >&5
40016$as_echo "$as_me: Will use user supplied tool BUILD_LD=$tool_specified" >&6;}
40017        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_LD" >&5
40018$as_echo_n "checking for BUILD_LD... " >&6; }
40019        if test ! -x "$tool_specified"; then
40020          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40021$as_echo "not found" >&6; }
40022          as_fn_error $? "User supplied tool BUILD_LD=$tool_specified does not exist or is not executable" "$LINENO" 5
40023        fi
40024        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40025$as_echo "$tool_specified" >&6; }
40026      fi
40027    fi
40028  fi
40029
40030
40031
40032  # Only process if variable expands to non-empty
40033
40034  if test "x$BUILD_LD" != x; then
40035    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40036
40037  # First separate the path from the arguments. This will split at the first
40038  # space.
40039  complete="$BUILD_LD"
40040  path="${complete%% *}"
40041  tmp="$complete EOL"
40042  arguments="${tmp#* }"
40043
40044  # Input might be given as Windows format, start by converting to
40045  # unix format.
40046  new_path=`$CYGPATH -u "$path"`
40047
40048  # Now try to locate executable using which
40049  new_path=`$WHICH "$new_path" 2> /dev/null`
40050  # bat and cmd files are not always considered executable in cygwin causing which
40051  # to not find them
40052  if test "x$new_path" = x \
40053      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40054      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40055    new_path=`$CYGPATH -u "$path"`
40056  fi
40057  if test "x$new_path" = x; then
40058    # Oops. Which didn't find the executable.
40059    # The splitting of arguments from the executable at a space might have been incorrect,
40060    # since paths with space are more likely in Windows. Give it another try with the whole
40061    # argument.
40062    path="$complete"
40063    arguments="EOL"
40064    new_path=`$CYGPATH -u "$path"`
40065    new_path=`$WHICH "$new_path" 2> /dev/null`
40066    # bat and cmd files are not always considered executable in cygwin causing which
40067    # to not find them
40068    if test "x$new_path" = x \
40069        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40070        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40071      new_path=`$CYGPATH -u "$path"`
40072    fi
40073    if test "x$new_path" = x; then
40074      # It's still not found. Now this is an unrecoverable error.
40075      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40076$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40077      has_space=`$ECHO "$complete" | $GREP " "`
40078      if test "x$has_space" != x; then
40079        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40080$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40081      fi
40082      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40083    fi
40084  fi
40085
40086  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40087  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40088  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40089  # "foo.exe" is OK but "foo" is an error.
40090  #
40091  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40092  # It is also a way to make sure we got the proper file name for the real test later on.
40093  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40094  if test "x$test_shortpath" = x; then
40095    # Short path failed, file does not exist as specified.
40096    # Try adding .exe or .cmd
40097    if test -f "${new_path}.exe"; then
40098      input_to_shortpath="${new_path}.exe"
40099    elif test -f "${new_path}.cmd"; then
40100      input_to_shortpath="${new_path}.cmd"
40101    else
40102      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
40103$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
40104      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40105$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40106      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40107    fi
40108  else
40109    input_to_shortpath="$new_path"
40110  fi
40111
40112  # Call helper function which possibly converts this using DOS-style short mode.
40113  # If so, the updated path is stored in $new_path.
40114  new_path="$input_to_shortpath"
40115
40116  input_path="$input_to_shortpath"
40117  # Check if we need to convert this using DOS-style short mode. If the path
40118  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40119  # take no chances and rewrite it.
40120  # Note: m4 eats our [], so we need to use [ and ] instead.
40121  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40122  if test "x$has_forbidden_chars" != x; then
40123    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40124    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40125    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40126    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40127      # Going to short mode and back again did indeed matter. Since short mode is
40128      # case insensitive, let's make it lowercase to improve readability.
40129      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40130      # Now convert it back to Unix-style (cygpath)
40131      input_path=`$CYGPATH -u "$shortmode_path"`
40132      new_path="$input_path"
40133    fi
40134  fi
40135
40136  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40137  if test "x$test_cygdrive_prefix" = x; then
40138    # As a simple fix, exclude /usr/bin since it's not a real path.
40139    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40140      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40141      # a path prefixed by /cygdrive for fixpath to work.
40142      new_path="$CYGWIN_ROOT_PATH$input_path"
40143    fi
40144  fi
40145
40146  # remove trailing .exe if any
40147  new_path="${new_path/%.exe/}"
40148
40149    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40150
40151  # First separate the path from the arguments. This will split at the first
40152  # space.
40153  complete="$BUILD_LD"
40154  path="${complete%% *}"
40155  tmp="$complete EOL"
40156  arguments="${tmp#* }"
40157
40158  # Input might be given as Windows format, start by converting to
40159  # unix format.
40160  new_path="$path"
40161
40162  windows_path="$new_path"
40163  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40164    unix_path=`$CYGPATH -u "$windows_path"`
40165    new_path="$unix_path"
40166  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40167    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40168    new_path="$unix_path"
40169  fi
40170
40171
40172  # Now try to locate executable using which
40173  new_path=`$WHICH "$new_path" 2> /dev/null`
40174
40175  if test "x$new_path" = x; then
40176    # Oops. Which didn't find the executable.
40177    # The splitting of arguments from the executable at a space might have been incorrect,
40178    # since paths with space are more likely in Windows. Give it another try with the whole
40179    # argument.
40180    path="$complete"
40181    arguments="EOL"
40182    new_path="$path"
40183
40184  windows_path="$new_path"
40185  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40186    unix_path=`$CYGPATH -u "$windows_path"`
40187    new_path="$unix_path"
40188  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40189    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40190    new_path="$unix_path"
40191  fi
40192
40193
40194    new_path=`$WHICH "$new_path" 2> /dev/null`
40195    # bat and cmd files are not always considered executable in MSYS causing which
40196    # to not find them
40197    if test "x$new_path" = x \
40198        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40199        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40200      new_path="$path"
40201
40202  windows_path="$new_path"
40203  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40204    unix_path=`$CYGPATH -u "$windows_path"`
40205    new_path="$unix_path"
40206  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40207    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40208    new_path="$unix_path"
40209  fi
40210
40211    fi
40212
40213    if test "x$new_path" = x; then
40214      # It's still not found. Now this is an unrecoverable error.
40215      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40216$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40217      has_space=`$ECHO "$complete" | $GREP " "`
40218      if test "x$has_space" != x; then
40219        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40220$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40221      fi
40222      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40223    fi
40224  fi
40225
40226  # Now new_path has a complete unix path to the binary
40227  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40228    # Keep paths in /bin as-is, but remove trailing .exe if any
40229    new_path="${new_path/%.exe/}"
40230    # Do not save /bin paths to all_fixpath_prefixes!
40231  else
40232    # Not in mixed or Windows style, start by that.
40233    new_path=`cmd //c echo $new_path`
40234
40235  input_path="$new_path"
40236  # Check if we need to convert this using DOS-style short mode. If the path
40237  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40238  # take no chances and rewrite it.
40239  # Note: m4 eats our [], so we need to use [ and ] instead.
40240  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40241  if test "x$has_forbidden_chars" != x; then
40242    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40243    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40244  fi
40245
40246    # Output is in $new_path
40247
40248  windows_path="$new_path"
40249  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40250    unix_path=`$CYGPATH -u "$windows_path"`
40251    new_path="$unix_path"
40252  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40253    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40254    new_path="$unix_path"
40255  fi
40256
40257    # remove trailing .exe if any
40258    new_path="${new_path/%.exe/}"
40259
40260    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40261    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40262  fi
40263
40264    else
40265      # We're on a unix platform. Hooray! :)
40266      # First separate the path from the arguments. This will split at the first
40267      # space.
40268      complete="$BUILD_LD"
40269      path="${complete%% *}"
40270      tmp="$complete EOL"
40271      arguments="${tmp#* }"
40272
40273      # Cannot rely on the command "which" here since it doesn't always work.
40274      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40275      if test -z "$is_absolute_path"; then
40276        # Path to executable is not absolute. Find it.
40277        IFS_save="$IFS"
40278        IFS=:
40279        for p in $PATH; do
40280          if test -f "$p/$path" && test -x "$p/$path"; then
40281            new_path="$p/$path"
40282            break
40283          fi
40284        done
40285        IFS="$IFS_save"
40286      else
40287        # This is an absolute path, we can use it without further modifications.
40288        new_path="$path"
40289      fi
40290
40291      if test "x$new_path" = x; then
40292        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40293$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40294        has_space=`$ECHO "$complete" | $GREP " "`
40295        if test "x$has_space" != x; then
40296          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40297$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40298        fi
40299        as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40300      fi
40301    fi
40302
40303    # Now join together the path and the arguments once again
40304    if test "x$arguments" != xEOL; then
40305      new_complete="$new_path ${arguments% *}"
40306    else
40307      new_complete="$new_path"
40308    fi
40309
40310    if test "x$complete" != "x$new_complete"; then
40311      BUILD_LD="$new_complete"
40312      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
40313$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
40314    fi
40315  fi
40316
40317  else
40318    # If we are not cross compiling, use the normal target compilers for
40319    # building the build platform executables.
40320    BUILD_CC="$CC"
40321    BUILD_CXX="$CXX"
40322    BUILD_LD="$LD"
40323  fi
40324
40325
40326
40327
40328
40329
40330  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40331    # For hotspot, we need these in Windows mixed path,
40332    # so rewrite them all. Need added .exe suffix.
40333    HOTSPOT_CXX="$CXX.exe"
40334    HOTSPOT_LD="$LD.exe"
40335    HOTSPOT_MT="$MT.exe"
40336    HOTSPOT_RC="$RC.exe"
40337
40338  unix_path="$HOTSPOT_CXX"
40339  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40340    windows_path=`$CYGPATH -m "$unix_path"`
40341    HOTSPOT_CXX="$windows_path"
40342  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40343    windows_path=`cmd //c echo $unix_path`
40344    HOTSPOT_CXX="$windows_path"
40345  fi
40346
40347
40348  unix_path="$HOTSPOT_LD"
40349  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40350    windows_path=`$CYGPATH -m "$unix_path"`
40351    HOTSPOT_LD="$windows_path"
40352  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40353    windows_path=`cmd //c echo $unix_path`
40354    HOTSPOT_LD="$windows_path"
40355  fi
40356
40357
40358  unix_path="$HOTSPOT_MT"
40359  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40360    windows_path=`$CYGPATH -m "$unix_path"`
40361    HOTSPOT_MT="$windows_path"
40362  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40363    windows_path=`cmd //c echo $unix_path`
40364    HOTSPOT_MT="$windows_path"
40365  fi
40366
40367
40368  unix_path="$HOTSPOT_RC"
40369  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40370    windows_path=`$CYGPATH -m "$unix_path"`
40371    HOTSPOT_RC="$windows_path"
40372  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40373    windows_path=`cmd //c echo $unix_path`
40374    HOTSPOT_RC="$windows_path"
40375  fi
40376
40377
40378
40379  else
40380    HOTSPOT_CXX="$CXX"
40381    HOTSPOT_LD="$LD"
40382  fi
40383
40384
40385
40386  if test  "x$TOOLCHAIN_TYPE" = xclang; then
40387    USE_CLANG=true
40388  fi
40389
40390
40391
40392
40393
40394  # The package path is used only on macosx?
40395  # FIXME: clean this up, and/or move it elsewhere.
40396  PACKAGE_PATH=/opt/local
40397
40398
40399  # Check for extra potential brokenness.
40400  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40401    # On Windows, double-check that we got the right compiler.
40402    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
40403    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
40404    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
40405      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
40406        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
40407      fi
40408    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
40409      if test "x$COMPILER_CPU_TEST" != "xx64"; then
40410        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
40411      fi
40412    fi
40413  fi
40414
40415  if test "x$TOOLCHAIN_TYPE" = xgcc; then
40416    # If this is a --hash-style=gnu system, use --hash-style=both, why?
40417    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
40418    # This is later checked when setting flags.
40419
40420    # "-Og" suppported for GCC 4.8 and later
40421    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
40422
40423  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
40424$as_echo_n "checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
40425  supports=yes
40426
40427  saved_cflags="$CFLAGS"
40428  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
40429  ac_ext=c
40430ac_cpp='$CPP $CPPFLAGS'
40431ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40432ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40433ac_compiler_gnu=$ac_cv_c_compiler_gnu
40434
40435  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40436/* end confdefs.h.  */
40437int i;
40438_ACEOF
40439if ac_fn_c_try_compile "$LINENO"; then :
40440
40441else
40442  supports=no
40443fi
40444rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40445  ac_ext=cpp
40446ac_cpp='$CXXCPP $CPPFLAGS'
40447ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40448ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40449ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40450
40451  CFLAGS="$saved_cflags"
40452
40453  saved_cxxflags="$CXXFLAGS"
40454  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
40455  ac_ext=cpp
40456ac_cpp='$CXXCPP $CPPFLAGS'
40457ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40458ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40459ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40460
40461  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40462/* end confdefs.h.  */
40463int i;
40464_ACEOF
40465if ac_fn_cxx_try_compile "$LINENO"; then :
40466
40467else
40468  supports=no
40469fi
40470rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40471  ac_ext=cpp
40472ac_cpp='$CXXCPP $CPPFLAGS'
40473ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40474ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40475ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40476
40477  CXXFLAGS="$saved_cxxflags"
40478
40479  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40480$as_echo "$supports" >&6; }
40481  if test "x$supports" = "xyes" ; then
40482    HAS_CFLAG_OPTIMIZE_DEBUG=true
40483  else
40484    HAS_CFLAG_OPTIMIZE_DEBUG=false
40485  fi
40486
40487
40488    # "-z relro" supported in GNU binutils 2.17 and later
40489    LINKER_RELRO_FLAG="-Xlinker -z -Xlinker relro"
40490
40491  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
40492$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
40493  supports=yes
40494
40495  saved_ldflags="$LDFLAGS"
40496  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
40497  ac_ext=c
40498ac_cpp='$CPP $CPPFLAGS'
40499ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40500ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40501ac_compiler_gnu=$ac_cv_c_compiler_gnu
40502
40503  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40504/* end confdefs.h.  */
40505
40506int
40507main ()
40508{
40509
40510  ;
40511  return 0;
40512}
40513_ACEOF
40514if ac_fn_c_try_link "$LINENO"; then :
40515
40516else
40517  supports=no
40518fi
40519rm -f core conftest.err conftest.$ac_objext \
40520    conftest$ac_exeext conftest.$ac_ext
40521  ac_ext=cpp
40522ac_cpp='$CXXCPP $CPPFLAGS'
40523ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40524ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40525ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40526
40527  LDFLAGS="$saved_ldflags"
40528
40529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40530$as_echo "$supports" >&6; }
40531  if test "x$supports" = "xyes" ; then
40532    HAS_LINKER_RELRO=true
40533  else
40534    HAS_LINKER_RELRO=false
40535  fi
40536
40537
40538    # "-z now" supported in GNU binutils 2.11 and later
40539    LINKER_NOW_FLAG="-Xlinker -z -Xlinker now"
40540
40541  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
40542$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
40543  supports=yes
40544
40545  saved_ldflags="$LDFLAGS"
40546  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
40547  ac_ext=c
40548ac_cpp='$CPP $CPPFLAGS'
40549ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40550ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40551ac_compiler_gnu=$ac_cv_c_compiler_gnu
40552
40553  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40554/* end confdefs.h.  */
40555
40556int
40557main ()
40558{
40559
40560  ;
40561  return 0;
40562}
40563_ACEOF
40564if ac_fn_c_try_link "$LINENO"; then :
40565
40566else
40567  supports=no
40568fi
40569rm -f core conftest.err conftest.$ac_objext \
40570    conftest$ac_exeext conftest.$ac_ext
40571  ac_ext=cpp
40572ac_cpp='$CXXCPP $CPPFLAGS'
40573ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40574ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40575ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40576
40577  LDFLAGS="$saved_ldflags"
40578
40579  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40580$as_echo "$supports" >&6; }
40581  if test "x$supports" = "xyes" ; then
40582    HAS_LINKER_NOW=true
40583  else
40584    HAS_LINKER_NOW=false
40585  fi
40586
40587  fi
40588
40589  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
40590  # in executable.'
40591  USING_BROKEN_SUSE_LD=no
40592  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
40593    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
40594$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
40595    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
40596    $ECHO "int main() { }" > main.c
40597    if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
40598      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40599$as_echo "no" >&6; }
40600      USING_BROKEN_SUSE_LD=no
40601    else
40602      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40603$as_echo "yes" >&6; }
40604      USING_BROKEN_SUSE_LD=yes
40605    fi
40606    rm -rf version-script.map main.c a.out
40607  fi
40608
40609
40610
40611# Setup the JTReg Regression Test Harness.
40612
40613
40614# Check whether --with-jtreg was given.
40615if test "${with_jtreg+set}" = set; then :
40616  withval=$with_jtreg;
40617else
40618  with_jtreg=no
40619fi
40620
40621
40622  if test "x$with_jtreg" = xno; then
40623    # jtreg disabled
40624    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
40625$as_echo_n "checking for jtreg... " >&6; }
40626    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40627$as_echo "no" >&6; }
40628  else
40629    if test "x$with_jtreg" != xyes; then
40630      # with path specified.
40631      JT_HOME="$with_jtreg"
40632    fi
40633
40634    if test "x$JT_HOME" != x; then
40635      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
40636$as_echo_n "checking for jtreg... " >&6; }
40637
40638      # use JT_HOME enviroment var.
40639
40640  # Only process if variable expands to non-empty
40641
40642  if test "x$JT_HOME" != x; then
40643    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40644
40645  # Input might be given as Windows format, start by converting to
40646  # unix format.
40647  path="$JT_HOME"
40648  new_path=`$CYGPATH -u "$path"`
40649
40650  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40651  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40652  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40653  # "foo.exe" is OK but "foo" is an error.
40654  #
40655  # This test is therefore slightly more accurate than "test -f" to check for file precense.
40656  # It is also a way to make sure we got the proper file name for the real test later on.
40657  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40658  if test "x$test_shortpath" = x; then
40659    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
40660$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
40661    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
40662  fi
40663
40664  # Call helper function which possibly converts this using DOS-style short mode.
40665  # If so, the updated path is stored in $new_path.
40666
40667  input_path="$new_path"
40668  # Check if we need to convert this using DOS-style short mode. If the path
40669  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40670  # take no chances and rewrite it.
40671  # Note: m4 eats our [], so we need to use [ and ] instead.
40672  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40673  if test "x$has_forbidden_chars" != x; then
40674    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40675    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40676    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40677    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40678      # Going to short mode and back again did indeed matter. Since short mode is
40679      # case insensitive, let's make it lowercase to improve readability.
40680      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40681      # Now convert it back to Unix-style (cygpath)
40682      input_path=`$CYGPATH -u "$shortmode_path"`
40683      new_path="$input_path"
40684    fi
40685  fi
40686
40687  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40688  if test "x$test_cygdrive_prefix" = x; then
40689    # As a simple fix, exclude /usr/bin since it's not a real path.
40690    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
40691      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40692      # a path prefixed by /cygdrive for fixpath to work.
40693      new_path="$CYGWIN_ROOT_PATH$input_path"
40694    fi
40695  fi
40696
40697
40698  if test "x$path" != "x$new_path"; then
40699    JT_HOME="$new_path"
40700    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
40701$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
40702  fi
40703
40704    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40705
40706  path="$JT_HOME"
40707  has_colon=`$ECHO $path | $GREP ^.:`
40708  new_path="$path"
40709  if test "x$has_colon" = x; then
40710    # Not in mixed or Windows style, start by that.
40711    new_path=`cmd //c echo $path`
40712  fi
40713
40714
40715  input_path="$new_path"
40716  # Check if we need to convert this using DOS-style short mode. If the path
40717  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40718  # take no chances and rewrite it.
40719  # Note: m4 eats our [], so we need to use [ and ] instead.
40720  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40721  if test "x$has_forbidden_chars" != x; then
40722    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40723    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40724  fi
40725
40726
40727  windows_path="$new_path"
40728  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40729    unix_path=`$CYGPATH -u "$windows_path"`
40730    new_path="$unix_path"
40731  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40732    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40733    new_path="$unix_path"
40734  fi
40735
40736  if test "x$path" != "x$new_path"; then
40737    JT_HOME="$new_path"
40738    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
40739$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
40740  fi
40741
40742  # Save the first 10 bytes of this path to the storage, so fixpath can work.
40743  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40744
40745    else
40746      # We're on a unix platform. Hooray! :)
40747      path="$JT_HOME"
40748      has_space=`$ECHO "$path" | $GREP " "`
40749      if test "x$has_space" != x; then
40750        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
40751$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
40752        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
40753      fi
40754
40755      # Use eval to expand a potential ~
40756      eval path="$path"
40757      if test ! -f "$path" && test ! -d "$path"; then
40758        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
40759      fi
40760
40761      JT_HOME="`cd "$path"; $THEPWDCMD -L`"
40762    fi
40763  fi
40764
40765
40766      # jtreg win32 script works for everybody
40767      JTREGEXE="$JT_HOME/bin/jtreg"
40768
40769      if test ! -f "$JTREGEXE"; then
40770        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
40771      fi
40772
40773      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40774$as_echo "$JTREGEXE" >&6; }
40775    else
40776      # try to find jtreg on path
40777
40778
40779
40780  # Publish this variable in the help.
40781
40782
40783  if test "x$JTREGEXE" = x; then
40784    # The variable is not set by user, try to locate tool using the code snippet
40785    for ac_prog in jtreg
40786do
40787  # Extract the first word of "$ac_prog", so it can be a program name with args.
40788set dummy $ac_prog; ac_word=$2
40789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40790$as_echo_n "checking for $ac_word... " >&6; }
40791if ${ac_cv_path_JTREGEXE+:} false; then :
40792  $as_echo_n "(cached) " >&6
40793else
40794  case $JTREGEXE in
40795  [\\/]* | ?:[\\/]*)
40796  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
40797  ;;
40798  *)
40799  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40800for as_dir in $PATH
40801do
40802  IFS=$as_save_IFS
40803  test -z "$as_dir" && as_dir=.
40804    for ac_exec_ext in '' $ac_executable_extensions; do
40805  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40806    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
40807    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40808    break 2
40809  fi
40810done
40811  done
40812IFS=$as_save_IFS
40813
40814  ;;
40815esac
40816fi
40817JTREGEXE=$ac_cv_path_JTREGEXE
40818if test -n "$JTREGEXE"; then
40819  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40820$as_echo "$JTREGEXE" >&6; }
40821else
40822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40823$as_echo "no" >&6; }
40824fi
40825
40826
40827  test -n "$JTREGEXE" && break
40828done
40829
40830  else
40831    # The variable is set, but is it from the command line or the environment?
40832
40833    # Try to remove the string !JTREGEXE! from our list.
40834    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
40835    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40836      # If it failed, the variable was not from the command line. Ignore it,
40837      # but warn the user (except for BASH, which is always set by the calling BASH).
40838      if test "xJTREGEXE" != xBASH; then
40839        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
40840$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
40841      fi
40842      # Try to locate tool using the code snippet
40843      for ac_prog in jtreg
40844do
40845  # Extract the first word of "$ac_prog", so it can be a program name with args.
40846set dummy $ac_prog; ac_word=$2
40847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40848$as_echo_n "checking for $ac_word... " >&6; }
40849if ${ac_cv_path_JTREGEXE+:} false; then :
40850  $as_echo_n "(cached) " >&6
40851else
40852  case $JTREGEXE in
40853  [\\/]* | ?:[\\/]*)
40854  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
40855  ;;
40856  *)
40857  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40858for as_dir in $PATH
40859do
40860  IFS=$as_save_IFS
40861  test -z "$as_dir" && as_dir=.
40862    for ac_exec_ext in '' $ac_executable_extensions; do
40863  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40864    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
40865    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40866    break 2
40867  fi
40868done
40869  done
40870IFS=$as_save_IFS
40871
40872  ;;
40873esac
40874fi
40875JTREGEXE=$ac_cv_path_JTREGEXE
40876if test -n "$JTREGEXE"; then
40877  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40878$as_echo "$JTREGEXE" >&6; }
40879else
40880  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40881$as_echo "no" >&6; }
40882fi
40883
40884
40885  test -n "$JTREGEXE" && break
40886done
40887
40888    else
40889      # If it succeeded, then it was overridden by the user. We will use it
40890      # for the tool.
40891
40892      # First remove it from the list of overridden variables, so we can test
40893      # for unknown variables in the end.
40894      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40895
40896      # Check if the provided tool contains a complete path.
40897      tool_specified="$JTREGEXE"
40898      tool_basename="${tool_specified##*/}"
40899      if test "x$tool_basename" = "x$tool_specified"; then
40900        # A command without a complete path is provided, search $PATH.
40901        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
40902$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
40903        # Extract the first word of "$tool_basename", so it can be a program name with args.
40904set dummy $tool_basename; ac_word=$2
40905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40906$as_echo_n "checking for $ac_word... " >&6; }
40907if ${ac_cv_path_JTREGEXE+:} false; then :
40908  $as_echo_n "(cached) " >&6
40909else
40910  case $JTREGEXE in
40911  [\\/]* | ?:[\\/]*)
40912  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
40913  ;;
40914  *)
40915  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40916for as_dir in $PATH
40917do
40918  IFS=$as_save_IFS
40919  test -z "$as_dir" && as_dir=.
40920    for ac_exec_ext in '' $ac_executable_extensions; do
40921  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40922    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
40923    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40924    break 2
40925  fi
40926done
40927  done
40928IFS=$as_save_IFS
40929
40930  ;;
40931esac
40932fi
40933JTREGEXE=$ac_cv_path_JTREGEXE
40934if test -n "$JTREGEXE"; then
40935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40936$as_echo "$JTREGEXE" >&6; }
40937else
40938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40939$as_echo "no" >&6; }
40940fi
40941
40942
40943        if test "x$JTREGEXE" = x; then
40944          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40945        fi
40946      else
40947        # Otherwise we believe it is a complete path. Use it as it is.
40948        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
40949$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
40950        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
40951$as_echo_n "checking for JTREGEXE... " >&6; }
40952        if test ! -x "$tool_specified"; then
40953          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40954$as_echo "not found" >&6; }
40955          as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
40956        fi
40957        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40958$as_echo "$tool_specified" >&6; }
40959      fi
40960    fi
40961  fi
40962
40963
40964
40965  if test "x$JTREGEXE" = x; then
40966    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
40967  fi
40968
40969
40970      JT_HOME="`$DIRNAME $JTREGEXE`"
40971    fi
40972  fi
40973
40974
40975
40976
40977
40978
40979  # Option used to tell the compiler whether to create 32- or 64-bit executables
40980  if test "x$TOOLCHAIN_TYPE" = xxlc; then
40981    COMPILER_TARGET_BITS_FLAG="-q"
40982  else
40983    COMPILER_TARGET_BITS_FLAG="-m"
40984  fi
40985
40986
40987  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
40988  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
40989    ARFLAGS="-r"
40990  elif test "x$OPENJDK_TARGET_OS" = xaix; then
40991    ARFLAGS="-X64"
40992  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
40993    # lib.exe is used as AR to create static libraries.
40994    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
40995  else
40996    ARFLAGS=""
40997  fi
40998
40999
41000  ## Setup strip.
41001  # FIXME: should this really be per platform, or should it be per toolchain type?
41002  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
41003  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
41004  if test "x$OPENJDK_TARGET_OS" = xlinux; then
41005    STRIPFLAGS="-g"
41006  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
41007    STRIPFLAGS="-x"
41008  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41009    STRIPFLAGS="-S"
41010  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41011    STRIPFLAGS="-X32_64"
41012  fi
41013
41014  if test "x$OPENJDK_TARGET_OS" != xwindows; then
41015    POST_STRIP_CMD="$STRIP $STRIPFLAGS"
41016  fi
41017
41018
41019  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41020    CC_OUT_OPTION=-Fo
41021    EXE_OUT_OPTION=-out:
41022    LD_OUT_OPTION=-out:
41023    AR_OUT_OPTION=-out:
41024  else
41025    # The option used to specify the target .o,.a or .so file.
41026    # When compiling, how to specify the to be created object file.
41027    CC_OUT_OPTION='-o$(SPACE)'
41028    # When linking, how to specify the to be created executable.
41029    EXE_OUT_OPTION='-o$(SPACE)'
41030    # When linking, how to specify the to be created dynamically linkable library.
41031    LD_OUT_OPTION='-o$(SPACE)'
41032    # When archiving, how to specify the to be create static archive for object files.
41033    AR_OUT_OPTION='rcs$(SPACE)'
41034  fi
41035
41036
41037
41038
41039
41040  # On Windows, we need to set RC flags.
41041  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41042    RC_FLAGS="-nologo -l0x409"
41043    if test "x$VARIANT" = xOPT; then
41044      RC_FLAGS="$RC_FLAGS -DNDEBUG"
41045    fi
41046
41047    # The version variables used to create RC_FLAGS may be overridden
41048    # in a custom configure script, or possibly the command line.
41049    # Let those variables be expanded at make time in spec.gmk.
41050    # The \$ are escaped to the shell, and the $(...) variables
41051    # are evaluated by make.
41052    RC_FLAGS="$RC_FLAGS \
41053        -D\"JDK_BUILD_ID=\$(FULL_VERSION)\" \
41054        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
41055        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
41056        -D\"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
41057        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
41058        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
41059        -D\"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
41060  fi
41061
41062
41063  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41064    # silence copyright notice and other headers.
41065    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
41066  fi
41067
41068  if test "x$SYSROOT" != "x"; then
41069    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41070      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41071        # Solaris Studio does not have a concept of sysroot. Instead we must
41072        # make sure the default include and lib dirs are appended to each
41073        # compile and link command line.
41074        SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
41075        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
41076            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
41077            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
41078      fi
41079    elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41080      # Apple only wants -isysroot <path>, but we also need -iframework<path>/System/Library/Frameworks
41081      SYSROOT_CFLAGS="-isysroot \"$SYSROOT\" -iframework\"$SYSROOT/System/Library/Frameworks\""
41082      SYSROOT_LDFLAGS=$SYSROOT_CFLAGS
41083    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
41084      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
41085      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
41086    elif test "x$TOOLCHAIN_TYPE" = xclang; then
41087      SYSROOT_CFLAGS="-isysroot \"$SYSROOT\""
41088      SYSROOT_LDFLAGS="-isysroot \"$SYSROOT\""
41089    fi
41090    # Propagate the sysroot args to hotspot
41091    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
41092    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
41093    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
41094  fi
41095
41096  # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
41097  # set this here so it doesn't have to be peppered throughout the forest
41098  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41099    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
41100    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
41101  fi
41102
41103
41104
41105
41106
41107# FIXME: Currently we must test this after toolchain but before flags. Fix!
41108
41109# Now we can test some aspects on the target using configure macros.
41110
41111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
41112$as_echo_n "checking for ANSI C header files... " >&6; }
41113if ${ac_cv_header_stdc+:} false; then :
41114  $as_echo_n "(cached) " >&6
41115else
41116  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41117/* end confdefs.h.  */
41118#include <stdlib.h>
41119#include <stdarg.h>
41120#include <string.h>
41121#include <float.h>
41122
41123int
41124main ()
41125{
41126
41127  ;
41128  return 0;
41129}
41130_ACEOF
41131if ac_fn_cxx_try_compile "$LINENO"; then :
41132  ac_cv_header_stdc=yes
41133else
41134  ac_cv_header_stdc=no
41135fi
41136rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41137
41138if test $ac_cv_header_stdc = yes; then
41139  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
41140  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41141/* end confdefs.h.  */
41142#include <string.h>
41143
41144_ACEOF
41145if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41146  $EGREP "memchr" >/dev/null 2>&1; then :
41147
41148else
41149  ac_cv_header_stdc=no
41150fi
41151rm -f conftest*
41152
41153fi
41154
41155if test $ac_cv_header_stdc = yes; then
41156  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
41157  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41158/* end confdefs.h.  */
41159#include <stdlib.h>
41160
41161_ACEOF
41162if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41163  $EGREP "free" >/dev/null 2>&1; then :
41164
41165else
41166  ac_cv_header_stdc=no
41167fi
41168rm -f conftest*
41169
41170fi
41171
41172if test $ac_cv_header_stdc = yes; then
41173  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
41174  if test "$cross_compiling" = yes; then :
41175  :
41176else
41177  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41178/* end confdefs.h.  */
41179#include <ctype.h>
41180#include <stdlib.h>
41181#if ((' ' & 0x0FF) == 0x020)
41182# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
41183# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
41184#else
41185# define ISLOWER(c) \
41186		   (('a' <= (c) && (c) <= 'i') \
41187		     || ('j' <= (c) && (c) <= 'r') \
41188		     || ('s' <= (c) && (c) <= 'z'))
41189# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
41190#endif
41191
41192#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
41193int
41194main ()
41195{
41196  int i;
41197  for (i = 0; i < 256; i++)
41198    if (XOR (islower (i), ISLOWER (i))
41199	|| toupper (i) != TOUPPER (i))
41200      return 2;
41201  return 0;
41202}
41203_ACEOF
41204if ac_fn_cxx_try_run "$LINENO"; then :
41205
41206else
41207  ac_cv_header_stdc=no
41208fi
41209rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41210  conftest.$ac_objext conftest.beam conftest.$ac_ext
41211fi
41212
41213fi
41214fi
41215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
41216$as_echo "$ac_cv_header_stdc" >&6; }
41217if test $ac_cv_header_stdc = yes; then
41218
41219$as_echo "#define STDC_HEADERS 1" >>confdefs.h
41220
41221fi
41222
41223# On IRIX 5.3, sys/types and inttypes.h are conflicting.
41224for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
41225		  inttypes.h stdint.h unistd.h
41226do :
41227  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
41228ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
41229"
41230if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
41231  cat >>confdefs.h <<_ACEOF
41232#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
41233_ACEOF
41234
41235fi
41236
41237done
41238
41239
41240
41241  ###############################################################################
41242  #
41243  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
41244  # (The JVM can use 32 or 64 bit Java pointers but that decision
41245  # is made at runtime.)
41246  #
41247
41248  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
41249    # Always specify -m flag on Solaris
41250    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
41251
41252  # When we add flags to the "official" CFLAGS etc, we need to
41253  # keep track of these additions in ADDED_CFLAGS etc. These
41254  # will later be checked to make sure only controlled additions
41255  # have been made to CFLAGS etc.
41256  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41257  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41258  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41259
41260  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41261  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41262  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41263
41264  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41265  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41266  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41267
41268  elif test "x$COMPILE_TYPE" = xreduced; then
41269    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
41270      # Specify -m if running reduced on unix platforms
41271
41272  # When we add flags to the "official" CFLAGS etc, we need to
41273  # keep track of these additions in ADDED_CFLAGS etc. These
41274  # will later be checked to make sure only controlled additions
41275  # have been made to CFLAGS etc.
41276  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41277  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41278  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41279
41280  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41281  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41282  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41283
41284  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41285  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41286  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41287
41288    fi
41289  fi
41290
41291  # Make compilation sanity check
41292  for ac_header in stdio.h
41293do :
41294  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
41295if test "x$ac_cv_header_stdio_h" = xyes; then :
41296  cat >>confdefs.h <<_ACEOF
41297#define HAVE_STDIO_H 1
41298_ACEOF
41299
41300else
41301
41302    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
41303$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
41304    if test "x$COMPILE_TYPE" = xreduced; then
41305      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
41306$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
41307    elif test "x$COMPILE_TYPE" = xcross; then
41308      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
41309$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
41310    fi
41311    as_fn_error $? "Cannot continue." "$LINENO" 5
41312
41313fi
41314
41315done
41316
41317
41318  # The cast to long int works around a bug in the HP C Compiler
41319# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41320# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41321# This bug is HP SR number 8606223364.
41322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41323$as_echo_n "checking size of int *... " >&6; }
41324if ${ac_cv_sizeof_int_p+:} false; then :
41325  $as_echo_n "(cached) " >&6
41326else
41327  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41328
41329else
41330  if test "$ac_cv_type_int_p" = yes; then
41331     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41332$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41333as_fn_error 77 "cannot compute sizeof (int *)
41334See \`config.log' for more details" "$LINENO" 5; }
41335   else
41336     ac_cv_sizeof_int_p=0
41337   fi
41338fi
41339
41340fi
41341{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41342$as_echo "$ac_cv_sizeof_int_p" >&6; }
41343
41344
41345
41346cat >>confdefs.h <<_ACEOF
41347#define SIZEOF_INT_P $ac_cv_sizeof_int_p
41348_ACEOF
41349
41350
41351
41352  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
41353  if test "x$ac_cv_sizeof_int_p" = x; then
41354    # The test failed, lets stick to the assumed value.
41355    { $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
41356$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
41357  else
41358    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41359
41360    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41361      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
41362      # Let's try to implicitely set the compilers target architecture and retry the test
41363      { $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
41364$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;}
41365      { $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
41366$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;}
41367
41368  # When we add flags to the "official" CFLAGS etc, we need to
41369  # keep track of these additions in ADDED_CFLAGS etc. These
41370  # will later be checked to make sure only controlled additions
41371  # have been made to CFLAGS etc.
41372  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41373  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41374  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41375
41376  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41377  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41378  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41379
41380  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41381  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41382  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41383
41384
41385      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
41386      unset ac_cv_sizeof_int_p
41387      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
41388      cat >>confdefs.h <<_ACEOF
41389#undef SIZEOF_INT_P
41390_ACEOF
41391
41392      # The cast to long int works around a bug in the HP C Compiler
41393# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41394# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41395# This bug is HP SR number 8606223364.
41396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41397$as_echo_n "checking size of int *... " >&6; }
41398if ${ac_cv_sizeof_int_p+:} false; then :
41399  $as_echo_n "(cached) " >&6
41400else
41401  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41402
41403else
41404  if test "$ac_cv_type_int_p" = yes; then
41405     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41406$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41407as_fn_error 77 "cannot compute sizeof (int *)
41408See \`config.log' for more details" "$LINENO" 5; }
41409   else
41410     ac_cv_sizeof_int_p=0
41411   fi
41412fi
41413
41414fi
41415{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41416$as_echo "$ac_cv_sizeof_int_p" >&6; }
41417
41418
41419
41420cat >>confdefs.h <<_ACEOF
41421#define SIZEOF_INT_P $ac_cv_sizeof_int_p
41422_ACEOF
41423
41424
41425
41426      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41427
41428      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41429        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
41430      fi
41431    fi
41432  fi
41433
41434  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
41435$as_echo_n "checking for target address size... " >&6; }
41436  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
41437$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
41438
41439
41440  ###############################################################################
41441  #
41442  # Is the target little of big endian?
41443  #
41444   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
41445$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
41446if ${ac_cv_c_bigendian+:} false; then :
41447  $as_echo_n "(cached) " >&6
41448else
41449  ac_cv_c_bigendian=unknown
41450    # See if we're dealing with a universal compiler.
41451    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41452/* end confdefs.h.  */
41453#ifndef __APPLE_CC__
41454	       not a universal capable compiler
41455	     #endif
41456	     typedef int dummy;
41457
41458_ACEOF
41459if ac_fn_cxx_try_compile "$LINENO"; then :
41460
41461	# Check for potential -arch flags.  It is not universal unless
41462	# there are at least two -arch flags with different values.
41463	ac_arch=
41464	ac_prev=
41465	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
41466	 if test -n "$ac_prev"; then
41467	   case $ac_word in
41468	     i?86 | x86_64 | ppc | ppc64)
41469	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
41470		 ac_arch=$ac_word
41471	       else
41472		 ac_cv_c_bigendian=universal
41473		 break
41474	       fi
41475	       ;;
41476	   esac
41477	   ac_prev=
41478	 elif test "x$ac_word" = "x-arch"; then
41479	   ac_prev=arch
41480	 fi
41481       done
41482fi
41483rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41484    if test $ac_cv_c_bigendian = unknown; then
41485      # See if sys/param.h defines the BYTE_ORDER macro.
41486      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41487/* end confdefs.h.  */
41488#include <sys/types.h>
41489	     #include <sys/param.h>
41490
41491int
41492main ()
41493{
41494#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
41495		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
41496		     && LITTLE_ENDIAN)
41497	      bogus endian macros
41498	     #endif
41499
41500  ;
41501  return 0;
41502}
41503_ACEOF
41504if ac_fn_cxx_try_compile "$LINENO"; then :
41505  # It does; now see whether it defined to BIG_ENDIAN or not.
41506	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41507/* end confdefs.h.  */
41508#include <sys/types.h>
41509		#include <sys/param.h>
41510
41511int
41512main ()
41513{
41514#if BYTE_ORDER != BIG_ENDIAN
41515		 not big endian
41516		#endif
41517
41518  ;
41519  return 0;
41520}
41521_ACEOF
41522if ac_fn_cxx_try_compile "$LINENO"; then :
41523  ac_cv_c_bigendian=yes
41524else
41525  ac_cv_c_bigendian=no
41526fi
41527rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41528fi
41529rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41530    fi
41531    if test $ac_cv_c_bigendian = unknown; then
41532      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
41533      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41534/* end confdefs.h.  */
41535#include <limits.h>
41536
41537int
41538main ()
41539{
41540#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
41541	      bogus endian macros
41542	     #endif
41543
41544  ;
41545  return 0;
41546}
41547_ACEOF
41548if ac_fn_cxx_try_compile "$LINENO"; then :
41549  # It does; now see whether it defined to _BIG_ENDIAN or not.
41550	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41551/* end confdefs.h.  */
41552#include <limits.h>
41553
41554int
41555main ()
41556{
41557#ifndef _BIG_ENDIAN
41558		 not big endian
41559		#endif
41560
41561  ;
41562  return 0;
41563}
41564_ACEOF
41565if ac_fn_cxx_try_compile "$LINENO"; then :
41566  ac_cv_c_bigendian=yes
41567else
41568  ac_cv_c_bigendian=no
41569fi
41570rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41571fi
41572rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41573    fi
41574    if test $ac_cv_c_bigendian = unknown; then
41575      # Compile a test program.
41576      if test "$cross_compiling" = yes; then :
41577  # Try to guess by grepping values from an object file.
41578	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41579/* end confdefs.h.  */
41580short int ascii_mm[] =
41581		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
41582		short int ascii_ii[] =
41583		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
41584		int use_ascii (int i) {
41585		  return ascii_mm[i] + ascii_ii[i];
41586		}
41587		short int ebcdic_ii[] =
41588		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
41589		short int ebcdic_mm[] =
41590		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
41591		int use_ebcdic (int i) {
41592		  return ebcdic_mm[i] + ebcdic_ii[i];
41593		}
41594		extern int foo;
41595
41596int
41597main ()
41598{
41599return use_ascii (foo) == use_ebcdic (foo);
41600  ;
41601  return 0;
41602}
41603_ACEOF
41604if ac_fn_cxx_try_compile "$LINENO"; then :
41605  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
41606	      ac_cv_c_bigendian=yes
41607	    fi
41608	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
41609	      if test "$ac_cv_c_bigendian" = unknown; then
41610		ac_cv_c_bigendian=no
41611	      else
41612		# finding both strings is unlikely to happen, but who knows?
41613		ac_cv_c_bigendian=unknown
41614	      fi
41615	    fi
41616fi
41617rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41618else
41619  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41620/* end confdefs.h.  */
41621$ac_includes_default
41622int
41623main ()
41624{
41625
41626	     /* Are we little or big endian?  From Harbison&Steele.  */
41627	     union
41628	     {
41629	       long int l;
41630	       char c[sizeof (long int)];
41631	     } u;
41632	     u.l = 1;
41633	     return u.c[sizeof (long int) - 1] == 1;
41634
41635  ;
41636  return 0;
41637}
41638_ACEOF
41639if ac_fn_cxx_try_run "$LINENO"; then :
41640  ac_cv_c_bigendian=no
41641else
41642  ac_cv_c_bigendian=yes
41643fi
41644rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41645  conftest.$ac_objext conftest.beam conftest.$ac_ext
41646fi
41647
41648    fi
41649fi
41650{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
41651$as_echo "$ac_cv_c_bigendian" >&6; }
41652 case $ac_cv_c_bigendian in #(
41653   yes)
41654     ENDIAN="big";; #(
41655   no)
41656     ENDIAN="little" ;; #(
41657   universal)
41658     ENDIAN="universal_endianness"
41659     ;; #(
41660   *)
41661     ENDIAN="unknown" ;;
41662 esac
41663
41664
41665  if test "x$ENDIAN" = xuniversal_endianness; then
41666    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
41667  fi
41668  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
41669    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
41670  fi
41671
41672
41673# Configure flags for the tools
41674
41675  ###############################################################################
41676  #
41677  # How to compile shared libraries.
41678  #
41679
41680  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41681    PICFLAG="-fPIC"
41682    C_FLAG_REORDER=''
41683    CXX_FLAG_REORDER=''
41684
41685    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41686      # Linking is different on MacOSX
41687      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
41688      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
41689      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
41690      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
41691      SET_SHARED_LIBRARY_MAPFILE=''
41692    else
41693      # Default works for linux, might work on other platforms as well.
41694      SHARED_LIBRARY_FLAGS='-shared'
41695      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
41696      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
41697      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
41698      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
41699    fi
41700  elif test "x$TOOLCHAIN_TYPE" = xclang; then
41701    PICFLAG=''
41702    C_FLAG_REORDER=''
41703    CXX_FLAG_REORDER=''
41704
41705    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41706      # Linking is different on MacOSX
41707      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
41708      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
41709      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
41710      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
41711      SET_SHARED_LIBRARY_MAPFILE=''
41712    else
41713      # Default works for linux, might work on other platforms as well.
41714      SHARED_LIBRARY_FLAGS='-shared'
41715      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
41716      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
41717      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
41718      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
41719    fi
41720  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41721    PICFLAG="-KPIC"
41722    C_FLAG_REORDER='-xF'
41723    CXX_FLAG_REORDER='-xF'
41724    SHARED_LIBRARY_FLAGS="-G"
41725    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
41726    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
41727    SET_SHARED_LIBRARY_NAME=''
41728    SET_SHARED_LIBRARY_MAPFILE='-M$1'
41729  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41730    PICFLAG="-qpic=large"
41731    C_FLAG_REORDER=''
41732    CXX_FLAG_REORDER=''
41733    SHARED_LIBRARY_FLAGS="-qmkshrobj"
41734    SET_EXECUTABLE_ORIGIN=""
41735    SET_SHARED_LIBRARY_ORIGIN=''
41736    SET_SHARED_LIBRARY_NAME=''
41737    SET_SHARED_LIBRARY_MAPFILE=''
41738  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41739    PICFLAG=""
41740    C_FLAG_REORDER=''
41741    CXX_FLAG_REORDER=''
41742    SHARED_LIBRARY_FLAGS="-LD"
41743    SET_EXECUTABLE_ORIGIN=''
41744    SET_SHARED_LIBRARY_ORIGIN=''
41745    SET_SHARED_LIBRARY_NAME=''
41746    SET_SHARED_LIBRARY_MAPFILE=''
41747  fi
41748
41749
41750
41751
41752
41753
41754
41755
41756  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41757    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
41758    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
41759    CFLAGS_JDKLIB_EXTRA='-xstrconst'
41760  fi
41761  # The (cross) compiler is now configured, we can now test capabilities
41762  # of the target platform.
41763
41764
41765
41766  ###############################################################################
41767  #
41768  # Setup the opt flags for different compilers
41769  # and different operating systems.
41770  #
41771
41772  # FIXME: this was indirectly the old default, but just inherited.
41773  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41774  #   C_FLAG_DEPS="-MMD -MF"
41775  # fi
41776
41777  # Generate make dependency files
41778  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41779    C_FLAG_DEPS="-MMD -MF"
41780  elif test "x$TOOLCHAIN_TYPE" = xclang; then
41781    C_FLAG_DEPS="-MMD -MF"
41782  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41783    C_FLAG_DEPS="-xMMD -xMF"
41784  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41785    C_FLAG_DEPS="-qmakedep=gcc -MF"
41786  fi
41787  CXX_FLAG_DEPS="$C_FLAG_DEPS"
41788
41789
41790
41791  # Debug symbols
41792  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41793    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
41794      # reduce from default "-g2" option to save space
41795      CFLAGS_DEBUG_SYMBOLS="-g1"
41796      CXXFLAGS_DEBUG_SYMBOLS="-g1"
41797    else
41798      CFLAGS_DEBUG_SYMBOLS="-g"
41799      CXXFLAGS_DEBUG_SYMBOLS="-g"
41800    fi
41801  elif test "x$TOOLCHAIN_TYPE" = xclang; then
41802    CFLAGS_DEBUG_SYMBOLS="-g"
41803    CXXFLAGS_DEBUG_SYMBOLS="-g"
41804  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41805    CFLAGS_DEBUG_SYMBOLS="-g -xs"
41806    # FIXME: likely a bug, this disables debug symbols rather than enables them
41807    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
41808  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41809    CFLAGS_DEBUG_SYMBOLS="-g"
41810    CXXFLAGS_DEBUG_SYMBOLS="-g"
41811  fi
41812
41813
41814
41815  # bounds, memory and behavior checking options
41816  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41817    case $DEBUG_LEVEL in
41818    release )
41819      # no adjustment
41820      ;;
41821    fastdebug )
41822      # no adjustment
41823      ;;
41824    slowdebug )
41825      # Add runtime stack smashing and undefined behavior checks.
41826      # Not all versions of gcc support -fstack-protector
41827      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
41828
41829  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$STACK_PROTECTOR_CFLAG\"" >&5
41830$as_echo_n "checking if compiler supports \"$STACK_PROTECTOR_CFLAG\"... " >&6; }
41831  supports=yes
41832
41833  saved_cflags="$CFLAGS"
41834  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG"
41835  ac_ext=c
41836ac_cpp='$CPP $CPPFLAGS'
41837ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41838ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41839ac_compiler_gnu=$ac_cv_c_compiler_gnu
41840
41841  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41842/* end confdefs.h.  */
41843int i;
41844_ACEOF
41845if ac_fn_c_try_compile "$LINENO"; then :
41846
41847else
41848  supports=no
41849fi
41850rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41851  ac_ext=cpp
41852ac_cpp='$CXXCPP $CPPFLAGS'
41853ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41854ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41855ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41856
41857  CFLAGS="$saved_cflags"
41858
41859  saved_cxxflags="$CXXFLAGS"
41860  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG"
41861  ac_ext=cpp
41862ac_cpp='$CXXCPP $CPPFLAGS'
41863ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41864ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41865ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41866
41867  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41868/* end confdefs.h.  */
41869int i;
41870_ACEOF
41871if ac_fn_cxx_try_compile "$LINENO"; then :
41872
41873else
41874  supports=no
41875fi
41876rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41877  ac_ext=cpp
41878ac_cpp='$CXXCPP $CPPFLAGS'
41879ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41880ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41881ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41882
41883  CXXFLAGS="$saved_cxxflags"
41884
41885  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41886$as_echo "$supports" >&6; }
41887  if test "x$supports" = "xyes" ; then
41888    :
41889  else
41890    STACK_PROTECTOR_CFLAG=""
41891  fi
41892
41893
41894      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
41895      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
41896      ;;
41897    esac
41898  fi
41899
41900  # Optimization levels
41901  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41902    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
41903
41904    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
41905      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
41906      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
41907      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
41908      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
41909      C_O_FLAG_DEBUG="-xregs=no%frameptr"
41910      C_O_FLAG_NONE="-xregs=no%frameptr"
41911      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
41912      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
41913      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
41914      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
41915      CXX_O_FLAG_NONE="-xregs=no%frameptr"
41916      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
41917        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
41918        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
41919      fi
41920    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
41921      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
41922      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
41923      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
41924      C_O_FLAG_DEBUG=""
41925      C_O_FLAG_NONE=""
41926      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
41927      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
41928      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
41929      C_O_FLAG_DEBUG=""
41930      CXX_O_FLAG_NONE=""
41931    fi
41932  else
41933    # The remaining toolchains share opt flags between CC and CXX;
41934    # setup for C and duplicate afterwards.
41935    if test "x$TOOLCHAIN_TYPE" = xgcc; then
41936      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41937        # On MacOSX we optimize for size, something
41938        # we should do for all platforms?
41939        C_O_FLAG_HIGHEST="-Os"
41940        C_O_FLAG_HI="-Os"
41941        C_O_FLAG_NORM="-Os"
41942      else
41943        C_O_FLAG_HIGHEST="-O3"
41944        C_O_FLAG_HI="-O3"
41945        C_O_FLAG_NORM="-O2"
41946      fi
41947      C_O_FLAG_DEBUG="-O0"
41948      C_O_FLAG_NONE="-O0"
41949    elif test "x$TOOLCHAIN_TYPE" = xclang; then
41950      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41951        # On MacOSX we optimize for size, something
41952        # we should do for all platforms?
41953        C_O_FLAG_HIGHEST="-Os"
41954        C_O_FLAG_HI="-Os"
41955        C_O_FLAG_NORM="-Os"
41956      else
41957        C_O_FLAG_HIGHEST="-O3"
41958        C_O_FLAG_HI="-O3"
41959        C_O_FLAG_NORM="-O2"
41960      fi
41961      C_O_FLAG_DEBUG="-O0"
41962      C_O_FLAG_NONE="-O0"
41963    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41964      C_O_FLAG_HIGHEST="-O3"
41965      C_O_FLAG_HI="-O3 -qstrict"
41966      C_O_FLAG_NORM="-O2"
41967      C_O_FLAG_DEBUG="-qnoopt"
41968      C_O_FLAG_NONE="-qnoop"
41969    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41970      C_O_FLAG_HIGHEST="-O2"
41971      C_O_FLAG_HI="-O1"
41972      C_O_FLAG_NORM="-O1"
41973      C_O_FLAG_DEBUG="-Od"
41974      C_O_FLAG_NONE="-Od"
41975    fi
41976    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
41977    CXX_O_FLAG_HI="$C_O_FLAG_HI"
41978    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
41979    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
41980    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
41981  fi
41982
41983  # Adjust optimization flags according to debug level.
41984  case $DEBUG_LEVEL in
41985    release )
41986      # no adjustment
41987      ;;
41988    fastdebug )
41989      # Not quite so much optimization
41990      C_O_FLAG_HI="$C_O_FLAG_NORM"
41991      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
41992      ;;
41993    slowdebug )
41994      # Disable optimization
41995      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
41996      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
41997      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
41998      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
41999      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
42000      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
42001      ;;
42002  esac
42003
42004
42005
42006
42007
42008
42009
42010
42011
42012
42013
42014
42015
42016  # Special extras...
42017  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42018    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
42019      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
42020      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
42021    fi
42022    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
42023    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
42024  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42025    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
42026    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
42027  fi
42028
42029  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
42030    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
42031$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
42032  fi
42033
42034  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
42035    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
42036$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
42037  fi
42038
42039  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
42040    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
42041$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
42042  fi
42043
42044
42045# Check whether --with-extra-cflags was given.
42046if test "${with_extra_cflags+set}" = set; then :
42047  withval=$with_extra_cflags;
42048fi
42049
42050
42051
42052# Check whether --with-extra-cxxflags was given.
42053if test "${with_extra_cxxflags+set}" = set; then :
42054  withval=$with_extra_cxxflags;
42055fi
42056
42057
42058
42059# Check whether --with-extra-ldflags was given.
42060if test "${with_extra_ldflags+set}" = set; then :
42061  withval=$with_extra_ldflags;
42062fi
42063
42064
42065  CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
42066  CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
42067  LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
42068
42069  # Hotspot needs these set in their legacy form
42070  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $with_extra_cflags"
42071  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $with_extra_cxxflags"
42072  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $with_extra_ldflags"
42073
42074
42075
42076
42077
42078  ###############################################################################
42079  #
42080  # Now setup the CFLAGS and LDFLAGS for the JDK build.
42081  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
42082  #
42083
42084  # Setup compiler/platform specific flags into
42085  #    CFLAGS_JDK    - C Compiler flags
42086  #    CXXFLAGS_JDK  - C++ Compiler flags
42087  #    COMMON_CCXXFLAGS_JDK - common to C and C++
42088  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42089    if test "x$OPENJDK_TARGET_CPU" = xx86; then
42090      # Force compatibility with i586 on 32 bit intel platforms.
42091      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
42092    fi
42093    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
42094        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
42095    case $OPENJDK_TARGET_CPU_ARCH in
42096      arm )
42097        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42098        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42099        ;;
42100      ppc )
42101        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42102        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42103        ;;
42104      * )
42105        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
42106        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42107        ;;
42108    esac
42109  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42110    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
42111    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
42112      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
42113    fi
42114
42115    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
42116    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
42117  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42118    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42119    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42120  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42121    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
42122        -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
42123        -DWIN32_LEAN_AND_MEAN \
42124        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
42125        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
42126        -DWIN32 -DIAL"
42127    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
42128      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
42129    else
42130      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
42131    fi
42132    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
42133    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
42134    # studio.
42135    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
42136      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
42137          -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
42138    fi
42139  fi
42140
42141  ###############################################################################
42142
42143  # Adjust flags according to debug level.
42144  case $DEBUG_LEVEL in
42145    fastdebug | slowdebug )
42146      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
42147      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
42148      JAVAC_FLAGS="$JAVAC_FLAGS -g"
42149      ;;
42150    release )
42151      ;;
42152    * )
42153      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42154      ;;
42155  esac
42156
42157  # Setup LP64
42158  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $ADD_LP64"
42159
42160  # Set some common defines. These works for all compilers, but assume
42161  # -D is universally accepted.
42162
42163  # Setup endianness
42164  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
42165    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
42166    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
42167    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
42168    #   Note: -Dmacro         is the same as    #define macro 1
42169    #         -Dmacro=        is the same as    #define macro
42170    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42171      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
42172    else
42173      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
42174    fi
42175  else
42176    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
42177    # are defined in the system?
42178    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42179      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
42180    else
42181      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
42182    fi
42183  fi
42184
42185  # Setup target OS define. Use OS target name but in upper case.
42186  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
42187  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
42188
42189  # Setup target CPU
42190  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
42191
42192  # Setup debug/release defines
42193  if test "x$DEBUG_LEVEL" = xrelease; then
42194    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
42195    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42196      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
42197    fi
42198  else
42199    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
42200  fi
42201
42202  # Setup release name
42203  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
42204
42205
42206  # Set some additional per-OS defines.
42207  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42208    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
42209  elif test "x$OPENJDK_TARGET_OS" = xaix; then
42210    # FIXME: PPC64 should not be here.
42211    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DPPC64"
42212  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
42213    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
42214  fi
42215
42216  # Additional macosx handling
42217  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42218    # Setting these parameters makes it an error to link to macosx APIs that are
42219    # newer than the given OS version and makes the linked binaries compatible
42220    # even if built on a newer version of the OS.
42221    # The expected format is X.Y.Z
42222    MACOSX_VERSION_MIN=10.7.0
42223
42224
42225    # The macro takes the version with no dots, ex: 1070
42226    # Let the flags variables get resolved in make for easier override on make
42227    # command line.
42228    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42229    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42230  fi
42231
42232  # Setup some hard coded includes
42233  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
42234      -I${JDK_TOPDIR}/src/java.base/share/native/include \
42235      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
42236      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include"
42237
42238  # The shared libraries are compiled using the picflag.
42239  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
42240  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
42241
42242  # Executable flags
42243  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
42244  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
42245
42246
42247
42248
42249
42250
42251  # Flags for compiling test libraries
42252  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
42253  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
42254
42255  # Flags for compiling test executables
42256  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
42257  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
42258
42259
42260
42261
42262
42263
42264  # Setup LDFLAGS et al.
42265  #
42266
42267  # Now this is odd. The JDK native libraries have to link against libjvm.so
42268  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
42269  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
42270  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
42271  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
42272  # libraries will link to whatever is in memory. Yuck.
42273  #
42274  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
42275  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42276    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
42277    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
42278      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
42279    fi
42280    # TODO: make -debug optional "--disable-full-debug-symbols"
42281    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
42282  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
42283    # If this is a --hash-style=gnu system, use --hash-style=both, why?
42284    # We have previously set HAS_GNU_HASH if this is the case
42285    if test -n "$HAS_GNU_HASH"; then
42286      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both"
42287    fi
42288    if test "x$OPENJDK_TARGET_OS" = xlinux; then
42289      # And since we now know that the linker is gnu, then add -z defs, to forbid
42290      # undefined symbols in object files.
42291      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
42292      case $DEBUG_LEVEL in
42293        release )
42294          # tell linker to optimize libraries.
42295          # Should this be supplied to the OSS linker as well?
42296          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
42297          ;;
42298        slowdebug )
42299          if test "x$HAS_LINKER_NOW" = "xtrue"; then
42300            # do relocations at load
42301            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
42302            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
42303          fi
42304          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42305            # mark relocations read only
42306            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42307            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42308          fi
42309          ;;
42310        fastdebug )
42311          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42312            # mark relocations read only
42313            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42314            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42315          fi
42316          ;;
42317        * )
42318          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42319          ;;
42320        esac
42321    fi
42322  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42323    LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
42324    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
42325  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42326    LDFLAGS_JDK="${LDFLAGS_JDK} -brtl -bnolibpath -liconv -bexpall -bernotok"
42327  fi
42328
42329  # Customize LDFLAGS for executables
42330
42331  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
42332
42333  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42334    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
42335      LDFLAGS_STACK_SIZE=1048576
42336    else
42337      LDFLAGS_STACK_SIZE=327680
42338    fi
42339    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
42340  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
42341    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
42342  fi
42343
42344  # Customize LDFLAGS for libs
42345  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
42346
42347  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42348    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -dll -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
42349    LDFLAGS_JDKLIB_SUFFIX=""
42350  else
42351    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB}  ${SHARED_LIBRARY_FLAGS} \
42352        -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}"
42353
42354    # On some platforms (mac) the linker warns about non existing -L dirs.
42355    # Add server first if available. Linking aginst client does not always produce the same results.
42356    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
42357    # Default to server for other variants.
42358    if test "x$JVM_VARIANT_SERVER" = xtrue; then
42359      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
42360    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
42361      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/client"
42362    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
42363      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
42364    else
42365      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
42366    fi
42367
42368    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
42369    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42370      LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
42371    fi
42372  fi
42373
42374
42375
42376
42377
42378
42379
42380  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
42381  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE"
42382  LDFLAGS_TESTLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX"
42383  LDFLAGS_TESTEXE_SUFFIX="$LDFLAGS_JDKEXE_SUFFIX"
42384
42385
42386
42387
42388
42389
42390
42391  # Some Zero and Shark settings.
42392  # ZERO_ARCHFLAG tells the compiler which mode to build for
42393  case "${OPENJDK_TARGET_CPU}" in
42394    s390)
42395      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
42396      ;;
42397    *)
42398      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42399  esac
42400
42401  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
42402$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
42403  supports=yes
42404
42405  saved_cflags="$CFLAGS"
42406  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
42407  ac_ext=c
42408ac_cpp='$CPP $CPPFLAGS'
42409ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42410ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42411ac_compiler_gnu=$ac_cv_c_compiler_gnu
42412
42413  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42414/* end confdefs.h.  */
42415int i;
42416_ACEOF
42417if ac_fn_c_try_compile "$LINENO"; then :
42418
42419else
42420  supports=no
42421fi
42422rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42423  ac_ext=cpp
42424ac_cpp='$CXXCPP $CPPFLAGS'
42425ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42426ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42427ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42428
42429  CFLAGS="$saved_cflags"
42430
42431  saved_cxxflags="$CXXFLAGS"
42432  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
42433  ac_ext=cpp
42434ac_cpp='$CXXCPP $CPPFLAGS'
42435ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42436ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42437ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42438
42439  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42440/* end confdefs.h.  */
42441int i;
42442_ACEOF
42443if ac_fn_cxx_try_compile "$LINENO"; then :
42444
42445else
42446  supports=no
42447fi
42448rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42449  ac_ext=cpp
42450ac_cpp='$CXXCPP $CPPFLAGS'
42451ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42452ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42453ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42454
42455  CXXFLAGS="$saved_cxxflags"
42456
42457  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42458$as_echo "$supports" >&6; }
42459  if test "x$supports" = "xyes" ; then
42460    :
42461  else
42462    ZERO_ARCHFLAG=""
42463  fi
42464
42465
42466
42467  # Check that the compiler supports -mX (or -qX on AIX) flags
42468  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
42469
42470  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
42471$as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
42472  supports=yes
42473
42474  saved_cflags="$CFLAGS"
42475  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42476  ac_ext=c
42477ac_cpp='$CPP $CPPFLAGS'
42478ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42479ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42480ac_compiler_gnu=$ac_cv_c_compiler_gnu
42481
42482  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42483/* end confdefs.h.  */
42484int i;
42485_ACEOF
42486if ac_fn_c_try_compile "$LINENO"; then :
42487
42488else
42489  supports=no
42490fi
42491rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42492  ac_ext=cpp
42493ac_cpp='$CXXCPP $CPPFLAGS'
42494ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42495ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42496ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42497
42498  CFLAGS="$saved_cflags"
42499
42500  saved_cxxflags="$CXXFLAGS"
42501  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42502  ac_ext=cpp
42503ac_cpp='$CXXCPP $CPPFLAGS'
42504ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42505ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42506ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42507
42508  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42509/* end confdefs.h.  */
42510int i;
42511_ACEOF
42512if ac_fn_cxx_try_compile "$LINENO"; then :
42513
42514else
42515  supports=no
42516fi
42517rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42518  ac_ext=cpp
42519ac_cpp='$CXXCPP $CPPFLAGS'
42520ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42521ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42522ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42523
42524  CXXFLAGS="$saved_cxxflags"
42525
42526  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42527$as_echo "$supports" >&6; }
42528  if test "x$supports" = "xyes" ; then
42529    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
42530  else
42531    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
42532  fi
42533
42534
42535
42536  # Check whether --enable-warnings-as-errors was given.
42537if test "${enable_warnings_as_errors+set}" = set; then :
42538  enableval=$enable_warnings_as_errors;
42539fi
42540
42541
42542  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
42543$as_echo_n "checking if native warnings are errors... " >&6; }
42544  if test "x$enable_warnings_as_errors" = "xyes"; then
42545    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitely set)" >&5
42546$as_echo "yes (explicitely set)" >&6; }
42547    WARNINGS_AS_ERRORS=true
42548  elif test "x$enable_warnings_as_errors" = "xno"; then
42549    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42550$as_echo "no" >&6; }
42551    WARNINGS_AS_ERRORS=false
42552  elif test "x$enable_warnings_as_errors" = "x"; then
42553    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
42554$as_echo "yes (default)" >&6; }
42555    WARNINGS_AS_ERRORS=true
42556  else
42557    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
42558  fi
42559
42560
42561  case "${TOOLCHAIN_TYPE}" in
42562    microsoft)
42563      DISABLE_WARNING_PREFIX="-wd"
42564      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
42565      ;;
42566    solstudio)
42567      DISABLE_WARNING_PREFIX="-erroff="
42568      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
42569      ;;
42570    gcc)
42571      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
42572
42573  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
42574$as_echo_n "checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
42575  supports=yes
42576
42577  saved_cflags="$CFLAGS"
42578  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
42579  ac_ext=c
42580ac_cpp='$CPP $CPPFLAGS'
42581ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42582ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42583ac_compiler_gnu=$ac_cv_c_compiler_gnu
42584
42585  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42586/* end confdefs.h.  */
42587int i;
42588_ACEOF
42589if ac_fn_c_try_compile "$LINENO"; then :
42590
42591else
42592  supports=no
42593fi
42594rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42595  ac_ext=cpp
42596ac_cpp='$CXXCPP $CPPFLAGS'
42597ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42598ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42599ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42600
42601  CFLAGS="$saved_cflags"
42602
42603  saved_cxxflags="$CXXFLAGS"
42604  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
42605  ac_ext=cpp
42606ac_cpp='$CXXCPP $CPPFLAGS'
42607ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42608ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42609ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42610
42611  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42612/* end confdefs.h.  */
42613int i;
42614_ACEOF
42615if ac_fn_cxx_try_compile "$LINENO"; then :
42616
42617else
42618  supports=no
42619fi
42620rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42621  ac_ext=cpp
42622ac_cpp='$CXXCPP $CPPFLAGS'
42623ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42624ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42625ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42626
42627  CXXFLAGS="$saved_cxxflags"
42628
42629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42630$as_echo "$supports" >&6; }
42631  if test "x$supports" = "xyes" ; then
42632    GCC_CAN_DISABLE_WARNINGS=true
42633  else
42634    GCC_CAN_DISABLE_WARNINGS=false
42635
42636  fi
42637
42638      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
42639        DISABLE_WARNING_PREFIX="-Wno-"
42640      else
42641        DISABLE_WARNING_PREFIX=
42642      fi
42643      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
42644      ;;
42645    clang)
42646      DISABLE_WARNING_PREFIX="-Wno-"
42647      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
42648      ;;
42649  esac
42650
42651
42652
42653
42654# Setup debug symbols (need objcopy from the toolchain for that)
42655
42656  #
42657  # ENABLE_DEBUG_SYMBOLS
42658  # This must be done after the toolchain is setup, since we're looking at objcopy.
42659  #
42660  # Check whether --enable-debug-symbols was given.
42661if test "${enable_debug_symbols+set}" = set; then :
42662  enableval=$enable_debug_symbols;
42663fi
42664
42665
42666  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
42667$as_echo_n "checking if we should generate debug symbols... " >&6; }
42668
42669  if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
42670    # explicit enabling of enable-debug-symbols and can't find objcopy
42671    #   this is an error
42672    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
42673  fi
42674
42675  if test "x$enable_debug_symbols" = "xyes"; then
42676    ENABLE_DEBUG_SYMBOLS=true
42677  elif test "x$enable_debug_symbols" = "xno"; then
42678    ENABLE_DEBUG_SYMBOLS=false
42679  else
42680    # Default is on if objcopy is found
42681    if test "x$OBJCOPY" != x; then
42682      ENABLE_DEBUG_SYMBOLS=true
42683    # MacOS X and Windows don't use objcopy but default is on for those OSes
42684    elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
42685      ENABLE_DEBUG_SYMBOLS=true
42686    else
42687      ENABLE_DEBUG_SYMBOLS=false
42688    fi
42689  fi
42690
42691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
42692$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
42693
42694  #
42695  # ZIP_DEBUGINFO_FILES
42696  #
42697  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
42698$as_echo_n "checking if we should zip debug-info files... " >&6; }
42699  # Check whether --enable-zip-debug-info was given.
42700if test "${enable_zip_debug_info+set}" = set; then :
42701  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
42702else
42703  enable_zip_debug_info="yes"
42704fi
42705
42706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
42707$as_echo "${enable_zip_debug_info}" >&6; }
42708
42709  if test "x${enable_zip_debug_info}" = "xno"; then
42710    ZIP_DEBUGINFO_FILES=false
42711  else
42712    ZIP_DEBUGINFO_FILES=true
42713  fi
42714
42715
42716
42717
42718
42719  # Check whether --enable-native-coverage was given.
42720if test "${enable_native_coverage+set}" = set; then :
42721  enableval=$enable_native_coverage;
42722fi
42723
42724  GCOV_ENABLED="false"
42725  if test "x$enable_native_coverage" = "xyes"; then
42726    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
42727      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
42728$as_echo_n "checking if native coverage is enabled... " >&6; }
42729      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42730$as_echo "yes" >&6; }
42731      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
42732      GCOV_LDFLAGS="-fprofile-arcs"
42733      LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
42734      LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
42735      LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
42736      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
42737      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
42738      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
42739      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
42740      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
42741      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
42742      GCOV_ENABLED="true"
42743    else
42744      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
42745    fi
42746  elif test "x$enable_native_coverage" = "xno"; then
42747    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
42748$as_echo_n "checking if native coverage is enabled... " >&6; }
42749    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42750$as_echo "no" >&6; }
42751  elif test "x$enable_native_coverage" != "x"; then
42752    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
42753  fi
42754
42755
42756
42757
42758###############################################################################
42759#
42760# Check dependencies for external and internal libraries.
42761#
42762###############################################################################
42763
42764# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
42765
42766  # When using cygwin or msys, we need a wrapper binary that renames
42767  # /cygdrive/c/ arguments into c:/ arguments and peeks into
42768  # @files and rewrites these too! This wrapper binary is
42769  # called fixpath.
42770  FIXPATH=
42771  if test "x$OPENJDK_BUILD_OS" = xwindows; then
42772    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
42773$as_echo_n "checking if fixpath can be created... " >&6; }
42774    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
42775    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
42776    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
42777    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
42778      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
42779      FIXPATH="$FIXPATH_BIN -c"
42780    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
42781      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
42782      # @ was chosen as separator to minimize risk of other tools messing around with it
42783      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
42784          | tr ' ' '\n' | grep '^/./' | sort | uniq`
42785      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
42786      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
42787    fi
42788    FIXPATH_SRC_W="$FIXPATH_SRC"
42789    FIXPATH_BIN_W="$FIXPATH_BIN"
42790
42791  unix_path="$FIXPATH_SRC_W"
42792  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42793    windows_path=`$CYGPATH -m "$unix_path"`
42794    FIXPATH_SRC_W="$windows_path"
42795  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42796    windows_path=`cmd //c echo $unix_path`
42797    FIXPATH_SRC_W="$windows_path"
42798  fi
42799
42800
42801  unix_path="$FIXPATH_BIN_W"
42802  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42803    windows_path=`$CYGPATH -m "$unix_path"`
42804    FIXPATH_BIN_W="$windows_path"
42805  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42806    windows_path=`cmd //c echo $unix_path`
42807    FIXPATH_BIN_W="$windows_path"
42808  fi
42809
42810    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
42811    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
42812    cd $FIXPATH_DIR
42813    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
42814    cd $CURDIR
42815
42816    if test ! -x $FIXPATH_BIN; then
42817      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42818$as_echo "no" >&6; }
42819      cat $FIXPATH_DIR/fixpath1.log
42820      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
42821    fi
42822    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42823$as_echo "yes" >&6; }
42824    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
42825$as_echo_n "checking if fixpath.exe works... " >&6; }
42826    cd $FIXPATH_DIR
42827    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
42828        > $FIXPATH_DIR/fixpath2.log 2>&1
42829    cd $CURDIR
42830    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
42831      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42832$as_echo "no" >&6; }
42833      cat $FIXPATH_DIR/fixpath2.log
42834      as_fn_error $? "fixpath did not work!" "$LINENO" 5
42835    fi
42836    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42837$as_echo "yes" >&6; }
42838  fi
42839
42840
42841
42842
42843
42844
42845  ###############################################################################
42846  #
42847  # OS specific settings that we never will need to probe.
42848  #
42849  if test "x$OPENJDK_TARGET_OS" = xlinux; then
42850    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
42851$as_echo_n "checking what is not needed on Linux?... " >&6; }
42852    PULSE_NOT_NEEDED=yes
42853    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
42854$as_echo "pulse" >&6; }
42855  fi
42856
42857  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42858    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
42859$as_echo_n "checking what is not needed on Solaris?... " >&6; }
42860    ALSA_NOT_NEEDED=yes
42861    PULSE_NOT_NEEDED=yes
42862    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
42863$as_echo "alsa pulse" >&6; }
42864  fi
42865
42866  if test "x$OPENJDK_TARGET_OS" = xaix; then
42867    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on AIX?" >&5
42868$as_echo_n "checking what is not needed on AIX?... " >&6; }
42869    ALSA_NOT_NEEDED=yes
42870    PULSE_NOT_NEEDED=yes
42871    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
42872$as_echo "alsa pulse" >&6; }
42873  fi
42874
42875
42876  if test "x$OPENJDK_TARGET_OS" = xwindows; then
42877    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
42878$as_echo_n "checking what is not needed on Windows?... " >&6; }
42879    CUPS_NOT_NEEDED=yes
42880    ALSA_NOT_NEEDED=yes
42881    PULSE_NOT_NEEDED=yes
42882    X11_NOT_NEEDED=yes
42883    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
42884$as_echo "alsa cups pulse x11" >&6; }
42885  fi
42886
42887  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42888    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
42889$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
42890    ALSA_NOT_NEEDED=yes
42891    PULSE_NOT_NEEDED=yes
42892    X11_NOT_NEEDED=yes
42893    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
42894$as_echo "alsa pulse x11" >&6; }
42895  fi
42896
42897  if test "x$OPENJDK_TARGET_OS" = xbsd; then
42898    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
42899$as_echo_n "checking what is not needed on bsd?... " >&6; }
42900    ALSA_NOT_NEEDED=yes
42901    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
42902$as_echo "alsa" >&6; }
42903  fi
42904
42905  if test "x$OPENJDK" = "xfalse"; then
42906    FREETYPE_NOT_NEEDED=yes
42907  fi
42908
42909  if test "x$SUPPORT_HEADFUL" = xno; then
42910    X11_NOT_NEEDED=yes
42911  fi
42912
42913
42914
42915  ###############################################################################
42916  #
42917  # Check for X Windows
42918  #
42919
42920  if test "x$X11_NOT_NEEDED" = xyes; then
42921    if test "x${with_x}" != x; then
42922      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
42923$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
42924    fi
42925    X_CFLAGS=
42926    X_LIBS=
42927  else
42928    # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
42929    # Make a simple check for the libraries at the sysroot, and setup --x-includes and
42930    # --x-libraries for the sysroot, if that seems to be correct.
42931    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
42932      if test "x$SYSROOT" != "x"; then
42933        if test "x$x_includes" = xNONE; then
42934          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
42935            x_includes="$SYSROOT/usr/X11R6/include"
42936          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
42937            x_includes="$SYSROOT/usr/include"
42938          fi
42939        fi
42940        if test "x$x_libraries" = xNONE; then
42941          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
42942            x_libraries="$SYSROOT/usr/X11R6/lib"
42943          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
42944            x_libraries="$SYSROOT/usr/lib64"
42945          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
42946            x_libraries="$SYSROOT/usr/lib"
42947          fi
42948        fi
42949      fi
42950    fi
42951
42952    # Now let autoconf do it's magic
42953    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
42954$as_echo_n "checking for X... " >&6; }
42955
42956
42957# Check whether --with-x was given.
42958if test "${with_x+set}" = set; then :
42959  withval=$with_x;
42960fi
42961
42962# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
42963if test "x$with_x" = xno; then
42964  # The user explicitly disabled X.
42965  have_x=disabled
42966else
42967  case $x_includes,$x_libraries in #(
42968    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
42969    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
42970  $as_echo_n "(cached) " >&6
42971else
42972  # One or both of the vars are not set, and there is no cached value.
42973ac_x_includes=no ac_x_libraries=no
42974rm -f -r conftest.dir
42975if mkdir conftest.dir; then
42976  cd conftest.dir
42977  cat >Imakefile <<'_ACEOF'
42978incroot:
42979	@echo incroot='${INCROOT}'
42980usrlibdir:
42981	@echo usrlibdir='${USRLIBDIR}'
42982libdir:
42983	@echo libdir='${LIBDIR}'
42984_ACEOF
42985  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
42986    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
42987    for ac_var in incroot usrlibdir libdir; do
42988      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
42989    done
42990    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
42991    for ac_extension in a so sl dylib la dll; do
42992      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
42993	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
42994	ac_im_usrlibdir=$ac_im_libdir; break
42995      fi
42996    done
42997    # Screen out bogus values from the imake configuration.  They are
42998    # bogus both because they are the default anyway, and because
42999    # using them would break gcc on systems where it needs fixed includes.
43000    case $ac_im_incroot in
43001	/usr/include) ac_x_includes= ;;
43002	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
43003    esac
43004    case $ac_im_usrlibdir in
43005	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
43006	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
43007    esac
43008  fi
43009  cd ..
43010  rm -f -r conftest.dir
43011fi
43012
43013# Standard set of common directories for X headers.
43014# Check X11 before X11Rn because it is often a symlink to the current release.
43015ac_x_header_dirs='
43016/usr/X11/include
43017/usr/X11R7/include
43018/usr/X11R6/include
43019/usr/X11R5/include
43020/usr/X11R4/include
43021
43022/usr/include/X11
43023/usr/include/X11R7
43024/usr/include/X11R6
43025/usr/include/X11R5
43026/usr/include/X11R4
43027
43028/usr/local/X11/include
43029/usr/local/X11R7/include
43030/usr/local/X11R6/include
43031/usr/local/X11R5/include
43032/usr/local/X11R4/include
43033
43034/usr/local/include/X11
43035/usr/local/include/X11R7
43036/usr/local/include/X11R6
43037/usr/local/include/X11R5
43038/usr/local/include/X11R4
43039
43040/usr/X386/include
43041/usr/x386/include
43042/usr/XFree86/include/X11
43043
43044/usr/include
43045/usr/local/include
43046/usr/unsupported/include
43047/usr/athena/include
43048/usr/local/x11r5/include
43049/usr/lpp/Xamples/include
43050
43051/usr/openwin/include
43052/usr/openwin/share/include'
43053
43054if test "$ac_x_includes" = no; then
43055  # Guess where to find include files, by looking for Xlib.h.
43056  # First, try using that file with no special directory specified.
43057  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43058/* end confdefs.h.  */
43059#include <X11/Xlib.h>
43060_ACEOF
43061if ac_fn_cxx_try_cpp "$LINENO"; then :
43062  # We can compile using X headers with no special include directory.
43063ac_x_includes=
43064else
43065  for ac_dir in $ac_x_header_dirs; do
43066  if test -r "$ac_dir/X11/Xlib.h"; then
43067    ac_x_includes=$ac_dir
43068    break
43069  fi
43070done
43071fi
43072rm -f conftest.err conftest.i conftest.$ac_ext
43073fi # $ac_x_includes = no
43074
43075if test "$ac_x_libraries" = no; then
43076  # Check for the libraries.
43077  # See if we find them without any special options.
43078  # Don't add to $LIBS permanently.
43079  ac_save_LIBS=$LIBS
43080  LIBS="-lX11 $LIBS"
43081  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43082/* end confdefs.h.  */
43083#include <X11/Xlib.h>
43084int
43085main ()
43086{
43087XrmInitialize ()
43088  ;
43089  return 0;
43090}
43091_ACEOF
43092if ac_fn_cxx_try_link "$LINENO"; then :
43093  LIBS=$ac_save_LIBS
43094# We can link X programs with no special library path.
43095ac_x_libraries=
43096else
43097  LIBS=$ac_save_LIBS
43098for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
43099do
43100  # Don't even attempt the hair of trying to link an X program!
43101  for ac_extension in a so sl dylib la dll; do
43102    if test -r "$ac_dir/libX11.$ac_extension"; then
43103      ac_x_libraries=$ac_dir
43104      break 2
43105    fi
43106  done
43107done
43108fi
43109rm -f core conftest.err conftest.$ac_objext \
43110    conftest$ac_exeext conftest.$ac_ext
43111fi # $ac_x_libraries = no
43112
43113case $ac_x_includes,$ac_x_libraries in #(
43114  no,* | *,no | *\'*)
43115    # Didn't find X, or a directory has "'" in its name.
43116    ac_cv_have_x="have_x=no";; #(
43117  *)
43118    # Record where we found X for the cache.
43119    ac_cv_have_x="have_x=yes\
43120	ac_x_includes='$ac_x_includes'\
43121	ac_x_libraries='$ac_x_libraries'"
43122esac
43123fi
43124;; #(
43125    *) have_x=yes;;
43126  esac
43127  eval "$ac_cv_have_x"
43128fi # $with_x != no
43129
43130if test "$have_x" != yes; then
43131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
43132$as_echo "$have_x" >&6; }
43133  no_x=yes
43134else
43135  # If each of the values was on the command line, it overrides each guess.
43136  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
43137  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
43138  # Update the cache value to reflect the command line values.
43139  ac_cv_have_x="have_x=yes\
43140	ac_x_includes='$x_includes'\
43141	ac_x_libraries='$x_libraries'"
43142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
43143$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
43144fi
43145
43146    if test "$no_x" = yes; then
43147  # Not all programs may use this symbol, but it does not hurt to define it.
43148
43149$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
43150
43151  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
43152else
43153  if test -n "$x_includes"; then
43154    X_CFLAGS="$X_CFLAGS -I$x_includes"
43155  fi
43156
43157  # It would also be nice to do this for all -L options, not just this one.
43158  if test -n "$x_libraries"; then
43159    X_LIBS="$X_LIBS -L$x_libraries"
43160    # For Solaris; some versions of Sun CC require a space after -R and
43161    # others require no space.  Words are not sufficient . . . .
43162    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
43163$as_echo_n "checking whether -R must be followed by a space... " >&6; }
43164    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
43165    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
43166    ac_cxx_werror_flag=yes
43167    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43168/* end confdefs.h.  */
43169
43170int
43171main ()
43172{
43173
43174  ;
43175  return 0;
43176}
43177_ACEOF
43178if ac_fn_cxx_try_link "$LINENO"; then :
43179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43180$as_echo "no" >&6; }
43181       X_LIBS="$X_LIBS -R$x_libraries"
43182else
43183  LIBS="$ac_xsave_LIBS -R $x_libraries"
43184       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43185/* end confdefs.h.  */
43186
43187int
43188main ()
43189{
43190
43191  ;
43192  return 0;
43193}
43194_ACEOF
43195if ac_fn_cxx_try_link "$LINENO"; then :
43196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43197$as_echo "yes" >&6; }
43198	  X_LIBS="$X_LIBS -R $x_libraries"
43199else
43200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
43201$as_echo "neither works" >&6; }
43202fi
43203rm -f core conftest.err conftest.$ac_objext \
43204    conftest$ac_exeext conftest.$ac_ext
43205fi
43206rm -f core conftest.err conftest.$ac_objext \
43207    conftest$ac_exeext conftest.$ac_ext
43208    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
43209    LIBS=$ac_xsave_LIBS
43210  fi
43211
43212  # Check for system-dependent libraries X programs must link with.
43213  # Do this before checking for the system-independent R6 libraries
43214  # (-lICE), since we may need -lsocket or whatever for X linking.
43215
43216  if test "$ISC" = yes; then
43217    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
43218  else
43219    # Martyn Johnson says this is needed for Ultrix, if the X
43220    # libraries were built with DECnet support.  And Karl Berry says
43221    # the Alpha needs dnet_stub (dnet does not exist).
43222    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
43223    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43224/* end confdefs.h.  */
43225
43226/* Override any GCC internal prototype to avoid an error.
43227   Use char because int might match the return type of a GCC
43228   builtin and then its argument prototype would still apply.  */
43229#ifdef __cplusplus
43230extern "C"
43231#endif
43232char XOpenDisplay ();
43233int
43234main ()
43235{
43236return XOpenDisplay ();
43237  ;
43238  return 0;
43239}
43240_ACEOF
43241if ac_fn_cxx_try_link "$LINENO"; then :
43242
43243else
43244  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
43245$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
43246if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
43247  $as_echo_n "(cached) " >&6
43248else
43249  ac_check_lib_save_LIBS=$LIBS
43250LIBS="-ldnet  $LIBS"
43251cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43252/* end confdefs.h.  */
43253
43254/* Override any GCC internal prototype to avoid an error.
43255   Use char because int might match the return type of a GCC
43256   builtin and then its argument prototype would still apply.  */
43257#ifdef __cplusplus
43258extern "C"
43259#endif
43260char dnet_ntoa ();
43261int
43262main ()
43263{
43264return dnet_ntoa ();
43265  ;
43266  return 0;
43267}
43268_ACEOF
43269if ac_fn_cxx_try_link "$LINENO"; then :
43270  ac_cv_lib_dnet_dnet_ntoa=yes
43271else
43272  ac_cv_lib_dnet_dnet_ntoa=no
43273fi
43274rm -f core conftest.err conftest.$ac_objext \
43275    conftest$ac_exeext conftest.$ac_ext
43276LIBS=$ac_check_lib_save_LIBS
43277fi
43278{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
43279$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
43280if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
43281  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
43282fi
43283
43284    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
43285      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
43286$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
43287if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
43288  $as_echo_n "(cached) " >&6
43289else
43290  ac_check_lib_save_LIBS=$LIBS
43291LIBS="-ldnet_stub  $LIBS"
43292cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43293/* end confdefs.h.  */
43294
43295/* Override any GCC internal prototype to avoid an error.
43296   Use char because int might match the return type of a GCC
43297   builtin and then its argument prototype would still apply.  */
43298#ifdef __cplusplus
43299extern "C"
43300#endif
43301char dnet_ntoa ();
43302int
43303main ()
43304{
43305return dnet_ntoa ();
43306  ;
43307  return 0;
43308}
43309_ACEOF
43310if ac_fn_cxx_try_link "$LINENO"; then :
43311  ac_cv_lib_dnet_stub_dnet_ntoa=yes
43312else
43313  ac_cv_lib_dnet_stub_dnet_ntoa=no
43314fi
43315rm -f core conftest.err conftest.$ac_objext \
43316    conftest$ac_exeext conftest.$ac_ext
43317LIBS=$ac_check_lib_save_LIBS
43318fi
43319{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
43320$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
43321if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
43322  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
43323fi
43324
43325    fi
43326fi
43327rm -f core conftest.err conftest.$ac_objext \
43328    conftest$ac_exeext conftest.$ac_ext
43329    LIBS="$ac_xsave_LIBS"
43330
43331    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
43332    # to get the SysV transport functions.
43333    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
43334    # needs -lnsl.
43335    # The nsl library prevents programs from opening the X display
43336    # on Irix 5.2, according to T.E. Dickey.
43337    # The functions gethostbyname, getservbyname, and inet_addr are
43338    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
43339    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
43340if test "x$ac_cv_func_gethostbyname" = xyes; then :
43341
43342fi
43343
43344    if test $ac_cv_func_gethostbyname = no; then
43345      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
43346$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
43347if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
43348  $as_echo_n "(cached) " >&6
43349else
43350  ac_check_lib_save_LIBS=$LIBS
43351LIBS="-lnsl  $LIBS"
43352cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43353/* end confdefs.h.  */
43354
43355/* Override any GCC internal prototype to avoid an error.
43356   Use char because int might match the return type of a GCC
43357   builtin and then its argument prototype would still apply.  */
43358#ifdef __cplusplus
43359extern "C"
43360#endif
43361char gethostbyname ();
43362int
43363main ()
43364{
43365return gethostbyname ();
43366  ;
43367  return 0;
43368}
43369_ACEOF
43370if ac_fn_cxx_try_link "$LINENO"; then :
43371  ac_cv_lib_nsl_gethostbyname=yes
43372else
43373  ac_cv_lib_nsl_gethostbyname=no
43374fi
43375rm -f core conftest.err conftest.$ac_objext \
43376    conftest$ac_exeext conftest.$ac_ext
43377LIBS=$ac_check_lib_save_LIBS
43378fi
43379{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
43380$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
43381if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
43382  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
43383fi
43384
43385      if test $ac_cv_lib_nsl_gethostbyname = no; then
43386	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
43387$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
43388if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
43389  $as_echo_n "(cached) " >&6
43390else
43391  ac_check_lib_save_LIBS=$LIBS
43392LIBS="-lbsd  $LIBS"
43393cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43394/* end confdefs.h.  */
43395
43396/* Override any GCC internal prototype to avoid an error.
43397   Use char because int might match the return type of a GCC
43398   builtin and then its argument prototype would still apply.  */
43399#ifdef __cplusplus
43400extern "C"
43401#endif
43402char gethostbyname ();
43403int
43404main ()
43405{
43406return gethostbyname ();
43407  ;
43408  return 0;
43409}
43410_ACEOF
43411if ac_fn_cxx_try_link "$LINENO"; then :
43412  ac_cv_lib_bsd_gethostbyname=yes
43413else
43414  ac_cv_lib_bsd_gethostbyname=no
43415fi
43416rm -f core conftest.err conftest.$ac_objext \
43417    conftest$ac_exeext conftest.$ac_ext
43418LIBS=$ac_check_lib_save_LIBS
43419fi
43420{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
43421$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
43422if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
43423  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
43424fi
43425
43426      fi
43427    fi
43428
43429    # lieder@skyler.mavd.honeywell.com says without -lsocket,
43430    # socket/setsockopt and other routines are undefined under SCO ODT
43431    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
43432    # on later versions), says Simon Leinen: it contains gethostby*
43433    # variants that don't use the name server (or something).  -lsocket
43434    # must be given before -lnsl if both are needed.  We assume that
43435    # if connect needs -lnsl, so does gethostbyname.
43436    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
43437if test "x$ac_cv_func_connect" = xyes; then :
43438
43439fi
43440
43441    if test $ac_cv_func_connect = no; then
43442      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
43443$as_echo_n "checking for connect in -lsocket... " >&6; }
43444if ${ac_cv_lib_socket_connect+:} false; then :
43445  $as_echo_n "(cached) " >&6
43446else
43447  ac_check_lib_save_LIBS=$LIBS
43448LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
43449cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43450/* end confdefs.h.  */
43451
43452/* Override any GCC internal prototype to avoid an error.
43453   Use char because int might match the return type of a GCC
43454   builtin and then its argument prototype would still apply.  */
43455#ifdef __cplusplus
43456extern "C"
43457#endif
43458char connect ();
43459int
43460main ()
43461{
43462return connect ();
43463  ;
43464  return 0;
43465}
43466_ACEOF
43467if ac_fn_cxx_try_link "$LINENO"; then :
43468  ac_cv_lib_socket_connect=yes
43469else
43470  ac_cv_lib_socket_connect=no
43471fi
43472rm -f core conftest.err conftest.$ac_objext \
43473    conftest$ac_exeext conftest.$ac_ext
43474LIBS=$ac_check_lib_save_LIBS
43475fi
43476{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
43477$as_echo "$ac_cv_lib_socket_connect" >&6; }
43478if test "x$ac_cv_lib_socket_connect" = xyes; then :
43479  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
43480fi
43481
43482    fi
43483
43484    # Guillermo Gomez says -lposix is necessary on A/UX.
43485    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
43486if test "x$ac_cv_func_remove" = xyes; then :
43487
43488fi
43489
43490    if test $ac_cv_func_remove = no; then
43491      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
43492$as_echo_n "checking for remove in -lposix... " >&6; }
43493if ${ac_cv_lib_posix_remove+:} false; then :
43494  $as_echo_n "(cached) " >&6
43495else
43496  ac_check_lib_save_LIBS=$LIBS
43497LIBS="-lposix  $LIBS"
43498cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43499/* end confdefs.h.  */
43500
43501/* Override any GCC internal prototype to avoid an error.
43502   Use char because int might match the return type of a GCC
43503   builtin and then its argument prototype would still apply.  */
43504#ifdef __cplusplus
43505extern "C"
43506#endif
43507char remove ();
43508int
43509main ()
43510{
43511return remove ();
43512  ;
43513  return 0;
43514}
43515_ACEOF
43516if ac_fn_cxx_try_link "$LINENO"; then :
43517  ac_cv_lib_posix_remove=yes
43518else
43519  ac_cv_lib_posix_remove=no
43520fi
43521rm -f core conftest.err conftest.$ac_objext \
43522    conftest$ac_exeext conftest.$ac_ext
43523LIBS=$ac_check_lib_save_LIBS
43524fi
43525{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
43526$as_echo "$ac_cv_lib_posix_remove" >&6; }
43527if test "x$ac_cv_lib_posix_remove" = xyes; then :
43528  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
43529fi
43530
43531    fi
43532
43533    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
43534    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
43535if test "x$ac_cv_func_shmat" = xyes; then :
43536
43537fi
43538
43539    if test $ac_cv_func_shmat = no; then
43540      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
43541$as_echo_n "checking for shmat in -lipc... " >&6; }
43542if ${ac_cv_lib_ipc_shmat+:} false; then :
43543  $as_echo_n "(cached) " >&6
43544else
43545  ac_check_lib_save_LIBS=$LIBS
43546LIBS="-lipc  $LIBS"
43547cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43548/* end confdefs.h.  */
43549
43550/* Override any GCC internal prototype to avoid an error.
43551   Use char because int might match the return type of a GCC
43552   builtin and then its argument prototype would still apply.  */
43553#ifdef __cplusplus
43554extern "C"
43555#endif
43556char shmat ();
43557int
43558main ()
43559{
43560return shmat ();
43561  ;
43562  return 0;
43563}
43564_ACEOF
43565if ac_fn_cxx_try_link "$LINENO"; then :
43566  ac_cv_lib_ipc_shmat=yes
43567else
43568  ac_cv_lib_ipc_shmat=no
43569fi
43570rm -f core conftest.err conftest.$ac_objext \
43571    conftest$ac_exeext conftest.$ac_ext
43572LIBS=$ac_check_lib_save_LIBS
43573fi
43574{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
43575$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
43576if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
43577  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
43578fi
43579
43580    fi
43581  fi
43582
43583  # Check for libraries that X11R6 Xt/Xaw programs need.
43584  ac_save_LDFLAGS=$LDFLAGS
43585  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
43586  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
43587  # check for ICE first), but we must link in the order -lSM -lICE or
43588  # we get undefined symbols.  So assume we have SM if we have ICE.
43589  # These have to be linked with before -lX11, unlike the other
43590  # libraries we check for below, so use a different variable.
43591  # John Interrante, Karl Berry
43592  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
43593$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
43594if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
43595  $as_echo_n "(cached) " >&6
43596else
43597  ac_check_lib_save_LIBS=$LIBS
43598LIBS="-lICE $X_EXTRA_LIBS $LIBS"
43599cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43600/* end confdefs.h.  */
43601
43602/* Override any GCC internal prototype to avoid an error.
43603   Use char because int might match the return type of a GCC
43604   builtin and then its argument prototype would still apply.  */
43605#ifdef __cplusplus
43606extern "C"
43607#endif
43608char IceConnectionNumber ();
43609int
43610main ()
43611{
43612return IceConnectionNumber ();
43613  ;
43614  return 0;
43615}
43616_ACEOF
43617if ac_fn_cxx_try_link "$LINENO"; then :
43618  ac_cv_lib_ICE_IceConnectionNumber=yes
43619else
43620  ac_cv_lib_ICE_IceConnectionNumber=no
43621fi
43622rm -f core conftest.err conftest.$ac_objext \
43623    conftest$ac_exeext conftest.$ac_ext
43624LIBS=$ac_check_lib_save_LIBS
43625fi
43626{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
43627$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
43628if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
43629  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
43630fi
43631
43632  LDFLAGS=$ac_save_LDFLAGS
43633
43634fi
43635
43636
43637    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
43638    # this doesn't make sense so we remove it.
43639    if test "x$COMPILE_TYPE" = xcross; then
43640      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
43641    fi
43642
43643    if test "x$no_x" = xyes; then
43644
43645  # Print a helpful message on how to acquire the necessary build dependency.
43646  # x11 is the help tag: freetype, cups, pulse, alsa etc
43647  MISSING_DEPENDENCY=x11
43648
43649  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43650    cygwin_help $MISSING_DEPENDENCY
43651  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43652    msys_help $MISSING_DEPENDENCY
43653  else
43654    PKGHANDLER_COMMAND=
43655
43656    case $PKGHANDLER in
43657      apt-get)
43658        apt_help     $MISSING_DEPENDENCY ;;
43659      yum)
43660        yum_help     $MISSING_DEPENDENCY ;;
43661      port)
43662        port_help    $MISSING_DEPENDENCY ;;
43663      pkgutil)
43664        pkgutil_help $MISSING_DEPENDENCY ;;
43665      pkgadd)
43666        pkgadd_help  $MISSING_DEPENDENCY ;;
43667    esac
43668
43669    if test "x$PKGHANDLER_COMMAND" != x; then
43670      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43671    fi
43672  fi
43673
43674      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
43675    fi
43676
43677    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43678      OPENWIN_HOME="/usr/openwin"
43679      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
43680      X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
43681          -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
43682          -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
43683          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
43684    fi
43685
43686    ac_ext=c
43687ac_cpp='$CPP $CPPFLAGS'
43688ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43689ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43690ac_compiler_gnu=$ac_cv_c_compiler_gnu
43691
43692    OLD_CFLAGS="$CFLAGS"
43693    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
43694
43695    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
43696    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
43697do :
43698  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
43699ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
43700          # include <X11/Xlib.h>
43701          # include <X11/Xutil.h>
43702
43703
43704"
43705if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
43706  cat >>confdefs.h <<_ACEOF
43707#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
43708_ACEOF
43709 X11_HEADERS_OK=yes
43710else
43711  X11_HEADERS_OK=no; break
43712fi
43713
43714done
43715
43716
43717    if test "x$X11_HEADERS_OK" = xno; then
43718
43719  # Print a helpful message on how to acquire the necessary build dependency.
43720  # x11 is the help tag: freetype, cups, pulse, alsa etc
43721  MISSING_DEPENDENCY=x11
43722
43723  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43724    cygwin_help $MISSING_DEPENDENCY
43725  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43726    msys_help $MISSING_DEPENDENCY
43727  else
43728    PKGHANDLER_COMMAND=
43729
43730    case $PKGHANDLER in
43731      apt-get)
43732        apt_help     $MISSING_DEPENDENCY ;;
43733      yum)
43734        yum_help     $MISSING_DEPENDENCY ;;
43735      port)
43736        port_help    $MISSING_DEPENDENCY ;;
43737      pkgutil)
43738        pkgutil_help $MISSING_DEPENDENCY ;;
43739      pkgadd)
43740        pkgadd_help  $MISSING_DEPENDENCY ;;
43741    esac
43742
43743    if test "x$PKGHANDLER_COMMAND" != x; then
43744      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43745    fi
43746  fi
43747
43748      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
43749    fi
43750
43751    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
43752    # defined in libawt_xawt.
43753    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
43754$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
43755    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43756/* end confdefs.h.  */
43757#include <X11/extensions/Xrender.h>
43758int
43759main ()
43760{
43761XLinearGradient x;
43762  ;
43763  return 0;
43764}
43765_ACEOF
43766if ac_fn_c_try_compile "$LINENO"; then :
43767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43768$as_echo "yes" >&6; }
43769else
43770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43771$as_echo "no" >&6; }
43772         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
43773fi
43774rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43775
43776    CFLAGS="$OLD_CFLAGS"
43777    ac_ext=cpp
43778ac_cpp='$CXXCPP $CPPFLAGS'
43779ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43780ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43781ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43782
43783  fi # X11_NOT_NEEDED
43784
43785
43786
43787
43788
43789
43790  ###############################################################################
43791  #
43792  # The common unix printing system cups is used to print from java.
43793  #
43794
43795# Check whether --with-cups was given.
43796if test "${with_cups+set}" = set; then :
43797  withval=$with_cups;
43798fi
43799
43800
43801# Check whether --with-cups-include was given.
43802if test "${with_cups_include+set}" = set; then :
43803  withval=$with_cups_include;
43804fi
43805
43806
43807  if test "x$CUPS_NOT_NEEDED" = xyes; then
43808    if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
43809      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
43810$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
43811    fi
43812    CUPS_CFLAGS=
43813  else
43814    CUPS_FOUND=no
43815
43816    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
43817      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
43818    fi
43819
43820    if test "x${with_cups}" != x; then
43821      CUPS_CFLAGS="-I${with_cups}/include"
43822      CUPS_FOUND=yes
43823    fi
43824    if test "x${with_cups_include}" != x; then
43825      CUPS_CFLAGS="-I${with_cups_include}"
43826      CUPS_FOUND=yes
43827    fi
43828    if test "x$CUPS_FOUND" = xno; then
43829
43830
43831  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
43832    # Source the builddeps file again, to make sure it uses the latest variables!
43833    . $builddepsfile
43834    # Look for a target and build machine specific resource!
43835    eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
43836    if test "x$resource" = x; then
43837      # Ok, lets instead look for a target specific resource
43838      eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
43839    fi
43840    if test "x$resource" = x; then
43841      # Ok, lets instead look for a build specific resource
43842      eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
43843    fi
43844    if test "x$resource" = x; then
43845      # Ok, lets instead look for a generic resource
43846      # (The cups comes from M4 and not the shell, thus no need for eval here.)
43847      resource=${builddep_cups}
43848    fi
43849    if test "x$resource" != x; then
43850      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
43851$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
43852      # If the resource in the builddeps.conf file is an existing directory,
43853      # for example /java/linux/cups
43854      if test -d ${resource}; then
43855        depdir=${resource}
43856      else
43857
43858  # cups is for example mymodule
43859  # $resource is for example libs/general/libmymod_1_2_3.zip
43860  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
43861  # $with_builddeps_dir is for example /localhome/builddeps
43862  # depdir is the name of the variable into which we store the depdir, eg MYMOD
43863  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
43864  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
43865  filename=`basename $resource`
43866  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
43867  filebase=${filename%%.*}
43868  extension=${filename#*.}
43869  installdir=$with_builddeps_dir/$filebase
43870  if test ! -f $installdir/$filename.unpacked; then
43871    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
43872$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
43873    if test ! -d $installdir; then
43874      mkdir -p $installdir
43875    fi
43876    if test ! -d $installdir; then
43877      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
43878    fi
43879    tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
43880    touch $tmpfile
43881    if test ! -f $tmpfile; then
43882      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
43883    fi
43884
43885  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
43886  # $tmpfile is the local file name for the downloaded file.
43887  VALID_TOOL=no
43888  if test "x$BDEPS_FTP" = xwget; then
43889    VALID_TOOL=yes
43890    wget -O $tmpfile $with_builddeps_server/$resource
43891  fi
43892  if test "x$BDEPS_FTP" = xlftp; then
43893    VALID_TOOL=yes
43894    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
43895  fi
43896  if test "x$BDEPS_FTP" = xftp; then
43897    VALID_TOOL=yes
43898    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
43899    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
43900    FTPUSERPWD=${FTPSERVER%%@*}
43901    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
43902      FTPUSER=${userpwd%%:*}
43903      FTPPWD=${userpwd#*@}
43904      FTPSERVER=${FTPSERVER#*@}
43905    else
43906      FTPUSER=ftp
43907      FTPPWD=ftp
43908    fi
43909    # the "pass" command does not work on some
43910    # ftp clients (read ftp.exe) but if it works,
43911    # passive mode is better!
43912    ( \
43913        echo "user $FTPUSER $FTPPWD"        ; \
43914        echo "pass"                         ; \
43915        echo "bin"                          ; \
43916        echo "get $FTPPATH $tmpfile"              ; \
43917    ) | ftp -in $FTPSERVER
43918  fi
43919  if test "x$VALID_TOOL" != xyes; then
43920    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
43921  fi
43922
43923    mv $tmpfile $installdir/$filename
43924    if test ! -s $installdir/$filename; then
43925      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
43926    fi
43927    case "$extension" in
43928      zip)  echo "Unzipping $installdir/$filename..."
43929        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
43930        ;;
43931      tar.gz) echo "Untaring $installdir/$filename..."
43932        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
43933        ;;
43934      tgz) echo "Untaring $installdir/$filename..."
43935        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
43936        ;;
43937      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
43938        ;;
43939    esac
43940  fi
43941  if test -f $installdir/$filename.unpacked; then
43942    depdir=$installdir
43943  fi
43944
43945      fi
43946      # Source the builddeps file again, because in the previous command, the depdir
43947      # was updated to point at the current build dependency install directory.
43948      . $builddepsfile
43949      # Now extract variables from the builddeps.conf files.
43950      theroot=${builddep_cups_ROOT}
43951      thecflags=${builddep_cups_CFLAGS}
43952      thelibs=${builddep_cups_LIBS}
43953      if test "x$depdir" = x; then
43954        as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
43955      fi
43956      CUPS=$depdir
43957      if test "x$theroot" != x; then
43958        CUPS="$theroot"
43959      fi
43960      if test "x$thecflags" != x; then
43961        CUPS_CFLAGS="$thecflags"
43962      fi
43963      if test "x$thelibs" != x; then
43964        CUPS_LIBS="$thelibs"
43965      fi
43966      CUPS_FOUND=yes
43967
43968    fi
43969
43970  fi
43971
43972    fi
43973    if test "x$CUPS_FOUND" = xno; then
43974      # Are the cups headers installed in the default /usr/include location?
43975      for ac_header in cups/cups.h cups/ppd.h
43976do :
43977  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
43978ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
43979if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
43980  cat >>confdefs.h <<_ACEOF
43981#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
43982_ACEOF
43983
43984            CUPS_FOUND=yes
43985            CUPS_CFLAGS=
43986            DEFAULT_CUPS=yes
43987
43988
43989fi
43990
43991done
43992
43993    fi
43994    if test "x$CUPS_FOUND" = xno; then
43995      # Getting nervous now? Lets poke around for standard Solaris third-party
43996      # package installation locations.
43997      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
43998$as_echo_n "checking for cups headers... " >&6; }
43999      if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
44000        # An SFW package seems to be installed!
44001        CUPS_FOUND=yes
44002        CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
44003      elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
44004        # A CSW package seems to be installed!
44005        CUPS_FOUND=yes
44006        CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
44007      fi
44008      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
44009$as_echo "$CUPS_FOUND" >&6; }
44010    fi
44011    if test "x$CUPS_FOUND" = xno; then
44012
44013  # Print a helpful message on how to acquire the necessary build dependency.
44014  # cups is the help tag: freetype, cups, pulse, alsa etc
44015  MISSING_DEPENDENCY=cups
44016
44017  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44018    cygwin_help $MISSING_DEPENDENCY
44019  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44020    msys_help $MISSING_DEPENDENCY
44021  else
44022    PKGHANDLER_COMMAND=
44023
44024    case $PKGHANDLER in
44025      apt-get)
44026        apt_help     $MISSING_DEPENDENCY ;;
44027      yum)
44028        yum_help     $MISSING_DEPENDENCY ;;
44029      port)
44030        port_help    $MISSING_DEPENDENCY ;;
44031      pkgutil)
44032        pkgutil_help $MISSING_DEPENDENCY ;;
44033      pkgadd)
44034        pkgadd_help  $MISSING_DEPENDENCY ;;
44035    esac
44036
44037    if test "x$PKGHANDLER_COMMAND" != x; then
44038      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44039    fi
44040  fi
44041
44042      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
44043    fi
44044  fi
44045
44046
44047
44048
44049
44050
44051  ###############################################################################
44052  #
44053  # The ubiquitous freetype library is used to render fonts.
44054  #
44055
44056# Check whether --with-freetype was given.
44057if test "${with_freetype+set}" = set; then :
44058  withval=$with_freetype;
44059fi
44060
44061
44062# Check whether --with-freetype-include was given.
44063if test "${with_freetype_include+set}" = set; then :
44064  withval=$with_freetype_include;
44065fi
44066
44067
44068# Check whether --with-freetype-lib was given.
44069if test "${with_freetype_lib+set}" = set; then :
44070  withval=$with_freetype_lib;
44071fi
44072
44073
44074# Check whether --with-freetype-src was given.
44075if test "${with_freetype_src+set}" = set; then :
44076  withval=$with_freetype_src;
44077fi
44078
44079  # Check whether --enable-freetype-bundling was given.
44080if test "${enable_freetype_bundling+set}" = set; then :
44081  enableval=$enable_freetype_bundling;
44082fi
44083
44084
44085  # Need to specify explicitly since it needs to be overridden on some versions of macosx
44086  FREETYPE_BASE_NAME=freetype
44087  FREETYPE_CFLAGS=
44088  FREETYPE_LIBS=
44089  FREETYPE_BUNDLE_LIB_PATH=
44090
44091  if test "x$FREETYPE_NOT_NEEDED" = xyes; then
44092    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
44093      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
44094$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
44095    fi
44096    if test "x$enable_freetype_bundling" != x; then
44097      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
44098$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
44099    fi
44100  else
44101    # freetype is needed to build; go get it!
44102
44103    BUNDLE_FREETYPE="$enable_freetype_bundling"
44104
44105    if  test "x$with_freetype_src" != x; then
44106      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44107        # Try to build freetype if --with-freetype-src was given on Windows
44108
44109  FREETYPE_SRC_PATH="$with_freetype_src"
44110  BUILD_FREETYPE=yes
44111
44112  # Check if the freetype sources are acessible..
44113  if ! test -d $FREETYPE_SRC_PATH; then
44114    { $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
44115$as_echo "$as_me: WARNING: --with-freetype-src specified, but can't find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
44116    BUILD_FREETYPE=no
44117  fi
44118  # ..and contain a vc2010 project file
44119  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
44120  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
44121    { $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
44122$as_echo "$as_me: WARNING: Can't find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
44123    BUILD_FREETYPE=no
44124  fi
44125  # Now check if configure found a version of 'msbuild.exe'
44126  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
44127    { $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
44128$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;}
44129    BUILD_FREETYPE=no
44130  fi
44131
44132  # Ready to go..
44133  if test "x$BUILD_FREETYPE" = xyes; then
44134
44135    # msbuild requires trailing slashes for output directories
44136    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
44137    freetype_lib_path_unix="$freetype_lib_path"
44138    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
44139
44140  unix_path="$vcxproj_path"
44141  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44142    windows_path=`$CYGPATH -m "$unix_path"`
44143    vcxproj_path="$windows_path"
44144  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44145    windows_path=`cmd //c echo $unix_path`
44146    vcxproj_path="$windows_path"
44147  fi
44148
44149
44150  unix_path="$freetype_lib_path"
44151  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44152    windows_path=`$CYGPATH -m "$unix_path"`
44153    freetype_lib_path="$windows_path"
44154  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44155    windows_path=`cmd //c echo $unix_path`
44156    freetype_lib_path="$windows_path"
44157  fi
44158
44159
44160  unix_path="$freetype_obj_path"
44161  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44162    windows_path=`$CYGPATH -m "$unix_path"`
44163    freetype_obj_path="$windows_path"
44164  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44165    windows_path=`cmd //c echo $unix_path`
44166    freetype_obj_path="$windows_path"
44167  fi
44168
44169    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
44170      freetype_platform=x64
44171    else
44172      freetype_platform=win32
44173    fi
44174
44175    # The original freetype project file is for VS 2010 (i.e. 'v100'),
44176    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
44177    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
44178    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
44179    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
44180$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
44181
44182    # First we try to build the freetype.dll
44183    $ECHO -e "@echo off\n"\
44184	     "$MSBUILD $vcxproj_path "\
44185		       "/p:PlatformToolset=$PLATFORM_TOOLSET "\
44186		       "/p:Configuration=\"Release Multithreaded\" "\
44187		       "/p:Platform=$freetype_platform "\
44188		       "/p:ConfigurationType=DynamicLibrary "\
44189		       "/p:TargetName=freetype "\
44190		       "/p:OutDir=\"$freetype_lib_path\" "\
44191		       "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
44192    cmd /c freetype.bat
44193
44194    if test -s "$freetype_lib_path_unix/freetype.dll"; then
44195      # If that succeeds we also build freetype.lib
44196      $ECHO -e "@echo off\n"\
44197	       "$MSBUILD $vcxproj_path "\
44198			 "/p:PlatformToolset=$PLATFORM_TOOLSET "\
44199			 "/p:Configuration=\"Release Multithreaded\" "\
44200			 "/p:Platform=$freetype_platform "\
44201			 "/p:ConfigurationType=StaticLibrary "\
44202			 "/p:TargetName=freetype "\
44203			 "/p:OutDir=\"$freetype_lib_path\" "\
44204			 "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
44205      cmd /c freetype.bat
44206
44207      if test -s "$freetype_lib_path_unix/freetype.lib"; then
44208	# Once we build both, lib and dll, set freetype lib and include path appropriately
44209	POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
44210	POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
44211	{ $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
44212$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
44213      else
44214	BUILD_FREETYPE=no
44215      fi
44216    else
44217      BUILD_FREETYPE=no
44218    fi
44219  fi
44220
44221        if test "x$BUILD_FREETYPE" = xyes; then
44222          # Okay, we built it. Check that it works.
44223
44224  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44225  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44226  METHOD="--with-freetype-src"
44227
44228  # Let's start with an optimistic view of the world :-)
44229  FOUND_FREETYPE=yes
44230
44231  # First look for the canonical freetype main include file ft2build.h.
44232  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44233    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
44234    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
44235    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44236      # Fail.
44237      FOUND_FREETYPE=no
44238    fi
44239  fi
44240
44241  if test "x$FOUND_FREETYPE" = xyes; then
44242    # Include file found, let's continue the sanity check.
44243    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44244$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44245
44246    # Reset to default value
44247    FREETYPE_BASE_NAME=freetype
44248    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44249    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44250      if test "x$OPENJDK_TARGET_OS" = xmacosx \
44251          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
44252        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
44253        # for the .6 version explicitly.
44254        FREETYPE_BASE_NAME=freetype.6
44255        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44256        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
44257$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
44258      else
44259        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44260$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44261        FOUND_FREETYPE=no
44262      fi
44263    else
44264      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44265        # On Windows, we will need both .lib and .dll file.
44266        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
44267          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
44268$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
44269          FOUND_FREETYPE=no
44270        fi
44271      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
44272          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
44273        # Found lib in isa dir, use that instead.
44274        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
44275        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
44276$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
44277      fi
44278    fi
44279  fi
44280
44281  if test "x$FOUND_FREETYPE" = xyes; then
44282
44283  # Only process if variable expands to non-empty
44284
44285  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
44286    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44287
44288  # Input might be given as Windows format, start by converting to
44289  # unix format.
44290  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44291  new_path=`$CYGPATH -u "$path"`
44292
44293  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44294  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44295  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44296  # "foo.exe" is OK but "foo" is an error.
44297  #
44298  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44299  # It is also a way to make sure we got the proper file name for the real test later on.
44300  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44301  if test "x$test_shortpath" = x; then
44302    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44303$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44304    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44305  fi
44306
44307  # Call helper function which possibly converts this using DOS-style short mode.
44308  # If so, the updated path is stored in $new_path.
44309
44310  input_path="$new_path"
44311  # Check if we need to convert this using DOS-style short mode. If the path
44312  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44313  # take no chances and rewrite it.
44314  # Note: m4 eats our [], so we need to use [ and ] instead.
44315  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44316  if test "x$has_forbidden_chars" != x; then
44317    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44318    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44319    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44320    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44321      # Going to short mode and back again did indeed matter. Since short mode is
44322      # case insensitive, let's make it lowercase to improve readability.
44323      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44324      # Now convert it back to Unix-style (cygpath)
44325      input_path=`$CYGPATH -u "$shortmode_path"`
44326      new_path="$input_path"
44327    fi
44328  fi
44329
44330  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44331  if test "x$test_cygdrive_prefix" = x; then
44332    # As a simple fix, exclude /usr/bin since it's not a real path.
44333    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44334      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44335      # a path prefixed by /cygdrive for fixpath to work.
44336      new_path="$CYGWIN_ROOT_PATH$input_path"
44337    fi
44338  fi
44339
44340
44341  if test "x$path" != "x$new_path"; then
44342    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44343    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44344$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44345  fi
44346
44347    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44348
44349  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44350  has_colon=`$ECHO $path | $GREP ^.:`
44351  new_path="$path"
44352  if test "x$has_colon" = x; then
44353    # Not in mixed or Windows style, start by that.
44354    new_path=`cmd //c echo $path`
44355  fi
44356
44357
44358  input_path="$new_path"
44359  # Check if we need to convert this using DOS-style short mode. If the path
44360  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44361  # take no chances and rewrite it.
44362  # Note: m4 eats our [], so we need to use [ and ] instead.
44363  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44364  if test "x$has_forbidden_chars" != x; then
44365    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44366    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44367  fi
44368
44369
44370  windows_path="$new_path"
44371  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44372    unix_path=`$CYGPATH -u "$windows_path"`
44373    new_path="$unix_path"
44374  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44375    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44376    new_path="$unix_path"
44377  fi
44378
44379  if test "x$path" != "x$new_path"; then
44380    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44381    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44382$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44383  fi
44384
44385  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44386  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44387
44388    else
44389      # We're on a unix platform. Hooray! :)
44390      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44391      has_space=`$ECHO "$path" | $GREP " "`
44392      if test "x$has_space" != x; then
44393        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44394$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44395        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44396      fi
44397
44398      # Use eval to expand a potential ~
44399      eval path="$path"
44400      if test ! -f "$path" && test ! -d "$path"; then
44401        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44402      fi
44403
44404      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44405    fi
44406  fi
44407
44408
44409  # Only process if variable expands to non-empty
44410
44411  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
44412    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44413
44414  # Input might be given as Windows format, start by converting to
44415  # unix format.
44416  path="$POTENTIAL_FREETYPE_LIB_PATH"
44417  new_path=`$CYGPATH -u "$path"`
44418
44419  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44420  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44421  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44422  # "foo.exe" is OK but "foo" is an error.
44423  #
44424  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44425  # It is also a way to make sure we got the proper file name for the real test later on.
44426  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44427  if test "x$test_shortpath" = x; then
44428    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44429$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44430    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44431  fi
44432
44433  # Call helper function which possibly converts this using DOS-style short mode.
44434  # If so, the updated path is stored in $new_path.
44435
44436  input_path="$new_path"
44437  # Check if we need to convert this using DOS-style short mode. If the path
44438  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44439  # take no chances and rewrite it.
44440  # Note: m4 eats our [], so we need to use [ and ] instead.
44441  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44442  if test "x$has_forbidden_chars" != x; then
44443    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44444    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44445    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44446    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44447      # Going to short mode and back again did indeed matter. Since short mode is
44448      # case insensitive, let's make it lowercase to improve readability.
44449      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44450      # Now convert it back to Unix-style (cygpath)
44451      input_path=`$CYGPATH -u "$shortmode_path"`
44452      new_path="$input_path"
44453    fi
44454  fi
44455
44456  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44457  if test "x$test_cygdrive_prefix" = x; then
44458    # As a simple fix, exclude /usr/bin since it's not a real path.
44459    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44460      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44461      # a path prefixed by /cygdrive for fixpath to work.
44462      new_path="$CYGWIN_ROOT_PATH$input_path"
44463    fi
44464  fi
44465
44466
44467  if test "x$path" != "x$new_path"; then
44468    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44469    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44470$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44471  fi
44472
44473    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44474
44475  path="$POTENTIAL_FREETYPE_LIB_PATH"
44476  has_colon=`$ECHO $path | $GREP ^.:`
44477  new_path="$path"
44478  if test "x$has_colon" = x; then
44479    # Not in mixed or Windows style, start by that.
44480    new_path=`cmd //c echo $path`
44481  fi
44482
44483
44484  input_path="$new_path"
44485  # Check if we need to convert this using DOS-style short mode. If the path
44486  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44487  # take no chances and rewrite it.
44488  # Note: m4 eats our [], so we need to use [ and ] instead.
44489  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44490  if test "x$has_forbidden_chars" != x; then
44491    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44492    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44493  fi
44494
44495
44496  windows_path="$new_path"
44497  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44498    unix_path=`$CYGPATH -u "$windows_path"`
44499    new_path="$unix_path"
44500  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44501    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44502    new_path="$unix_path"
44503  fi
44504
44505  if test "x$path" != "x$new_path"; then
44506    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44507    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44508$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44509  fi
44510
44511  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44512  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44513
44514    else
44515      # We're on a unix platform. Hooray! :)
44516      path="$POTENTIAL_FREETYPE_LIB_PATH"
44517      has_space=`$ECHO "$path" | $GREP " "`
44518      if test "x$has_space" != x; then
44519        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44520$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44521        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44522      fi
44523
44524      # Use eval to expand a potential ~
44525      eval path="$path"
44526      if test ! -f "$path" && test ! -d "$path"; then
44527        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44528      fi
44529
44530      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44531    fi
44532  fi
44533
44534
44535    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44536    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44537$as_echo_n "checking for freetype includes... " >&6; }
44538    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44539$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44540    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44541    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44542$as_echo_n "checking for freetype libraries... " >&6; }
44543    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44544$as_echo "$FREETYPE_LIB_PATH" >&6; }
44545  fi
44546
44547          if test "x$FOUND_FREETYPE" != xyes; then
44548            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
44549          fi
44550        else
44551          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
44552$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
44553          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
44554        fi
44555      else
44556        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
44557$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
44558      fi
44559    fi
44560
44561    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
44562      # User has specified settings
44563
44564      if test "x$BUNDLE_FREETYPE" = x; then
44565        # If not specified, default is to bundle freetype
44566        BUNDLE_FREETYPE=yes
44567      fi
44568
44569      if test "x$with_freetype" != x; then
44570        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
44571        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
44572      fi
44573
44574      # Allow --with-freetype-lib and --with-freetype-include to override
44575      if test "x$with_freetype_include" != x; then
44576        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
44577      fi
44578      if test "x$with_freetype_lib" != x; then
44579        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
44580      fi
44581
44582      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
44583        # Okay, we got it. Check that it works.
44584
44585  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44586  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44587  METHOD="--with-freetype"
44588
44589  # Let's start with an optimistic view of the world :-)
44590  FOUND_FREETYPE=yes
44591
44592  # First look for the canonical freetype main include file ft2build.h.
44593  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44594    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
44595    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
44596    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44597      # Fail.
44598      FOUND_FREETYPE=no
44599    fi
44600  fi
44601
44602  if test "x$FOUND_FREETYPE" = xyes; then
44603    # Include file found, let's continue the sanity check.
44604    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44605$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44606
44607    # Reset to default value
44608    FREETYPE_BASE_NAME=freetype
44609    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44610    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44611      if test "x$OPENJDK_TARGET_OS" = xmacosx \
44612          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
44613        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
44614        # for the .6 version explicitly.
44615        FREETYPE_BASE_NAME=freetype.6
44616        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44617        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
44618$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
44619      else
44620        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44621$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44622        FOUND_FREETYPE=no
44623      fi
44624    else
44625      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44626        # On Windows, we will need both .lib and .dll file.
44627        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
44628          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
44629$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
44630          FOUND_FREETYPE=no
44631        fi
44632      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
44633          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
44634        # Found lib in isa dir, use that instead.
44635        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
44636        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
44637$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
44638      fi
44639    fi
44640  fi
44641
44642  if test "x$FOUND_FREETYPE" = xyes; then
44643
44644  # Only process if variable expands to non-empty
44645
44646  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
44647    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44648
44649  # Input might be given as Windows format, start by converting to
44650  # unix format.
44651  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44652  new_path=`$CYGPATH -u "$path"`
44653
44654  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44655  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44656  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44657  # "foo.exe" is OK but "foo" is an error.
44658  #
44659  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44660  # It is also a way to make sure we got the proper file name for the real test later on.
44661  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44662  if test "x$test_shortpath" = x; then
44663    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44664$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44665    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44666  fi
44667
44668  # Call helper function which possibly converts this using DOS-style short mode.
44669  # If so, the updated path is stored in $new_path.
44670
44671  input_path="$new_path"
44672  # Check if we need to convert this using DOS-style short mode. If the path
44673  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44674  # take no chances and rewrite it.
44675  # Note: m4 eats our [], so we need to use [ and ] instead.
44676  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44677  if test "x$has_forbidden_chars" != x; then
44678    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44679    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44680    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44681    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44682      # Going to short mode and back again did indeed matter. Since short mode is
44683      # case insensitive, let's make it lowercase to improve readability.
44684      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44685      # Now convert it back to Unix-style (cygpath)
44686      input_path=`$CYGPATH -u "$shortmode_path"`
44687      new_path="$input_path"
44688    fi
44689  fi
44690
44691  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44692  if test "x$test_cygdrive_prefix" = x; then
44693    # As a simple fix, exclude /usr/bin since it's not a real path.
44694    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44695      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44696      # a path prefixed by /cygdrive for fixpath to work.
44697      new_path="$CYGWIN_ROOT_PATH$input_path"
44698    fi
44699  fi
44700
44701
44702  if test "x$path" != "x$new_path"; then
44703    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44704    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44705$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44706  fi
44707
44708    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44709
44710  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44711  has_colon=`$ECHO $path | $GREP ^.:`
44712  new_path="$path"
44713  if test "x$has_colon" = x; then
44714    # Not in mixed or Windows style, start by that.
44715    new_path=`cmd //c echo $path`
44716  fi
44717
44718
44719  input_path="$new_path"
44720  # Check if we need to convert this using DOS-style short mode. If the path
44721  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44722  # take no chances and rewrite it.
44723  # Note: m4 eats our [], so we need to use [ and ] instead.
44724  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44725  if test "x$has_forbidden_chars" != x; then
44726    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44727    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44728  fi
44729
44730
44731  windows_path="$new_path"
44732  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44733    unix_path=`$CYGPATH -u "$windows_path"`
44734    new_path="$unix_path"
44735  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44736    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44737    new_path="$unix_path"
44738  fi
44739
44740  if test "x$path" != "x$new_path"; then
44741    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44742    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44743$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44744  fi
44745
44746  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44747  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44748
44749    else
44750      # We're on a unix platform. Hooray! :)
44751      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44752      has_space=`$ECHO "$path" | $GREP " "`
44753      if test "x$has_space" != x; then
44754        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44755$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44756        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44757      fi
44758
44759      # Use eval to expand a potential ~
44760      eval path="$path"
44761      if test ! -f "$path" && test ! -d "$path"; then
44762        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44763      fi
44764
44765      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44766    fi
44767  fi
44768
44769
44770  # Only process if variable expands to non-empty
44771
44772  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
44773    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44774
44775  # Input might be given as Windows format, start by converting to
44776  # unix format.
44777  path="$POTENTIAL_FREETYPE_LIB_PATH"
44778  new_path=`$CYGPATH -u "$path"`
44779
44780  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44781  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44782  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44783  # "foo.exe" is OK but "foo" is an error.
44784  #
44785  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44786  # It is also a way to make sure we got the proper file name for the real test later on.
44787  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44788  if test "x$test_shortpath" = x; then
44789    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44790$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44791    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44792  fi
44793
44794  # Call helper function which possibly converts this using DOS-style short mode.
44795  # If so, the updated path is stored in $new_path.
44796
44797  input_path="$new_path"
44798  # Check if we need to convert this using DOS-style short mode. If the path
44799  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44800  # take no chances and rewrite it.
44801  # Note: m4 eats our [], so we need to use [ and ] instead.
44802  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44803  if test "x$has_forbidden_chars" != x; then
44804    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44805    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44806    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44807    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44808      # Going to short mode and back again did indeed matter. Since short mode is
44809      # case insensitive, let's make it lowercase to improve readability.
44810      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44811      # Now convert it back to Unix-style (cygpath)
44812      input_path=`$CYGPATH -u "$shortmode_path"`
44813      new_path="$input_path"
44814    fi
44815  fi
44816
44817  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44818  if test "x$test_cygdrive_prefix" = x; then
44819    # As a simple fix, exclude /usr/bin since it's not a real path.
44820    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44821      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44822      # a path prefixed by /cygdrive for fixpath to work.
44823      new_path="$CYGWIN_ROOT_PATH$input_path"
44824    fi
44825  fi
44826
44827
44828  if test "x$path" != "x$new_path"; then
44829    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44830    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44831$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44832  fi
44833
44834    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44835
44836  path="$POTENTIAL_FREETYPE_LIB_PATH"
44837  has_colon=`$ECHO $path | $GREP ^.:`
44838  new_path="$path"
44839  if test "x$has_colon" = x; then
44840    # Not in mixed or Windows style, start by that.
44841    new_path=`cmd //c echo $path`
44842  fi
44843
44844
44845  input_path="$new_path"
44846  # Check if we need to convert this using DOS-style short mode. If the path
44847  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44848  # take no chances and rewrite it.
44849  # Note: m4 eats our [], so we need to use [ and ] instead.
44850  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44851  if test "x$has_forbidden_chars" != x; then
44852    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44853    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44854  fi
44855
44856
44857  windows_path="$new_path"
44858  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44859    unix_path=`$CYGPATH -u "$windows_path"`
44860    new_path="$unix_path"
44861  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44862    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44863    new_path="$unix_path"
44864  fi
44865
44866  if test "x$path" != "x$new_path"; then
44867    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44868    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44869$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44870  fi
44871
44872  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44873  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44874
44875    else
44876      # We're on a unix platform. Hooray! :)
44877      path="$POTENTIAL_FREETYPE_LIB_PATH"
44878      has_space=`$ECHO "$path" | $GREP " "`
44879      if test "x$has_space" != x; then
44880        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44881$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44882        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44883      fi
44884
44885      # Use eval to expand a potential ~
44886      eval path="$path"
44887      if test ! -f "$path" && test ! -d "$path"; then
44888        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44889      fi
44890
44891      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44892    fi
44893  fi
44894
44895
44896    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44897    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44898$as_echo_n "checking for freetype includes... " >&6; }
44899    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44900$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44901    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44902    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44903$as_echo_n "checking for freetype libraries... " >&6; }
44904    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44905$as_echo "$FREETYPE_LIB_PATH" >&6; }
44906  fi
44907
44908        if test "x$FOUND_FREETYPE" != xyes; then
44909          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
44910        fi
44911      else
44912        # User specified only one of lib or include. This is an error.
44913        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
44914          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
44915$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
44916          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
44917        else
44918          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
44919$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
44920          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
44921        fi
44922      fi
44923    else
44924      # User did not specify settings, but we need freetype. Try to locate it.
44925
44926      if test "x$BUNDLE_FREETYPE" = x; then
44927        # If not specified, default is to bundle freetype only on windows
44928        if test "x$OPENJDK_TARGET_OS" = xwindows; then
44929          BUNDLE_FREETYPE=yes
44930        else
44931          BUNDLE_FREETYPE=no
44932        fi
44933      fi
44934
44935      if test "x$FOUND_FREETYPE" != xyes; then
44936        # Check builddeps
44937
44938
44939  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
44940    # Source the builddeps file again, to make sure it uses the latest variables!
44941    . $builddepsfile
44942    # Look for a target and build machine specific resource!
44943    eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
44944    if test "x$resource" = x; then
44945      # Ok, lets instead look for a target specific resource
44946      eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
44947    fi
44948    if test "x$resource" = x; then
44949      # Ok, lets instead look for a build specific resource
44950      eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
44951    fi
44952    if test "x$resource" = x; then
44953      # Ok, lets instead look for a generic resource
44954      # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
44955      resource=${builddep_freetype2}
44956    fi
44957    if test "x$resource" != x; then
44958      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
44959$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
44960      # If the resource in the builddeps.conf file is an existing directory,
44961      # for example /java/linux/cups
44962      if test -d ${resource}; then
44963        depdir=${resource}
44964      else
44965
44966  # freetype2 is for example mymodule
44967  # $resource is for example libs/general/libmymod_1_2_3.zip
44968  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
44969  # $with_builddeps_dir is for example /localhome/builddeps
44970  # depdir is the name of the variable into which we store the depdir, eg MYMOD
44971  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
44972  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
44973  filename=`basename $resource`
44974  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
44975  filebase=${filename%%.*}
44976  extension=${filename#*.}
44977  installdir=$with_builddeps_dir/$filebase
44978  if test ! -f $installdir/$filename.unpacked; then
44979    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
44980$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
44981    if test ! -d $installdir; then
44982      mkdir -p $installdir
44983    fi
44984    if test ! -d $installdir; then
44985      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
44986    fi
44987    tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
44988    touch $tmpfile
44989    if test ! -f $tmpfile; then
44990      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
44991    fi
44992
44993  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
44994  # $tmpfile is the local file name for the downloaded file.
44995  VALID_TOOL=no
44996  if test "x$BDEPS_FTP" = xwget; then
44997    VALID_TOOL=yes
44998    wget -O $tmpfile $with_builddeps_server/$resource
44999  fi
45000  if test "x$BDEPS_FTP" = xlftp; then
45001    VALID_TOOL=yes
45002    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
45003  fi
45004  if test "x$BDEPS_FTP" = xftp; then
45005    VALID_TOOL=yes
45006    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
45007    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
45008    FTPUSERPWD=${FTPSERVER%%@*}
45009    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
45010      FTPUSER=${userpwd%%:*}
45011      FTPPWD=${userpwd#*@}
45012      FTPSERVER=${FTPSERVER#*@}
45013    else
45014      FTPUSER=ftp
45015      FTPPWD=ftp
45016    fi
45017    # the "pass" command does not work on some
45018    # ftp clients (read ftp.exe) but if it works,
45019    # passive mode is better!
45020    ( \
45021        echo "user $FTPUSER $FTPPWD"        ; \
45022        echo "pass"                         ; \
45023        echo "bin"                          ; \
45024        echo "get $FTPPATH $tmpfile"              ; \
45025    ) | ftp -in $FTPSERVER
45026  fi
45027  if test "x$VALID_TOOL" != xyes; then
45028    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
45029  fi
45030
45031    mv $tmpfile $installdir/$filename
45032    if test ! -s $installdir/$filename; then
45033      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
45034    fi
45035    case "$extension" in
45036      zip)  echo "Unzipping $installdir/$filename..."
45037        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
45038        ;;
45039      tar.gz) echo "Untaring $installdir/$filename..."
45040        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
45041        ;;
45042      tgz) echo "Untaring $installdir/$filename..."
45043        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
45044        ;;
45045      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
45046        ;;
45047    esac
45048  fi
45049  if test -f $installdir/$filename.unpacked; then
45050    depdir=$installdir
45051  fi
45052
45053      fi
45054      # Source the builddeps file again, because in the previous command, the depdir
45055      # was updated to point at the current build dependency install directory.
45056      . $builddepsfile
45057      # Now extract variables from the builddeps.conf files.
45058      theroot=${builddep_freetype2_ROOT}
45059      thecflags=${builddep_freetype2_CFLAGS}
45060      thelibs=${builddep_freetype2_LIBS}
45061      if test "x$depdir" = x; then
45062        as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
45063      fi
45064      FREETYPE=$depdir
45065      if test "x$theroot" != x; then
45066        FREETYPE="$theroot"
45067      fi
45068      if test "x$thecflags" != x; then
45069        FREETYPE_CFLAGS="$thecflags"
45070      fi
45071      if test "x$thelibs" != x; then
45072        FREETYPE_LIBS="$thelibs"
45073      fi
45074      FOUND_FREETYPE=yes
45075      else FOUND_FREETYPE=no
45076
45077    fi
45078    else FOUND_FREETYPE=no
45079
45080  fi
45081
45082        # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
45083        if test "x$FOUND_FREETYPE" = xyes; then
45084          if test "x$BUNDLE_FREETYPE" = xyes; then
45085            { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
45086$as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
45087            FOUND_FREETYPE=no
45088          else
45089            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
45090$as_echo_n "checking for freetype... " >&6; }
45091            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
45092$as_echo "yes (using builddeps)" >&6; }
45093          fi
45094        fi
45095      fi
45096
45097      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
45098      if test "x$SYSROOT" = x; then
45099        if test "x$FOUND_FREETYPE" != xyes; then
45100          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
45101          if test "x$PKG_CONFIG" != x; then
45102
45103pkg_failed=no
45104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
45105$as_echo_n "checking for FREETYPE... " >&6; }
45106
45107if test -n "$FREETYPE_CFLAGS"; then
45108    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
45109 elif test -n "$PKG_CONFIG"; then
45110    if test -n "$PKG_CONFIG" && \
45111    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
45112  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
45113  ac_status=$?
45114  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45115  test $ac_status = 0; }; then
45116  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
45117else
45118  pkg_failed=yes
45119fi
45120 else
45121    pkg_failed=untried
45122fi
45123if test -n "$FREETYPE_LIBS"; then
45124    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
45125 elif test -n "$PKG_CONFIG"; then
45126    if test -n "$PKG_CONFIG" && \
45127    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
45128  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
45129  ac_status=$?
45130  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45131  test $ac_status = 0; }; then
45132  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
45133else
45134  pkg_failed=yes
45135fi
45136 else
45137    pkg_failed=untried
45138fi
45139
45140
45141
45142if test $pkg_failed = yes; then
45143
45144if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
45145        _pkg_short_errors_supported=yes
45146else
45147        _pkg_short_errors_supported=no
45148fi
45149        if test $_pkg_short_errors_supported = yes; then
45150	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
45151        else
45152	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
45153        fi
45154	# Put the nasty error message in config.log where it belongs
45155	echo "$FREETYPE_PKG_ERRORS" >&5
45156
45157	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45158$as_echo "no" >&6; }
45159                FOUND_FREETYPE=no
45160elif test $pkg_failed = untried; then
45161	FOUND_FREETYPE=no
45162else
45163	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
45164	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
45165        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45166$as_echo "yes" >&6; }
45167	FOUND_FREETYPE=yes
45168fi
45169            if test "x$FOUND_FREETYPE" = xyes; then
45170              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
45171              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
45172              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
45173              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
45174                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
45175              fi
45176              # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
45177              if test "x$BUNDLE_FREETYPE" = xyes; then
45178                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
45179$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
45180                FOUND_FREETYPE=no
45181              else
45182                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
45183$as_echo_n "checking for freetype... " >&6; }
45184                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
45185$as_echo "yes (using pkg-config)" >&6; }
45186              fi
45187            fi
45188          fi
45189        fi
45190      fi
45191
45192      if test "x$FOUND_FREETYPE" != xyes; then
45193        # Check in well-known locations
45194        if test "x$OPENJDK_TARGET_OS" = xwindows; then
45195          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
45196
45197  windows_path="$FREETYPE_BASE_DIR"
45198  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45199    unix_path=`$CYGPATH -u "$windows_path"`
45200    FREETYPE_BASE_DIR="$unix_path"
45201  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45202    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45203    FREETYPE_BASE_DIR="$unix_path"
45204  fi
45205
45206
45207  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45208  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45209  METHOD="well-known location"
45210
45211  # Let's start with an optimistic view of the world :-)
45212  FOUND_FREETYPE=yes
45213
45214  # First look for the canonical freetype main include file ft2build.h.
45215  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45216    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45217    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45218    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45219      # Fail.
45220      FOUND_FREETYPE=no
45221    fi
45222  fi
45223
45224  if test "x$FOUND_FREETYPE" = xyes; then
45225    # Include file found, let's continue the sanity check.
45226    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45227$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45228
45229    # Reset to default value
45230    FREETYPE_BASE_NAME=freetype
45231    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45232    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45233      if test "x$OPENJDK_TARGET_OS" = xmacosx \
45234          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45235        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45236        # for the .6 version explicitly.
45237        FREETYPE_BASE_NAME=freetype.6
45238        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45239        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45240$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45241      else
45242        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45243$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45244        FOUND_FREETYPE=no
45245      fi
45246    else
45247      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45248        # On Windows, we will need both .lib and .dll file.
45249        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45250          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45251$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45252          FOUND_FREETYPE=no
45253        fi
45254      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45255          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45256        # Found lib in isa dir, use that instead.
45257        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45258        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45259$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45260      fi
45261    fi
45262  fi
45263
45264  if test "x$FOUND_FREETYPE" = xyes; then
45265
45266  # Only process if variable expands to non-empty
45267
45268  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
45269    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45270
45271  # Input might be given as Windows format, start by converting to
45272  # unix format.
45273  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45274  new_path=`$CYGPATH -u "$path"`
45275
45276  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45277  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45278  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45279  # "foo.exe" is OK but "foo" is an error.
45280  #
45281  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45282  # It is also a way to make sure we got the proper file name for the real test later on.
45283  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45284  if test "x$test_shortpath" = x; then
45285    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45286$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45287    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45288  fi
45289
45290  # Call helper function which possibly converts this using DOS-style short mode.
45291  # If so, the updated path is stored in $new_path.
45292
45293  input_path="$new_path"
45294  # Check if we need to convert this using DOS-style short mode. If the path
45295  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45296  # take no chances and rewrite it.
45297  # Note: m4 eats our [], so we need to use [ and ] instead.
45298  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45299  if test "x$has_forbidden_chars" != x; then
45300    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45301    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45302    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45303    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45304      # Going to short mode and back again did indeed matter. Since short mode is
45305      # case insensitive, let's make it lowercase to improve readability.
45306      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45307      # Now convert it back to Unix-style (cygpath)
45308      input_path=`$CYGPATH -u "$shortmode_path"`
45309      new_path="$input_path"
45310    fi
45311  fi
45312
45313  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45314  if test "x$test_cygdrive_prefix" = x; then
45315    # As a simple fix, exclude /usr/bin since it's not a real path.
45316    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45317      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45318      # a path prefixed by /cygdrive for fixpath to work.
45319      new_path="$CYGWIN_ROOT_PATH$input_path"
45320    fi
45321  fi
45322
45323
45324  if test "x$path" != "x$new_path"; then
45325    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45326    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45327$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45328  fi
45329
45330    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45331
45332  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45333  has_colon=`$ECHO $path | $GREP ^.:`
45334  new_path="$path"
45335  if test "x$has_colon" = x; then
45336    # Not in mixed or Windows style, start by that.
45337    new_path=`cmd //c echo $path`
45338  fi
45339
45340
45341  input_path="$new_path"
45342  # Check if we need to convert this using DOS-style short mode. If the path
45343  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45344  # take no chances and rewrite it.
45345  # Note: m4 eats our [], so we need to use [ and ] instead.
45346  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45347  if test "x$has_forbidden_chars" != x; then
45348    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45349    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45350  fi
45351
45352
45353  windows_path="$new_path"
45354  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45355    unix_path=`$CYGPATH -u "$windows_path"`
45356    new_path="$unix_path"
45357  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45358    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45359    new_path="$unix_path"
45360  fi
45361
45362  if test "x$path" != "x$new_path"; then
45363    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45364    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45365$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45366  fi
45367
45368  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45369  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45370
45371    else
45372      # We're on a unix platform. Hooray! :)
45373      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45374      has_space=`$ECHO "$path" | $GREP " "`
45375      if test "x$has_space" != x; then
45376        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45377$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45378        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45379      fi
45380
45381      # Use eval to expand a potential ~
45382      eval path="$path"
45383      if test ! -f "$path" && test ! -d "$path"; then
45384        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45385      fi
45386
45387      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45388    fi
45389  fi
45390
45391
45392  # Only process if variable expands to non-empty
45393
45394  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
45395    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45396
45397  # Input might be given as Windows format, start by converting to
45398  # unix format.
45399  path="$POTENTIAL_FREETYPE_LIB_PATH"
45400  new_path=`$CYGPATH -u "$path"`
45401
45402  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45403  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45404  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45405  # "foo.exe" is OK but "foo" is an error.
45406  #
45407  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45408  # It is also a way to make sure we got the proper file name for the real test later on.
45409  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45410  if test "x$test_shortpath" = x; then
45411    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45412$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45413    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45414  fi
45415
45416  # Call helper function which possibly converts this using DOS-style short mode.
45417  # If so, the updated path is stored in $new_path.
45418
45419  input_path="$new_path"
45420  # Check if we need to convert this using DOS-style short mode. If the path
45421  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45422  # take no chances and rewrite it.
45423  # Note: m4 eats our [], so we need to use [ and ] instead.
45424  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45425  if test "x$has_forbidden_chars" != x; then
45426    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45427    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45428    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45429    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45430      # Going to short mode and back again did indeed matter. Since short mode is
45431      # case insensitive, let's make it lowercase to improve readability.
45432      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45433      # Now convert it back to Unix-style (cygpath)
45434      input_path=`$CYGPATH -u "$shortmode_path"`
45435      new_path="$input_path"
45436    fi
45437  fi
45438
45439  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45440  if test "x$test_cygdrive_prefix" = x; then
45441    # As a simple fix, exclude /usr/bin since it's not a real path.
45442    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45443      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45444      # a path prefixed by /cygdrive for fixpath to work.
45445      new_path="$CYGWIN_ROOT_PATH$input_path"
45446    fi
45447  fi
45448
45449
45450  if test "x$path" != "x$new_path"; then
45451    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45452    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45453$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45454  fi
45455
45456    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45457
45458  path="$POTENTIAL_FREETYPE_LIB_PATH"
45459  has_colon=`$ECHO $path | $GREP ^.:`
45460  new_path="$path"
45461  if test "x$has_colon" = x; then
45462    # Not in mixed or Windows style, start by that.
45463    new_path=`cmd //c echo $path`
45464  fi
45465
45466
45467  input_path="$new_path"
45468  # Check if we need to convert this using DOS-style short mode. If the path
45469  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45470  # take no chances and rewrite it.
45471  # Note: m4 eats our [], so we need to use [ and ] instead.
45472  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45473  if test "x$has_forbidden_chars" != x; then
45474    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45475    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45476  fi
45477
45478
45479  windows_path="$new_path"
45480  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45481    unix_path=`$CYGPATH -u "$windows_path"`
45482    new_path="$unix_path"
45483  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45484    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45485    new_path="$unix_path"
45486  fi
45487
45488  if test "x$path" != "x$new_path"; then
45489    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45490    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45491$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45492  fi
45493
45494  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45495  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45496
45497    else
45498      # We're on a unix platform. Hooray! :)
45499      path="$POTENTIAL_FREETYPE_LIB_PATH"
45500      has_space=`$ECHO "$path" | $GREP " "`
45501      if test "x$has_space" != x; then
45502        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45503$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45504        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45505      fi
45506
45507      # Use eval to expand a potential ~
45508      eval path="$path"
45509      if test ! -f "$path" && test ! -d "$path"; then
45510        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45511      fi
45512
45513      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45514    fi
45515  fi
45516
45517
45518    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45519    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45520$as_echo_n "checking for freetype includes... " >&6; }
45521    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45522$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45523    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45524    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45525$as_echo_n "checking for freetype libraries... " >&6; }
45526    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45527$as_echo "$FREETYPE_LIB_PATH" >&6; }
45528  fi
45529
45530          if test "x$FOUND_FREETYPE" != xyes; then
45531            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
45532
45533  windows_path="$FREETYPE_BASE_DIR"
45534  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45535    unix_path=`$CYGPATH -u "$windows_path"`
45536    FREETYPE_BASE_DIR="$unix_path"
45537  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45538    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45539    FREETYPE_BASE_DIR="$unix_path"
45540  fi
45541
45542
45543  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45544  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45545  METHOD="well-known location"
45546
45547  # Let's start with an optimistic view of the world :-)
45548  FOUND_FREETYPE=yes
45549
45550  # First look for the canonical freetype main include file ft2build.h.
45551  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45552    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45553    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45554    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45555      # Fail.
45556      FOUND_FREETYPE=no
45557    fi
45558  fi
45559
45560  if test "x$FOUND_FREETYPE" = xyes; then
45561    # Include file found, let's continue the sanity check.
45562    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45563$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45564
45565    # Reset to default value
45566    FREETYPE_BASE_NAME=freetype
45567    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45568    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45569      if test "x$OPENJDK_TARGET_OS" = xmacosx \
45570          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45571        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45572        # for the .6 version explicitly.
45573        FREETYPE_BASE_NAME=freetype.6
45574        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45575        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45576$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45577      else
45578        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45579$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45580        FOUND_FREETYPE=no
45581      fi
45582    else
45583      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45584        # On Windows, we will need both .lib and .dll file.
45585        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45586          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45587$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45588          FOUND_FREETYPE=no
45589        fi
45590      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45591          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45592        # Found lib in isa dir, use that instead.
45593        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45594        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45595$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45596      fi
45597    fi
45598  fi
45599
45600  if test "x$FOUND_FREETYPE" = xyes; then
45601
45602  # Only process if variable expands to non-empty
45603
45604  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
45605    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45606
45607  # Input might be given as Windows format, start by converting to
45608  # unix format.
45609  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45610  new_path=`$CYGPATH -u "$path"`
45611
45612  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45613  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45614  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45615  # "foo.exe" is OK but "foo" is an error.
45616  #
45617  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45618  # It is also a way to make sure we got the proper file name for the real test later on.
45619  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45620  if test "x$test_shortpath" = x; then
45621    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45622$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45623    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45624  fi
45625
45626  # Call helper function which possibly converts this using DOS-style short mode.
45627  # If so, the updated path is stored in $new_path.
45628
45629  input_path="$new_path"
45630  # Check if we need to convert this using DOS-style short mode. If the path
45631  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45632  # take no chances and rewrite it.
45633  # Note: m4 eats our [], so we need to use [ and ] instead.
45634  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45635  if test "x$has_forbidden_chars" != x; then
45636    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45637    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45638    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45639    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45640      # Going to short mode and back again did indeed matter. Since short mode is
45641      # case insensitive, let's make it lowercase to improve readability.
45642      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45643      # Now convert it back to Unix-style (cygpath)
45644      input_path=`$CYGPATH -u "$shortmode_path"`
45645      new_path="$input_path"
45646    fi
45647  fi
45648
45649  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45650  if test "x$test_cygdrive_prefix" = x; then
45651    # As a simple fix, exclude /usr/bin since it's not a real path.
45652    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45653      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45654      # a path prefixed by /cygdrive for fixpath to work.
45655      new_path="$CYGWIN_ROOT_PATH$input_path"
45656    fi
45657  fi
45658
45659
45660  if test "x$path" != "x$new_path"; then
45661    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45662    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45663$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45664  fi
45665
45666    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45667
45668  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45669  has_colon=`$ECHO $path | $GREP ^.:`
45670  new_path="$path"
45671  if test "x$has_colon" = x; then
45672    # Not in mixed or Windows style, start by that.
45673    new_path=`cmd //c echo $path`
45674  fi
45675
45676
45677  input_path="$new_path"
45678  # Check if we need to convert this using DOS-style short mode. If the path
45679  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45680  # take no chances and rewrite it.
45681  # Note: m4 eats our [], so we need to use [ and ] instead.
45682  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45683  if test "x$has_forbidden_chars" != x; then
45684    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45685    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45686  fi
45687
45688
45689  windows_path="$new_path"
45690  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45691    unix_path=`$CYGPATH -u "$windows_path"`
45692    new_path="$unix_path"
45693  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45694    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45695    new_path="$unix_path"
45696  fi
45697
45698  if test "x$path" != "x$new_path"; then
45699    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45700    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45701$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45702  fi
45703
45704  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45705  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45706
45707    else
45708      # We're on a unix platform. Hooray! :)
45709      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45710      has_space=`$ECHO "$path" | $GREP " "`
45711      if test "x$has_space" != x; then
45712        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45713$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45714        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45715      fi
45716
45717      # Use eval to expand a potential ~
45718      eval path="$path"
45719      if test ! -f "$path" && test ! -d "$path"; then
45720        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45721      fi
45722
45723      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45724    fi
45725  fi
45726
45727
45728  # Only process if variable expands to non-empty
45729
45730  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
45731    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45732
45733  # Input might be given as Windows format, start by converting to
45734  # unix format.
45735  path="$POTENTIAL_FREETYPE_LIB_PATH"
45736  new_path=`$CYGPATH -u "$path"`
45737
45738  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45739  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45740  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45741  # "foo.exe" is OK but "foo" is an error.
45742  #
45743  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45744  # It is also a way to make sure we got the proper file name for the real test later on.
45745  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45746  if test "x$test_shortpath" = x; then
45747    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45748$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45749    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45750  fi
45751
45752  # Call helper function which possibly converts this using DOS-style short mode.
45753  # If so, the updated path is stored in $new_path.
45754
45755  input_path="$new_path"
45756  # Check if we need to convert this using DOS-style short mode. If the path
45757  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45758  # take no chances and rewrite it.
45759  # Note: m4 eats our [], so we need to use [ and ] instead.
45760  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45761  if test "x$has_forbidden_chars" != x; then
45762    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45763    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45764    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45765    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45766      # Going to short mode and back again did indeed matter. Since short mode is
45767      # case insensitive, let's make it lowercase to improve readability.
45768      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45769      # Now convert it back to Unix-style (cygpath)
45770      input_path=`$CYGPATH -u "$shortmode_path"`
45771      new_path="$input_path"
45772    fi
45773  fi
45774
45775  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45776  if test "x$test_cygdrive_prefix" = x; then
45777    # As a simple fix, exclude /usr/bin since it's not a real path.
45778    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45779      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45780      # a path prefixed by /cygdrive for fixpath to work.
45781      new_path="$CYGWIN_ROOT_PATH$input_path"
45782    fi
45783  fi
45784
45785
45786  if test "x$path" != "x$new_path"; then
45787    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45788    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45789$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45790  fi
45791
45792    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45793
45794  path="$POTENTIAL_FREETYPE_LIB_PATH"
45795  has_colon=`$ECHO $path | $GREP ^.:`
45796  new_path="$path"
45797  if test "x$has_colon" = x; then
45798    # Not in mixed or Windows style, start by that.
45799    new_path=`cmd //c echo $path`
45800  fi
45801
45802
45803  input_path="$new_path"
45804  # Check if we need to convert this using DOS-style short mode. If the path
45805  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45806  # take no chances and rewrite it.
45807  # Note: m4 eats our [], so we need to use [ and ] instead.
45808  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45809  if test "x$has_forbidden_chars" != x; then
45810    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45811    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45812  fi
45813
45814
45815  windows_path="$new_path"
45816  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45817    unix_path=`$CYGPATH -u "$windows_path"`
45818    new_path="$unix_path"
45819  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45820    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45821    new_path="$unix_path"
45822  fi
45823
45824  if test "x$path" != "x$new_path"; then
45825    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45826    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45827$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45828  fi
45829
45830  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45831  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45832
45833    else
45834      # We're on a unix platform. Hooray! :)
45835      path="$POTENTIAL_FREETYPE_LIB_PATH"
45836      has_space=`$ECHO "$path" | $GREP " "`
45837      if test "x$has_space" != x; then
45838        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45839$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45840        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45841      fi
45842
45843      # Use eval to expand a potential ~
45844      eval path="$path"
45845      if test ! -f "$path" && test ! -d "$path"; then
45846        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45847      fi
45848
45849      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45850    fi
45851  fi
45852
45853
45854    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45855    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45856$as_echo_n "checking for freetype includes... " >&6; }
45857    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45858$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45859    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45860    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45861$as_echo_n "checking for freetype libraries... " >&6; }
45862    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45863$as_echo "$FREETYPE_LIB_PATH" >&6; }
45864  fi
45865
45866          fi
45867        else
45868          FREETYPE_BASE_DIR="$SYSROOT/usr"
45869
45870  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45871  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45872  METHOD="well-known location"
45873
45874  # Let's start with an optimistic view of the world :-)
45875  FOUND_FREETYPE=yes
45876
45877  # First look for the canonical freetype main include file ft2build.h.
45878  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45879    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45880    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45881    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45882      # Fail.
45883      FOUND_FREETYPE=no
45884    fi
45885  fi
45886
45887  if test "x$FOUND_FREETYPE" = xyes; then
45888    # Include file found, let's continue the sanity check.
45889    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45890$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45891
45892    # Reset to default value
45893    FREETYPE_BASE_NAME=freetype
45894    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45895    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45896      if test "x$OPENJDK_TARGET_OS" = xmacosx \
45897          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45898        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45899        # for the .6 version explicitly.
45900        FREETYPE_BASE_NAME=freetype.6
45901        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45902        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45903$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45904      else
45905        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45906$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45907        FOUND_FREETYPE=no
45908      fi
45909    else
45910      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45911        # On Windows, we will need both .lib and .dll file.
45912        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45913          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45914$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45915          FOUND_FREETYPE=no
45916        fi
45917      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45918          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45919        # Found lib in isa dir, use that instead.
45920        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45921        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45922$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45923      fi
45924    fi
45925  fi
45926
45927  if test "x$FOUND_FREETYPE" = xyes; then
45928
45929  # Only process if variable expands to non-empty
45930
45931  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
45932    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45933
45934  # Input might be given as Windows format, start by converting to
45935  # unix format.
45936  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45937  new_path=`$CYGPATH -u "$path"`
45938
45939  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45940  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45941  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45942  # "foo.exe" is OK but "foo" is an error.
45943  #
45944  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45945  # It is also a way to make sure we got the proper file name for the real test later on.
45946  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45947  if test "x$test_shortpath" = x; then
45948    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45949$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45950    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45951  fi
45952
45953  # Call helper function which possibly converts this using DOS-style short mode.
45954  # If so, the updated path is stored in $new_path.
45955
45956  input_path="$new_path"
45957  # Check if we need to convert this using DOS-style short mode. If the path
45958  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45959  # take no chances and rewrite it.
45960  # Note: m4 eats our [], so we need to use [ and ] instead.
45961  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45962  if test "x$has_forbidden_chars" != x; then
45963    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45964    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45965    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45966    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45967      # Going to short mode and back again did indeed matter. Since short mode is
45968      # case insensitive, let's make it lowercase to improve readability.
45969      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45970      # Now convert it back to Unix-style (cygpath)
45971      input_path=`$CYGPATH -u "$shortmode_path"`
45972      new_path="$input_path"
45973    fi
45974  fi
45975
45976  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45977  if test "x$test_cygdrive_prefix" = x; then
45978    # As a simple fix, exclude /usr/bin since it's not a real path.
45979    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45980      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45981      # a path prefixed by /cygdrive for fixpath to work.
45982      new_path="$CYGWIN_ROOT_PATH$input_path"
45983    fi
45984  fi
45985
45986
45987  if test "x$path" != "x$new_path"; then
45988    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45989    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45990$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45991  fi
45992
45993    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45994
45995  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45996  has_colon=`$ECHO $path | $GREP ^.:`
45997  new_path="$path"
45998  if test "x$has_colon" = x; then
45999    # Not in mixed or Windows style, start by that.
46000    new_path=`cmd //c echo $path`
46001  fi
46002
46003
46004  input_path="$new_path"
46005  # Check if we need to convert this using DOS-style short mode. If the path
46006  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46007  # take no chances and rewrite it.
46008  # Note: m4 eats our [], so we need to use [ and ] instead.
46009  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46010  if test "x$has_forbidden_chars" != x; then
46011    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46012    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46013  fi
46014
46015
46016  windows_path="$new_path"
46017  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46018    unix_path=`$CYGPATH -u "$windows_path"`
46019    new_path="$unix_path"
46020  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46021    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46022    new_path="$unix_path"
46023  fi
46024
46025  if test "x$path" != "x$new_path"; then
46026    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46027    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46028$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46029  fi
46030
46031  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46032  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46033
46034    else
46035      # We're on a unix platform. Hooray! :)
46036      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46037      has_space=`$ECHO "$path" | $GREP " "`
46038      if test "x$has_space" != x; then
46039        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46040$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46041        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46042      fi
46043
46044      # Use eval to expand a potential ~
46045      eval path="$path"
46046      if test ! -f "$path" && test ! -d "$path"; then
46047        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46048      fi
46049
46050      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46051    fi
46052  fi
46053
46054
46055  # Only process if variable expands to non-empty
46056
46057  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
46058    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46059
46060  # Input might be given as Windows format, start by converting to
46061  # unix format.
46062  path="$POTENTIAL_FREETYPE_LIB_PATH"
46063  new_path=`$CYGPATH -u "$path"`
46064
46065  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46066  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46067  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46068  # "foo.exe" is OK but "foo" is an error.
46069  #
46070  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46071  # It is also a way to make sure we got the proper file name for the real test later on.
46072  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46073  if test "x$test_shortpath" = x; then
46074    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46075$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46076    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46077  fi
46078
46079  # Call helper function which possibly converts this using DOS-style short mode.
46080  # If so, the updated path is stored in $new_path.
46081
46082  input_path="$new_path"
46083  # Check if we need to convert this using DOS-style short mode. If the path
46084  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46085  # take no chances and rewrite it.
46086  # Note: m4 eats our [], so we need to use [ and ] instead.
46087  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46088  if test "x$has_forbidden_chars" != x; then
46089    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46090    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46091    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46092    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46093      # Going to short mode and back again did indeed matter. Since short mode is
46094      # case insensitive, let's make it lowercase to improve readability.
46095      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46096      # Now convert it back to Unix-style (cygpath)
46097      input_path=`$CYGPATH -u "$shortmode_path"`
46098      new_path="$input_path"
46099    fi
46100  fi
46101
46102  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46103  if test "x$test_cygdrive_prefix" = x; then
46104    # As a simple fix, exclude /usr/bin since it's not a real path.
46105    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46106      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46107      # a path prefixed by /cygdrive for fixpath to work.
46108      new_path="$CYGWIN_ROOT_PATH$input_path"
46109    fi
46110  fi
46111
46112
46113  if test "x$path" != "x$new_path"; then
46114    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46115    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46116$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46117  fi
46118
46119    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46120
46121  path="$POTENTIAL_FREETYPE_LIB_PATH"
46122  has_colon=`$ECHO $path | $GREP ^.:`
46123  new_path="$path"
46124  if test "x$has_colon" = x; then
46125    # Not in mixed or Windows style, start by that.
46126    new_path=`cmd //c echo $path`
46127  fi
46128
46129
46130  input_path="$new_path"
46131  # Check if we need to convert this using DOS-style short mode. If the path
46132  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46133  # take no chances and rewrite it.
46134  # Note: m4 eats our [], so we need to use [ and ] instead.
46135  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46136  if test "x$has_forbidden_chars" != x; then
46137    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46138    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46139  fi
46140
46141
46142  windows_path="$new_path"
46143  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46144    unix_path=`$CYGPATH -u "$windows_path"`
46145    new_path="$unix_path"
46146  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46147    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46148    new_path="$unix_path"
46149  fi
46150
46151  if test "x$path" != "x$new_path"; then
46152    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46153    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46154$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46155  fi
46156
46157  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46158  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46159
46160    else
46161      # We're on a unix platform. Hooray! :)
46162      path="$POTENTIAL_FREETYPE_LIB_PATH"
46163      has_space=`$ECHO "$path" | $GREP " "`
46164      if test "x$has_space" != x; then
46165        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46166$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46167        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46168      fi
46169
46170      # Use eval to expand a potential ~
46171      eval path="$path"
46172      if test ! -f "$path" && test ! -d "$path"; then
46173        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46174      fi
46175
46176      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46177    fi
46178  fi
46179
46180
46181    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46182    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46183$as_echo_n "checking for freetype includes... " >&6; }
46184    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46185$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46186    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46187    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46188$as_echo_n "checking for freetype libraries... " >&6; }
46189    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46190$as_echo "$FREETYPE_LIB_PATH" >&6; }
46191  fi
46192
46193
46194          if test "x$FOUND_FREETYPE" != xyes; then
46195            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
46196
46197  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46198  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46199  METHOD="well-known location"
46200
46201  # Let's start with an optimistic view of the world :-)
46202  FOUND_FREETYPE=yes
46203
46204  # First look for the canonical freetype main include file ft2build.h.
46205  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46206    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46207    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46208    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46209      # Fail.
46210      FOUND_FREETYPE=no
46211    fi
46212  fi
46213
46214  if test "x$FOUND_FREETYPE" = xyes; then
46215    # Include file found, let's continue the sanity check.
46216    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46217$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46218
46219    # Reset to default value
46220    FREETYPE_BASE_NAME=freetype
46221    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46222    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46223      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46224          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46225        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46226        # for the .6 version explicitly.
46227        FREETYPE_BASE_NAME=freetype.6
46228        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46229        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46230$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46231      else
46232        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46233$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46234        FOUND_FREETYPE=no
46235      fi
46236    else
46237      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46238        # On Windows, we will need both .lib and .dll file.
46239        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46240          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46241$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46242          FOUND_FREETYPE=no
46243        fi
46244      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46245          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46246        # Found lib in isa dir, use that instead.
46247        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46248        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46249$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46250      fi
46251    fi
46252  fi
46253
46254  if test "x$FOUND_FREETYPE" = xyes; then
46255
46256  # Only process if variable expands to non-empty
46257
46258  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
46259    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46260
46261  # Input might be given as Windows format, start by converting to
46262  # unix format.
46263  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46264  new_path=`$CYGPATH -u "$path"`
46265
46266  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46267  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46268  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46269  # "foo.exe" is OK but "foo" is an error.
46270  #
46271  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46272  # It is also a way to make sure we got the proper file name for the real test later on.
46273  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46274  if test "x$test_shortpath" = x; then
46275    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46276$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46277    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46278  fi
46279
46280  # Call helper function which possibly converts this using DOS-style short mode.
46281  # If so, the updated path is stored in $new_path.
46282
46283  input_path="$new_path"
46284  # Check if we need to convert this using DOS-style short mode. If the path
46285  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46286  # take no chances and rewrite it.
46287  # Note: m4 eats our [], so we need to use [ and ] instead.
46288  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46289  if test "x$has_forbidden_chars" != x; then
46290    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46291    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46292    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46293    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46294      # Going to short mode and back again did indeed matter. Since short mode is
46295      # case insensitive, let's make it lowercase to improve readability.
46296      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46297      # Now convert it back to Unix-style (cygpath)
46298      input_path=`$CYGPATH -u "$shortmode_path"`
46299      new_path="$input_path"
46300    fi
46301  fi
46302
46303  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46304  if test "x$test_cygdrive_prefix" = x; then
46305    # As a simple fix, exclude /usr/bin since it's not a real path.
46306    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46307      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46308      # a path prefixed by /cygdrive for fixpath to work.
46309      new_path="$CYGWIN_ROOT_PATH$input_path"
46310    fi
46311  fi
46312
46313
46314  if test "x$path" != "x$new_path"; then
46315    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46316    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46317$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46318  fi
46319
46320    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46321
46322  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46323  has_colon=`$ECHO $path | $GREP ^.:`
46324  new_path="$path"
46325  if test "x$has_colon" = x; then
46326    # Not in mixed or Windows style, start by that.
46327    new_path=`cmd //c echo $path`
46328  fi
46329
46330
46331  input_path="$new_path"
46332  # Check if we need to convert this using DOS-style short mode. If the path
46333  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46334  # take no chances and rewrite it.
46335  # Note: m4 eats our [], so we need to use [ and ] instead.
46336  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46337  if test "x$has_forbidden_chars" != x; then
46338    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46339    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46340  fi
46341
46342
46343  windows_path="$new_path"
46344  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46345    unix_path=`$CYGPATH -u "$windows_path"`
46346    new_path="$unix_path"
46347  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46348    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46349    new_path="$unix_path"
46350  fi
46351
46352  if test "x$path" != "x$new_path"; then
46353    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46354    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46355$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46356  fi
46357
46358  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46359  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46360
46361    else
46362      # We're on a unix platform. Hooray! :)
46363      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46364      has_space=`$ECHO "$path" | $GREP " "`
46365      if test "x$has_space" != x; then
46366        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46367$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46368        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46369      fi
46370
46371      # Use eval to expand a potential ~
46372      eval path="$path"
46373      if test ! -f "$path" && test ! -d "$path"; then
46374        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46375      fi
46376
46377      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46378    fi
46379  fi
46380
46381
46382  # Only process if variable expands to non-empty
46383
46384  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
46385    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46386
46387  # Input might be given as Windows format, start by converting to
46388  # unix format.
46389  path="$POTENTIAL_FREETYPE_LIB_PATH"
46390  new_path=`$CYGPATH -u "$path"`
46391
46392  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46393  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46394  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46395  # "foo.exe" is OK but "foo" is an error.
46396  #
46397  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46398  # It is also a way to make sure we got the proper file name for the real test later on.
46399  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46400  if test "x$test_shortpath" = x; then
46401    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46402$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46403    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46404  fi
46405
46406  # Call helper function which possibly converts this using DOS-style short mode.
46407  # If so, the updated path is stored in $new_path.
46408
46409  input_path="$new_path"
46410  # Check if we need to convert this using DOS-style short mode. If the path
46411  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46412  # take no chances and rewrite it.
46413  # Note: m4 eats our [], so we need to use [ and ] instead.
46414  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46415  if test "x$has_forbidden_chars" != x; then
46416    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46417    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46418    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46419    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46420      # Going to short mode and back again did indeed matter. Since short mode is
46421      # case insensitive, let's make it lowercase to improve readability.
46422      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46423      # Now convert it back to Unix-style (cygpath)
46424      input_path=`$CYGPATH -u "$shortmode_path"`
46425      new_path="$input_path"
46426    fi
46427  fi
46428
46429  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46430  if test "x$test_cygdrive_prefix" = x; then
46431    # As a simple fix, exclude /usr/bin since it's not a real path.
46432    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46433      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46434      # a path prefixed by /cygdrive for fixpath to work.
46435      new_path="$CYGWIN_ROOT_PATH$input_path"
46436    fi
46437  fi
46438
46439
46440  if test "x$path" != "x$new_path"; then
46441    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46442    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46443$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46444  fi
46445
46446    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46447
46448  path="$POTENTIAL_FREETYPE_LIB_PATH"
46449  has_colon=`$ECHO $path | $GREP ^.:`
46450  new_path="$path"
46451  if test "x$has_colon" = x; then
46452    # Not in mixed or Windows style, start by that.
46453    new_path=`cmd //c echo $path`
46454  fi
46455
46456
46457  input_path="$new_path"
46458  # Check if we need to convert this using DOS-style short mode. If the path
46459  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46460  # take no chances and rewrite it.
46461  # Note: m4 eats our [], so we need to use [ and ] instead.
46462  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46463  if test "x$has_forbidden_chars" != x; then
46464    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46465    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46466  fi
46467
46468
46469  windows_path="$new_path"
46470  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46471    unix_path=`$CYGPATH -u "$windows_path"`
46472    new_path="$unix_path"
46473  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46474    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46475    new_path="$unix_path"
46476  fi
46477
46478  if test "x$path" != "x$new_path"; then
46479    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46480    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46481$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46482  fi
46483
46484  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46485  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46486
46487    else
46488      # We're on a unix platform. Hooray! :)
46489      path="$POTENTIAL_FREETYPE_LIB_PATH"
46490      has_space=`$ECHO "$path" | $GREP " "`
46491      if test "x$has_space" != x; then
46492        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46493$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46494        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46495      fi
46496
46497      # Use eval to expand a potential ~
46498      eval path="$path"
46499      if test ! -f "$path" && test ! -d "$path"; then
46500        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46501      fi
46502
46503      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46504    fi
46505  fi
46506
46507
46508    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46509    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46510$as_echo_n "checking for freetype includes... " >&6; }
46511    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46512$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46513    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46514    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46515$as_echo_n "checking for freetype libraries... " >&6; }
46516    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46517$as_echo "$FREETYPE_LIB_PATH" >&6; }
46518  fi
46519
46520          fi
46521
46522          if test "x$FOUND_FREETYPE" != xyes; then
46523            FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
46524
46525  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46526  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46527  METHOD="well-known location"
46528
46529  # Let's start with an optimistic view of the world :-)
46530  FOUND_FREETYPE=yes
46531
46532  # First look for the canonical freetype main include file ft2build.h.
46533  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46534    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46535    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46536    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46537      # Fail.
46538      FOUND_FREETYPE=no
46539    fi
46540  fi
46541
46542  if test "x$FOUND_FREETYPE" = xyes; then
46543    # Include file found, let's continue the sanity check.
46544    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46545$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46546
46547    # Reset to default value
46548    FREETYPE_BASE_NAME=freetype
46549    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46550    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46551      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46552          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46553        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46554        # for the .6 version explicitly.
46555        FREETYPE_BASE_NAME=freetype.6
46556        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46557        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46558$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46559      else
46560        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46561$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46562        FOUND_FREETYPE=no
46563      fi
46564    else
46565      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46566        # On Windows, we will need both .lib and .dll file.
46567        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46568          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46569$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46570          FOUND_FREETYPE=no
46571        fi
46572      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46573          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46574        # Found lib in isa dir, use that instead.
46575        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46576        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46577$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46578      fi
46579    fi
46580  fi
46581
46582  if test "x$FOUND_FREETYPE" = xyes; then
46583
46584  # Only process if variable expands to non-empty
46585
46586  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
46587    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46588
46589  # Input might be given as Windows format, start by converting to
46590  # unix format.
46591  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46592  new_path=`$CYGPATH -u "$path"`
46593
46594  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46595  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46596  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46597  # "foo.exe" is OK but "foo" is an error.
46598  #
46599  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46600  # It is also a way to make sure we got the proper file name for the real test later on.
46601  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46602  if test "x$test_shortpath" = x; then
46603    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46604$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46605    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46606  fi
46607
46608  # Call helper function which possibly converts this using DOS-style short mode.
46609  # If so, the updated path is stored in $new_path.
46610
46611  input_path="$new_path"
46612  # Check if we need to convert this using DOS-style short mode. If the path
46613  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46614  # take no chances and rewrite it.
46615  # Note: m4 eats our [], so we need to use [ and ] instead.
46616  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46617  if test "x$has_forbidden_chars" != x; then
46618    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46619    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46620    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46621    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46622      # Going to short mode and back again did indeed matter. Since short mode is
46623      # case insensitive, let's make it lowercase to improve readability.
46624      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46625      # Now convert it back to Unix-style (cygpath)
46626      input_path=`$CYGPATH -u "$shortmode_path"`
46627      new_path="$input_path"
46628    fi
46629  fi
46630
46631  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46632  if test "x$test_cygdrive_prefix" = x; then
46633    # As a simple fix, exclude /usr/bin since it's not a real path.
46634    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46635      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46636      # a path prefixed by /cygdrive for fixpath to work.
46637      new_path="$CYGWIN_ROOT_PATH$input_path"
46638    fi
46639  fi
46640
46641
46642  if test "x$path" != "x$new_path"; then
46643    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46644    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46645$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46646  fi
46647
46648    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46649
46650  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46651  has_colon=`$ECHO $path | $GREP ^.:`
46652  new_path="$path"
46653  if test "x$has_colon" = x; then
46654    # Not in mixed or Windows style, start by that.
46655    new_path=`cmd //c echo $path`
46656  fi
46657
46658
46659  input_path="$new_path"
46660  # Check if we need to convert this using DOS-style short mode. If the path
46661  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46662  # take no chances and rewrite it.
46663  # Note: m4 eats our [], so we need to use [ and ] instead.
46664  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46665  if test "x$has_forbidden_chars" != x; then
46666    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46667    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46668  fi
46669
46670
46671  windows_path="$new_path"
46672  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46673    unix_path=`$CYGPATH -u "$windows_path"`
46674    new_path="$unix_path"
46675  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46676    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46677    new_path="$unix_path"
46678  fi
46679
46680  if test "x$path" != "x$new_path"; then
46681    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46682    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46683$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46684  fi
46685
46686  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46687  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46688
46689    else
46690      # We're on a unix platform. Hooray! :)
46691      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46692      has_space=`$ECHO "$path" | $GREP " "`
46693      if test "x$has_space" != x; then
46694        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46695$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46696        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46697      fi
46698
46699      # Use eval to expand a potential ~
46700      eval path="$path"
46701      if test ! -f "$path" && test ! -d "$path"; then
46702        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46703      fi
46704
46705      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46706    fi
46707  fi
46708
46709
46710  # Only process if variable expands to non-empty
46711
46712  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
46713    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46714
46715  # Input might be given as Windows format, start by converting to
46716  # unix format.
46717  path="$POTENTIAL_FREETYPE_LIB_PATH"
46718  new_path=`$CYGPATH -u "$path"`
46719
46720  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46721  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46722  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46723  # "foo.exe" is OK but "foo" is an error.
46724  #
46725  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46726  # It is also a way to make sure we got the proper file name for the real test later on.
46727  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46728  if test "x$test_shortpath" = x; then
46729    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46730$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46731    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46732  fi
46733
46734  # Call helper function which possibly converts this using DOS-style short mode.
46735  # If so, the updated path is stored in $new_path.
46736
46737  input_path="$new_path"
46738  # Check if we need to convert this using DOS-style short mode. If the path
46739  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46740  # take no chances and rewrite it.
46741  # Note: m4 eats our [], so we need to use [ and ] instead.
46742  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46743  if test "x$has_forbidden_chars" != x; then
46744    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46745    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46746    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46747    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46748      # Going to short mode and back again did indeed matter. Since short mode is
46749      # case insensitive, let's make it lowercase to improve readability.
46750      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46751      # Now convert it back to Unix-style (cygpath)
46752      input_path=`$CYGPATH -u "$shortmode_path"`
46753      new_path="$input_path"
46754    fi
46755  fi
46756
46757  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46758  if test "x$test_cygdrive_prefix" = x; then
46759    # As a simple fix, exclude /usr/bin since it's not a real path.
46760    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46761      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46762      # a path prefixed by /cygdrive for fixpath to work.
46763      new_path="$CYGWIN_ROOT_PATH$input_path"
46764    fi
46765  fi
46766
46767
46768  if test "x$path" != "x$new_path"; then
46769    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46770    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46771$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46772  fi
46773
46774    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46775
46776  path="$POTENTIAL_FREETYPE_LIB_PATH"
46777  has_colon=`$ECHO $path | $GREP ^.:`
46778  new_path="$path"
46779  if test "x$has_colon" = x; then
46780    # Not in mixed or Windows style, start by that.
46781    new_path=`cmd //c echo $path`
46782  fi
46783
46784
46785  input_path="$new_path"
46786  # Check if we need to convert this using DOS-style short mode. If the path
46787  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46788  # take no chances and rewrite it.
46789  # Note: m4 eats our [], so we need to use [ and ] instead.
46790  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46791  if test "x$has_forbidden_chars" != x; then
46792    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46793    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46794  fi
46795
46796
46797  windows_path="$new_path"
46798  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46799    unix_path=`$CYGPATH -u "$windows_path"`
46800    new_path="$unix_path"
46801  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46802    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46803    new_path="$unix_path"
46804  fi
46805
46806  if test "x$path" != "x$new_path"; then
46807    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46808    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46809$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46810  fi
46811
46812  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46813  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46814
46815    else
46816      # We're on a unix platform. Hooray! :)
46817      path="$POTENTIAL_FREETYPE_LIB_PATH"
46818      has_space=`$ECHO "$path" | $GREP " "`
46819      if test "x$has_space" != x; then
46820        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46821$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46822        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46823      fi
46824
46825      # Use eval to expand a potential ~
46826      eval path="$path"
46827      if test ! -f "$path" && test ! -d "$path"; then
46828        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46829      fi
46830
46831      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46832    fi
46833  fi
46834
46835
46836    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46837    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46838$as_echo_n "checking for freetype includes... " >&6; }
46839    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46840$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46841    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46842    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46843$as_echo_n "checking for freetype libraries... " >&6; }
46844    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46845$as_echo "$FREETYPE_LIB_PATH" >&6; }
46846  fi
46847
46848          fi
46849
46850          if test "x$FOUND_FREETYPE" != xyes; then
46851            FREETYPE_BASE_DIR="$SYSROOT/usr"
46852            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
46853
46854  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46855  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
46856  METHOD="well-known location"
46857
46858  # Let's start with an optimistic view of the world :-)
46859  FOUND_FREETYPE=yes
46860
46861  # First look for the canonical freetype main include file ft2build.h.
46862  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46863    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46864    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46865    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46866      # Fail.
46867      FOUND_FREETYPE=no
46868    fi
46869  fi
46870
46871  if test "x$FOUND_FREETYPE" = xyes; then
46872    # Include file found, let's continue the sanity check.
46873    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46874$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46875
46876    # Reset to default value
46877    FREETYPE_BASE_NAME=freetype
46878    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46879    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46880      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46881          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46882        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46883        # for the .6 version explicitly.
46884        FREETYPE_BASE_NAME=freetype.6
46885        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46886        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46887$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46888      else
46889        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46890$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46891        FOUND_FREETYPE=no
46892      fi
46893    else
46894      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46895        # On Windows, we will need both .lib and .dll file.
46896        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46897          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46898$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46899          FOUND_FREETYPE=no
46900        fi
46901      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46902          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46903        # Found lib in isa dir, use that instead.
46904        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46905        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46906$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46907      fi
46908    fi
46909  fi
46910
46911  if test "x$FOUND_FREETYPE" = xyes; then
46912
46913  # Only process if variable expands to non-empty
46914
46915  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
46916    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46917
46918  # Input might be given as Windows format, start by converting to
46919  # unix format.
46920  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46921  new_path=`$CYGPATH -u "$path"`
46922
46923  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46924  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46925  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46926  # "foo.exe" is OK but "foo" is an error.
46927  #
46928  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46929  # It is also a way to make sure we got the proper file name for the real test later on.
46930  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46931  if test "x$test_shortpath" = x; then
46932    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46933$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46934    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46935  fi
46936
46937  # Call helper function which possibly converts this using DOS-style short mode.
46938  # If so, the updated path is stored in $new_path.
46939
46940  input_path="$new_path"
46941  # Check if we need to convert this using DOS-style short mode. If the path
46942  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46943  # take no chances and rewrite it.
46944  # Note: m4 eats our [], so we need to use [ and ] instead.
46945  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46946  if test "x$has_forbidden_chars" != x; then
46947    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46948    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46949    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46950    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46951      # Going to short mode and back again did indeed matter. Since short mode is
46952      # case insensitive, let's make it lowercase to improve readability.
46953      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46954      # Now convert it back to Unix-style (cygpath)
46955      input_path=`$CYGPATH -u "$shortmode_path"`
46956      new_path="$input_path"
46957    fi
46958  fi
46959
46960  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46961  if test "x$test_cygdrive_prefix" = x; then
46962    # As a simple fix, exclude /usr/bin since it's not a real path.
46963    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46964      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46965      # a path prefixed by /cygdrive for fixpath to work.
46966      new_path="$CYGWIN_ROOT_PATH$input_path"
46967    fi
46968  fi
46969
46970
46971  if test "x$path" != "x$new_path"; then
46972    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46973    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46974$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46975  fi
46976
46977    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46978
46979  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46980  has_colon=`$ECHO $path | $GREP ^.:`
46981  new_path="$path"
46982  if test "x$has_colon" = x; then
46983    # Not in mixed or Windows style, start by that.
46984    new_path=`cmd //c echo $path`
46985  fi
46986
46987
46988  input_path="$new_path"
46989  # Check if we need to convert this using DOS-style short mode. If the path
46990  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46991  # take no chances and rewrite it.
46992  # Note: m4 eats our [], so we need to use [ and ] instead.
46993  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46994  if test "x$has_forbidden_chars" != x; then
46995    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46996    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46997  fi
46998
46999
47000  windows_path="$new_path"
47001  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47002    unix_path=`$CYGPATH -u "$windows_path"`
47003    new_path="$unix_path"
47004  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47005    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47006    new_path="$unix_path"
47007  fi
47008
47009  if test "x$path" != "x$new_path"; then
47010    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47011    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47012$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47013  fi
47014
47015  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47016  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47017
47018    else
47019      # We're on a unix platform. Hooray! :)
47020      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47021      has_space=`$ECHO "$path" | $GREP " "`
47022      if test "x$has_space" != x; then
47023        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47024$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47025        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47026      fi
47027
47028      # Use eval to expand a potential ~
47029      eval path="$path"
47030      if test ! -f "$path" && test ! -d "$path"; then
47031        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47032      fi
47033
47034      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47035    fi
47036  fi
47037
47038
47039  # Only process if variable expands to non-empty
47040
47041  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
47042    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47043
47044  # Input might be given as Windows format, start by converting to
47045  # unix format.
47046  path="$POTENTIAL_FREETYPE_LIB_PATH"
47047  new_path=`$CYGPATH -u "$path"`
47048
47049  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47050  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47051  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47052  # "foo.exe" is OK but "foo" is an error.
47053  #
47054  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47055  # It is also a way to make sure we got the proper file name for the real test later on.
47056  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47057  if test "x$test_shortpath" = x; then
47058    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47059$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47060    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47061  fi
47062
47063  # Call helper function which possibly converts this using DOS-style short mode.
47064  # If so, the updated path is stored in $new_path.
47065
47066  input_path="$new_path"
47067  # Check if we need to convert this using DOS-style short mode. If the path
47068  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47069  # take no chances and rewrite it.
47070  # Note: m4 eats our [], so we need to use [ and ] instead.
47071  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47072  if test "x$has_forbidden_chars" != x; then
47073    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47074    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47075    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47076    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47077      # Going to short mode and back again did indeed matter. Since short mode is
47078      # case insensitive, let's make it lowercase to improve readability.
47079      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47080      # Now convert it back to Unix-style (cygpath)
47081      input_path=`$CYGPATH -u "$shortmode_path"`
47082      new_path="$input_path"
47083    fi
47084  fi
47085
47086  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47087  if test "x$test_cygdrive_prefix" = x; then
47088    # As a simple fix, exclude /usr/bin since it's not a real path.
47089    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47090      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47091      # a path prefixed by /cygdrive for fixpath to work.
47092      new_path="$CYGWIN_ROOT_PATH$input_path"
47093    fi
47094  fi
47095
47096
47097  if test "x$path" != "x$new_path"; then
47098    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47099    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47100$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47101  fi
47102
47103    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47104
47105  path="$POTENTIAL_FREETYPE_LIB_PATH"
47106  has_colon=`$ECHO $path | $GREP ^.:`
47107  new_path="$path"
47108  if test "x$has_colon" = x; then
47109    # Not in mixed or Windows style, start by that.
47110    new_path=`cmd //c echo $path`
47111  fi
47112
47113
47114  input_path="$new_path"
47115  # Check if we need to convert this using DOS-style short mode. If the path
47116  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47117  # take no chances and rewrite it.
47118  # Note: m4 eats our [], so we need to use [ and ] instead.
47119  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47120  if test "x$has_forbidden_chars" != x; then
47121    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47122    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47123  fi
47124
47125
47126  windows_path="$new_path"
47127  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47128    unix_path=`$CYGPATH -u "$windows_path"`
47129    new_path="$unix_path"
47130  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47131    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47132    new_path="$unix_path"
47133  fi
47134
47135  if test "x$path" != "x$new_path"; then
47136    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47137    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47138$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47139  fi
47140
47141  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47142  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47143
47144    else
47145      # We're on a unix platform. Hooray! :)
47146      path="$POTENTIAL_FREETYPE_LIB_PATH"
47147      has_space=`$ECHO "$path" | $GREP " "`
47148      if test "x$has_space" != x; then
47149        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47150$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47151        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47152      fi
47153
47154      # Use eval to expand a potential ~
47155      eval path="$path"
47156      if test ! -f "$path" && test ! -d "$path"; then
47157        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47158      fi
47159
47160      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47161    fi
47162  fi
47163
47164
47165    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47166    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47167$as_echo_n "checking for freetype includes... " >&6; }
47168    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47169$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47170    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47171    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47172$as_echo_n "checking for freetype libraries... " >&6; }
47173    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47174$as_echo "$FREETYPE_LIB_PATH" >&6; }
47175  fi
47176
47177            else
47178
47179  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47180  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
47181  METHOD="well-known location"
47182
47183  # Let's start with an optimistic view of the world :-)
47184  FOUND_FREETYPE=yes
47185
47186  # First look for the canonical freetype main include file ft2build.h.
47187  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47188    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47189    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47190    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47191      # Fail.
47192      FOUND_FREETYPE=no
47193    fi
47194  fi
47195
47196  if test "x$FOUND_FREETYPE" = xyes; then
47197    # Include file found, let's continue the sanity check.
47198    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47199$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47200
47201    # Reset to default value
47202    FREETYPE_BASE_NAME=freetype
47203    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47204    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47205      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47206          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47207        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47208        # for the .6 version explicitly.
47209        FREETYPE_BASE_NAME=freetype.6
47210        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47211        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47212$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47213      else
47214        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47215$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47216        FOUND_FREETYPE=no
47217      fi
47218    else
47219      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47220        # On Windows, we will need both .lib and .dll file.
47221        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47222          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47223$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47224          FOUND_FREETYPE=no
47225        fi
47226      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47227          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47228        # Found lib in isa dir, use that instead.
47229        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47230        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47231$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47232      fi
47233    fi
47234  fi
47235
47236  if test "x$FOUND_FREETYPE" = xyes; then
47237
47238  # Only process if variable expands to non-empty
47239
47240  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
47241    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47242
47243  # Input might be given as Windows format, start by converting to
47244  # unix format.
47245  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47246  new_path=`$CYGPATH -u "$path"`
47247
47248  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47249  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47250  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47251  # "foo.exe" is OK but "foo" is an error.
47252  #
47253  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47254  # It is also a way to make sure we got the proper file name for the real test later on.
47255  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47256  if test "x$test_shortpath" = x; then
47257    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47258$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47259    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47260  fi
47261
47262  # Call helper function which possibly converts this using DOS-style short mode.
47263  # If so, the updated path is stored in $new_path.
47264
47265  input_path="$new_path"
47266  # Check if we need to convert this using DOS-style short mode. If the path
47267  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47268  # take no chances and rewrite it.
47269  # Note: m4 eats our [], so we need to use [ and ] instead.
47270  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47271  if test "x$has_forbidden_chars" != x; then
47272    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47273    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47274    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47275    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47276      # Going to short mode and back again did indeed matter. Since short mode is
47277      # case insensitive, let's make it lowercase to improve readability.
47278      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47279      # Now convert it back to Unix-style (cygpath)
47280      input_path=`$CYGPATH -u "$shortmode_path"`
47281      new_path="$input_path"
47282    fi
47283  fi
47284
47285  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47286  if test "x$test_cygdrive_prefix" = x; then
47287    # As a simple fix, exclude /usr/bin since it's not a real path.
47288    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47289      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47290      # a path prefixed by /cygdrive for fixpath to work.
47291      new_path="$CYGWIN_ROOT_PATH$input_path"
47292    fi
47293  fi
47294
47295
47296  if test "x$path" != "x$new_path"; then
47297    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47298    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47299$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47300  fi
47301
47302    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47303
47304  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47305  has_colon=`$ECHO $path | $GREP ^.:`
47306  new_path="$path"
47307  if test "x$has_colon" = x; then
47308    # Not in mixed or Windows style, start by that.
47309    new_path=`cmd //c echo $path`
47310  fi
47311
47312
47313  input_path="$new_path"
47314  # Check if we need to convert this using DOS-style short mode. If the path
47315  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47316  # take no chances and rewrite it.
47317  # Note: m4 eats our [], so we need to use [ and ] instead.
47318  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47319  if test "x$has_forbidden_chars" != x; then
47320    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47321    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47322  fi
47323
47324
47325  windows_path="$new_path"
47326  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47327    unix_path=`$CYGPATH -u "$windows_path"`
47328    new_path="$unix_path"
47329  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47330    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47331    new_path="$unix_path"
47332  fi
47333
47334  if test "x$path" != "x$new_path"; then
47335    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47336    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47337$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47338  fi
47339
47340  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47341  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47342
47343    else
47344      # We're on a unix platform. Hooray! :)
47345      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47346      has_space=`$ECHO "$path" | $GREP " "`
47347      if test "x$has_space" != x; then
47348        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47349$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47350        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47351      fi
47352
47353      # Use eval to expand a potential ~
47354      eval path="$path"
47355      if test ! -f "$path" && test ! -d "$path"; then
47356        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47357      fi
47358
47359      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47360    fi
47361  fi
47362
47363
47364  # Only process if variable expands to non-empty
47365
47366  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
47367    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47368
47369  # Input might be given as Windows format, start by converting to
47370  # unix format.
47371  path="$POTENTIAL_FREETYPE_LIB_PATH"
47372  new_path=`$CYGPATH -u "$path"`
47373
47374  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47375  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47376  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47377  # "foo.exe" is OK but "foo" is an error.
47378  #
47379  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47380  # It is also a way to make sure we got the proper file name for the real test later on.
47381  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47382  if test "x$test_shortpath" = x; then
47383    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47384$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47385    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47386  fi
47387
47388  # Call helper function which possibly converts this using DOS-style short mode.
47389  # If so, the updated path is stored in $new_path.
47390
47391  input_path="$new_path"
47392  # Check if we need to convert this using DOS-style short mode. If the path
47393  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47394  # take no chances and rewrite it.
47395  # Note: m4 eats our [], so we need to use [ and ] instead.
47396  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47397  if test "x$has_forbidden_chars" != x; then
47398    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47399    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47400    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47401    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47402      # Going to short mode and back again did indeed matter. Since short mode is
47403      # case insensitive, let's make it lowercase to improve readability.
47404      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47405      # Now convert it back to Unix-style (cygpath)
47406      input_path=`$CYGPATH -u "$shortmode_path"`
47407      new_path="$input_path"
47408    fi
47409  fi
47410
47411  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47412  if test "x$test_cygdrive_prefix" = x; then
47413    # As a simple fix, exclude /usr/bin since it's not a real path.
47414    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47415      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47416      # a path prefixed by /cygdrive for fixpath to work.
47417      new_path="$CYGWIN_ROOT_PATH$input_path"
47418    fi
47419  fi
47420
47421
47422  if test "x$path" != "x$new_path"; then
47423    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47424    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47425$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47426  fi
47427
47428    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47429
47430  path="$POTENTIAL_FREETYPE_LIB_PATH"
47431  has_colon=`$ECHO $path | $GREP ^.:`
47432  new_path="$path"
47433  if test "x$has_colon" = x; then
47434    # Not in mixed or Windows style, start by that.
47435    new_path=`cmd //c echo $path`
47436  fi
47437
47438
47439  input_path="$new_path"
47440  # Check if we need to convert this using DOS-style short mode. If the path
47441  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47442  # take no chances and rewrite it.
47443  # Note: m4 eats our [], so we need to use [ and ] instead.
47444  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47445  if test "x$has_forbidden_chars" != x; then
47446    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47447    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47448  fi
47449
47450
47451  windows_path="$new_path"
47452  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47453    unix_path=`$CYGPATH -u "$windows_path"`
47454    new_path="$unix_path"
47455  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47456    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47457    new_path="$unix_path"
47458  fi
47459
47460  if test "x$path" != "x$new_path"; then
47461    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47462    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47463$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47464  fi
47465
47466  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47467  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47468
47469    else
47470      # We're on a unix platform. Hooray! :)
47471      path="$POTENTIAL_FREETYPE_LIB_PATH"
47472      has_space=`$ECHO "$path" | $GREP " "`
47473      if test "x$has_space" != x; then
47474        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47475$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47476        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47477      fi
47478
47479      # Use eval to expand a potential ~
47480      eval path="$path"
47481      if test ! -f "$path" && test ! -d "$path"; then
47482        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47483      fi
47484
47485      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47486    fi
47487  fi
47488
47489
47490    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47491    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47492$as_echo_n "checking for freetype includes... " >&6; }
47493    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47494$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47495    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47496    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47497$as_echo_n "checking for freetype libraries... " >&6; }
47498    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47499$as_echo "$FREETYPE_LIB_PATH" >&6; }
47500  fi
47501
47502              if test "x$FOUND_FREETYPE" != xyes; then
47503
47504  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47505  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
47506  METHOD="well-known location"
47507
47508  # Let's start with an optimistic view of the world :-)
47509  FOUND_FREETYPE=yes
47510
47511  # First look for the canonical freetype main include file ft2build.h.
47512  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47513    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47514    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47515    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47516      # Fail.
47517      FOUND_FREETYPE=no
47518    fi
47519  fi
47520
47521  if test "x$FOUND_FREETYPE" = xyes; then
47522    # Include file found, let's continue the sanity check.
47523    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47524$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47525
47526    # Reset to default value
47527    FREETYPE_BASE_NAME=freetype
47528    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47529    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47530      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47531          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47532        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47533        # for the .6 version explicitly.
47534        FREETYPE_BASE_NAME=freetype.6
47535        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47536        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47537$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47538      else
47539        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47540$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47541        FOUND_FREETYPE=no
47542      fi
47543    else
47544      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47545        # On Windows, we will need both .lib and .dll file.
47546        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47547          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47548$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47549          FOUND_FREETYPE=no
47550        fi
47551      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47552          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47553        # Found lib in isa dir, use that instead.
47554        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47555        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47556$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47557      fi
47558    fi
47559  fi
47560
47561  if test "x$FOUND_FREETYPE" = xyes; then
47562
47563  # Only process if variable expands to non-empty
47564
47565  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
47566    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47567
47568  # Input might be given as Windows format, start by converting to
47569  # unix format.
47570  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47571  new_path=`$CYGPATH -u "$path"`
47572
47573  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47574  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47575  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47576  # "foo.exe" is OK but "foo" is an error.
47577  #
47578  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47579  # It is also a way to make sure we got the proper file name for the real test later on.
47580  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47581  if test "x$test_shortpath" = x; then
47582    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47583$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47584    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47585  fi
47586
47587  # Call helper function which possibly converts this using DOS-style short mode.
47588  # If so, the updated path is stored in $new_path.
47589
47590  input_path="$new_path"
47591  # Check if we need to convert this using DOS-style short mode. If the path
47592  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47593  # take no chances and rewrite it.
47594  # Note: m4 eats our [], so we need to use [ and ] instead.
47595  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47596  if test "x$has_forbidden_chars" != x; then
47597    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47598    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47599    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47600    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47601      # Going to short mode and back again did indeed matter. Since short mode is
47602      # case insensitive, let's make it lowercase to improve readability.
47603      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47604      # Now convert it back to Unix-style (cygpath)
47605      input_path=`$CYGPATH -u "$shortmode_path"`
47606      new_path="$input_path"
47607    fi
47608  fi
47609
47610  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47611  if test "x$test_cygdrive_prefix" = x; then
47612    # As a simple fix, exclude /usr/bin since it's not a real path.
47613    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47614      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47615      # a path prefixed by /cygdrive for fixpath to work.
47616      new_path="$CYGWIN_ROOT_PATH$input_path"
47617    fi
47618  fi
47619
47620
47621  if test "x$path" != "x$new_path"; then
47622    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47623    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47624$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47625  fi
47626
47627    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47628
47629  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47630  has_colon=`$ECHO $path | $GREP ^.:`
47631  new_path="$path"
47632  if test "x$has_colon" = x; then
47633    # Not in mixed or Windows style, start by that.
47634    new_path=`cmd //c echo $path`
47635  fi
47636
47637
47638  input_path="$new_path"
47639  # Check if we need to convert this using DOS-style short mode. If the path
47640  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47641  # take no chances and rewrite it.
47642  # Note: m4 eats our [], so we need to use [ and ] instead.
47643  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47644  if test "x$has_forbidden_chars" != x; then
47645    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47646    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47647  fi
47648
47649
47650  windows_path="$new_path"
47651  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47652    unix_path=`$CYGPATH -u "$windows_path"`
47653    new_path="$unix_path"
47654  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47655    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47656    new_path="$unix_path"
47657  fi
47658
47659  if test "x$path" != "x$new_path"; then
47660    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47661    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47662$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47663  fi
47664
47665  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47666  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47667
47668    else
47669      # We're on a unix platform. Hooray! :)
47670      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47671      has_space=`$ECHO "$path" | $GREP " "`
47672      if test "x$has_space" != x; then
47673        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47674$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47675        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47676      fi
47677
47678      # Use eval to expand a potential ~
47679      eval path="$path"
47680      if test ! -f "$path" && test ! -d "$path"; then
47681        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47682      fi
47683
47684      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47685    fi
47686  fi
47687
47688
47689  # Only process if variable expands to non-empty
47690
47691  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
47692    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47693
47694  # Input might be given as Windows format, start by converting to
47695  # unix format.
47696  path="$POTENTIAL_FREETYPE_LIB_PATH"
47697  new_path=`$CYGPATH -u "$path"`
47698
47699  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47700  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47701  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47702  # "foo.exe" is OK but "foo" is an error.
47703  #
47704  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47705  # It is also a way to make sure we got the proper file name for the real test later on.
47706  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47707  if test "x$test_shortpath" = x; then
47708    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47709$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47710    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47711  fi
47712
47713  # Call helper function which possibly converts this using DOS-style short mode.
47714  # If so, the updated path is stored in $new_path.
47715
47716  input_path="$new_path"
47717  # Check if we need to convert this using DOS-style short mode. If the path
47718  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47719  # take no chances and rewrite it.
47720  # Note: m4 eats our [], so we need to use [ and ] instead.
47721  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47722  if test "x$has_forbidden_chars" != x; then
47723    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47724    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47725    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47726    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47727      # Going to short mode and back again did indeed matter. Since short mode is
47728      # case insensitive, let's make it lowercase to improve readability.
47729      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47730      # Now convert it back to Unix-style (cygpath)
47731      input_path=`$CYGPATH -u "$shortmode_path"`
47732      new_path="$input_path"
47733    fi
47734  fi
47735
47736  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47737  if test "x$test_cygdrive_prefix" = x; then
47738    # As a simple fix, exclude /usr/bin since it's not a real path.
47739    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47740      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47741      # a path prefixed by /cygdrive for fixpath to work.
47742      new_path="$CYGWIN_ROOT_PATH$input_path"
47743    fi
47744  fi
47745
47746
47747  if test "x$path" != "x$new_path"; then
47748    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47749    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47750$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47751  fi
47752
47753    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47754
47755  path="$POTENTIAL_FREETYPE_LIB_PATH"
47756  has_colon=`$ECHO $path | $GREP ^.:`
47757  new_path="$path"
47758  if test "x$has_colon" = x; then
47759    # Not in mixed or Windows style, start by that.
47760    new_path=`cmd //c echo $path`
47761  fi
47762
47763
47764  input_path="$new_path"
47765  # Check if we need to convert this using DOS-style short mode. If the path
47766  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47767  # take no chances and rewrite it.
47768  # Note: m4 eats our [], so we need to use [ and ] instead.
47769  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47770  if test "x$has_forbidden_chars" != x; then
47771    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47772    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47773  fi
47774
47775
47776  windows_path="$new_path"
47777  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47778    unix_path=`$CYGPATH -u "$windows_path"`
47779    new_path="$unix_path"
47780  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47781    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47782    new_path="$unix_path"
47783  fi
47784
47785  if test "x$path" != "x$new_path"; then
47786    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47787    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47788$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47789  fi
47790
47791  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47792  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47793
47794    else
47795      # We're on a unix platform. Hooray! :)
47796      path="$POTENTIAL_FREETYPE_LIB_PATH"
47797      has_space=`$ECHO "$path" | $GREP " "`
47798      if test "x$has_space" != x; then
47799        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47800$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47801        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47802      fi
47803
47804      # Use eval to expand a potential ~
47805      eval path="$path"
47806      if test ! -f "$path" && test ! -d "$path"; then
47807        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47808      fi
47809
47810      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47811    fi
47812  fi
47813
47814
47815    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47816    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47817$as_echo_n "checking for freetype includes... " >&6; }
47818    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47819$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47820    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47821    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47822$as_echo_n "checking for freetype libraries... " >&6; }
47823    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47824$as_echo "$FREETYPE_LIB_PATH" >&6; }
47825  fi
47826
47827              fi
47828            fi
47829          fi
47830        fi
47831      fi # end check in well-known locations
47832
47833      if test "x$FOUND_FREETYPE" != xyes; then
47834
47835  # Print a helpful message on how to acquire the necessary build dependency.
47836  # freetype is the help tag: freetype, cups, pulse, alsa etc
47837  MISSING_DEPENDENCY=freetype
47838
47839  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47840    cygwin_help $MISSING_DEPENDENCY
47841  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47842    msys_help $MISSING_DEPENDENCY
47843  else
47844    PKGHANDLER_COMMAND=
47845
47846    case $PKGHANDLER in
47847      apt-get)
47848        apt_help     $MISSING_DEPENDENCY ;;
47849      yum)
47850        yum_help     $MISSING_DEPENDENCY ;;
47851      port)
47852        port_help    $MISSING_DEPENDENCY ;;
47853      pkgutil)
47854        pkgutil_help $MISSING_DEPENDENCY ;;
47855      pkgadd)
47856        pkgadd_help  $MISSING_DEPENDENCY ;;
47857    esac
47858
47859    if test "x$PKGHANDLER_COMMAND" != x; then
47860      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
47861    fi
47862  fi
47863
47864        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
47865      fi
47866    fi # end user specified settings
47867
47868    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
47869    if test "x$FREETYPE_CFLAGS" = x; then
47870
47871  # Only process if variable expands to non-empty
47872
47873  if test "x$FREETYPE_INCLUDE_PATH" != x; then
47874    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47875
47876  # Input might be given as Windows format, start by converting to
47877  # unix format.
47878  path="$FREETYPE_INCLUDE_PATH"
47879  new_path=`$CYGPATH -u "$path"`
47880
47881  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47882  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47883  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47884  # "foo.exe" is OK but "foo" is an error.
47885  #
47886  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47887  # It is also a way to make sure we got the proper file name for the real test later on.
47888  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47889  if test "x$test_shortpath" = x; then
47890    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47891$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47892    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
47893  fi
47894
47895  # Call helper function which possibly converts this using DOS-style short mode.
47896  # If so, the updated path is stored in $new_path.
47897
47898  input_path="$new_path"
47899  # Check if we need to convert this using DOS-style short mode. If the path
47900  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47901  # take no chances and rewrite it.
47902  # Note: m4 eats our [], so we need to use [ and ] instead.
47903  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47904  if test "x$has_forbidden_chars" != x; then
47905    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47906    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47907    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47908    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47909      # Going to short mode and back again did indeed matter. Since short mode is
47910      # case insensitive, let's make it lowercase to improve readability.
47911      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47912      # Now convert it back to Unix-style (cygpath)
47913      input_path=`$CYGPATH -u "$shortmode_path"`
47914      new_path="$input_path"
47915    fi
47916  fi
47917
47918  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47919  if test "x$test_cygdrive_prefix" = x; then
47920    # As a simple fix, exclude /usr/bin since it's not a real path.
47921    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47922      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47923      # a path prefixed by /cygdrive for fixpath to work.
47924      new_path="$CYGWIN_ROOT_PATH$input_path"
47925    fi
47926  fi
47927
47928
47929  if test "x$path" != "x$new_path"; then
47930    FREETYPE_INCLUDE_PATH="$new_path"
47931    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47932$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47933  fi
47934
47935    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47936
47937  path="$FREETYPE_INCLUDE_PATH"
47938  has_colon=`$ECHO $path | $GREP ^.:`
47939  new_path="$path"
47940  if test "x$has_colon" = x; then
47941    # Not in mixed or Windows style, start by that.
47942    new_path=`cmd //c echo $path`
47943  fi
47944
47945
47946  input_path="$new_path"
47947  # Check if we need to convert this using DOS-style short mode. If the path
47948  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47949  # take no chances and rewrite it.
47950  # Note: m4 eats our [], so we need to use [ and ] instead.
47951  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47952  if test "x$has_forbidden_chars" != x; then
47953    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47954    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47955  fi
47956
47957
47958  windows_path="$new_path"
47959  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47960    unix_path=`$CYGPATH -u "$windows_path"`
47961    new_path="$unix_path"
47962  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47963    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47964    new_path="$unix_path"
47965  fi
47966
47967  if test "x$path" != "x$new_path"; then
47968    FREETYPE_INCLUDE_PATH="$new_path"
47969    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47970$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47971  fi
47972
47973  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47974  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47975
47976    else
47977      # We're on a unix platform. Hooray! :)
47978      path="$FREETYPE_INCLUDE_PATH"
47979      has_space=`$ECHO "$path" | $GREP " "`
47980      if test "x$has_space" != x; then
47981        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47982$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47983        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47984      fi
47985
47986      # Use eval to expand a potential ~
47987      eval path="$path"
47988      if test ! -f "$path" && test ! -d "$path"; then
47989        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47990      fi
47991
47992      FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47993    fi
47994  fi
47995
47996      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
47997        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
47998      else
47999        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
48000      fi
48001    fi
48002
48003    if test "x$FREETYPE_LIBS" = x; then
48004
48005  # Only process if variable expands to non-empty
48006
48007  if test "x$FREETYPE_LIB_PATH" != x; then
48008    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48009
48010  # Input might be given as Windows format, start by converting to
48011  # unix format.
48012  path="$FREETYPE_LIB_PATH"
48013  new_path=`$CYGPATH -u "$path"`
48014
48015  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48016  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48017  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48018  # "foo.exe" is OK but "foo" is an error.
48019  #
48020  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48021  # It is also a way to make sure we got the proper file name for the real test later on.
48022  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48023  if test "x$test_shortpath" = x; then
48024    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48025$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48026    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
48027  fi
48028
48029  # Call helper function which possibly converts this using DOS-style short mode.
48030  # If so, the updated path is stored in $new_path.
48031
48032  input_path="$new_path"
48033  # Check if we need to convert this using DOS-style short mode. If the path
48034  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48035  # take no chances and rewrite it.
48036  # Note: m4 eats our [], so we need to use [ and ] instead.
48037  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48038  if test "x$has_forbidden_chars" != x; then
48039    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48040    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48041    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48042    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48043      # Going to short mode and back again did indeed matter. Since short mode is
48044      # case insensitive, let's make it lowercase to improve readability.
48045      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48046      # Now convert it back to Unix-style (cygpath)
48047      input_path=`$CYGPATH -u "$shortmode_path"`
48048      new_path="$input_path"
48049    fi
48050  fi
48051
48052  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48053  if test "x$test_cygdrive_prefix" = x; then
48054    # As a simple fix, exclude /usr/bin since it's not a real path.
48055    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48056      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48057      # a path prefixed by /cygdrive for fixpath to work.
48058      new_path="$CYGWIN_ROOT_PATH$input_path"
48059    fi
48060  fi
48061
48062
48063  if test "x$path" != "x$new_path"; then
48064    FREETYPE_LIB_PATH="$new_path"
48065    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
48066$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48067  fi
48068
48069    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48070
48071  path="$FREETYPE_LIB_PATH"
48072  has_colon=`$ECHO $path | $GREP ^.:`
48073  new_path="$path"
48074  if test "x$has_colon" = x; then
48075    # Not in mixed or Windows style, start by that.
48076    new_path=`cmd //c echo $path`
48077  fi
48078
48079
48080  input_path="$new_path"
48081  # Check if we need to convert this using DOS-style short mode. If the path
48082  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48083  # take no chances and rewrite it.
48084  # Note: m4 eats our [], so we need to use [ and ] instead.
48085  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48086  if test "x$has_forbidden_chars" != x; then
48087    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48088    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48089  fi
48090
48091
48092  windows_path="$new_path"
48093  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48094    unix_path=`$CYGPATH -u "$windows_path"`
48095    new_path="$unix_path"
48096  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48097    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48098    new_path="$unix_path"
48099  fi
48100
48101  if test "x$path" != "x$new_path"; then
48102    FREETYPE_LIB_PATH="$new_path"
48103    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
48104$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48105  fi
48106
48107  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48108  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48109
48110    else
48111      # We're on a unix platform. Hooray! :)
48112      path="$FREETYPE_LIB_PATH"
48113      has_space=`$ECHO "$path" | $GREP " "`
48114      if test "x$has_space" != x; then
48115        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48116$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48117        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48118      fi
48119
48120      # Use eval to expand a potential ~
48121      eval path="$path"
48122      if test ! -f "$path" && test ! -d "$path"; then
48123        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48124      fi
48125
48126      FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
48127    fi
48128  fi
48129
48130      if test "x$OPENJDK_TARGET_OS" = xwindows; then
48131        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
48132      else
48133        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
48134      fi
48135    fi
48136
48137    # Try to compile it
48138    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
48139$as_echo_n "checking if we can compile and link with freetype... " >&6; }
48140    ac_ext=cpp
48141ac_cpp='$CXXCPP $CPPFLAGS'
48142ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48143ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48144ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48145
48146    PREV_CXXCFLAGS="$CXXFLAGS"
48147    PREV_LIBS="$LIBS"
48148    PREV_CXX="$CXX"
48149    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
48150    LIBS="$LIBS $FREETYPE_LIBS"
48151    CXX="$FIXPATH $CXX"
48152    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48153/* end confdefs.h.  */
48154
48155          #include<ft2build.h>
48156          #include FT_FREETYPE_H
48157          int main () {
48158            FT_Init_FreeType(NULL);
48159            return 0;
48160          }
48161
48162_ACEOF
48163if ac_fn_cxx_try_link "$LINENO"; then :
48164
48165          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48166$as_echo "yes" >&6; }
48167
48168else
48169
48170          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48171$as_echo "no" >&6; }
48172          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
48173$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
48174          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
48175$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
48176
48177
48178  # Print a helpful message on how to acquire the necessary build dependency.
48179  # freetype is the help tag: freetype, cups, pulse, alsa etc
48180  MISSING_DEPENDENCY=freetype
48181
48182  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48183    cygwin_help $MISSING_DEPENDENCY
48184  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48185    msys_help $MISSING_DEPENDENCY
48186  else
48187    PKGHANDLER_COMMAND=
48188
48189    case $PKGHANDLER in
48190      apt-get)
48191        apt_help     $MISSING_DEPENDENCY ;;
48192      yum)
48193        yum_help     $MISSING_DEPENDENCY ;;
48194      port)
48195        port_help    $MISSING_DEPENDENCY ;;
48196      pkgutil)
48197        pkgutil_help $MISSING_DEPENDENCY ;;
48198      pkgadd)
48199        pkgadd_help  $MISSING_DEPENDENCY ;;
48200    esac
48201
48202    if test "x$PKGHANDLER_COMMAND" != x; then
48203      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48204    fi
48205  fi
48206
48207
48208          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
48209
48210
48211fi
48212rm -f core conftest.err conftest.$ac_objext \
48213    conftest$ac_exeext conftest.$ac_ext
48214    CXXCFLAGS="$PREV_CXXFLAGS"
48215    LIBS="$PREV_LIBS"
48216    CXX="$PREV_CXX"
48217    ac_ext=cpp
48218ac_cpp='$CXXCPP $CPPFLAGS'
48219ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48220ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48221ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48222
48223
48224    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
48225$as_echo_n "checking if we should bundle freetype... " >&6; }
48226    if test "x$BUNDLE_FREETYPE" = xyes; then
48227      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
48228    fi
48229    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
48230$as_echo "$BUNDLE_FREETYPE" >&6; }
48231
48232  fi # end freetype needed
48233
48234
48235
48236
48237
48238
48239
48240  ###############################################################################
48241  #
48242  # Check for alsa headers and libraries. Used on Linux/GNU systems.
48243  #
48244
48245# Check whether --with-alsa was given.
48246if test "${with_alsa+set}" = set; then :
48247  withval=$with_alsa;
48248fi
48249
48250
48251# Check whether --with-alsa-include was given.
48252if test "${with_alsa_include+set}" = set; then :
48253  withval=$with_alsa_include;
48254fi
48255
48256
48257# Check whether --with-alsa-lib was given.
48258if test "${with_alsa_lib+set}" = set; then :
48259  withval=$with_alsa_lib;
48260fi
48261
48262
48263  if test "x$ALSA_NOT_NEEDED" = xyes; then
48264    if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
48265      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
48266$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
48267    fi
48268    ALSA_CFLAGS=
48269    ALSA_LIBS=
48270  else
48271    ALSA_FOUND=no
48272
48273    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
48274      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
48275    fi
48276
48277    if test "x${with_alsa}" != x; then
48278      ALSA_LIBS="-L${with_alsa}/lib -lasound"
48279      ALSA_CFLAGS="-I${with_alsa}/include"
48280      ALSA_FOUND=yes
48281    fi
48282    if test "x${with_alsa_include}" != x; then
48283      ALSA_CFLAGS="-I${with_alsa_include}"
48284      ALSA_FOUND=yes
48285    fi
48286    if test "x${with_alsa_lib}" != x; then
48287      ALSA_LIBS="-L${with_alsa_lib} -lasound"
48288      ALSA_FOUND=yes
48289    fi
48290    if test "x$ALSA_FOUND" = xno; then
48291
48292
48293  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
48294    # Source the builddeps file again, to make sure it uses the latest variables!
48295    . $builddepsfile
48296    # Look for a target and build machine specific resource!
48297    eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
48298    if test "x$resource" = x; then
48299      # Ok, lets instead look for a target specific resource
48300      eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
48301    fi
48302    if test "x$resource" = x; then
48303      # Ok, lets instead look for a build specific resource
48304      eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
48305    fi
48306    if test "x$resource" = x; then
48307      # Ok, lets instead look for a generic resource
48308      # (The alsa comes from M4 and not the shell, thus no need for eval here.)
48309      resource=${builddep_alsa}
48310    fi
48311    if test "x$resource" != x; then
48312      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
48313$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
48314      # If the resource in the builddeps.conf file is an existing directory,
48315      # for example /java/linux/cups
48316      if test -d ${resource}; then
48317        depdir=${resource}
48318      else
48319
48320  # alsa is for example mymodule
48321  # $resource is for example libs/general/libmymod_1_2_3.zip
48322  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
48323  # $with_builddeps_dir is for example /localhome/builddeps
48324  # depdir is the name of the variable into which we store the depdir, eg MYMOD
48325  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
48326  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
48327  filename=`basename $resource`
48328  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
48329  filebase=${filename%%.*}
48330  extension=${filename#*.}
48331  installdir=$with_builddeps_dir/$filebase
48332  if test ! -f $installdir/$filename.unpacked; then
48333    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
48334$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
48335    if test ! -d $installdir; then
48336      mkdir -p $installdir
48337    fi
48338    if test ! -d $installdir; then
48339      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
48340    fi
48341    tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
48342    touch $tmpfile
48343    if test ! -f $tmpfile; then
48344      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
48345    fi
48346
48347  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
48348  # $tmpfile is the local file name for the downloaded file.
48349  VALID_TOOL=no
48350  if test "x$BDEPS_FTP" = xwget; then
48351    VALID_TOOL=yes
48352    wget -O $tmpfile $with_builddeps_server/$resource
48353  fi
48354  if test "x$BDEPS_FTP" = xlftp; then
48355    VALID_TOOL=yes
48356    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
48357  fi
48358  if test "x$BDEPS_FTP" = xftp; then
48359    VALID_TOOL=yes
48360    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
48361    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
48362    FTPUSERPWD=${FTPSERVER%%@*}
48363    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
48364      FTPUSER=${userpwd%%:*}
48365      FTPPWD=${userpwd#*@}
48366      FTPSERVER=${FTPSERVER#*@}
48367    else
48368      FTPUSER=ftp
48369      FTPPWD=ftp
48370    fi
48371    # the "pass" command does not work on some
48372    # ftp clients (read ftp.exe) but if it works,
48373    # passive mode is better!
48374    ( \
48375        echo "user $FTPUSER $FTPPWD"        ; \
48376        echo "pass"                         ; \
48377        echo "bin"                          ; \
48378        echo "get $FTPPATH $tmpfile"              ; \
48379    ) | ftp -in $FTPSERVER
48380  fi
48381  if test "x$VALID_TOOL" != xyes; then
48382    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
48383  fi
48384
48385    mv $tmpfile $installdir/$filename
48386    if test ! -s $installdir/$filename; then
48387      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
48388    fi
48389    case "$extension" in
48390      zip)  echo "Unzipping $installdir/$filename..."
48391        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
48392        ;;
48393      tar.gz) echo "Untaring $installdir/$filename..."
48394        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
48395        ;;
48396      tgz) echo "Untaring $installdir/$filename..."
48397        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
48398        ;;
48399      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
48400        ;;
48401    esac
48402  fi
48403  if test -f $installdir/$filename.unpacked; then
48404    depdir=$installdir
48405  fi
48406
48407      fi
48408      # Source the builddeps file again, because in the previous command, the depdir
48409      # was updated to point at the current build dependency install directory.
48410      . $builddepsfile
48411      # Now extract variables from the builddeps.conf files.
48412      theroot=${builddep_alsa_ROOT}
48413      thecflags=${builddep_alsa_CFLAGS}
48414      thelibs=${builddep_alsa_LIBS}
48415      if test "x$depdir" = x; then
48416        as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
48417      fi
48418      ALSA=$depdir
48419      if test "x$theroot" != x; then
48420        ALSA="$theroot"
48421      fi
48422      if test "x$thecflags" != x; then
48423        ALSA_CFLAGS="$thecflags"
48424      fi
48425      if test "x$thelibs" != x; then
48426        ALSA_LIBS="$thelibs"
48427      fi
48428      ALSA_FOUND=yes
48429      else ALSA_FOUND=no
48430
48431    fi
48432    else ALSA_FOUND=no
48433
48434  fi
48435
48436    fi
48437    # Do not try pkg-config if we have a sysroot set.
48438    if test "x$SYSROOT" = x; then
48439      if test "x$ALSA_FOUND" = xno; then
48440
48441pkg_failed=no
48442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
48443$as_echo_n "checking for ALSA... " >&6; }
48444
48445if test -n "$ALSA_CFLAGS"; then
48446    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
48447 elif test -n "$PKG_CONFIG"; then
48448    if test -n "$PKG_CONFIG" && \
48449    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
48450  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
48451  ac_status=$?
48452  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48453  test $ac_status = 0; }; then
48454  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
48455else
48456  pkg_failed=yes
48457fi
48458 else
48459    pkg_failed=untried
48460fi
48461if test -n "$ALSA_LIBS"; then
48462    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
48463 elif test -n "$PKG_CONFIG"; then
48464    if test -n "$PKG_CONFIG" && \
48465    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
48466  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
48467  ac_status=$?
48468  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48469  test $ac_status = 0; }; then
48470  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
48471else
48472  pkg_failed=yes
48473fi
48474 else
48475    pkg_failed=untried
48476fi
48477
48478
48479
48480if test $pkg_failed = yes; then
48481
48482if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48483        _pkg_short_errors_supported=yes
48484else
48485        _pkg_short_errors_supported=no
48486fi
48487        if test $_pkg_short_errors_supported = yes; then
48488	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
48489        else
48490	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
48491        fi
48492	# Put the nasty error message in config.log where it belongs
48493	echo "$ALSA_PKG_ERRORS" >&5
48494
48495	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48496$as_echo "no" >&6; }
48497                ALSA_FOUND=no
48498elif test $pkg_failed = untried; then
48499	ALSA_FOUND=no
48500else
48501	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
48502	ALSA_LIBS=$pkg_cv_ALSA_LIBS
48503        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48504$as_echo "yes" >&6; }
48505	ALSA_FOUND=yes
48506fi
48507      fi
48508    fi
48509    if test "x$ALSA_FOUND" = xno; then
48510      for ac_header in alsa/asoundlib.h
48511do :
48512  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
48513if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
48514  cat >>confdefs.h <<_ACEOF
48515#define HAVE_ALSA_ASOUNDLIB_H 1
48516_ACEOF
48517
48518            ALSA_FOUND=yes
48519            ALSA_CFLAGS=-Iignoreme
48520            ALSA_LIBS=-lasound
48521            DEFAULT_ALSA=yes
48522
48523else
48524  ALSA_FOUND=no
48525fi
48526
48527done
48528
48529    fi
48530    if test "x$ALSA_FOUND" = xno; then
48531
48532  # Print a helpful message on how to acquire the necessary build dependency.
48533  # alsa is the help tag: freetype, cups, pulse, alsa etc
48534  MISSING_DEPENDENCY=alsa
48535
48536  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48537    cygwin_help $MISSING_DEPENDENCY
48538  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48539    msys_help $MISSING_DEPENDENCY
48540  else
48541    PKGHANDLER_COMMAND=
48542
48543    case $PKGHANDLER in
48544      apt-get)
48545        apt_help     $MISSING_DEPENDENCY ;;
48546      yum)
48547        yum_help     $MISSING_DEPENDENCY ;;
48548      port)
48549        port_help    $MISSING_DEPENDENCY ;;
48550      pkgutil)
48551        pkgutil_help $MISSING_DEPENDENCY ;;
48552      pkgadd)
48553        pkgadd_help  $MISSING_DEPENDENCY ;;
48554    esac
48555
48556    if test "x$PKGHANDLER_COMMAND" != x; then
48557      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48558    fi
48559  fi
48560
48561      as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
48562    fi
48563  fi
48564
48565
48566
48567
48568
48569
48570  ###############################################################################
48571  #
48572  # Check for the jpeg library
48573  #
48574
48575
48576# Check whether --with-libjpeg was given.
48577if test "${with_libjpeg+set}" = set; then :
48578  withval=$with_libjpeg;
48579fi
48580
48581
48582  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
48583$as_echo_n "checking for which libjpeg to use... " >&6; }
48584
48585  # default is bundled
48586  DEFAULT_LIBJPEG=bundled
48587
48588  #
48589  # if user didn't specify, use DEFAULT_LIBJPEG
48590  #
48591  if test "x${with_libjpeg}" = "x"; then
48592    with_libjpeg=${DEFAULT_LIBJPEG}
48593  fi
48594
48595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
48596$as_echo "${with_libjpeg}" >&6; }
48597
48598  if test "x${with_libjpeg}" = "xbundled"; then
48599    USE_EXTERNAL_LIBJPEG=false
48600  elif test "x${with_libjpeg}" = "xsystem"; then
48601    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
48602if test "x$ac_cv_header_jpeglib_h" = xyes; then :
48603
48604else
48605   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
48606fi
48607
48608
48609    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
48610$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
48611if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
48612  $as_echo_n "(cached) " >&6
48613else
48614  ac_check_lib_save_LIBS=$LIBS
48615LIBS="-ljpeg  $LIBS"
48616cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48617/* end confdefs.h.  */
48618
48619/* Override any GCC internal prototype to avoid an error.
48620   Use char because int might match the return type of a GCC
48621   builtin and then its argument prototype would still apply.  */
48622#ifdef __cplusplus
48623extern "C"
48624#endif
48625char jpeg_CreateDecompress ();
48626int
48627main ()
48628{
48629return jpeg_CreateDecompress ();
48630  ;
48631  return 0;
48632}
48633_ACEOF
48634if ac_fn_cxx_try_link "$LINENO"; then :
48635  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
48636else
48637  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
48638fi
48639rm -f core conftest.err conftest.$ac_objext \
48640    conftest$ac_exeext conftest.$ac_ext
48641LIBS=$ac_check_lib_save_LIBS
48642fi
48643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
48644$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
48645if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
48646  cat >>confdefs.h <<_ACEOF
48647#define HAVE_LIBJPEG 1
48648_ACEOF
48649
48650  LIBS="-ljpeg $LIBS"
48651
48652else
48653   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
48654fi
48655
48656
48657    USE_EXTERNAL_LIBJPEG=true
48658  else
48659    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
48660  fi
48661
48662
48663
48664  ###############################################################################
48665  #
48666  # Check for the gif library
48667  #
48668
48669
48670# Check whether --with-giflib was given.
48671if test "${with_giflib+set}" = set; then :
48672  withval=$with_giflib;
48673fi
48674
48675
48676
48677  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
48678$as_echo_n "checking for which giflib to use... " >&6; }
48679
48680  # default is bundled
48681  DEFAULT_GIFLIB=bundled
48682
48683  #
48684  # if user didn't specify, use DEFAULT_GIFLIB
48685  #
48686  if test "x${with_giflib}" = "x"; then
48687    with_giflib=${DEFAULT_GIFLIB}
48688  fi
48689
48690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
48691$as_echo "${with_giflib}" >&6; }
48692
48693  if test "x${with_giflib}" = "xbundled"; then
48694    USE_EXTERNAL_LIBGIF=false
48695  elif test "x${with_giflib}" = "xsystem"; then
48696    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
48697if test "x$ac_cv_header_gif_lib_h" = xyes; then :
48698
48699else
48700   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
48701fi
48702
48703
48704    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
48705$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
48706if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
48707  $as_echo_n "(cached) " >&6
48708else
48709  ac_check_lib_save_LIBS=$LIBS
48710LIBS="-lgif  $LIBS"
48711cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48712/* end confdefs.h.  */
48713
48714/* Override any GCC internal prototype to avoid an error.
48715   Use char because int might match the return type of a GCC
48716   builtin and then its argument prototype would still apply.  */
48717#ifdef __cplusplus
48718extern "C"
48719#endif
48720char DGifGetCode ();
48721int
48722main ()
48723{
48724return DGifGetCode ();
48725  ;
48726  return 0;
48727}
48728_ACEOF
48729if ac_fn_cxx_try_link "$LINENO"; then :
48730  ac_cv_lib_gif_DGifGetCode=yes
48731else
48732  ac_cv_lib_gif_DGifGetCode=no
48733fi
48734rm -f core conftest.err conftest.$ac_objext \
48735    conftest$ac_exeext conftest.$ac_ext
48736LIBS=$ac_check_lib_save_LIBS
48737fi
48738{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
48739$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
48740if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
48741  cat >>confdefs.h <<_ACEOF
48742#define HAVE_LIBGIF 1
48743_ACEOF
48744
48745  LIBS="-lgif $LIBS"
48746
48747else
48748   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
48749fi
48750
48751
48752    USE_EXTERNAL_LIBGIF=true
48753  else
48754    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
48755  fi
48756
48757
48758  ###############################################################################
48759  #
48760  # Check for the lcms2 library
48761  #
48762
48763
48764# Check whether --with-lcms was given.
48765if test "${with_lcms+set}" = set; then :
48766  withval=$with_lcms;
48767fi
48768
48769
48770  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
48771$as_echo_n "checking for which lcms to use... " >&6; }
48772
48773  DEFAULT_LCMS=bundled
48774
48775  #
48776  # If user didn't specify, use DEFAULT_LCMS
48777  #
48778  if test "x${with_lcms}" = "x"; then
48779      with_lcms=${DEFAULT_LCMS}
48780  fi
48781
48782  if test "x${with_lcms}" = "xbundled"; then
48783    USE_EXTERNAL_LCMS=false
48784    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
48785$as_echo "bundled" >&6; }
48786  elif test "x${with_lcms}" = "xsystem"; then
48787    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
48788$as_echo "system" >&6; }
48789
48790pkg_failed=no
48791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
48792$as_echo_n "checking for LCMS... " >&6; }
48793
48794if test -n "$LCMS_CFLAGS"; then
48795    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
48796 elif test -n "$PKG_CONFIG"; then
48797    if test -n "$PKG_CONFIG" && \
48798    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
48799  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
48800  ac_status=$?
48801  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48802  test $ac_status = 0; }; then
48803  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
48804else
48805  pkg_failed=yes
48806fi
48807 else
48808    pkg_failed=untried
48809fi
48810if test -n "$LCMS_LIBS"; then
48811    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
48812 elif test -n "$PKG_CONFIG"; then
48813    if test -n "$PKG_CONFIG" && \
48814    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
48815  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
48816  ac_status=$?
48817  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48818  test $ac_status = 0; }; then
48819  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
48820else
48821  pkg_failed=yes
48822fi
48823 else
48824    pkg_failed=untried
48825fi
48826
48827
48828
48829if test $pkg_failed = yes; then
48830
48831if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48832        _pkg_short_errors_supported=yes
48833else
48834        _pkg_short_errors_supported=no
48835fi
48836        if test $_pkg_short_errors_supported = yes; then
48837	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
48838        else
48839	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
48840        fi
48841	# Put the nasty error message in config.log where it belongs
48842	echo "$LCMS_PKG_ERRORS" >&5
48843
48844	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48845$as_echo "no" >&6; }
48846                LCMS_FOUND=no
48847elif test $pkg_failed = untried; then
48848	LCMS_FOUND=no
48849else
48850	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
48851	LCMS_LIBS=$pkg_cv_LCMS_LIBS
48852        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48853$as_echo "yes" >&6; }
48854	LCMS_FOUND=yes
48855fi
48856    if test "x${LCMS_FOUND}" = "xyes"; then
48857      USE_EXTERNAL_LCMS=true
48858    else
48859      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
48860    fi
48861  else
48862    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
48863  fi
48864
48865
48866
48867  ###############################################################################
48868  #
48869  # Check for the png library
48870  #
48871
48872
48873# Check whether --with-libpng was given.
48874if test "${with_libpng+set}" = set; then :
48875  withval=$with_libpng;
48876fi
48877
48878
48879
48880  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
48881$as_echo_n "checking for which libpng to use... " >&6; }
48882
48883  # default is bundled
48884  DEFAULT_LIBPNG=bundled
48885
48886  #
48887  # if user didn't specify, use DEFAULT_LIBPNG
48888  #
48889  if test "x${with_libpng}" = "x"; then
48890      with_libpng=${DEFAULT_LIBPNG}
48891  fi
48892
48893  if test "x${with_libpng}" = "xbundled"; then
48894      USE_EXTERNAL_LIBPNG=false
48895      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
48896$as_echo "bundled" >&6; }
48897  elif test "x${with_libpng}" = "xsystem"; then
48898
48899pkg_failed=no
48900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
48901$as_echo_n "checking for PNG... " >&6; }
48902
48903if test -n "$PNG_CFLAGS"; then
48904    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
48905 elif test -n "$PKG_CONFIG"; then
48906    if test -n "$PKG_CONFIG" && \
48907    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
48908  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
48909  ac_status=$?
48910  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48911  test $ac_status = 0; }; then
48912  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
48913else
48914  pkg_failed=yes
48915fi
48916 else
48917    pkg_failed=untried
48918fi
48919if test -n "$PNG_LIBS"; then
48920    pkg_cv_PNG_LIBS="$PNG_LIBS"
48921 elif test -n "$PKG_CONFIG"; then
48922    if test -n "$PKG_CONFIG" && \
48923    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
48924  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
48925  ac_status=$?
48926  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48927  test $ac_status = 0; }; then
48928  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
48929else
48930  pkg_failed=yes
48931fi
48932 else
48933    pkg_failed=untried
48934fi
48935
48936
48937
48938if test $pkg_failed = yes; then
48939
48940if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48941        _pkg_short_errors_supported=yes
48942else
48943        _pkg_short_errors_supported=no
48944fi
48945        if test $_pkg_short_errors_supported = yes; then
48946	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
48947        else
48948	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
48949        fi
48950	# Put the nasty error message in config.log where it belongs
48951	echo "$PNG_PKG_ERRORS" >&5
48952
48953	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48954$as_echo "no" >&6; }
48955                 LIBPNG_FOUND=no
48956elif test $pkg_failed = untried; then
48957	 LIBPNG_FOUND=no
48958else
48959	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
48960	PNG_LIBS=$pkg_cv_PNG_LIBS
48961        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48962$as_echo "yes" >&6; }
48963	 LIBPNG_FOUND=yes
48964fi
48965      if test "x${LIBPNG_FOUND}" = "xyes"; then
48966          USE_EXTERNAL_LIBPNG=true
48967          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
48968$as_echo "system" >&6; }
48969      else
48970          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
48971$as_echo "system not found" >&6; }
48972          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
48973      fi
48974  else
48975      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
48976  fi
48977
48978
48979  ###############################################################################
48980  #
48981  # Check for the zlib library
48982  #
48983
48984
48985# Check whether --with-zlib was given.
48986if test "${with_zlib+set}" = set; then :
48987  withval=$with_zlib;
48988fi
48989
48990
48991  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
48992$as_echo_n "checking for compress in -lz... " >&6; }
48993if ${ac_cv_lib_z_compress+:} false; then :
48994  $as_echo_n "(cached) " >&6
48995else
48996  ac_check_lib_save_LIBS=$LIBS
48997LIBS="-lz  $LIBS"
48998cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48999/* end confdefs.h.  */
49000
49001/* Override any GCC internal prototype to avoid an error.
49002   Use char because int might match the return type of a GCC
49003   builtin and then its argument prototype would still apply.  */
49004#ifdef __cplusplus
49005extern "C"
49006#endif
49007char compress ();
49008int
49009main ()
49010{
49011return compress ();
49012  ;
49013  return 0;
49014}
49015_ACEOF
49016if ac_fn_cxx_try_link "$LINENO"; then :
49017  ac_cv_lib_z_compress=yes
49018else
49019  ac_cv_lib_z_compress=no
49020fi
49021rm -f core conftest.err conftest.$ac_objext \
49022    conftest$ac_exeext conftest.$ac_ext
49023LIBS=$ac_check_lib_save_LIBS
49024fi
49025{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
49026$as_echo "$ac_cv_lib_z_compress" >&6; }
49027if test "x$ac_cv_lib_z_compress" = xyes; then :
49028   ZLIB_FOUND=yes
49029else
49030   ZLIB_FOUND=no
49031fi
49032
49033
49034  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
49035$as_echo_n "checking for which zlib to use... " >&6; }
49036
49037  DEFAULT_ZLIB=bundled
49038  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49039    #
49040    # On macosx default is system...on others default is
49041    #
49042    DEFAULT_ZLIB=system
49043  fi
49044
49045  if test "x${ZLIB_FOUND}" != "xyes"; then
49046    #
49047    # If we don't find any system...set default to bundled
49048    #
49049    DEFAULT_ZLIB=bundled
49050  fi
49051
49052  #
49053  # If user didn't specify, use DEFAULT_ZLIB
49054  #
49055  if test "x${with_zlib}" = "x"; then
49056    with_zlib=${DEFAULT_ZLIB}
49057  fi
49058
49059  if test "x${with_zlib}" = "xbundled"; then
49060    USE_EXTERNAL_LIBZ=false
49061    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
49062$as_echo "bundled" >&6; }
49063  elif test "x${with_zlib}" = "xsystem"; then
49064    if test "x${ZLIB_FOUND}" = "xyes"; then
49065      USE_EXTERNAL_LIBZ=true
49066      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49067$as_echo "system" >&6; }
49068    else
49069      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
49070$as_echo "system not found" >&6; }
49071      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
49072    fi
49073  else
49074    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
49075  fi
49076
49077
49078
49079  ###############################################################################
49080  LIBZIP_CAN_USE_MMAP=true
49081
49082
49083
49084  ###############################################################################
49085  #
49086  # Check if altzone exists in time.h
49087  #
49088
49089  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49090/* end confdefs.h.  */
49091#include <time.h>
49092int
49093main ()
49094{
49095return (int)altzone;
49096  ;
49097  return 0;
49098}
49099_ACEOF
49100if ac_fn_cxx_try_link "$LINENO"; then :
49101  has_altzone=yes
49102else
49103  has_altzone=no
49104fi
49105rm -f core conftest.err conftest.$ac_objext \
49106    conftest$ac_exeext conftest.$ac_ext
49107  if test "x$has_altzone" = xyes; then
49108
49109$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
49110
49111  fi
49112
49113  ###############################################################################
49114  #
49115  # Check the maths library
49116  #
49117
49118  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
49119$as_echo_n "checking for cos in -lm... " >&6; }
49120if ${ac_cv_lib_m_cos+:} false; then :
49121  $as_echo_n "(cached) " >&6
49122else
49123  ac_check_lib_save_LIBS=$LIBS
49124LIBS="-lm  $LIBS"
49125cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49126/* end confdefs.h.  */
49127
49128/* Override any GCC internal prototype to avoid an error.
49129   Use char because int might match the return type of a GCC
49130   builtin and then its argument prototype would still apply.  */
49131#ifdef __cplusplus
49132extern "C"
49133#endif
49134char cos ();
49135int
49136main ()
49137{
49138return cos ();
49139  ;
49140  return 0;
49141}
49142_ACEOF
49143if ac_fn_cxx_try_link "$LINENO"; then :
49144  ac_cv_lib_m_cos=yes
49145else
49146  ac_cv_lib_m_cos=no
49147fi
49148rm -f core conftest.err conftest.$ac_objext \
49149    conftest$ac_exeext conftest.$ac_ext
49150LIBS=$ac_check_lib_save_LIBS
49151fi
49152{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
49153$as_echo "$ac_cv_lib_m_cos" >&6; }
49154if test "x$ac_cv_lib_m_cos" = xyes; then :
49155  cat >>confdefs.h <<_ACEOF
49156#define HAVE_LIBM 1
49157_ACEOF
49158
49159  LIBS="-lm $LIBS"
49160
49161else
49162
49163        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
49164$as_echo "$as_me: Maths library was not found" >&6;}
49165
49166
49167fi
49168
49169
49170
49171  ###############################################################################
49172  #
49173  # Check for libdl.so
49174
49175  save_LIBS="$LIBS"
49176  LIBS=""
49177  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
49178$as_echo_n "checking for dlopen in -ldl... " >&6; }
49179if ${ac_cv_lib_dl_dlopen+:} false; then :
49180  $as_echo_n "(cached) " >&6
49181else
49182  ac_check_lib_save_LIBS=$LIBS
49183LIBS="-ldl  $LIBS"
49184cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49185/* end confdefs.h.  */
49186
49187/* Override any GCC internal prototype to avoid an error.
49188   Use char because int might match the return type of a GCC
49189   builtin and then its argument prototype would still apply.  */
49190#ifdef __cplusplus
49191extern "C"
49192#endif
49193char dlopen ();
49194int
49195main ()
49196{
49197return dlopen ();
49198  ;
49199  return 0;
49200}
49201_ACEOF
49202if ac_fn_cxx_try_link "$LINENO"; then :
49203  ac_cv_lib_dl_dlopen=yes
49204else
49205  ac_cv_lib_dl_dlopen=no
49206fi
49207rm -f core conftest.err conftest.$ac_objext \
49208    conftest$ac_exeext conftest.$ac_ext
49209LIBS=$ac_check_lib_save_LIBS
49210fi
49211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
49212$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
49213if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
49214  cat >>confdefs.h <<_ACEOF
49215#define HAVE_LIBDL 1
49216_ACEOF
49217
49218  LIBS="-ldl $LIBS"
49219
49220fi
49221
49222  LIBDL="$LIBS"
49223
49224  LIBS="$save_LIBS"
49225
49226
49227  ###############################################################################
49228  #
49229  # statically link libstdc++ before C++ ABI is stablized on Linux unless
49230  # dynamic build is configured on command line.
49231  #
49232
49233# Check whether --with-stdc++lib was given.
49234if test "${with_stdc__lib+set}" = set; then :
49235  withval=$with_stdc__lib;
49236        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
49237                && test "x$with_stdc__lib" != xdefault; then
49238          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
49239        fi
49240
49241else
49242  with_stdc__lib=default
49243
49244fi
49245
49246
49247  if test "x$OPENJDK_TARGET_OS" = xlinux; then
49248    # Test if -lstdc++ works.
49249    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
49250$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
49251    ac_ext=cpp
49252ac_cpp='$CXXCPP $CPPFLAGS'
49253ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49254ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49255ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49256
49257    OLD_CXXFLAGS="$CXXFLAGS"
49258    CXXFLAGS="$CXXFLAGS -lstdc++"
49259    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49260/* end confdefs.h.  */
49261
49262int
49263main ()
49264{
49265return 0;
49266  ;
49267  return 0;
49268}
49269_ACEOF
49270if ac_fn_cxx_try_link "$LINENO"; then :
49271  has_dynamic_libstdcxx=yes
49272else
49273  has_dynamic_libstdcxx=no
49274fi
49275rm -f core conftest.err conftest.$ac_objext \
49276    conftest$ac_exeext conftest.$ac_ext
49277    CXXFLAGS="$OLD_CXXFLAGS"
49278    ac_ext=cpp
49279ac_cpp='$CXXCPP $CPPFLAGS'
49280ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49281ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49282ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49283
49284    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
49285$as_echo "$has_dynamic_libstdcxx" >&6; }
49286
49287    # Test if stdc++ can be linked statically.
49288    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
49289$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
49290    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
49291    ac_ext=cpp
49292ac_cpp='$CXXCPP $CPPFLAGS'
49293ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49294ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49295ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49296
49297    OLD_LIBS="$LIBS"
49298    OLD_CXX="$CXX"
49299    LIBS="$STATIC_STDCXX_FLAGS"
49300    CXX="$CC"
49301    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49302/* end confdefs.h.  */
49303
49304int
49305main ()
49306{
49307return 0;
49308  ;
49309  return 0;
49310}
49311_ACEOF
49312if ac_fn_cxx_try_link "$LINENO"; then :
49313  has_static_libstdcxx=yes
49314else
49315  has_static_libstdcxx=no
49316fi
49317rm -f core conftest.err conftest.$ac_objext \
49318    conftest$ac_exeext conftest.$ac_ext
49319    LIBS="$OLD_LIBS"
49320    CXX="$OLD_CXX"
49321    ac_ext=cpp
49322ac_cpp='$CXXCPP $CPPFLAGS'
49323ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49324ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49325ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49326
49327    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
49328$as_echo "$has_static_libstdcxx" >&6; }
49329
49330    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
49331      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
49332    fi
49333
49334    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
49335      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
49336    fi
49337
49338    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
49339      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
49340    fi
49341
49342    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
49343$as_echo_n "checking how to link with libstdc++... " >&6; }
49344    # If dynamic was requested, it's available since it would fail above otherwise.
49345    # If dynamic wasn't requested, go with static unless it isn't available.
49346    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49347      LIBCXX="$LIBCXX -lstdc++"
49348      LDCXX="$CXX"
49349      STATIC_CXX_SETTING="STATIC_CXX=false"
49350      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
49351$as_echo "dynamic" >&6; }
49352    else
49353      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
49354      LDCXX="$CC"
49355      STATIC_CXX_SETTING="STATIC_CXX=true"
49356      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
49357$as_echo "static" >&6; }
49358    fi
49359  fi
49360
49361
49362  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49363    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
49364
49365pkg_failed=no
49366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
49367$as_echo_n "checking for LIBFFI... " >&6; }
49368
49369if test -n "$LIBFFI_CFLAGS"; then
49370    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
49371 elif test -n "$PKG_CONFIG"; then
49372    if test -n "$PKG_CONFIG" && \
49373    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
49374  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
49375  ac_status=$?
49376  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49377  test $ac_status = 0; }; then
49378  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
49379else
49380  pkg_failed=yes
49381fi
49382 else
49383    pkg_failed=untried
49384fi
49385if test -n "$LIBFFI_LIBS"; then
49386    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
49387 elif test -n "$PKG_CONFIG"; then
49388    if test -n "$PKG_CONFIG" && \
49389    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
49390  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
49391  ac_status=$?
49392  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49393  test $ac_status = 0; }; then
49394  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
49395else
49396  pkg_failed=yes
49397fi
49398 else
49399    pkg_failed=untried
49400fi
49401
49402
49403
49404if test $pkg_failed = yes; then
49405
49406if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49407        _pkg_short_errors_supported=yes
49408else
49409        _pkg_short_errors_supported=no
49410fi
49411        if test $_pkg_short_errors_supported = yes; then
49412	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
49413        else
49414	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
49415        fi
49416	# Put the nasty error message in config.log where it belongs
49417	echo "$LIBFFI_PKG_ERRORS" >&5
49418
49419	as_fn_error $? "Package requirements (libffi) were not met:
49420
49421$LIBFFI_PKG_ERRORS
49422
49423Consider adjusting the PKG_CONFIG_PATH environment variable if you
49424installed software in a non-standard prefix.
49425
49426Alternatively, you may set the environment variables LIBFFI_CFLAGS
49427and LIBFFI_LIBS to avoid the need to call pkg-config.
49428See the pkg-config man page for more details.
49429" "$LINENO" 5
49430elif test $pkg_failed = untried; then
49431	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
49432$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
49433as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
49434is in your PATH or set the PKG_CONFIG environment variable to the full
49435path to pkg-config.
49436
49437Alternatively, you may set the environment variables LIBFFI_CFLAGS
49438and LIBFFI_LIBS to avoid the need to call pkg-config.
49439See the pkg-config man page for more details.
49440
49441To get pkg-config, see <http://pkg-config.freedesktop.org/>.
49442See \`config.log' for more details" "$LINENO" 5; }
49443else
49444	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
49445	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
49446        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49447$as_echo "yes" >&6; }
49448	:
49449fi
49450
49451  fi
49452
49453  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49454    # Extract the first word of "llvm-config", so it can be a program name with args.
49455set dummy llvm-config; ac_word=$2
49456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
49457$as_echo_n "checking for $ac_word... " >&6; }
49458if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
49459  $as_echo_n "(cached) " >&6
49460else
49461  if test -n "$LLVM_CONFIG"; then
49462  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
49463else
49464as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49465for as_dir in $PATH
49466do
49467  IFS=$as_save_IFS
49468  test -z "$as_dir" && as_dir=.
49469    for ac_exec_ext in '' $ac_executable_extensions; do
49470  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
49471    ac_cv_prog_LLVM_CONFIG="llvm-config"
49472    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
49473    break 2
49474  fi
49475done
49476  done
49477IFS=$as_save_IFS
49478
49479fi
49480fi
49481LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
49482if test -n "$LLVM_CONFIG"; then
49483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
49484$as_echo "$LLVM_CONFIG" >&6; }
49485else
49486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49487$as_echo "no" >&6; }
49488fi
49489
49490
49491
49492    if test "x$LLVM_CONFIG" != xllvm-config; then
49493      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
49494    fi
49495
49496    llvm_components="jit mcjit engine nativecodegen native"
49497    unset LLVM_CFLAGS
49498    for flag in $("$LLVM_CONFIG" --cxxflags); do
49499      if echo "${flag}" | grep -q '^-[ID]'; then
49500        if test "${flag}" != "-D_DEBUG" ; then
49501          if test "${LLVM_CFLAGS}" != "" ; then
49502            LLVM_CFLAGS="${LLVM_CFLAGS} "
49503          fi
49504          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
49505        fi
49506      fi
49507    done
49508    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
49509    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
49510
49511    unset LLVM_LDFLAGS
49512    for flag in $("${LLVM_CONFIG}" --ldflags); do
49513      if echo "${flag}" | grep -q '^-L'; then
49514        if test "${LLVM_LDFLAGS}" != ""; then
49515          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
49516        fi
49517        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
49518      fi
49519    done
49520
49521    unset LLVM_LIBS
49522    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
49523      if echo "${flag}" | grep -q '^-l'; then
49524        if test "${LLVM_LIBS}" != ""; then
49525          LLVM_LIBS="${LLVM_LIBS} "
49526        fi
49527        LLVM_LIBS="${LLVM_LIBS}${flag}"
49528      fi
49529    done
49530
49531
49532
49533
49534  fi
49535
49536  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
49537  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
49538    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
49539  fi
49540
49541  # TODO better (platform agnostic) test
49542  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
49543    LIBCXX="-lstdc++"
49544  fi
49545
49546
49547
49548
49549  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
49550
49551
49552# Check whether --with-msvcr-dll was given.
49553if test "${with_msvcr_dll+set}" = set; then :
49554  withval=$with_msvcr_dll;
49555fi
49556
49557
49558  if test "x$with_msvcr_dll" != x; then
49559    # If given explicitely by user, do not probe. If not present, fail directly.
49560
49561  DLL_NAME="$MSVCR_NAME"
49562  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
49563  METHOD="--with-msvcr-dll"
49564  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49565    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49566$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49567
49568    # Need to check if the found msvcr is correct architecture
49569    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49570$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49571    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49572    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49573      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49574      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49575      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49576        CORRECT_MSVCR_ARCH="PE32 executable"
49577      else
49578        CORRECT_MSVCR_ARCH="PE32+ executable"
49579      fi
49580    else
49581      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49582        CORRECT_MSVCR_ARCH=386
49583      else
49584        CORRECT_MSVCR_ARCH=x86-64
49585      fi
49586    fi
49587    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49588      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49589$as_echo "ok" >&6; }
49590      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49591
49592  # Only process if variable expands to non-empty
49593
49594  if test "x$MSVC_DLL" != x; then
49595    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49596
49597  # Input might be given as Windows format, start by converting to
49598  # unix format.
49599  path="$MSVC_DLL"
49600  new_path=`$CYGPATH -u "$path"`
49601
49602  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49603  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49604  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49605  # "foo.exe" is OK but "foo" is an error.
49606  #
49607  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49608  # It is also a way to make sure we got the proper file name for the real test later on.
49609  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49610  if test "x$test_shortpath" = x; then
49611    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49612$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49613    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49614  fi
49615
49616  # Call helper function which possibly converts this using DOS-style short mode.
49617  # If so, the updated path is stored in $new_path.
49618
49619  input_path="$new_path"
49620  # Check if we need to convert this using DOS-style short mode. If the path
49621  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49622  # take no chances and rewrite it.
49623  # Note: m4 eats our [], so we need to use [ and ] instead.
49624  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49625  if test "x$has_forbidden_chars" != x; then
49626    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49627    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49628    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49629    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49630      # Going to short mode and back again did indeed matter. Since short mode is
49631      # case insensitive, let's make it lowercase to improve readability.
49632      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49633      # Now convert it back to Unix-style (cygpath)
49634      input_path=`$CYGPATH -u "$shortmode_path"`
49635      new_path="$input_path"
49636    fi
49637  fi
49638
49639  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49640  if test "x$test_cygdrive_prefix" = x; then
49641    # As a simple fix, exclude /usr/bin since it's not a real path.
49642    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49643      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49644      # a path prefixed by /cygdrive for fixpath to work.
49645      new_path="$CYGWIN_ROOT_PATH$input_path"
49646    fi
49647  fi
49648
49649
49650  if test "x$path" != "x$new_path"; then
49651    MSVC_DLL="$new_path"
49652    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49653$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49654  fi
49655
49656    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49657
49658  path="$MSVC_DLL"
49659  has_colon=`$ECHO $path | $GREP ^.:`
49660  new_path="$path"
49661  if test "x$has_colon" = x; then
49662    # Not in mixed or Windows style, start by that.
49663    new_path=`cmd //c echo $path`
49664  fi
49665
49666
49667  input_path="$new_path"
49668  # Check if we need to convert this using DOS-style short mode. If the path
49669  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49670  # take no chances and rewrite it.
49671  # Note: m4 eats our [], so we need to use [ and ] instead.
49672  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49673  if test "x$has_forbidden_chars" != x; then
49674    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49675    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49676  fi
49677
49678
49679  windows_path="$new_path"
49680  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49681    unix_path=`$CYGPATH -u "$windows_path"`
49682    new_path="$unix_path"
49683  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49684    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49685    new_path="$unix_path"
49686  fi
49687
49688  if test "x$path" != "x$new_path"; then
49689    MSVC_DLL="$new_path"
49690    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49691$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49692  fi
49693
49694  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49695  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49696
49697    else
49698      # We're on a unix platform. Hooray! :)
49699      path="$MSVC_DLL"
49700      has_space=`$ECHO "$path" | $GREP " "`
49701      if test "x$has_space" != x; then
49702        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49703$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49704        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49705      fi
49706
49707      # Use eval to expand a potential ~
49708      eval path="$path"
49709      if test ! -f "$path" && test ! -d "$path"; then
49710        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49711      fi
49712
49713      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49714    fi
49715  fi
49716
49717      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49718$as_echo_n "checking for $DLL_NAME... " >&6; }
49719      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49720$as_echo "$MSVC_DLL" >&6; }
49721    else
49722      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49723$as_echo "incorrect, ignoring" >&6; }
49724      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49725$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49726    fi
49727  fi
49728
49729    if test "x$MSVC_DLL" = x; then
49730      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
49731    fi
49732    MSVCR_DLL="$MSVC_DLL"
49733  elif test "x$DEVKIT_MSVCR_DLL" != x; then
49734
49735  DLL_NAME="$MSVCR_NAME"
49736  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
49737  METHOD="devkit"
49738  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49739    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49740$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49741
49742    # Need to check if the found msvcr is correct architecture
49743    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49744$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49745    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49746    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49747      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49748      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49749      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49750        CORRECT_MSVCR_ARCH="PE32 executable"
49751      else
49752        CORRECT_MSVCR_ARCH="PE32+ executable"
49753      fi
49754    else
49755      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49756        CORRECT_MSVCR_ARCH=386
49757      else
49758        CORRECT_MSVCR_ARCH=x86-64
49759      fi
49760    fi
49761    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49762      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49763$as_echo "ok" >&6; }
49764      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49765
49766  # Only process if variable expands to non-empty
49767
49768  if test "x$MSVC_DLL" != x; then
49769    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49770
49771  # Input might be given as Windows format, start by converting to
49772  # unix format.
49773  path="$MSVC_DLL"
49774  new_path=`$CYGPATH -u "$path"`
49775
49776  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49777  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49778  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49779  # "foo.exe" is OK but "foo" is an error.
49780  #
49781  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49782  # It is also a way to make sure we got the proper file name for the real test later on.
49783  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49784  if test "x$test_shortpath" = x; then
49785    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49786$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49787    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49788  fi
49789
49790  # Call helper function which possibly converts this using DOS-style short mode.
49791  # If so, the updated path is stored in $new_path.
49792
49793  input_path="$new_path"
49794  # Check if we need to convert this using DOS-style short mode. If the path
49795  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49796  # take no chances and rewrite it.
49797  # Note: m4 eats our [], so we need to use [ and ] instead.
49798  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49799  if test "x$has_forbidden_chars" != x; then
49800    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49801    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49802    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49803    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49804      # Going to short mode and back again did indeed matter. Since short mode is
49805      # case insensitive, let's make it lowercase to improve readability.
49806      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49807      # Now convert it back to Unix-style (cygpath)
49808      input_path=`$CYGPATH -u "$shortmode_path"`
49809      new_path="$input_path"
49810    fi
49811  fi
49812
49813  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49814  if test "x$test_cygdrive_prefix" = x; then
49815    # As a simple fix, exclude /usr/bin since it's not a real path.
49816    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49817      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49818      # a path prefixed by /cygdrive for fixpath to work.
49819      new_path="$CYGWIN_ROOT_PATH$input_path"
49820    fi
49821  fi
49822
49823
49824  if test "x$path" != "x$new_path"; then
49825    MSVC_DLL="$new_path"
49826    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49827$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49828  fi
49829
49830    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49831
49832  path="$MSVC_DLL"
49833  has_colon=`$ECHO $path | $GREP ^.:`
49834  new_path="$path"
49835  if test "x$has_colon" = x; then
49836    # Not in mixed or Windows style, start by that.
49837    new_path=`cmd //c echo $path`
49838  fi
49839
49840
49841  input_path="$new_path"
49842  # Check if we need to convert this using DOS-style short mode. If the path
49843  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49844  # take no chances and rewrite it.
49845  # Note: m4 eats our [], so we need to use [ and ] instead.
49846  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49847  if test "x$has_forbidden_chars" != x; then
49848    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49849    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49850  fi
49851
49852
49853  windows_path="$new_path"
49854  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49855    unix_path=`$CYGPATH -u "$windows_path"`
49856    new_path="$unix_path"
49857  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49858    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49859    new_path="$unix_path"
49860  fi
49861
49862  if test "x$path" != "x$new_path"; then
49863    MSVC_DLL="$new_path"
49864    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49865$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49866  fi
49867
49868  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49869  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49870
49871    else
49872      # We're on a unix platform. Hooray! :)
49873      path="$MSVC_DLL"
49874      has_space=`$ECHO "$path" | $GREP " "`
49875      if test "x$has_space" != x; then
49876        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49877$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49878        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49879      fi
49880
49881      # Use eval to expand a potential ~
49882      eval path="$path"
49883      if test ! -f "$path" && test ! -d "$path"; then
49884        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49885      fi
49886
49887      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49888    fi
49889  fi
49890
49891      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49892$as_echo_n "checking for $DLL_NAME... " >&6; }
49893      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49894$as_echo "$MSVC_DLL" >&6; }
49895    else
49896      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49897$as_echo "incorrect, ignoring" >&6; }
49898      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49899$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49900    fi
49901  fi
49902
49903    if test "x$MSVC_DLL" = x; then
49904      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
49905    fi
49906    MSVCR_DLL="$MSVC_DLL"
49907  else
49908
49909  DLL_NAME="${MSVCR_NAME}"
49910  MSVC_DLL=
49911
49912  if test "x$MSVC_DLL" = x; then
49913    # Probe: Using well-known location from Visual Studio 10.0
49914    if test "x$VCINSTALLDIR" != x; then
49915      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
49916
49917  windows_path="$CYGWIN_VC_INSTALL_DIR"
49918  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49919    unix_path=`$CYGPATH -u "$windows_path"`
49920    CYGWIN_VC_INSTALL_DIR="$unix_path"
49921  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49922    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49923    CYGWIN_VC_INSTALL_DIR="$unix_path"
49924  fi
49925
49926      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49927        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
49928      else
49929        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
49930      fi
49931      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
49932
49933  DLL_NAME="$DLL_NAME"
49934  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49935  METHOD="well-known location in VCINSTALLDIR"
49936  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49937    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49938$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49939
49940    # Need to check if the found msvcr is correct architecture
49941    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49942$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49943    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49944    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49945      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49946      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49947      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49948        CORRECT_MSVCR_ARCH="PE32 executable"
49949      else
49950        CORRECT_MSVCR_ARCH="PE32+ executable"
49951      fi
49952    else
49953      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49954        CORRECT_MSVCR_ARCH=386
49955      else
49956        CORRECT_MSVCR_ARCH=x86-64
49957      fi
49958    fi
49959    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49960      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49961$as_echo "ok" >&6; }
49962      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49963
49964  # Only process if variable expands to non-empty
49965
49966  if test "x$MSVC_DLL" != x; then
49967    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49968
49969  # Input might be given as Windows format, start by converting to
49970  # unix format.
49971  path="$MSVC_DLL"
49972  new_path=`$CYGPATH -u "$path"`
49973
49974  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49975  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49976  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49977  # "foo.exe" is OK but "foo" is an error.
49978  #
49979  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49980  # It is also a way to make sure we got the proper file name for the real test later on.
49981  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49982  if test "x$test_shortpath" = x; then
49983    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49984$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49985    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49986  fi
49987
49988  # Call helper function which possibly converts this using DOS-style short mode.
49989  # If so, the updated path is stored in $new_path.
49990
49991  input_path="$new_path"
49992  # Check if we need to convert this using DOS-style short mode. If the path
49993  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49994  # take no chances and rewrite it.
49995  # Note: m4 eats our [], so we need to use [ and ] instead.
49996  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49997  if test "x$has_forbidden_chars" != x; then
49998    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49999    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50000    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50001    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50002      # Going to short mode and back again did indeed matter. Since short mode is
50003      # case insensitive, let's make it lowercase to improve readability.
50004      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50005      # Now convert it back to Unix-style (cygpath)
50006      input_path=`$CYGPATH -u "$shortmode_path"`
50007      new_path="$input_path"
50008    fi
50009  fi
50010
50011  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50012  if test "x$test_cygdrive_prefix" = x; then
50013    # As a simple fix, exclude /usr/bin since it's not a real path.
50014    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50015      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50016      # a path prefixed by /cygdrive for fixpath to work.
50017      new_path="$CYGWIN_ROOT_PATH$input_path"
50018    fi
50019  fi
50020
50021
50022  if test "x$path" != "x$new_path"; then
50023    MSVC_DLL="$new_path"
50024    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50025$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50026  fi
50027
50028    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50029
50030  path="$MSVC_DLL"
50031  has_colon=`$ECHO $path | $GREP ^.:`
50032  new_path="$path"
50033  if test "x$has_colon" = x; then
50034    # Not in mixed or Windows style, start by that.
50035    new_path=`cmd //c echo $path`
50036  fi
50037
50038
50039  input_path="$new_path"
50040  # Check if we need to convert this using DOS-style short mode. If the path
50041  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50042  # take no chances and rewrite it.
50043  # Note: m4 eats our [], so we need to use [ and ] instead.
50044  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50045  if test "x$has_forbidden_chars" != x; then
50046    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50047    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50048  fi
50049
50050
50051  windows_path="$new_path"
50052  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50053    unix_path=`$CYGPATH -u "$windows_path"`
50054    new_path="$unix_path"
50055  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50056    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50057    new_path="$unix_path"
50058  fi
50059
50060  if test "x$path" != "x$new_path"; then
50061    MSVC_DLL="$new_path"
50062    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50063$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50064  fi
50065
50066  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50067  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50068
50069    else
50070      # We're on a unix platform. Hooray! :)
50071      path="$MSVC_DLL"
50072      has_space=`$ECHO "$path" | $GREP " "`
50073      if test "x$has_space" != x; then
50074        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50075$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50076        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50077      fi
50078
50079      # Use eval to expand a potential ~
50080      eval path="$path"
50081      if test ! -f "$path" && test ! -d "$path"; then
50082        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50083      fi
50084
50085      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50086    fi
50087  fi
50088
50089      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50090$as_echo_n "checking for $DLL_NAME... " >&6; }
50091      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50092$as_echo "$MSVC_DLL" >&6; }
50093    else
50094      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50095$as_echo "incorrect, ignoring" >&6; }
50096      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50097$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50098    fi
50099  fi
50100
50101    fi
50102  fi
50103
50104  if test "x$MSVC_DLL" = x; then
50105    # Probe: Check in the Boot JDK directory.
50106    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
50107
50108  DLL_NAME="$DLL_NAME"
50109  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50110  METHOD="well-known location in Boot JDK"
50111  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50112    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50113$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50114
50115    # Need to check if the found msvcr is correct architecture
50116    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50117$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50118    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50119    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50120      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50121      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50122      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50123        CORRECT_MSVCR_ARCH="PE32 executable"
50124      else
50125        CORRECT_MSVCR_ARCH="PE32+ executable"
50126      fi
50127    else
50128      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50129        CORRECT_MSVCR_ARCH=386
50130      else
50131        CORRECT_MSVCR_ARCH=x86-64
50132      fi
50133    fi
50134    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50135      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50136$as_echo "ok" >&6; }
50137      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50138
50139  # Only process if variable expands to non-empty
50140
50141  if test "x$MSVC_DLL" != x; then
50142    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50143
50144  # Input might be given as Windows format, start by converting to
50145  # unix format.
50146  path="$MSVC_DLL"
50147  new_path=`$CYGPATH -u "$path"`
50148
50149  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50150  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50151  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50152  # "foo.exe" is OK but "foo" is an error.
50153  #
50154  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50155  # It is also a way to make sure we got the proper file name for the real test later on.
50156  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50157  if test "x$test_shortpath" = x; then
50158    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50159$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50160    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50161  fi
50162
50163  # Call helper function which possibly converts this using DOS-style short mode.
50164  # If so, the updated path is stored in $new_path.
50165
50166  input_path="$new_path"
50167  # Check if we need to convert this using DOS-style short mode. If the path
50168  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50169  # take no chances and rewrite it.
50170  # Note: m4 eats our [], so we need to use [ and ] instead.
50171  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50172  if test "x$has_forbidden_chars" != x; then
50173    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50174    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50175    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50176    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50177      # Going to short mode and back again did indeed matter. Since short mode is
50178      # case insensitive, let's make it lowercase to improve readability.
50179      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50180      # Now convert it back to Unix-style (cygpath)
50181      input_path=`$CYGPATH -u "$shortmode_path"`
50182      new_path="$input_path"
50183    fi
50184  fi
50185
50186  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50187  if test "x$test_cygdrive_prefix" = x; then
50188    # As a simple fix, exclude /usr/bin since it's not a real path.
50189    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50190      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50191      # a path prefixed by /cygdrive for fixpath to work.
50192      new_path="$CYGWIN_ROOT_PATH$input_path"
50193    fi
50194  fi
50195
50196
50197  if test "x$path" != "x$new_path"; then
50198    MSVC_DLL="$new_path"
50199    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50200$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50201  fi
50202
50203    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50204
50205  path="$MSVC_DLL"
50206  has_colon=`$ECHO $path | $GREP ^.:`
50207  new_path="$path"
50208  if test "x$has_colon" = x; then
50209    # Not in mixed or Windows style, start by that.
50210    new_path=`cmd //c echo $path`
50211  fi
50212
50213
50214  input_path="$new_path"
50215  # Check if we need to convert this using DOS-style short mode. If the path
50216  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50217  # take no chances and rewrite it.
50218  # Note: m4 eats our [], so we need to use [ and ] instead.
50219  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50220  if test "x$has_forbidden_chars" != x; then
50221    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50222    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50223  fi
50224
50225
50226  windows_path="$new_path"
50227  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50228    unix_path=`$CYGPATH -u "$windows_path"`
50229    new_path="$unix_path"
50230  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50231    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50232    new_path="$unix_path"
50233  fi
50234
50235  if test "x$path" != "x$new_path"; then
50236    MSVC_DLL="$new_path"
50237    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50238$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50239  fi
50240
50241  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50242  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50243
50244    else
50245      # We're on a unix platform. Hooray! :)
50246      path="$MSVC_DLL"
50247      has_space=`$ECHO "$path" | $GREP " "`
50248      if test "x$has_space" != x; then
50249        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50250$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50251        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50252      fi
50253
50254      # Use eval to expand a potential ~
50255      eval path="$path"
50256      if test ! -f "$path" && test ! -d "$path"; then
50257        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50258      fi
50259
50260      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50261    fi
50262  fi
50263
50264      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50265$as_echo_n "checking for $DLL_NAME... " >&6; }
50266      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50267$as_echo "$MSVC_DLL" >&6; }
50268    else
50269      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50270$as_echo "incorrect, ignoring" >&6; }
50271      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50272$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50273    fi
50274  fi
50275
50276  fi
50277
50278  if test "x$MSVC_DLL" = x; then
50279    # Probe: Look in the Windows system32 directory
50280    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
50281
50282  windows_path="$CYGWIN_SYSTEMROOT"
50283  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50284    unix_path=`$CYGPATH -u "$windows_path"`
50285    CYGWIN_SYSTEMROOT="$unix_path"
50286  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50287    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50288    CYGWIN_SYSTEMROOT="$unix_path"
50289  fi
50290
50291    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
50292
50293  DLL_NAME="$DLL_NAME"
50294  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50295  METHOD="well-known location in SYSTEMROOT"
50296  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50297    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50298$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50299
50300    # Need to check if the found msvcr is correct architecture
50301    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50302$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50303    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50304    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50305      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50306      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50307      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50308        CORRECT_MSVCR_ARCH="PE32 executable"
50309      else
50310        CORRECT_MSVCR_ARCH="PE32+ executable"
50311      fi
50312    else
50313      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50314        CORRECT_MSVCR_ARCH=386
50315      else
50316        CORRECT_MSVCR_ARCH=x86-64
50317      fi
50318    fi
50319    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50320      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50321$as_echo "ok" >&6; }
50322      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50323
50324  # Only process if variable expands to non-empty
50325
50326  if test "x$MSVC_DLL" != x; then
50327    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50328
50329  # Input might be given as Windows format, start by converting to
50330  # unix format.
50331  path="$MSVC_DLL"
50332  new_path=`$CYGPATH -u "$path"`
50333
50334  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50335  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50336  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50337  # "foo.exe" is OK but "foo" is an error.
50338  #
50339  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50340  # It is also a way to make sure we got the proper file name for the real test later on.
50341  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50342  if test "x$test_shortpath" = x; then
50343    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50344$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50345    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50346  fi
50347
50348  # Call helper function which possibly converts this using DOS-style short mode.
50349  # If so, the updated path is stored in $new_path.
50350
50351  input_path="$new_path"
50352  # Check if we need to convert this using DOS-style short mode. If the path
50353  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50354  # take no chances and rewrite it.
50355  # Note: m4 eats our [], so we need to use [ and ] instead.
50356  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50357  if test "x$has_forbidden_chars" != x; then
50358    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50359    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50360    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50361    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50362      # Going to short mode and back again did indeed matter. Since short mode is
50363      # case insensitive, let's make it lowercase to improve readability.
50364      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50365      # Now convert it back to Unix-style (cygpath)
50366      input_path=`$CYGPATH -u "$shortmode_path"`
50367      new_path="$input_path"
50368    fi
50369  fi
50370
50371  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50372  if test "x$test_cygdrive_prefix" = x; then
50373    # As a simple fix, exclude /usr/bin since it's not a real path.
50374    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50375      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50376      # a path prefixed by /cygdrive for fixpath to work.
50377      new_path="$CYGWIN_ROOT_PATH$input_path"
50378    fi
50379  fi
50380
50381
50382  if test "x$path" != "x$new_path"; then
50383    MSVC_DLL="$new_path"
50384    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50385$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50386  fi
50387
50388    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50389
50390  path="$MSVC_DLL"
50391  has_colon=`$ECHO $path | $GREP ^.:`
50392  new_path="$path"
50393  if test "x$has_colon" = x; then
50394    # Not in mixed or Windows style, start by that.
50395    new_path=`cmd //c echo $path`
50396  fi
50397
50398
50399  input_path="$new_path"
50400  # Check if we need to convert this using DOS-style short mode. If the path
50401  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50402  # take no chances and rewrite it.
50403  # Note: m4 eats our [], so we need to use [ and ] instead.
50404  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50405  if test "x$has_forbidden_chars" != x; then
50406    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50407    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50408  fi
50409
50410
50411  windows_path="$new_path"
50412  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50413    unix_path=`$CYGPATH -u "$windows_path"`
50414    new_path="$unix_path"
50415  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50416    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50417    new_path="$unix_path"
50418  fi
50419
50420  if test "x$path" != "x$new_path"; then
50421    MSVC_DLL="$new_path"
50422    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50423$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50424  fi
50425
50426  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50427  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50428
50429    else
50430      # We're on a unix platform. Hooray! :)
50431      path="$MSVC_DLL"
50432      has_space=`$ECHO "$path" | $GREP " "`
50433      if test "x$has_space" != x; then
50434        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50435$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50436        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50437      fi
50438
50439      # Use eval to expand a potential ~
50440      eval path="$path"
50441      if test ! -f "$path" && test ! -d "$path"; then
50442        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50443      fi
50444
50445      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50446    fi
50447  fi
50448
50449      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50450$as_echo_n "checking for $DLL_NAME... " >&6; }
50451      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50452$as_echo "$MSVC_DLL" >&6; }
50453    else
50454      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50455$as_echo "incorrect, ignoring" >&6; }
50456      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50457$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50458    fi
50459  fi
50460
50461  fi
50462
50463  if test "x$MSVC_DLL" = x; then
50464    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
50465    if test "x$VS100COMNTOOLS" != x; then
50466      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
50467
50468  windows_path="$CYGWIN_VS_TOOLS_DIR"
50469  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50470    unix_path=`$CYGPATH -u "$windows_path"`
50471    CYGWIN_VS_TOOLS_DIR="$unix_path"
50472  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50473    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50474    CYGWIN_VS_TOOLS_DIR="$unix_path"
50475  fi
50476
50477      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50478        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50479	    | $GREP -i /x64/ | $HEAD --lines 1`
50480      else
50481        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50482	    | $GREP -i /x86/ | $HEAD --lines 1`
50483      fi
50484
50485  DLL_NAME="$DLL_NAME"
50486  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50487  METHOD="search of VS100COMNTOOLS"
50488  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50489    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50490$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50491
50492    # Need to check if the found msvcr is correct architecture
50493    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50494$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50495    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50496    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50497      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50498      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50499      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50500        CORRECT_MSVCR_ARCH="PE32 executable"
50501      else
50502        CORRECT_MSVCR_ARCH="PE32+ executable"
50503      fi
50504    else
50505      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50506        CORRECT_MSVCR_ARCH=386
50507      else
50508        CORRECT_MSVCR_ARCH=x86-64
50509      fi
50510    fi
50511    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50512      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50513$as_echo "ok" >&6; }
50514      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50515
50516  # Only process if variable expands to non-empty
50517
50518  if test "x$MSVC_DLL" != x; then
50519    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50520
50521  # Input might be given as Windows format, start by converting to
50522  # unix format.
50523  path="$MSVC_DLL"
50524  new_path=`$CYGPATH -u "$path"`
50525
50526  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50527  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50528  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50529  # "foo.exe" is OK but "foo" is an error.
50530  #
50531  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50532  # It is also a way to make sure we got the proper file name for the real test later on.
50533  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50534  if test "x$test_shortpath" = x; then
50535    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50536$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50537    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50538  fi
50539
50540  # Call helper function which possibly converts this using DOS-style short mode.
50541  # If so, the updated path is stored in $new_path.
50542
50543  input_path="$new_path"
50544  # Check if we need to convert this using DOS-style short mode. If the path
50545  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50546  # take no chances and rewrite it.
50547  # Note: m4 eats our [], so we need to use [ and ] instead.
50548  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50549  if test "x$has_forbidden_chars" != x; then
50550    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50551    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50552    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50553    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50554      # Going to short mode and back again did indeed matter. Since short mode is
50555      # case insensitive, let's make it lowercase to improve readability.
50556      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50557      # Now convert it back to Unix-style (cygpath)
50558      input_path=`$CYGPATH -u "$shortmode_path"`
50559      new_path="$input_path"
50560    fi
50561  fi
50562
50563  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50564  if test "x$test_cygdrive_prefix" = x; then
50565    # As a simple fix, exclude /usr/bin since it's not a real path.
50566    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50567      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50568      # a path prefixed by /cygdrive for fixpath to work.
50569      new_path="$CYGWIN_ROOT_PATH$input_path"
50570    fi
50571  fi
50572
50573
50574  if test "x$path" != "x$new_path"; then
50575    MSVC_DLL="$new_path"
50576    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50577$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50578  fi
50579
50580    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50581
50582  path="$MSVC_DLL"
50583  has_colon=`$ECHO $path | $GREP ^.:`
50584  new_path="$path"
50585  if test "x$has_colon" = x; then
50586    # Not in mixed or Windows style, start by that.
50587    new_path=`cmd //c echo $path`
50588  fi
50589
50590
50591  input_path="$new_path"
50592  # Check if we need to convert this using DOS-style short mode. If the path
50593  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50594  # take no chances and rewrite it.
50595  # Note: m4 eats our [], so we need to use [ and ] instead.
50596  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50597  if test "x$has_forbidden_chars" != x; then
50598    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50599    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50600  fi
50601
50602
50603  windows_path="$new_path"
50604  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50605    unix_path=`$CYGPATH -u "$windows_path"`
50606    new_path="$unix_path"
50607  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50608    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50609    new_path="$unix_path"
50610  fi
50611
50612  if test "x$path" != "x$new_path"; then
50613    MSVC_DLL="$new_path"
50614    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50615$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50616  fi
50617
50618  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50619  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50620
50621    else
50622      # We're on a unix platform. Hooray! :)
50623      path="$MSVC_DLL"
50624      has_space=`$ECHO "$path" | $GREP " "`
50625      if test "x$has_space" != x; then
50626        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50627$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50628        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50629      fi
50630
50631      # Use eval to expand a potential ~
50632      eval path="$path"
50633      if test ! -f "$path" && test ! -d "$path"; then
50634        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50635      fi
50636
50637      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50638    fi
50639  fi
50640
50641      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50642$as_echo_n "checking for $DLL_NAME... " >&6; }
50643      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50644$as_echo "$MSVC_DLL" >&6; }
50645    else
50646      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50647$as_echo "incorrect, ignoring" >&6; }
50648      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50649$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50650    fi
50651  fi
50652
50653    fi
50654  fi
50655
50656  if test "x$MSVC_DLL" = x; then
50657    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
50658    # (This was the original behaviour; kept since it might turn something up)
50659    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
50660      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50661        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50662	    | $GREP x64 | $HEAD --lines 1`
50663      else
50664        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50665	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
50666        if test "x$POSSIBLE_MSVC_DLL" = x; then
50667          # We're grasping at straws now...
50668          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50669	      | $HEAD --lines 1`
50670        fi
50671      fi
50672
50673
50674  DLL_NAME="$DLL_NAME"
50675  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50676  METHOD="search of VCINSTALLDIR"
50677  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50678    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50679$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50680
50681    # Need to check if the found msvcr is correct architecture
50682    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50683$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50684    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50685    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50686      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50687      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50688      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50689        CORRECT_MSVCR_ARCH="PE32 executable"
50690      else
50691        CORRECT_MSVCR_ARCH="PE32+ executable"
50692      fi
50693    else
50694      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50695        CORRECT_MSVCR_ARCH=386
50696      else
50697        CORRECT_MSVCR_ARCH=x86-64
50698      fi
50699    fi
50700    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50701      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50702$as_echo "ok" >&6; }
50703      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50704
50705  # Only process if variable expands to non-empty
50706
50707  if test "x$MSVC_DLL" != x; then
50708    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50709
50710  # Input might be given as Windows format, start by converting to
50711  # unix format.
50712  path="$MSVC_DLL"
50713  new_path=`$CYGPATH -u "$path"`
50714
50715  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50716  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50717  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50718  # "foo.exe" is OK but "foo" is an error.
50719  #
50720  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50721  # It is also a way to make sure we got the proper file name for the real test later on.
50722  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50723  if test "x$test_shortpath" = x; then
50724    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50725$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50726    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50727  fi
50728
50729  # Call helper function which possibly converts this using DOS-style short mode.
50730  # If so, the updated path is stored in $new_path.
50731
50732  input_path="$new_path"
50733  # Check if we need to convert this using DOS-style short mode. If the path
50734  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50735  # take no chances and rewrite it.
50736  # Note: m4 eats our [], so we need to use [ and ] instead.
50737  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50738  if test "x$has_forbidden_chars" != x; then
50739    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50740    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50741    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50742    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50743      # Going to short mode and back again did indeed matter. Since short mode is
50744      # case insensitive, let's make it lowercase to improve readability.
50745      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50746      # Now convert it back to Unix-style (cygpath)
50747      input_path=`$CYGPATH -u "$shortmode_path"`
50748      new_path="$input_path"
50749    fi
50750  fi
50751
50752  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50753  if test "x$test_cygdrive_prefix" = x; then
50754    # As a simple fix, exclude /usr/bin since it's not a real path.
50755    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50756      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50757      # a path prefixed by /cygdrive for fixpath to work.
50758      new_path="$CYGWIN_ROOT_PATH$input_path"
50759    fi
50760  fi
50761
50762
50763  if test "x$path" != "x$new_path"; then
50764    MSVC_DLL="$new_path"
50765    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50766$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50767  fi
50768
50769    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50770
50771  path="$MSVC_DLL"
50772  has_colon=`$ECHO $path | $GREP ^.:`
50773  new_path="$path"
50774  if test "x$has_colon" = x; then
50775    # Not in mixed or Windows style, start by that.
50776    new_path=`cmd //c echo $path`
50777  fi
50778
50779
50780  input_path="$new_path"
50781  # Check if we need to convert this using DOS-style short mode. If the path
50782  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50783  # take no chances and rewrite it.
50784  # Note: m4 eats our [], so we need to use [ and ] instead.
50785  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50786  if test "x$has_forbidden_chars" != x; then
50787    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50788    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50789  fi
50790
50791
50792  windows_path="$new_path"
50793  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50794    unix_path=`$CYGPATH -u "$windows_path"`
50795    new_path="$unix_path"
50796  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50797    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50798    new_path="$unix_path"
50799  fi
50800
50801  if test "x$path" != "x$new_path"; then
50802    MSVC_DLL="$new_path"
50803    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50804$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50805  fi
50806
50807  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50808  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50809
50810    else
50811      # We're on a unix platform. Hooray! :)
50812      path="$MSVC_DLL"
50813      has_space=`$ECHO "$path" | $GREP " "`
50814      if test "x$has_space" != x; then
50815        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50816$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50817        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50818      fi
50819
50820      # Use eval to expand a potential ~
50821      eval path="$path"
50822      if test ! -f "$path" && test ! -d "$path"; then
50823        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50824      fi
50825
50826      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50827    fi
50828  fi
50829
50830      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50831$as_echo_n "checking for $DLL_NAME... " >&6; }
50832      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50833$as_echo "$MSVC_DLL" >&6; }
50834    else
50835      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50836$as_echo "incorrect, ignoring" >&6; }
50837      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50838$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50839    fi
50840  fi
50841
50842    fi
50843  fi
50844
50845  if test "x$MSVC_DLL" = x; then
50846    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50847$as_echo_n "checking for $DLL_NAME... " >&6; }
50848    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50849$as_echo "no" >&6; }
50850    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
50851  fi
50852
50853    MSVCR_DLL="$MSVC_DLL"
50854  fi
50855
50856
50857
50858# Check whether --with-msvcp-dll was given.
50859if test "${with_msvcp_dll+set}" = set; then :
50860  withval=$with_msvcp_dll;
50861fi
50862
50863
50864  if test "x$MSVCP_NAME" != "x"; then
50865    if test "x$with_msvcp_dll" != x; then
50866      # If given explicitely by user, do not probe. If not present, fail directly.
50867
50868  DLL_NAME="$MSVCP_NAME"
50869  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
50870  METHOD="--with-msvcp-dll"
50871  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50872    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50873$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50874
50875    # Need to check if the found msvcr is correct architecture
50876    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50877$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50878    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50879    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50880      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50881      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50882      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50883        CORRECT_MSVCR_ARCH="PE32 executable"
50884      else
50885        CORRECT_MSVCR_ARCH="PE32+ executable"
50886      fi
50887    else
50888      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50889        CORRECT_MSVCR_ARCH=386
50890      else
50891        CORRECT_MSVCR_ARCH=x86-64
50892      fi
50893    fi
50894    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50895      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50896$as_echo "ok" >&6; }
50897      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50898
50899  # Only process if variable expands to non-empty
50900
50901  if test "x$MSVC_DLL" != x; then
50902    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50903
50904  # Input might be given as Windows format, start by converting to
50905  # unix format.
50906  path="$MSVC_DLL"
50907  new_path=`$CYGPATH -u "$path"`
50908
50909  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50910  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50911  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50912  # "foo.exe" is OK but "foo" is an error.
50913  #
50914  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50915  # It is also a way to make sure we got the proper file name for the real test later on.
50916  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50917  if test "x$test_shortpath" = x; then
50918    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50919$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50920    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50921  fi
50922
50923  # Call helper function which possibly converts this using DOS-style short mode.
50924  # If so, the updated path is stored in $new_path.
50925
50926  input_path="$new_path"
50927  # Check if we need to convert this using DOS-style short mode. If the path
50928  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50929  # take no chances and rewrite it.
50930  # Note: m4 eats our [], so we need to use [ and ] instead.
50931  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50932  if test "x$has_forbidden_chars" != x; then
50933    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50934    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50935    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50936    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50937      # Going to short mode and back again did indeed matter. Since short mode is
50938      # case insensitive, let's make it lowercase to improve readability.
50939      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50940      # Now convert it back to Unix-style (cygpath)
50941      input_path=`$CYGPATH -u "$shortmode_path"`
50942      new_path="$input_path"
50943    fi
50944  fi
50945
50946  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50947  if test "x$test_cygdrive_prefix" = x; then
50948    # As a simple fix, exclude /usr/bin since it's not a real path.
50949    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50950      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50951      # a path prefixed by /cygdrive for fixpath to work.
50952      new_path="$CYGWIN_ROOT_PATH$input_path"
50953    fi
50954  fi
50955
50956
50957  if test "x$path" != "x$new_path"; then
50958    MSVC_DLL="$new_path"
50959    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50960$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50961  fi
50962
50963    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50964
50965  path="$MSVC_DLL"
50966  has_colon=`$ECHO $path | $GREP ^.:`
50967  new_path="$path"
50968  if test "x$has_colon" = x; then
50969    # Not in mixed or Windows style, start by that.
50970    new_path=`cmd //c echo $path`
50971  fi
50972
50973
50974  input_path="$new_path"
50975  # Check if we need to convert this using DOS-style short mode. If the path
50976  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50977  # take no chances and rewrite it.
50978  # Note: m4 eats our [], so we need to use [ and ] instead.
50979  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50980  if test "x$has_forbidden_chars" != x; then
50981    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50982    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50983  fi
50984
50985
50986  windows_path="$new_path"
50987  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50988    unix_path=`$CYGPATH -u "$windows_path"`
50989    new_path="$unix_path"
50990  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50991    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50992    new_path="$unix_path"
50993  fi
50994
50995  if test "x$path" != "x$new_path"; then
50996    MSVC_DLL="$new_path"
50997    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50998$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50999  fi
51000
51001  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51002  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51003
51004    else
51005      # We're on a unix platform. Hooray! :)
51006      path="$MSVC_DLL"
51007      has_space=`$ECHO "$path" | $GREP " "`
51008      if test "x$has_space" != x; then
51009        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51010$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51011        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51012      fi
51013
51014      # Use eval to expand a potential ~
51015      eval path="$path"
51016      if test ! -f "$path" && test ! -d "$path"; then
51017        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51018      fi
51019
51020      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51021    fi
51022  fi
51023
51024      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51025$as_echo_n "checking for $DLL_NAME... " >&6; }
51026      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51027$as_echo "$MSVC_DLL" >&6; }
51028    else
51029      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51030$as_echo "incorrect, ignoring" >&6; }
51031      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51032$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51033    fi
51034  fi
51035
51036      if test "x$MSVC_DLL" = x; then
51037        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
51038      fi
51039      MSVCP_DLL="$MSVC_DLL"
51040    elif test "x$DEVKIT_MSVCP_DLL" != x; then
51041
51042  DLL_NAME="$MSVCP_NAME"
51043  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
51044  METHOD="devkit"
51045  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51046    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51047$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51048
51049    # Need to check if the found msvcr is correct architecture
51050    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51051$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51052    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51053    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51054      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51055      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51056      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51057        CORRECT_MSVCR_ARCH="PE32 executable"
51058      else
51059        CORRECT_MSVCR_ARCH="PE32+ executable"
51060      fi
51061    else
51062      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51063        CORRECT_MSVCR_ARCH=386
51064      else
51065        CORRECT_MSVCR_ARCH=x86-64
51066      fi
51067    fi
51068    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51069      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51070$as_echo "ok" >&6; }
51071      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51072
51073  # Only process if variable expands to non-empty
51074
51075  if test "x$MSVC_DLL" != x; then
51076    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51077
51078  # Input might be given as Windows format, start by converting to
51079  # unix format.
51080  path="$MSVC_DLL"
51081  new_path=`$CYGPATH -u "$path"`
51082
51083  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51084  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51085  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51086  # "foo.exe" is OK but "foo" is an error.
51087  #
51088  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51089  # It is also a way to make sure we got the proper file name for the real test later on.
51090  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51091  if test "x$test_shortpath" = x; then
51092    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51093$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51094    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51095  fi
51096
51097  # Call helper function which possibly converts this using DOS-style short mode.
51098  # If so, the updated path is stored in $new_path.
51099
51100  input_path="$new_path"
51101  # Check if we need to convert this using DOS-style short mode. If the path
51102  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51103  # take no chances and rewrite it.
51104  # Note: m4 eats our [], so we need to use [ and ] instead.
51105  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51106  if test "x$has_forbidden_chars" != x; then
51107    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51108    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51109    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51110    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51111      # Going to short mode and back again did indeed matter. Since short mode is
51112      # case insensitive, let's make it lowercase to improve readability.
51113      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51114      # Now convert it back to Unix-style (cygpath)
51115      input_path=`$CYGPATH -u "$shortmode_path"`
51116      new_path="$input_path"
51117    fi
51118  fi
51119
51120  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51121  if test "x$test_cygdrive_prefix" = x; then
51122    # As a simple fix, exclude /usr/bin since it's not a real path.
51123    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51124      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51125      # a path prefixed by /cygdrive for fixpath to work.
51126      new_path="$CYGWIN_ROOT_PATH$input_path"
51127    fi
51128  fi
51129
51130
51131  if test "x$path" != "x$new_path"; then
51132    MSVC_DLL="$new_path"
51133    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51134$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51135  fi
51136
51137    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51138
51139  path="$MSVC_DLL"
51140  has_colon=`$ECHO $path | $GREP ^.:`
51141  new_path="$path"
51142  if test "x$has_colon" = x; then
51143    # Not in mixed or Windows style, start by that.
51144    new_path=`cmd //c echo $path`
51145  fi
51146
51147
51148  input_path="$new_path"
51149  # Check if we need to convert this using DOS-style short mode. If the path
51150  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51151  # take no chances and rewrite it.
51152  # Note: m4 eats our [], so we need to use [ and ] instead.
51153  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51154  if test "x$has_forbidden_chars" != x; then
51155    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51156    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51157  fi
51158
51159
51160  windows_path="$new_path"
51161  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51162    unix_path=`$CYGPATH -u "$windows_path"`
51163    new_path="$unix_path"
51164  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51165    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51166    new_path="$unix_path"
51167  fi
51168
51169  if test "x$path" != "x$new_path"; then
51170    MSVC_DLL="$new_path"
51171    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51172$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51173  fi
51174
51175  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51176  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51177
51178    else
51179      # We're on a unix platform. Hooray! :)
51180      path="$MSVC_DLL"
51181      has_space=`$ECHO "$path" | $GREP " "`
51182      if test "x$has_space" != x; then
51183        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51184$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51185        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51186      fi
51187
51188      # Use eval to expand a potential ~
51189      eval path="$path"
51190      if test ! -f "$path" && test ! -d "$path"; then
51191        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51192      fi
51193
51194      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51195    fi
51196  fi
51197
51198      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51199$as_echo_n "checking for $DLL_NAME... " >&6; }
51200      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51201$as_echo "$MSVC_DLL" >&6; }
51202    else
51203      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51204$as_echo "incorrect, ignoring" >&6; }
51205      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51206$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51207    fi
51208  fi
51209
51210      if test "x$MSVC_DLL" = x; then
51211        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
51212      fi
51213      MSVCP_DLL="$MSVC_DLL"
51214    else
51215
51216  DLL_NAME="${MSVCP_NAME}"
51217  MSVC_DLL=
51218
51219  if test "x$MSVC_DLL" = x; then
51220    # Probe: Using well-known location from Visual Studio 10.0
51221    if test "x$VCINSTALLDIR" != x; then
51222      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
51223
51224  windows_path="$CYGWIN_VC_INSTALL_DIR"
51225  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51226    unix_path=`$CYGPATH -u "$windows_path"`
51227    CYGWIN_VC_INSTALL_DIR="$unix_path"
51228  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51229    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51230    CYGWIN_VC_INSTALL_DIR="$unix_path"
51231  fi
51232
51233      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51234        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
51235      else
51236        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
51237      fi
51238      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
51239
51240  DLL_NAME="$DLL_NAME"
51241  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51242  METHOD="well-known location in VCINSTALLDIR"
51243  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51244    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51245$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51246
51247    # Need to check if the found msvcr is correct architecture
51248    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51249$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51250    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51251    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51252      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51253      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51254      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51255        CORRECT_MSVCR_ARCH="PE32 executable"
51256      else
51257        CORRECT_MSVCR_ARCH="PE32+ executable"
51258      fi
51259    else
51260      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51261        CORRECT_MSVCR_ARCH=386
51262      else
51263        CORRECT_MSVCR_ARCH=x86-64
51264      fi
51265    fi
51266    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51267      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51268$as_echo "ok" >&6; }
51269      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51270
51271  # Only process if variable expands to non-empty
51272
51273  if test "x$MSVC_DLL" != x; then
51274    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51275
51276  # Input might be given as Windows format, start by converting to
51277  # unix format.
51278  path="$MSVC_DLL"
51279  new_path=`$CYGPATH -u "$path"`
51280
51281  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51282  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51283  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51284  # "foo.exe" is OK but "foo" is an error.
51285  #
51286  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51287  # It is also a way to make sure we got the proper file name for the real test later on.
51288  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51289  if test "x$test_shortpath" = x; then
51290    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51291$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51292    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51293  fi
51294
51295  # Call helper function which possibly converts this using DOS-style short mode.
51296  # If so, the updated path is stored in $new_path.
51297
51298  input_path="$new_path"
51299  # Check if we need to convert this using DOS-style short mode. If the path
51300  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51301  # take no chances and rewrite it.
51302  # Note: m4 eats our [], so we need to use [ and ] instead.
51303  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51304  if test "x$has_forbidden_chars" != x; then
51305    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51306    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51307    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51308    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51309      # Going to short mode and back again did indeed matter. Since short mode is
51310      # case insensitive, let's make it lowercase to improve readability.
51311      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51312      # Now convert it back to Unix-style (cygpath)
51313      input_path=`$CYGPATH -u "$shortmode_path"`
51314      new_path="$input_path"
51315    fi
51316  fi
51317
51318  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51319  if test "x$test_cygdrive_prefix" = x; then
51320    # As a simple fix, exclude /usr/bin since it's not a real path.
51321    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51322      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51323      # a path prefixed by /cygdrive for fixpath to work.
51324      new_path="$CYGWIN_ROOT_PATH$input_path"
51325    fi
51326  fi
51327
51328
51329  if test "x$path" != "x$new_path"; then
51330    MSVC_DLL="$new_path"
51331    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51332$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51333  fi
51334
51335    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51336
51337  path="$MSVC_DLL"
51338  has_colon=`$ECHO $path | $GREP ^.:`
51339  new_path="$path"
51340  if test "x$has_colon" = x; then
51341    # Not in mixed or Windows style, start by that.
51342    new_path=`cmd //c echo $path`
51343  fi
51344
51345
51346  input_path="$new_path"
51347  # Check if we need to convert this using DOS-style short mode. If the path
51348  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51349  # take no chances and rewrite it.
51350  # Note: m4 eats our [], so we need to use [ and ] instead.
51351  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51352  if test "x$has_forbidden_chars" != x; then
51353    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51354    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51355  fi
51356
51357
51358  windows_path="$new_path"
51359  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51360    unix_path=`$CYGPATH -u "$windows_path"`
51361    new_path="$unix_path"
51362  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51363    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51364    new_path="$unix_path"
51365  fi
51366
51367  if test "x$path" != "x$new_path"; then
51368    MSVC_DLL="$new_path"
51369    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51370$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51371  fi
51372
51373  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51374  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51375
51376    else
51377      # We're on a unix platform. Hooray! :)
51378      path="$MSVC_DLL"
51379      has_space=`$ECHO "$path" | $GREP " "`
51380      if test "x$has_space" != x; then
51381        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51382$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51383        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51384      fi
51385
51386      # Use eval to expand a potential ~
51387      eval path="$path"
51388      if test ! -f "$path" && test ! -d "$path"; then
51389        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51390      fi
51391
51392      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51393    fi
51394  fi
51395
51396      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51397$as_echo_n "checking for $DLL_NAME... " >&6; }
51398      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51399$as_echo "$MSVC_DLL" >&6; }
51400    else
51401      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51402$as_echo "incorrect, ignoring" >&6; }
51403      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51404$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51405    fi
51406  fi
51407
51408    fi
51409  fi
51410
51411  if test "x$MSVC_DLL" = x; then
51412    # Probe: Check in the Boot JDK directory.
51413    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
51414
51415  DLL_NAME="$DLL_NAME"
51416  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51417  METHOD="well-known location in Boot JDK"
51418  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51419    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51420$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51421
51422    # Need to check if the found msvcr is correct architecture
51423    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51424$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51425    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51426    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51427      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51428      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51429      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51430        CORRECT_MSVCR_ARCH="PE32 executable"
51431      else
51432        CORRECT_MSVCR_ARCH="PE32+ executable"
51433      fi
51434    else
51435      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51436        CORRECT_MSVCR_ARCH=386
51437      else
51438        CORRECT_MSVCR_ARCH=x86-64
51439      fi
51440    fi
51441    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51442      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51443$as_echo "ok" >&6; }
51444      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51445
51446  # Only process if variable expands to non-empty
51447
51448  if test "x$MSVC_DLL" != x; then
51449    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51450
51451  # Input might be given as Windows format, start by converting to
51452  # unix format.
51453  path="$MSVC_DLL"
51454  new_path=`$CYGPATH -u "$path"`
51455
51456  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51457  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51458  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51459  # "foo.exe" is OK but "foo" is an error.
51460  #
51461  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51462  # It is also a way to make sure we got the proper file name for the real test later on.
51463  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51464  if test "x$test_shortpath" = x; then
51465    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51466$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51467    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51468  fi
51469
51470  # Call helper function which possibly converts this using DOS-style short mode.
51471  # If so, the updated path is stored in $new_path.
51472
51473  input_path="$new_path"
51474  # Check if we need to convert this using DOS-style short mode. If the path
51475  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51476  # take no chances and rewrite it.
51477  # Note: m4 eats our [], so we need to use [ and ] instead.
51478  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51479  if test "x$has_forbidden_chars" != x; then
51480    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51481    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51482    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51483    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51484      # Going to short mode and back again did indeed matter. Since short mode is
51485      # case insensitive, let's make it lowercase to improve readability.
51486      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51487      # Now convert it back to Unix-style (cygpath)
51488      input_path=`$CYGPATH -u "$shortmode_path"`
51489      new_path="$input_path"
51490    fi
51491  fi
51492
51493  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51494  if test "x$test_cygdrive_prefix" = x; then
51495    # As a simple fix, exclude /usr/bin since it's not a real path.
51496    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51497      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51498      # a path prefixed by /cygdrive for fixpath to work.
51499      new_path="$CYGWIN_ROOT_PATH$input_path"
51500    fi
51501  fi
51502
51503
51504  if test "x$path" != "x$new_path"; then
51505    MSVC_DLL="$new_path"
51506    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51507$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51508  fi
51509
51510    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51511
51512  path="$MSVC_DLL"
51513  has_colon=`$ECHO $path | $GREP ^.:`
51514  new_path="$path"
51515  if test "x$has_colon" = x; then
51516    # Not in mixed or Windows style, start by that.
51517    new_path=`cmd //c echo $path`
51518  fi
51519
51520
51521  input_path="$new_path"
51522  # Check if we need to convert this using DOS-style short mode. If the path
51523  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51524  # take no chances and rewrite it.
51525  # Note: m4 eats our [], so we need to use [ and ] instead.
51526  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51527  if test "x$has_forbidden_chars" != x; then
51528    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51529    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51530  fi
51531
51532
51533  windows_path="$new_path"
51534  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51535    unix_path=`$CYGPATH -u "$windows_path"`
51536    new_path="$unix_path"
51537  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51538    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51539    new_path="$unix_path"
51540  fi
51541
51542  if test "x$path" != "x$new_path"; then
51543    MSVC_DLL="$new_path"
51544    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51545$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51546  fi
51547
51548  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51549  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51550
51551    else
51552      # We're on a unix platform. Hooray! :)
51553      path="$MSVC_DLL"
51554      has_space=`$ECHO "$path" | $GREP " "`
51555      if test "x$has_space" != x; then
51556        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51557$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51558        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51559      fi
51560
51561      # Use eval to expand a potential ~
51562      eval path="$path"
51563      if test ! -f "$path" && test ! -d "$path"; then
51564        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51565      fi
51566
51567      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51568    fi
51569  fi
51570
51571      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51572$as_echo_n "checking for $DLL_NAME... " >&6; }
51573      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51574$as_echo "$MSVC_DLL" >&6; }
51575    else
51576      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51577$as_echo "incorrect, ignoring" >&6; }
51578      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51579$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51580    fi
51581  fi
51582
51583  fi
51584
51585  if test "x$MSVC_DLL" = x; then
51586    # Probe: Look in the Windows system32 directory
51587    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
51588
51589  windows_path="$CYGWIN_SYSTEMROOT"
51590  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51591    unix_path=`$CYGPATH -u "$windows_path"`
51592    CYGWIN_SYSTEMROOT="$unix_path"
51593  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51594    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51595    CYGWIN_SYSTEMROOT="$unix_path"
51596  fi
51597
51598    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
51599
51600  DLL_NAME="$DLL_NAME"
51601  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51602  METHOD="well-known location in SYSTEMROOT"
51603  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51604    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51605$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51606
51607    # Need to check if the found msvcr is correct architecture
51608    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51609$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51610    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51611    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51612      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51613      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51614      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51615        CORRECT_MSVCR_ARCH="PE32 executable"
51616      else
51617        CORRECT_MSVCR_ARCH="PE32+ executable"
51618      fi
51619    else
51620      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51621        CORRECT_MSVCR_ARCH=386
51622      else
51623        CORRECT_MSVCR_ARCH=x86-64
51624      fi
51625    fi
51626    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51627      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51628$as_echo "ok" >&6; }
51629      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51630
51631  # Only process if variable expands to non-empty
51632
51633  if test "x$MSVC_DLL" != x; then
51634    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51635
51636  # Input might be given as Windows format, start by converting to
51637  # unix format.
51638  path="$MSVC_DLL"
51639  new_path=`$CYGPATH -u "$path"`
51640
51641  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51642  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51643  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51644  # "foo.exe" is OK but "foo" is an error.
51645  #
51646  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51647  # It is also a way to make sure we got the proper file name for the real test later on.
51648  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51649  if test "x$test_shortpath" = x; then
51650    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51651$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51652    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51653  fi
51654
51655  # Call helper function which possibly converts this using DOS-style short mode.
51656  # If so, the updated path is stored in $new_path.
51657
51658  input_path="$new_path"
51659  # Check if we need to convert this using DOS-style short mode. If the path
51660  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51661  # take no chances and rewrite it.
51662  # Note: m4 eats our [], so we need to use [ and ] instead.
51663  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51664  if test "x$has_forbidden_chars" != x; then
51665    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51666    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51667    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51668    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51669      # Going to short mode and back again did indeed matter. Since short mode is
51670      # case insensitive, let's make it lowercase to improve readability.
51671      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51672      # Now convert it back to Unix-style (cygpath)
51673      input_path=`$CYGPATH -u "$shortmode_path"`
51674      new_path="$input_path"
51675    fi
51676  fi
51677
51678  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51679  if test "x$test_cygdrive_prefix" = x; then
51680    # As a simple fix, exclude /usr/bin since it's not a real path.
51681    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51682      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51683      # a path prefixed by /cygdrive for fixpath to work.
51684      new_path="$CYGWIN_ROOT_PATH$input_path"
51685    fi
51686  fi
51687
51688
51689  if test "x$path" != "x$new_path"; then
51690    MSVC_DLL="$new_path"
51691    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51692$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51693  fi
51694
51695    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51696
51697  path="$MSVC_DLL"
51698  has_colon=`$ECHO $path | $GREP ^.:`
51699  new_path="$path"
51700  if test "x$has_colon" = x; then
51701    # Not in mixed or Windows style, start by that.
51702    new_path=`cmd //c echo $path`
51703  fi
51704
51705
51706  input_path="$new_path"
51707  # Check if we need to convert this using DOS-style short mode. If the path
51708  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51709  # take no chances and rewrite it.
51710  # Note: m4 eats our [], so we need to use [ and ] instead.
51711  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51712  if test "x$has_forbidden_chars" != x; then
51713    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51714    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51715  fi
51716
51717
51718  windows_path="$new_path"
51719  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51720    unix_path=`$CYGPATH -u "$windows_path"`
51721    new_path="$unix_path"
51722  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51723    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51724    new_path="$unix_path"
51725  fi
51726
51727  if test "x$path" != "x$new_path"; then
51728    MSVC_DLL="$new_path"
51729    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51730$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51731  fi
51732
51733  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51734  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51735
51736    else
51737      # We're on a unix platform. Hooray! :)
51738      path="$MSVC_DLL"
51739      has_space=`$ECHO "$path" | $GREP " "`
51740      if test "x$has_space" != x; then
51741        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51742$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51743        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51744      fi
51745
51746      # Use eval to expand a potential ~
51747      eval path="$path"
51748      if test ! -f "$path" && test ! -d "$path"; then
51749        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51750      fi
51751
51752      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51753    fi
51754  fi
51755
51756      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51757$as_echo_n "checking for $DLL_NAME... " >&6; }
51758      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51759$as_echo "$MSVC_DLL" >&6; }
51760    else
51761      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51762$as_echo "incorrect, ignoring" >&6; }
51763      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51764$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51765    fi
51766  fi
51767
51768  fi
51769
51770  if test "x$MSVC_DLL" = x; then
51771    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
51772    if test "x$VS100COMNTOOLS" != x; then
51773      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
51774
51775  windows_path="$CYGWIN_VS_TOOLS_DIR"
51776  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51777    unix_path=`$CYGPATH -u "$windows_path"`
51778    CYGWIN_VS_TOOLS_DIR="$unix_path"
51779  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51780    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51781    CYGWIN_VS_TOOLS_DIR="$unix_path"
51782  fi
51783
51784      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51785        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
51786	    | $GREP -i /x64/ | $HEAD --lines 1`
51787      else
51788        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
51789	    | $GREP -i /x86/ | $HEAD --lines 1`
51790      fi
51791
51792  DLL_NAME="$DLL_NAME"
51793  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51794  METHOD="search of VS100COMNTOOLS"
51795  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51796    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51797$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51798
51799    # Need to check if the found msvcr is correct architecture
51800    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51801$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51802    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51803    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51804      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51805      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51806      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51807        CORRECT_MSVCR_ARCH="PE32 executable"
51808      else
51809        CORRECT_MSVCR_ARCH="PE32+ executable"
51810      fi
51811    else
51812      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51813        CORRECT_MSVCR_ARCH=386
51814      else
51815        CORRECT_MSVCR_ARCH=x86-64
51816      fi
51817    fi
51818    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51819      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51820$as_echo "ok" >&6; }
51821      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51822
51823  # Only process if variable expands to non-empty
51824
51825  if test "x$MSVC_DLL" != x; then
51826    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51827
51828  # Input might be given as Windows format, start by converting to
51829  # unix format.
51830  path="$MSVC_DLL"
51831  new_path=`$CYGPATH -u "$path"`
51832
51833  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51834  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51835  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51836  # "foo.exe" is OK but "foo" is an error.
51837  #
51838  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51839  # It is also a way to make sure we got the proper file name for the real test later on.
51840  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51841  if test "x$test_shortpath" = x; then
51842    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51843$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51844    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51845  fi
51846
51847  # Call helper function which possibly converts this using DOS-style short mode.
51848  # If so, the updated path is stored in $new_path.
51849
51850  input_path="$new_path"
51851  # Check if we need to convert this using DOS-style short mode. If the path
51852  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51853  # take no chances and rewrite it.
51854  # Note: m4 eats our [], so we need to use [ and ] instead.
51855  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51856  if test "x$has_forbidden_chars" != x; then
51857    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51858    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51859    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51860    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51861      # Going to short mode and back again did indeed matter. Since short mode is
51862      # case insensitive, let's make it lowercase to improve readability.
51863      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51864      # Now convert it back to Unix-style (cygpath)
51865      input_path=`$CYGPATH -u "$shortmode_path"`
51866      new_path="$input_path"
51867    fi
51868  fi
51869
51870  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51871  if test "x$test_cygdrive_prefix" = x; then
51872    # As a simple fix, exclude /usr/bin since it's not a real path.
51873    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51874      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51875      # a path prefixed by /cygdrive for fixpath to work.
51876      new_path="$CYGWIN_ROOT_PATH$input_path"
51877    fi
51878  fi
51879
51880
51881  if test "x$path" != "x$new_path"; then
51882    MSVC_DLL="$new_path"
51883    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51884$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51885  fi
51886
51887    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51888
51889  path="$MSVC_DLL"
51890  has_colon=`$ECHO $path | $GREP ^.:`
51891  new_path="$path"
51892  if test "x$has_colon" = x; then
51893    # Not in mixed or Windows style, start by that.
51894    new_path=`cmd //c echo $path`
51895  fi
51896
51897
51898  input_path="$new_path"
51899  # Check if we need to convert this using DOS-style short mode. If the path
51900  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51901  # take no chances and rewrite it.
51902  # Note: m4 eats our [], so we need to use [ and ] instead.
51903  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51904  if test "x$has_forbidden_chars" != x; then
51905    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51906    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51907  fi
51908
51909
51910  windows_path="$new_path"
51911  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51912    unix_path=`$CYGPATH -u "$windows_path"`
51913    new_path="$unix_path"
51914  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51915    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51916    new_path="$unix_path"
51917  fi
51918
51919  if test "x$path" != "x$new_path"; then
51920    MSVC_DLL="$new_path"
51921    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51922$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51923  fi
51924
51925  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51926  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51927
51928    else
51929      # We're on a unix platform. Hooray! :)
51930      path="$MSVC_DLL"
51931      has_space=`$ECHO "$path" | $GREP " "`
51932      if test "x$has_space" != x; then
51933        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51934$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51935        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51936      fi
51937
51938      # Use eval to expand a potential ~
51939      eval path="$path"
51940      if test ! -f "$path" && test ! -d "$path"; then
51941        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51942      fi
51943
51944      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51945    fi
51946  fi
51947
51948      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51949$as_echo_n "checking for $DLL_NAME... " >&6; }
51950      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51951$as_echo "$MSVC_DLL" >&6; }
51952    else
51953      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51954$as_echo "incorrect, ignoring" >&6; }
51955      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51956$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51957    fi
51958  fi
51959
51960    fi
51961  fi
51962
51963  if test "x$MSVC_DLL" = x; then
51964    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
51965    # (This was the original behaviour; kept since it might turn something up)
51966    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
51967      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51968        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
51969	    | $GREP x64 | $HEAD --lines 1`
51970      else
51971        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
51972	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
51973        if test "x$POSSIBLE_MSVC_DLL" = x; then
51974          # We're grasping at straws now...
51975          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
51976	      | $HEAD --lines 1`
51977        fi
51978      fi
51979
51980
51981  DLL_NAME="$DLL_NAME"
51982  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51983  METHOD="search of VCINSTALLDIR"
51984  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51985    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51986$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51987
51988    # Need to check if the found msvcr is correct architecture
51989    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51990$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51991    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51992    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51993      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51994      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51995      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51996        CORRECT_MSVCR_ARCH="PE32 executable"
51997      else
51998        CORRECT_MSVCR_ARCH="PE32+ executable"
51999      fi
52000    else
52001      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52002        CORRECT_MSVCR_ARCH=386
52003      else
52004        CORRECT_MSVCR_ARCH=x86-64
52005      fi
52006    fi
52007    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
52008      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
52009$as_echo "ok" >&6; }
52010      MSVC_DLL="$POSSIBLE_MSVC_DLL"
52011
52012  # Only process if variable expands to non-empty
52013
52014  if test "x$MSVC_DLL" != x; then
52015    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52016
52017  # Input might be given as Windows format, start by converting to
52018  # unix format.
52019  path="$MSVC_DLL"
52020  new_path=`$CYGPATH -u "$path"`
52021
52022  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52023  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52024  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52025  # "foo.exe" is OK but "foo" is an error.
52026  #
52027  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52028  # It is also a way to make sure we got the proper file name for the real test later on.
52029  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52030  if test "x$test_shortpath" = x; then
52031    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52032$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52033    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
52034  fi
52035
52036  # Call helper function which possibly converts this using DOS-style short mode.
52037  # If so, the updated path is stored in $new_path.
52038
52039  input_path="$new_path"
52040  # Check if we need to convert this using DOS-style short mode. If the path
52041  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52042  # take no chances and rewrite it.
52043  # Note: m4 eats our [], so we need to use [ and ] instead.
52044  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52045  if test "x$has_forbidden_chars" != x; then
52046    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52047    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52048    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52049    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52050      # Going to short mode and back again did indeed matter. Since short mode is
52051      # case insensitive, let's make it lowercase to improve readability.
52052      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52053      # Now convert it back to Unix-style (cygpath)
52054      input_path=`$CYGPATH -u "$shortmode_path"`
52055      new_path="$input_path"
52056    fi
52057  fi
52058
52059  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52060  if test "x$test_cygdrive_prefix" = x; then
52061    # As a simple fix, exclude /usr/bin since it's not a real path.
52062    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52063      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52064      # a path prefixed by /cygdrive for fixpath to work.
52065      new_path="$CYGWIN_ROOT_PATH$input_path"
52066    fi
52067  fi
52068
52069
52070  if test "x$path" != "x$new_path"; then
52071    MSVC_DLL="$new_path"
52072    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52073$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52074  fi
52075
52076    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52077
52078  path="$MSVC_DLL"
52079  has_colon=`$ECHO $path | $GREP ^.:`
52080  new_path="$path"
52081  if test "x$has_colon" = x; then
52082    # Not in mixed or Windows style, start by that.
52083    new_path=`cmd //c echo $path`
52084  fi
52085
52086
52087  input_path="$new_path"
52088  # Check if we need to convert this using DOS-style short mode. If the path
52089  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52090  # take no chances and rewrite it.
52091  # Note: m4 eats our [], so we need to use [ and ] instead.
52092  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52093  if test "x$has_forbidden_chars" != x; then
52094    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52095    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52096  fi
52097
52098
52099  windows_path="$new_path"
52100  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52101    unix_path=`$CYGPATH -u "$windows_path"`
52102    new_path="$unix_path"
52103  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52104    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52105    new_path="$unix_path"
52106  fi
52107
52108  if test "x$path" != "x$new_path"; then
52109    MSVC_DLL="$new_path"
52110    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52111$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52112  fi
52113
52114  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52115  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52116
52117    else
52118      # We're on a unix platform. Hooray! :)
52119      path="$MSVC_DLL"
52120      has_space=`$ECHO "$path" | $GREP " "`
52121      if test "x$has_space" != x; then
52122        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52123$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52124        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52125      fi
52126
52127      # Use eval to expand a potential ~
52128      eval path="$path"
52129      if test ! -f "$path" && test ! -d "$path"; then
52130        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
52131      fi
52132
52133      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
52134    fi
52135  fi
52136
52137      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52138$as_echo_n "checking for $DLL_NAME... " >&6; }
52139      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
52140$as_echo "$MSVC_DLL" >&6; }
52141    else
52142      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
52143$as_echo "incorrect, ignoring" >&6; }
52144      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
52145$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
52146    fi
52147  fi
52148
52149    fi
52150  fi
52151
52152  if test "x$MSVC_DLL" = x; then
52153    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52154$as_echo_n "checking for $DLL_NAME... " >&6; }
52155    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52156$as_echo "no" >&6; }
52157    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
52158  fi
52159
52160      MSVCP_DLL="$MSVC_DLL"
52161    fi
52162
52163  fi
52164
52165
52166
52167# Check whether --with-dxsdk was given.
52168if test "${with_dxsdk+set}" = set; then :
52169  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
52170$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
52171fi
52172
52173
52174
52175
52176# Check whether --with-dxsdk-lib was given.
52177if test "${with_dxsdk_lib+set}" = set; then :
52178  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
52179$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
52180fi
52181
52182
52183
52184
52185# Check whether --with-dxsdk-include was given.
52186if test "${with_dxsdk_include+set}" = set; then :
52187  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
52188$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
52189fi
52190
52191
52192  fi
52193
52194
52195###############################################################################
52196#
52197# We need to do some final tweaking, when everything else is done.
52198#
52199###############################################################################
52200
52201
52202  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
52203
52204
52205  # The name of the Service Agent jar.
52206  SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
52207  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
52208    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
52209  fi
52210
52211
52212
52213    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
52214$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
52215
52216    if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
52217      ENABLE_INTREE_EC=yes
52218      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52219$as_echo "yes" >&6; }
52220    else
52221      ENABLE_INTREE_EC=no
52222      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52223$as_echo "no" >&6; }
52224    fi
52225
52226
52227
52228
52229###############################################################################
52230#
52231# Configure parts of the build that only affect the build performance,
52232# not the result.
52233#
52234###############################################################################
52235
52236
52237  # How many cores do we have on this build system?
52238
52239# Check whether --with-num-cores was given.
52240if test "${with_num_cores+set}" = set; then :
52241  withval=$with_num_cores;
52242fi
52243
52244  if test "x$with_num_cores" = x; then
52245    # The number of cores were not specified, try to probe them.
52246
52247  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
52248$as_echo_n "checking for number of cores... " >&6; }
52249  NUM_CORES=1
52250  FOUND_CORES=no
52251
52252  if test -f /proc/cpuinfo; then
52253    # Looks like a Linux (or cygwin) system
52254    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
52255    FOUND_CORES=yes
52256  elif test -x /usr/sbin/psrinfo; then
52257    # Looks like a Solaris system
52258    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
52259    FOUND_CORES=yes
52260  elif test -x /usr/sbin/system_profiler; then
52261    # Looks like a MacOSX system
52262    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
52263    FOUND_CORES=yes
52264  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
52265    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
52266    FOUND_CORES=yes
52267  elif test -n "$NUMBER_OF_PROCESSORS"; then
52268    # On windows, look in the env
52269    NUM_CORES=$NUMBER_OF_PROCESSORS
52270    FOUND_CORES=yes
52271  fi
52272
52273  if test "x$FOUND_CORES" = xyes; then
52274    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
52275$as_echo "$NUM_CORES" >&6; }
52276  else
52277    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
52278$as_echo "could not detect number of cores, defaulting to 1" >&6; }
52279    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
52280$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
52281  fi
52282
52283  else
52284    NUM_CORES=$with_num_cores
52285  fi
52286
52287
52288
52289  # How much memory do we have on this build system?
52290
52291# Check whether --with-memory-size was given.
52292if test "${with_memory_size+set}" = set; then :
52293  withval=$with_memory_size;
52294fi
52295
52296  if test "x$with_memory_size" = x; then
52297    # The memory size was not specified, try to probe it.
52298
52299  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
52300$as_echo_n "checking for memory size... " >&6; }
52301  # Default to 1024 MB
52302  MEMORY_SIZE=1024
52303  FOUND_MEM=no
52304
52305  if test -f /proc/meminfo; then
52306    # Looks like a Linux (or cygwin) system
52307    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
52308    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
52309    FOUND_MEM=yes
52310  elif test -x /usr/sbin/prtconf; then
52311    # Looks like a Solaris or AIX system
52312    MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
52313    FOUND_MEM=yes
52314  elif test -x /usr/sbin/system_profiler; then
52315    # Looks like a MacOSX system
52316    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
52317    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
52318    FOUND_MEM=yes
52319  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
52320    # Windows, but without cygwin
52321    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
52322    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
52323    FOUND_MEM=yes
52324  fi
52325
52326  if test "x$FOUND_MEM" = xyes; then
52327    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
52328$as_echo "$MEMORY_SIZE MB" >&6; }
52329  else
52330    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
52331$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
52332    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
52333$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
52334  fi
52335
52336  else
52337    MEMORY_SIZE=$with_memory_size
52338  fi
52339
52340
52341
52342  # Provide a decent default number of parallel jobs for make depending on
52343  # number of cores, amount of memory and machine architecture.
52344
52345# Check whether --with-jobs was given.
52346if test "${with_jobs+set}" = set; then :
52347  withval=$with_jobs;
52348fi
52349
52350  if test "x$with_jobs" = x; then
52351    # Number of jobs was not specified, calculate.
52352    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
52353$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
52354    # Approximate memory in GB.
52355    memory_gb=`expr $MEMORY_SIZE / 1024`
52356    # Pick the lowest of memory in gb and number of cores.
52357    if test "$memory_gb" -lt "$NUM_CORES"; then
52358      JOBS="$memory_gb"
52359    else
52360      JOBS="$NUM_CORES"
52361      # On bigger machines, leave some room for other processes to run
52362      if test "$JOBS" -gt "4"; then
52363        JOBS=`expr $JOBS '*' 90 / 100`
52364      fi
52365    fi
52366    # Cap number of jobs to 16
52367    if test "$JOBS" -gt "16"; then
52368      JOBS=16
52369    fi
52370    if test "$JOBS" -eq "0"; then
52371      JOBS=1
52372    fi
52373    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
52374$as_echo "$JOBS" >&6; }
52375  else
52376    JOBS=$with_jobs
52377  fi
52378
52379
52380
52381# Setup arguments for the boot jdk (after cores and memory have been setup)
52382
52383  ##############################################################################
52384  #
52385  # Specify jvm options for anything that is run with the Boot JDK.
52386  # Not all JVM:s accept the same arguments on the command line.
52387  #
52388
52389# Check whether --with-boot-jdk-jvmargs was given.
52390if test "${with_boot_jdk_jvmargs+set}" = set; then :
52391  withval=$with_boot_jdk_jvmargs;
52392fi
52393
52394
52395  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
52396$as_echo_n "checking flags for boot jdk java command ... " >&6; }
52397
52398  # Disable special log output when a debug build is used as Boot JDK...
52399
52400  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
52401  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
52402  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
52403  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52404  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52405  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52406    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
52407    JVM_ARG_OK=true
52408  else
52409    $ECHO "Arg failed:" >&5
52410    $ECHO "$OUTPUT" >&5
52411    JVM_ARG_OK=false
52412  fi
52413
52414
52415  # Apply user provided options.
52416
52417  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
52418  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
52419  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
52420  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52421  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52422  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52423    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
52424    JVM_ARG_OK=true
52425  else
52426    $ECHO "Arg failed:" >&5
52427    $ECHO "$OUTPUT" >&5
52428    JVM_ARG_OK=false
52429  fi
52430
52431
52432  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
52433$as_echo "$boot_jdk_jvmargs" >&6; }
52434
52435  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
52436  JAVA_FLAGS=$boot_jdk_jvmargs
52437
52438
52439
52440  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
52441$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
52442
52443  # Starting amount of heap memory.
52444
52445  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
52446  $ECHO "Command: $JAVA -Xms64M -version" >&5
52447  OUTPUT=`$JAVA -Xms64M -version 2>&1`
52448  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52449  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52450  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52451    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
52452    JVM_ARG_OK=true
52453  else
52454    $ECHO "Arg failed:" >&5
52455    $ECHO "$OUTPUT" >&5
52456    JVM_ARG_OK=false
52457  fi
52458
52459
52460  # Maximum amount of heap memory.
52461  # Maximum stack size.
52462  JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
52463  if test "x$BUILD_NUM_BITS" = x32; then
52464    if test "$JVM_MAX_HEAP" -gt "1100"; then
52465      JVM_MAX_HEAP=1100
52466    elif test "$JVM_MAX_HEAP" -lt "512"; then
52467      JVM_MAX_HEAP=512
52468    fi
52469    STACK_SIZE=768
52470  else
52471    # Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit
52472    # pointers are used. Apparently, we need to increase the heap and stack
52473    # space for the jvm. More specifically, when running javac to build huge
52474    # jdk batch
52475    if test "$JVM_MAX_HEAP" -gt "1600"; then
52476      JVM_MAX_HEAP=1600
52477    elif test "$JVM_MAX_HEAP" -lt "512"; then
52478      JVM_MAX_HEAP=512
52479    fi
52480    STACK_SIZE=1536
52481  fi
52482
52483  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
52484  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
52485  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
52486  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52487  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52488  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52489    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
52490    JVM_ARG_OK=true
52491  else
52492    $ECHO "Arg failed:" >&5
52493    $ECHO "$OUTPUT" >&5
52494    JVM_ARG_OK=false
52495  fi
52496
52497
52498  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
52499  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
52500  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
52501  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52502  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52503  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52504    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
52505    JVM_ARG_OK=true
52506  else
52507    $ECHO "Arg failed:" >&5
52508    $ECHO "$OUTPUT" >&5
52509    JVM_ARG_OK=false
52510  fi
52511
52512
52513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
52514$as_echo "$boot_jdk_jvmargs_big" >&6; }
52515
52516  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
52517
52518
52519
52520  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
52521$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
52522
52523  # Use serial gc for small short lived tools if possible
52524
52525  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
52526  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
52527  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
52528  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52529  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52530  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52531    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
52532    JVM_ARG_OK=true
52533  else
52534    $ECHO "Arg failed:" >&5
52535    $ECHO "$OUTPUT" >&5
52536    JVM_ARG_OK=false
52537  fi
52538
52539
52540  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
52541  $ECHO "Command: $JAVA -Xms32M -version" >&5
52542  OUTPUT=`$JAVA -Xms32M -version 2>&1`
52543  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52544  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52545  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52546    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
52547    JVM_ARG_OK=true
52548  else
52549    $ECHO "Arg failed:" >&5
52550    $ECHO "$OUTPUT" >&5
52551    JVM_ARG_OK=false
52552  fi
52553
52554
52555  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
52556  $ECHO "Command: $JAVA -Xmx512M -version" >&5
52557  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
52558  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52559  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52560  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52561    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
52562    JVM_ARG_OK=true
52563  else
52564    $ECHO "Arg failed:" >&5
52565    $ECHO "$OUTPUT" >&5
52566    JVM_ARG_OK=false
52567  fi
52568
52569
52570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
52571$as_echo "$boot_jdk_jvmargs_small" >&6; }
52572
52573  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
52574
52575
52576  JAVA_TOOL_FLAGS_SMALL=""
52577  for f in $JAVA_FLAGS_SMALL; do
52578    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
52579  done
52580
52581
52582
52583# Setup smart javac (after cores and memory have been setup)
52584
52585
52586# Check whether --with-sjavac-server-java was given.
52587if test "${with_sjavac_server_java+set}" = set; then :
52588  withval=$with_sjavac_server_java;
52589fi
52590
52591
52592  if test "x$with_sjavac_server_java" != x; then
52593    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
52594    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
52595    if test "x$FOUND_VERSION" = x; then
52596      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
52597    fi
52598  else
52599    SJAVAC_SERVER_JAVA="$JAVA"
52600  fi
52601
52602
52603  if test "$MEMORY_SIZE" -gt "3000"; then
52604
52605  $ECHO "Check if jvm arg is ok: -d64" >&5
52606  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
52607  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
52608  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52609  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52610  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52611    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
52612    JVM_ARG_OK=true
52613  else
52614    $ECHO "Arg failed:" >&5
52615    $ECHO "$OUTPUT" >&5
52616    JVM_ARG_OK=false
52617  fi
52618
52619    if test "$JVM_ARG_OK" = true; then
52620      JVM_64BIT=true
52621      JVM_ARG_OK=false
52622    fi
52623  fi
52624
52625  MX_VALUE=`expr $MEMORY_SIZE / 2`
52626  if test "$JVM_64BIT" = true; then
52627    # Set ms lower than mx since more than one instance of the server might
52628    # get launched at the same time before they figure out which instance won.
52629    MS_VALUE=512
52630    if test "$MX_VALUE" -gt "2048"; then
52631      MX_VALUE=2048
52632    fi
52633  else
52634    MS_VALUE=256
52635    if test "$MX_VALUE" -gt "1500"; then
52636      MX_VALUE=1500
52637    fi
52638  fi
52639  if test "$MX_VALUE" -lt "512"; then
52640    MX_VALUE=512
52641  fi
52642
52643  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
52644  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
52645  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
52646  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52647  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52648  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52649    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
52650    JVM_ARG_OK=true
52651  else
52652    $ECHO "Arg failed:" >&5
52653    $ECHO "$OUTPUT" >&5
52654    JVM_ARG_OK=false
52655  fi
52656
52657
52658
52659  # Check whether --enable-sjavac was given.
52660if test "${enable_sjavac+set}" = set; then :
52661  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
52662else
52663  ENABLE_SJAVAC='no'
52664fi
52665
52666  if test "x$JVM_ARG_OK" = "xfalse"; then
52667    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
52668$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
52669    ENABLE_SJAVAC=no;
52670  fi
52671  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
52672$as_echo_n "checking whether to use sjavac... " >&6; }
52673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
52674$as_echo "$ENABLE_SJAVAC" >&6; }
52675
52676
52677
52678# Can the C/C++ compiler use precompiled headers?
52679
52680
52681  ###############################################################################
52682  #
52683  # Can the C/C++ compiler use precompiled headers?
52684  #
52685  # Check whether --enable-precompiled-headers was given.
52686if test "${enable_precompiled_headers+set}" = set; then :
52687  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
52688else
52689  ENABLE_PRECOMPH=yes
52690fi
52691
52692
52693  USE_PRECOMPILED_HEADER=1
52694  if test "x$ENABLE_PRECOMPH" = xno; then
52695    USE_PRECOMPILED_HEADER=0
52696  fi
52697
52698  if test "x$ENABLE_PRECOMPH" = xyes; then
52699    # Check that the compiler actually supports precomp headers.
52700    if test "x$TOOLCHAIN_TYPE" = xgcc; then
52701      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
52702$as_echo_n "checking that precompiled headers work... " >&6; }
52703      echo "int alfa();" > conftest.h
52704      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
52705      if test ! -f conftest.hpp.gch; then
52706        USE_PRECOMPILED_HEADER=0
52707        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52708$as_echo "no" >&6; }
52709      else
52710        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52711$as_echo "yes" >&6; }
52712      fi
52713      rm -f conftest.h conftest.hpp.gch
52714    fi
52715  fi
52716
52717
52718
52719
52720# Setup use of ccache, if available
52721
52722  # Check whether --enable-ccache was given.
52723if test "${enable_ccache+set}" = set; then :
52724  enableval=$enable_ccache;
52725fi
52726
52727
52728  CCACHE=
52729  CCACHE_STATUS=
52730  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
52731$as_echo_n "checking is ccache enabled... " >&6; }
52732  if test "x$enable_ccache" = xyes; then
52733    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
52734      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52735$as_echo "yes" >&6; }
52736      OLD_PATH="$PATH"
52737      if test "x$TOOLCHAIN_PATH" != x; then
52738        PATH=$TOOLCHAIN_PATH:$PATH
52739      fi
52740
52741
52742
52743  # Publish this variable in the help.
52744
52745
52746  if test "x$CCACHE" = x; then
52747    # The variable is not set by user, try to locate tool using the code snippet
52748    for ac_prog in ccache
52749do
52750  # Extract the first word of "$ac_prog", so it can be a program name with args.
52751set dummy $ac_prog; ac_word=$2
52752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
52753$as_echo_n "checking for $ac_word... " >&6; }
52754if ${ac_cv_path_CCACHE+:} false; then :
52755  $as_echo_n "(cached) " >&6
52756else
52757  case $CCACHE in
52758  [\\/]* | ?:[\\/]*)
52759  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
52760  ;;
52761  *)
52762  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
52763for as_dir in $PATH
52764do
52765  IFS=$as_save_IFS
52766  test -z "$as_dir" && as_dir=.
52767    for ac_exec_ext in '' $ac_executable_extensions; do
52768  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
52769    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
52770    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
52771    break 2
52772  fi
52773done
52774  done
52775IFS=$as_save_IFS
52776
52777  ;;
52778esac
52779fi
52780CCACHE=$ac_cv_path_CCACHE
52781if test -n "$CCACHE"; then
52782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
52783$as_echo "$CCACHE" >&6; }
52784else
52785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52786$as_echo "no" >&6; }
52787fi
52788
52789
52790  test -n "$CCACHE" && break
52791done
52792
52793  else
52794    # The variable is set, but is it from the command line or the environment?
52795
52796    # Try to remove the string !CCACHE! from our list.
52797    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
52798    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
52799      # If it failed, the variable was not from the command line. Ignore it,
52800      # but warn the user (except for BASH, which is always set by the calling BASH).
52801      if test "xCCACHE" != xBASH; then
52802        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
52803$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
52804      fi
52805      # Try to locate tool using the code snippet
52806      for ac_prog in ccache
52807do
52808  # Extract the first word of "$ac_prog", so it can be a program name with args.
52809set dummy $ac_prog; ac_word=$2
52810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
52811$as_echo_n "checking for $ac_word... " >&6; }
52812if ${ac_cv_path_CCACHE+:} false; then :
52813  $as_echo_n "(cached) " >&6
52814else
52815  case $CCACHE in
52816  [\\/]* | ?:[\\/]*)
52817  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
52818  ;;
52819  *)
52820  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
52821for as_dir in $PATH
52822do
52823  IFS=$as_save_IFS
52824  test -z "$as_dir" && as_dir=.
52825    for ac_exec_ext in '' $ac_executable_extensions; do
52826  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
52827    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
52828    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
52829    break 2
52830  fi
52831done
52832  done
52833IFS=$as_save_IFS
52834
52835  ;;
52836esac
52837fi
52838CCACHE=$ac_cv_path_CCACHE
52839if test -n "$CCACHE"; then
52840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
52841$as_echo "$CCACHE" >&6; }
52842else
52843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52844$as_echo "no" >&6; }
52845fi
52846
52847
52848  test -n "$CCACHE" && break
52849done
52850
52851    else
52852      # If it succeeded, then it was overridden by the user. We will use it
52853      # for the tool.
52854
52855      # First remove it from the list of overridden variables, so we can test
52856      # for unknown variables in the end.
52857      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
52858
52859      # Check if the provided tool contains a complete path.
52860      tool_specified="$CCACHE"
52861      tool_basename="${tool_specified##*/}"
52862      if test "x$tool_basename" = "x$tool_specified"; then
52863        # A command without a complete path is provided, search $PATH.
52864        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
52865$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
52866        # Extract the first word of "$tool_basename", so it can be a program name with args.
52867set dummy $tool_basename; ac_word=$2
52868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
52869$as_echo_n "checking for $ac_word... " >&6; }
52870if ${ac_cv_path_CCACHE+:} false; then :
52871  $as_echo_n "(cached) " >&6
52872else
52873  case $CCACHE in
52874  [\\/]* | ?:[\\/]*)
52875  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
52876  ;;
52877  *)
52878  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
52879for as_dir in $PATH
52880do
52881  IFS=$as_save_IFS
52882  test -z "$as_dir" && as_dir=.
52883    for ac_exec_ext in '' $ac_executable_extensions; do
52884  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
52885    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
52886    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
52887    break 2
52888  fi
52889done
52890  done
52891IFS=$as_save_IFS
52892
52893  ;;
52894esac
52895fi
52896CCACHE=$ac_cv_path_CCACHE
52897if test -n "$CCACHE"; then
52898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
52899$as_echo "$CCACHE" >&6; }
52900else
52901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52902$as_echo "no" >&6; }
52903fi
52904
52905
52906        if test "x$CCACHE" = x; then
52907          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
52908        fi
52909      else
52910        # Otherwise we believe it is a complete path. Use it as it is.
52911        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
52912$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
52913        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
52914$as_echo_n "checking for CCACHE... " >&6; }
52915        if test ! -x "$tool_specified"; then
52916          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
52917$as_echo "not found" >&6; }
52918          as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
52919        fi
52920        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
52921$as_echo "$tool_specified" >&6; }
52922      fi
52923    fi
52924  fi
52925
52926
52927
52928  if test "x$CCACHE" = x; then
52929    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
52930  fi
52931
52932
52933      PATH="$OLD_PATH"
52934      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
52935      CCACHE_STATUS="Active ($CCACHE_VERSION)"
52936    else
52937      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52938$as_echo "no" >&6; }
52939      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
52940$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
52941    fi
52942  elif test "x$enable_ccache" = xno; then
52943    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
52944$as_echo "no, explicitly disabled" >&6; }
52945    CCACHE_STATUS="Disabled"
52946  elif test "x$enable_ccache" = x; then
52947    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52948$as_echo "no" >&6; }
52949  else
52950    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
52951$as_echo "unknown" >&6; }
52952    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
52953  fi
52954
52955
52956
52957# Check whether --with-ccache-dir was given.
52958if test "${with_ccache_dir+set}" = set; then :
52959  withval=$with_ccache_dir;
52960fi
52961
52962
52963  if test "x$with_ccache_dir" != x; then
52964    # When using a non home ccache directory, assume the use is to share ccache files
52965    # with other users. Thus change the umask.
52966    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
52967    if test "x$CCACHE" = x; then
52968      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
52969$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
52970    fi
52971  fi
52972
52973  if test "x$CCACHE" != x; then
52974
52975  if test "x$CCACHE" != x; then
52976    if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
52977      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
52978          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
52979      if test "x$HAS_BAD_CCACHE" != "x"; then
52980        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
52981      fi
52982      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
52983$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
52984      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
52985      PUSHED_FLAGS="$CXXFLAGS"
52986      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
52987      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52988/* end confdefs.h.  */
52989
52990int
52991main ()
52992{
52993
52994  ;
52995  return 0;
52996}
52997_ACEOF
52998if ac_fn_cxx_try_compile "$LINENO"; then :
52999  CC_KNOWS_CCACHE_TRICK=yes
53000else
53001  CC_KNOWS_CCACHE_TRICK=no
53002fi
53003rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53004      CXXFLAGS="$PUSHED_FLAGS"
53005      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
53006        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53007$as_echo "yes" >&6; }
53008        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
53009
53010        CCACHE_SLOPPINESS=pch_defines,time_macros
53011      else
53012        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53013$as_echo "no" >&6; }
53014        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
53015      fi
53016    fi
53017
53018    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
53019        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
53020
53021    if test "x$SET_CCACHE_DIR" != x; then
53022      mkdir -p $CCACHE_DIR > /dev/null 2>&1
53023      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
53024    fi
53025  fi
53026
53027  fi
53028
53029
53030###############################################################################
53031#
53032# And now the finish...
53033#
53034###############################################################################
53035
53036# Check for some common pitfalls
53037
53038  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53039    file_to_test="$SRC_ROOT/LICENSE"
53040    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
53041      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
53042    fi
53043  fi
53044
53045
53046  # Did user specify any unknown variables?
53047
53048  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
53049    # Replace the separating ! with spaces before presenting for end user.
53050    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
53051    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
53052$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
53053  fi
53054
53055
53056  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
53057$as_echo_n "checking if build directory is on local disk... " >&6; }
53058
53059  # df -l lists only local disks; if the given directory is not found then
53060  # a non-zero exit code is given
53061  if test "x$DF" = x; then
53062    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53063      # msys does not have df; use Windows "net use" instead.
53064      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
53065      if test "x$IS_NETWORK_DISK" = x; then
53066        OUTPUT_DIR_IS_LOCAL="yes"
53067      else
53068        OUTPUT_DIR_IS_LOCAL="no"
53069      fi
53070    else
53071      # No df here, say it's local
53072      OUTPUT_DIR_IS_LOCAL="yes"
53073    fi
53074  else
53075    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
53076      OUTPUT_DIR_IS_LOCAL="yes"
53077    else
53078      OUTPUT_DIR_IS_LOCAL="no"
53079    fi
53080  fi
53081
53082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
53083$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
53084
53085
53086
53087  # Check if the user has any old-style ALT_ variables set.
53088  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
53089
53090  # Before generating output files, test if they exist. If they do, this is a reconfigure.
53091  # Since we can't properly handle the dependencies for this, warn the user about the situation
53092  if test -e $OUTPUT_ROOT/spec.gmk; then
53093    IS_RECONFIGURE=yes
53094  else
53095    IS_RECONFIGURE=no
53096  fi
53097
53098
53099# At the end, call the custom hook. (Dummy macro if no custom sources available)
53100
53101
53102# We're messing a bit with internal autoconf variables to put the config.status
53103# in the output directory instead of the current directory.
53104CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
53105
53106# Create the actual output files. Now the main work of configure is done.
53107cat >confcache <<\_ACEOF
53108# This file is a shell script that caches the results of configure
53109# tests run on this system so they can be shared between configure
53110# scripts and configure runs, see configure's option --config-cache.
53111# It is not useful on other systems.  If it contains results you don't
53112# want to keep, you may remove or edit it.
53113#
53114# config.status only pays attention to the cache file if you give it
53115# the --recheck option to rerun configure.
53116#
53117# `ac_cv_env_foo' variables (set or unset) will be overridden when
53118# loading this file, other *unset* `ac_cv_foo' will be assigned the
53119# following values.
53120
53121_ACEOF
53122
53123# The following way of writing the cache mishandles newlines in values,
53124# but we know of no workaround that is simple, portable, and efficient.
53125# So, we kill variables containing newlines.
53126# Ultrix sh set writes to stderr and can't be redirected directly,
53127# and sets the high bit in the cache file unless we assign to the vars.
53128(
53129  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
53130    eval ac_val=\$$ac_var
53131    case $ac_val in #(
53132    *${as_nl}*)
53133      case $ac_var in #(
53134      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
53135$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
53136      esac
53137      case $ac_var in #(
53138      _ | IFS | as_nl) ;; #(
53139      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
53140      *) { eval $ac_var=; unset $ac_var;} ;;
53141      esac ;;
53142    esac
53143  done
53144
53145  (set) 2>&1 |
53146    case $as_nl`(ac_space=' '; set) 2>&1` in #(
53147    *${as_nl}ac_space=\ *)
53148      # `set' does not quote correctly, so add quotes: double-quote
53149      # substitution turns \\\\ into \\, and sed turns \\ into \.
53150      sed -n \
53151	"s/'/'\\\\''/g;
53152	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
53153      ;; #(
53154    *)
53155      # `set' quotes correctly as required by POSIX, so do not add quotes.
53156      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
53157      ;;
53158    esac |
53159    sort
53160) |
53161  sed '
53162     /^ac_cv_env_/b end
53163     t clear
53164     :clear
53165     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
53166     t end
53167     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
53168     :end' >>confcache
53169if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
53170  if test -w "$cache_file"; then
53171    if test "x$cache_file" != "x/dev/null"; then
53172      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
53173$as_echo "$as_me: updating cache $cache_file" >&6;}
53174      if test ! -f "$cache_file" || test -h "$cache_file"; then
53175	cat confcache >"$cache_file"
53176      else
53177        case $cache_file in #(
53178        */* | ?:*)
53179	  mv -f confcache "$cache_file"$$ &&
53180	  mv -f "$cache_file"$$ "$cache_file" ;; #(
53181        *)
53182	  mv -f confcache "$cache_file" ;;
53183	esac
53184      fi
53185    fi
53186  else
53187    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
53188$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
53189  fi
53190fi
53191rm -f confcache
53192
53193test "x$prefix" = xNONE && prefix=$ac_default_prefix
53194# Let make expand exec_prefix.
53195test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
53196
53197# Transform confdefs.h into DEFS.
53198# Protect against shell expansion while executing Makefile rules.
53199# Protect against Makefile macro expansion.
53200#
53201# If the first sed substitution is executed (which looks for macros that
53202# take arguments), then branch to the quote section.  Otherwise,
53203# look for a macro that doesn't take arguments.
53204ac_script='
53205:mline
53206/\\$/{
53207 N
53208 s,\\\n,,
53209 b mline
53210}
53211t clear
53212:clear
53213s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
53214t quote
53215s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
53216t quote
53217b any
53218:quote
53219s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
53220s/\[/\\&/g
53221s/\]/\\&/g
53222s/\$/$$/g
53223H
53224:any
53225${
53226	g
53227	s/^\n//
53228	s/\n/ /g
53229	p
53230}
53231'
53232DEFS=`sed -n "$ac_script" confdefs.h`
53233
53234
53235ac_libobjs=
53236ac_ltlibobjs=
53237U=
53238for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
53239  # 1. Remove the extension, and $U if already installed.
53240  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
53241  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
53242  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
53243  #    will be set to the directory where LIBOBJS objects are built.
53244  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
53245  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
53246done
53247LIBOBJS=$ac_libobjs
53248
53249LTLIBOBJS=$ac_ltlibobjs
53250
53251
53252
53253: "${CONFIG_STATUS=./config.status}"
53254ac_write_fail=0
53255ac_clean_files_save=$ac_clean_files
53256ac_clean_files="$ac_clean_files $CONFIG_STATUS"
53257{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
53258$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
53259as_write_fail=0
53260cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
53261#! $SHELL
53262# Generated by $as_me.
53263# Run this file to recreate the current configuration.
53264# Compiler output produced by configure, useful for debugging
53265# configure, is in config.log if it exists.
53266
53267debug=false
53268ac_cs_recheck=false
53269ac_cs_silent=false
53270
53271SHELL=\${CONFIG_SHELL-$SHELL}
53272export SHELL
53273_ASEOF
53274cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
53275## -------------------- ##
53276## M4sh Initialization. ##
53277## -------------------- ##
53278
53279# Be more Bourne compatible
53280DUALCASE=1; export DUALCASE # for MKS sh
53281if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
53282  emulate sh
53283  NULLCMD=:
53284  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
53285  # is contrary to our usage.  Disable this feature.
53286  alias -g '${1+"$@"}'='"$@"'
53287  setopt NO_GLOB_SUBST
53288else
53289  case `(set -o) 2>/dev/null` in #(
53290  *posix*) :
53291    set -o posix ;; #(
53292  *) :
53293     ;;
53294esac
53295fi
53296
53297
53298as_nl='
53299'
53300export as_nl
53301# Printing a long string crashes Solaris 7 /usr/bin/printf.
53302as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
53303as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
53304as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
53305# Prefer a ksh shell builtin over an external printf program on Solaris,
53306# but without wasting forks for bash or zsh.
53307if test -z "$BASH_VERSION$ZSH_VERSION" \
53308    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
53309  as_echo='print -r --'
53310  as_echo_n='print -rn --'
53311elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
53312  as_echo='printf %s\n'
53313  as_echo_n='printf %s'
53314else
53315  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
53316    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53317    as_echo_n='/usr/ucb/echo -n'
53318  else
53319    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
53320    as_echo_n_body='eval
53321      arg=$1;
53322      case $arg in #(
53323      *"$as_nl"*)
53324	expr "X$arg" : "X\\(.*\\)$as_nl";
53325	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
53326      esac;
53327      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
53328    '
53329    export as_echo_n_body
53330    as_echo_n='sh -c $as_echo_n_body as_echo'
53331  fi
53332  export as_echo_body
53333  as_echo='sh -c $as_echo_body as_echo'
53334fi
53335
53336# The user is always right.
53337if test "${PATH_SEPARATOR+set}" != set; then
53338  PATH_SEPARATOR=:
53339  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
53340    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
53341      PATH_SEPARATOR=';'
53342  }
53343fi
53344
53345
53346# IFS
53347# We need space, tab and new line, in precisely that order.  Quoting is
53348# there to prevent editors from complaining about space-tab.
53349# (If _AS_PATH_WALK were called with IFS unset, it would disable word
53350# splitting by setting IFS to empty value.)
53351IFS=" ""	$as_nl"
53352
53353# Find who we are.  Look in the path if we contain no directory separator.
53354as_myself=
53355case $0 in #((
53356  *[\\/]* ) as_myself=$0 ;;
53357  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
53358for as_dir in $PATH
53359do
53360  IFS=$as_save_IFS
53361  test -z "$as_dir" && as_dir=.
53362    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
53363  done
53364IFS=$as_save_IFS
53365
53366     ;;
53367esac
53368# We did not find ourselves, most probably we were run as `sh COMMAND'
53369# in which case we are not to be found in the path.
53370if test "x$as_myself" = x; then
53371  as_myself=$0
53372fi
53373if test ! -f "$as_myself"; then
53374  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
53375  exit 1
53376fi
53377
53378# Unset variables that we do not need and which cause bugs (e.g. in
53379# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
53380# suppresses any "Segmentation fault" message there.  '((' could
53381# trigger a bug in pdksh 5.2.14.
53382for as_var in BASH_ENV ENV MAIL MAILPATH
53383do eval test x\${$as_var+set} = xset \
53384  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
53385done
53386PS1='$ '
53387PS2='> '
53388PS4='+ '
53389
53390# NLS nuisances.
53391LC_ALL=C
53392export LC_ALL
53393LANGUAGE=C
53394export LANGUAGE
53395
53396# CDPATH.
53397(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
53398
53399
53400# as_fn_error STATUS ERROR [LINENO LOG_FD]
53401# ----------------------------------------
53402# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
53403# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
53404# script with STATUS, using 1 if that was 0.
53405as_fn_error ()
53406{
53407  as_status=$1; test $as_status -eq 0 && as_status=1
53408  if test "$4"; then
53409    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
53410    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
53411  fi
53412  $as_echo "$as_me: error: $2" >&2
53413  as_fn_exit $as_status
53414} # as_fn_error
53415
53416
53417# as_fn_set_status STATUS
53418# -----------------------
53419# Set $? to STATUS, without forking.
53420as_fn_set_status ()
53421{
53422  return $1
53423} # as_fn_set_status
53424
53425# as_fn_exit STATUS
53426# -----------------
53427# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
53428as_fn_exit ()
53429{
53430  set +e
53431  as_fn_set_status $1
53432  exit $1
53433} # as_fn_exit
53434
53435# as_fn_unset VAR
53436# ---------------
53437# Portably unset VAR.
53438as_fn_unset ()
53439{
53440  { eval $1=; unset $1;}
53441}
53442as_unset=as_fn_unset
53443# as_fn_append VAR VALUE
53444# ----------------------
53445# Append the text in VALUE to the end of the definition contained in VAR. Take
53446# advantage of any shell optimizations that allow amortized linear growth over
53447# repeated appends, instead of the typical quadratic growth present in naive
53448# implementations.
53449if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
53450  eval 'as_fn_append ()
53451  {
53452    eval $1+=\$2
53453  }'
53454else
53455  as_fn_append ()
53456  {
53457    eval $1=\$$1\$2
53458  }
53459fi # as_fn_append
53460
53461# as_fn_arith ARG...
53462# ------------------
53463# Perform arithmetic evaluation on the ARGs, and store the result in the
53464# global $as_val. Take advantage of shells that can avoid forks. The arguments
53465# must be portable across $(()) and expr.
53466if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
53467  eval 'as_fn_arith ()
53468  {
53469    as_val=$(( $* ))
53470  }'
53471else
53472  as_fn_arith ()
53473  {
53474    as_val=`expr "$@" || test $? -eq 1`
53475  }
53476fi # as_fn_arith
53477
53478
53479if expr a : '\(a\)' >/dev/null 2>&1 &&
53480   test "X`expr 00001 : '.*\(...\)'`" = X001; then
53481  as_expr=expr
53482else
53483  as_expr=false
53484fi
53485
53486if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
53487  as_basename=basename
53488else
53489  as_basename=false
53490fi
53491
53492if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
53493  as_dirname=dirname
53494else
53495  as_dirname=false
53496fi
53497
53498as_me=`$as_basename -- "$0" ||
53499$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
53500	 X"$0" : 'X\(//\)$' \| \
53501	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
53502$as_echo X/"$0" |
53503    sed '/^.*\/\([^/][^/]*\)\/*$/{
53504	    s//\1/
53505	    q
53506	  }
53507	  /^X\/\(\/\/\)$/{
53508	    s//\1/
53509	    q
53510	  }
53511	  /^X\/\(\/\).*/{
53512	    s//\1/
53513	    q
53514	  }
53515	  s/.*/./; q'`
53516
53517# Avoid depending upon Character Ranges.
53518as_cr_letters='abcdefghijklmnopqrstuvwxyz'
53519as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
53520as_cr_Letters=$as_cr_letters$as_cr_LETTERS
53521as_cr_digits='0123456789'
53522as_cr_alnum=$as_cr_Letters$as_cr_digits
53523
53524ECHO_C= ECHO_N= ECHO_T=
53525case `echo -n x` in #(((((
53526-n*)
53527  case `echo 'xy\c'` in
53528  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
53529  xy)  ECHO_C='\c';;
53530  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
53531       ECHO_T='	';;
53532  esac;;
53533*)
53534  ECHO_N='-n';;
53535esac
53536
53537rm -f conf$$ conf$$.exe conf$$.file
53538if test -d conf$$.dir; then
53539  rm -f conf$$.dir/conf$$.file
53540else
53541  rm -f conf$$.dir
53542  mkdir conf$$.dir 2>/dev/null
53543fi
53544if (echo >conf$$.file) 2>/dev/null; then
53545  if ln -s conf$$.file conf$$ 2>/dev/null; then
53546    as_ln_s='ln -s'
53547    # ... but there are two gotchas:
53548    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
53549    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
53550    # In both cases, we have to default to `cp -pR'.
53551    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
53552      as_ln_s='cp -pR'
53553  elif ln conf$$.file conf$$ 2>/dev/null; then
53554    as_ln_s=ln
53555  else
53556    as_ln_s='cp -pR'
53557  fi
53558else
53559  as_ln_s='cp -pR'
53560fi
53561rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
53562rmdir conf$$.dir 2>/dev/null
53563
53564
53565# as_fn_mkdir_p
53566# -------------
53567# Create "$as_dir" as a directory, including parents if necessary.
53568as_fn_mkdir_p ()
53569{
53570
53571  case $as_dir in #(
53572  -*) as_dir=./$as_dir;;
53573  esac
53574  test -d "$as_dir" || eval $as_mkdir_p || {
53575    as_dirs=
53576    while :; do
53577      case $as_dir in #(
53578      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
53579      *) as_qdir=$as_dir;;
53580      esac
53581      as_dirs="'$as_qdir' $as_dirs"
53582      as_dir=`$as_dirname -- "$as_dir" ||
53583$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
53584	 X"$as_dir" : 'X\(//\)[^/]' \| \
53585	 X"$as_dir" : 'X\(//\)$' \| \
53586	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
53587$as_echo X"$as_dir" |
53588    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
53589	    s//\1/
53590	    q
53591	  }
53592	  /^X\(\/\/\)[^/].*/{
53593	    s//\1/
53594	    q
53595	  }
53596	  /^X\(\/\/\)$/{
53597	    s//\1/
53598	    q
53599	  }
53600	  /^X\(\/\).*/{
53601	    s//\1/
53602	    q
53603	  }
53604	  s/.*/./; q'`
53605      test -d "$as_dir" && break
53606    done
53607    test -z "$as_dirs" || eval "mkdir $as_dirs"
53608  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
53609
53610
53611} # as_fn_mkdir_p
53612if mkdir -p . 2>/dev/null; then
53613  as_mkdir_p='mkdir -p "$as_dir"'
53614else
53615  test -d ./-p && rmdir ./-p
53616  as_mkdir_p=false
53617fi
53618
53619
53620# as_fn_executable_p FILE
53621# -----------------------
53622# Test if FILE is an executable regular file.
53623as_fn_executable_p ()
53624{
53625  test -f "$1" && test -x "$1"
53626} # as_fn_executable_p
53627as_test_x='test -x'
53628as_executable_p=as_fn_executable_p
53629
53630# Sed expression to map a string onto a valid CPP name.
53631as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
53632
53633# Sed expression to map a string onto a valid variable name.
53634as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
53635
53636
53637exec 6>&1
53638## ----------------------------------- ##
53639## Main body of $CONFIG_STATUS script. ##
53640## ----------------------------------- ##
53641_ASEOF
53642test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
53643
53644cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
53645# Save the log message, to keep $0 and so on meaningful, and to
53646# report actual input values of CONFIG_FILES etc. instead of their
53647# values after options handling.
53648ac_log="
53649This file was extended by OpenJDK $as_me jdk9, which was
53650generated by GNU Autoconf 2.69.  Invocation command line was
53651
53652  CONFIG_FILES    = $CONFIG_FILES
53653  CONFIG_HEADERS  = $CONFIG_HEADERS
53654  CONFIG_LINKS    = $CONFIG_LINKS
53655  CONFIG_COMMANDS = $CONFIG_COMMANDS
53656  $ $0 $@
53657
53658on `(hostname || uname -n) 2>/dev/null | sed 1q`
53659"
53660
53661_ACEOF
53662
53663case $ac_config_files in *"
53664"*) set x $ac_config_files; shift; ac_config_files=$*;;
53665esac
53666
53667
53668
53669cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
53670# Files that config.status was made for.
53671config_files="$ac_config_files"
53672
53673_ACEOF
53674
53675cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
53676ac_cs_usage="\
53677\`$as_me' instantiates files and other configuration actions
53678from templates according to the current configuration.  Unless the files
53679and actions are specified as TAGs, all are instantiated by default.
53680
53681Usage: $0 [OPTION]... [TAG]...
53682
53683  -h, --help       print this help, then exit
53684  -V, --version    print version number and configuration settings, then exit
53685      --config     print configuration, then exit
53686  -q, --quiet, --silent
53687                   do not print progress messages
53688  -d, --debug      don't remove temporary files
53689      --recheck    update $as_me by reconfiguring in the same conditions
53690      --file=FILE[:TEMPLATE]
53691                   instantiate the configuration file FILE
53692
53693Configuration files:
53694$config_files
53695
53696Report bugs to <build-dev@openjdk.java.net>.
53697OpenJDK home page: <http://openjdk.java.net>."
53698
53699_ACEOF
53700cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
53701ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
53702ac_cs_version="\\
53703OpenJDK config.status jdk9
53704configured by $0, generated by GNU Autoconf 2.69,
53705  with options \\"\$ac_cs_config\\"
53706
53707Copyright (C) 2012 Free Software Foundation, Inc.
53708This config.status script is free software; the Free Software Foundation
53709gives unlimited permission to copy, distribute and modify it."
53710
53711ac_pwd='$ac_pwd'
53712srcdir='$srcdir'
53713AWK='$AWK'
53714test -n "\$AWK" || AWK=awk
53715_ACEOF
53716
53717cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
53718# The default lists apply if the user does not specify any file.
53719ac_need_defaults=:
53720while test $# != 0
53721do
53722  case $1 in
53723  --*=?*)
53724    ac_option=`expr "X$1" : 'X\([^=]*\)='`
53725    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
53726    ac_shift=:
53727    ;;
53728  --*=)
53729    ac_option=`expr "X$1" : 'X\([^=]*\)='`
53730    ac_optarg=
53731    ac_shift=:
53732    ;;
53733  *)
53734    ac_option=$1
53735    ac_optarg=$2
53736    ac_shift=shift
53737    ;;
53738  esac
53739
53740  case $ac_option in
53741  # Handling of the options.
53742  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
53743    ac_cs_recheck=: ;;
53744  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
53745    $as_echo "$ac_cs_version"; exit ;;
53746  --config | --confi | --conf | --con | --co | --c )
53747    $as_echo "$ac_cs_config"; exit ;;
53748  --debug | --debu | --deb | --de | --d | -d )
53749    debug=: ;;
53750  --file | --fil | --fi | --f )
53751    $ac_shift
53752    case $ac_optarg in
53753    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
53754    '') as_fn_error $? "missing file argument" ;;
53755    esac
53756    as_fn_append CONFIG_FILES " '$ac_optarg'"
53757    ac_need_defaults=false;;
53758  --he | --h |  --help | --hel | -h )
53759    $as_echo "$ac_cs_usage"; exit ;;
53760  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
53761  | -silent | --silent | --silen | --sile | --sil | --si | --s)
53762    ac_cs_silent=: ;;
53763
53764  # This is an error.
53765  -*) as_fn_error $? "unrecognized option: \`$1'
53766Try \`$0 --help' for more information." ;;
53767
53768  *) as_fn_append ac_config_targets " $1"
53769     ac_need_defaults=false ;;
53770
53771  esac
53772  shift
53773done
53774
53775ac_configure_extra_args=
53776
53777if $ac_cs_silent; then
53778  exec 6>/dev/null
53779  ac_configure_extra_args="$ac_configure_extra_args --silent"
53780fi
53781
53782_ACEOF
53783cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
53784if \$ac_cs_recheck; then
53785  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
53786  shift
53787  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
53788  CONFIG_SHELL='$SHELL'
53789  export CONFIG_SHELL
53790  exec "\$@"
53791fi
53792
53793_ACEOF
53794cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
53795exec 5>>config.log
53796{
53797  echo
53798  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
53799## Running $as_me. ##
53800_ASBOX
53801  $as_echo "$ac_log"
53802} >&5
53803
53804_ACEOF
53805cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
53806_ACEOF
53807
53808cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
53809
53810# Handling of arguments.
53811for ac_config_target in $ac_config_targets
53812do
53813  case $ac_config_target in
53814    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
53815    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
53816    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
53817    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
53818    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
53819
53820  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
53821  esac
53822done
53823
53824
53825# If the user did not use the arguments to specify the items to instantiate,
53826# then the envvar interface is used.  Set only those that are not.
53827# We use the long form for the default assignment because of an extremely
53828# bizarre bug on SunOS 4.1.3.
53829if $ac_need_defaults; then
53830  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
53831fi
53832
53833# Have a temporary directory for convenience.  Make it in the build tree
53834# simply because there is no reason against having it here, and in addition,
53835# creating and moving files from /tmp can sometimes cause problems.
53836# Hook for its removal unless debugging.
53837# Note that there is a small window in which the directory will not be cleaned:
53838# after its creation but before its name has been assigned to `$tmp'.
53839$debug ||
53840{
53841  tmp= ac_tmp=
53842  trap 'exit_status=$?
53843  : "${ac_tmp:=$tmp}"
53844  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
53845' 0
53846  trap 'as_fn_exit 1' 1 2 13 15
53847}
53848# Create a (secure) tmp directory for tmp files.
53849
53850{
53851  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
53852  test -d "$tmp"
53853}  ||
53854{
53855  tmp=./conf$$-$RANDOM
53856  (umask 077 && mkdir "$tmp")
53857} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
53858ac_tmp=$tmp
53859
53860# Set up the scripts for CONFIG_FILES section.
53861# No need to generate them if there are no CONFIG_FILES.
53862# This happens for instance with `./config.status config.h'.
53863if test -n "$CONFIG_FILES"; then
53864
53865
53866ac_cr=`echo X | tr X '\015'`
53867# On cygwin, bash can eat \r inside `` if the user requested igncr.
53868# But we know of no other shell where ac_cr would be empty at this
53869# point, so we can use a bashism as a fallback.
53870if test "x$ac_cr" = x; then
53871  eval ac_cr=\$\'\\r\'
53872fi
53873ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
53874if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
53875  ac_cs_awk_cr='\\r'
53876else
53877  ac_cs_awk_cr=$ac_cr
53878fi
53879
53880echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
53881_ACEOF
53882
53883
53884{
53885  echo "cat >conf$$subs.awk <<_ACEOF" &&
53886  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
53887  echo "_ACEOF"
53888} >conf$$subs.sh ||
53889  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
53890ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
53891ac_delim='%!_!# '
53892for ac_last_try in false false false false false :; do
53893  . ./conf$$subs.sh ||
53894    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
53895
53896  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
53897  if test $ac_delim_n = $ac_delim_num; then
53898    break
53899  elif $ac_last_try; then
53900    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
53901  else
53902    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
53903  fi
53904done
53905rm -f conf$$subs.sh
53906
53907cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
53908cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
53909_ACEOF
53910sed -n '
53911h
53912s/^/S["/; s/!.*/"]=/
53913p
53914g
53915s/^[^!]*!//
53916:repl
53917t repl
53918s/'"$ac_delim"'$//
53919t delim
53920:nl
53921h
53922s/\(.\{148\}\)..*/\1/
53923t more1
53924s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
53925p
53926n
53927b repl
53928:more1
53929s/["\\]/\\&/g; s/^/"/; s/$/"\\/
53930p
53931g
53932s/.\{148\}//
53933t nl
53934:delim
53935h
53936s/\(.\{148\}\)..*/\1/
53937t more2
53938s/["\\]/\\&/g; s/^/"/; s/$/"/
53939p
53940b
53941:more2
53942s/["\\]/\\&/g; s/^/"/; s/$/"\\/
53943p
53944g
53945s/.\{148\}//
53946t delim
53947' <conf$$subs.awk | sed '
53948/^[^""]/{
53949  N
53950  s/\n//
53951}
53952' >>$CONFIG_STATUS || ac_write_fail=1
53953rm -f conf$$subs.awk
53954cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
53955_ACAWK
53956cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
53957  for (key in S) S_is_set[key] = 1
53958  FS = ""
53959
53960}
53961{
53962  line = $ 0
53963  nfields = split(line, field, "@")
53964  substed = 0
53965  len = length(field[1])
53966  for (i = 2; i < nfields; i++) {
53967    key = field[i]
53968    keylen = length(key)
53969    if (S_is_set[key]) {
53970      value = S[key]
53971      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
53972      len += length(value) + length(field[++i])
53973      substed = 1
53974    } else
53975      len += 1 + keylen
53976  }
53977
53978  print line
53979}
53980
53981_ACAWK
53982_ACEOF
53983cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
53984if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
53985  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
53986else
53987  cat
53988fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
53989  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
53990_ACEOF
53991
53992# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
53993# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
53994# trailing colons and then remove the whole line if VPATH becomes empty
53995# (actually we leave an empty line to preserve line numbers).
53996if test "x$srcdir" = x.; then
53997  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
53998h
53999s///
54000s/^/:/
54001s/[	 ]*$/:/
54002s/:\$(srcdir):/:/g
54003s/:\${srcdir}:/:/g
54004s/:@srcdir@:/:/g
54005s/^:*//
54006s/:*$//
54007x
54008s/\(=[	 ]*\).*/\1/
54009G
54010s/\n//
54011s/^[^=]*=[	 ]*$//
54012}'
54013fi
54014
54015cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54016fi # test -n "$CONFIG_FILES"
54017
54018
54019eval set X "  :F $CONFIG_FILES      "
54020shift
54021for ac_tag
54022do
54023  case $ac_tag in
54024  :[FHLC]) ac_mode=$ac_tag; continue;;
54025  esac
54026  case $ac_mode$ac_tag in
54027  :[FHL]*:*);;
54028  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
54029  :[FH]-) ac_tag=-:-;;
54030  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
54031  esac
54032  ac_save_IFS=$IFS
54033  IFS=:
54034  set x $ac_tag
54035  IFS=$ac_save_IFS
54036  shift
54037  ac_file=$1
54038  shift
54039
54040  case $ac_mode in
54041  :L) ac_source=$1;;
54042  :[FH])
54043    ac_file_inputs=
54044    for ac_f
54045    do
54046      case $ac_f in
54047      -) ac_f="$ac_tmp/stdin";;
54048      *) # Look for the file first in the build tree, then in the source tree
54049	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
54050	 # because $ac_f cannot contain `:'.
54051	 test -f "$ac_f" ||
54052	   case $ac_f in
54053	   [\\/$]*) false;;
54054	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
54055	   esac ||
54056	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
54057      esac
54058      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
54059      as_fn_append ac_file_inputs " '$ac_f'"
54060    done
54061
54062    # Let's still pretend it is `configure' which instantiates (i.e., don't
54063    # use $as_me), people would be surprised to read:
54064    #    /* config.h.  Generated by config.status.  */
54065    configure_input='Generated from '`
54066	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
54067	`' by configure.'
54068    if test x"$ac_file" != x-; then
54069      configure_input="$ac_file.  $configure_input"
54070      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
54071$as_echo "$as_me: creating $ac_file" >&6;}
54072    fi
54073    # Neutralize special characters interpreted by sed in replacement strings.
54074    case $configure_input in #(
54075    *\&* | *\|* | *\\* )
54076       ac_sed_conf_input=`$as_echo "$configure_input" |
54077       sed 's/[\\\\&|]/\\\\&/g'`;; #(
54078    *) ac_sed_conf_input=$configure_input;;
54079    esac
54080
54081    case $ac_tag in
54082    *:-:* | *:-) cat >"$ac_tmp/stdin" \
54083      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
54084    esac
54085    ;;
54086  esac
54087
54088  ac_dir=`$as_dirname -- "$ac_file" ||
54089$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
54090	 X"$ac_file" : 'X\(//\)[^/]' \| \
54091	 X"$ac_file" : 'X\(//\)$' \| \
54092	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
54093$as_echo X"$ac_file" |
54094    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
54095	    s//\1/
54096	    q
54097	  }
54098	  /^X\(\/\/\)[^/].*/{
54099	    s//\1/
54100	    q
54101	  }
54102	  /^X\(\/\/\)$/{
54103	    s//\1/
54104	    q
54105	  }
54106	  /^X\(\/\).*/{
54107	    s//\1/
54108	    q
54109	  }
54110	  s/.*/./; q'`
54111  as_dir="$ac_dir"; as_fn_mkdir_p
54112  ac_builddir=.
54113
54114case "$ac_dir" in
54115.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
54116*)
54117  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
54118  # A ".." for each directory in $ac_dir_suffix.
54119  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
54120  case $ac_top_builddir_sub in
54121  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
54122  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
54123  esac ;;
54124esac
54125ac_abs_top_builddir=$ac_pwd
54126ac_abs_builddir=$ac_pwd$ac_dir_suffix
54127# for backward compatibility:
54128ac_top_builddir=$ac_top_build_prefix
54129
54130case $srcdir in
54131  .)  # We are building in place.
54132    ac_srcdir=.
54133    ac_top_srcdir=$ac_top_builddir_sub
54134    ac_abs_top_srcdir=$ac_pwd ;;
54135  [\\/]* | ?:[\\/]* )  # Absolute name.
54136    ac_srcdir=$srcdir$ac_dir_suffix;
54137    ac_top_srcdir=$srcdir
54138    ac_abs_top_srcdir=$srcdir ;;
54139  *) # Relative name.
54140    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
54141    ac_top_srcdir=$ac_top_build_prefix$srcdir
54142    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
54143esac
54144ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
54145
54146
54147  case $ac_mode in
54148  :F)
54149  #
54150  # CONFIG_FILE
54151  #
54152
54153_ACEOF
54154
54155cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54156# If the template does not know about datarootdir, expand it.
54157# FIXME: This hack should be removed a few years after 2.60.
54158ac_datarootdir_hack=; ac_datarootdir_seen=
54159ac_sed_dataroot='
54160/datarootdir/ {
54161  p
54162  q
54163}
54164/@datadir@/p
54165/@docdir@/p
54166/@infodir@/p
54167/@localedir@/p
54168/@mandir@/p'
54169case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
54170*datarootdir*) ac_datarootdir_seen=yes;;
54171*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
54172  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
54173$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
54174_ACEOF
54175cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54176  ac_datarootdir_hack='
54177  s&@datadir@&$datadir&g
54178  s&@docdir@&$docdir&g
54179  s&@infodir@&$infodir&g
54180  s&@localedir@&$localedir&g
54181  s&@mandir@&$mandir&g
54182  s&\\\${datarootdir}&$datarootdir&g' ;;
54183esac
54184_ACEOF
54185
54186# Neutralize VPATH when `$srcdir' = `.'.
54187# Shell code in configure.ac might set extrasub.
54188# FIXME: do we really want to maintain this feature?
54189cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54190ac_sed_extra="$ac_vpsub
54191$extrasub
54192_ACEOF
54193cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54194:t
54195/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
54196s|@configure_input@|$ac_sed_conf_input|;t t
54197s&@top_builddir@&$ac_top_builddir_sub&;t t
54198s&@top_build_prefix@&$ac_top_build_prefix&;t t
54199s&@srcdir@&$ac_srcdir&;t t
54200s&@abs_srcdir@&$ac_abs_srcdir&;t t
54201s&@top_srcdir@&$ac_top_srcdir&;t t
54202s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
54203s&@builddir@&$ac_builddir&;t t
54204s&@abs_builddir@&$ac_abs_builddir&;t t
54205s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
54206$ac_datarootdir_hack
54207"
54208eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
54209  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
54210
54211test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
54212  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
54213  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
54214      "$ac_tmp/out"`; test -z "$ac_out"; } &&
54215  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
54216which seems to be undefined.  Please make sure it is defined" >&5
54217$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
54218which seems to be undefined.  Please make sure it is defined" >&2;}
54219
54220  rm -f "$ac_tmp/stdin"
54221  case $ac_file in
54222  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
54223  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
54224  esac \
54225  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
54226 ;;
54227
54228
54229
54230  esac
54231
54232done # for ac_tag
54233
54234
54235as_fn_exit 0
54236_ACEOF
54237ac_clean_files=$ac_clean_files_save
54238
54239test $ac_write_fail = 0 ||
54240  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
54241
54242
54243# configure is writing to config.log, and then calls config.status.
54244# config.status does its own redirection, appending to config.log.
54245# Unfortunately, on DOS this fails, as config.log is still kept open
54246# by configure, so config.status won't be able to write to it; its
54247# output is simply discarded.  So we exec the FD to /dev/null,
54248# effectively closing config.log, so it can be properly (re)opened and
54249# appended to by config.status.  When coming back to configure, we
54250# need to make the FD available again.
54251if test "$no_create" != yes; then
54252  ac_cs_success=:
54253  ac_config_status_args=
54254  test "$silent" = yes &&
54255    ac_config_status_args="$ac_config_status_args --quiet"
54256  exec 5>/dev/null
54257  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
54258  exec 5>>config.log
54259  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
54260  # would make configure fail if this is the last instruction.
54261  $ac_cs_success || as_fn_exit 1
54262fi
54263if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
54264  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
54265$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
54266fi
54267
54268
54269# After AC_OUTPUT, we need to do final work
54270
54271
54272  # Try to move config.log (generated by autoconf) to the configure-support directory.
54273  if test -e ./config.log; then
54274    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
54275  fi
54276
54277  # Rotate our log file (configure.log)
54278  if test -e "$OUTPUT_ROOT/configure.log.old"; then
54279    $RM -f "$OUTPUT_ROOT/configure.log.old"
54280  fi
54281  if test -e "$OUTPUT_ROOT/configure.log"; then
54282    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
54283  fi
54284
54285  # Move configure.log from current directory to the build output root
54286  if test -e ./configure.log; then
54287    echo found it
54288    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
54289  fi
54290
54291  # Make the compare script executable
54292  $CHMOD +x $OUTPUT_ROOT/compare.sh
54293
54294
54295# Finally output some useful information to the user
54296
54297  # Finally output some useful information to the user
54298
54299  printf "\n"
54300  printf "====================================================\n"
54301  if test "x$no_create" != "xyes"; then
54302    if test "x$IS_RECONFIGURE" != "xyes"; then
54303      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
54304    else
54305      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
54306    fi
54307  else
54308    if test "x$IS_RECONFIGURE" != "xyes"; then
54309      printf "A configuration has been successfully checked but not created\n"
54310    else
54311      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
54312    fi
54313  fi
54314  if test "x$CONFIGURE_COMMAND_LINE" != x; then
54315    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
54316  else
54317    printf "using default settings.\n"
54318  fi
54319
54320  printf "\n"
54321  printf "Configuration summary:\n"
54322  printf "* Debug level:    $DEBUG_LEVEL\n"
54323  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
54324  printf "* JDK variant:    $JDK_VARIANT\n"
54325  printf "* JVM variants:   $with_jvm_variants\n"
54326  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
54327
54328  printf "\n"
54329  printf "Tools summary:\n"
54330  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
54331    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
54332  fi
54333  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
54334  if test "x$TOOLCHAIN_VERSION" != "x"; then
54335    print_version=" $TOOLCHAIN_VERSION"
54336  fi
54337  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
54338  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
54339  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
54340
54341  printf "\n"
54342  printf "Build performance summary:\n"
54343  printf "* Cores to use:   $JOBS\n"
54344  printf "* Memory limit:   $MEMORY_SIZE MB\n"
54345  if test "x$CCACHE_STATUS" != "x"; then
54346    printf "* ccache status:  $CCACHE_STATUS\n"
54347  fi
54348  printf "\n"
54349
54350  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
54351    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
54352    printf "will result in longer build times.\n"
54353    printf "\n"
54354  fi
54355
54356  if test "x$FOUND_ALT_VARIABLES" != "x"; then
54357    printf "WARNING: You have old-style ALT_ environment variables set.\n"
54358    printf "These are not respected, and will be ignored. It is recommended\n"
54359    printf "that you clean your environment. The following variables are set:\n"
54360    printf "$FOUND_ALT_VARIABLES\n"
54361    printf "\n"
54362  fi
54363
54364  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
54365    printf "WARNING: Your build output directory is not on a local disk.\n"
54366    printf "This will severely degrade build performance!\n"
54367    printf "It is recommended that you create an output directory on a local disk,\n"
54368    printf "and run the configure script again from that directory.\n"
54369    printf "\n"
54370  fi
54371
54372  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
54373    printf "WARNING: The result of this configuration has overridden an older\n"
54374    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
54375    printf "proper build. Failure to do so might result in strange build problems.\n"
54376    printf "\n"
54377  fi
54378
54379  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
54380    printf "WARNING: The result of this configuration was not saved.\n"
54381    printf "You should run without '--no-create | -n' to create the configuration.\n"
54382    printf "\n"
54383  fi
54384
54385
54386
54387  # Locate config.log.
54388  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
54389    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
54390  elif test -e "./config.log"; then
54391    CONFIG_LOG_PATH="."
54392  fi
54393
54394  if test -e "$CONFIG_LOG_PATH/config.log"; then
54395    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
54396    if test $? -eq 0; then
54397      printf "The following warnings were produced. Repeated here for convenience:\n"
54398      # We must quote sed expression (using []) to stop m4 from eating the [].
54399      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
54400      printf "\n"
54401    fi
54402  fi
54403
54404